Skip to main content

google_cloud_appengine_v1/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_longrunning;
25extern crate google_cloud_lro;
26extern crate serde;
27extern crate serde_json;
28extern crate serde_with;
29extern crate std;
30extern crate tracing;
31extern crate wkt;
32
33mod debug;
34mod deserialize;
35mod serialize;
36
37/// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/)
38/// configuration for API handlers.
39#[derive(Clone, Default, PartialEq)]
40#[non_exhaustive]
41pub struct ApiConfigHandler {
42    /// Action to take when users access resources that require
43    /// authentication. Defaults to `redirect`.
44    pub auth_fail_action: crate::model::AuthFailAction,
45
46    /// Level of login required to access this resource. Defaults to
47    /// `optional`.
48    pub login: crate::model::LoginRequirement,
49
50    /// Path to the script from the application root directory.
51    pub script: std::string::String,
52
53    /// Security (HTTPS) enforcement for this URL.
54    pub security_level: crate::model::SecurityLevel,
55
56    /// URL to serve the endpoint at.
57    pub url: std::string::String,
58
59    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60}
61
62impl ApiConfigHandler {
63    /// Creates a new default instance.
64    pub fn new() -> Self {
65        std::default::Default::default()
66    }
67
68    /// Sets the value of [auth_fail_action][crate::model::ApiConfigHandler::auth_fail_action].
69    ///
70    /// # Example
71    /// ```ignore,no_run
72    /// # use google_cloud_appengine_v1::model::ApiConfigHandler;
73    /// use google_cloud_appengine_v1::model::AuthFailAction;
74    /// let x0 = ApiConfigHandler::new().set_auth_fail_action(AuthFailAction::Redirect);
75    /// let x1 = ApiConfigHandler::new().set_auth_fail_action(AuthFailAction::Unauthorized);
76    /// ```
77    pub fn set_auth_fail_action<T: std::convert::Into<crate::model::AuthFailAction>>(
78        mut self,
79        v: T,
80    ) -> Self {
81        self.auth_fail_action = v.into();
82        self
83    }
84
85    /// Sets the value of [login][crate::model::ApiConfigHandler::login].
86    ///
87    /// # Example
88    /// ```ignore,no_run
89    /// # use google_cloud_appengine_v1::model::ApiConfigHandler;
90    /// use google_cloud_appengine_v1::model::LoginRequirement;
91    /// let x0 = ApiConfigHandler::new().set_login(LoginRequirement::LoginOptional);
92    /// let x1 = ApiConfigHandler::new().set_login(LoginRequirement::LoginAdmin);
93    /// let x2 = ApiConfigHandler::new().set_login(LoginRequirement::LoginRequired);
94    /// ```
95    pub fn set_login<T: std::convert::Into<crate::model::LoginRequirement>>(
96        mut self,
97        v: T,
98    ) -> Self {
99        self.login = v.into();
100        self
101    }
102
103    /// Sets the value of [script][crate::model::ApiConfigHandler::script].
104    ///
105    /// # Example
106    /// ```ignore,no_run
107    /// # use google_cloud_appengine_v1::model::ApiConfigHandler;
108    /// let x = ApiConfigHandler::new().set_script("example");
109    /// ```
110    pub fn set_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
111        self.script = v.into();
112        self
113    }
114
115    /// Sets the value of [security_level][crate::model::ApiConfigHandler::security_level].
116    ///
117    /// # Example
118    /// ```ignore,no_run
119    /// # use google_cloud_appengine_v1::model::ApiConfigHandler;
120    /// use google_cloud_appengine_v1::model::SecurityLevel;
121    /// let x0 = ApiConfigHandler::new().set_security_level(SecurityLevel::SecureNever);
122    /// let x1 = ApiConfigHandler::new().set_security_level(SecurityLevel::SecureOptional);
123    /// let x2 = ApiConfigHandler::new().set_security_level(SecurityLevel::SecureAlways);
124    /// ```
125    pub fn set_security_level<T: std::convert::Into<crate::model::SecurityLevel>>(
126        mut self,
127        v: T,
128    ) -> Self {
129        self.security_level = v.into();
130        self
131    }
132
133    /// Sets the value of [url][crate::model::ApiConfigHandler::url].
134    ///
135    /// # Example
136    /// ```ignore,no_run
137    /// # use google_cloud_appengine_v1::model::ApiConfigHandler;
138    /// let x = ApiConfigHandler::new().set_url("example");
139    /// ```
140    pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
141        self.url = v.into();
142        self
143    }
144}
145
146impl wkt::message::Message for ApiConfigHandler {
147    fn typename() -> &'static str {
148        "type.googleapis.com/google.appengine.v1.ApiConfigHandler"
149    }
150}
151
152/// Custom static error page to be served when an error occurs.
153#[derive(Clone, Default, PartialEq)]
154#[non_exhaustive]
155pub struct ErrorHandler {
156    /// Error condition this handler applies to.
157    pub error_code: crate::model::error_handler::ErrorCode,
158
159    /// Static file content to be served for this error.
160    pub static_file: std::string::String,
161
162    /// MIME type of file. Defaults to `text/html`.
163    pub mime_type: std::string::String,
164
165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
166}
167
168impl ErrorHandler {
169    /// Creates a new default instance.
170    pub fn new() -> Self {
171        std::default::Default::default()
172    }
173
174    /// Sets the value of [error_code][crate::model::ErrorHandler::error_code].
175    ///
176    /// # Example
177    /// ```ignore,no_run
178    /// # use google_cloud_appengine_v1::model::ErrorHandler;
179    /// use google_cloud_appengine_v1::model::error_handler::ErrorCode;
180    /// let x0 = ErrorHandler::new().set_error_code(ErrorCode::OverQuota);
181    /// let x1 = ErrorHandler::new().set_error_code(ErrorCode::DosApiDenial);
182    /// let x2 = ErrorHandler::new().set_error_code(ErrorCode::Timeout);
183    /// ```
184    pub fn set_error_code<T: std::convert::Into<crate::model::error_handler::ErrorCode>>(
185        mut self,
186        v: T,
187    ) -> Self {
188        self.error_code = v.into();
189        self
190    }
191
192    /// Sets the value of [static_file][crate::model::ErrorHandler::static_file].
193    ///
194    /// # Example
195    /// ```ignore,no_run
196    /// # use google_cloud_appengine_v1::model::ErrorHandler;
197    /// let x = ErrorHandler::new().set_static_file("example");
198    /// ```
199    pub fn set_static_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
200        self.static_file = v.into();
201        self
202    }
203
204    /// Sets the value of [mime_type][crate::model::ErrorHandler::mime_type].
205    ///
206    /// # Example
207    /// ```ignore,no_run
208    /// # use google_cloud_appengine_v1::model::ErrorHandler;
209    /// let x = ErrorHandler::new().set_mime_type("example");
210    /// ```
211    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
212        self.mime_type = v.into();
213        self
214    }
215}
216
217impl wkt::message::Message for ErrorHandler {
218    fn typename() -> &'static str {
219        "type.googleapis.com/google.appengine.v1.ErrorHandler"
220    }
221}
222
223/// Defines additional types related to [ErrorHandler].
224pub mod error_handler {
225    #[allow(unused_imports)]
226    use super::*;
227
228    /// Error codes.
229    ///
230    /// # Working with unknown values
231    ///
232    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
233    /// additional enum variants at any time. Adding new variants is not considered
234    /// a breaking change. Applications should write their code in anticipation of:
235    ///
236    /// - New values appearing in future releases of the client library, **and**
237    /// - New values received dynamically, without application changes.
238    ///
239    /// Please consult the [Working with enums] section in the user guide for some
240    /// guidelines.
241    ///
242    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
243    #[derive(Clone, Debug, PartialEq)]
244    #[non_exhaustive]
245    pub enum ErrorCode {
246        /// Not specified. ERROR_CODE_DEFAULT is assumed.
247        Unspecified,
248        /// All other error types.
249        Default,
250        /// Application has exceeded a resource quota.
251        OverQuota,
252        /// Client blocked by the application's Denial of Service protection
253        /// configuration.
254        DosApiDenial,
255        /// Deadline reached before the application responds.
256        Timeout,
257        /// If set, the enum was initialized with an unknown value.
258        ///
259        /// Applications can examine the value using [ErrorCode::value] or
260        /// [ErrorCode::name].
261        UnknownValue(error_code::UnknownValue),
262    }
263
264    #[doc(hidden)]
265    pub mod error_code {
266        #[allow(unused_imports)]
267        use super::*;
268        #[derive(Clone, Debug, PartialEq)]
269        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
270    }
271
272    impl ErrorCode {
273        /// Gets the enum value.
274        ///
275        /// Returns `None` if the enum contains an unknown value deserialized from
276        /// the string representation of enums.
277        pub fn value(&self) -> std::option::Option<i32> {
278            match self {
279                Self::Unspecified => std::option::Option::Some(0),
280                Self::Default => std::option::Option::Some(0),
281                Self::OverQuota => std::option::Option::Some(1),
282                Self::DosApiDenial => std::option::Option::Some(2),
283                Self::Timeout => std::option::Option::Some(3),
284                Self::UnknownValue(u) => u.0.value(),
285            }
286        }
287
288        /// Gets the enum value as a string.
289        ///
290        /// Returns `None` if the enum contains an unknown value deserialized from
291        /// the integer representation of enums.
292        pub fn name(&self) -> std::option::Option<&str> {
293            match self {
294                Self::Unspecified => std::option::Option::Some("ERROR_CODE_UNSPECIFIED"),
295                Self::Default => std::option::Option::Some("ERROR_CODE_DEFAULT"),
296                Self::OverQuota => std::option::Option::Some("ERROR_CODE_OVER_QUOTA"),
297                Self::DosApiDenial => std::option::Option::Some("ERROR_CODE_DOS_API_DENIAL"),
298                Self::Timeout => std::option::Option::Some("ERROR_CODE_TIMEOUT"),
299                Self::UnknownValue(u) => u.0.name(),
300            }
301        }
302    }
303
304    impl std::default::Default for ErrorCode {
305        fn default() -> Self {
306            use std::convert::From;
307            Self::from(0)
308        }
309    }
310
311    impl std::fmt::Display for ErrorCode {
312        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
313            wkt::internal::display_enum(f, self.name(), self.value())
314        }
315    }
316
317    impl std::convert::From<i32> for ErrorCode {
318        fn from(value: i32) -> Self {
319            match value {
320                0 => Self::Default,
321                1 => Self::OverQuota,
322                2 => Self::DosApiDenial,
323                3 => Self::Timeout,
324                _ => Self::UnknownValue(error_code::UnknownValue(
325                    wkt::internal::UnknownEnumValue::Integer(value),
326                )),
327            }
328        }
329    }
330
331    impl std::convert::From<&str> for ErrorCode {
332        fn from(value: &str) -> Self {
333            use std::string::ToString;
334            match value {
335                "ERROR_CODE_UNSPECIFIED" => Self::Unspecified,
336                "ERROR_CODE_DEFAULT" => Self::Default,
337                "ERROR_CODE_OVER_QUOTA" => Self::OverQuota,
338                "ERROR_CODE_DOS_API_DENIAL" => Self::DosApiDenial,
339                "ERROR_CODE_TIMEOUT" => Self::Timeout,
340                _ => Self::UnknownValue(error_code::UnknownValue(
341                    wkt::internal::UnknownEnumValue::String(value.to_string()),
342                )),
343            }
344        }
345    }
346
347    impl serde::ser::Serialize for ErrorCode {
348        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
349        where
350            S: serde::Serializer,
351        {
352            match self {
353                Self::Unspecified => serializer.serialize_i32(0),
354                Self::Default => serializer.serialize_i32(0),
355                Self::OverQuota => serializer.serialize_i32(1),
356                Self::DosApiDenial => serializer.serialize_i32(2),
357                Self::Timeout => serializer.serialize_i32(3),
358                Self::UnknownValue(u) => u.0.serialize(serializer),
359            }
360        }
361    }
362
363    impl<'de> serde::de::Deserialize<'de> for ErrorCode {
364        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
365        where
366            D: serde::Deserializer<'de>,
367        {
368            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
369                ".google.appengine.v1.ErrorHandler.ErrorCode",
370            ))
371        }
372    }
373}
374
375/// URL pattern and description of how the URL should be handled. App Engine can
376/// handle URLs by executing application code or by serving static files
377/// uploaded with the version, such as images, CSS, or JavaScript.
378#[derive(Clone, Default, PartialEq)]
379#[non_exhaustive]
380pub struct UrlMap {
381    /// URL prefix. Uses regular expression syntax, which means regexp
382    /// special characters must be escaped, but should not contain groupings.
383    /// All URLs that begin with this prefix are handled by this handler, using the
384    /// portion of the URL after the prefix as part of the file path.
385    pub url_regex: std::string::String,
386
387    /// Security (HTTPS) enforcement for this URL.
388    pub security_level: crate::model::SecurityLevel,
389
390    /// Level of login required to access this resource. Not supported for Node.js
391    /// in the App Engine standard environment.
392    pub login: crate::model::LoginRequirement,
393
394    /// Action to take when users access resources that require
395    /// authentication. Defaults to `redirect`.
396    pub auth_fail_action: crate::model::AuthFailAction,
397
398    /// `30x` code to use when performing redirects for the `secure` field.
399    /// Defaults to `302`.
400    pub redirect_http_response_code: crate::model::url_map::RedirectHttpResponseCode,
401
402    /// Type of handler for this URL pattern.
403    pub handler_type: std::option::Option<crate::model::url_map::HandlerType>,
404
405    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
406}
407
408impl UrlMap {
409    /// Creates a new default instance.
410    pub fn new() -> Self {
411        std::default::Default::default()
412    }
413
414    /// Sets the value of [url_regex][crate::model::UrlMap::url_regex].
415    ///
416    /// # Example
417    /// ```ignore,no_run
418    /// # use google_cloud_appengine_v1::model::UrlMap;
419    /// let x = UrlMap::new().set_url_regex("example");
420    /// ```
421    pub fn set_url_regex<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
422        self.url_regex = v.into();
423        self
424    }
425
426    /// Sets the value of [security_level][crate::model::UrlMap::security_level].
427    ///
428    /// # Example
429    /// ```ignore,no_run
430    /// # use google_cloud_appengine_v1::model::UrlMap;
431    /// use google_cloud_appengine_v1::model::SecurityLevel;
432    /// let x0 = UrlMap::new().set_security_level(SecurityLevel::SecureNever);
433    /// let x1 = UrlMap::new().set_security_level(SecurityLevel::SecureOptional);
434    /// let x2 = UrlMap::new().set_security_level(SecurityLevel::SecureAlways);
435    /// ```
436    pub fn set_security_level<T: std::convert::Into<crate::model::SecurityLevel>>(
437        mut self,
438        v: T,
439    ) -> Self {
440        self.security_level = v.into();
441        self
442    }
443
444    /// Sets the value of [login][crate::model::UrlMap::login].
445    ///
446    /// # Example
447    /// ```ignore,no_run
448    /// # use google_cloud_appengine_v1::model::UrlMap;
449    /// use google_cloud_appengine_v1::model::LoginRequirement;
450    /// let x0 = UrlMap::new().set_login(LoginRequirement::LoginOptional);
451    /// let x1 = UrlMap::new().set_login(LoginRequirement::LoginAdmin);
452    /// let x2 = UrlMap::new().set_login(LoginRequirement::LoginRequired);
453    /// ```
454    pub fn set_login<T: std::convert::Into<crate::model::LoginRequirement>>(
455        mut self,
456        v: T,
457    ) -> Self {
458        self.login = v.into();
459        self
460    }
461
462    /// Sets the value of [auth_fail_action][crate::model::UrlMap::auth_fail_action].
463    ///
464    /// # Example
465    /// ```ignore,no_run
466    /// # use google_cloud_appengine_v1::model::UrlMap;
467    /// use google_cloud_appengine_v1::model::AuthFailAction;
468    /// let x0 = UrlMap::new().set_auth_fail_action(AuthFailAction::Redirect);
469    /// let x1 = UrlMap::new().set_auth_fail_action(AuthFailAction::Unauthorized);
470    /// ```
471    pub fn set_auth_fail_action<T: std::convert::Into<crate::model::AuthFailAction>>(
472        mut self,
473        v: T,
474    ) -> Self {
475        self.auth_fail_action = v.into();
476        self
477    }
478
479    /// Sets the value of [redirect_http_response_code][crate::model::UrlMap::redirect_http_response_code].
480    ///
481    /// # Example
482    /// ```ignore,no_run
483    /// # use google_cloud_appengine_v1::model::UrlMap;
484    /// use google_cloud_appengine_v1::model::url_map::RedirectHttpResponseCode;
485    /// let x0 = UrlMap::new().set_redirect_http_response_code(RedirectHttpResponseCode::RedirectHttpResponseCode301);
486    /// let x1 = UrlMap::new().set_redirect_http_response_code(RedirectHttpResponseCode::RedirectHttpResponseCode302);
487    /// let x2 = UrlMap::new().set_redirect_http_response_code(RedirectHttpResponseCode::RedirectHttpResponseCode303);
488    /// ```
489    pub fn set_redirect_http_response_code<
490        T: std::convert::Into<crate::model::url_map::RedirectHttpResponseCode>,
491    >(
492        mut self,
493        v: T,
494    ) -> Self {
495        self.redirect_http_response_code = v.into();
496        self
497    }
498
499    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type].
500    ///
501    /// Note that all the setters affecting `handler_type` are mutually
502    /// exclusive.
503    ///
504    /// # Example
505    /// ```ignore,no_run
506    /// # use google_cloud_appengine_v1::model::UrlMap;
507    /// use google_cloud_appengine_v1::model::StaticFilesHandler;
508    /// let x = UrlMap::new().set_handler_type(Some(
509    ///     google_cloud_appengine_v1::model::url_map::HandlerType::StaticFiles(StaticFilesHandler::default().into())));
510    /// ```
511    pub fn set_handler_type<
512        T: std::convert::Into<std::option::Option<crate::model::url_map::HandlerType>>,
513    >(
514        mut self,
515        v: T,
516    ) -> Self {
517        self.handler_type = v.into();
518        self
519    }
520
521    /// The value of [handler_type][crate::model::UrlMap::handler_type]
522    /// if it holds a `StaticFiles`, `None` if the field is not set or
523    /// holds a different branch.
524    pub fn static_files(
525        &self,
526    ) -> std::option::Option<&std::boxed::Box<crate::model::StaticFilesHandler>> {
527        #[allow(unreachable_patterns)]
528        self.handler_type.as_ref().and_then(|v| match v {
529            crate::model::url_map::HandlerType::StaticFiles(v) => std::option::Option::Some(v),
530            _ => std::option::Option::None,
531        })
532    }
533
534    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
535    /// to hold a `StaticFiles`.
536    ///
537    /// Note that all the setters affecting `handler_type` are
538    /// mutually exclusive.
539    ///
540    /// # Example
541    /// ```ignore,no_run
542    /// # use google_cloud_appengine_v1::model::UrlMap;
543    /// use google_cloud_appengine_v1::model::StaticFilesHandler;
544    /// let x = UrlMap::new().set_static_files(StaticFilesHandler::default()/* use setters */);
545    /// assert!(x.static_files().is_some());
546    /// assert!(x.script().is_none());
547    /// assert!(x.api_endpoint().is_none());
548    /// ```
549    pub fn set_static_files<
550        T: std::convert::Into<std::boxed::Box<crate::model::StaticFilesHandler>>,
551    >(
552        mut self,
553        v: T,
554    ) -> Self {
555        self.handler_type =
556            std::option::Option::Some(crate::model::url_map::HandlerType::StaticFiles(v.into()));
557        self
558    }
559
560    /// The value of [handler_type][crate::model::UrlMap::handler_type]
561    /// if it holds a `Script`, `None` if the field is not set or
562    /// holds a different branch.
563    pub fn script(&self) -> std::option::Option<&std::boxed::Box<crate::model::ScriptHandler>> {
564        #[allow(unreachable_patterns)]
565        self.handler_type.as_ref().and_then(|v| match v {
566            crate::model::url_map::HandlerType::Script(v) => std::option::Option::Some(v),
567            _ => std::option::Option::None,
568        })
569    }
570
571    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
572    /// to hold a `Script`.
573    ///
574    /// Note that all the setters affecting `handler_type` are
575    /// mutually exclusive.
576    ///
577    /// # Example
578    /// ```ignore,no_run
579    /// # use google_cloud_appengine_v1::model::UrlMap;
580    /// use google_cloud_appengine_v1::model::ScriptHandler;
581    /// let x = UrlMap::new().set_script(ScriptHandler::default()/* use setters */);
582    /// assert!(x.script().is_some());
583    /// assert!(x.static_files().is_none());
584    /// assert!(x.api_endpoint().is_none());
585    /// ```
586    pub fn set_script<T: std::convert::Into<std::boxed::Box<crate::model::ScriptHandler>>>(
587        mut self,
588        v: T,
589    ) -> Self {
590        self.handler_type =
591            std::option::Option::Some(crate::model::url_map::HandlerType::Script(v.into()));
592        self
593    }
594
595    /// The value of [handler_type][crate::model::UrlMap::handler_type]
596    /// if it holds a `ApiEndpoint`, `None` if the field is not set or
597    /// holds a different branch.
598    pub fn api_endpoint(
599        &self,
600    ) -> std::option::Option<&std::boxed::Box<crate::model::ApiEndpointHandler>> {
601        #[allow(unreachable_patterns)]
602        self.handler_type.as_ref().and_then(|v| match v {
603            crate::model::url_map::HandlerType::ApiEndpoint(v) => std::option::Option::Some(v),
604            _ => std::option::Option::None,
605        })
606    }
607
608    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
609    /// to hold a `ApiEndpoint`.
610    ///
611    /// Note that all the setters affecting `handler_type` are
612    /// mutually exclusive.
613    ///
614    /// # Example
615    /// ```ignore,no_run
616    /// # use google_cloud_appengine_v1::model::UrlMap;
617    /// use google_cloud_appengine_v1::model::ApiEndpointHandler;
618    /// let x = UrlMap::new().set_api_endpoint(ApiEndpointHandler::default()/* use setters */);
619    /// assert!(x.api_endpoint().is_some());
620    /// assert!(x.static_files().is_none());
621    /// assert!(x.script().is_none());
622    /// ```
623    pub fn set_api_endpoint<
624        T: std::convert::Into<std::boxed::Box<crate::model::ApiEndpointHandler>>,
625    >(
626        mut self,
627        v: T,
628    ) -> Self {
629        self.handler_type =
630            std::option::Option::Some(crate::model::url_map::HandlerType::ApiEndpoint(v.into()));
631        self
632    }
633}
634
635impl wkt::message::Message for UrlMap {
636    fn typename() -> &'static str {
637        "type.googleapis.com/google.appengine.v1.UrlMap"
638    }
639}
640
641/// Defines additional types related to [UrlMap].
642pub mod url_map {
643    #[allow(unused_imports)]
644    use super::*;
645
646    /// Redirect codes.
647    ///
648    /// # Working with unknown values
649    ///
650    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
651    /// additional enum variants at any time. Adding new variants is not considered
652    /// a breaking change. Applications should write their code in anticipation of:
653    ///
654    /// - New values appearing in future releases of the client library, **and**
655    /// - New values received dynamically, without application changes.
656    ///
657    /// Please consult the [Working with enums] section in the user guide for some
658    /// guidelines.
659    ///
660    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
661    #[derive(Clone, Debug, PartialEq)]
662    #[non_exhaustive]
663    pub enum RedirectHttpResponseCode {
664        /// Not specified. `302` is assumed.
665        Unspecified,
666        /// `301 Moved Permanently` code.
667        RedirectHttpResponseCode301,
668        /// `302 Moved Temporarily` code.
669        RedirectHttpResponseCode302,
670        /// `303 See Other` code.
671        RedirectHttpResponseCode303,
672        /// `307 Temporary Redirect` code.
673        RedirectHttpResponseCode307,
674        /// If set, the enum was initialized with an unknown value.
675        ///
676        /// Applications can examine the value using [RedirectHttpResponseCode::value] or
677        /// [RedirectHttpResponseCode::name].
678        UnknownValue(redirect_http_response_code::UnknownValue),
679    }
680
681    #[doc(hidden)]
682    pub mod redirect_http_response_code {
683        #[allow(unused_imports)]
684        use super::*;
685        #[derive(Clone, Debug, PartialEq)]
686        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
687    }
688
689    impl RedirectHttpResponseCode {
690        /// Gets the enum value.
691        ///
692        /// Returns `None` if the enum contains an unknown value deserialized from
693        /// the string representation of enums.
694        pub fn value(&self) -> std::option::Option<i32> {
695            match self {
696                Self::Unspecified => std::option::Option::Some(0),
697                Self::RedirectHttpResponseCode301 => std::option::Option::Some(1),
698                Self::RedirectHttpResponseCode302 => std::option::Option::Some(2),
699                Self::RedirectHttpResponseCode303 => std::option::Option::Some(3),
700                Self::RedirectHttpResponseCode307 => std::option::Option::Some(4),
701                Self::UnknownValue(u) => u.0.value(),
702            }
703        }
704
705        /// Gets the enum value as a string.
706        ///
707        /// Returns `None` if the enum contains an unknown value deserialized from
708        /// the integer representation of enums.
709        pub fn name(&self) -> std::option::Option<&str> {
710            match self {
711                Self::Unspecified => {
712                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED")
713                }
714                Self::RedirectHttpResponseCode301 => {
715                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_301")
716                }
717                Self::RedirectHttpResponseCode302 => {
718                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_302")
719                }
720                Self::RedirectHttpResponseCode303 => {
721                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_303")
722                }
723                Self::RedirectHttpResponseCode307 => {
724                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_307")
725                }
726                Self::UnknownValue(u) => u.0.name(),
727            }
728        }
729    }
730
731    impl std::default::Default for RedirectHttpResponseCode {
732        fn default() -> Self {
733            use std::convert::From;
734            Self::from(0)
735        }
736    }
737
738    impl std::fmt::Display for RedirectHttpResponseCode {
739        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
740            wkt::internal::display_enum(f, self.name(), self.value())
741        }
742    }
743
744    impl std::convert::From<i32> for RedirectHttpResponseCode {
745        fn from(value: i32) -> Self {
746            match value {
747                0 => Self::Unspecified,
748                1 => Self::RedirectHttpResponseCode301,
749                2 => Self::RedirectHttpResponseCode302,
750                3 => Self::RedirectHttpResponseCode303,
751                4 => Self::RedirectHttpResponseCode307,
752                _ => Self::UnknownValue(redirect_http_response_code::UnknownValue(
753                    wkt::internal::UnknownEnumValue::Integer(value),
754                )),
755            }
756        }
757    }
758
759    impl std::convert::From<&str> for RedirectHttpResponseCode {
760        fn from(value: &str) -> Self {
761            use std::string::ToString;
762            match value {
763                "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" => Self::Unspecified,
764                "REDIRECT_HTTP_RESPONSE_CODE_301" => Self::RedirectHttpResponseCode301,
765                "REDIRECT_HTTP_RESPONSE_CODE_302" => Self::RedirectHttpResponseCode302,
766                "REDIRECT_HTTP_RESPONSE_CODE_303" => Self::RedirectHttpResponseCode303,
767                "REDIRECT_HTTP_RESPONSE_CODE_307" => Self::RedirectHttpResponseCode307,
768                _ => Self::UnknownValue(redirect_http_response_code::UnknownValue(
769                    wkt::internal::UnknownEnumValue::String(value.to_string()),
770                )),
771            }
772        }
773    }
774
775    impl serde::ser::Serialize for RedirectHttpResponseCode {
776        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
777        where
778            S: serde::Serializer,
779        {
780            match self {
781                Self::Unspecified => serializer.serialize_i32(0),
782                Self::RedirectHttpResponseCode301 => serializer.serialize_i32(1),
783                Self::RedirectHttpResponseCode302 => serializer.serialize_i32(2),
784                Self::RedirectHttpResponseCode303 => serializer.serialize_i32(3),
785                Self::RedirectHttpResponseCode307 => serializer.serialize_i32(4),
786                Self::UnknownValue(u) => u.0.serialize(serializer),
787            }
788        }
789    }
790
791    impl<'de> serde::de::Deserialize<'de> for RedirectHttpResponseCode {
792        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
793        where
794            D: serde::Deserializer<'de>,
795        {
796            deserializer.deserialize_any(
797                wkt::internal::EnumVisitor::<RedirectHttpResponseCode>::new(
798                    ".google.appengine.v1.UrlMap.RedirectHttpResponseCode",
799                ),
800            )
801        }
802    }
803
804    /// Type of handler for this URL pattern.
805    #[derive(Clone, Debug, PartialEq)]
806    #[non_exhaustive]
807    pub enum HandlerType {
808        /// Returns the contents of a file, such as an image, as the response.
809        StaticFiles(std::boxed::Box<crate::model::StaticFilesHandler>),
810        /// Executes a script to handle the requests that match this URL
811        /// pattern. Only the `auto` value is supported for Node.js in the
812        /// App Engine standard environment, for example `"script": "auto"`.
813        Script(std::boxed::Box<crate::model::ScriptHandler>),
814        /// Uses API Endpoints to handle requests.
815        ApiEndpoint(std::boxed::Box<crate::model::ApiEndpointHandler>),
816    }
817}
818
819/// Files served directly to the user for a given URL, such as images, CSS
820/// stylesheets, or JavaScript source files. Static file handlers describe which
821/// files in the application directory are static files, and which URLs serve
822/// them.
823#[derive(Clone, Default, PartialEq)]
824#[non_exhaustive]
825pub struct StaticFilesHandler {
826    /// Path to the static files matched by the URL pattern, from the
827    /// application root directory. The path can refer to text matched in groupings
828    /// in the URL pattern.
829    pub path: std::string::String,
830
831    /// Regular expression that matches the file paths for all files that should be
832    /// referenced by this handler.
833    pub upload_path_regex: std::string::String,
834
835    /// HTTP headers to use for all responses from these URLs.
836    pub http_headers: std::collections::HashMap<std::string::String, std::string::String>,
837
838    /// MIME type used to serve all files served by this handler.
839    ///
840    /// Defaults to file-specific MIME types, which are derived from each file's
841    /// filename extension.
842    pub mime_type: std::string::String,
843
844    /// Time a static file served by this handler should be cached
845    /// by web proxies and browsers.
846    pub expiration: std::option::Option<wkt::Duration>,
847
848    /// Whether this handler should match the request if the file
849    /// referenced by the handler does not exist.
850    pub require_matching_file: bool,
851
852    /// Whether files should also be uploaded as code data. By default, files
853    /// declared in static file handlers are uploaded as static
854    /// data and are only served to end users; they cannot be read by the
855    /// application. If enabled, uploads are charged against both your code and
856    /// static data storage resource quotas.
857    pub application_readable: bool,
858
859    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
860}
861
862impl StaticFilesHandler {
863    /// Creates a new default instance.
864    pub fn new() -> Self {
865        std::default::Default::default()
866    }
867
868    /// Sets the value of [path][crate::model::StaticFilesHandler::path].
869    ///
870    /// # Example
871    /// ```ignore,no_run
872    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
873    /// let x = StaticFilesHandler::new().set_path("example");
874    /// ```
875    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
876        self.path = v.into();
877        self
878    }
879
880    /// Sets the value of [upload_path_regex][crate::model::StaticFilesHandler::upload_path_regex].
881    ///
882    /// # Example
883    /// ```ignore,no_run
884    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
885    /// let x = StaticFilesHandler::new().set_upload_path_regex("example");
886    /// ```
887    pub fn set_upload_path_regex<T: std::convert::Into<std::string::String>>(
888        mut self,
889        v: T,
890    ) -> Self {
891        self.upload_path_regex = v.into();
892        self
893    }
894
895    /// Sets the value of [http_headers][crate::model::StaticFilesHandler::http_headers].
896    ///
897    /// # Example
898    /// ```ignore,no_run
899    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
900    /// let x = StaticFilesHandler::new().set_http_headers([
901    ///     ("key0", "abc"),
902    ///     ("key1", "xyz"),
903    /// ]);
904    /// ```
905    pub fn set_http_headers<T, K, V>(mut self, v: T) -> Self
906    where
907        T: std::iter::IntoIterator<Item = (K, V)>,
908        K: std::convert::Into<std::string::String>,
909        V: std::convert::Into<std::string::String>,
910    {
911        use std::iter::Iterator;
912        self.http_headers = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
913        self
914    }
915
916    /// Sets the value of [mime_type][crate::model::StaticFilesHandler::mime_type].
917    ///
918    /// # Example
919    /// ```ignore,no_run
920    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
921    /// let x = StaticFilesHandler::new().set_mime_type("example");
922    /// ```
923    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
924        self.mime_type = v.into();
925        self
926    }
927
928    /// Sets the value of [expiration][crate::model::StaticFilesHandler::expiration].
929    ///
930    /// # Example
931    /// ```ignore,no_run
932    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
933    /// use wkt::Duration;
934    /// let x = StaticFilesHandler::new().set_expiration(Duration::default()/* use setters */);
935    /// ```
936    pub fn set_expiration<T>(mut self, v: T) -> Self
937    where
938        T: std::convert::Into<wkt::Duration>,
939    {
940        self.expiration = std::option::Option::Some(v.into());
941        self
942    }
943
944    /// Sets or clears the value of [expiration][crate::model::StaticFilesHandler::expiration].
945    ///
946    /// # Example
947    /// ```ignore,no_run
948    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
949    /// use wkt::Duration;
950    /// let x = StaticFilesHandler::new().set_or_clear_expiration(Some(Duration::default()/* use setters */));
951    /// let x = StaticFilesHandler::new().set_or_clear_expiration(None::<Duration>);
952    /// ```
953    pub fn set_or_clear_expiration<T>(mut self, v: std::option::Option<T>) -> Self
954    where
955        T: std::convert::Into<wkt::Duration>,
956    {
957        self.expiration = v.map(|x| x.into());
958        self
959    }
960
961    /// Sets the value of [require_matching_file][crate::model::StaticFilesHandler::require_matching_file].
962    ///
963    /// # Example
964    /// ```ignore,no_run
965    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
966    /// let x = StaticFilesHandler::new().set_require_matching_file(true);
967    /// ```
968    pub fn set_require_matching_file<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
969        self.require_matching_file = v.into();
970        self
971    }
972
973    /// Sets the value of [application_readable][crate::model::StaticFilesHandler::application_readable].
974    ///
975    /// # Example
976    /// ```ignore,no_run
977    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
978    /// let x = StaticFilesHandler::new().set_application_readable(true);
979    /// ```
980    pub fn set_application_readable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
981        self.application_readable = v.into();
982        self
983    }
984}
985
986impl wkt::message::Message for StaticFilesHandler {
987    fn typename() -> &'static str {
988        "type.googleapis.com/google.appengine.v1.StaticFilesHandler"
989    }
990}
991
992/// Executes a script to handle the request that matches the URL pattern.
993#[derive(Clone, Default, PartialEq)]
994#[non_exhaustive]
995pub struct ScriptHandler {
996    /// Path to the script from the application root directory.
997    pub script_path: std::string::String,
998
999    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1000}
1001
1002impl ScriptHandler {
1003    /// Creates a new default instance.
1004    pub fn new() -> Self {
1005        std::default::Default::default()
1006    }
1007
1008    /// Sets the value of [script_path][crate::model::ScriptHandler::script_path].
1009    ///
1010    /// # Example
1011    /// ```ignore,no_run
1012    /// # use google_cloud_appengine_v1::model::ScriptHandler;
1013    /// let x = ScriptHandler::new().set_script_path("example");
1014    /// ```
1015    pub fn set_script_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1016        self.script_path = v.into();
1017        self
1018    }
1019}
1020
1021impl wkt::message::Message for ScriptHandler {
1022    fn typename() -> &'static str {
1023        "type.googleapis.com/google.appengine.v1.ScriptHandler"
1024    }
1025}
1026
1027/// Uses Google Cloud Endpoints to handle requests.
1028#[derive(Clone, Default, PartialEq)]
1029#[non_exhaustive]
1030pub struct ApiEndpointHandler {
1031    /// Path to the script from the application root directory.
1032    pub script_path: std::string::String,
1033
1034    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1035}
1036
1037impl ApiEndpointHandler {
1038    /// Creates a new default instance.
1039    pub fn new() -> Self {
1040        std::default::Default::default()
1041    }
1042
1043    /// Sets the value of [script_path][crate::model::ApiEndpointHandler::script_path].
1044    ///
1045    /// # Example
1046    /// ```ignore,no_run
1047    /// # use google_cloud_appengine_v1::model::ApiEndpointHandler;
1048    /// let x = ApiEndpointHandler::new().set_script_path("example");
1049    /// ```
1050    pub fn set_script_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1051        self.script_path = v.into();
1052        self
1053    }
1054}
1055
1056impl wkt::message::Message for ApiEndpointHandler {
1057    fn typename() -> &'static str {
1058        "type.googleapis.com/google.appengine.v1.ApiEndpointHandler"
1059    }
1060}
1061
1062/// Health checking configuration for VM instances. Unhealthy instances
1063/// are killed and replaced with new instances. Only applicable for
1064/// instances in App Engine flexible environment.
1065#[derive(Clone, Default, PartialEq)]
1066#[non_exhaustive]
1067pub struct HealthCheck {
1068    /// Whether to explicitly disable health checks for this instance.
1069    pub disable_health_check: bool,
1070
1071    /// Host header to send when performing an HTTP health check.
1072    /// Example: "myapp.appspot.com"
1073    pub host: std::string::String,
1074
1075    /// Number of consecutive successful health checks required before receiving
1076    /// traffic.
1077    pub healthy_threshold: u32,
1078
1079    /// Number of consecutive failed health checks required before removing
1080    /// traffic.
1081    pub unhealthy_threshold: u32,
1082
1083    /// Number of consecutive failed health checks required before an instance is
1084    /// restarted.
1085    pub restart_threshold: u32,
1086
1087    /// Interval between health checks.
1088    pub check_interval: std::option::Option<wkt::Duration>,
1089
1090    /// Time before the health check is considered failed.
1091    pub timeout: std::option::Option<wkt::Duration>,
1092
1093    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1094}
1095
1096impl HealthCheck {
1097    /// Creates a new default instance.
1098    pub fn new() -> Self {
1099        std::default::Default::default()
1100    }
1101
1102    /// Sets the value of [disable_health_check][crate::model::HealthCheck::disable_health_check].
1103    ///
1104    /// # Example
1105    /// ```ignore,no_run
1106    /// # use google_cloud_appengine_v1::model::HealthCheck;
1107    /// let x = HealthCheck::new().set_disable_health_check(true);
1108    /// ```
1109    pub fn set_disable_health_check<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1110        self.disable_health_check = v.into();
1111        self
1112    }
1113
1114    /// Sets the value of [host][crate::model::HealthCheck::host].
1115    ///
1116    /// # Example
1117    /// ```ignore,no_run
1118    /// # use google_cloud_appengine_v1::model::HealthCheck;
1119    /// let x = HealthCheck::new().set_host("example");
1120    /// ```
1121    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1122        self.host = v.into();
1123        self
1124    }
1125
1126    /// Sets the value of [healthy_threshold][crate::model::HealthCheck::healthy_threshold].
1127    ///
1128    /// # Example
1129    /// ```ignore,no_run
1130    /// # use google_cloud_appengine_v1::model::HealthCheck;
1131    /// let x = HealthCheck::new().set_healthy_threshold(42_u32);
1132    /// ```
1133    pub fn set_healthy_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1134        self.healthy_threshold = v.into();
1135        self
1136    }
1137
1138    /// Sets the value of [unhealthy_threshold][crate::model::HealthCheck::unhealthy_threshold].
1139    ///
1140    /// # Example
1141    /// ```ignore,no_run
1142    /// # use google_cloud_appengine_v1::model::HealthCheck;
1143    /// let x = HealthCheck::new().set_unhealthy_threshold(42_u32);
1144    /// ```
1145    pub fn set_unhealthy_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1146        self.unhealthy_threshold = v.into();
1147        self
1148    }
1149
1150    /// Sets the value of [restart_threshold][crate::model::HealthCheck::restart_threshold].
1151    ///
1152    /// # Example
1153    /// ```ignore,no_run
1154    /// # use google_cloud_appengine_v1::model::HealthCheck;
1155    /// let x = HealthCheck::new().set_restart_threshold(42_u32);
1156    /// ```
1157    pub fn set_restart_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1158        self.restart_threshold = v.into();
1159        self
1160    }
1161
1162    /// Sets the value of [check_interval][crate::model::HealthCheck::check_interval].
1163    ///
1164    /// # Example
1165    /// ```ignore,no_run
1166    /// # use google_cloud_appengine_v1::model::HealthCheck;
1167    /// use wkt::Duration;
1168    /// let x = HealthCheck::new().set_check_interval(Duration::default()/* use setters */);
1169    /// ```
1170    pub fn set_check_interval<T>(mut self, v: T) -> Self
1171    where
1172        T: std::convert::Into<wkt::Duration>,
1173    {
1174        self.check_interval = std::option::Option::Some(v.into());
1175        self
1176    }
1177
1178    /// Sets or clears the value of [check_interval][crate::model::HealthCheck::check_interval].
1179    ///
1180    /// # Example
1181    /// ```ignore,no_run
1182    /// # use google_cloud_appengine_v1::model::HealthCheck;
1183    /// use wkt::Duration;
1184    /// let x = HealthCheck::new().set_or_clear_check_interval(Some(Duration::default()/* use setters */));
1185    /// let x = HealthCheck::new().set_or_clear_check_interval(None::<Duration>);
1186    /// ```
1187    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
1188    where
1189        T: std::convert::Into<wkt::Duration>,
1190    {
1191        self.check_interval = v.map(|x| x.into());
1192        self
1193    }
1194
1195    /// Sets the value of [timeout][crate::model::HealthCheck::timeout].
1196    ///
1197    /// # Example
1198    /// ```ignore,no_run
1199    /// # use google_cloud_appengine_v1::model::HealthCheck;
1200    /// use wkt::Duration;
1201    /// let x = HealthCheck::new().set_timeout(Duration::default()/* use setters */);
1202    /// ```
1203    pub fn set_timeout<T>(mut self, v: T) -> Self
1204    where
1205        T: std::convert::Into<wkt::Duration>,
1206    {
1207        self.timeout = std::option::Option::Some(v.into());
1208        self
1209    }
1210
1211    /// Sets or clears the value of [timeout][crate::model::HealthCheck::timeout].
1212    ///
1213    /// # Example
1214    /// ```ignore,no_run
1215    /// # use google_cloud_appengine_v1::model::HealthCheck;
1216    /// use wkt::Duration;
1217    /// let x = HealthCheck::new().set_or_clear_timeout(Some(Duration::default()/* use setters */));
1218    /// let x = HealthCheck::new().set_or_clear_timeout(None::<Duration>);
1219    /// ```
1220    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1221    where
1222        T: std::convert::Into<wkt::Duration>,
1223    {
1224        self.timeout = v.map(|x| x.into());
1225        self
1226    }
1227}
1228
1229impl wkt::message::Message for HealthCheck {
1230    fn typename() -> &'static str {
1231        "type.googleapis.com/google.appengine.v1.HealthCheck"
1232    }
1233}
1234
1235/// Readiness checking configuration for VM instances. Unhealthy instances
1236/// are removed from traffic rotation.
1237#[derive(Clone, Default, PartialEq)]
1238#[non_exhaustive]
1239pub struct ReadinessCheck {
1240    /// The request path.
1241    pub path: std::string::String,
1242
1243    /// Host header to send when performing a HTTP Readiness check.
1244    /// Example: "myapp.appspot.com"
1245    pub host: std::string::String,
1246
1247    /// Number of consecutive failed checks required before removing
1248    /// traffic.
1249    pub failure_threshold: u32,
1250
1251    /// Number of consecutive successful checks required before receiving
1252    /// traffic.
1253    pub success_threshold: u32,
1254
1255    /// Interval between health checks.
1256    pub check_interval: std::option::Option<wkt::Duration>,
1257
1258    /// Time before the check is considered failed.
1259    pub timeout: std::option::Option<wkt::Duration>,
1260
1261    /// A maximum time limit on application initialization, measured from moment
1262    /// the application successfully replies to a healthcheck until it is ready to
1263    /// serve traffic.
1264    pub app_start_timeout: std::option::Option<wkt::Duration>,
1265
1266    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1267}
1268
1269impl ReadinessCheck {
1270    /// Creates a new default instance.
1271    pub fn new() -> Self {
1272        std::default::Default::default()
1273    }
1274
1275    /// Sets the value of [path][crate::model::ReadinessCheck::path].
1276    ///
1277    /// # Example
1278    /// ```ignore,no_run
1279    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1280    /// let x = ReadinessCheck::new().set_path("example");
1281    /// ```
1282    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1283        self.path = v.into();
1284        self
1285    }
1286
1287    /// Sets the value of [host][crate::model::ReadinessCheck::host].
1288    ///
1289    /// # Example
1290    /// ```ignore,no_run
1291    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1292    /// let x = ReadinessCheck::new().set_host("example");
1293    /// ```
1294    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1295        self.host = v.into();
1296        self
1297    }
1298
1299    /// Sets the value of [failure_threshold][crate::model::ReadinessCheck::failure_threshold].
1300    ///
1301    /// # Example
1302    /// ```ignore,no_run
1303    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1304    /// let x = ReadinessCheck::new().set_failure_threshold(42_u32);
1305    /// ```
1306    pub fn set_failure_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1307        self.failure_threshold = v.into();
1308        self
1309    }
1310
1311    /// Sets the value of [success_threshold][crate::model::ReadinessCheck::success_threshold].
1312    ///
1313    /// # Example
1314    /// ```ignore,no_run
1315    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1316    /// let x = ReadinessCheck::new().set_success_threshold(42_u32);
1317    /// ```
1318    pub fn set_success_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1319        self.success_threshold = v.into();
1320        self
1321    }
1322
1323    /// Sets the value of [check_interval][crate::model::ReadinessCheck::check_interval].
1324    ///
1325    /// # Example
1326    /// ```ignore,no_run
1327    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1328    /// use wkt::Duration;
1329    /// let x = ReadinessCheck::new().set_check_interval(Duration::default()/* use setters */);
1330    /// ```
1331    pub fn set_check_interval<T>(mut self, v: T) -> Self
1332    where
1333        T: std::convert::Into<wkt::Duration>,
1334    {
1335        self.check_interval = std::option::Option::Some(v.into());
1336        self
1337    }
1338
1339    /// Sets or clears the value of [check_interval][crate::model::ReadinessCheck::check_interval].
1340    ///
1341    /// # Example
1342    /// ```ignore,no_run
1343    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1344    /// use wkt::Duration;
1345    /// let x = ReadinessCheck::new().set_or_clear_check_interval(Some(Duration::default()/* use setters */));
1346    /// let x = ReadinessCheck::new().set_or_clear_check_interval(None::<Duration>);
1347    /// ```
1348    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
1349    where
1350        T: std::convert::Into<wkt::Duration>,
1351    {
1352        self.check_interval = v.map(|x| x.into());
1353        self
1354    }
1355
1356    /// Sets the value of [timeout][crate::model::ReadinessCheck::timeout].
1357    ///
1358    /// # Example
1359    /// ```ignore,no_run
1360    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1361    /// use wkt::Duration;
1362    /// let x = ReadinessCheck::new().set_timeout(Duration::default()/* use setters */);
1363    /// ```
1364    pub fn set_timeout<T>(mut self, v: T) -> Self
1365    where
1366        T: std::convert::Into<wkt::Duration>,
1367    {
1368        self.timeout = std::option::Option::Some(v.into());
1369        self
1370    }
1371
1372    /// Sets or clears the value of [timeout][crate::model::ReadinessCheck::timeout].
1373    ///
1374    /// # Example
1375    /// ```ignore,no_run
1376    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1377    /// use wkt::Duration;
1378    /// let x = ReadinessCheck::new().set_or_clear_timeout(Some(Duration::default()/* use setters */));
1379    /// let x = ReadinessCheck::new().set_or_clear_timeout(None::<Duration>);
1380    /// ```
1381    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1382    where
1383        T: std::convert::Into<wkt::Duration>,
1384    {
1385        self.timeout = v.map(|x| x.into());
1386        self
1387    }
1388
1389    /// Sets the value of [app_start_timeout][crate::model::ReadinessCheck::app_start_timeout].
1390    ///
1391    /// # Example
1392    /// ```ignore,no_run
1393    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1394    /// use wkt::Duration;
1395    /// let x = ReadinessCheck::new().set_app_start_timeout(Duration::default()/* use setters */);
1396    /// ```
1397    pub fn set_app_start_timeout<T>(mut self, v: T) -> Self
1398    where
1399        T: std::convert::Into<wkt::Duration>,
1400    {
1401        self.app_start_timeout = std::option::Option::Some(v.into());
1402        self
1403    }
1404
1405    /// Sets or clears the value of [app_start_timeout][crate::model::ReadinessCheck::app_start_timeout].
1406    ///
1407    /// # Example
1408    /// ```ignore,no_run
1409    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1410    /// use wkt::Duration;
1411    /// let x = ReadinessCheck::new().set_or_clear_app_start_timeout(Some(Duration::default()/* use setters */));
1412    /// let x = ReadinessCheck::new().set_or_clear_app_start_timeout(None::<Duration>);
1413    /// ```
1414    pub fn set_or_clear_app_start_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1415    where
1416        T: std::convert::Into<wkt::Duration>,
1417    {
1418        self.app_start_timeout = v.map(|x| x.into());
1419        self
1420    }
1421}
1422
1423impl wkt::message::Message for ReadinessCheck {
1424    fn typename() -> &'static str {
1425        "type.googleapis.com/google.appengine.v1.ReadinessCheck"
1426    }
1427}
1428
1429/// Health checking configuration for VM instances. Unhealthy instances
1430/// are killed and replaced with new instances.
1431#[derive(Clone, Default, PartialEq)]
1432#[non_exhaustive]
1433pub struct LivenessCheck {
1434    /// The request path.
1435    pub path: std::string::String,
1436
1437    /// Host header to send when performing a HTTP Liveness check.
1438    /// Example: "myapp.appspot.com"
1439    pub host: std::string::String,
1440
1441    /// Number of consecutive failed checks required before considering the
1442    /// VM unhealthy.
1443    pub failure_threshold: u32,
1444
1445    /// Number of consecutive successful checks required before considering
1446    /// the VM healthy.
1447    pub success_threshold: u32,
1448
1449    /// Interval between health checks.
1450    pub check_interval: std::option::Option<wkt::Duration>,
1451
1452    /// Time before the check is considered failed.
1453    pub timeout: std::option::Option<wkt::Duration>,
1454
1455    /// The initial delay before starting to execute the checks.
1456    pub initial_delay: std::option::Option<wkt::Duration>,
1457
1458    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1459}
1460
1461impl LivenessCheck {
1462    /// Creates a new default instance.
1463    pub fn new() -> Self {
1464        std::default::Default::default()
1465    }
1466
1467    /// Sets the value of [path][crate::model::LivenessCheck::path].
1468    ///
1469    /// # Example
1470    /// ```ignore,no_run
1471    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1472    /// let x = LivenessCheck::new().set_path("example");
1473    /// ```
1474    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1475        self.path = v.into();
1476        self
1477    }
1478
1479    /// Sets the value of [host][crate::model::LivenessCheck::host].
1480    ///
1481    /// # Example
1482    /// ```ignore,no_run
1483    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1484    /// let x = LivenessCheck::new().set_host("example");
1485    /// ```
1486    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1487        self.host = v.into();
1488        self
1489    }
1490
1491    /// Sets the value of [failure_threshold][crate::model::LivenessCheck::failure_threshold].
1492    ///
1493    /// # Example
1494    /// ```ignore,no_run
1495    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1496    /// let x = LivenessCheck::new().set_failure_threshold(42_u32);
1497    /// ```
1498    pub fn set_failure_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1499        self.failure_threshold = v.into();
1500        self
1501    }
1502
1503    /// Sets the value of [success_threshold][crate::model::LivenessCheck::success_threshold].
1504    ///
1505    /// # Example
1506    /// ```ignore,no_run
1507    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1508    /// let x = LivenessCheck::new().set_success_threshold(42_u32);
1509    /// ```
1510    pub fn set_success_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1511        self.success_threshold = v.into();
1512        self
1513    }
1514
1515    /// Sets the value of [check_interval][crate::model::LivenessCheck::check_interval].
1516    ///
1517    /// # Example
1518    /// ```ignore,no_run
1519    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1520    /// use wkt::Duration;
1521    /// let x = LivenessCheck::new().set_check_interval(Duration::default()/* use setters */);
1522    /// ```
1523    pub fn set_check_interval<T>(mut self, v: T) -> Self
1524    where
1525        T: std::convert::Into<wkt::Duration>,
1526    {
1527        self.check_interval = std::option::Option::Some(v.into());
1528        self
1529    }
1530
1531    /// Sets or clears the value of [check_interval][crate::model::LivenessCheck::check_interval].
1532    ///
1533    /// # Example
1534    /// ```ignore,no_run
1535    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1536    /// use wkt::Duration;
1537    /// let x = LivenessCheck::new().set_or_clear_check_interval(Some(Duration::default()/* use setters */));
1538    /// let x = LivenessCheck::new().set_or_clear_check_interval(None::<Duration>);
1539    /// ```
1540    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
1541    where
1542        T: std::convert::Into<wkt::Duration>,
1543    {
1544        self.check_interval = v.map(|x| x.into());
1545        self
1546    }
1547
1548    /// Sets the value of [timeout][crate::model::LivenessCheck::timeout].
1549    ///
1550    /// # Example
1551    /// ```ignore,no_run
1552    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1553    /// use wkt::Duration;
1554    /// let x = LivenessCheck::new().set_timeout(Duration::default()/* use setters */);
1555    /// ```
1556    pub fn set_timeout<T>(mut self, v: T) -> Self
1557    where
1558        T: std::convert::Into<wkt::Duration>,
1559    {
1560        self.timeout = std::option::Option::Some(v.into());
1561        self
1562    }
1563
1564    /// Sets or clears the value of [timeout][crate::model::LivenessCheck::timeout].
1565    ///
1566    /// # Example
1567    /// ```ignore,no_run
1568    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1569    /// use wkt::Duration;
1570    /// let x = LivenessCheck::new().set_or_clear_timeout(Some(Duration::default()/* use setters */));
1571    /// let x = LivenessCheck::new().set_or_clear_timeout(None::<Duration>);
1572    /// ```
1573    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1574    where
1575        T: std::convert::Into<wkt::Duration>,
1576    {
1577        self.timeout = v.map(|x| x.into());
1578        self
1579    }
1580
1581    /// Sets the value of [initial_delay][crate::model::LivenessCheck::initial_delay].
1582    ///
1583    /// # Example
1584    /// ```ignore,no_run
1585    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1586    /// use wkt::Duration;
1587    /// let x = LivenessCheck::new().set_initial_delay(Duration::default()/* use setters */);
1588    /// ```
1589    pub fn set_initial_delay<T>(mut self, v: T) -> Self
1590    where
1591        T: std::convert::Into<wkt::Duration>,
1592    {
1593        self.initial_delay = std::option::Option::Some(v.into());
1594        self
1595    }
1596
1597    /// Sets or clears the value of [initial_delay][crate::model::LivenessCheck::initial_delay].
1598    ///
1599    /// # Example
1600    /// ```ignore,no_run
1601    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1602    /// use wkt::Duration;
1603    /// let x = LivenessCheck::new().set_or_clear_initial_delay(Some(Duration::default()/* use setters */));
1604    /// let x = LivenessCheck::new().set_or_clear_initial_delay(None::<Duration>);
1605    /// ```
1606    pub fn set_or_clear_initial_delay<T>(mut self, v: std::option::Option<T>) -> Self
1607    where
1608        T: std::convert::Into<wkt::Duration>,
1609    {
1610        self.initial_delay = v.map(|x| x.into());
1611        self
1612    }
1613}
1614
1615impl wkt::message::Message for LivenessCheck {
1616    fn typename() -> &'static str {
1617        "type.googleapis.com/google.appengine.v1.LivenessCheck"
1618    }
1619}
1620
1621/// Third-party Python runtime library that is required by the application.
1622#[derive(Clone, Default, PartialEq)]
1623#[non_exhaustive]
1624pub struct Library {
1625    /// Name of the library. Example: "django".
1626    pub name: std::string::String,
1627
1628    /// Version of the library to select, or "latest".
1629    pub version: std::string::String,
1630
1631    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1632}
1633
1634impl Library {
1635    /// Creates a new default instance.
1636    pub fn new() -> Self {
1637        std::default::Default::default()
1638    }
1639
1640    /// Sets the value of [name][crate::model::Library::name].
1641    ///
1642    /// # Example
1643    /// ```ignore,no_run
1644    /// # use google_cloud_appengine_v1::model::Library;
1645    /// let x = Library::new().set_name("example");
1646    /// ```
1647    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1648        self.name = v.into();
1649        self
1650    }
1651
1652    /// Sets the value of [version][crate::model::Library::version].
1653    ///
1654    /// # Example
1655    /// ```ignore,no_run
1656    /// # use google_cloud_appengine_v1::model::Library;
1657    /// let x = Library::new().set_version("example");
1658    /// ```
1659    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1660        self.version = v.into();
1661        self
1662    }
1663}
1664
1665impl wkt::message::Message for Library {
1666    fn typename() -> &'static str {
1667        "type.googleapis.com/google.appengine.v1.Library"
1668    }
1669}
1670
1671/// Request message for `Applications.GetApplication`.
1672#[derive(Clone, Default, PartialEq)]
1673#[non_exhaustive]
1674pub struct GetApplicationRequest {
1675    /// Name of the Application resource to get. Example: `apps/myapp`.
1676    pub name: std::string::String,
1677
1678    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1679}
1680
1681impl GetApplicationRequest {
1682    /// Creates a new default instance.
1683    pub fn new() -> Self {
1684        std::default::Default::default()
1685    }
1686
1687    /// Sets the value of [name][crate::model::GetApplicationRequest::name].
1688    ///
1689    /// # Example
1690    /// ```ignore,no_run
1691    /// # use google_cloud_appengine_v1::model::GetApplicationRequest;
1692    /// let x = GetApplicationRequest::new().set_name("example");
1693    /// ```
1694    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1695        self.name = v.into();
1696        self
1697    }
1698}
1699
1700impl wkt::message::Message for GetApplicationRequest {
1701    fn typename() -> &'static str {
1702        "type.googleapis.com/google.appengine.v1.GetApplicationRequest"
1703    }
1704}
1705
1706/// Request message for `Applications.CreateApplication`.
1707#[derive(Clone, Default, PartialEq)]
1708#[non_exhaustive]
1709pub struct CreateApplicationRequest {
1710    /// Application configuration.
1711    pub application: std::option::Option<crate::model::Application>,
1712
1713    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1714}
1715
1716impl CreateApplicationRequest {
1717    /// Creates a new default instance.
1718    pub fn new() -> Self {
1719        std::default::Default::default()
1720    }
1721
1722    /// Sets the value of [application][crate::model::CreateApplicationRequest::application].
1723    ///
1724    /// # Example
1725    /// ```ignore,no_run
1726    /// # use google_cloud_appengine_v1::model::CreateApplicationRequest;
1727    /// use google_cloud_appengine_v1::model::Application;
1728    /// let x = CreateApplicationRequest::new().set_application(Application::default()/* use setters */);
1729    /// ```
1730    pub fn set_application<T>(mut self, v: T) -> Self
1731    where
1732        T: std::convert::Into<crate::model::Application>,
1733    {
1734        self.application = std::option::Option::Some(v.into());
1735        self
1736    }
1737
1738    /// Sets or clears the value of [application][crate::model::CreateApplicationRequest::application].
1739    ///
1740    /// # Example
1741    /// ```ignore,no_run
1742    /// # use google_cloud_appengine_v1::model::CreateApplicationRequest;
1743    /// use google_cloud_appengine_v1::model::Application;
1744    /// let x = CreateApplicationRequest::new().set_or_clear_application(Some(Application::default()/* use setters */));
1745    /// let x = CreateApplicationRequest::new().set_or_clear_application(None::<Application>);
1746    /// ```
1747    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
1748    where
1749        T: std::convert::Into<crate::model::Application>,
1750    {
1751        self.application = v.map(|x| x.into());
1752        self
1753    }
1754}
1755
1756impl wkt::message::Message for CreateApplicationRequest {
1757    fn typename() -> &'static str {
1758        "type.googleapis.com/google.appengine.v1.CreateApplicationRequest"
1759    }
1760}
1761
1762/// Request message for `Applications.UpdateApplication`.
1763#[derive(Clone, Default, PartialEq)]
1764#[non_exhaustive]
1765pub struct UpdateApplicationRequest {
1766    /// Name of the Application resource to update. Example: `apps/myapp`.
1767    pub name: std::string::String,
1768
1769    /// An Application containing the updated resource.
1770    pub application: std::option::Option<crate::model::Application>,
1771
1772    /// Required. Standard field mask for the set of fields to be updated.
1773    pub update_mask: std::option::Option<wkt::FieldMask>,
1774
1775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1776}
1777
1778impl UpdateApplicationRequest {
1779    /// Creates a new default instance.
1780    pub fn new() -> Self {
1781        std::default::Default::default()
1782    }
1783
1784    /// Sets the value of [name][crate::model::UpdateApplicationRequest::name].
1785    ///
1786    /// # Example
1787    /// ```ignore,no_run
1788    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1789    /// let x = UpdateApplicationRequest::new().set_name("example");
1790    /// ```
1791    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1792        self.name = v.into();
1793        self
1794    }
1795
1796    /// Sets the value of [application][crate::model::UpdateApplicationRequest::application].
1797    ///
1798    /// # Example
1799    /// ```ignore,no_run
1800    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1801    /// use google_cloud_appengine_v1::model::Application;
1802    /// let x = UpdateApplicationRequest::new().set_application(Application::default()/* use setters */);
1803    /// ```
1804    pub fn set_application<T>(mut self, v: T) -> Self
1805    where
1806        T: std::convert::Into<crate::model::Application>,
1807    {
1808        self.application = std::option::Option::Some(v.into());
1809        self
1810    }
1811
1812    /// Sets or clears the value of [application][crate::model::UpdateApplicationRequest::application].
1813    ///
1814    /// # Example
1815    /// ```ignore,no_run
1816    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1817    /// use google_cloud_appengine_v1::model::Application;
1818    /// let x = UpdateApplicationRequest::new().set_or_clear_application(Some(Application::default()/* use setters */));
1819    /// let x = UpdateApplicationRequest::new().set_or_clear_application(None::<Application>);
1820    /// ```
1821    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
1822    where
1823        T: std::convert::Into<crate::model::Application>,
1824    {
1825        self.application = v.map(|x| x.into());
1826        self
1827    }
1828
1829    /// Sets the value of [update_mask][crate::model::UpdateApplicationRequest::update_mask].
1830    ///
1831    /// # Example
1832    /// ```ignore,no_run
1833    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1834    /// use wkt::FieldMask;
1835    /// let x = UpdateApplicationRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1836    /// ```
1837    pub fn set_update_mask<T>(mut self, v: T) -> Self
1838    where
1839        T: std::convert::Into<wkt::FieldMask>,
1840    {
1841        self.update_mask = std::option::Option::Some(v.into());
1842        self
1843    }
1844
1845    /// Sets or clears the value of [update_mask][crate::model::UpdateApplicationRequest::update_mask].
1846    ///
1847    /// # Example
1848    /// ```ignore,no_run
1849    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1850    /// use wkt::FieldMask;
1851    /// let x = UpdateApplicationRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1852    /// let x = UpdateApplicationRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1853    /// ```
1854    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1855    where
1856        T: std::convert::Into<wkt::FieldMask>,
1857    {
1858        self.update_mask = v.map(|x| x.into());
1859        self
1860    }
1861}
1862
1863impl wkt::message::Message for UpdateApplicationRequest {
1864    fn typename() -> &'static str {
1865        "type.googleapis.com/google.appengine.v1.UpdateApplicationRequest"
1866    }
1867}
1868
1869/// Request message for 'Applications.RepairApplication'.
1870#[derive(Clone, Default, PartialEq)]
1871#[non_exhaustive]
1872pub struct RepairApplicationRequest {
1873    /// Name of the application to repair. Example: `apps/myapp`
1874    pub name: std::string::String,
1875
1876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1877}
1878
1879impl RepairApplicationRequest {
1880    /// Creates a new default instance.
1881    pub fn new() -> Self {
1882        std::default::Default::default()
1883    }
1884
1885    /// Sets the value of [name][crate::model::RepairApplicationRequest::name].
1886    ///
1887    /// # Example
1888    /// ```ignore,no_run
1889    /// # use google_cloud_appengine_v1::model::RepairApplicationRequest;
1890    /// let x = RepairApplicationRequest::new().set_name("example");
1891    /// ```
1892    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1893        self.name = v.into();
1894        self
1895    }
1896}
1897
1898impl wkt::message::Message for RepairApplicationRequest {
1899    fn typename() -> &'static str {
1900        "type.googleapis.com/google.appengine.v1.RepairApplicationRequest"
1901    }
1902}
1903
1904/// Request message for `Services.ListServices`.
1905#[derive(Clone, Default, PartialEq)]
1906#[non_exhaustive]
1907pub struct ListServicesRequest {
1908    /// Name of the parent Application resource. Example: `apps/myapp`.
1909    pub parent: std::string::String,
1910
1911    /// Maximum results to return per page.
1912    pub page_size: i32,
1913
1914    /// Continuation token for fetching the next page of results.
1915    pub page_token: std::string::String,
1916
1917    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1918}
1919
1920impl ListServicesRequest {
1921    /// Creates a new default instance.
1922    pub fn new() -> Self {
1923        std::default::Default::default()
1924    }
1925
1926    /// Sets the value of [parent][crate::model::ListServicesRequest::parent].
1927    ///
1928    /// # Example
1929    /// ```ignore,no_run
1930    /// # use google_cloud_appengine_v1::model::ListServicesRequest;
1931    /// let x = ListServicesRequest::new().set_parent("example");
1932    /// ```
1933    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1934        self.parent = v.into();
1935        self
1936    }
1937
1938    /// Sets the value of [page_size][crate::model::ListServicesRequest::page_size].
1939    ///
1940    /// # Example
1941    /// ```ignore,no_run
1942    /// # use google_cloud_appengine_v1::model::ListServicesRequest;
1943    /// let x = ListServicesRequest::new().set_page_size(42);
1944    /// ```
1945    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1946        self.page_size = v.into();
1947        self
1948    }
1949
1950    /// Sets the value of [page_token][crate::model::ListServicesRequest::page_token].
1951    ///
1952    /// # Example
1953    /// ```ignore,no_run
1954    /// # use google_cloud_appengine_v1::model::ListServicesRequest;
1955    /// let x = ListServicesRequest::new().set_page_token("example");
1956    /// ```
1957    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1958        self.page_token = v.into();
1959        self
1960    }
1961}
1962
1963impl wkt::message::Message for ListServicesRequest {
1964    fn typename() -> &'static str {
1965        "type.googleapis.com/google.appengine.v1.ListServicesRequest"
1966    }
1967}
1968
1969/// Response message for `Services.ListServices`.
1970#[derive(Clone, Default, PartialEq)]
1971#[non_exhaustive]
1972pub struct ListServicesResponse {
1973    /// The services belonging to the requested application.
1974    pub services: std::vec::Vec<crate::model::Service>,
1975
1976    /// Continuation token for fetching the next page of results.
1977    pub next_page_token: std::string::String,
1978
1979    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1980}
1981
1982impl ListServicesResponse {
1983    /// Creates a new default instance.
1984    pub fn new() -> Self {
1985        std::default::Default::default()
1986    }
1987
1988    /// Sets the value of [services][crate::model::ListServicesResponse::services].
1989    ///
1990    /// # Example
1991    /// ```ignore,no_run
1992    /// # use google_cloud_appengine_v1::model::ListServicesResponse;
1993    /// use google_cloud_appengine_v1::model::Service;
1994    /// let x = ListServicesResponse::new()
1995    ///     .set_services([
1996    ///         Service::default()/* use setters */,
1997    ///         Service::default()/* use (different) setters */,
1998    ///     ]);
1999    /// ```
2000    pub fn set_services<T, V>(mut self, v: T) -> Self
2001    where
2002        T: std::iter::IntoIterator<Item = V>,
2003        V: std::convert::Into<crate::model::Service>,
2004    {
2005        use std::iter::Iterator;
2006        self.services = v.into_iter().map(|i| i.into()).collect();
2007        self
2008    }
2009
2010    /// Sets the value of [next_page_token][crate::model::ListServicesResponse::next_page_token].
2011    ///
2012    /// # Example
2013    /// ```ignore,no_run
2014    /// # use google_cloud_appengine_v1::model::ListServicesResponse;
2015    /// let x = ListServicesResponse::new().set_next_page_token("example");
2016    /// ```
2017    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2018        self.next_page_token = v.into();
2019        self
2020    }
2021}
2022
2023impl wkt::message::Message for ListServicesResponse {
2024    fn typename() -> &'static str {
2025        "type.googleapis.com/google.appengine.v1.ListServicesResponse"
2026    }
2027}
2028
2029#[doc(hidden)]
2030impl google_cloud_gax::paginator::internal::PageableResponse for ListServicesResponse {
2031    type PageItem = crate::model::Service;
2032
2033    fn items(self) -> std::vec::Vec<Self::PageItem> {
2034        self.services
2035    }
2036
2037    fn next_page_token(&self) -> std::string::String {
2038        use std::clone::Clone;
2039        self.next_page_token.clone()
2040    }
2041}
2042
2043/// Request message for `Services.GetService`.
2044#[derive(Clone, Default, PartialEq)]
2045#[non_exhaustive]
2046pub struct GetServiceRequest {
2047    /// Name of the resource requested. Example: `apps/myapp/services/default`.
2048    pub name: std::string::String,
2049
2050    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2051}
2052
2053impl GetServiceRequest {
2054    /// Creates a new default instance.
2055    pub fn new() -> Self {
2056        std::default::Default::default()
2057    }
2058
2059    /// Sets the value of [name][crate::model::GetServiceRequest::name].
2060    ///
2061    /// # Example
2062    /// ```ignore,no_run
2063    /// # use google_cloud_appengine_v1::model::GetServiceRequest;
2064    /// let x = GetServiceRequest::new().set_name("example");
2065    /// ```
2066    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2067        self.name = v.into();
2068        self
2069    }
2070}
2071
2072impl wkt::message::Message for GetServiceRequest {
2073    fn typename() -> &'static str {
2074        "type.googleapis.com/google.appengine.v1.GetServiceRequest"
2075    }
2076}
2077
2078/// Request message for `Services.UpdateService`.
2079#[derive(Clone, Default, PartialEq)]
2080#[non_exhaustive]
2081pub struct UpdateServiceRequest {
2082    /// Name of the resource to update. Example: `apps/myapp/services/default`.
2083    pub name: std::string::String,
2084
2085    /// A Service resource containing the updated service. Only fields set in the
2086    /// field mask will be updated.
2087    pub service: std::option::Option<crate::model::Service>,
2088
2089    /// Required. Standard field mask for the set of fields to be updated.
2090    pub update_mask: std::option::Option<wkt::FieldMask>,
2091
2092    /// Set to `true` to gradually shift traffic to one or more versions that you
2093    /// specify. By default, traffic is shifted immediately.
2094    /// For gradual traffic migration, the target versions
2095    /// must be located within instances that are configured for both
2096    /// [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
2097    /// and
2098    /// [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
2099    /// You must specify the
2100    /// [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
2101    /// field in the Service resource. Gradual traffic migration is not
2102    /// supported in the App Engine flexible environment. For examples, see
2103    /// [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
2104    pub migrate_traffic: bool,
2105
2106    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2107}
2108
2109impl UpdateServiceRequest {
2110    /// Creates a new default instance.
2111    pub fn new() -> Self {
2112        std::default::Default::default()
2113    }
2114
2115    /// Sets the value of [name][crate::model::UpdateServiceRequest::name].
2116    ///
2117    /// # Example
2118    /// ```ignore,no_run
2119    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2120    /// let x = UpdateServiceRequest::new().set_name("example");
2121    /// ```
2122    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2123        self.name = v.into();
2124        self
2125    }
2126
2127    /// Sets the value of [service][crate::model::UpdateServiceRequest::service].
2128    ///
2129    /// # Example
2130    /// ```ignore,no_run
2131    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2132    /// use google_cloud_appengine_v1::model::Service;
2133    /// let x = UpdateServiceRequest::new().set_service(Service::default()/* use setters */);
2134    /// ```
2135    pub fn set_service<T>(mut self, v: T) -> Self
2136    where
2137        T: std::convert::Into<crate::model::Service>,
2138    {
2139        self.service = std::option::Option::Some(v.into());
2140        self
2141    }
2142
2143    /// Sets or clears the value of [service][crate::model::UpdateServiceRequest::service].
2144    ///
2145    /// # Example
2146    /// ```ignore,no_run
2147    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2148    /// use google_cloud_appengine_v1::model::Service;
2149    /// let x = UpdateServiceRequest::new().set_or_clear_service(Some(Service::default()/* use setters */));
2150    /// let x = UpdateServiceRequest::new().set_or_clear_service(None::<Service>);
2151    /// ```
2152    pub fn set_or_clear_service<T>(mut self, v: std::option::Option<T>) -> Self
2153    where
2154        T: std::convert::Into<crate::model::Service>,
2155    {
2156        self.service = v.map(|x| x.into());
2157        self
2158    }
2159
2160    /// Sets the value of [update_mask][crate::model::UpdateServiceRequest::update_mask].
2161    ///
2162    /// # Example
2163    /// ```ignore,no_run
2164    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2165    /// use wkt::FieldMask;
2166    /// let x = UpdateServiceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2167    /// ```
2168    pub fn set_update_mask<T>(mut self, v: T) -> Self
2169    where
2170        T: std::convert::Into<wkt::FieldMask>,
2171    {
2172        self.update_mask = std::option::Option::Some(v.into());
2173        self
2174    }
2175
2176    /// Sets or clears the value of [update_mask][crate::model::UpdateServiceRequest::update_mask].
2177    ///
2178    /// # Example
2179    /// ```ignore,no_run
2180    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2181    /// use wkt::FieldMask;
2182    /// let x = UpdateServiceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2183    /// let x = UpdateServiceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2184    /// ```
2185    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2186    where
2187        T: std::convert::Into<wkt::FieldMask>,
2188    {
2189        self.update_mask = v.map(|x| x.into());
2190        self
2191    }
2192
2193    /// Sets the value of [migrate_traffic][crate::model::UpdateServiceRequest::migrate_traffic].
2194    ///
2195    /// # Example
2196    /// ```ignore,no_run
2197    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2198    /// let x = UpdateServiceRequest::new().set_migrate_traffic(true);
2199    /// ```
2200    pub fn set_migrate_traffic<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2201        self.migrate_traffic = v.into();
2202        self
2203    }
2204}
2205
2206impl wkt::message::Message for UpdateServiceRequest {
2207    fn typename() -> &'static str {
2208        "type.googleapis.com/google.appengine.v1.UpdateServiceRequest"
2209    }
2210}
2211
2212/// Request message for `Services.DeleteService`.
2213#[derive(Clone, Default, PartialEq)]
2214#[non_exhaustive]
2215pub struct DeleteServiceRequest {
2216    /// Name of the resource requested. Example: `apps/myapp/services/default`.
2217    pub name: std::string::String,
2218
2219    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2220}
2221
2222impl DeleteServiceRequest {
2223    /// Creates a new default instance.
2224    pub fn new() -> Self {
2225        std::default::Default::default()
2226    }
2227
2228    /// Sets the value of [name][crate::model::DeleteServiceRequest::name].
2229    ///
2230    /// # Example
2231    /// ```ignore,no_run
2232    /// # use google_cloud_appengine_v1::model::DeleteServiceRequest;
2233    /// let x = DeleteServiceRequest::new().set_name("example");
2234    /// ```
2235    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2236        self.name = v.into();
2237        self
2238    }
2239}
2240
2241impl wkt::message::Message for DeleteServiceRequest {
2242    fn typename() -> &'static str {
2243        "type.googleapis.com/google.appengine.v1.DeleteServiceRequest"
2244    }
2245}
2246
2247/// Request message for `Versions.ListVersions`.
2248#[derive(Clone, Default, PartialEq)]
2249#[non_exhaustive]
2250pub struct ListVersionsRequest {
2251    /// Name of the parent Service resource. Example:
2252    /// `apps/myapp/services/default`.
2253    pub parent: std::string::String,
2254
2255    /// Controls the set of fields returned in the `List` response.
2256    pub view: crate::model::VersionView,
2257
2258    /// Maximum results to return per page.
2259    pub page_size: i32,
2260
2261    /// Continuation token for fetching the next page of results.
2262    pub page_token: std::string::String,
2263
2264    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2265}
2266
2267impl ListVersionsRequest {
2268    /// Creates a new default instance.
2269    pub fn new() -> Self {
2270        std::default::Default::default()
2271    }
2272
2273    /// Sets the value of [parent][crate::model::ListVersionsRequest::parent].
2274    ///
2275    /// # Example
2276    /// ```ignore,no_run
2277    /// # use google_cloud_appengine_v1::model::ListVersionsRequest;
2278    /// let x = ListVersionsRequest::new().set_parent("example");
2279    /// ```
2280    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2281        self.parent = v.into();
2282        self
2283    }
2284
2285    /// Sets the value of [view][crate::model::ListVersionsRequest::view].
2286    ///
2287    /// # Example
2288    /// ```ignore,no_run
2289    /// # use google_cloud_appengine_v1::model::ListVersionsRequest;
2290    /// use google_cloud_appengine_v1::model::VersionView;
2291    /// let x0 = ListVersionsRequest::new().set_view(VersionView::Full);
2292    /// ```
2293    pub fn set_view<T: std::convert::Into<crate::model::VersionView>>(mut self, v: T) -> Self {
2294        self.view = v.into();
2295        self
2296    }
2297
2298    /// Sets the value of [page_size][crate::model::ListVersionsRequest::page_size].
2299    ///
2300    /// # Example
2301    /// ```ignore,no_run
2302    /// # use google_cloud_appengine_v1::model::ListVersionsRequest;
2303    /// let x = ListVersionsRequest::new().set_page_size(42);
2304    /// ```
2305    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2306        self.page_size = v.into();
2307        self
2308    }
2309
2310    /// Sets the value of [page_token][crate::model::ListVersionsRequest::page_token].
2311    ///
2312    /// # Example
2313    /// ```ignore,no_run
2314    /// # use google_cloud_appengine_v1::model::ListVersionsRequest;
2315    /// let x = ListVersionsRequest::new().set_page_token("example");
2316    /// ```
2317    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2318        self.page_token = v.into();
2319        self
2320    }
2321}
2322
2323impl wkt::message::Message for ListVersionsRequest {
2324    fn typename() -> &'static str {
2325        "type.googleapis.com/google.appengine.v1.ListVersionsRequest"
2326    }
2327}
2328
2329/// Response message for `Versions.ListVersions`.
2330#[derive(Clone, Default, PartialEq)]
2331#[non_exhaustive]
2332pub struct ListVersionsResponse {
2333    /// The versions belonging to the requested service.
2334    pub versions: std::vec::Vec<crate::model::Version>,
2335
2336    /// Continuation token for fetching the next page of results.
2337    pub next_page_token: std::string::String,
2338
2339    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2340}
2341
2342impl ListVersionsResponse {
2343    /// Creates a new default instance.
2344    pub fn new() -> Self {
2345        std::default::Default::default()
2346    }
2347
2348    /// Sets the value of [versions][crate::model::ListVersionsResponse::versions].
2349    ///
2350    /// # Example
2351    /// ```ignore,no_run
2352    /// # use google_cloud_appengine_v1::model::ListVersionsResponse;
2353    /// use google_cloud_appengine_v1::model::Version;
2354    /// let x = ListVersionsResponse::new()
2355    ///     .set_versions([
2356    ///         Version::default()/* use setters */,
2357    ///         Version::default()/* use (different) setters */,
2358    ///     ]);
2359    /// ```
2360    pub fn set_versions<T, V>(mut self, v: T) -> Self
2361    where
2362        T: std::iter::IntoIterator<Item = V>,
2363        V: std::convert::Into<crate::model::Version>,
2364    {
2365        use std::iter::Iterator;
2366        self.versions = v.into_iter().map(|i| i.into()).collect();
2367        self
2368    }
2369
2370    /// Sets the value of [next_page_token][crate::model::ListVersionsResponse::next_page_token].
2371    ///
2372    /// # Example
2373    /// ```ignore,no_run
2374    /// # use google_cloud_appengine_v1::model::ListVersionsResponse;
2375    /// let x = ListVersionsResponse::new().set_next_page_token("example");
2376    /// ```
2377    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2378        self.next_page_token = v.into();
2379        self
2380    }
2381}
2382
2383impl wkt::message::Message for ListVersionsResponse {
2384    fn typename() -> &'static str {
2385        "type.googleapis.com/google.appengine.v1.ListVersionsResponse"
2386    }
2387}
2388
2389#[doc(hidden)]
2390impl google_cloud_gax::paginator::internal::PageableResponse for ListVersionsResponse {
2391    type PageItem = crate::model::Version;
2392
2393    fn items(self) -> std::vec::Vec<Self::PageItem> {
2394        self.versions
2395    }
2396
2397    fn next_page_token(&self) -> std::string::String {
2398        use std::clone::Clone;
2399        self.next_page_token.clone()
2400    }
2401}
2402
2403/// Request message for `Versions.GetVersion`.
2404#[derive(Clone, Default, PartialEq)]
2405#[non_exhaustive]
2406pub struct GetVersionRequest {
2407    /// Name of the resource requested. Example:
2408    /// `apps/myapp/services/default/versions/v1`.
2409    pub name: std::string::String,
2410
2411    /// Controls the set of fields returned in the `Get` response.
2412    pub view: crate::model::VersionView,
2413
2414    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2415}
2416
2417impl GetVersionRequest {
2418    /// Creates a new default instance.
2419    pub fn new() -> Self {
2420        std::default::Default::default()
2421    }
2422
2423    /// Sets the value of [name][crate::model::GetVersionRequest::name].
2424    ///
2425    /// # Example
2426    /// ```ignore,no_run
2427    /// # use google_cloud_appengine_v1::model::GetVersionRequest;
2428    /// let x = GetVersionRequest::new().set_name("example");
2429    /// ```
2430    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2431        self.name = v.into();
2432        self
2433    }
2434
2435    /// Sets the value of [view][crate::model::GetVersionRequest::view].
2436    ///
2437    /// # Example
2438    /// ```ignore,no_run
2439    /// # use google_cloud_appengine_v1::model::GetVersionRequest;
2440    /// use google_cloud_appengine_v1::model::VersionView;
2441    /// let x0 = GetVersionRequest::new().set_view(VersionView::Full);
2442    /// ```
2443    pub fn set_view<T: std::convert::Into<crate::model::VersionView>>(mut self, v: T) -> Self {
2444        self.view = v.into();
2445        self
2446    }
2447}
2448
2449impl wkt::message::Message for GetVersionRequest {
2450    fn typename() -> &'static str {
2451        "type.googleapis.com/google.appengine.v1.GetVersionRequest"
2452    }
2453}
2454
2455/// Request message for `Versions.CreateVersion`.
2456#[derive(Clone, Default, PartialEq)]
2457#[non_exhaustive]
2458pub struct CreateVersionRequest {
2459    /// Name of the parent resource to create this version under. Example:
2460    /// `apps/myapp/services/default`.
2461    pub parent: std::string::String,
2462
2463    /// Application deployment configuration.
2464    pub version: std::option::Option<crate::model::Version>,
2465
2466    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2467}
2468
2469impl CreateVersionRequest {
2470    /// Creates a new default instance.
2471    pub fn new() -> Self {
2472        std::default::Default::default()
2473    }
2474
2475    /// Sets the value of [parent][crate::model::CreateVersionRequest::parent].
2476    ///
2477    /// # Example
2478    /// ```ignore,no_run
2479    /// # use google_cloud_appengine_v1::model::CreateVersionRequest;
2480    /// let x = CreateVersionRequest::new().set_parent("example");
2481    /// ```
2482    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2483        self.parent = v.into();
2484        self
2485    }
2486
2487    /// Sets the value of [version][crate::model::CreateVersionRequest::version].
2488    ///
2489    /// # Example
2490    /// ```ignore,no_run
2491    /// # use google_cloud_appengine_v1::model::CreateVersionRequest;
2492    /// use google_cloud_appengine_v1::model::Version;
2493    /// let x = CreateVersionRequest::new().set_version(Version::default()/* use setters */);
2494    /// ```
2495    pub fn set_version<T>(mut self, v: T) -> Self
2496    where
2497        T: std::convert::Into<crate::model::Version>,
2498    {
2499        self.version = std::option::Option::Some(v.into());
2500        self
2501    }
2502
2503    /// Sets or clears the value of [version][crate::model::CreateVersionRequest::version].
2504    ///
2505    /// # Example
2506    /// ```ignore,no_run
2507    /// # use google_cloud_appengine_v1::model::CreateVersionRequest;
2508    /// use google_cloud_appengine_v1::model::Version;
2509    /// let x = CreateVersionRequest::new().set_or_clear_version(Some(Version::default()/* use setters */));
2510    /// let x = CreateVersionRequest::new().set_or_clear_version(None::<Version>);
2511    /// ```
2512    pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
2513    where
2514        T: std::convert::Into<crate::model::Version>,
2515    {
2516        self.version = v.map(|x| x.into());
2517        self
2518    }
2519}
2520
2521impl wkt::message::Message for CreateVersionRequest {
2522    fn typename() -> &'static str {
2523        "type.googleapis.com/google.appengine.v1.CreateVersionRequest"
2524    }
2525}
2526
2527/// Request message for `Versions.UpdateVersion`.
2528#[derive(Clone, Default, PartialEq)]
2529#[non_exhaustive]
2530pub struct UpdateVersionRequest {
2531    /// Name of the resource to update. Example:
2532    /// `apps/myapp/services/default/versions/1`.
2533    pub name: std::string::String,
2534
2535    /// A Version containing the updated resource. Only fields set in the field
2536    /// mask will be updated.
2537    pub version: std::option::Option<crate::model::Version>,
2538
2539    /// Standard field mask for the set of fields to be updated.
2540    pub update_mask: std::option::Option<wkt::FieldMask>,
2541
2542    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2543}
2544
2545impl UpdateVersionRequest {
2546    /// Creates a new default instance.
2547    pub fn new() -> Self {
2548        std::default::Default::default()
2549    }
2550
2551    /// Sets the value of [name][crate::model::UpdateVersionRequest::name].
2552    ///
2553    /// # Example
2554    /// ```ignore,no_run
2555    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2556    /// let x = UpdateVersionRequest::new().set_name("example");
2557    /// ```
2558    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2559        self.name = v.into();
2560        self
2561    }
2562
2563    /// Sets the value of [version][crate::model::UpdateVersionRequest::version].
2564    ///
2565    /// # Example
2566    /// ```ignore,no_run
2567    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2568    /// use google_cloud_appengine_v1::model::Version;
2569    /// let x = UpdateVersionRequest::new().set_version(Version::default()/* use setters */);
2570    /// ```
2571    pub fn set_version<T>(mut self, v: T) -> Self
2572    where
2573        T: std::convert::Into<crate::model::Version>,
2574    {
2575        self.version = std::option::Option::Some(v.into());
2576        self
2577    }
2578
2579    /// Sets or clears the value of [version][crate::model::UpdateVersionRequest::version].
2580    ///
2581    /// # Example
2582    /// ```ignore,no_run
2583    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2584    /// use google_cloud_appengine_v1::model::Version;
2585    /// let x = UpdateVersionRequest::new().set_or_clear_version(Some(Version::default()/* use setters */));
2586    /// let x = UpdateVersionRequest::new().set_or_clear_version(None::<Version>);
2587    /// ```
2588    pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
2589    where
2590        T: std::convert::Into<crate::model::Version>,
2591    {
2592        self.version = v.map(|x| x.into());
2593        self
2594    }
2595
2596    /// Sets the value of [update_mask][crate::model::UpdateVersionRequest::update_mask].
2597    ///
2598    /// # Example
2599    /// ```ignore,no_run
2600    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2601    /// use wkt::FieldMask;
2602    /// let x = UpdateVersionRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2603    /// ```
2604    pub fn set_update_mask<T>(mut self, v: T) -> Self
2605    where
2606        T: std::convert::Into<wkt::FieldMask>,
2607    {
2608        self.update_mask = std::option::Option::Some(v.into());
2609        self
2610    }
2611
2612    /// Sets or clears the value of [update_mask][crate::model::UpdateVersionRequest::update_mask].
2613    ///
2614    /// # Example
2615    /// ```ignore,no_run
2616    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2617    /// use wkt::FieldMask;
2618    /// let x = UpdateVersionRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2619    /// let x = UpdateVersionRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2620    /// ```
2621    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2622    where
2623        T: std::convert::Into<wkt::FieldMask>,
2624    {
2625        self.update_mask = v.map(|x| x.into());
2626        self
2627    }
2628}
2629
2630impl wkt::message::Message for UpdateVersionRequest {
2631    fn typename() -> &'static str {
2632        "type.googleapis.com/google.appengine.v1.UpdateVersionRequest"
2633    }
2634}
2635
2636/// Request message for `Versions.DeleteVersion`.
2637#[derive(Clone, Default, PartialEq)]
2638#[non_exhaustive]
2639pub struct DeleteVersionRequest {
2640    /// Name of the resource requested. Example:
2641    /// `apps/myapp/services/default/versions/v1`.
2642    pub name: std::string::String,
2643
2644    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2645}
2646
2647impl DeleteVersionRequest {
2648    /// Creates a new default instance.
2649    pub fn new() -> Self {
2650        std::default::Default::default()
2651    }
2652
2653    /// Sets the value of [name][crate::model::DeleteVersionRequest::name].
2654    ///
2655    /// # Example
2656    /// ```ignore,no_run
2657    /// # use google_cloud_appengine_v1::model::DeleteVersionRequest;
2658    /// let x = DeleteVersionRequest::new().set_name("example");
2659    /// ```
2660    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2661        self.name = v.into();
2662        self
2663    }
2664}
2665
2666impl wkt::message::Message for DeleteVersionRequest {
2667    fn typename() -> &'static str {
2668        "type.googleapis.com/google.appengine.v1.DeleteVersionRequest"
2669    }
2670}
2671
2672/// Request message for `Instances.ListInstances`.
2673#[derive(Clone, Default, PartialEq)]
2674#[non_exhaustive]
2675pub struct ListInstancesRequest {
2676    /// Name of the parent Version resource. Example:
2677    /// `apps/myapp/services/default/versions/v1`.
2678    pub parent: std::string::String,
2679
2680    /// Maximum results to return per page.
2681    pub page_size: i32,
2682
2683    /// Continuation token for fetching the next page of results.
2684    pub page_token: std::string::String,
2685
2686    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2687}
2688
2689impl ListInstancesRequest {
2690    /// Creates a new default instance.
2691    pub fn new() -> Self {
2692        std::default::Default::default()
2693    }
2694
2695    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
2696    ///
2697    /// # Example
2698    /// ```ignore,no_run
2699    /// # use google_cloud_appengine_v1::model::ListInstancesRequest;
2700    /// let x = ListInstancesRequest::new().set_parent("example");
2701    /// ```
2702    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2703        self.parent = v.into();
2704        self
2705    }
2706
2707    /// Sets the value of [page_size][crate::model::ListInstancesRequest::page_size].
2708    ///
2709    /// # Example
2710    /// ```ignore,no_run
2711    /// # use google_cloud_appengine_v1::model::ListInstancesRequest;
2712    /// let x = ListInstancesRequest::new().set_page_size(42);
2713    /// ```
2714    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2715        self.page_size = v.into();
2716        self
2717    }
2718
2719    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
2720    ///
2721    /// # Example
2722    /// ```ignore,no_run
2723    /// # use google_cloud_appengine_v1::model::ListInstancesRequest;
2724    /// let x = ListInstancesRequest::new().set_page_token("example");
2725    /// ```
2726    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2727        self.page_token = v.into();
2728        self
2729    }
2730}
2731
2732impl wkt::message::Message for ListInstancesRequest {
2733    fn typename() -> &'static str {
2734        "type.googleapis.com/google.appengine.v1.ListInstancesRequest"
2735    }
2736}
2737
2738/// Response message for `Instances.ListInstances`.
2739#[derive(Clone, Default, PartialEq)]
2740#[non_exhaustive]
2741pub struct ListInstancesResponse {
2742    /// The instances belonging to the requested version.
2743    pub instances: std::vec::Vec<crate::model::Instance>,
2744
2745    /// Continuation token for fetching the next page of results.
2746    pub next_page_token: std::string::String,
2747
2748    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2749}
2750
2751impl ListInstancesResponse {
2752    /// Creates a new default instance.
2753    pub fn new() -> Self {
2754        std::default::Default::default()
2755    }
2756
2757    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
2758    ///
2759    /// # Example
2760    /// ```ignore,no_run
2761    /// # use google_cloud_appengine_v1::model::ListInstancesResponse;
2762    /// use google_cloud_appengine_v1::model::Instance;
2763    /// let x = ListInstancesResponse::new()
2764    ///     .set_instances([
2765    ///         Instance::default()/* use setters */,
2766    ///         Instance::default()/* use (different) setters */,
2767    ///     ]);
2768    /// ```
2769    pub fn set_instances<T, V>(mut self, v: T) -> Self
2770    where
2771        T: std::iter::IntoIterator<Item = V>,
2772        V: std::convert::Into<crate::model::Instance>,
2773    {
2774        use std::iter::Iterator;
2775        self.instances = v.into_iter().map(|i| i.into()).collect();
2776        self
2777    }
2778
2779    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
2780    ///
2781    /// # Example
2782    /// ```ignore,no_run
2783    /// # use google_cloud_appengine_v1::model::ListInstancesResponse;
2784    /// let x = ListInstancesResponse::new().set_next_page_token("example");
2785    /// ```
2786    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2787        self.next_page_token = v.into();
2788        self
2789    }
2790}
2791
2792impl wkt::message::Message for ListInstancesResponse {
2793    fn typename() -> &'static str {
2794        "type.googleapis.com/google.appengine.v1.ListInstancesResponse"
2795    }
2796}
2797
2798#[doc(hidden)]
2799impl google_cloud_gax::paginator::internal::PageableResponse for ListInstancesResponse {
2800    type PageItem = crate::model::Instance;
2801
2802    fn items(self) -> std::vec::Vec<Self::PageItem> {
2803        self.instances
2804    }
2805
2806    fn next_page_token(&self) -> std::string::String {
2807        use std::clone::Clone;
2808        self.next_page_token.clone()
2809    }
2810}
2811
2812/// Request message for `Instances.GetInstance`.
2813#[derive(Clone, Default, PartialEq)]
2814#[non_exhaustive]
2815pub struct GetInstanceRequest {
2816    /// Name of the resource requested. Example:
2817    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2818    pub name: std::string::String,
2819
2820    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2821}
2822
2823impl GetInstanceRequest {
2824    /// Creates a new default instance.
2825    pub fn new() -> Self {
2826        std::default::Default::default()
2827    }
2828
2829    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
2830    ///
2831    /// # Example
2832    /// ```ignore,no_run
2833    /// # use google_cloud_appengine_v1::model::GetInstanceRequest;
2834    /// let x = GetInstanceRequest::new().set_name("example");
2835    /// ```
2836    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2837        self.name = v.into();
2838        self
2839    }
2840}
2841
2842impl wkt::message::Message for GetInstanceRequest {
2843    fn typename() -> &'static str {
2844        "type.googleapis.com/google.appengine.v1.GetInstanceRequest"
2845    }
2846}
2847
2848/// Request message for `Instances.DeleteInstance`.
2849#[derive(Clone, Default, PartialEq)]
2850#[non_exhaustive]
2851pub struct DeleteInstanceRequest {
2852    /// Name of the resource requested. Example:
2853    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2854    pub name: std::string::String,
2855
2856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2857}
2858
2859impl DeleteInstanceRequest {
2860    /// Creates a new default instance.
2861    pub fn new() -> Self {
2862        std::default::Default::default()
2863    }
2864
2865    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
2866    ///
2867    /// # Example
2868    /// ```ignore,no_run
2869    /// # use google_cloud_appengine_v1::model::DeleteInstanceRequest;
2870    /// let x = DeleteInstanceRequest::new().set_name("example");
2871    /// ```
2872    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2873        self.name = v.into();
2874        self
2875    }
2876}
2877
2878impl wkt::message::Message for DeleteInstanceRequest {
2879    fn typename() -> &'static str {
2880        "type.googleapis.com/google.appengine.v1.DeleteInstanceRequest"
2881    }
2882}
2883
2884/// Request message for `Instances.DebugInstance`.
2885#[derive(Clone, Default, PartialEq)]
2886#[non_exhaustive]
2887pub struct DebugInstanceRequest {
2888    /// Name of the resource requested. Example:
2889    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2890    pub name: std::string::String,
2891
2892    /// Public SSH key to add to the instance. Examples:
2893    ///
2894    /// * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
2895    /// * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
2896    ///
2897    /// For more information, see
2898    /// [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
2899    pub ssh_key: std::string::String,
2900
2901    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2902}
2903
2904impl DebugInstanceRequest {
2905    /// Creates a new default instance.
2906    pub fn new() -> Self {
2907        std::default::Default::default()
2908    }
2909
2910    /// Sets the value of [name][crate::model::DebugInstanceRequest::name].
2911    ///
2912    /// # Example
2913    /// ```ignore,no_run
2914    /// # use google_cloud_appengine_v1::model::DebugInstanceRequest;
2915    /// let x = DebugInstanceRequest::new().set_name("example");
2916    /// ```
2917    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2918        self.name = v.into();
2919        self
2920    }
2921
2922    /// Sets the value of [ssh_key][crate::model::DebugInstanceRequest::ssh_key].
2923    ///
2924    /// # Example
2925    /// ```ignore,no_run
2926    /// # use google_cloud_appengine_v1::model::DebugInstanceRequest;
2927    /// let x = DebugInstanceRequest::new().set_ssh_key("example");
2928    /// ```
2929    pub fn set_ssh_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2930        self.ssh_key = v.into();
2931        self
2932    }
2933}
2934
2935impl wkt::message::Message for DebugInstanceRequest {
2936    fn typename() -> &'static str {
2937        "type.googleapis.com/google.appengine.v1.DebugInstanceRequest"
2938    }
2939}
2940
2941/// Request message for `Firewall.ListIngressRules`.
2942#[derive(Clone, Default, PartialEq)]
2943#[non_exhaustive]
2944pub struct ListIngressRulesRequest {
2945    /// Name of the Firewall collection to retrieve.
2946    /// Example: `apps/myapp/firewall/ingressRules`.
2947    pub parent: std::string::String,
2948
2949    /// Maximum results to return per page.
2950    pub page_size: i32,
2951
2952    /// Continuation token for fetching the next page of results.
2953    pub page_token: std::string::String,
2954
2955    /// A valid IP Address. If set, only rules matching this address will be
2956    /// returned. The first returned rule will be the rule that fires on requests
2957    /// from this IP.
2958    pub matching_address: std::string::String,
2959
2960    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2961}
2962
2963impl ListIngressRulesRequest {
2964    /// Creates a new default instance.
2965    pub fn new() -> Self {
2966        std::default::Default::default()
2967    }
2968
2969    /// Sets the value of [parent][crate::model::ListIngressRulesRequest::parent].
2970    ///
2971    /// # Example
2972    /// ```ignore,no_run
2973    /// # use google_cloud_appengine_v1::model::ListIngressRulesRequest;
2974    /// let x = ListIngressRulesRequest::new().set_parent("example");
2975    /// ```
2976    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2977        self.parent = v.into();
2978        self
2979    }
2980
2981    /// Sets the value of [page_size][crate::model::ListIngressRulesRequest::page_size].
2982    ///
2983    /// # Example
2984    /// ```ignore,no_run
2985    /// # use google_cloud_appengine_v1::model::ListIngressRulesRequest;
2986    /// let x = ListIngressRulesRequest::new().set_page_size(42);
2987    /// ```
2988    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2989        self.page_size = v.into();
2990        self
2991    }
2992
2993    /// Sets the value of [page_token][crate::model::ListIngressRulesRequest::page_token].
2994    ///
2995    /// # Example
2996    /// ```ignore,no_run
2997    /// # use google_cloud_appengine_v1::model::ListIngressRulesRequest;
2998    /// let x = ListIngressRulesRequest::new().set_page_token("example");
2999    /// ```
3000    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3001        self.page_token = v.into();
3002        self
3003    }
3004
3005    /// Sets the value of [matching_address][crate::model::ListIngressRulesRequest::matching_address].
3006    ///
3007    /// # Example
3008    /// ```ignore,no_run
3009    /// # use google_cloud_appengine_v1::model::ListIngressRulesRequest;
3010    /// let x = ListIngressRulesRequest::new().set_matching_address("example");
3011    /// ```
3012    pub fn set_matching_address<T: std::convert::Into<std::string::String>>(
3013        mut self,
3014        v: T,
3015    ) -> Self {
3016        self.matching_address = v.into();
3017        self
3018    }
3019}
3020
3021impl wkt::message::Message for ListIngressRulesRequest {
3022    fn typename() -> &'static str {
3023        "type.googleapis.com/google.appengine.v1.ListIngressRulesRequest"
3024    }
3025}
3026
3027/// Response message for `Firewall.ListIngressRules`.
3028#[derive(Clone, Default, PartialEq)]
3029#[non_exhaustive]
3030pub struct ListIngressRulesResponse {
3031    /// The ingress FirewallRules for this application.
3032    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
3033
3034    /// Continuation token for fetching the next page of results.
3035    pub next_page_token: std::string::String,
3036
3037    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3038}
3039
3040impl ListIngressRulesResponse {
3041    /// Creates a new default instance.
3042    pub fn new() -> Self {
3043        std::default::Default::default()
3044    }
3045
3046    /// Sets the value of [ingress_rules][crate::model::ListIngressRulesResponse::ingress_rules].
3047    ///
3048    /// # Example
3049    /// ```ignore,no_run
3050    /// # use google_cloud_appengine_v1::model::ListIngressRulesResponse;
3051    /// use google_cloud_appengine_v1::model::FirewallRule;
3052    /// let x = ListIngressRulesResponse::new()
3053    ///     .set_ingress_rules([
3054    ///         FirewallRule::default()/* use setters */,
3055    ///         FirewallRule::default()/* use (different) setters */,
3056    ///     ]);
3057    /// ```
3058    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
3059    where
3060        T: std::iter::IntoIterator<Item = V>,
3061        V: std::convert::Into<crate::model::FirewallRule>,
3062    {
3063        use std::iter::Iterator;
3064        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
3065        self
3066    }
3067
3068    /// Sets the value of [next_page_token][crate::model::ListIngressRulesResponse::next_page_token].
3069    ///
3070    /// # Example
3071    /// ```ignore,no_run
3072    /// # use google_cloud_appengine_v1::model::ListIngressRulesResponse;
3073    /// let x = ListIngressRulesResponse::new().set_next_page_token("example");
3074    /// ```
3075    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3076        self.next_page_token = v.into();
3077        self
3078    }
3079}
3080
3081impl wkt::message::Message for ListIngressRulesResponse {
3082    fn typename() -> &'static str {
3083        "type.googleapis.com/google.appengine.v1.ListIngressRulesResponse"
3084    }
3085}
3086
3087#[doc(hidden)]
3088impl google_cloud_gax::paginator::internal::PageableResponse for ListIngressRulesResponse {
3089    type PageItem = crate::model::FirewallRule;
3090
3091    fn items(self) -> std::vec::Vec<Self::PageItem> {
3092        self.ingress_rules
3093    }
3094
3095    fn next_page_token(&self) -> std::string::String {
3096        use std::clone::Clone;
3097        self.next_page_token.clone()
3098    }
3099}
3100
3101/// Request message for `Firewall.BatchUpdateIngressRules`.
3102#[derive(Clone, Default, PartialEq)]
3103#[non_exhaustive]
3104pub struct BatchUpdateIngressRulesRequest {
3105    /// Name of the Firewall collection to set.
3106    /// Example: `apps/myapp/firewall/ingressRules`.
3107    pub name: std::string::String,
3108
3109    /// A list of FirewallRules to replace the existing set.
3110    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
3111
3112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3113}
3114
3115impl BatchUpdateIngressRulesRequest {
3116    /// Creates a new default instance.
3117    pub fn new() -> Self {
3118        std::default::Default::default()
3119    }
3120
3121    /// Sets the value of [name][crate::model::BatchUpdateIngressRulesRequest::name].
3122    ///
3123    /// # Example
3124    /// ```ignore,no_run
3125    /// # use google_cloud_appengine_v1::model::BatchUpdateIngressRulesRequest;
3126    /// let x = BatchUpdateIngressRulesRequest::new().set_name("example");
3127    /// ```
3128    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3129        self.name = v.into();
3130        self
3131    }
3132
3133    /// Sets the value of [ingress_rules][crate::model::BatchUpdateIngressRulesRequest::ingress_rules].
3134    ///
3135    /// # Example
3136    /// ```ignore,no_run
3137    /// # use google_cloud_appengine_v1::model::BatchUpdateIngressRulesRequest;
3138    /// use google_cloud_appengine_v1::model::FirewallRule;
3139    /// let x = BatchUpdateIngressRulesRequest::new()
3140    ///     .set_ingress_rules([
3141    ///         FirewallRule::default()/* use setters */,
3142    ///         FirewallRule::default()/* use (different) setters */,
3143    ///     ]);
3144    /// ```
3145    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
3146    where
3147        T: std::iter::IntoIterator<Item = V>,
3148        V: std::convert::Into<crate::model::FirewallRule>,
3149    {
3150        use std::iter::Iterator;
3151        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
3152        self
3153    }
3154}
3155
3156impl wkt::message::Message for BatchUpdateIngressRulesRequest {
3157    fn typename() -> &'static str {
3158        "type.googleapis.com/google.appengine.v1.BatchUpdateIngressRulesRequest"
3159    }
3160}
3161
3162/// Response message for `Firewall.UpdateAllIngressRules`.
3163#[derive(Clone, Default, PartialEq)]
3164#[non_exhaustive]
3165pub struct BatchUpdateIngressRulesResponse {
3166    /// The full list of ingress FirewallRules for this application.
3167    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
3168
3169    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3170}
3171
3172impl BatchUpdateIngressRulesResponse {
3173    /// Creates a new default instance.
3174    pub fn new() -> Self {
3175        std::default::Default::default()
3176    }
3177
3178    /// Sets the value of [ingress_rules][crate::model::BatchUpdateIngressRulesResponse::ingress_rules].
3179    ///
3180    /// # Example
3181    /// ```ignore,no_run
3182    /// # use google_cloud_appengine_v1::model::BatchUpdateIngressRulesResponse;
3183    /// use google_cloud_appengine_v1::model::FirewallRule;
3184    /// let x = BatchUpdateIngressRulesResponse::new()
3185    ///     .set_ingress_rules([
3186    ///         FirewallRule::default()/* use setters */,
3187    ///         FirewallRule::default()/* use (different) setters */,
3188    ///     ]);
3189    /// ```
3190    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
3191    where
3192        T: std::iter::IntoIterator<Item = V>,
3193        V: std::convert::Into<crate::model::FirewallRule>,
3194    {
3195        use std::iter::Iterator;
3196        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
3197        self
3198    }
3199}
3200
3201impl wkt::message::Message for BatchUpdateIngressRulesResponse {
3202    fn typename() -> &'static str {
3203        "type.googleapis.com/google.appengine.v1.BatchUpdateIngressRulesResponse"
3204    }
3205}
3206
3207/// Request message for `Firewall.CreateIngressRule`.
3208#[derive(Clone, Default, PartialEq)]
3209#[non_exhaustive]
3210pub struct CreateIngressRuleRequest {
3211    /// Name of the parent Firewall collection in which to create a new rule.
3212    /// Example: `apps/myapp/firewall/ingressRules`.
3213    pub parent: std::string::String,
3214
3215    /// A FirewallRule containing the new resource.
3216    ///
3217    /// The user may optionally provide a position at which the new rule will be
3218    /// placed. The positions define a sequential list starting at 1. If a rule
3219    /// already exists at the given position, rules greater than the provided
3220    /// position will be moved forward by one.
3221    ///
3222    /// If no position is provided, the server will place the rule as the second to
3223    /// last rule in the sequence before the required default allow-all or deny-all
3224    /// rule.
3225    pub rule: std::option::Option<crate::model::FirewallRule>,
3226
3227    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3228}
3229
3230impl CreateIngressRuleRequest {
3231    /// Creates a new default instance.
3232    pub fn new() -> Self {
3233        std::default::Default::default()
3234    }
3235
3236    /// Sets the value of [parent][crate::model::CreateIngressRuleRequest::parent].
3237    ///
3238    /// # Example
3239    /// ```ignore,no_run
3240    /// # use google_cloud_appengine_v1::model::CreateIngressRuleRequest;
3241    /// let x = CreateIngressRuleRequest::new().set_parent("example");
3242    /// ```
3243    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3244        self.parent = v.into();
3245        self
3246    }
3247
3248    /// Sets the value of [rule][crate::model::CreateIngressRuleRequest::rule].
3249    ///
3250    /// # Example
3251    /// ```ignore,no_run
3252    /// # use google_cloud_appengine_v1::model::CreateIngressRuleRequest;
3253    /// use google_cloud_appengine_v1::model::FirewallRule;
3254    /// let x = CreateIngressRuleRequest::new().set_rule(FirewallRule::default()/* use setters */);
3255    /// ```
3256    pub fn set_rule<T>(mut self, v: T) -> Self
3257    where
3258        T: std::convert::Into<crate::model::FirewallRule>,
3259    {
3260        self.rule = std::option::Option::Some(v.into());
3261        self
3262    }
3263
3264    /// Sets or clears the value of [rule][crate::model::CreateIngressRuleRequest::rule].
3265    ///
3266    /// # Example
3267    /// ```ignore,no_run
3268    /// # use google_cloud_appengine_v1::model::CreateIngressRuleRequest;
3269    /// use google_cloud_appengine_v1::model::FirewallRule;
3270    /// let x = CreateIngressRuleRequest::new().set_or_clear_rule(Some(FirewallRule::default()/* use setters */));
3271    /// let x = CreateIngressRuleRequest::new().set_or_clear_rule(None::<FirewallRule>);
3272    /// ```
3273    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
3274    where
3275        T: std::convert::Into<crate::model::FirewallRule>,
3276    {
3277        self.rule = v.map(|x| x.into());
3278        self
3279    }
3280}
3281
3282impl wkt::message::Message for CreateIngressRuleRequest {
3283    fn typename() -> &'static str {
3284        "type.googleapis.com/google.appengine.v1.CreateIngressRuleRequest"
3285    }
3286}
3287
3288/// Request message for `Firewall.GetIngressRule`.
3289#[derive(Clone, Default, PartialEq)]
3290#[non_exhaustive]
3291pub struct GetIngressRuleRequest {
3292    /// Name of the Firewall resource to retrieve.
3293    /// Example: `apps/myapp/firewall/ingressRules/100`.
3294    pub name: std::string::String,
3295
3296    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3297}
3298
3299impl GetIngressRuleRequest {
3300    /// Creates a new default instance.
3301    pub fn new() -> Self {
3302        std::default::Default::default()
3303    }
3304
3305    /// Sets the value of [name][crate::model::GetIngressRuleRequest::name].
3306    ///
3307    /// # Example
3308    /// ```ignore,no_run
3309    /// # use google_cloud_appengine_v1::model::GetIngressRuleRequest;
3310    /// let x = GetIngressRuleRequest::new().set_name("example");
3311    /// ```
3312    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3313        self.name = v.into();
3314        self
3315    }
3316}
3317
3318impl wkt::message::Message for GetIngressRuleRequest {
3319    fn typename() -> &'static str {
3320        "type.googleapis.com/google.appengine.v1.GetIngressRuleRequest"
3321    }
3322}
3323
3324/// Request message for `Firewall.UpdateIngressRule`.
3325#[derive(Clone, Default, PartialEq)]
3326#[non_exhaustive]
3327pub struct UpdateIngressRuleRequest {
3328    /// Name of the Firewall resource to update.
3329    /// Example: `apps/myapp/firewall/ingressRules/100`.
3330    pub name: std::string::String,
3331
3332    /// A FirewallRule containing the updated resource
3333    pub rule: std::option::Option<crate::model::FirewallRule>,
3334
3335    /// Standard field mask for the set of fields to be updated.
3336    pub update_mask: std::option::Option<wkt::FieldMask>,
3337
3338    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3339}
3340
3341impl UpdateIngressRuleRequest {
3342    /// Creates a new default instance.
3343    pub fn new() -> Self {
3344        std::default::Default::default()
3345    }
3346
3347    /// Sets the value of [name][crate::model::UpdateIngressRuleRequest::name].
3348    ///
3349    /// # Example
3350    /// ```ignore,no_run
3351    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3352    /// let x = UpdateIngressRuleRequest::new().set_name("example");
3353    /// ```
3354    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3355        self.name = v.into();
3356        self
3357    }
3358
3359    /// Sets the value of [rule][crate::model::UpdateIngressRuleRequest::rule].
3360    ///
3361    /// # Example
3362    /// ```ignore,no_run
3363    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3364    /// use google_cloud_appengine_v1::model::FirewallRule;
3365    /// let x = UpdateIngressRuleRequest::new().set_rule(FirewallRule::default()/* use setters */);
3366    /// ```
3367    pub fn set_rule<T>(mut self, v: T) -> Self
3368    where
3369        T: std::convert::Into<crate::model::FirewallRule>,
3370    {
3371        self.rule = std::option::Option::Some(v.into());
3372        self
3373    }
3374
3375    /// Sets or clears the value of [rule][crate::model::UpdateIngressRuleRequest::rule].
3376    ///
3377    /// # Example
3378    /// ```ignore,no_run
3379    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3380    /// use google_cloud_appengine_v1::model::FirewallRule;
3381    /// let x = UpdateIngressRuleRequest::new().set_or_clear_rule(Some(FirewallRule::default()/* use setters */));
3382    /// let x = UpdateIngressRuleRequest::new().set_or_clear_rule(None::<FirewallRule>);
3383    /// ```
3384    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
3385    where
3386        T: std::convert::Into<crate::model::FirewallRule>,
3387    {
3388        self.rule = v.map(|x| x.into());
3389        self
3390    }
3391
3392    /// Sets the value of [update_mask][crate::model::UpdateIngressRuleRequest::update_mask].
3393    ///
3394    /// # Example
3395    /// ```ignore,no_run
3396    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3397    /// use wkt::FieldMask;
3398    /// let x = UpdateIngressRuleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3399    /// ```
3400    pub fn set_update_mask<T>(mut self, v: T) -> Self
3401    where
3402        T: std::convert::Into<wkt::FieldMask>,
3403    {
3404        self.update_mask = std::option::Option::Some(v.into());
3405        self
3406    }
3407
3408    /// Sets or clears the value of [update_mask][crate::model::UpdateIngressRuleRequest::update_mask].
3409    ///
3410    /// # Example
3411    /// ```ignore,no_run
3412    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3413    /// use wkt::FieldMask;
3414    /// let x = UpdateIngressRuleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3415    /// let x = UpdateIngressRuleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3416    /// ```
3417    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3418    where
3419        T: std::convert::Into<wkt::FieldMask>,
3420    {
3421        self.update_mask = v.map(|x| x.into());
3422        self
3423    }
3424}
3425
3426impl wkt::message::Message for UpdateIngressRuleRequest {
3427    fn typename() -> &'static str {
3428        "type.googleapis.com/google.appengine.v1.UpdateIngressRuleRequest"
3429    }
3430}
3431
3432/// Request message for `Firewall.DeleteIngressRule`.
3433#[derive(Clone, Default, PartialEq)]
3434#[non_exhaustive]
3435pub struct DeleteIngressRuleRequest {
3436    /// Name of the Firewall resource to delete.
3437    /// Example: `apps/myapp/firewall/ingressRules/100`.
3438    pub name: std::string::String,
3439
3440    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3441}
3442
3443impl DeleteIngressRuleRequest {
3444    /// Creates a new default instance.
3445    pub fn new() -> Self {
3446        std::default::Default::default()
3447    }
3448
3449    /// Sets the value of [name][crate::model::DeleteIngressRuleRequest::name].
3450    ///
3451    /// # Example
3452    /// ```ignore,no_run
3453    /// # use google_cloud_appengine_v1::model::DeleteIngressRuleRequest;
3454    /// let x = DeleteIngressRuleRequest::new().set_name("example");
3455    /// ```
3456    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3457        self.name = v.into();
3458        self
3459    }
3460}
3461
3462impl wkt::message::Message for DeleteIngressRuleRequest {
3463    fn typename() -> &'static str {
3464        "type.googleapis.com/google.appengine.v1.DeleteIngressRuleRequest"
3465    }
3466}
3467
3468/// Request message for `AuthorizedDomains.ListAuthorizedDomains`.
3469#[derive(Clone, Default, PartialEq)]
3470#[non_exhaustive]
3471pub struct ListAuthorizedDomainsRequest {
3472    /// Name of the parent Application resource. Example: `apps/myapp`.
3473    pub parent: std::string::String,
3474
3475    /// Maximum results to return per page.
3476    pub page_size: i32,
3477
3478    /// Continuation token for fetching the next page of results.
3479    pub page_token: std::string::String,
3480
3481    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3482}
3483
3484impl ListAuthorizedDomainsRequest {
3485    /// Creates a new default instance.
3486    pub fn new() -> Self {
3487        std::default::Default::default()
3488    }
3489
3490    /// Sets the value of [parent][crate::model::ListAuthorizedDomainsRequest::parent].
3491    ///
3492    /// # Example
3493    /// ```ignore,no_run
3494    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsRequest;
3495    /// let x = ListAuthorizedDomainsRequest::new().set_parent("example");
3496    /// ```
3497    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3498        self.parent = v.into();
3499        self
3500    }
3501
3502    /// Sets the value of [page_size][crate::model::ListAuthorizedDomainsRequest::page_size].
3503    ///
3504    /// # Example
3505    /// ```ignore,no_run
3506    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsRequest;
3507    /// let x = ListAuthorizedDomainsRequest::new().set_page_size(42);
3508    /// ```
3509    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3510        self.page_size = v.into();
3511        self
3512    }
3513
3514    /// Sets the value of [page_token][crate::model::ListAuthorizedDomainsRequest::page_token].
3515    ///
3516    /// # Example
3517    /// ```ignore,no_run
3518    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsRequest;
3519    /// let x = ListAuthorizedDomainsRequest::new().set_page_token("example");
3520    /// ```
3521    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3522        self.page_token = v.into();
3523        self
3524    }
3525}
3526
3527impl wkt::message::Message for ListAuthorizedDomainsRequest {
3528    fn typename() -> &'static str {
3529        "type.googleapis.com/google.appengine.v1.ListAuthorizedDomainsRequest"
3530    }
3531}
3532
3533/// Response message for `AuthorizedDomains.ListAuthorizedDomains`.
3534#[derive(Clone, Default, PartialEq)]
3535#[non_exhaustive]
3536pub struct ListAuthorizedDomainsResponse {
3537    /// The authorized domains belonging to the user.
3538    pub domains: std::vec::Vec<crate::model::AuthorizedDomain>,
3539
3540    /// Continuation token for fetching the next page of results.
3541    pub next_page_token: std::string::String,
3542
3543    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3544}
3545
3546impl ListAuthorizedDomainsResponse {
3547    /// Creates a new default instance.
3548    pub fn new() -> Self {
3549        std::default::Default::default()
3550    }
3551
3552    /// Sets the value of [domains][crate::model::ListAuthorizedDomainsResponse::domains].
3553    ///
3554    /// # Example
3555    /// ```ignore,no_run
3556    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsResponse;
3557    /// use google_cloud_appengine_v1::model::AuthorizedDomain;
3558    /// let x = ListAuthorizedDomainsResponse::new()
3559    ///     .set_domains([
3560    ///         AuthorizedDomain::default()/* use setters */,
3561    ///         AuthorizedDomain::default()/* use (different) setters */,
3562    ///     ]);
3563    /// ```
3564    pub fn set_domains<T, V>(mut self, v: T) -> Self
3565    where
3566        T: std::iter::IntoIterator<Item = V>,
3567        V: std::convert::Into<crate::model::AuthorizedDomain>,
3568    {
3569        use std::iter::Iterator;
3570        self.domains = v.into_iter().map(|i| i.into()).collect();
3571        self
3572    }
3573
3574    /// Sets the value of [next_page_token][crate::model::ListAuthorizedDomainsResponse::next_page_token].
3575    ///
3576    /// # Example
3577    /// ```ignore,no_run
3578    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsResponse;
3579    /// let x = ListAuthorizedDomainsResponse::new().set_next_page_token("example");
3580    /// ```
3581    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3582        self.next_page_token = v.into();
3583        self
3584    }
3585}
3586
3587impl wkt::message::Message for ListAuthorizedDomainsResponse {
3588    fn typename() -> &'static str {
3589        "type.googleapis.com/google.appengine.v1.ListAuthorizedDomainsResponse"
3590    }
3591}
3592
3593#[doc(hidden)]
3594impl google_cloud_gax::paginator::internal::PageableResponse for ListAuthorizedDomainsResponse {
3595    type PageItem = crate::model::AuthorizedDomain;
3596
3597    fn items(self) -> std::vec::Vec<Self::PageItem> {
3598        self.domains
3599    }
3600
3601    fn next_page_token(&self) -> std::string::String {
3602        use std::clone::Clone;
3603        self.next_page_token.clone()
3604    }
3605}
3606
3607/// Request message for `AuthorizedCertificates.ListAuthorizedCertificates`.
3608#[derive(Clone, Default, PartialEq)]
3609#[non_exhaustive]
3610pub struct ListAuthorizedCertificatesRequest {
3611    /// Name of the parent `Application` resource. Example: `apps/myapp`.
3612    pub parent: std::string::String,
3613
3614    /// Controls the set of fields returned in the `LIST` response.
3615    pub view: crate::model::AuthorizedCertificateView,
3616
3617    /// Maximum results to return per page.
3618    pub page_size: i32,
3619
3620    /// Continuation token for fetching the next page of results.
3621    pub page_token: std::string::String,
3622
3623    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3624}
3625
3626impl ListAuthorizedCertificatesRequest {
3627    /// Creates a new default instance.
3628    pub fn new() -> Self {
3629        std::default::Default::default()
3630    }
3631
3632    /// Sets the value of [parent][crate::model::ListAuthorizedCertificatesRequest::parent].
3633    ///
3634    /// # Example
3635    /// ```ignore,no_run
3636    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesRequest;
3637    /// let x = ListAuthorizedCertificatesRequest::new().set_parent("example");
3638    /// ```
3639    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3640        self.parent = v.into();
3641        self
3642    }
3643
3644    /// Sets the value of [view][crate::model::ListAuthorizedCertificatesRequest::view].
3645    ///
3646    /// # Example
3647    /// ```ignore,no_run
3648    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesRequest;
3649    /// use google_cloud_appengine_v1::model::AuthorizedCertificateView;
3650    /// let x0 = ListAuthorizedCertificatesRequest::new().set_view(AuthorizedCertificateView::FullCertificate);
3651    /// ```
3652    pub fn set_view<T: std::convert::Into<crate::model::AuthorizedCertificateView>>(
3653        mut self,
3654        v: T,
3655    ) -> Self {
3656        self.view = v.into();
3657        self
3658    }
3659
3660    /// Sets the value of [page_size][crate::model::ListAuthorizedCertificatesRequest::page_size].
3661    ///
3662    /// # Example
3663    /// ```ignore,no_run
3664    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesRequest;
3665    /// let x = ListAuthorizedCertificatesRequest::new().set_page_size(42);
3666    /// ```
3667    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3668        self.page_size = v.into();
3669        self
3670    }
3671
3672    /// Sets the value of [page_token][crate::model::ListAuthorizedCertificatesRequest::page_token].
3673    ///
3674    /// # Example
3675    /// ```ignore,no_run
3676    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesRequest;
3677    /// let x = ListAuthorizedCertificatesRequest::new().set_page_token("example");
3678    /// ```
3679    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3680        self.page_token = v.into();
3681        self
3682    }
3683}
3684
3685impl wkt::message::Message for ListAuthorizedCertificatesRequest {
3686    fn typename() -> &'static str {
3687        "type.googleapis.com/google.appengine.v1.ListAuthorizedCertificatesRequest"
3688    }
3689}
3690
3691/// Response message for `AuthorizedCertificates.ListAuthorizedCertificates`.
3692#[derive(Clone, Default, PartialEq)]
3693#[non_exhaustive]
3694pub struct ListAuthorizedCertificatesResponse {
3695    /// The SSL certificates the user is authorized to administer.
3696    pub certificates: std::vec::Vec<crate::model::AuthorizedCertificate>,
3697
3698    /// Continuation token for fetching the next page of results.
3699    pub next_page_token: std::string::String,
3700
3701    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3702}
3703
3704impl ListAuthorizedCertificatesResponse {
3705    /// Creates a new default instance.
3706    pub fn new() -> Self {
3707        std::default::Default::default()
3708    }
3709
3710    /// Sets the value of [certificates][crate::model::ListAuthorizedCertificatesResponse::certificates].
3711    ///
3712    /// # Example
3713    /// ```ignore,no_run
3714    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesResponse;
3715    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3716    /// let x = ListAuthorizedCertificatesResponse::new()
3717    ///     .set_certificates([
3718    ///         AuthorizedCertificate::default()/* use setters */,
3719    ///         AuthorizedCertificate::default()/* use (different) setters */,
3720    ///     ]);
3721    /// ```
3722    pub fn set_certificates<T, V>(mut self, v: T) -> Self
3723    where
3724        T: std::iter::IntoIterator<Item = V>,
3725        V: std::convert::Into<crate::model::AuthorizedCertificate>,
3726    {
3727        use std::iter::Iterator;
3728        self.certificates = v.into_iter().map(|i| i.into()).collect();
3729        self
3730    }
3731
3732    /// Sets the value of [next_page_token][crate::model::ListAuthorizedCertificatesResponse::next_page_token].
3733    ///
3734    /// # Example
3735    /// ```ignore,no_run
3736    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesResponse;
3737    /// let x = ListAuthorizedCertificatesResponse::new().set_next_page_token("example");
3738    /// ```
3739    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3740        self.next_page_token = v.into();
3741        self
3742    }
3743}
3744
3745impl wkt::message::Message for ListAuthorizedCertificatesResponse {
3746    fn typename() -> &'static str {
3747        "type.googleapis.com/google.appengine.v1.ListAuthorizedCertificatesResponse"
3748    }
3749}
3750
3751#[doc(hidden)]
3752impl google_cloud_gax::paginator::internal::PageableResponse
3753    for ListAuthorizedCertificatesResponse
3754{
3755    type PageItem = crate::model::AuthorizedCertificate;
3756
3757    fn items(self) -> std::vec::Vec<Self::PageItem> {
3758        self.certificates
3759    }
3760
3761    fn next_page_token(&self) -> std::string::String {
3762        use std::clone::Clone;
3763        self.next_page_token.clone()
3764    }
3765}
3766
3767/// Request message for `AuthorizedCertificates.GetAuthorizedCertificate`.
3768#[derive(Clone, Default, PartialEq)]
3769#[non_exhaustive]
3770pub struct GetAuthorizedCertificateRequest {
3771    /// Name of the resource requested. Example:
3772    /// `apps/myapp/authorizedCertificates/12345`.
3773    pub name: std::string::String,
3774
3775    /// Controls the set of fields returned in the `GET` response.
3776    pub view: crate::model::AuthorizedCertificateView,
3777
3778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3779}
3780
3781impl GetAuthorizedCertificateRequest {
3782    /// Creates a new default instance.
3783    pub fn new() -> Self {
3784        std::default::Default::default()
3785    }
3786
3787    /// Sets the value of [name][crate::model::GetAuthorizedCertificateRequest::name].
3788    ///
3789    /// # Example
3790    /// ```ignore,no_run
3791    /// # use google_cloud_appengine_v1::model::GetAuthorizedCertificateRequest;
3792    /// let x = GetAuthorizedCertificateRequest::new().set_name("example");
3793    /// ```
3794    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3795        self.name = v.into();
3796        self
3797    }
3798
3799    /// Sets the value of [view][crate::model::GetAuthorizedCertificateRequest::view].
3800    ///
3801    /// # Example
3802    /// ```ignore,no_run
3803    /// # use google_cloud_appengine_v1::model::GetAuthorizedCertificateRequest;
3804    /// use google_cloud_appengine_v1::model::AuthorizedCertificateView;
3805    /// let x0 = GetAuthorizedCertificateRequest::new().set_view(AuthorizedCertificateView::FullCertificate);
3806    /// ```
3807    pub fn set_view<T: std::convert::Into<crate::model::AuthorizedCertificateView>>(
3808        mut self,
3809        v: T,
3810    ) -> Self {
3811        self.view = v.into();
3812        self
3813    }
3814}
3815
3816impl wkt::message::Message for GetAuthorizedCertificateRequest {
3817    fn typename() -> &'static str {
3818        "type.googleapis.com/google.appengine.v1.GetAuthorizedCertificateRequest"
3819    }
3820}
3821
3822/// Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`.
3823#[derive(Clone, Default, PartialEq)]
3824#[non_exhaustive]
3825pub struct CreateAuthorizedCertificateRequest {
3826    /// Name of the parent `Application` resource. Example: `apps/myapp`.
3827    pub parent: std::string::String,
3828
3829    /// SSL certificate data.
3830    pub certificate: std::option::Option<crate::model::AuthorizedCertificate>,
3831
3832    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3833}
3834
3835impl CreateAuthorizedCertificateRequest {
3836    /// Creates a new default instance.
3837    pub fn new() -> Self {
3838        std::default::Default::default()
3839    }
3840
3841    /// Sets the value of [parent][crate::model::CreateAuthorizedCertificateRequest::parent].
3842    ///
3843    /// # Example
3844    /// ```ignore,no_run
3845    /// # use google_cloud_appengine_v1::model::CreateAuthorizedCertificateRequest;
3846    /// let x = CreateAuthorizedCertificateRequest::new().set_parent("example");
3847    /// ```
3848    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3849        self.parent = v.into();
3850        self
3851    }
3852
3853    /// Sets the value of [certificate][crate::model::CreateAuthorizedCertificateRequest::certificate].
3854    ///
3855    /// # Example
3856    /// ```ignore,no_run
3857    /// # use google_cloud_appengine_v1::model::CreateAuthorizedCertificateRequest;
3858    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3859    /// let x = CreateAuthorizedCertificateRequest::new().set_certificate(AuthorizedCertificate::default()/* use setters */);
3860    /// ```
3861    pub fn set_certificate<T>(mut self, v: T) -> Self
3862    where
3863        T: std::convert::Into<crate::model::AuthorizedCertificate>,
3864    {
3865        self.certificate = std::option::Option::Some(v.into());
3866        self
3867    }
3868
3869    /// Sets or clears the value of [certificate][crate::model::CreateAuthorizedCertificateRequest::certificate].
3870    ///
3871    /// # Example
3872    /// ```ignore,no_run
3873    /// # use google_cloud_appengine_v1::model::CreateAuthorizedCertificateRequest;
3874    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3875    /// let x = CreateAuthorizedCertificateRequest::new().set_or_clear_certificate(Some(AuthorizedCertificate::default()/* use setters */));
3876    /// let x = CreateAuthorizedCertificateRequest::new().set_or_clear_certificate(None::<AuthorizedCertificate>);
3877    /// ```
3878    pub fn set_or_clear_certificate<T>(mut self, v: std::option::Option<T>) -> Self
3879    where
3880        T: std::convert::Into<crate::model::AuthorizedCertificate>,
3881    {
3882        self.certificate = v.map(|x| x.into());
3883        self
3884    }
3885}
3886
3887impl wkt::message::Message for CreateAuthorizedCertificateRequest {
3888    fn typename() -> &'static str {
3889        "type.googleapis.com/google.appengine.v1.CreateAuthorizedCertificateRequest"
3890    }
3891}
3892
3893/// Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`.
3894#[derive(Clone, Default, PartialEq)]
3895#[non_exhaustive]
3896pub struct UpdateAuthorizedCertificateRequest {
3897    /// Name of the resource to update. Example:
3898    /// `apps/myapp/authorizedCertificates/12345`.
3899    pub name: std::string::String,
3900
3901    /// An `AuthorizedCertificate` containing the updated resource. Only fields set
3902    /// in the field mask will be updated.
3903    pub certificate: std::option::Option<crate::model::AuthorizedCertificate>,
3904
3905    /// Standard field mask for the set of fields to be updated. Updates are only
3906    /// supported on the `certificate_raw_data` and `display_name` fields.
3907    pub update_mask: std::option::Option<wkt::FieldMask>,
3908
3909    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3910}
3911
3912impl UpdateAuthorizedCertificateRequest {
3913    /// Creates a new default instance.
3914    pub fn new() -> Self {
3915        std::default::Default::default()
3916    }
3917
3918    /// Sets the value of [name][crate::model::UpdateAuthorizedCertificateRequest::name].
3919    ///
3920    /// # Example
3921    /// ```ignore,no_run
3922    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3923    /// let x = UpdateAuthorizedCertificateRequest::new().set_name("example");
3924    /// ```
3925    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3926        self.name = v.into();
3927        self
3928    }
3929
3930    /// Sets the value of [certificate][crate::model::UpdateAuthorizedCertificateRequest::certificate].
3931    ///
3932    /// # Example
3933    /// ```ignore,no_run
3934    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3935    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3936    /// let x = UpdateAuthorizedCertificateRequest::new().set_certificate(AuthorizedCertificate::default()/* use setters */);
3937    /// ```
3938    pub fn set_certificate<T>(mut self, v: T) -> Self
3939    where
3940        T: std::convert::Into<crate::model::AuthorizedCertificate>,
3941    {
3942        self.certificate = std::option::Option::Some(v.into());
3943        self
3944    }
3945
3946    /// Sets or clears the value of [certificate][crate::model::UpdateAuthorizedCertificateRequest::certificate].
3947    ///
3948    /// # Example
3949    /// ```ignore,no_run
3950    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3951    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3952    /// let x = UpdateAuthorizedCertificateRequest::new().set_or_clear_certificate(Some(AuthorizedCertificate::default()/* use setters */));
3953    /// let x = UpdateAuthorizedCertificateRequest::new().set_or_clear_certificate(None::<AuthorizedCertificate>);
3954    /// ```
3955    pub fn set_or_clear_certificate<T>(mut self, v: std::option::Option<T>) -> Self
3956    where
3957        T: std::convert::Into<crate::model::AuthorizedCertificate>,
3958    {
3959        self.certificate = v.map(|x| x.into());
3960        self
3961    }
3962
3963    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedCertificateRequest::update_mask].
3964    ///
3965    /// # Example
3966    /// ```ignore,no_run
3967    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3968    /// use wkt::FieldMask;
3969    /// let x = UpdateAuthorizedCertificateRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3970    /// ```
3971    pub fn set_update_mask<T>(mut self, v: T) -> Self
3972    where
3973        T: std::convert::Into<wkt::FieldMask>,
3974    {
3975        self.update_mask = std::option::Option::Some(v.into());
3976        self
3977    }
3978
3979    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedCertificateRequest::update_mask].
3980    ///
3981    /// # Example
3982    /// ```ignore,no_run
3983    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3984    /// use wkt::FieldMask;
3985    /// let x = UpdateAuthorizedCertificateRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3986    /// let x = UpdateAuthorizedCertificateRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3987    /// ```
3988    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3989    where
3990        T: std::convert::Into<wkt::FieldMask>,
3991    {
3992        self.update_mask = v.map(|x| x.into());
3993        self
3994    }
3995}
3996
3997impl wkt::message::Message for UpdateAuthorizedCertificateRequest {
3998    fn typename() -> &'static str {
3999        "type.googleapis.com/google.appengine.v1.UpdateAuthorizedCertificateRequest"
4000    }
4001}
4002
4003/// Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`.
4004#[derive(Clone, Default, PartialEq)]
4005#[non_exhaustive]
4006pub struct DeleteAuthorizedCertificateRequest {
4007    /// Name of the resource to delete. Example:
4008    /// `apps/myapp/authorizedCertificates/12345`.
4009    pub name: std::string::String,
4010
4011    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4012}
4013
4014impl DeleteAuthorizedCertificateRequest {
4015    /// Creates a new default instance.
4016    pub fn new() -> Self {
4017        std::default::Default::default()
4018    }
4019
4020    /// Sets the value of [name][crate::model::DeleteAuthorizedCertificateRequest::name].
4021    ///
4022    /// # Example
4023    /// ```ignore,no_run
4024    /// # use google_cloud_appengine_v1::model::DeleteAuthorizedCertificateRequest;
4025    /// let x = DeleteAuthorizedCertificateRequest::new().set_name("example");
4026    /// ```
4027    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4028        self.name = v.into();
4029        self
4030    }
4031}
4032
4033impl wkt::message::Message for DeleteAuthorizedCertificateRequest {
4034    fn typename() -> &'static str {
4035        "type.googleapis.com/google.appengine.v1.DeleteAuthorizedCertificateRequest"
4036    }
4037}
4038
4039/// Request message for `DomainMappings.ListDomainMappings`.
4040#[derive(Clone, Default, PartialEq)]
4041#[non_exhaustive]
4042pub struct ListDomainMappingsRequest {
4043    /// Name of the parent Application resource. Example: `apps/myapp`.
4044    pub parent: std::string::String,
4045
4046    /// Maximum results to return per page.
4047    pub page_size: i32,
4048
4049    /// Continuation token for fetching the next page of results.
4050    pub page_token: std::string::String,
4051
4052    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4053}
4054
4055impl ListDomainMappingsRequest {
4056    /// Creates a new default instance.
4057    pub fn new() -> Self {
4058        std::default::Default::default()
4059    }
4060
4061    /// Sets the value of [parent][crate::model::ListDomainMappingsRequest::parent].
4062    ///
4063    /// # Example
4064    /// ```ignore,no_run
4065    /// # use google_cloud_appengine_v1::model::ListDomainMappingsRequest;
4066    /// let x = ListDomainMappingsRequest::new().set_parent("example");
4067    /// ```
4068    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4069        self.parent = v.into();
4070        self
4071    }
4072
4073    /// Sets the value of [page_size][crate::model::ListDomainMappingsRequest::page_size].
4074    ///
4075    /// # Example
4076    /// ```ignore,no_run
4077    /// # use google_cloud_appengine_v1::model::ListDomainMappingsRequest;
4078    /// let x = ListDomainMappingsRequest::new().set_page_size(42);
4079    /// ```
4080    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4081        self.page_size = v.into();
4082        self
4083    }
4084
4085    /// Sets the value of [page_token][crate::model::ListDomainMappingsRequest::page_token].
4086    ///
4087    /// # Example
4088    /// ```ignore,no_run
4089    /// # use google_cloud_appengine_v1::model::ListDomainMappingsRequest;
4090    /// let x = ListDomainMappingsRequest::new().set_page_token("example");
4091    /// ```
4092    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4093        self.page_token = v.into();
4094        self
4095    }
4096}
4097
4098impl wkt::message::Message for ListDomainMappingsRequest {
4099    fn typename() -> &'static str {
4100        "type.googleapis.com/google.appengine.v1.ListDomainMappingsRequest"
4101    }
4102}
4103
4104/// Response message for `DomainMappings.ListDomainMappings`.
4105#[derive(Clone, Default, PartialEq)]
4106#[non_exhaustive]
4107pub struct ListDomainMappingsResponse {
4108    /// The domain mappings for the application.
4109    pub domain_mappings: std::vec::Vec<crate::model::DomainMapping>,
4110
4111    /// Continuation token for fetching the next page of results.
4112    pub next_page_token: std::string::String,
4113
4114    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4115}
4116
4117impl ListDomainMappingsResponse {
4118    /// Creates a new default instance.
4119    pub fn new() -> Self {
4120        std::default::Default::default()
4121    }
4122
4123    /// Sets the value of [domain_mappings][crate::model::ListDomainMappingsResponse::domain_mappings].
4124    ///
4125    /// # Example
4126    /// ```ignore,no_run
4127    /// # use google_cloud_appengine_v1::model::ListDomainMappingsResponse;
4128    /// use google_cloud_appengine_v1::model::DomainMapping;
4129    /// let x = ListDomainMappingsResponse::new()
4130    ///     .set_domain_mappings([
4131    ///         DomainMapping::default()/* use setters */,
4132    ///         DomainMapping::default()/* use (different) setters */,
4133    ///     ]);
4134    /// ```
4135    pub fn set_domain_mappings<T, V>(mut self, v: T) -> Self
4136    where
4137        T: std::iter::IntoIterator<Item = V>,
4138        V: std::convert::Into<crate::model::DomainMapping>,
4139    {
4140        use std::iter::Iterator;
4141        self.domain_mappings = v.into_iter().map(|i| i.into()).collect();
4142        self
4143    }
4144
4145    /// Sets the value of [next_page_token][crate::model::ListDomainMappingsResponse::next_page_token].
4146    ///
4147    /// # Example
4148    /// ```ignore,no_run
4149    /// # use google_cloud_appengine_v1::model::ListDomainMappingsResponse;
4150    /// let x = ListDomainMappingsResponse::new().set_next_page_token("example");
4151    /// ```
4152    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4153        self.next_page_token = v.into();
4154        self
4155    }
4156}
4157
4158impl wkt::message::Message for ListDomainMappingsResponse {
4159    fn typename() -> &'static str {
4160        "type.googleapis.com/google.appengine.v1.ListDomainMappingsResponse"
4161    }
4162}
4163
4164#[doc(hidden)]
4165impl google_cloud_gax::paginator::internal::PageableResponse for ListDomainMappingsResponse {
4166    type PageItem = crate::model::DomainMapping;
4167
4168    fn items(self) -> std::vec::Vec<Self::PageItem> {
4169        self.domain_mappings
4170    }
4171
4172    fn next_page_token(&self) -> std::string::String {
4173        use std::clone::Clone;
4174        self.next_page_token.clone()
4175    }
4176}
4177
4178/// Request message for `DomainMappings.GetDomainMapping`.
4179#[derive(Clone, Default, PartialEq)]
4180#[non_exhaustive]
4181pub struct GetDomainMappingRequest {
4182    /// Name of the resource requested. Example:
4183    /// `apps/myapp/domainMappings/example.com`.
4184    pub name: std::string::String,
4185
4186    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4187}
4188
4189impl GetDomainMappingRequest {
4190    /// Creates a new default instance.
4191    pub fn new() -> Self {
4192        std::default::Default::default()
4193    }
4194
4195    /// Sets the value of [name][crate::model::GetDomainMappingRequest::name].
4196    ///
4197    /// # Example
4198    /// ```ignore,no_run
4199    /// # use google_cloud_appengine_v1::model::GetDomainMappingRequest;
4200    /// let x = GetDomainMappingRequest::new().set_name("example");
4201    /// ```
4202    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4203        self.name = v.into();
4204        self
4205    }
4206}
4207
4208impl wkt::message::Message for GetDomainMappingRequest {
4209    fn typename() -> &'static str {
4210        "type.googleapis.com/google.appengine.v1.GetDomainMappingRequest"
4211    }
4212}
4213
4214/// Request message for `DomainMappings.CreateDomainMapping`.
4215#[derive(Clone, Default, PartialEq)]
4216#[non_exhaustive]
4217pub struct CreateDomainMappingRequest {
4218    /// Name of the parent Application resource. Example: `apps/myapp`.
4219    pub parent: std::string::String,
4220
4221    /// Domain mapping configuration.
4222    pub domain_mapping: std::option::Option<crate::model::DomainMapping>,
4223
4224    /// Whether the domain creation should override any existing mappings for this
4225    /// domain. By default, overrides are rejected.
4226    pub override_strategy: crate::model::DomainOverrideStrategy,
4227
4228    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4229}
4230
4231impl CreateDomainMappingRequest {
4232    /// Creates a new default instance.
4233    pub fn new() -> Self {
4234        std::default::Default::default()
4235    }
4236
4237    /// Sets the value of [parent][crate::model::CreateDomainMappingRequest::parent].
4238    ///
4239    /// # Example
4240    /// ```ignore,no_run
4241    /// # use google_cloud_appengine_v1::model::CreateDomainMappingRequest;
4242    /// let x = CreateDomainMappingRequest::new().set_parent("example");
4243    /// ```
4244    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4245        self.parent = v.into();
4246        self
4247    }
4248
4249    /// Sets the value of [domain_mapping][crate::model::CreateDomainMappingRequest::domain_mapping].
4250    ///
4251    /// # Example
4252    /// ```ignore,no_run
4253    /// # use google_cloud_appengine_v1::model::CreateDomainMappingRequest;
4254    /// use google_cloud_appengine_v1::model::DomainMapping;
4255    /// let x = CreateDomainMappingRequest::new().set_domain_mapping(DomainMapping::default()/* use setters */);
4256    /// ```
4257    pub fn set_domain_mapping<T>(mut self, v: T) -> Self
4258    where
4259        T: std::convert::Into<crate::model::DomainMapping>,
4260    {
4261        self.domain_mapping = std::option::Option::Some(v.into());
4262        self
4263    }
4264
4265    /// Sets or clears the value of [domain_mapping][crate::model::CreateDomainMappingRequest::domain_mapping].
4266    ///
4267    /// # Example
4268    /// ```ignore,no_run
4269    /// # use google_cloud_appengine_v1::model::CreateDomainMappingRequest;
4270    /// use google_cloud_appengine_v1::model::DomainMapping;
4271    /// let x = CreateDomainMappingRequest::new().set_or_clear_domain_mapping(Some(DomainMapping::default()/* use setters */));
4272    /// let x = CreateDomainMappingRequest::new().set_or_clear_domain_mapping(None::<DomainMapping>);
4273    /// ```
4274    pub fn set_or_clear_domain_mapping<T>(mut self, v: std::option::Option<T>) -> Self
4275    where
4276        T: std::convert::Into<crate::model::DomainMapping>,
4277    {
4278        self.domain_mapping = v.map(|x| x.into());
4279        self
4280    }
4281
4282    /// Sets the value of [override_strategy][crate::model::CreateDomainMappingRequest::override_strategy].
4283    ///
4284    /// # Example
4285    /// ```ignore,no_run
4286    /// # use google_cloud_appengine_v1::model::CreateDomainMappingRequest;
4287    /// use google_cloud_appengine_v1::model::DomainOverrideStrategy;
4288    /// let x0 = CreateDomainMappingRequest::new().set_override_strategy(DomainOverrideStrategy::Strict);
4289    /// let x1 = CreateDomainMappingRequest::new().set_override_strategy(DomainOverrideStrategy::Override);
4290    /// ```
4291    pub fn set_override_strategy<T: std::convert::Into<crate::model::DomainOverrideStrategy>>(
4292        mut self,
4293        v: T,
4294    ) -> Self {
4295        self.override_strategy = v.into();
4296        self
4297    }
4298}
4299
4300impl wkt::message::Message for CreateDomainMappingRequest {
4301    fn typename() -> &'static str {
4302        "type.googleapis.com/google.appengine.v1.CreateDomainMappingRequest"
4303    }
4304}
4305
4306/// Request message for `DomainMappings.UpdateDomainMapping`.
4307#[derive(Clone, Default, PartialEq)]
4308#[non_exhaustive]
4309pub struct UpdateDomainMappingRequest {
4310    /// Name of the resource to update. Example:
4311    /// `apps/myapp/domainMappings/example.com`.
4312    pub name: std::string::String,
4313
4314    /// A domain mapping containing the updated resource. Only fields set
4315    /// in the field mask will be updated.
4316    pub domain_mapping: std::option::Option<crate::model::DomainMapping>,
4317
4318    /// Required. Standard field mask for the set of fields to be updated.
4319    pub update_mask: std::option::Option<wkt::FieldMask>,
4320
4321    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4322}
4323
4324impl UpdateDomainMappingRequest {
4325    /// Creates a new default instance.
4326    pub fn new() -> Self {
4327        std::default::Default::default()
4328    }
4329
4330    /// Sets the value of [name][crate::model::UpdateDomainMappingRequest::name].
4331    ///
4332    /// # Example
4333    /// ```ignore,no_run
4334    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4335    /// let x = UpdateDomainMappingRequest::new().set_name("example");
4336    /// ```
4337    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4338        self.name = v.into();
4339        self
4340    }
4341
4342    /// Sets the value of [domain_mapping][crate::model::UpdateDomainMappingRequest::domain_mapping].
4343    ///
4344    /// # Example
4345    /// ```ignore,no_run
4346    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4347    /// use google_cloud_appengine_v1::model::DomainMapping;
4348    /// let x = UpdateDomainMappingRequest::new().set_domain_mapping(DomainMapping::default()/* use setters */);
4349    /// ```
4350    pub fn set_domain_mapping<T>(mut self, v: T) -> Self
4351    where
4352        T: std::convert::Into<crate::model::DomainMapping>,
4353    {
4354        self.domain_mapping = std::option::Option::Some(v.into());
4355        self
4356    }
4357
4358    /// Sets or clears the value of [domain_mapping][crate::model::UpdateDomainMappingRequest::domain_mapping].
4359    ///
4360    /// # Example
4361    /// ```ignore,no_run
4362    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4363    /// use google_cloud_appengine_v1::model::DomainMapping;
4364    /// let x = UpdateDomainMappingRequest::new().set_or_clear_domain_mapping(Some(DomainMapping::default()/* use setters */));
4365    /// let x = UpdateDomainMappingRequest::new().set_or_clear_domain_mapping(None::<DomainMapping>);
4366    /// ```
4367    pub fn set_or_clear_domain_mapping<T>(mut self, v: std::option::Option<T>) -> Self
4368    where
4369        T: std::convert::Into<crate::model::DomainMapping>,
4370    {
4371        self.domain_mapping = v.map(|x| x.into());
4372        self
4373    }
4374
4375    /// Sets the value of [update_mask][crate::model::UpdateDomainMappingRequest::update_mask].
4376    ///
4377    /// # Example
4378    /// ```ignore,no_run
4379    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4380    /// use wkt::FieldMask;
4381    /// let x = UpdateDomainMappingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4382    /// ```
4383    pub fn set_update_mask<T>(mut self, v: T) -> Self
4384    where
4385        T: std::convert::Into<wkt::FieldMask>,
4386    {
4387        self.update_mask = std::option::Option::Some(v.into());
4388        self
4389    }
4390
4391    /// Sets or clears the value of [update_mask][crate::model::UpdateDomainMappingRequest::update_mask].
4392    ///
4393    /// # Example
4394    /// ```ignore,no_run
4395    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4396    /// use wkt::FieldMask;
4397    /// let x = UpdateDomainMappingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4398    /// let x = UpdateDomainMappingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4399    /// ```
4400    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4401    where
4402        T: std::convert::Into<wkt::FieldMask>,
4403    {
4404        self.update_mask = v.map(|x| x.into());
4405        self
4406    }
4407}
4408
4409impl wkt::message::Message for UpdateDomainMappingRequest {
4410    fn typename() -> &'static str {
4411        "type.googleapis.com/google.appengine.v1.UpdateDomainMappingRequest"
4412    }
4413}
4414
4415/// Request message for `DomainMappings.DeleteDomainMapping`.
4416#[derive(Clone, Default, PartialEq)]
4417#[non_exhaustive]
4418pub struct DeleteDomainMappingRequest {
4419    /// Name of the resource to delete. Example:
4420    /// `apps/myapp/domainMappings/example.com`.
4421    pub name: std::string::String,
4422
4423    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4424}
4425
4426impl DeleteDomainMappingRequest {
4427    /// Creates a new default instance.
4428    pub fn new() -> Self {
4429        std::default::Default::default()
4430    }
4431
4432    /// Sets the value of [name][crate::model::DeleteDomainMappingRequest::name].
4433    ///
4434    /// # Example
4435    /// ```ignore,no_run
4436    /// # use google_cloud_appengine_v1::model::DeleteDomainMappingRequest;
4437    /// let x = DeleteDomainMappingRequest::new().set_name("example");
4438    /// ```
4439    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4440        self.name = v.into();
4441        self
4442    }
4443}
4444
4445impl wkt::message::Message for DeleteDomainMappingRequest {
4446    fn typename() -> &'static str {
4447        "type.googleapis.com/google.appengine.v1.DeleteDomainMappingRequest"
4448    }
4449}
4450
4451/// An Application resource contains the top-level configuration of an App
4452/// Engine application.
4453#[derive(Clone, Default, PartialEq)]
4454#[non_exhaustive]
4455pub struct Application {
4456    /// Full path to the Application resource in the API.
4457    /// Example: `apps/myapp`.
4458    ///
4459    /// @OutputOnly
4460    pub name: std::string::String,
4461
4462    /// Identifier of the Application resource. This identifier is equivalent
4463    /// to the project ID of the Google Cloud Platform project where you want to
4464    /// deploy your application.
4465    /// Example: `myapp`.
4466    pub id: std::string::String,
4467
4468    /// HTTP path dispatch rules for requests to the application that do not
4469    /// explicitly target a service or version. Rules are order-dependent.
4470    /// Up to 20 dispatch rules can be supported.
4471    pub dispatch_rules: std::vec::Vec<crate::model::UrlDispatchRule>,
4472
4473    /// Google Apps authentication domain that controls which users can access
4474    /// this application.
4475    ///
4476    /// Defaults to open access for any Google Account.
4477    pub auth_domain: std::string::String,
4478
4479    /// Location from which this application runs. Application instances
4480    /// run out of the data centers in the specified location, which is also where
4481    /// all of the application's end user content is stored.
4482    ///
4483    /// Defaults to `us-central`.
4484    ///
4485    /// View the list of
4486    /// [supported locations](https://cloud.google.com/appengine/docs/locations).
4487    pub location_id: std::string::String,
4488
4489    /// Google Cloud Storage bucket that can be used for storing files
4490    /// associated with this application. This bucket is associated with the
4491    /// application and can be used by the gcloud deployment commands.
4492    ///
4493    /// @OutputOnly
4494    pub code_bucket: std::string::String,
4495
4496    /// Cookie expiration policy for this application.
4497    pub default_cookie_expiration: std::option::Option<wkt::Duration>,
4498
4499    /// Serving status of this application.
4500    pub serving_status: crate::model::application::ServingStatus,
4501
4502    /// Hostname used to reach this application, as resolved by App Engine.
4503    ///
4504    /// @OutputOnly
4505    pub default_hostname: std::string::String,
4506
4507    /// Google Cloud Storage bucket that can be used by this application to store
4508    /// content.
4509    ///
4510    /// @OutputOnly
4511    pub default_bucket: std::string::String,
4512
4513    /// The service account associated with the application.
4514    /// This is the app-level default identity. If no identity provided during
4515    /// create version, Admin API will fallback to this one.
4516    pub service_account: std::string::String,
4517
4518    #[allow(missing_docs)]
4519    pub iap: std::option::Option<crate::model::application::IdentityAwareProxy>,
4520
4521    /// The Google Container Registry domain used for storing managed build docker
4522    /// images for this application.
4523    pub gcr_domain: std::string::String,
4524
4525    /// The type of the Cloud Firestore or Cloud Datastore database associated with
4526    /// this application.
4527    pub database_type: crate::model::application::DatabaseType,
4528
4529    /// The feature specific settings to be used in the application.
4530    pub feature_settings: std::option::Option<crate::model::application::FeatureSettings>,
4531
4532    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4533}
4534
4535impl Application {
4536    /// Creates a new default instance.
4537    pub fn new() -> Self {
4538        std::default::Default::default()
4539    }
4540
4541    /// Sets the value of [name][crate::model::Application::name].
4542    ///
4543    /// # Example
4544    /// ```ignore,no_run
4545    /// # use google_cloud_appengine_v1::model::Application;
4546    /// let x = Application::new().set_name("example");
4547    /// ```
4548    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4549        self.name = v.into();
4550        self
4551    }
4552
4553    /// Sets the value of [id][crate::model::Application::id].
4554    ///
4555    /// # Example
4556    /// ```ignore,no_run
4557    /// # use google_cloud_appengine_v1::model::Application;
4558    /// let x = Application::new().set_id("example");
4559    /// ```
4560    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4561        self.id = v.into();
4562        self
4563    }
4564
4565    /// Sets the value of [dispatch_rules][crate::model::Application::dispatch_rules].
4566    ///
4567    /// # Example
4568    /// ```ignore,no_run
4569    /// # use google_cloud_appengine_v1::model::Application;
4570    /// use google_cloud_appengine_v1::model::UrlDispatchRule;
4571    /// let x = Application::new()
4572    ///     .set_dispatch_rules([
4573    ///         UrlDispatchRule::default()/* use setters */,
4574    ///         UrlDispatchRule::default()/* use (different) setters */,
4575    ///     ]);
4576    /// ```
4577    pub fn set_dispatch_rules<T, V>(mut self, v: T) -> Self
4578    where
4579        T: std::iter::IntoIterator<Item = V>,
4580        V: std::convert::Into<crate::model::UrlDispatchRule>,
4581    {
4582        use std::iter::Iterator;
4583        self.dispatch_rules = v.into_iter().map(|i| i.into()).collect();
4584        self
4585    }
4586
4587    /// Sets the value of [auth_domain][crate::model::Application::auth_domain].
4588    ///
4589    /// # Example
4590    /// ```ignore,no_run
4591    /// # use google_cloud_appengine_v1::model::Application;
4592    /// let x = Application::new().set_auth_domain("example");
4593    /// ```
4594    pub fn set_auth_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4595        self.auth_domain = v.into();
4596        self
4597    }
4598
4599    /// Sets the value of [location_id][crate::model::Application::location_id].
4600    ///
4601    /// # Example
4602    /// ```ignore,no_run
4603    /// # use google_cloud_appengine_v1::model::Application;
4604    /// let x = Application::new().set_location_id("example");
4605    /// ```
4606    pub fn set_location_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4607        self.location_id = v.into();
4608        self
4609    }
4610
4611    /// Sets the value of [code_bucket][crate::model::Application::code_bucket].
4612    ///
4613    /// # Example
4614    /// ```ignore,no_run
4615    /// # use google_cloud_appengine_v1::model::Application;
4616    /// let x = Application::new().set_code_bucket("example");
4617    /// ```
4618    pub fn set_code_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4619        self.code_bucket = v.into();
4620        self
4621    }
4622
4623    /// Sets the value of [default_cookie_expiration][crate::model::Application::default_cookie_expiration].
4624    ///
4625    /// # Example
4626    /// ```ignore,no_run
4627    /// # use google_cloud_appengine_v1::model::Application;
4628    /// use wkt::Duration;
4629    /// let x = Application::new().set_default_cookie_expiration(Duration::default()/* use setters */);
4630    /// ```
4631    pub fn set_default_cookie_expiration<T>(mut self, v: T) -> Self
4632    where
4633        T: std::convert::Into<wkt::Duration>,
4634    {
4635        self.default_cookie_expiration = std::option::Option::Some(v.into());
4636        self
4637    }
4638
4639    /// Sets or clears the value of [default_cookie_expiration][crate::model::Application::default_cookie_expiration].
4640    ///
4641    /// # Example
4642    /// ```ignore,no_run
4643    /// # use google_cloud_appengine_v1::model::Application;
4644    /// use wkt::Duration;
4645    /// let x = Application::new().set_or_clear_default_cookie_expiration(Some(Duration::default()/* use setters */));
4646    /// let x = Application::new().set_or_clear_default_cookie_expiration(None::<Duration>);
4647    /// ```
4648    pub fn set_or_clear_default_cookie_expiration<T>(mut self, v: std::option::Option<T>) -> Self
4649    where
4650        T: std::convert::Into<wkt::Duration>,
4651    {
4652        self.default_cookie_expiration = v.map(|x| x.into());
4653        self
4654    }
4655
4656    /// Sets the value of [serving_status][crate::model::Application::serving_status].
4657    ///
4658    /// # Example
4659    /// ```ignore,no_run
4660    /// # use google_cloud_appengine_v1::model::Application;
4661    /// use google_cloud_appengine_v1::model::application::ServingStatus;
4662    /// let x0 = Application::new().set_serving_status(ServingStatus::Serving);
4663    /// let x1 = Application::new().set_serving_status(ServingStatus::UserDisabled);
4664    /// let x2 = Application::new().set_serving_status(ServingStatus::SystemDisabled);
4665    /// ```
4666    pub fn set_serving_status<T: std::convert::Into<crate::model::application::ServingStatus>>(
4667        mut self,
4668        v: T,
4669    ) -> Self {
4670        self.serving_status = v.into();
4671        self
4672    }
4673
4674    /// Sets the value of [default_hostname][crate::model::Application::default_hostname].
4675    ///
4676    /// # Example
4677    /// ```ignore,no_run
4678    /// # use google_cloud_appengine_v1::model::Application;
4679    /// let x = Application::new().set_default_hostname("example");
4680    /// ```
4681    pub fn set_default_hostname<T: std::convert::Into<std::string::String>>(
4682        mut self,
4683        v: T,
4684    ) -> Self {
4685        self.default_hostname = v.into();
4686        self
4687    }
4688
4689    /// Sets the value of [default_bucket][crate::model::Application::default_bucket].
4690    ///
4691    /// # Example
4692    /// ```ignore,no_run
4693    /// # use google_cloud_appengine_v1::model::Application;
4694    /// let x = Application::new().set_default_bucket("example");
4695    /// ```
4696    pub fn set_default_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4697        self.default_bucket = v.into();
4698        self
4699    }
4700
4701    /// Sets the value of [service_account][crate::model::Application::service_account].
4702    ///
4703    /// # Example
4704    /// ```ignore,no_run
4705    /// # use google_cloud_appengine_v1::model::Application;
4706    /// let x = Application::new().set_service_account("example");
4707    /// ```
4708    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4709        self.service_account = v.into();
4710        self
4711    }
4712
4713    /// Sets the value of [iap][crate::model::Application::iap].
4714    ///
4715    /// # Example
4716    /// ```ignore,no_run
4717    /// # use google_cloud_appengine_v1::model::Application;
4718    /// use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4719    /// let x = Application::new().set_iap(IdentityAwareProxy::default()/* use setters */);
4720    /// ```
4721    pub fn set_iap<T>(mut self, v: T) -> Self
4722    where
4723        T: std::convert::Into<crate::model::application::IdentityAwareProxy>,
4724    {
4725        self.iap = std::option::Option::Some(v.into());
4726        self
4727    }
4728
4729    /// Sets or clears the value of [iap][crate::model::Application::iap].
4730    ///
4731    /// # Example
4732    /// ```ignore,no_run
4733    /// # use google_cloud_appengine_v1::model::Application;
4734    /// use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4735    /// let x = Application::new().set_or_clear_iap(Some(IdentityAwareProxy::default()/* use setters */));
4736    /// let x = Application::new().set_or_clear_iap(None::<IdentityAwareProxy>);
4737    /// ```
4738    pub fn set_or_clear_iap<T>(mut self, v: std::option::Option<T>) -> Self
4739    where
4740        T: std::convert::Into<crate::model::application::IdentityAwareProxy>,
4741    {
4742        self.iap = v.map(|x| x.into());
4743        self
4744    }
4745
4746    /// Sets the value of [gcr_domain][crate::model::Application::gcr_domain].
4747    ///
4748    /// # Example
4749    /// ```ignore,no_run
4750    /// # use google_cloud_appengine_v1::model::Application;
4751    /// let x = Application::new().set_gcr_domain("example");
4752    /// ```
4753    pub fn set_gcr_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4754        self.gcr_domain = v.into();
4755        self
4756    }
4757
4758    /// Sets the value of [database_type][crate::model::Application::database_type].
4759    ///
4760    /// # Example
4761    /// ```ignore,no_run
4762    /// # use google_cloud_appengine_v1::model::Application;
4763    /// use google_cloud_appengine_v1::model::application::DatabaseType;
4764    /// let x0 = Application::new().set_database_type(DatabaseType::CloudDatastore);
4765    /// let x1 = Application::new().set_database_type(DatabaseType::CloudFirestore);
4766    /// let x2 = Application::new().set_database_type(DatabaseType::CloudDatastoreCompatibility);
4767    /// ```
4768    pub fn set_database_type<T: std::convert::Into<crate::model::application::DatabaseType>>(
4769        mut self,
4770        v: T,
4771    ) -> Self {
4772        self.database_type = v.into();
4773        self
4774    }
4775
4776    /// Sets the value of [feature_settings][crate::model::Application::feature_settings].
4777    ///
4778    /// # Example
4779    /// ```ignore,no_run
4780    /// # use google_cloud_appengine_v1::model::Application;
4781    /// use google_cloud_appengine_v1::model::application::FeatureSettings;
4782    /// let x = Application::new().set_feature_settings(FeatureSettings::default()/* use setters */);
4783    /// ```
4784    pub fn set_feature_settings<T>(mut self, v: T) -> Self
4785    where
4786        T: std::convert::Into<crate::model::application::FeatureSettings>,
4787    {
4788        self.feature_settings = std::option::Option::Some(v.into());
4789        self
4790    }
4791
4792    /// Sets or clears the value of [feature_settings][crate::model::Application::feature_settings].
4793    ///
4794    /// # Example
4795    /// ```ignore,no_run
4796    /// # use google_cloud_appengine_v1::model::Application;
4797    /// use google_cloud_appengine_v1::model::application::FeatureSettings;
4798    /// let x = Application::new().set_or_clear_feature_settings(Some(FeatureSettings::default()/* use setters */));
4799    /// let x = Application::new().set_or_clear_feature_settings(None::<FeatureSettings>);
4800    /// ```
4801    pub fn set_or_clear_feature_settings<T>(mut self, v: std::option::Option<T>) -> Self
4802    where
4803        T: std::convert::Into<crate::model::application::FeatureSettings>,
4804    {
4805        self.feature_settings = v.map(|x| x.into());
4806        self
4807    }
4808}
4809
4810impl wkt::message::Message for Application {
4811    fn typename() -> &'static str {
4812        "type.googleapis.com/google.appengine.v1.Application"
4813    }
4814}
4815
4816/// Defines additional types related to [Application].
4817pub mod application {
4818    #[allow(unused_imports)]
4819    use super::*;
4820
4821    /// Identity-Aware Proxy
4822    #[derive(Clone, Default, PartialEq)]
4823    #[non_exhaustive]
4824    pub struct IdentityAwareProxy {
4825        /// Whether the serving infrastructure will authenticate and
4826        /// authorize all incoming requests.
4827        ///
4828        /// If true, the `oauth2_client_id` and `oauth2_client_secret`
4829        /// fields must be non-empty.
4830        pub enabled: bool,
4831
4832        /// OAuth2 client ID to use for the authentication flow.
4833        pub oauth2_client_id: std::string::String,
4834
4835        /// OAuth2 client secret to use for the authentication flow.
4836        ///
4837        /// For security reasons, this value cannot be retrieved via the API.
4838        /// Instead, the SHA-256 hash of the value is returned in the
4839        /// `oauth2_client_secret_sha256` field.
4840        ///
4841        /// @InputOnly
4842        pub oauth2_client_secret: std::string::String,
4843
4844        /// Hex-encoded SHA-256 hash of the client secret.
4845        ///
4846        /// @OutputOnly
4847        pub oauth2_client_secret_sha256: std::string::String,
4848
4849        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4850    }
4851
4852    impl IdentityAwareProxy {
4853        /// Creates a new default instance.
4854        pub fn new() -> Self {
4855            std::default::Default::default()
4856        }
4857
4858        /// Sets the value of [enabled][crate::model::application::IdentityAwareProxy::enabled].
4859        ///
4860        /// # Example
4861        /// ```ignore,no_run
4862        /// # use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4863        /// let x = IdentityAwareProxy::new().set_enabled(true);
4864        /// ```
4865        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4866            self.enabled = v.into();
4867            self
4868        }
4869
4870        /// Sets the value of [oauth2_client_id][crate::model::application::IdentityAwareProxy::oauth2_client_id].
4871        ///
4872        /// # Example
4873        /// ```ignore,no_run
4874        /// # use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4875        /// let x = IdentityAwareProxy::new().set_oauth2_client_id("example");
4876        /// ```
4877        pub fn set_oauth2_client_id<T: std::convert::Into<std::string::String>>(
4878            mut self,
4879            v: T,
4880        ) -> Self {
4881            self.oauth2_client_id = v.into();
4882            self
4883        }
4884
4885        /// Sets the value of [oauth2_client_secret][crate::model::application::IdentityAwareProxy::oauth2_client_secret].
4886        ///
4887        /// # Example
4888        /// ```ignore,no_run
4889        /// # use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4890        /// let x = IdentityAwareProxy::new().set_oauth2_client_secret("example");
4891        /// ```
4892        pub fn set_oauth2_client_secret<T: std::convert::Into<std::string::String>>(
4893            mut self,
4894            v: T,
4895        ) -> Self {
4896            self.oauth2_client_secret = v.into();
4897            self
4898        }
4899
4900        /// Sets the value of [oauth2_client_secret_sha256][crate::model::application::IdentityAwareProxy::oauth2_client_secret_sha256].
4901        ///
4902        /// # Example
4903        /// ```ignore,no_run
4904        /// # use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4905        /// let x = IdentityAwareProxy::new().set_oauth2_client_secret_sha256("example");
4906        /// ```
4907        pub fn set_oauth2_client_secret_sha256<T: std::convert::Into<std::string::String>>(
4908            mut self,
4909            v: T,
4910        ) -> Self {
4911            self.oauth2_client_secret_sha256 = v.into();
4912            self
4913        }
4914    }
4915
4916    impl wkt::message::Message for IdentityAwareProxy {
4917        fn typename() -> &'static str {
4918            "type.googleapis.com/google.appengine.v1.Application.IdentityAwareProxy"
4919        }
4920    }
4921
4922    /// The feature specific settings to be used in the application. These define
4923    /// behaviors that are user configurable.
4924    #[derive(Clone, Default, PartialEq)]
4925    #[non_exhaustive]
4926    pub struct FeatureSettings {
4927        /// Boolean value indicating if split health checks should be used instead
4928        /// of the legacy health checks. At an app.yaml level, this means defaulting
4929        /// to 'readiness_check' and 'liveness_check' values instead of
4930        /// 'health_check' ones. Once the legacy 'health_check' behavior is
4931        /// deprecated, and this value is always true, this setting can
4932        /// be removed.
4933        pub split_health_checks: bool,
4934
4935        /// If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/)
4936        /// base image for VMs, rather than a base Debian image.
4937        pub use_container_optimized_os: bool,
4938
4939        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4940    }
4941
4942    impl FeatureSettings {
4943        /// Creates a new default instance.
4944        pub fn new() -> Self {
4945            std::default::Default::default()
4946        }
4947
4948        /// Sets the value of [split_health_checks][crate::model::application::FeatureSettings::split_health_checks].
4949        ///
4950        /// # Example
4951        /// ```ignore,no_run
4952        /// # use google_cloud_appengine_v1::model::application::FeatureSettings;
4953        /// let x = FeatureSettings::new().set_split_health_checks(true);
4954        /// ```
4955        pub fn set_split_health_checks<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4956            self.split_health_checks = v.into();
4957            self
4958        }
4959
4960        /// Sets the value of [use_container_optimized_os][crate::model::application::FeatureSettings::use_container_optimized_os].
4961        ///
4962        /// # Example
4963        /// ```ignore,no_run
4964        /// # use google_cloud_appengine_v1::model::application::FeatureSettings;
4965        /// let x = FeatureSettings::new().set_use_container_optimized_os(true);
4966        /// ```
4967        pub fn set_use_container_optimized_os<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4968            self.use_container_optimized_os = v.into();
4969            self
4970        }
4971    }
4972
4973    impl wkt::message::Message for FeatureSettings {
4974        fn typename() -> &'static str {
4975            "type.googleapis.com/google.appengine.v1.Application.FeatureSettings"
4976        }
4977    }
4978
4979    /// Enum for [ServingStatus].
4980    ///
4981    /// # Working with unknown values
4982    ///
4983    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4984    /// additional enum variants at any time. Adding new variants is not considered
4985    /// a breaking change. Applications should write their code in anticipation of:
4986    ///
4987    /// - New values appearing in future releases of the client library, **and**
4988    /// - New values received dynamically, without application changes.
4989    ///
4990    /// Please consult the [Working with enums] section in the user guide for some
4991    /// guidelines.
4992    ///
4993    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4994    #[derive(Clone, Debug, PartialEq)]
4995    #[non_exhaustive]
4996    pub enum ServingStatus {
4997        /// Serving status is unspecified.
4998        Unspecified,
4999        /// Application is serving.
5000        Serving,
5001        /// Application has been disabled by the user.
5002        UserDisabled,
5003        /// Application has been disabled by the system.
5004        SystemDisabled,
5005        /// If set, the enum was initialized with an unknown value.
5006        ///
5007        /// Applications can examine the value using [ServingStatus::value] or
5008        /// [ServingStatus::name].
5009        UnknownValue(serving_status::UnknownValue),
5010    }
5011
5012    #[doc(hidden)]
5013    pub mod serving_status {
5014        #[allow(unused_imports)]
5015        use super::*;
5016        #[derive(Clone, Debug, PartialEq)]
5017        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5018    }
5019
5020    impl ServingStatus {
5021        /// Gets the enum value.
5022        ///
5023        /// Returns `None` if the enum contains an unknown value deserialized from
5024        /// the string representation of enums.
5025        pub fn value(&self) -> std::option::Option<i32> {
5026            match self {
5027                Self::Unspecified => std::option::Option::Some(0),
5028                Self::Serving => std::option::Option::Some(1),
5029                Self::UserDisabled => std::option::Option::Some(2),
5030                Self::SystemDisabled => std::option::Option::Some(3),
5031                Self::UnknownValue(u) => u.0.value(),
5032            }
5033        }
5034
5035        /// Gets the enum value as a string.
5036        ///
5037        /// Returns `None` if the enum contains an unknown value deserialized from
5038        /// the integer representation of enums.
5039        pub fn name(&self) -> std::option::Option<&str> {
5040            match self {
5041                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
5042                Self::Serving => std::option::Option::Some("SERVING"),
5043                Self::UserDisabled => std::option::Option::Some("USER_DISABLED"),
5044                Self::SystemDisabled => std::option::Option::Some("SYSTEM_DISABLED"),
5045                Self::UnknownValue(u) => u.0.name(),
5046            }
5047        }
5048    }
5049
5050    impl std::default::Default for ServingStatus {
5051        fn default() -> Self {
5052            use std::convert::From;
5053            Self::from(0)
5054        }
5055    }
5056
5057    impl std::fmt::Display for ServingStatus {
5058        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5059            wkt::internal::display_enum(f, self.name(), self.value())
5060        }
5061    }
5062
5063    impl std::convert::From<i32> for ServingStatus {
5064        fn from(value: i32) -> Self {
5065            match value {
5066                0 => Self::Unspecified,
5067                1 => Self::Serving,
5068                2 => Self::UserDisabled,
5069                3 => Self::SystemDisabled,
5070                _ => Self::UnknownValue(serving_status::UnknownValue(
5071                    wkt::internal::UnknownEnumValue::Integer(value),
5072                )),
5073            }
5074        }
5075    }
5076
5077    impl std::convert::From<&str> for ServingStatus {
5078        fn from(value: &str) -> Self {
5079            use std::string::ToString;
5080            match value {
5081                "UNSPECIFIED" => Self::Unspecified,
5082                "SERVING" => Self::Serving,
5083                "USER_DISABLED" => Self::UserDisabled,
5084                "SYSTEM_DISABLED" => Self::SystemDisabled,
5085                _ => Self::UnknownValue(serving_status::UnknownValue(
5086                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5087                )),
5088            }
5089        }
5090    }
5091
5092    impl serde::ser::Serialize for ServingStatus {
5093        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5094        where
5095            S: serde::Serializer,
5096        {
5097            match self {
5098                Self::Unspecified => serializer.serialize_i32(0),
5099                Self::Serving => serializer.serialize_i32(1),
5100                Self::UserDisabled => serializer.serialize_i32(2),
5101                Self::SystemDisabled => serializer.serialize_i32(3),
5102                Self::UnknownValue(u) => u.0.serialize(serializer),
5103            }
5104        }
5105    }
5106
5107    impl<'de> serde::de::Deserialize<'de> for ServingStatus {
5108        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5109        where
5110            D: serde::Deserializer<'de>,
5111        {
5112            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServingStatus>::new(
5113                ".google.appengine.v1.Application.ServingStatus",
5114            ))
5115        }
5116    }
5117
5118    /// Enum for [DatabaseType].
5119    ///
5120    /// # Working with unknown values
5121    ///
5122    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5123    /// additional enum variants at any time. Adding new variants is not considered
5124    /// a breaking change. Applications should write their code in anticipation of:
5125    ///
5126    /// - New values appearing in future releases of the client library, **and**
5127    /// - New values received dynamically, without application changes.
5128    ///
5129    /// Please consult the [Working with enums] section in the user guide for some
5130    /// guidelines.
5131    ///
5132    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5133    #[derive(Clone, Debug, PartialEq)]
5134    #[non_exhaustive]
5135    pub enum DatabaseType {
5136        /// Database type is unspecified.
5137        Unspecified,
5138        /// Cloud Datastore
5139        CloudDatastore,
5140        /// Cloud Firestore Native
5141        CloudFirestore,
5142        /// Cloud Firestore in Datastore Mode
5143        CloudDatastoreCompatibility,
5144        /// If set, the enum was initialized with an unknown value.
5145        ///
5146        /// Applications can examine the value using [DatabaseType::value] or
5147        /// [DatabaseType::name].
5148        UnknownValue(database_type::UnknownValue),
5149    }
5150
5151    #[doc(hidden)]
5152    pub mod database_type {
5153        #[allow(unused_imports)]
5154        use super::*;
5155        #[derive(Clone, Debug, PartialEq)]
5156        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5157    }
5158
5159    impl DatabaseType {
5160        /// Gets the enum value.
5161        ///
5162        /// Returns `None` if the enum contains an unknown value deserialized from
5163        /// the string representation of enums.
5164        pub fn value(&self) -> std::option::Option<i32> {
5165            match self {
5166                Self::Unspecified => std::option::Option::Some(0),
5167                Self::CloudDatastore => std::option::Option::Some(1),
5168                Self::CloudFirestore => std::option::Option::Some(2),
5169                Self::CloudDatastoreCompatibility => std::option::Option::Some(3),
5170                Self::UnknownValue(u) => u.0.value(),
5171            }
5172        }
5173
5174        /// Gets the enum value as a string.
5175        ///
5176        /// Returns `None` if the enum contains an unknown value deserialized from
5177        /// the integer representation of enums.
5178        pub fn name(&self) -> std::option::Option<&str> {
5179            match self {
5180                Self::Unspecified => std::option::Option::Some("DATABASE_TYPE_UNSPECIFIED"),
5181                Self::CloudDatastore => std::option::Option::Some("CLOUD_DATASTORE"),
5182                Self::CloudFirestore => std::option::Option::Some("CLOUD_FIRESTORE"),
5183                Self::CloudDatastoreCompatibility => {
5184                    std::option::Option::Some("CLOUD_DATASTORE_COMPATIBILITY")
5185                }
5186                Self::UnknownValue(u) => u.0.name(),
5187            }
5188        }
5189    }
5190
5191    impl std::default::Default for DatabaseType {
5192        fn default() -> Self {
5193            use std::convert::From;
5194            Self::from(0)
5195        }
5196    }
5197
5198    impl std::fmt::Display for DatabaseType {
5199        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5200            wkt::internal::display_enum(f, self.name(), self.value())
5201        }
5202    }
5203
5204    impl std::convert::From<i32> for DatabaseType {
5205        fn from(value: i32) -> Self {
5206            match value {
5207                0 => Self::Unspecified,
5208                1 => Self::CloudDatastore,
5209                2 => Self::CloudFirestore,
5210                3 => Self::CloudDatastoreCompatibility,
5211                _ => Self::UnknownValue(database_type::UnknownValue(
5212                    wkt::internal::UnknownEnumValue::Integer(value),
5213                )),
5214            }
5215        }
5216    }
5217
5218    impl std::convert::From<&str> for DatabaseType {
5219        fn from(value: &str) -> Self {
5220            use std::string::ToString;
5221            match value {
5222                "DATABASE_TYPE_UNSPECIFIED" => Self::Unspecified,
5223                "CLOUD_DATASTORE" => Self::CloudDatastore,
5224                "CLOUD_FIRESTORE" => Self::CloudFirestore,
5225                "CLOUD_DATASTORE_COMPATIBILITY" => Self::CloudDatastoreCompatibility,
5226                _ => Self::UnknownValue(database_type::UnknownValue(
5227                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5228                )),
5229            }
5230        }
5231    }
5232
5233    impl serde::ser::Serialize for DatabaseType {
5234        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5235        where
5236            S: serde::Serializer,
5237        {
5238            match self {
5239                Self::Unspecified => serializer.serialize_i32(0),
5240                Self::CloudDatastore => serializer.serialize_i32(1),
5241                Self::CloudFirestore => serializer.serialize_i32(2),
5242                Self::CloudDatastoreCompatibility => serializer.serialize_i32(3),
5243                Self::UnknownValue(u) => u.0.serialize(serializer),
5244            }
5245        }
5246    }
5247
5248    impl<'de> serde::de::Deserialize<'de> for DatabaseType {
5249        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5250        where
5251            D: serde::Deserializer<'de>,
5252        {
5253            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseType>::new(
5254                ".google.appengine.v1.Application.DatabaseType",
5255            ))
5256        }
5257    }
5258}
5259
5260/// Rules to match an HTTP request and dispatch that request to a service.
5261#[derive(Clone, Default, PartialEq)]
5262#[non_exhaustive]
5263pub struct UrlDispatchRule {
5264    /// Domain name to match against. The wildcard "`*`" is supported if
5265    /// specified before a period: "`*.`".
5266    ///
5267    /// Defaults to matching all domains: "`*`".
5268    pub domain: std::string::String,
5269
5270    /// Pathname within the host. Must start with a "`/`". A
5271    /// single "`*`" can be included at the end of the path.
5272    ///
5273    /// The sum of the lengths of the domain and path may not
5274    /// exceed 100 characters.
5275    pub path: std::string::String,
5276
5277    /// Resource ID of a service in this application that should
5278    /// serve the matched request. The service must already
5279    /// exist. Example: `default`.
5280    pub service: std::string::String,
5281
5282    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5283}
5284
5285impl UrlDispatchRule {
5286    /// Creates a new default instance.
5287    pub fn new() -> Self {
5288        std::default::Default::default()
5289    }
5290
5291    /// Sets the value of [domain][crate::model::UrlDispatchRule::domain].
5292    ///
5293    /// # Example
5294    /// ```ignore,no_run
5295    /// # use google_cloud_appengine_v1::model::UrlDispatchRule;
5296    /// let x = UrlDispatchRule::new().set_domain("example");
5297    /// ```
5298    pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5299        self.domain = v.into();
5300        self
5301    }
5302
5303    /// Sets the value of [path][crate::model::UrlDispatchRule::path].
5304    ///
5305    /// # Example
5306    /// ```ignore,no_run
5307    /// # use google_cloud_appengine_v1::model::UrlDispatchRule;
5308    /// let x = UrlDispatchRule::new().set_path("example");
5309    /// ```
5310    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5311        self.path = v.into();
5312        self
5313    }
5314
5315    /// Sets the value of [service][crate::model::UrlDispatchRule::service].
5316    ///
5317    /// # Example
5318    /// ```ignore,no_run
5319    /// # use google_cloud_appengine_v1::model::UrlDispatchRule;
5320    /// let x = UrlDispatchRule::new().set_service("example");
5321    /// ```
5322    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5323        self.service = v.into();
5324        self
5325    }
5326}
5327
5328impl wkt::message::Message for UrlDispatchRule {
5329    fn typename() -> &'static str {
5330        "type.googleapis.com/google.appengine.v1.UrlDispatchRule"
5331    }
5332}
5333
5334/// App Engine admin service audit log.
5335#[derive(Clone, Default, PartialEq)]
5336#[non_exhaustive]
5337pub struct AuditData {
5338    /// Detailed information about methods that require it. Does not include
5339    /// simple Get, List or Delete methods because all significant information
5340    /// (resource name, number of returned elements for List operations) is already
5341    /// included in parent audit log message.
5342    pub method: std::option::Option<crate::model::audit_data::Method>,
5343
5344    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5345}
5346
5347impl AuditData {
5348    /// Creates a new default instance.
5349    pub fn new() -> Self {
5350        std::default::Default::default()
5351    }
5352
5353    /// Sets the value of [method][crate::model::AuditData::method].
5354    ///
5355    /// Note that all the setters affecting `method` are mutually
5356    /// exclusive.
5357    ///
5358    /// # Example
5359    /// ```ignore,no_run
5360    /// # use google_cloud_appengine_v1::model::AuditData;
5361    /// use google_cloud_appengine_v1::model::UpdateServiceMethod;
5362    /// let x = AuditData::new().set_method(Some(
5363    ///     google_cloud_appengine_v1::model::audit_data::Method::UpdateService(UpdateServiceMethod::default().into())));
5364    /// ```
5365    pub fn set_method<
5366        T: std::convert::Into<std::option::Option<crate::model::audit_data::Method>>,
5367    >(
5368        mut self,
5369        v: T,
5370    ) -> Self {
5371        self.method = v.into();
5372        self
5373    }
5374
5375    /// The value of [method][crate::model::AuditData::method]
5376    /// if it holds a `UpdateService`, `None` if the field is not set or
5377    /// holds a different branch.
5378    pub fn update_service(
5379        &self,
5380    ) -> std::option::Option<&std::boxed::Box<crate::model::UpdateServiceMethod>> {
5381        #[allow(unreachable_patterns)]
5382        self.method.as_ref().and_then(|v| match v {
5383            crate::model::audit_data::Method::UpdateService(v) => std::option::Option::Some(v),
5384            _ => std::option::Option::None,
5385        })
5386    }
5387
5388    /// Sets the value of [method][crate::model::AuditData::method]
5389    /// to hold a `UpdateService`.
5390    ///
5391    /// Note that all the setters affecting `method` are
5392    /// mutually exclusive.
5393    ///
5394    /// # Example
5395    /// ```ignore,no_run
5396    /// # use google_cloud_appengine_v1::model::AuditData;
5397    /// use google_cloud_appengine_v1::model::UpdateServiceMethod;
5398    /// let x = AuditData::new().set_update_service(UpdateServiceMethod::default()/* use setters */);
5399    /// assert!(x.update_service().is_some());
5400    /// assert!(x.create_version().is_none());
5401    /// ```
5402    pub fn set_update_service<
5403        T: std::convert::Into<std::boxed::Box<crate::model::UpdateServiceMethod>>,
5404    >(
5405        mut self,
5406        v: T,
5407    ) -> Self {
5408        self.method =
5409            std::option::Option::Some(crate::model::audit_data::Method::UpdateService(v.into()));
5410        self
5411    }
5412
5413    /// The value of [method][crate::model::AuditData::method]
5414    /// if it holds a `CreateVersion`, `None` if the field is not set or
5415    /// holds a different branch.
5416    pub fn create_version(
5417        &self,
5418    ) -> std::option::Option<&std::boxed::Box<crate::model::CreateVersionMethod>> {
5419        #[allow(unreachable_patterns)]
5420        self.method.as_ref().and_then(|v| match v {
5421            crate::model::audit_data::Method::CreateVersion(v) => std::option::Option::Some(v),
5422            _ => std::option::Option::None,
5423        })
5424    }
5425
5426    /// Sets the value of [method][crate::model::AuditData::method]
5427    /// to hold a `CreateVersion`.
5428    ///
5429    /// Note that all the setters affecting `method` are
5430    /// mutually exclusive.
5431    ///
5432    /// # Example
5433    /// ```ignore,no_run
5434    /// # use google_cloud_appengine_v1::model::AuditData;
5435    /// use google_cloud_appengine_v1::model::CreateVersionMethod;
5436    /// let x = AuditData::new().set_create_version(CreateVersionMethod::default()/* use setters */);
5437    /// assert!(x.create_version().is_some());
5438    /// assert!(x.update_service().is_none());
5439    /// ```
5440    pub fn set_create_version<
5441        T: std::convert::Into<std::boxed::Box<crate::model::CreateVersionMethod>>,
5442    >(
5443        mut self,
5444        v: T,
5445    ) -> Self {
5446        self.method =
5447            std::option::Option::Some(crate::model::audit_data::Method::CreateVersion(v.into()));
5448        self
5449    }
5450}
5451
5452impl wkt::message::Message for AuditData {
5453    fn typename() -> &'static str {
5454        "type.googleapis.com/google.appengine.v1.AuditData"
5455    }
5456}
5457
5458/// Defines additional types related to [AuditData].
5459pub mod audit_data {
5460    #[allow(unused_imports)]
5461    use super::*;
5462
5463    /// Detailed information about methods that require it. Does not include
5464    /// simple Get, List or Delete methods because all significant information
5465    /// (resource name, number of returned elements for List operations) is already
5466    /// included in parent audit log message.
5467    #[derive(Clone, Debug, PartialEq)]
5468    #[non_exhaustive]
5469    pub enum Method {
5470        /// Detailed information about UpdateService call.
5471        UpdateService(std::boxed::Box<crate::model::UpdateServiceMethod>),
5472        /// Detailed information about CreateVersion call.
5473        CreateVersion(std::boxed::Box<crate::model::CreateVersionMethod>),
5474    }
5475}
5476
5477/// Detailed information about UpdateService call.
5478#[derive(Clone, Default, PartialEq)]
5479#[non_exhaustive]
5480pub struct UpdateServiceMethod {
5481    /// Update service request.
5482    pub request: std::option::Option<crate::model::UpdateServiceRequest>,
5483
5484    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5485}
5486
5487impl UpdateServiceMethod {
5488    /// Creates a new default instance.
5489    pub fn new() -> Self {
5490        std::default::Default::default()
5491    }
5492
5493    /// Sets the value of [request][crate::model::UpdateServiceMethod::request].
5494    ///
5495    /// # Example
5496    /// ```ignore,no_run
5497    /// # use google_cloud_appengine_v1::model::UpdateServiceMethod;
5498    /// use google_cloud_appengine_v1::model::UpdateServiceRequest;
5499    /// let x = UpdateServiceMethod::new().set_request(UpdateServiceRequest::default()/* use setters */);
5500    /// ```
5501    pub fn set_request<T>(mut self, v: T) -> Self
5502    where
5503        T: std::convert::Into<crate::model::UpdateServiceRequest>,
5504    {
5505        self.request = std::option::Option::Some(v.into());
5506        self
5507    }
5508
5509    /// Sets or clears the value of [request][crate::model::UpdateServiceMethod::request].
5510    ///
5511    /// # Example
5512    /// ```ignore,no_run
5513    /// # use google_cloud_appengine_v1::model::UpdateServiceMethod;
5514    /// use google_cloud_appengine_v1::model::UpdateServiceRequest;
5515    /// let x = UpdateServiceMethod::new().set_or_clear_request(Some(UpdateServiceRequest::default()/* use setters */));
5516    /// let x = UpdateServiceMethod::new().set_or_clear_request(None::<UpdateServiceRequest>);
5517    /// ```
5518    pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
5519    where
5520        T: std::convert::Into<crate::model::UpdateServiceRequest>,
5521    {
5522        self.request = v.map(|x| x.into());
5523        self
5524    }
5525}
5526
5527impl wkt::message::Message for UpdateServiceMethod {
5528    fn typename() -> &'static str {
5529        "type.googleapis.com/google.appengine.v1.UpdateServiceMethod"
5530    }
5531}
5532
5533/// Detailed information about CreateVersion call.
5534#[derive(Clone, Default, PartialEq)]
5535#[non_exhaustive]
5536pub struct CreateVersionMethod {
5537    /// Create version request.
5538    pub request: std::option::Option<crate::model::CreateVersionRequest>,
5539
5540    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5541}
5542
5543impl CreateVersionMethod {
5544    /// Creates a new default instance.
5545    pub fn new() -> Self {
5546        std::default::Default::default()
5547    }
5548
5549    /// Sets the value of [request][crate::model::CreateVersionMethod::request].
5550    ///
5551    /// # Example
5552    /// ```ignore,no_run
5553    /// # use google_cloud_appengine_v1::model::CreateVersionMethod;
5554    /// use google_cloud_appengine_v1::model::CreateVersionRequest;
5555    /// let x = CreateVersionMethod::new().set_request(CreateVersionRequest::default()/* use setters */);
5556    /// ```
5557    pub fn set_request<T>(mut self, v: T) -> Self
5558    where
5559        T: std::convert::Into<crate::model::CreateVersionRequest>,
5560    {
5561        self.request = std::option::Option::Some(v.into());
5562        self
5563    }
5564
5565    /// Sets or clears the value of [request][crate::model::CreateVersionMethod::request].
5566    ///
5567    /// # Example
5568    /// ```ignore,no_run
5569    /// # use google_cloud_appengine_v1::model::CreateVersionMethod;
5570    /// use google_cloud_appengine_v1::model::CreateVersionRequest;
5571    /// let x = CreateVersionMethod::new().set_or_clear_request(Some(CreateVersionRequest::default()/* use setters */));
5572    /// let x = CreateVersionMethod::new().set_or_clear_request(None::<CreateVersionRequest>);
5573    /// ```
5574    pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
5575    where
5576        T: std::convert::Into<crate::model::CreateVersionRequest>,
5577    {
5578        self.request = v.map(|x| x.into());
5579        self
5580    }
5581}
5582
5583impl wkt::message::Message for CreateVersionMethod {
5584    fn typename() -> &'static str {
5585        "type.googleapis.com/google.appengine.v1.CreateVersionMethod"
5586    }
5587}
5588
5589/// An SSL certificate that a user has been authorized to administer. A user
5590/// is authorized to administer any certificate that applies to one of their
5591/// authorized domains.
5592#[derive(Clone, Default, PartialEq)]
5593#[non_exhaustive]
5594pub struct AuthorizedCertificate {
5595    /// Full path to the `AuthorizedCertificate` resource in the API. Example:
5596    /// `apps/myapp/authorizedCertificates/12345`.
5597    ///
5598    /// @OutputOnly
5599    pub name: std::string::String,
5600
5601    /// Relative name of the certificate. This is a unique value autogenerated
5602    /// on `AuthorizedCertificate` resource creation. Example: `12345`.
5603    ///
5604    /// @OutputOnly
5605    pub id: std::string::String,
5606
5607    /// The user-specified display name of the certificate. This is not
5608    /// guaranteed to be unique. Example: `My Certificate`.
5609    pub display_name: std::string::String,
5610
5611    /// Topmost applicable domains of this certificate. This certificate
5612    /// applies to these domains and their subdomains. Example: `example.com`.
5613    ///
5614    /// @OutputOnly
5615    pub domain_names: std::vec::Vec<std::string::String>,
5616
5617    /// The time when this certificate expires. To update the renewal time on this
5618    /// certificate, upload an SSL certificate with a different expiration time
5619    /// using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
5620    ///
5621    /// @OutputOnly
5622    pub expire_time: std::option::Option<wkt::Timestamp>,
5623
5624    /// The SSL certificate serving the `AuthorizedCertificate` resource. This
5625    /// must be obtained independently from a certificate authority.
5626    pub certificate_raw_data: std::option::Option<crate::model::CertificateRawData>,
5627
5628    /// Only applicable if this certificate is managed by App Engine. Managed
5629    /// certificates are tied to the lifecycle of a `DomainMapping` and cannot be
5630    /// updated or deleted via the `AuthorizedCertificates` API. If this
5631    /// certificate is manually administered by the user, this field will be empty.
5632    ///
5633    /// @OutputOnly
5634    pub managed_certificate: std::option::Option<crate::model::ManagedCertificate>,
5635
5636    /// The full paths to user visible Domain Mapping resources that have this
5637    /// certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
5638    ///
5639    /// This may not represent the full list of mapped domain mappings if the user
5640    /// does not have `VIEWER` permissions on all of the applications that have
5641    /// this certificate mapped. See `domain_mappings_count` for a complete count.
5642    ///
5643    /// Only returned by `GET` or `LIST` requests when specifically requested by
5644    /// the `view=FULL_CERTIFICATE` option.
5645    ///
5646    /// @OutputOnly
5647    pub visible_domain_mappings: std::vec::Vec<std::string::String>,
5648
5649    /// Aggregate count of the domain mappings with this certificate mapped. This
5650    /// count includes domain mappings on applications for which the user does not
5651    /// have `VIEWER` permissions.
5652    ///
5653    /// Only returned by `GET` or `LIST` requests when specifically requested by
5654    /// the `view=FULL_CERTIFICATE` option.
5655    ///
5656    /// @OutputOnly
5657    pub domain_mappings_count: i32,
5658
5659    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5660}
5661
5662impl AuthorizedCertificate {
5663    /// Creates a new default instance.
5664    pub fn new() -> Self {
5665        std::default::Default::default()
5666    }
5667
5668    /// Sets the value of [name][crate::model::AuthorizedCertificate::name].
5669    ///
5670    /// # Example
5671    /// ```ignore,no_run
5672    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5673    /// let x = AuthorizedCertificate::new().set_name("example");
5674    /// ```
5675    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5676        self.name = v.into();
5677        self
5678    }
5679
5680    /// Sets the value of [id][crate::model::AuthorizedCertificate::id].
5681    ///
5682    /// # Example
5683    /// ```ignore,no_run
5684    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5685    /// let x = AuthorizedCertificate::new().set_id("example");
5686    /// ```
5687    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5688        self.id = v.into();
5689        self
5690    }
5691
5692    /// Sets the value of [display_name][crate::model::AuthorizedCertificate::display_name].
5693    ///
5694    /// # Example
5695    /// ```ignore,no_run
5696    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5697    /// let x = AuthorizedCertificate::new().set_display_name("example");
5698    /// ```
5699    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5700        self.display_name = v.into();
5701        self
5702    }
5703
5704    /// Sets the value of [domain_names][crate::model::AuthorizedCertificate::domain_names].
5705    ///
5706    /// # Example
5707    /// ```ignore,no_run
5708    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5709    /// let x = AuthorizedCertificate::new().set_domain_names(["a", "b", "c"]);
5710    /// ```
5711    pub fn set_domain_names<T, V>(mut self, v: T) -> Self
5712    where
5713        T: std::iter::IntoIterator<Item = V>,
5714        V: std::convert::Into<std::string::String>,
5715    {
5716        use std::iter::Iterator;
5717        self.domain_names = v.into_iter().map(|i| i.into()).collect();
5718        self
5719    }
5720
5721    /// Sets the value of [expire_time][crate::model::AuthorizedCertificate::expire_time].
5722    ///
5723    /// # Example
5724    /// ```ignore,no_run
5725    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5726    /// use wkt::Timestamp;
5727    /// let x = AuthorizedCertificate::new().set_expire_time(Timestamp::default()/* use setters */);
5728    /// ```
5729    pub fn set_expire_time<T>(mut self, v: T) -> Self
5730    where
5731        T: std::convert::Into<wkt::Timestamp>,
5732    {
5733        self.expire_time = std::option::Option::Some(v.into());
5734        self
5735    }
5736
5737    /// Sets or clears the value of [expire_time][crate::model::AuthorizedCertificate::expire_time].
5738    ///
5739    /// # Example
5740    /// ```ignore,no_run
5741    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5742    /// use wkt::Timestamp;
5743    /// let x = AuthorizedCertificate::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
5744    /// let x = AuthorizedCertificate::new().set_or_clear_expire_time(None::<Timestamp>);
5745    /// ```
5746    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
5747    where
5748        T: std::convert::Into<wkt::Timestamp>,
5749    {
5750        self.expire_time = v.map(|x| x.into());
5751        self
5752    }
5753
5754    /// Sets the value of [certificate_raw_data][crate::model::AuthorizedCertificate::certificate_raw_data].
5755    ///
5756    /// # Example
5757    /// ```ignore,no_run
5758    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5759    /// use google_cloud_appengine_v1::model::CertificateRawData;
5760    /// let x = AuthorizedCertificate::new().set_certificate_raw_data(CertificateRawData::default()/* use setters */);
5761    /// ```
5762    pub fn set_certificate_raw_data<T>(mut self, v: T) -> Self
5763    where
5764        T: std::convert::Into<crate::model::CertificateRawData>,
5765    {
5766        self.certificate_raw_data = std::option::Option::Some(v.into());
5767        self
5768    }
5769
5770    /// Sets or clears the value of [certificate_raw_data][crate::model::AuthorizedCertificate::certificate_raw_data].
5771    ///
5772    /// # Example
5773    /// ```ignore,no_run
5774    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5775    /// use google_cloud_appengine_v1::model::CertificateRawData;
5776    /// let x = AuthorizedCertificate::new().set_or_clear_certificate_raw_data(Some(CertificateRawData::default()/* use setters */));
5777    /// let x = AuthorizedCertificate::new().set_or_clear_certificate_raw_data(None::<CertificateRawData>);
5778    /// ```
5779    pub fn set_or_clear_certificate_raw_data<T>(mut self, v: std::option::Option<T>) -> Self
5780    where
5781        T: std::convert::Into<crate::model::CertificateRawData>,
5782    {
5783        self.certificate_raw_data = v.map(|x| x.into());
5784        self
5785    }
5786
5787    /// Sets the value of [managed_certificate][crate::model::AuthorizedCertificate::managed_certificate].
5788    ///
5789    /// # Example
5790    /// ```ignore,no_run
5791    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5792    /// use google_cloud_appengine_v1::model::ManagedCertificate;
5793    /// let x = AuthorizedCertificate::new().set_managed_certificate(ManagedCertificate::default()/* use setters */);
5794    /// ```
5795    pub fn set_managed_certificate<T>(mut self, v: T) -> Self
5796    where
5797        T: std::convert::Into<crate::model::ManagedCertificate>,
5798    {
5799        self.managed_certificate = std::option::Option::Some(v.into());
5800        self
5801    }
5802
5803    /// Sets or clears the value of [managed_certificate][crate::model::AuthorizedCertificate::managed_certificate].
5804    ///
5805    /// # Example
5806    /// ```ignore,no_run
5807    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5808    /// use google_cloud_appengine_v1::model::ManagedCertificate;
5809    /// let x = AuthorizedCertificate::new().set_or_clear_managed_certificate(Some(ManagedCertificate::default()/* use setters */));
5810    /// let x = AuthorizedCertificate::new().set_or_clear_managed_certificate(None::<ManagedCertificate>);
5811    /// ```
5812    pub fn set_or_clear_managed_certificate<T>(mut self, v: std::option::Option<T>) -> Self
5813    where
5814        T: std::convert::Into<crate::model::ManagedCertificate>,
5815    {
5816        self.managed_certificate = v.map(|x| x.into());
5817        self
5818    }
5819
5820    /// Sets the value of [visible_domain_mappings][crate::model::AuthorizedCertificate::visible_domain_mappings].
5821    ///
5822    /// # Example
5823    /// ```ignore,no_run
5824    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5825    /// let x = AuthorizedCertificate::new().set_visible_domain_mappings(["a", "b", "c"]);
5826    /// ```
5827    pub fn set_visible_domain_mappings<T, V>(mut self, v: T) -> Self
5828    where
5829        T: std::iter::IntoIterator<Item = V>,
5830        V: std::convert::Into<std::string::String>,
5831    {
5832        use std::iter::Iterator;
5833        self.visible_domain_mappings = v.into_iter().map(|i| i.into()).collect();
5834        self
5835    }
5836
5837    /// Sets the value of [domain_mappings_count][crate::model::AuthorizedCertificate::domain_mappings_count].
5838    ///
5839    /// # Example
5840    /// ```ignore,no_run
5841    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5842    /// let x = AuthorizedCertificate::new().set_domain_mappings_count(42);
5843    /// ```
5844    pub fn set_domain_mappings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5845        self.domain_mappings_count = v.into();
5846        self
5847    }
5848}
5849
5850impl wkt::message::Message for AuthorizedCertificate {
5851    fn typename() -> &'static str {
5852        "type.googleapis.com/google.appengine.v1.AuthorizedCertificate"
5853    }
5854}
5855
5856/// An SSL certificate obtained from a certificate authority.
5857#[derive(Clone, Default, PartialEq)]
5858#[non_exhaustive]
5859pub struct CertificateRawData {
5860    /// PEM encoded x.509 public key certificate. This field is set once on
5861    /// certificate creation. Must include the header and footer. Example:
5862    pub public_certificate: std::string::String,
5863
5864    /// Unencrypted PEM encoded RSA private key. This field is set once on
5865    /// certificate creation and then encrypted. The key size must be 2048
5866    /// bits or fewer. Must include the header and footer. Example:
5867    ///
5868    /// @InputOnly
5869    pub private_key: std::string::String,
5870
5871    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5872}
5873
5874impl CertificateRawData {
5875    /// Creates a new default instance.
5876    pub fn new() -> Self {
5877        std::default::Default::default()
5878    }
5879
5880    /// Sets the value of [public_certificate][crate::model::CertificateRawData::public_certificate].
5881    ///
5882    /// # Example
5883    /// ```ignore,no_run
5884    /// # use google_cloud_appengine_v1::model::CertificateRawData;
5885    /// let x = CertificateRawData::new().set_public_certificate("example");
5886    /// ```
5887    pub fn set_public_certificate<T: std::convert::Into<std::string::String>>(
5888        mut self,
5889        v: T,
5890    ) -> Self {
5891        self.public_certificate = v.into();
5892        self
5893    }
5894
5895    /// Sets the value of [private_key][crate::model::CertificateRawData::private_key].
5896    ///
5897    /// # Example
5898    /// ```ignore,no_run
5899    /// # use google_cloud_appengine_v1::model::CertificateRawData;
5900    /// let x = CertificateRawData::new().set_private_key("example");
5901    /// ```
5902    pub fn set_private_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5903        self.private_key = v.into();
5904        self
5905    }
5906}
5907
5908impl wkt::message::Message for CertificateRawData {
5909    fn typename() -> &'static str {
5910        "type.googleapis.com/google.appengine.v1.CertificateRawData"
5911    }
5912}
5913
5914/// A certificate managed by App Engine.
5915#[derive(Clone, Default, PartialEq)]
5916#[non_exhaustive]
5917pub struct ManagedCertificate {
5918    /// Time at which the certificate was last renewed. The renewal process is
5919    /// fully managed. Certificate renewal will automatically occur before the
5920    /// certificate expires. Renewal errors can be tracked via `ManagementStatus`.
5921    ///
5922    /// @OutputOnly
5923    pub last_renewal_time: std::option::Option<wkt::Timestamp>,
5924
5925    /// Status of certificate management. Refers to the most recent certificate
5926    /// acquisition or renewal attempt.
5927    ///
5928    /// @OutputOnly
5929    pub status: crate::model::ManagementStatus,
5930
5931    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5932}
5933
5934impl ManagedCertificate {
5935    /// Creates a new default instance.
5936    pub fn new() -> Self {
5937        std::default::Default::default()
5938    }
5939
5940    /// Sets the value of [last_renewal_time][crate::model::ManagedCertificate::last_renewal_time].
5941    ///
5942    /// # Example
5943    /// ```ignore,no_run
5944    /// # use google_cloud_appengine_v1::model::ManagedCertificate;
5945    /// use wkt::Timestamp;
5946    /// let x = ManagedCertificate::new().set_last_renewal_time(Timestamp::default()/* use setters */);
5947    /// ```
5948    pub fn set_last_renewal_time<T>(mut self, v: T) -> Self
5949    where
5950        T: std::convert::Into<wkt::Timestamp>,
5951    {
5952        self.last_renewal_time = std::option::Option::Some(v.into());
5953        self
5954    }
5955
5956    /// Sets or clears the value of [last_renewal_time][crate::model::ManagedCertificate::last_renewal_time].
5957    ///
5958    /// # Example
5959    /// ```ignore,no_run
5960    /// # use google_cloud_appengine_v1::model::ManagedCertificate;
5961    /// use wkt::Timestamp;
5962    /// let x = ManagedCertificate::new().set_or_clear_last_renewal_time(Some(Timestamp::default()/* use setters */));
5963    /// let x = ManagedCertificate::new().set_or_clear_last_renewal_time(None::<Timestamp>);
5964    /// ```
5965    pub fn set_or_clear_last_renewal_time<T>(mut self, v: std::option::Option<T>) -> Self
5966    where
5967        T: std::convert::Into<wkt::Timestamp>,
5968    {
5969        self.last_renewal_time = v.map(|x| x.into());
5970        self
5971    }
5972
5973    /// Sets the value of [status][crate::model::ManagedCertificate::status].
5974    ///
5975    /// # Example
5976    /// ```ignore,no_run
5977    /// # use google_cloud_appengine_v1::model::ManagedCertificate;
5978    /// use google_cloud_appengine_v1::model::ManagementStatus;
5979    /// let x0 = ManagedCertificate::new().set_status(ManagementStatus::Ok);
5980    /// let x1 = ManagedCertificate::new().set_status(ManagementStatus::Pending);
5981    /// let x2 = ManagedCertificate::new().set_status(ManagementStatus::FailedRetryingNotVisible);
5982    /// ```
5983    pub fn set_status<T: std::convert::Into<crate::model::ManagementStatus>>(
5984        mut self,
5985        v: T,
5986    ) -> Self {
5987        self.status = v.into();
5988        self
5989    }
5990}
5991
5992impl wkt::message::Message for ManagedCertificate {
5993    fn typename() -> &'static str {
5994        "type.googleapis.com/google.appengine.v1.ManagedCertificate"
5995    }
5996}
5997
5998/// Code and application artifacts used to deploy a version to App Engine.
5999#[derive(Clone, Default, PartialEq)]
6000#[non_exhaustive]
6001pub struct Deployment {
6002    /// Manifest of the files stored in Google Cloud Storage that are included
6003    /// as part of this version. All files must be readable using the
6004    /// credentials supplied with this call.
6005    pub files: std::collections::HashMap<std::string::String, crate::model::FileInfo>,
6006
6007    /// The Docker image for the container that runs the version.
6008    /// Only applicable for instances running in the App Engine flexible environment.
6009    pub container: std::option::Option<crate::model::ContainerInfo>,
6010
6011    /// The zip file for this deployment, if this is a zip deployment.
6012    pub zip: std::option::Option<crate::model::ZipInfo>,
6013
6014    /// Options for any Google Cloud Build builds created as a part of this
6015    /// deployment.
6016    ///
6017    /// These options will only be used if a new build is created, such as when
6018    /// deploying to the App Engine flexible environment using files or zip.
6019    pub cloud_build_options: std::option::Option<crate::model::CloudBuildOptions>,
6020
6021    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6022}
6023
6024impl Deployment {
6025    /// Creates a new default instance.
6026    pub fn new() -> Self {
6027        std::default::Default::default()
6028    }
6029
6030    /// Sets the value of [files][crate::model::Deployment::files].
6031    ///
6032    /// # Example
6033    /// ```ignore,no_run
6034    /// # use google_cloud_appengine_v1::model::Deployment;
6035    /// use google_cloud_appengine_v1::model::FileInfo;
6036    /// let x = Deployment::new().set_files([
6037    ///     ("key0", FileInfo::default()/* use setters */),
6038    ///     ("key1", FileInfo::default()/* use (different) setters */),
6039    /// ]);
6040    /// ```
6041    pub fn set_files<T, K, V>(mut self, v: T) -> Self
6042    where
6043        T: std::iter::IntoIterator<Item = (K, V)>,
6044        K: std::convert::Into<std::string::String>,
6045        V: std::convert::Into<crate::model::FileInfo>,
6046    {
6047        use std::iter::Iterator;
6048        self.files = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6049        self
6050    }
6051
6052    /// Sets the value of [container][crate::model::Deployment::container].
6053    ///
6054    /// # Example
6055    /// ```ignore,no_run
6056    /// # use google_cloud_appengine_v1::model::Deployment;
6057    /// use google_cloud_appengine_v1::model::ContainerInfo;
6058    /// let x = Deployment::new().set_container(ContainerInfo::default()/* use setters */);
6059    /// ```
6060    pub fn set_container<T>(mut self, v: T) -> Self
6061    where
6062        T: std::convert::Into<crate::model::ContainerInfo>,
6063    {
6064        self.container = std::option::Option::Some(v.into());
6065        self
6066    }
6067
6068    /// Sets or clears the value of [container][crate::model::Deployment::container].
6069    ///
6070    /// # Example
6071    /// ```ignore,no_run
6072    /// # use google_cloud_appengine_v1::model::Deployment;
6073    /// use google_cloud_appengine_v1::model::ContainerInfo;
6074    /// let x = Deployment::new().set_or_clear_container(Some(ContainerInfo::default()/* use setters */));
6075    /// let x = Deployment::new().set_or_clear_container(None::<ContainerInfo>);
6076    /// ```
6077    pub fn set_or_clear_container<T>(mut self, v: std::option::Option<T>) -> Self
6078    where
6079        T: std::convert::Into<crate::model::ContainerInfo>,
6080    {
6081        self.container = v.map(|x| x.into());
6082        self
6083    }
6084
6085    /// Sets the value of [zip][crate::model::Deployment::zip].
6086    ///
6087    /// # Example
6088    /// ```ignore,no_run
6089    /// # use google_cloud_appengine_v1::model::Deployment;
6090    /// use google_cloud_appengine_v1::model::ZipInfo;
6091    /// let x = Deployment::new().set_zip(ZipInfo::default()/* use setters */);
6092    /// ```
6093    pub fn set_zip<T>(mut self, v: T) -> Self
6094    where
6095        T: std::convert::Into<crate::model::ZipInfo>,
6096    {
6097        self.zip = std::option::Option::Some(v.into());
6098        self
6099    }
6100
6101    /// Sets or clears the value of [zip][crate::model::Deployment::zip].
6102    ///
6103    /// # Example
6104    /// ```ignore,no_run
6105    /// # use google_cloud_appengine_v1::model::Deployment;
6106    /// use google_cloud_appengine_v1::model::ZipInfo;
6107    /// let x = Deployment::new().set_or_clear_zip(Some(ZipInfo::default()/* use setters */));
6108    /// let x = Deployment::new().set_or_clear_zip(None::<ZipInfo>);
6109    /// ```
6110    pub fn set_or_clear_zip<T>(mut self, v: std::option::Option<T>) -> Self
6111    where
6112        T: std::convert::Into<crate::model::ZipInfo>,
6113    {
6114        self.zip = v.map(|x| x.into());
6115        self
6116    }
6117
6118    /// Sets the value of [cloud_build_options][crate::model::Deployment::cloud_build_options].
6119    ///
6120    /// # Example
6121    /// ```ignore,no_run
6122    /// # use google_cloud_appengine_v1::model::Deployment;
6123    /// use google_cloud_appengine_v1::model::CloudBuildOptions;
6124    /// let x = Deployment::new().set_cloud_build_options(CloudBuildOptions::default()/* use setters */);
6125    /// ```
6126    pub fn set_cloud_build_options<T>(mut self, v: T) -> Self
6127    where
6128        T: std::convert::Into<crate::model::CloudBuildOptions>,
6129    {
6130        self.cloud_build_options = std::option::Option::Some(v.into());
6131        self
6132    }
6133
6134    /// Sets or clears the value of [cloud_build_options][crate::model::Deployment::cloud_build_options].
6135    ///
6136    /// # Example
6137    /// ```ignore,no_run
6138    /// # use google_cloud_appengine_v1::model::Deployment;
6139    /// use google_cloud_appengine_v1::model::CloudBuildOptions;
6140    /// let x = Deployment::new().set_or_clear_cloud_build_options(Some(CloudBuildOptions::default()/* use setters */));
6141    /// let x = Deployment::new().set_or_clear_cloud_build_options(None::<CloudBuildOptions>);
6142    /// ```
6143    pub fn set_or_clear_cloud_build_options<T>(mut self, v: std::option::Option<T>) -> Self
6144    where
6145        T: std::convert::Into<crate::model::CloudBuildOptions>,
6146    {
6147        self.cloud_build_options = v.map(|x| x.into());
6148        self
6149    }
6150}
6151
6152impl wkt::message::Message for Deployment {
6153    fn typename() -> &'static str {
6154        "type.googleapis.com/google.appengine.v1.Deployment"
6155    }
6156}
6157
6158/// Single source file that is part of the version to be deployed. Each source
6159/// file that is deployed must be specified separately.
6160#[derive(Clone, Default, PartialEq)]
6161#[non_exhaustive]
6162pub struct FileInfo {
6163    /// URL source to use to fetch this file. Must be a URL to a resource in
6164    /// Google Cloud Storage in the form
6165    /// 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
6166    pub source_url: std::string::String,
6167
6168    /// The SHA1 hash of the file, in hex.
6169    pub sha1_sum: std::string::String,
6170
6171    /// The MIME type of the file.
6172    ///
6173    /// Defaults to the value from Google Cloud Storage.
6174    pub mime_type: std::string::String,
6175
6176    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6177}
6178
6179impl FileInfo {
6180    /// Creates a new default instance.
6181    pub fn new() -> Self {
6182        std::default::Default::default()
6183    }
6184
6185    /// Sets the value of [source_url][crate::model::FileInfo::source_url].
6186    ///
6187    /// # Example
6188    /// ```ignore,no_run
6189    /// # use google_cloud_appengine_v1::model::FileInfo;
6190    /// let x = FileInfo::new().set_source_url("example");
6191    /// ```
6192    pub fn set_source_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6193        self.source_url = v.into();
6194        self
6195    }
6196
6197    /// Sets the value of [sha1_sum][crate::model::FileInfo::sha1_sum].
6198    ///
6199    /// # Example
6200    /// ```ignore,no_run
6201    /// # use google_cloud_appengine_v1::model::FileInfo;
6202    /// let x = FileInfo::new().set_sha1_sum("example");
6203    /// ```
6204    pub fn set_sha1_sum<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6205        self.sha1_sum = v.into();
6206        self
6207    }
6208
6209    /// Sets the value of [mime_type][crate::model::FileInfo::mime_type].
6210    ///
6211    /// # Example
6212    /// ```ignore,no_run
6213    /// # use google_cloud_appengine_v1::model::FileInfo;
6214    /// let x = FileInfo::new().set_mime_type("example");
6215    /// ```
6216    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6217        self.mime_type = v.into();
6218        self
6219    }
6220}
6221
6222impl wkt::message::Message for FileInfo {
6223    fn typename() -> &'static str {
6224        "type.googleapis.com/google.appengine.v1.FileInfo"
6225    }
6226}
6227
6228/// Docker image that is used to create a container and start a VM instance for
6229/// the version that you deploy. Only applicable for instances running in the App
6230/// Engine flexible environment.
6231#[derive(Clone, Default, PartialEq)]
6232#[non_exhaustive]
6233pub struct ContainerInfo {
6234    /// URI to the hosted container image in Google Container Registry. The URI
6235    /// must be fully qualified and include a tag or digest.
6236    /// Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
6237    pub image: std::string::String,
6238
6239    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6240}
6241
6242impl ContainerInfo {
6243    /// Creates a new default instance.
6244    pub fn new() -> Self {
6245        std::default::Default::default()
6246    }
6247
6248    /// Sets the value of [image][crate::model::ContainerInfo::image].
6249    ///
6250    /// # Example
6251    /// ```ignore,no_run
6252    /// # use google_cloud_appengine_v1::model::ContainerInfo;
6253    /// let x = ContainerInfo::new().set_image("example");
6254    /// ```
6255    pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6256        self.image = v.into();
6257        self
6258    }
6259}
6260
6261impl wkt::message::Message for ContainerInfo {
6262    fn typename() -> &'static str {
6263        "type.googleapis.com/google.appengine.v1.ContainerInfo"
6264    }
6265}
6266
6267/// Options for the build operations performed as a part of the version
6268/// deployment. Only applicable for App Engine flexible environment when creating
6269/// a version using source code directly.
6270#[derive(Clone, Default, PartialEq)]
6271#[non_exhaustive]
6272pub struct CloudBuildOptions {
6273    /// Path to the yaml file used in deployment, used to determine runtime
6274    /// configuration details.
6275    ///
6276    /// Required for flexible environment builds.
6277    ///
6278    /// See <https://cloud.google.com/appengine/docs/standard/python/config/appref>
6279    /// for more details.
6280    pub app_yaml_path: std::string::String,
6281
6282    /// The Cloud Build timeout used as part of any dependent builds performed by
6283    /// version creation. Defaults to 10 minutes.
6284    pub cloud_build_timeout: std::option::Option<wkt::Duration>,
6285
6286    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6287}
6288
6289impl CloudBuildOptions {
6290    /// Creates a new default instance.
6291    pub fn new() -> Self {
6292        std::default::Default::default()
6293    }
6294
6295    /// Sets the value of [app_yaml_path][crate::model::CloudBuildOptions::app_yaml_path].
6296    ///
6297    /// # Example
6298    /// ```ignore,no_run
6299    /// # use google_cloud_appengine_v1::model::CloudBuildOptions;
6300    /// let x = CloudBuildOptions::new().set_app_yaml_path("example");
6301    /// ```
6302    pub fn set_app_yaml_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6303        self.app_yaml_path = v.into();
6304        self
6305    }
6306
6307    /// Sets the value of [cloud_build_timeout][crate::model::CloudBuildOptions::cloud_build_timeout].
6308    ///
6309    /// # Example
6310    /// ```ignore,no_run
6311    /// # use google_cloud_appengine_v1::model::CloudBuildOptions;
6312    /// use wkt::Duration;
6313    /// let x = CloudBuildOptions::new().set_cloud_build_timeout(Duration::default()/* use setters */);
6314    /// ```
6315    pub fn set_cloud_build_timeout<T>(mut self, v: T) -> Self
6316    where
6317        T: std::convert::Into<wkt::Duration>,
6318    {
6319        self.cloud_build_timeout = std::option::Option::Some(v.into());
6320        self
6321    }
6322
6323    /// Sets or clears the value of [cloud_build_timeout][crate::model::CloudBuildOptions::cloud_build_timeout].
6324    ///
6325    /// # Example
6326    /// ```ignore,no_run
6327    /// # use google_cloud_appengine_v1::model::CloudBuildOptions;
6328    /// use wkt::Duration;
6329    /// let x = CloudBuildOptions::new().set_or_clear_cloud_build_timeout(Some(Duration::default()/* use setters */));
6330    /// let x = CloudBuildOptions::new().set_or_clear_cloud_build_timeout(None::<Duration>);
6331    /// ```
6332    pub fn set_or_clear_cloud_build_timeout<T>(mut self, v: std::option::Option<T>) -> Self
6333    where
6334        T: std::convert::Into<wkt::Duration>,
6335    {
6336        self.cloud_build_timeout = v.map(|x| x.into());
6337        self
6338    }
6339}
6340
6341impl wkt::message::Message for CloudBuildOptions {
6342    fn typename() -> &'static str {
6343        "type.googleapis.com/google.appengine.v1.CloudBuildOptions"
6344    }
6345}
6346
6347/// The zip file information for a zip deployment.
6348#[derive(Clone, Default, PartialEq)]
6349#[non_exhaustive]
6350pub struct ZipInfo {
6351    /// URL of the zip file to deploy from. Must be a URL to a resource in
6352    /// Google Cloud Storage in the form
6353    /// 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
6354    pub source_url: std::string::String,
6355
6356    /// An estimate of the number of files in a zip for a zip deployment.
6357    /// If set, must be greater than or equal to the actual number of files.
6358    /// Used for optimizing performance; if not provided, deployment may be slow.
6359    pub files_count: i32,
6360
6361    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6362}
6363
6364impl ZipInfo {
6365    /// Creates a new default instance.
6366    pub fn new() -> Self {
6367        std::default::Default::default()
6368    }
6369
6370    /// Sets the value of [source_url][crate::model::ZipInfo::source_url].
6371    ///
6372    /// # Example
6373    /// ```ignore,no_run
6374    /// # use google_cloud_appengine_v1::model::ZipInfo;
6375    /// let x = ZipInfo::new().set_source_url("example");
6376    /// ```
6377    pub fn set_source_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6378        self.source_url = v.into();
6379        self
6380    }
6381
6382    /// Sets the value of [files_count][crate::model::ZipInfo::files_count].
6383    ///
6384    /// # Example
6385    /// ```ignore,no_run
6386    /// # use google_cloud_appengine_v1::model::ZipInfo;
6387    /// let x = ZipInfo::new().set_files_count(42);
6388    /// ```
6389    pub fn set_files_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6390        self.files_count = v.into();
6391        self
6392    }
6393}
6394
6395impl wkt::message::Message for ZipInfo {
6396    fn typename() -> &'static str {
6397        "type.googleapis.com/google.appengine.v1.ZipInfo"
6398    }
6399}
6400
6401/// A domain that a user has been authorized to administer. To authorize use
6402/// of a domain, verify ownership via
6403/// [Search Console](https://search.google.com/search-console/welcome).
6404#[derive(Clone, Default, PartialEq)]
6405#[non_exhaustive]
6406pub struct AuthorizedDomain {
6407    /// Full path to the `AuthorizedDomain` resource in the API. Example:
6408    /// `apps/myapp/authorizedDomains/example.com`.
6409    ///
6410    /// @OutputOnly
6411    pub name: std::string::String,
6412
6413    /// Fully qualified domain name of the domain authorized for use. Example:
6414    /// `example.com`.
6415    pub id: std::string::String,
6416
6417    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6418}
6419
6420impl AuthorizedDomain {
6421    /// Creates a new default instance.
6422    pub fn new() -> Self {
6423        std::default::Default::default()
6424    }
6425
6426    /// Sets the value of [name][crate::model::AuthorizedDomain::name].
6427    ///
6428    /// # Example
6429    /// ```ignore,no_run
6430    /// # use google_cloud_appengine_v1::model::AuthorizedDomain;
6431    /// let x = AuthorizedDomain::new().set_name("example");
6432    /// ```
6433    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6434        self.name = v.into();
6435        self
6436    }
6437
6438    /// Sets the value of [id][crate::model::AuthorizedDomain::id].
6439    ///
6440    /// # Example
6441    /// ```ignore,no_run
6442    /// # use google_cloud_appengine_v1::model::AuthorizedDomain;
6443    /// let x = AuthorizedDomain::new().set_id("example");
6444    /// ```
6445    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6446        self.id = v.into();
6447        self
6448    }
6449}
6450
6451impl wkt::message::Message for AuthorizedDomain {
6452    fn typename() -> &'static str {
6453        "type.googleapis.com/google.appengine.v1.AuthorizedDomain"
6454    }
6455}
6456
6457/// A domain serving an App Engine application.
6458#[derive(Clone, Default, PartialEq)]
6459#[non_exhaustive]
6460pub struct DomainMapping {
6461    /// Full path to the `DomainMapping` resource in the API. Example:
6462    /// `apps/myapp/domainMapping/example.com`.
6463    ///
6464    /// @OutputOnly
6465    pub name: std::string::String,
6466
6467    /// Relative name of the domain serving the application. Example:
6468    /// `example.com`.
6469    pub id: std::string::String,
6470
6471    /// SSL configuration for this domain. If unconfigured, this domain will not
6472    /// serve with SSL.
6473    pub ssl_settings: std::option::Option<crate::model::SslSettings>,
6474
6475    /// The resource records required to configure this domain mapping. These
6476    /// records must be added to the domain's DNS configuration in order to
6477    /// serve the application via this domain mapping.
6478    ///
6479    /// @OutputOnly
6480    pub resource_records: std::vec::Vec<crate::model::ResourceRecord>,
6481
6482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6483}
6484
6485impl DomainMapping {
6486    /// Creates a new default instance.
6487    pub fn new() -> Self {
6488        std::default::Default::default()
6489    }
6490
6491    /// Sets the value of [name][crate::model::DomainMapping::name].
6492    ///
6493    /// # Example
6494    /// ```ignore,no_run
6495    /// # use google_cloud_appengine_v1::model::DomainMapping;
6496    /// let x = DomainMapping::new().set_name("example");
6497    /// ```
6498    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6499        self.name = v.into();
6500        self
6501    }
6502
6503    /// Sets the value of [id][crate::model::DomainMapping::id].
6504    ///
6505    /// # Example
6506    /// ```ignore,no_run
6507    /// # use google_cloud_appengine_v1::model::DomainMapping;
6508    /// let x = DomainMapping::new().set_id("example");
6509    /// ```
6510    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6511        self.id = v.into();
6512        self
6513    }
6514
6515    /// Sets the value of [ssl_settings][crate::model::DomainMapping::ssl_settings].
6516    ///
6517    /// # Example
6518    /// ```ignore,no_run
6519    /// # use google_cloud_appengine_v1::model::DomainMapping;
6520    /// use google_cloud_appengine_v1::model::SslSettings;
6521    /// let x = DomainMapping::new().set_ssl_settings(SslSettings::default()/* use setters */);
6522    /// ```
6523    pub fn set_ssl_settings<T>(mut self, v: T) -> Self
6524    where
6525        T: std::convert::Into<crate::model::SslSettings>,
6526    {
6527        self.ssl_settings = std::option::Option::Some(v.into());
6528        self
6529    }
6530
6531    /// Sets or clears the value of [ssl_settings][crate::model::DomainMapping::ssl_settings].
6532    ///
6533    /// # Example
6534    /// ```ignore,no_run
6535    /// # use google_cloud_appengine_v1::model::DomainMapping;
6536    /// use google_cloud_appengine_v1::model::SslSettings;
6537    /// let x = DomainMapping::new().set_or_clear_ssl_settings(Some(SslSettings::default()/* use setters */));
6538    /// let x = DomainMapping::new().set_or_clear_ssl_settings(None::<SslSettings>);
6539    /// ```
6540    pub fn set_or_clear_ssl_settings<T>(mut self, v: std::option::Option<T>) -> Self
6541    where
6542        T: std::convert::Into<crate::model::SslSettings>,
6543    {
6544        self.ssl_settings = v.map(|x| x.into());
6545        self
6546    }
6547
6548    /// Sets the value of [resource_records][crate::model::DomainMapping::resource_records].
6549    ///
6550    /// # Example
6551    /// ```ignore,no_run
6552    /// # use google_cloud_appengine_v1::model::DomainMapping;
6553    /// use google_cloud_appengine_v1::model::ResourceRecord;
6554    /// let x = DomainMapping::new()
6555    ///     .set_resource_records([
6556    ///         ResourceRecord::default()/* use setters */,
6557    ///         ResourceRecord::default()/* use (different) setters */,
6558    ///     ]);
6559    /// ```
6560    pub fn set_resource_records<T, V>(mut self, v: T) -> Self
6561    where
6562        T: std::iter::IntoIterator<Item = V>,
6563        V: std::convert::Into<crate::model::ResourceRecord>,
6564    {
6565        use std::iter::Iterator;
6566        self.resource_records = v.into_iter().map(|i| i.into()).collect();
6567        self
6568    }
6569}
6570
6571impl wkt::message::Message for DomainMapping {
6572    fn typename() -> &'static str {
6573        "type.googleapis.com/google.appengine.v1.DomainMapping"
6574    }
6575}
6576
6577/// SSL configuration for a `DomainMapping` resource.
6578#[derive(Clone, Default, PartialEq)]
6579#[non_exhaustive]
6580pub struct SslSettings {
6581    /// ID of the `AuthorizedCertificate` resource configuring SSL for the
6582    /// application. Clearing this field will remove SSL support.
6583    ///
6584    /// By default, a managed certificate is automatically created for every
6585    /// domain mapping. To omit SSL support or to configure SSL manually, specify
6586    /// `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
6587    /// be authorized to administer the `AuthorizedCertificate` resource to
6588    /// manually map it to a `DomainMapping` resource.
6589    /// Example: `12345`.
6590    pub certificate_id: std::string::String,
6591
6592    /// SSL management type for this domain. If `AUTOMATIC`, a managed certificate
6593    /// is automatically provisioned. If `MANUAL`, `certificate_id` must be
6594    /// manually specified in order to configure SSL for this domain.
6595    pub ssl_management_type: crate::model::ssl_settings::SslManagementType,
6596
6597    /// ID of the managed `AuthorizedCertificate` resource currently being
6598    /// provisioned, if applicable. Until the new managed certificate has been
6599    /// successfully provisioned, the previous SSL state will be preserved. Once
6600    /// the provisioning process completes, the `certificate_id` field will reflect
6601    /// the new managed certificate and this field will be left empty. To remove
6602    /// SSL support while there is still a pending managed certificate, clear the
6603    /// `certificate_id` field with an `UpdateDomainMappingRequest`.
6604    ///
6605    /// @OutputOnly
6606    pub pending_managed_certificate_id: std::string::String,
6607
6608    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6609}
6610
6611impl SslSettings {
6612    /// Creates a new default instance.
6613    pub fn new() -> Self {
6614        std::default::Default::default()
6615    }
6616
6617    /// Sets the value of [certificate_id][crate::model::SslSettings::certificate_id].
6618    ///
6619    /// # Example
6620    /// ```ignore,no_run
6621    /// # use google_cloud_appengine_v1::model::SslSettings;
6622    /// let x = SslSettings::new().set_certificate_id("example");
6623    /// ```
6624    pub fn set_certificate_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6625        self.certificate_id = v.into();
6626        self
6627    }
6628
6629    /// Sets the value of [ssl_management_type][crate::model::SslSettings::ssl_management_type].
6630    ///
6631    /// # Example
6632    /// ```ignore,no_run
6633    /// # use google_cloud_appengine_v1::model::SslSettings;
6634    /// use google_cloud_appengine_v1::model::ssl_settings::SslManagementType;
6635    /// let x0 = SslSettings::new().set_ssl_management_type(SslManagementType::Automatic);
6636    /// let x1 = SslSettings::new().set_ssl_management_type(SslManagementType::Manual);
6637    /// ```
6638    pub fn set_ssl_management_type<
6639        T: std::convert::Into<crate::model::ssl_settings::SslManagementType>,
6640    >(
6641        mut self,
6642        v: T,
6643    ) -> Self {
6644        self.ssl_management_type = v.into();
6645        self
6646    }
6647
6648    /// Sets the value of [pending_managed_certificate_id][crate::model::SslSettings::pending_managed_certificate_id].
6649    ///
6650    /// # Example
6651    /// ```ignore,no_run
6652    /// # use google_cloud_appengine_v1::model::SslSettings;
6653    /// let x = SslSettings::new().set_pending_managed_certificate_id("example");
6654    /// ```
6655    pub fn set_pending_managed_certificate_id<T: std::convert::Into<std::string::String>>(
6656        mut self,
6657        v: T,
6658    ) -> Self {
6659        self.pending_managed_certificate_id = v.into();
6660        self
6661    }
6662}
6663
6664impl wkt::message::Message for SslSettings {
6665    fn typename() -> &'static str {
6666        "type.googleapis.com/google.appengine.v1.SslSettings"
6667    }
6668}
6669
6670/// Defines additional types related to [SslSettings].
6671pub mod ssl_settings {
6672    #[allow(unused_imports)]
6673    use super::*;
6674
6675    /// The SSL management type for this domain.
6676    ///
6677    /// # Working with unknown values
6678    ///
6679    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6680    /// additional enum variants at any time. Adding new variants is not considered
6681    /// a breaking change. Applications should write their code in anticipation of:
6682    ///
6683    /// - New values appearing in future releases of the client library, **and**
6684    /// - New values received dynamically, without application changes.
6685    ///
6686    /// Please consult the [Working with enums] section in the user guide for some
6687    /// guidelines.
6688    ///
6689    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
6690    #[derive(Clone, Debug, PartialEq)]
6691    #[non_exhaustive]
6692    pub enum SslManagementType {
6693        /// Defaults to `AUTOMATIC`.
6694        Unspecified,
6695        /// SSL support for this domain is configured automatically. The mapped SSL
6696        /// certificate will be automatically renewed.
6697        Automatic,
6698        /// SSL support for this domain is configured manually by the user. Either
6699        /// the domain has no SSL support or a user-obtained SSL certificate has been
6700        /// explictly mapped to this domain.
6701        Manual,
6702        /// If set, the enum was initialized with an unknown value.
6703        ///
6704        /// Applications can examine the value using [SslManagementType::value] or
6705        /// [SslManagementType::name].
6706        UnknownValue(ssl_management_type::UnknownValue),
6707    }
6708
6709    #[doc(hidden)]
6710    pub mod ssl_management_type {
6711        #[allow(unused_imports)]
6712        use super::*;
6713        #[derive(Clone, Debug, PartialEq)]
6714        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6715    }
6716
6717    impl SslManagementType {
6718        /// Gets the enum value.
6719        ///
6720        /// Returns `None` if the enum contains an unknown value deserialized from
6721        /// the string representation of enums.
6722        pub fn value(&self) -> std::option::Option<i32> {
6723            match self {
6724                Self::Unspecified => std::option::Option::Some(0),
6725                Self::Automatic => std::option::Option::Some(1),
6726                Self::Manual => std::option::Option::Some(2),
6727                Self::UnknownValue(u) => u.0.value(),
6728            }
6729        }
6730
6731        /// Gets the enum value as a string.
6732        ///
6733        /// Returns `None` if the enum contains an unknown value deserialized from
6734        /// the integer representation of enums.
6735        pub fn name(&self) -> std::option::Option<&str> {
6736            match self {
6737                Self::Unspecified => std::option::Option::Some("SSL_MANAGEMENT_TYPE_UNSPECIFIED"),
6738                Self::Automatic => std::option::Option::Some("AUTOMATIC"),
6739                Self::Manual => std::option::Option::Some("MANUAL"),
6740                Self::UnknownValue(u) => u.0.name(),
6741            }
6742        }
6743    }
6744
6745    impl std::default::Default for SslManagementType {
6746        fn default() -> Self {
6747            use std::convert::From;
6748            Self::from(0)
6749        }
6750    }
6751
6752    impl std::fmt::Display for SslManagementType {
6753        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6754            wkt::internal::display_enum(f, self.name(), self.value())
6755        }
6756    }
6757
6758    impl std::convert::From<i32> for SslManagementType {
6759        fn from(value: i32) -> Self {
6760            match value {
6761                0 => Self::Unspecified,
6762                1 => Self::Automatic,
6763                2 => Self::Manual,
6764                _ => Self::UnknownValue(ssl_management_type::UnknownValue(
6765                    wkt::internal::UnknownEnumValue::Integer(value),
6766                )),
6767            }
6768        }
6769    }
6770
6771    impl std::convert::From<&str> for SslManagementType {
6772        fn from(value: &str) -> Self {
6773            use std::string::ToString;
6774            match value {
6775                "SSL_MANAGEMENT_TYPE_UNSPECIFIED" => Self::Unspecified,
6776                "AUTOMATIC" => Self::Automatic,
6777                "MANUAL" => Self::Manual,
6778                _ => Self::UnknownValue(ssl_management_type::UnknownValue(
6779                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6780                )),
6781            }
6782        }
6783    }
6784
6785    impl serde::ser::Serialize for SslManagementType {
6786        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6787        where
6788            S: serde::Serializer,
6789        {
6790            match self {
6791                Self::Unspecified => serializer.serialize_i32(0),
6792                Self::Automatic => serializer.serialize_i32(1),
6793                Self::Manual => serializer.serialize_i32(2),
6794                Self::UnknownValue(u) => u.0.serialize(serializer),
6795            }
6796        }
6797    }
6798
6799    impl<'de> serde::de::Deserialize<'de> for SslManagementType {
6800        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6801        where
6802            D: serde::Deserializer<'de>,
6803        {
6804            deserializer.deserialize_any(wkt::internal::EnumVisitor::<SslManagementType>::new(
6805                ".google.appengine.v1.SslSettings.SslManagementType",
6806            ))
6807        }
6808    }
6809}
6810
6811/// A DNS resource record.
6812#[derive(Clone, Default, PartialEq)]
6813#[non_exhaustive]
6814pub struct ResourceRecord {
6815    /// Relative name of the object affected by this record. Only applicable for
6816    /// `CNAME` records. Example: 'www'.
6817    pub name: std::string::String,
6818
6819    /// Data for this record. Values vary by record type, as defined in RFC 1035
6820    /// (section 5) and RFC 1034 (section 3.6.1).
6821    pub rrdata: std::string::String,
6822
6823    /// Resource record type. Example: `AAAA`.
6824    pub r#type: crate::model::resource_record::RecordType,
6825
6826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6827}
6828
6829impl ResourceRecord {
6830    /// Creates a new default instance.
6831    pub fn new() -> Self {
6832        std::default::Default::default()
6833    }
6834
6835    /// Sets the value of [name][crate::model::ResourceRecord::name].
6836    ///
6837    /// # Example
6838    /// ```ignore,no_run
6839    /// # use google_cloud_appengine_v1::model::ResourceRecord;
6840    /// let x = ResourceRecord::new().set_name("example");
6841    /// ```
6842    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6843        self.name = v.into();
6844        self
6845    }
6846
6847    /// Sets the value of [rrdata][crate::model::ResourceRecord::rrdata].
6848    ///
6849    /// # Example
6850    /// ```ignore,no_run
6851    /// # use google_cloud_appengine_v1::model::ResourceRecord;
6852    /// let x = ResourceRecord::new().set_rrdata("example");
6853    /// ```
6854    pub fn set_rrdata<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6855        self.rrdata = v.into();
6856        self
6857    }
6858
6859    /// Sets the value of [r#type][crate::model::ResourceRecord::type].
6860    ///
6861    /// # Example
6862    /// ```ignore,no_run
6863    /// # use google_cloud_appengine_v1::model::ResourceRecord;
6864    /// use google_cloud_appengine_v1::model::resource_record::RecordType;
6865    /// let x0 = ResourceRecord::new().set_type(RecordType::A);
6866    /// let x1 = ResourceRecord::new().set_type(RecordType::Aaaa);
6867    /// let x2 = ResourceRecord::new().set_type(RecordType::Cname);
6868    /// ```
6869    pub fn set_type<T: std::convert::Into<crate::model::resource_record::RecordType>>(
6870        mut self,
6871        v: T,
6872    ) -> Self {
6873        self.r#type = v.into();
6874        self
6875    }
6876}
6877
6878impl wkt::message::Message for ResourceRecord {
6879    fn typename() -> &'static str {
6880        "type.googleapis.com/google.appengine.v1.ResourceRecord"
6881    }
6882}
6883
6884/// Defines additional types related to [ResourceRecord].
6885pub mod resource_record {
6886    #[allow(unused_imports)]
6887    use super::*;
6888
6889    /// A resource record type.
6890    ///
6891    /// # Working with unknown values
6892    ///
6893    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6894    /// additional enum variants at any time. Adding new variants is not considered
6895    /// a breaking change. Applications should write their code in anticipation of:
6896    ///
6897    /// - New values appearing in future releases of the client library, **and**
6898    /// - New values received dynamically, without application changes.
6899    ///
6900    /// Please consult the [Working with enums] section in the user guide for some
6901    /// guidelines.
6902    ///
6903    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
6904    #[derive(Clone, Debug, PartialEq)]
6905    #[non_exhaustive]
6906    pub enum RecordType {
6907        /// An unknown resource record.
6908        Unspecified,
6909        /// An A resource record. Data is an IPv4 address.
6910        A,
6911        /// An AAAA resource record. Data is an IPv6 address.
6912        Aaaa,
6913        /// A CNAME resource record. Data is a domain name to be aliased.
6914        Cname,
6915        /// If set, the enum was initialized with an unknown value.
6916        ///
6917        /// Applications can examine the value using [RecordType::value] or
6918        /// [RecordType::name].
6919        UnknownValue(record_type::UnknownValue),
6920    }
6921
6922    #[doc(hidden)]
6923    pub mod record_type {
6924        #[allow(unused_imports)]
6925        use super::*;
6926        #[derive(Clone, Debug, PartialEq)]
6927        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6928    }
6929
6930    impl RecordType {
6931        /// Gets the enum value.
6932        ///
6933        /// Returns `None` if the enum contains an unknown value deserialized from
6934        /// the string representation of enums.
6935        pub fn value(&self) -> std::option::Option<i32> {
6936            match self {
6937                Self::Unspecified => std::option::Option::Some(0),
6938                Self::A => std::option::Option::Some(1),
6939                Self::Aaaa => std::option::Option::Some(2),
6940                Self::Cname => std::option::Option::Some(3),
6941                Self::UnknownValue(u) => u.0.value(),
6942            }
6943        }
6944
6945        /// Gets the enum value as a string.
6946        ///
6947        /// Returns `None` if the enum contains an unknown value deserialized from
6948        /// the integer representation of enums.
6949        pub fn name(&self) -> std::option::Option<&str> {
6950            match self {
6951                Self::Unspecified => std::option::Option::Some("RECORD_TYPE_UNSPECIFIED"),
6952                Self::A => std::option::Option::Some("A"),
6953                Self::Aaaa => std::option::Option::Some("AAAA"),
6954                Self::Cname => std::option::Option::Some("CNAME"),
6955                Self::UnknownValue(u) => u.0.name(),
6956            }
6957        }
6958    }
6959
6960    impl std::default::Default for RecordType {
6961        fn default() -> Self {
6962            use std::convert::From;
6963            Self::from(0)
6964        }
6965    }
6966
6967    impl std::fmt::Display for RecordType {
6968        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6969            wkt::internal::display_enum(f, self.name(), self.value())
6970        }
6971    }
6972
6973    impl std::convert::From<i32> for RecordType {
6974        fn from(value: i32) -> Self {
6975            match value {
6976                0 => Self::Unspecified,
6977                1 => Self::A,
6978                2 => Self::Aaaa,
6979                3 => Self::Cname,
6980                _ => Self::UnknownValue(record_type::UnknownValue(
6981                    wkt::internal::UnknownEnumValue::Integer(value),
6982                )),
6983            }
6984        }
6985    }
6986
6987    impl std::convert::From<&str> for RecordType {
6988        fn from(value: &str) -> Self {
6989            use std::string::ToString;
6990            match value {
6991                "RECORD_TYPE_UNSPECIFIED" => Self::Unspecified,
6992                "A" => Self::A,
6993                "AAAA" => Self::Aaaa,
6994                "CNAME" => Self::Cname,
6995                _ => Self::UnknownValue(record_type::UnknownValue(
6996                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6997                )),
6998            }
6999        }
7000    }
7001
7002    impl serde::ser::Serialize for RecordType {
7003        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7004        where
7005            S: serde::Serializer,
7006        {
7007            match self {
7008                Self::Unspecified => serializer.serialize_i32(0),
7009                Self::A => serializer.serialize_i32(1),
7010                Self::Aaaa => serializer.serialize_i32(2),
7011                Self::Cname => serializer.serialize_i32(3),
7012                Self::UnknownValue(u) => u.0.serialize(serializer),
7013            }
7014        }
7015    }
7016
7017    impl<'de> serde::de::Deserialize<'de> for RecordType {
7018        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7019        where
7020            D: serde::Deserializer<'de>,
7021        {
7022            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RecordType>::new(
7023                ".google.appengine.v1.ResourceRecord.RecordType",
7024            ))
7025        }
7026    }
7027}
7028
7029/// A single firewall rule that is evaluated against incoming traffic
7030/// and provides an action to take on matched requests.
7031#[derive(Clone, Default, PartialEq)]
7032#[non_exhaustive]
7033pub struct FirewallRule {
7034    /// A positive integer between [1, Int32.MaxValue-1] that defines the order of
7035    /// rule evaluation. Rules with the lowest priority are evaluated first.
7036    ///
7037    /// A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic
7038    /// when no previous rule matches. Only the action of this rule can be modified
7039    /// by the user.
7040    pub priority: i32,
7041
7042    /// The action to take on matched requests.
7043    pub action: crate::model::firewall_rule::Action,
7044
7045    /// IP address or range, defined using CIDR notation, of requests that this
7046    /// rule applies to. You can use the wildcard character "*" to match all IPs
7047    /// equivalent to "0/0" and "::/0" together.
7048    /// Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
7049    /// or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
7050    pub source_range: std::string::String,
7051
7052    /// An optional string description of this rule.
7053    /// This field has a maximum length of 100 characters.
7054    pub description: std::string::String,
7055
7056    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7057}
7058
7059impl FirewallRule {
7060    /// Creates a new default instance.
7061    pub fn new() -> Self {
7062        std::default::Default::default()
7063    }
7064
7065    /// Sets the value of [priority][crate::model::FirewallRule::priority].
7066    ///
7067    /// # Example
7068    /// ```ignore,no_run
7069    /// # use google_cloud_appengine_v1::model::FirewallRule;
7070    /// let x = FirewallRule::new().set_priority(42);
7071    /// ```
7072    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7073        self.priority = v.into();
7074        self
7075    }
7076
7077    /// Sets the value of [action][crate::model::FirewallRule::action].
7078    ///
7079    /// # Example
7080    /// ```ignore,no_run
7081    /// # use google_cloud_appengine_v1::model::FirewallRule;
7082    /// use google_cloud_appengine_v1::model::firewall_rule::Action;
7083    /// let x0 = FirewallRule::new().set_action(Action::Allow);
7084    /// let x1 = FirewallRule::new().set_action(Action::Deny);
7085    /// ```
7086    pub fn set_action<T: std::convert::Into<crate::model::firewall_rule::Action>>(
7087        mut self,
7088        v: T,
7089    ) -> Self {
7090        self.action = v.into();
7091        self
7092    }
7093
7094    /// Sets the value of [source_range][crate::model::FirewallRule::source_range].
7095    ///
7096    /// # Example
7097    /// ```ignore,no_run
7098    /// # use google_cloud_appengine_v1::model::FirewallRule;
7099    /// let x = FirewallRule::new().set_source_range("example");
7100    /// ```
7101    pub fn set_source_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7102        self.source_range = v.into();
7103        self
7104    }
7105
7106    /// Sets the value of [description][crate::model::FirewallRule::description].
7107    ///
7108    /// # Example
7109    /// ```ignore,no_run
7110    /// # use google_cloud_appengine_v1::model::FirewallRule;
7111    /// let x = FirewallRule::new().set_description("example");
7112    /// ```
7113    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7114        self.description = v.into();
7115        self
7116    }
7117}
7118
7119impl wkt::message::Message for FirewallRule {
7120    fn typename() -> &'static str {
7121        "type.googleapis.com/google.appengine.v1.FirewallRule"
7122    }
7123}
7124
7125/// Defines additional types related to [FirewallRule].
7126pub mod firewall_rule {
7127    #[allow(unused_imports)]
7128    use super::*;
7129
7130    /// Available actions to take on matching requests.
7131    ///
7132    /// # Working with unknown values
7133    ///
7134    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7135    /// additional enum variants at any time. Adding new variants is not considered
7136    /// a breaking change. Applications should write their code in anticipation of:
7137    ///
7138    /// - New values appearing in future releases of the client library, **and**
7139    /// - New values received dynamically, without application changes.
7140    ///
7141    /// Please consult the [Working with enums] section in the user guide for some
7142    /// guidelines.
7143    ///
7144    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7145    #[derive(Clone, Debug, PartialEq)]
7146    #[non_exhaustive]
7147    pub enum Action {
7148        #[allow(missing_docs)]
7149        UnspecifiedAction,
7150        /// Matching requests are allowed.
7151        Allow,
7152        /// Matching requests are denied.
7153        Deny,
7154        /// If set, the enum was initialized with an unknown value.
7155        ///
7156        /// Applications can examine the value using [Action::value] or
7157        /// [Action::name].
7158        UnknownValue(action::UnknownValue),
7159    }
7160
7161    #[doc(hidden)]
7162    pub mod action {
7163        #[allow(unused_imports)]
7164        use super::*;
7165        #[derive(Clone, Debug, PartialEq)]
7166        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7167    }
7168
7169    impl Action {
7170        /// Gets the enum value.
7171        ///
7172        /// Returns `None` if the enum contains an unknown value deserialized from
7173        /// the string representation of enums.
7174        pub fn value(&self) -> std::option::Option<i32> {
7175            match self {
7176                Self::UnspecifiedAction => std::option::Option::Some(0),
7177                Self::Allow => std::option::Option::Some(1),
7178                Self::Deny => std::option::Option::Some(2),
7179                Self::UnknownValue(u) => u.0.value(),
7180            }
7181        }
7182
7183        /// Gets the enum value as a string.
7184        ///
7185        /// Returns `None` if the enum contains an unknown value deserialized from
7186        /// the integer representation of enums.
7187        pub fn name(&self) -> std::option::Option<&str> {
7188            match self {
7189                Self::UnspecifiedAction => std::option::Option::Some("UNSPECIFIED_ACTION"),
7190                Self::Allow => std::option::Option::Some("ALLOW"),
7191                Self::Deny => std::option::Option::Some("DENY"),
7192                Self::UnknownValue(u) => u.0.name(),
7193            }
7194        }
7195    }
7196
7197    impl std::default::Default for Action {
7198        fn default() -> Self {
7199            use std::convert::From;
7200            Self::from(0)
7201        }
7202    }
7203
7204    impl std::fmt::Display for Action {
7205        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7206            wkt::internal::display_enum(f, self.name(), self.value())
7207        }
7208    }
7209
7210    impl std::convert::From<i32> for Action {
7211        fn from(value: i32) -> Self {
7212            match value {
7213                0 => Self::UnspecifiedAction,
7214                1 => Self::Allow,
7215                2 => Self::Deny,
7216                _ => Self::UnknownValue(action::UnknownValue(
7217                    wkt::internal::UnknownEnumValue::Integer(value),
7218                )),
7219            }
7220        }
7221    }
7222
7223    impl std::convert::From<&str> for Action {
7224        fn from(value: &str) -> Self {
7225            use std::string::ToString;
7226            match value {
7227                "UNSPECIFIED_ACTION" => Self::UnspecifiedAction,
7228                "ALLOW" => Self::Allow,
7229                "DENY" => Self::Deny,
7230                _ => Self::UnknownValue(action::UnknownValue(
7231                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7232                )),
7233            }
7234        }
7235    }
7236
7237    impl serde::ser::Serialize for Action {
7238        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7239        where
7240            S: serde::Serializer,
7241        {
7242            match self {
7243                Self::UnspecifiedAction => serializer.serialize_i32(0),
7244                Self::Allow => serializer.serialize_i32(1),
7245                Self::Deny => serializer.serialize_i32(2),
7246                Self::UnknownValue(u) => u.0.serialize(serializer),
7247            }
7248        }
7249    }
7250
7251    impl<'de> serde::de::Deserialize<'de> for Action {
7252        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7253        where
7254            D: serde::Deserializer<'de>,
7255        {
7256            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
7257                ".google.appengine.v1.FirewallRule.Action",
7258            ))
7259        }
7260    }
7261}
7262
7263/// An Instance resource is the computing unit that App Engine uses to
7264/// automatically scale an application.
7265#[derive(Clone, Default, PartialEq)]
7266#[non_exhaustive]
7267pub struct Instance {
7268    /// Output only. Full path to the Instance resource in the API.
7269    /// Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
7270    pub name: std::string::String,
7271
7272    /// Output only. Relative name of the instance within the version.
7273    /// Example: `instance-1`.
7274    pub id: std::string::String,
7275
7276    /// Output only. App Engine release this instance is running on.
7277    pub app_engine_release: std::string::String,
7278
7279    /// Output only. Availability of the instance.
7280    pub availability: crate::model::instance::Availability,
7281
7282    /// Output only. Name of the virtual machine where this instance lives. Only applicable
7283    /// for instances in App Engine flexible environment.
7284    pub vm_name: std::string::String,
7285
7286    /// Output only. Zone where the virtual machine is located. Only applicable for instances
7287    /// in App Engine flexible environment.
7288    pub vm_zone_name: std::string::String,
7289
7290    /// Output only. Virtual machine ID of this instance. Only applicable for instances in
7291    /// App Engine flexible environment.
7292    pub vm_id: std::string::String,
7293
7294    /// Output only. Time that this instance was started.
7295    ///
7296    /// @OutputOnly
7297    pub start_time: std::option::Option<wkt::Timestamp>,
7298
7299    /// Output only. Number of requests since this instance was started.
7300    pub requests: i32,
7301
7302    /// Output only. Number of errors since this instance was started.
7303    pub errors: i32,
7304
7305    /// Output only. Average queries per second (QPS) over the last minute.
7306    pub qps: f32,
7307
7308    /// Output only. Average latency (ms) over the last minute.
7309    pub average_latency: i32,
7310
7311    /// Output only. Total memory in use (bytes).
7312    pub memory_usage: i64,
7313
7314    /// Output only. Status of the virtual machine where this instance lives. Only applicable
7315    /// for instances in App Engine flexible environment.
7316    pub vm_status: std::string::String,
7317
7318    /// Output only. Whether this instance is in debug mode. Only applicable for instances in
7319    /// App Engine flexible environment.
7320    pub vm_debug_enabled: bool,
7321
7322    /// Output only. The IP address of this instance. Only applicable for instances in App
7323    /// Engine flexible environment.
7324    pub vm_ip: std::string::String,
7325
7326    /// Output only. The liveness health check of this instance. Only applicable for instances
7327    /// in App Engine flexible environment.
7328    pub vm_liveness: crate::model::instance::liveness::LivenessState,
7329
7330    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7331}
7332
7333impl Instance {
7334    /// Creates a new default instance.
7335    pub fn new() -> Self {
7336        std::default::Default::default()
7337    }
7338
7339    /// Sets the value of [name][crate::model::Instance::name].
7340    ///
7341    /// # Example
7342    /// ```ignore,no_run
7343    /// # use google_cloud_appengine_v1::model::Instance;
7344    /// let x = Instance::new().set_name("example");
7345    /// ```
7346    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7347        self.name = v.into();
7348        self
7349    }
7350
7351    /// Sets the value of [id][crate::model::Instance::id].
7352    ///
7353    /// # Example
7354    /// ```ignore,no_run
7355    /// # use google_cloud_appengine_v1::model::Instance;
7356    /// let x = Instance::new().set_id("example");
7357    /// ```
7358    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7359        self.id = v.into();
7360        self
7361    }
7362
7363    /// Sets the value of [app_engine_release][crate::model::Instance::app_engine_release].
7364    ///
7365    /// # Example
7366    /// ```ignore,no_run
7367    /// # use google_cloud_appengine_v1::model::Instance;
7368    /// let x = Instance::new().set_app_engine_release("example");
7369    /// ```
7370    pub fn set_app_engine_release<T: std::convert::Into<std::string::String>>(
7371        mut self,
7372        v: T,
7373    ) -> Self {
7374        self.app_engine_release = v.into();
7375        self
7376    }
7377
7378    /// Sets the value of [availability][crate::model::Instance::availability].
7379    ///
7380    /// # Example
7381    /// ```ignore,no_run
7382    /// # use google_cloud_appengine_v1::model::Instance;
7383    /// use google_cloud_appengine_v1::model::instance::Availability;
7384    /// let x0 = Instance::new().set_availability(Availability::Resident);
7385    /// let x1 = Instance::new().set_availability(Availability::Dynamic);
7386    /// ```
7387    pub fn set_availability<T: std::convert::Into<crate::model::instance::Availability>>(
7388        mut self,
7389        v: T,
7390    ) -> Self {
7391        self.availability = v.into();
7392        self
7393    }
7394
7395    /// Sets the value of [vm_name][crate::model::Instance::vm_name].
7396    ///
7397    /// # Example
7398    /// ```ignore,no_run
7399    /// # use google_cloud_appengine_v1::model::Instance;
7400    /// let x = Instance::new().set_vm_name("example");
7401    /// ```
7402    pub fn set_vm_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7403        self.vm_name = v.into();
7404        self
7405    }
7406
7407    /// Sets the value of [vm_zone_name][crate::model::Instance::vm_zone_name].
7408    ///
7409    /// # Example
7410    /// ```ignore,no_run
7411    /// # use google_cloud_appengine_v1::model::Instance;
7412    /// let x = Instance::new().set_vm_zone_name("example");
7413    /// ```
7414    pub fn set_vm_zone_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7415        self.vm_zone_name = v.into();
7416        self
7417    }
7418
7419    /// Sets the value of [vm_id][crate::model::Instance::vm_id].
7420    ///
7421    /// # Example
7422    /// ```ignore,no_run
7423    /// # use google_cloud_appengine_v1::model::Instance;
7424    /// let x = Instance::new().set_vm_id("example");
7425    /// ```
7426    pub fn set_vm_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7427        self.vm_id = v.into();
7428        self
7429    }
7430
7431    /// Sets the value of [start_time][crate::model::Instance::start_time].
7432    ///
7433    /// # Example
7434    /// ```ignore,no_run
7435    /// # use google_cloud_appengine_v1::model::Instance;
7436    /// use wkt::Timestamp;
7437    /// let x = Instance::new().set_start_time(Timestamp::default()/* use setters */);
7438    /// ```
7439    pub fn set_start_time<T>(mut self, v: T) -> Self
7440    where
7441        T: std::convert::Into<wkt::Timestamp>,
7442    {
7443        self.start_time = std::option::Option::Some(v.into());
7444        self
7445    }
7446
7447    /// Sets or clears the value of [start_time][crate::model::Instance::start_time].
7448    ///
7449    /// # Example
7450    /// ```ignore,no_run
7451    /// # use google_cloud_appengine_v1::model::Instance;
7452    /// use wkt::Timestamp;
7453    /// let x = Instance::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
7454    /// let x = Instance::new().set_or_clear_start_time(None::<Timestamp>);
7455    /// ```
7456    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
7457    where
7458        T: std::convert::Into<wkt::Timestamp>,
7459    {
7460        self.start_time = v.map(|x| x.into());
7461        self
7462    }
7463
7464    /// Sets the value of [requests][crate::model::Instance::requests].
7465    ///
7466    /// # Example
7467    /// ```ignore,no_run
7468    /// # use google_cloud_appengine_v1::model::Instance;
7469    /// let x = Instance::new().set_requests(42);
7470    /// ```
7471    pub fn set_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7472        self.requests = v.into();
7473        self
7474    }
7475
7476    /// Sets the value of [errors][crate::model::Instance::errors].
7477    ///
7478    /// # Example
7479    /// ```ignore,no_run
7480    /// # use google_cloud_appengine_v1::model::Instance;
7481    /// let x = Instance::new().set_errors(42);
7482    /// ```
7483    pub fn set_errors<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7484        self.errors = v.into();
7485        self
7486    }
7487
7488    /// Sets the value of [qps][crate::model::Instance::qps].
7489    ///
7490    /// # Example
7491    /// ```ignore,no_run
7492    /// # use google_cloud_appengine_v1::model::Instance;
7493    /// let x = Instance::new().set_qps(42.0);
7494    /// ```
7495    pub fn set_qps<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
7496        self.qps = v.into();
7497        self
7498    }
7499
7500    /// Sets the value of [average_latency][crate::model::Instance::average_latency].
7501    ///
7502    /// # Example
7503    /// ```ignore,no_run
7504    /// # use google_cloud_appengine_v1::model::Instance;
7505    /// let x = Instance::new().set_average_latency(42);
7506    /// ```
7507    pub fn set_average_latency<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7508        self.average_latency = v.into();
7509        self
7510    }
7511
7512    /// Sets the value of [memory_usage][crate::model::Instance::memory_usage].
7513    ///
7514    /// # Example
7515    /// ```ignore,no_run
7516    /// # use google_cloud_appengine_v1::model::Instance;
7517    /// let x = Instance::new().set_memory_usage(42);
7518    /// ```
7519    pub fn set_memory_usage<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7520        self.memory_usage = v.into();
7521        self
7522    }
7523
7524    /// Sets the value of [vm_status][crate::model::Instance::vm_status].
7525    ///
7526    /// # Example
7527    /// ```ignore,no_run
7528    /// # use google_cloud_appengine_v1::model::Instance;
7529    /// let x = Instance::new().set_vm_status("example");
7530    /// ```
7531    pub fn set_vm_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7532        self.vm_status = v.into();
7533        self
7534    }
7535
7536    /// Sets the value of [vm_debug_enabled][crate::model::Instance::vm_debug_enabled].
7537    ///
7538    /// # Example
7539    /// ```ignore,no_run
7540    /// # use google_cloud_appengine_v1::model::Instance;
7541    /// let x = Instance::new().set_vm_debug_enabled(true);
7542    /// ```
7543    pub fn set_vm_debug_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7544        self.vm_debug_enabled = v.into();
7545        self
7546    }
7547
7548    /// Sets the value of [vm_ip][crate::model::Instance::vm_ip].
7549    ///
7550    /// # Example
7551    /// ```ignore,no_run
7552    /// # use google_cloud_appengine_v1::model::Instance;
7553    /// let x = Instance::new().set_vm_ip("example");
7554    /// ```
7555    pub fn set_vm_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7556        self.vm_ip = v.into();
7557        self
7558    }
7559
7560    /// Sets the value of [vm_liveness][crate::model::Instance::vm_liveness].
7561    ///
7562    /// # Example
7563    /// ```ignore,no_run
7564    /// # use google_cloud_appengine_v1::model::Instance;
7565    /// use google_cloud_appengine_v1::model::instance::liveness::LivenessState;
7566    /// let x0 = Instance::new().set_vm_liveness(LivenessState::Unknown);
7567    /// let x1 = Instance::new().set_vm_liveness(LivenessState::Healthy);
7568    /// let x2 = Instance::new().set_vm_liveness(LivenessState::Unhealthy);
7569    /// ```
7570    pub fn set_vm_liveness<
7571        T: std::convert::Into<crate::model::instance::liveness::LivenessState>,
7572    >(
7573        mut self,
7574        v: T,
7575    ) -> Self {
7576        self.vm_liveness = v.into();
7577        self
7578    }
7579}
7580
7581impl wkt::message::Message for Instance {
7582    fn typename() -> &'static str {
7583        "type.googleapis.com/google.appengine.v1.Instance"
7584    }
7585}
7586
7587/// Defines additional types related to [Instance].
7588pub mod instance {
7589    #[allow(unused_imports)]
7590    use super::*;
7591
7592    /// Wrapper for LivenessState enum.
7593    #[derive(Clone, Default, PartialEq)]
7594    #[non_exhaustive]
7595    pub struct Liveness {
7596        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7597    }
7598
7599    impl Liveness {
7600        /// Creates a new default instance.
7601        pub fn new() -> Self {
7602            std::default::Default::default()
7603        }
7604    }
7605
7606    impl wkt::message::Message for Liveness {
7607        fn typename() -> &'static str {
7608            "type.googleapis.com/google.appengine.v1.Instance.Liveness"
7609        }
7610    }
7611
7612    /// Defines additional types related to [Liveness].
7613    pub mod liveness {
7614        #[allow(unused_imports)]
7615        use super::*;
7616
7617        /// Liveness health check status for Flex instances.
7618        ///
7619        /// # Working with unknown values
7620        ///
7621        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7622        /// additional enum variants at any time. Adding new variants is not considered
7623        /// a breaking change. Applications should write their code in anticipation of:
7624        ///
7625        /// - New values appearing in future releases of the client library, **and**
7626        /// - New values received dynamically, without application changes.
7627        ///
7628        /// Please consult the [Working with enums] section in the user guide for some
7629        /// guidelines.
7630        ///
7631        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7632        #[derive(Clone, Debug, PartialEq)]
7633        #[non_exhaustive]
7634        pub enum LivenessState {
7635            /// There is no liveness health check for the instance. Only applicable for
7636            /// instances in App Engine standard environment.
7637            Unspecified,
7638            /// The health checking system is aware of the instance but its health is
7639            /// not known at the moment.
7640            Unknown,
7641            /// The instance is reachable i.e. a connection to the application health
7642            /// checking endpoint can be established, and conforms to the requirements
7643            /// defined by the health check.
7644            Healthy,
7645            /// The instance is reachable, but does not conform to the requirements
7646            /// defined by the health check.
7647            Unhealthy,
7648            /// The instance is being drained. The existing connections to the instance
7649            /// have time to complete, but the new ones are being refused.
7650            Draining,
7651            /// The instance is unreachable i.e. a connection to the application health
7652            /// checking endpoint cannot be established, or the server does not respond
7653            /// within the specified timeout.
7654            Timeout,
7655            /// If set, the enum was initialized with an unknown value.
7656            ///
7657            /// Applications can examine the value using [LivenessState::value] or
7658            /// [LivenessState::name].
7659            UnknownValue(liveness_state::UnknownValue),
7660        }
7661
7662        #[doc(hidden)]
7663        pub mod liveness_state {
7664            #[allow(unused_imports)]
7665            use super::*;
7666            #[derive(Clone, Debug, PartialEq)]
7667            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7668        }
7669
7670        impl LivenessState {
7671            /// Gets the enum value.
7672            ///
7673            /// Returns `None` if the enum contains an unknown value deserialized from
7674            /// the string representation of enums.
7675            pub fn value(&self) -> std::option::Option<i32> {
7676                match self {
7677                    Self::Unspecified => std::option::Option::Some(0),
7678                    Self::Unknown => std::option::Option::Some(1),
7679                    Self::Healthy => std::option::Option::Some(2),
7680                    Self::Unhealthy => std::option::Option::Some(3),
7681                    Self::Draining => std::option::Option::Some(4),
7682                    Self::Timeout => std::option::Option::Some(5),
7683                    Self::UnknownValue(u) => u.0.value(),
7684                }
7685            }
7686
7687            /// Gets the enum value as a string.
7688            ///
7689            /// Returns `None` if the enum contains an unknown value deserialized from
7690            /// the integer representation of enums.
7691            pub fn name(&self) -> std::option::Option<&str> {
7692                match self {
7693                    Self::Unspecified => std::option::Option::Some("LIVENESS_STATE_UNSPECIFIED"),
7694                    Self::Unknown => std::option::Option::Some("UNKNOWN"),
7695                    Self::Healthy => std::option::Option::Some("HEALTHY"),
7696                    Self::Unhealthy => std::option::Option::Some("UNHEALTHY"),
7697                    Self::Draining => std::option::Option::Some("DRAINING"),
7698                    Self::Timeout => std::option::Option::Some("TIMEOUT"),
7699                    Self::UnknownValue(u) => u.0.name(),
7700                }
7701            }
7702        }
7703
7704        impl std::default::Default for LivenessState {
7705            fn default() -> Self {
7706                use std::convert::From;
7707                Self::from(0)
7708            }
7709        }
7710
7711        impl std::fmt::Display for LivenessState {
7712            fn fmt(
7713                &self,
7714                f: &mut std::fmt::Formatter<'_>,
7715            ) -> std::result::Result<(), std::fmt::Error> {
7716                wkt::internal::display_enum(f, self.name(), self.value())
7717            }
7718        }
7719
7720        impl std::convert::From<i32> for LivenessState {
7721            fn from(value: i32) -> Self {
7722                match value {
7723                    0 => Self::Unspecified,
7724                    1 => Self::Unknown,
7725                    2 => Self::Healthy,
7726                    3 => Self::Unhealthy,
7727                    4 => Self::Draining,
7728                    5 => Self::Timeout,
7729                    _ => Self::UnknownValue(liveness_state::UnknownValue(
7730                        wkt::internal::UnknownEnumValue::Integer(value),
7731                    )),
7732                }
7733            }
7734        }
7735
7736        impl std::convert::From<&str> for LivenessState {
7737            fn from(value: &str) -> Self {
7738                use std::string::ToString;
7739                match value {
7740                    "LIVENESS_STATE_UNSPECIFIED" => Self::Unspecified,
7741                    "UNKNOWN" => Self::Unknown,
7742                    "HEALTHY" => Self::Healthy,
7743                    "UNHEALTHY" => Self::Unhealthy,
7744                    "DRAINING" => Self::Draining,
7745                    "TIMEOUT" => Self::Timeout,
7746                    _ => Self::UnknownValue(liveness_state::UnknownValue(
7747                        wkt::internal::UnknownEnumValue::String(value.to_string()),
7748                    )),
7749                }
7750            }
7751        }
7752
7753        impl serde::ser::Serialize for LivenessState {
7754            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7755            where
7756                S: serde::Serializer,
7757            {
7758                match self {
7759                    Self::Unspecified => serializer.serialize_i32(0),
7760                    Self::Unknown => serializer.serialize_i32(1),
7761                    Self::Healthy => serializer.serialize_i32(2),
7762                    Self::Unhealthy => serializer.serialize_i32(3),
7763                    Self::Draining => serializer.serialize_i32(4),
7764                    Self::Timeout => serializer.serialize_i32(5),
7765                    Self::UnknownValue(u) => u.0.serialize(serializer),
7766                }
7767            }
7768        }
7769
7770        impl<'de> serde::de::Deserialize<'de> for LivenessState {
7771            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7772            where
7773                D: serde::Deserializer<'de>,
7774            {
7775                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LivenessState>::new(
7776                    ".google.appengine.v1.Instance.Liveness.LivenessState",
7777                ))
7778            }
7779        }
7780    }
7781
7782    /// Availability of the instance.
7783    ///
7784    /// # Working with unknown values
7785    ///
7786    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7787    /// additional enum variants at any time. Adding new variants is not considered
7788    /// a breaking change. Applications should write their code in anticipation of:
7789    ///
7790    /// - New values appearing in future releases of the client library, **and**
7791    /// - New values received dynamically, without application changes.
7792    ///
7793    /// Please consult the [Working with enums] section in the user guide for some
7794    /// guidelines.
7795    ///
7796    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7797    #[derive(Clone, Debug, PartialEq)]
7798    #[non_exhaustive]
7799    pub enum Availability {
7800        #[allow(missing_docs)]
7801        Unspecified,
7802        #[allow(missing_docs)]
7803        Resident,
7804        #[allow(missing_docs)]
7805        Dynamic,
7806        /// If set, the enum was initialized with an unknown value.
7807        ///
7808        /// Applications can examine the value using [Availability::value] or
7809        /// [Availability::name].
7810        UnknownValue(availability::UnknownValue),
7811    }
7812
7813    #[doc(hidden)]
7814    pub mod availability {
7815        #[allow(unused_imports)]
7816        use super::*;
7817        #[derive(Clone, Debug, PartialEq)]
7818        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7819    }
7820
7821    impl Availability {
7822        /// Gets the enum value.
7823        ///
7824        /// Returns `None` if the enum contains an unknown value deserialized from
7825        /// the string representation of enums.
7826        pub fn value(&self) -> std::option::Option<i32> {
7827            match self {
7828                Self::Unspecified => std::option::Option::Some(0),
7829                Self::Resident => std::option::Option::Some(1),
7830                Self::Dynamic => std::option::Option::Some(2),
7831                Self::UnknownValue(u) => u.0.value(),
7832            }
7833        }
7834
7835        /// Gets the enum value as a string.
7836        ///
7837        /// Returns `None` if the enum contains an unknown value deserialized from
7838        /// the integer representation of enums.
7839        pub fn name(&self) -> std::option::Option<&str> {
7840            match self {
7841                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
7842                Self::Resident => std::option::Option::Some("RESIDENT"),
7843                Self::Dynamic => std::option::Option::Some("DYNAMIC"),
7844                Self::UnknownValue(u) => u.0.name(),
7845            }
7846        }
7847    }
7848
7849    impl std::default::Default for Availability {
7850        fn default() -> Self {
7851            use std::convert::From;
7852            Self::from(0)
7853        }
7854    }
7855
7856    impl std::fmt::Display for Availability {
7857        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7858            wkt::internal::display_enum(f, self.name(), self.value())
7859        }
7860    }
7861
7862    impl std::convert::From<i32> for Availability {
7863        fn from(value: i32) -> Self {
7864            match value {
7865                0 => Self::Unspecified,
7866                1 => Self::Resident,
7867                2 => Self::Dynamic,
7868                _ => Self::UnknownValue(availability::UnknownValue(
7869                    wkt::internal::UnknownEnumValue::Integer(value),
7870                )),
7871            }
7872        }
7873    }
7874
7875    impl std::convert::From<&str> for Availability {
7876        fn from(value: &str) -> Self {
7877            use std::string::ToString;
7878            match value {
7879                "UNSPECIFIED" => Self::Unspecified,
7880                "RESIDENT" => Self::Resident,
7881                "DYNAMIC" => Self::Dynamic,
7882                _ => Self::UnknownValue(availability::UnknownValue(
7883                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7884                )),
7885            }
7886        }
7887    }
7888
7889    impl serde::ser::Serialize for Availability {
7890        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7891        where
7892            S: serde::Serializer,
7893        {
7894            match self {
7895                Self::Unspecified => serializer.serialize_i32(0),
7896                Self::Resident => serializer.serialize_i32(1),
7897                Self::Dynamic => serializer.serialize_i32(2),
7898                Self::UnknownValue(u) => u.0.serialize(serializer),
7899            }
7900        }
7901    }
7902
7903    impl<'de> serde::de::Deserialize<'de> for Availability {
7904        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7905        where
7906            D: serde::Deserializer<'de>,
7907        {
7908            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Availability>::new(
7909                ".google.appengine.v1.Instance.Availability",
7910            ))
7911        }
7912    }
7913}
7914
7915/// Metadata for the given [google.cloud.location.Location][google.cloud.location.Location].
7916#[derive(Clone, Default, PartialEq)]
7917#[non_exhaustive]
7918pub struct LocationMetadata {
7919    /// App Engine standard environment is available in the given location.
7920    ///
7921    /// @OutputOnly
7922    pub standard_environment_available: bool,
7923
7924    /// App Engine flexible environment is available in the given location.
7925    ///
7926    /// @OutputOnly
7927    pub flexible_environment_available: bool,
7928
7929    /// Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search)
7930    /// is available in the given location.
7931    pub search_api_available: bool,
7932
7933    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7934}
7935
7936impl LocationMetadata {
7937    /// Creates a new default instance.
7938    pub fn new() -> Self {
7939        std::default::Default::default()
7940    }
7941
7942    /// Sets the value of [standard_environment_available][crate::model::LocationMetadata::standard_environment_available].
7943    ///
7944    /// # Example
7945    /// ```ignore,no_run
7946    /// # use google_cloud_appengine_v1::model::LocationMetadata;
7947    /// let x = LocationMetadata::new().set_standard_environment_available(true);
7948    /// ```
7949    pub fn set_standard_environment_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7950        self.standard_environment_available = v.into();
7951        self
7952    }
7953
7954    /// Sets the value of [flexible_environment_available][crate::model::LocationMetadata::flexible_environment_available].
7955    ///
7956    /// # Example
7957    /// ```ignore,no_run
7958    /// # use google_cloud_appengine_v1::model::LocationMetadata;
7959    /// let x = LocationMetadata::new().set_flexible_environment_available(true);
7960    /// ```
7961    pub fn set_flexible_environment_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7962        self.flexible_environment_available = v.into();
7963        self
7964    }
7965
7966    /// Sets the value of [search_api_available][crate::model::LocationMetadata::search_api_available].
7967    ///
7968    /// # Example
7969    /// ```ignore,no_run
7970    /// # use google_cloud_appengine_v1::model::LocationMetadata;
7971    /// let x = LocationMetadata::new().set_search_api_available(true);
7972    /// ```
7973    pub fn set_search_api_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7974        self.search_api_available = v.into();
7975        self
7976    }
7977}
7978
7979impl wkt::message::Message for LocationMetadata {
7980    fn typename() -> &'static str {
7981        "type.googleapis.com/google.appengine.v1.LocationMetadata"
7982    }
7983}
7984
7985/// A NetworkSettings resource is a container for ingress settings for a version
7986/// or service.
7987#[derive(Clone, Default, PartialEq)]
7988#[non_exhaustive]
7989pub struct NetworkSettings {
7990    /// The ingress settings for version or service.
7991    pub ingress_traffic_allowed: crate::model::network_settings::IngressTrafficAllowed,
7992
7993    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7994}
7995
7996impl NetworkSettings {
7997    /// Creates a new default instance.
7998    pub fn new() -> Self {
7999        std::default::Default::default()
8000    }
8001
8002    /// Sets the value of [ingress_traffic_allowed][crate::model::NetworkSettings::ingress_traffic_allowed].
8003    ///
8004    /// # Example
8005    /// ```ignore,no_run
8006    /// # use google_cloud_appengine_v1::model::NetworkSettings;
8007    /// use google_cloud_appengine_v1::model::network_settings::IngressTrafficAllowed;
8008    /// let x0 = NetworkSettings::new().set_ingress_traffic_allowed(IngressTrafficAllowed::All);
8009    /// let x1 = NetworkSettings::new().set_ingress_traffic_allowed(IngressTrafficAllowed::InternalOnly);
8010    /// let x2 = NetworkSettings::new().set_ingress_traffic_allowed(IngressTrafficAllowed::InternalAndLb);
8011    /// ```
8012    pub fn set_ingress_traffic_allowed<
8013        T: std::convert::Into<crate::model::network_settings::IngressTrafficAllowed>,
8014    >(
8015        mut self,
8016        v: T,
8017    ) -> Self {
8018        self.ingress_traffic_allowed = v.into();
8019        self
8020    }
8021}
8022
8023impl wkt::message::Message for NetworkSettings {
8024    fn typename() -> &'static str {
8025        "type.googleapis.com/google.appengine.v1.NetworkSettings"
8026    }
8027}
8028
8029/// Defines additional types related to [NetworkSettings].
8030pub mod network_settings {
8031    #[allow(unused_imports)]
8032    use super::*;
8033
8034    /// If unspecified, INGRESS_TRAFFIC_ALLOWED_ALL will be used.
8035    ///
8036    /// # Working with unknown values
8037    ///
8038    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8039    /// additional enum variants at any time. Adding new variants is not considered
8040    /// a breaking change. Applications should write their code in anticipation of:
8041    ///
8042    /// - New values appearing in future releases of the client library, **and**
8043    /// - New values received dynamically, without application changes.
8044    ///
8045    /// Please consult the [Working with enums] section in the user guide for some
8046    /// guidelines.
8047    ///
8048    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8049    #[derive(Clone, Debug, PartialEq)]
8050    #[non_exhaustive]
8051    pub enum IngressTrafficAllowed {
8052        /// Unspecified
8053        Unspecified,
8054        /// Allow HTTP traffic from public and private sources.
8055        All,
8056        /// Allow HTTP traffic from only private VPC sources.
8057        InternalOnly,
8058        /// Allow HTTP traffic from private VPC sources and through load balancers.
8059        InternalAndLb,
8060        /// If set, the enum was initialized with an unknown value.
8061        ///
8062        /// Applications can examine the value using [IngressTrafficAllowed::value] or
8063        /// [IngressTrafficAllowed::name].
8064        UnknownValue(ingress_traffic_allowed::UnknownValue),
8065    }
8066
8067    #[doc(hidden)]
8068    pub mod ingress_traffic_allowed {
8069        #[allow(unused_imports)]
8070        use super::*;
8071        #[derive(Clone, Debug, PartialEq)]
8072        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8073    }
8074
8075    impl IngressTrafficAllowed {
8076        /// Gets the enum value.
8077        ///
8078        /// Returns `None` if the enum contains an unknown value deserialized from
8079        /// the string representation of enums.
8080        pub fn value(&self) -> std::option::Option<i32> {
8081            match self {
8082                Self::Unspecified => std::option::Option::Some(0),
8083                Self::All => std::option::Option::Some(1),
8084                Self::InternalOnly => std::option::Option::Some(2),
8085                Self::InternalAndLb => std::option::Option::Some(3),
8086                Self::UnknownValue(u) => u.0.value(),
8087            }
8088        }
8089
8090        /// Gets the enum value as a string.
8091        ///
8092        /// Returns `None` if the enum contains an unknown value deserialized from
8093        /// the integer representation of enums.
8094        pub fn name(&self) -> std::option::Option<&str> {
8095            match self {
8096                Self::Unspecified => {
8097                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED")
8098                }
8099                Self::All => std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_ALL"),
8100                Self::InternalOnly => {
8101                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY")
8102                }
8103                Self::InternalAndLb => {
8104                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB")
8105                }
8106                Self::UnknownValue(u) => u.0.name(),
8107            }
8108        }
8109    }
8110
8111    impl std::default::Default for IngressTrafficAllowed {
8112        fn default() -> Self {
8113            use std::convert::From;
8114            Self::from(0)
8115        }
8116    }
8117
8118    impl std::fmt::Display for IngressTrafficAllowed {
8119        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8120            wkt::internal::display_enum(f, self.name(), self.value())
8121        }
8122    }
8123
8124    impl std::convert::From<i32> for IngressTrafficAllowed {
8125        fn from(value: i32) -> Self {
8126            match value {
8127                0 => Self::Unspecified,
8128                1 => Self::All,
8129                2 => Self::InternalOnly,
8130                3 => Self::InternalAndLb,
8131                _ => Self::UnknownValue(ingress_traffic_allowed::UnknownValue(
8132                    wkt::internal::UnknownEnumValue::Integer(value),
8133                )),
8134            }
8135        }
8136    }
8137
8138    impl std::convert::From<&str> for IngressTrafficAllowed {
8139        fn from(value: &str) -> Self {
8140            use std::string::ToString;
8141            match value {
8142                "INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED" => Self::Unspecified,
8143                "INGRESS_TRAFFIC_ALLOWED_ALL" => Self::All,
8144                "INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY" => Self::InternalOnly,
8145                "INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB" => Self::InternalAndLb,
8146                _ => Self::UnknownValue(ingress_traffic_allowed::UnknownValue(
8147                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8148                )),
8149            }
8150        }
8151    }
8152
8153    impl serde::ser::Serialize for IngressTrafficAllowed {
8154        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8155        where
8156            S: serde::Serializer,
8157        {
8158            match self {
8159                Self::Unspecified => serializer.serialize_i32(0),
8160                Self::All => serializer.serialize_i32(1),
8161                Self::InternalOnly => serializer.serialize_i32(2),
8162                Self::InternalAndLb => serializer.serialize_i32(3),
8163                Self::UnknownValue(u) => u.0.serialize(serializer),
8164            }
8165        }
8166    }
8167
8168    impl<'de> serde::de::Deserialize<'de> for IngressTrafficAllowed {
8169        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8170        where
8171            D: serde::Deserializer<'de>,
8172        {
8173            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IngressTrafficAllowed>::new(
8174                ".google.appengine.v1.NetworkSettings.IngressTrafficAllowed",
8175            ))
8176        }
8177    }
8178}
8179
8180/// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation].
8181///
8182/// [google.longrunning.Operation]: google_cloud_longrunning::model::Operation
8183#[derive(Clone, Default, PartialEq)]
8184#[non_exhaustive]
8185pub struct OperationMetadataV1 {
8186    /// API method that initiated this operation. Example:
8187    /// `google.appengine.v1.Versions.CreateVersion`.
8188    ///
8189    /// @OutputOnly
8190    pub method: std::string::String,
8191
8192    /// Time that this operation was created.
8193    ///
8194    /// @OutputOnly
8195    pub insert_time: std::option::Option<wkt::Timestamp>,
8196
8197    /// Time that this operation completed.
8198    ///
8199    /// @OutputOnly
8200    pub end_time: std::option::Option<wkt::Timestamp>,
8201
8202    /// User who requested this operation.
8203    ///
8204    /// @OutputOnly
8205    pub user: std::string::String,
8206
8207    /// Name of the resource that this operation is acting on. Example:
8208    /// `apps/myapp/services/default`.
8209    ///
8210    /// @OutputOnly
8211    pub target: std::string::String,
8212
8213    /// Ephemeral message that may change every time the operation is polled.
8214    /// @OutputOnly
8215    pub ephemeral_message: std::string::String,
8216
8217    /// Durable messages that persist on every operation poll.
8218    /// @OutputOnly
8219    pub warning: std::vec::Vec<std::string::String>,
8220
8221    /// Metadata specific to the type of operation in progress.
8222    /// @OutputOnly
8223    pub method_metadata: std::option::Option<crate::model::operation_metadata_v_1::MethodMetadata>,
8224
8225    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8226}
8227
8228impl OperationMetadataV1 {
8229    /// Creates a new default instance.
8230    pub fn new() -> Self {
8231        std::default::Default::default()
8232    }
8233
8234    /// Sets the value of [method][crate::model::OperationMetadataV1::method].
8235    ///
8236    /// # Example
8237    /// ```ignore,no_run
8238    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8239    /// let x = OperationMetadataV1::new().set_method("example");
8240    /// ```
8241    pub fn set_method<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8242        self.method = v.into();
8243        self
8244    }
8245
8246    /// Sets the value of [insert_time][crate::model::OperationMetadataV1::insert_time].
8247    ///
8248    /// # Example
8249    /// ```ignore,no_run
8250    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8251    /// use wkt::Timestamp;
8252    /// let x = OperationMetadataV1::new().set_insert_time(Timestamp::default()/* use setters */);
8253    /// ```
8254    pub fn set_insert_time<T>(mut self, v: T) -> Self
8255    where
8256        T: std::convert::Into<wkt::Timestamp>,
8257    {
8258        self.insert_time = std::option::Option::Some(v.into());
8259        self
8260    }
8261
8262    /// Sets or clears the value of [insert_time][crate::model::OperationMetadataV1::insert_time].
8263    ///
8264    /// # Example
8265    /// ```ignore,no_run
8266    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8267    /// use wkt::Timestamp;
8268    /// let x = OperationMetadataV1::new().set_or_clear_insert_time(Some(Timestamp::default()/* use setters */));
8269    /// let x = OperationMetadataV1::new().set_or_clear_insert_time(None::<Timestamp>);
8270    /// ```
8271    pub fn set_or_clear_insert_time<T>(mut self, v: std::option::Option<T>) -> Self
8272    where
8273        T: std::convert::Into<wkt::Timestamp>,
8274    {
8275        self.insert_time = v.map(|x| x.into());
8276        self
8277    }
8278
8279    /// Sets the value of [end_time][crate::model::OperationMetadataV1::end_time].
8280    ///
8281    /// # Example
8282    /// ```ignore,no_run
8283    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8284    /// use wkt::Timestamp;
8285    /// let x = OperationMetadataV1::new().set_end_time(Timestamp::default()/* use setters */);
8286    /// ```
8287    pub fn set_end_time<T>(mut self, v: T) -> Self
8288    where
8289        T: std::convert::Into<wkt::Timestamp>,
8290    {
8291        self.end_time = std::option::Option::Some(v.into());
8292        self
8293    }
8294
8295    /// Sets or clears the value of [end_time][crate::model::OperationMetadataV1::end_time].
8296    ///
8297    /// # Example
8298    /// ```ignore,no_run
8299    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8300    /// use wkt::Timestamp;
8301    /// let x = OperationMetadataV1::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8302    /// let x = OperationMetadataV1::new().set_or_clear_end_time(None::<Timestamp>);
8303    /// ```
8304    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8305    where
8306        T: std::convert::Into<wkt::Timestamp>,
8307    {
8308        self.end_time = v.map(|x| x.into());
8309        self
8310    }
8311
8312    /// Sets the value of [user][crate::model::OperationMetadataV1::user].
8313    ///
8314    /// # Example
8315    /// ```ignore,no_run
8316    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8317    /// let x = OperationMetadataV1::new().set_user("example");
8318    /// ```
8319    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8320        self.user = v.into();
8321        self
8322    }
8323
8324    /// Sets the value of [target][crate::model::OperationMetadataV1::target].
8325    ///
8326    /// # Example
8327    /// ```ignore,no_run
8328    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8329    /// let x = OperationMetadataV1::new().set_target("example");
8330    /// ```
8331    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8332        self.target = v.into();
8333        self
8334    }
8335
8336    /// Sets the value of [ephemeral_message][crate::model::OperationMetadataV1::ephemeral_message].
8337    ///
8338    /// # Example
8339    /// ```ignore,no_run
8340    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8341    /// let x = OperationMetadataV1::new().set_ephemeral_message("example");
8342    /// ```
8343    pub fn set_ephemeral_message<T: std::convert::Into<std::string::String>>(
8344        mut self,
8345        v: T,
8346    ) -> Self {
8347        self.ephemeral_message = v.into();
8348        self
8349    }
8350
8351    /// Sets the value of [warning][crate::model::OperationMetadataV1::warning].
8352    ///
8353    /// # Example
8354    /// ```ignore,no_run
8355    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8356    /// let x = OperationMetadataV1::new().set_warning(["a", "b", "c"]);
8357    /// ```
8358    pub fn set_warning<T, V>(mut self, v: T) -> Self
8359    where
8360        T: std::iter::IntoIterator<Item = V>,
8361        V: std::convert::Into<std::string::String>,
8362    {
8363        use std::iter::Iterator;
8364        self.warning = v.into_iter().map(|i| i.into()).collect();
8365        self
8366    }
8367
8368    /// Sets the value of [method_metadata][crate::model::OperationMetadataV1::method_metadata].
8369    ///
8370    /// Note that all the setters affecting `method_metadata` are mutually
8371    /// exclusive.
8372    ///
8373    /// # Example
8374    /// ```ignore,no_run
8375    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8376    /// use google_cloud_appengine_v1::model::CreateVersionMetadataV1;
8377    /// let x = OperationMetadataV1::new().set_method_metadata(Some(
8378    ///     google_cloud_appengine_v1::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(CreateVersionMetadataV1::default().into())));
8379    /// ```
8380    pub fn set_method_metadata<
8381        T: std::convert::Into<
8382                std::option::Option<crate::model::operation_metadata_v_1::MethodMetadata>,
8383            >,
8384    >(
8385        mut self,
8386        v: T,
8387    ) -> Self {
8388        self.method_metadata = v.into();
8389        self
8390    }
8391
8392    /// The value of [method_metadata][crate::model::OperationMetadataV1::method_metadata]
8393    /// if it holds a `CreateVersionMetadata`, `None` if the field is not set or
8394    /// holds a different branch.
8395    pub fn create_version_metadata(
8396        &self,
8397    ) -> std::option::Option<&std::boxed::Box<crate::model::CreateVersionMetadataV1>> {
8398        #[allow(unreachable_patterns)]
8399        self.method_metadata.as_ref().and_then(|v| match v {
8400            crate::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(v) => {
8401                std::option::Option::Some(v)
8402            }
8403            _ => std::option::Option::None,
8404        })
8405    }
8406
8407    /// Sets the value of [method_metadata][crate::model::OperationMetadataV1::method_metadata]
8408    /// to hold a `CreateVersionMetadata`.
8409    ///
8410    /// Note that all the setters affecting `method_metadata` are
8411    /// mutually exclusive.
8412    ///
8413    /// # Example
8414    /// ```ignore,no_run
8415    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8416    /// use google_cloud_appengine_v1::model::CreateVersionMetadataV1;
8417    /// let x = OperationMetadataV1::new().set_create_version_metadata(CreateVersionMetadataV1::default()/* use setters */);
8418    /// assert!(x.create_version_metadata().is_some());
8419    /// ```
8420    pub fn set_create_version_metadata<
8421        T: std::convert::Into<std::boxed::Box<crate::model::CreateVersionMetadataV1>>,
8422    >(
8423        mut self,
8424        v: T,
8425    ) -> Self {
8426        self.method_metadata = std::option::Option::Some(
8427            crate::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(v.into()),
8428        );
8429        self
8430    }
8431}
8432
8433impl wkt::message::Message for OperationMetadataV1 {
8434    fn typename() -> &'static str {
8435        "type.googleapis.com/google.appengine.v1.OperationMetadataV1"
8436    }
8437}
8438
8439/// Defines additional types related to [OperationMetadataV1].
8440pub mod operation_metadata_v_1 {
8441    #[allow(unused_imports)]
8442    use super::*;
8443
8444    /// Metadata specific to the type of operation in progress.
8445    /// @OutputOnly
8446    #[derive(Clone, Debug, PartialEq)]
8447    #[non_exhaustive]
8448    pub enum MethodMetadata {
8449        #[allow(missing_docs)]
8450        CreateVersionMetadata(std::boxed::Box<crate::model::CreateVersionMetadataV1>),
8451    }
8452}
8453
8454/// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation] during a
8455/// [google.appengine.v1.CreateVersionRequest][google.appengine.v1.CreateVersionRequest].
8456///
8457/// [google.appengine.v1.CreateVersionRequest]: crate::model::CreateVersionRequest
8458/// [google.longrunning.Operation]: google_cloud_longrunning::model::Operation
8459#[derive(Clone, Default, PartialEq)]
8460#[non_exhaustive]
8461pub struct CreateVersionMetadataV1 {
8462    /// The Cloud Build ID if one was created as part of the version create.
8463    /// @OutputOnly
8464    pub cloud_build_id: std::string::String,
8465
8466    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8467}
8468
8469impl CreateVersionMetadataV1 {
8470    /// Creates a new default instance.
8471    pub fn new() -> Self {
8472        std::default::Default::default()
8473    }
8474
8475    /// Sets the value of [cloud_build_id][crate::model::CreateVersionMetadataV1::cloud_build_id].
8476    ///
8477    /// # Example
8478    /// ```ignore,no_run
8479    /// # use google_cloud_appengine_v1::model::CreateVersionMetadataV1;
8480    /// let x = CreateVersionMetadataV1::new().set_cloud_build_id("example");
8481    /// ```
8482    pub fn set_cloud_build_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8483        self.cloud_build_id = v.into();
8484        self
8485    }
8486}
8487
8488impl wkt::message::Message for CreateVersionMetadataV1 {
8489    fn typename() -> &'static str {
8490        "type.googleapis.com/google.appengine.v1.CreateVersionMetadataV1"
8491    }
8492}
8493
8494/// A Service resource is a logical component of an application that can share
8495/// state and communicate in a secure fashion with other services.
8496/// For example, an application that handles customer requests might
8497/// include separate services to handle tasks such as backend data
8498/// analysis or API requests from mobile devices. Each service has a
8499/// collection of versions that define a specific set of code used to
8500/// implement the functionality of that service.
8501#[derive(Clone, Default, PartialEq)]
8502#[non_exhaustive]
8503pub struct Service {
8504    /// Full path to the Service resource in the API.
8505    /// Example: `apps/myapp/services/default`.
8506    ///
8507    /// @OutputOnly
8508    pub name: std::string::String,
8509
8510    /// Relative name of the service within the application.
8511    /// Example: `default`.
8512    ///
8513    /// @OutputOnly
8514    pub id: std::string::String,
8515
8516    /// Mapping that defines fractional HTTP traffic diversion to
8517    /// different versions within the service.
8518    pub split: std::option::Option<crate::model::TrafficSplit>,
8519
8520    /// A set of labels to apply to this service. Labels are key/value pairs that
8521    /// describe the service and all resources that belong to it (e.g.,
8522    /// versions). The labels can be used to search and group resources, and are
8523    /// propagated to the usage and billing reports, enabling fine-grain analysis
8524    /// of costs. An example of using labels is to tag resources belonging to
8525    /// different environments (e.g., "env=prod", "env=qa").
8526    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
8527
8528    /// Ingress settings for this service. Will apply to all versions.
8529    pub network_settings: std::option::Option<crate::model::NetworkSettings>,
8530
8531    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8532}
8533
8534impl Service {
8535    /// Creates a new default instance.
8536    pub fn new() -> Self {
8537        std::default::Default::default()
8538    }
8539
8540    /// Sets the value of [name][crate::model::Service::name].
8541    ///
8542    /// # Example
8543    /// ```ignore,no_run
8544    /// # use google_cloud_appengine_v1::model::Service;
8545    /// let x = Service::new().set_name("example");
8546    /// ```
8547    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8548        self.name = v.into();
8549        self
8550    }
8551
8552    /// Sets the value of [id][crate::model::Service::id].
8553    ///
8554    /// # Example
8555    /// ```ignore,no_run
8556    /// # use google_cloud_appengine_v1::model::Service;
8557    /// let x = Service::new().set_id("example");
8558    /// ```
8559    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8560        self.id = v.into();
8561        self
8562    }
8563
8564    /// Sets the value of [split][crate::model::Service::split].
8565    ///
8566    /// # Example
8567    /// ```ignore,no_run
8568    /// # use google_cloud_appengine_v1::model::Service;
8569    /// use google_cloud_appengine_v1::model::TrafficSplit;
8570    /// let x = Service::new().set_split(TrafficSplit::default()/* use setters */);
8571    /// ```
8572    pub fn set_split<T>(mut self, v: T) -> Self
8573    where
8574        T: std::convert::Into<crate::model::TrafficSplit>,
8575    {
8576        self.split = std::option::Option::Some(v.into());
8577        self
8578    }
8579
8580    /// Sets or clears the value of [split][crate::model::Service::split].
8581    ///
8582    /// # Example
8583    /// ```ignore,no_run
8584    /// # use google_cloud_appengine_v1::model::Service;
8585    /// use google_cloud_appengine_v1::model::TrafficSplit;
8586    /// let x = Service::new().set_or_clear_split(Some(TrafficSplit::default()/* use setters */));
8587    /// let x = Service::new().set_or_clear_split(None::<TrafficSplit>);
8588    /// ```
8589    pub fn set_or_clear_split<T>(mut self, v: std::option::Option<T>) -> Self
8590    where
8591        T: std::convert::Into<crate::model::TrafficSplit>,
8592    {
8593        self.split = v.map(|x| x.into());
8594        self
8595    }
8596
8597    /// Sets the value of [labels][crate::model::Service::labels].
8598    ///
8599    /// # Example
8600    /// ```ignore,no_run
8601    /// # use google_cloud_appengine_v1::model::Service;
8602    /// let x = Service::new().set_labels([
8603    ///     ("key0", "abc"),
8604    ///     ("key1", "xyz"),
8605    /// ]);
8606    /// ```
8607    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
8608    where
8609        T: std::iter::IntoIterator<Item = (K, V)>,
8610        K: std::convert::Into<std::string::String>,
8611        V: std::convert::Into<std::string::String>,
8612    {
8613        use std::iter::Iterator;
8614        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8615        self
8616    }
8617
8618    /// Sets the value of [network_settings][crate::model::Service::network_settings].
8619    ///
8620    /// # Example
8621    /// ```ignore,no_run
8622    /// # use google_cloud_appengine_v1::model::Service;
8623    /// use google_cloud_appengine_v1::model::NetworkSettings;
8624    /// let x = Service::new().set_network_settings(NetworkSettings::default()/* use setters */);
8625    /// ```
8626    pub fn set_network_settings<T>(mut self, v: T) -> Self
8627    where
8628        T: std::convert::Into<crate::model::NetworkSettings>,
8629    {
8630        self.network_settings = std::option::Option::Some(v.into());
8631        self
8632    }
8633
8634    /// Sets or clears the value of [network_settings][crate::model::Service::network_settings].
8635    ///
8636    /// # Example
8637    /// ```ignore,no_run
8638    /// # use google_cloud_appengine_v1::model::Service;
8639    /// use google_cloud_appengine_v1::model::NetworkSettings;
8640    /// let x = Service::new().set_or_clear_network_settings(Some(NetworkSettings::default()/* use setters */));
8641    /// let x = Service::new().set_or_clear_network_settings(None::<NetworkSettings>);
8642    /// ```
8643    pub fn set_or_clear_network_settings<T>(mut self, v: std::option::Option<T>) -> Self
8644    where
8645        T: std::convert::Into<crate::model::NetworkSettings>,
8646    {
8647        self.network_settings = v.map(|x| x.into());
8648        self
8649    }
8650}
8651
8652impl wkt::message::Message for Service {
8653    fn typename() -> &'static str {
8654        "type.googleapis.com/google.appengine.v1.Service"
8655    }
8656}
8657
8658/// Traffic routing configuration for versions within a single service. Traffic
8659/// splits define how traffic directed to the service is assigned to versions.
8660#[derive(Clone, Default, PartialEq)]
8661#[non_exhaustive]
8662pub struct TrafficSplit {
8663    /// Mechanism used to determine which version a request is sent to.
8664    /// The traffic selection algorithm will
8665    /// be stable for either type until allocations are changed.
8666    pub shard_by: crate::model::traffic_split::ShardBy,
8667
8668    /// Mapping from version IDs within the service to fractional
8669    /// (0.000, 1] allocations of traffic for that version. Each version can
8670    /// be specified only once, but some versions in the service may not
8671    /// have any traffic allocation. Services that have traffic allocated
8672    /// cannot be deleted until either the service is deleted or
8673    /// their traffic allocation is removed. Allocations must sum to 1.
8674    /// Up to two decimal place precision is supported for IP-based splits and
8675    /// up to three decimal places is supported for cookie-based splits.
8676    pub allocations: std::collections::HashMap<std::string::String, f64>,
8677
8678    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8679}
8680
8681impl TrafficSplit {
8682    /// Creates a new default instance.
8683    pub fn new() -> Self {
8684        std::default::Default::default()
8685    }
8686
8687    /// Sets the value of [shard_by][crate::model::TrafficSplit::shard_by].
8688    ///
8689    /// # Example
8690    /// ```ignore,no_run
8691    /// # use google_cloud_appengine_v1::model::TrafficSplit;
8692    /// use google_cloud_appengine_v1::model::traffic_split::ShardBy;
8693    /// let x0 = TrafficSplit::new().set_shard_by(ShardBy::Cookie);
8694    /// let x1 = TrafficSplit::new().set_shard_by(ShardBy::Ip);
8695    /// let x2 = TrafficSplit::new().set_shard_by(ShardBy::Random);
8696    /// ```
8697    pub fn set_shard_by<T: std::convert::Into<crate::model::traffic_split::ShardBy>>(
8698        mut self,
8699        v: T,
8700    ) -> Self {
8701        self.shard_by = v.into();
8702        self
8703    }
8704
8705    /// Sets the value of [allocations][crate::model::TrafficSplit::allocations].
8706    ///
8707    /// # Example
8708    /// ```ignore,no_run
8709    /// # use google_cloud_appengine_v1::model::TrafficSplit;
8710    /// let x = TrafficSplit::new().set_allocations([
8711    ///     ("key0", 123.5),
8712    ///     ("key1", 456.5),
8713    /// ]);
8714    /// ```
8715    pub fn set_allocations<T, K, V>(mut self, v: T) -> Self
8716    where
8717        T: std::iter::IntoIterator<Item = (K, V)>,
8718        K: std::convert::Into<std::string::String>,
8719        V: std::convert::Into<f64>,
8720    {
8721        use std::iter::Iterator;
8722        self.allocations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8723        self
8724    }
8725}
8726
8727impl wkt::message::Message for TrafficSplit {
8728    fn typename() -> &'static str {
8729        "type.googleapis.com/google.appengine.v1.TrafficSplit"
8730    }
8731}
8732
8733/// Defines additional types related to [TrafficSplit].
8734pub mod traffic_split {
8735    #[allow(unused_imports)]
8736    use super::*;
8737
8738    /// Available sharding mechanisms.
8739    ///
8740    /// # Working with unknown values
8741    ///
8742    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8743    /// additional enum variants at any time. Adding new variants is not considered
8744    /// a breaking change. Applications should write their code in anticipation of:
8745    ///
8746    /// - New values appearing in future releases of the client library, **and**
8747    /// - New values received dynamically, without application changes.
8748    ///
8749    /// Please consult the [Working with enums] section in the user guide for some
8750    /// guidelines.
8751    ///
8752    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8753    #[derive(Clone, Debug, PartialEq)]
8754    #[non_exhaustive]
8755    pub enum ShardBy {
8756        /// Diversion method unspecified.
8757        Unspecified,
8758        /// Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
8759        /// must be set by the application itself or no diversion will occur.
8760        Cookie,
8761        /// Diversion based on applying the modulus operation to a fingerprint
8762        /// of the IP address.
8763        Ip,
8764        /// Diversion based on weighted random assignment. An incoming request is
8765        /// randomly routed to a version in the traffic split, with probability
8766        /// proportional to the version's traffic share.
8767        Random,
8768        /// If set, the enum was initialized with an unknown value.
8769        ///
8770        /// Applications can examine the value using [ShardBy::value] or
8771        /// [ShardBy::name].
8772        UnknownValue(shard_by::UnknownValue),
8773    }
8774
8775    #[doc(hidden)]
8776    pub mod shard_by {
8777        #[allow(unused_imports)]
8778        use super::*;
8779        #[derive(Clone, Debug, PartialEq)]
8780        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8781    }
8782
8783    impl ShardBy {
8784        /// Gets the enum value.
8785        ///
8786        /// Returns `None` if the enum contains an unknown value deserialized from
8787        /// the string representation of enums.
8788        pub fn value(&self) -> std::option::Option<i32> {
8789            match self {
8790                Self::Unspecified => std::option::Option::Some(0),
8791                Self::Cookie => std::option::Option::Some(1),
8792                Self::Ip => std::option::Option::Some(2),
8793                Self::Random => std::option::Option::Some(3),
8794                Self::UnknownValue(u) => u.0.value(),
8795            }
8796        }
8797
8798        /// Gets the enum value as a string.
8799        ///
8800        /// Returns `None` if the enum contains an unknown value deserialized from
8801        /// the integer representation of enums.
8802        pub fn name(&self) -> std::option::Option<&str> {
8803            match self {
8804                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
8805                Self::Cookie => std::option::Option::Some("COOKIE"),
8806                Self::Ip => std::option::Option::Some("IP"),
8807                Self::Random => std::option::Option::Some("RANDOM"),
8808                Self::UnknownValue(u) => u.0.name(),
8809            }
8810        }
8811    }
8812
8813    impl std::default::Default for ShardBy {
8814        fn default() -> Self {
8815            use std::convert::From;
8816            Self::from(0)
8817        }
8818    }
8819
8820    impl std::fmt::Display for ShardBy {
8821        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8822            wkt::internal::display_enum(f, self.name(), self.value())
8823        }
8824    }
8825
8826    impl std::convert::From<i32> for ShardBy {
8827        fn from(value: i32) -> Self {
8828            match value {
8829                0 => Self::Unspecified,
8830                1 => Self::Cookie,
8831                2 => Self::Ip,
8832                3 => Self::Random,
8833                _ => Self::UnknownValue(shard_by::UnknownValue(
8834                    wkt::internal::UnknownEnumValue::Integer(value),
8835                )),
8836            }
8837        }
8838    }
8839
8840    impl std::convert::From<&str> for ShardBy {
8841        fn from(value: &str) -> Self {
8842            use std::string::ToString;
8843            match value {
8844                "UNSPECIFIED" => Self::Unspecified,
8845                "COOKIE" => Self::Cookie,
8846                "IP" => Self::Ip,
8847                "RANDOM" => Self::Random,
8848                _ => Self::UnknownValue(shard_by::UnknownValue(
8849                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8850                )),
8851            }
8852        }
8853    }
8854
8855    impl serde::ser::Serialize for ShardBy {
8856        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8857        where
8858            S: serde::Serializer,
8859        {
8860            match self {
8861                Self::Unspecified => serializer.serialize_i32(0),
8862                Self::Cookie => serializer.serialize_i32(1),
8863                Self::Ip => serializer.serialize_i32(2),
8864                Self::Random => serializer.serialize_i32(3),
8865                Self::UnknownValue(u) => u.0.serialize(serializer),
8866            }
8867        }
8868    }
8869
8870    impl<'de> serde::de::Deserialize<'de> for ShardBy {
8871        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8872        where
8873            D: serde::Deserializer<'de>,
8874        {
8875            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ShardBy>::new(
8876                ".google.appengine.v1.TrafficSplit.ShardBy",
8877            ))
8878        }
8879    }
8880}
8881
8882/// A Version resource is a specific set of source code and configuration files
8883/// that are deployed into a service.
8884#[derive(Clone, Default, PartialEq)]
8885#[non_exhaustive]
8886pub struct Version {
8887    /// Full path to the Version resource in the API.  Example:
8888    /// `apps/myapp/services/default/versions/v1`.
8889    ///
8890    /// @OutputOnly
8891    pub name: std::string::String,
8892
8893    /// Relative name of the version within the service.  Example: `v1`.
8894    /// Version names can contain only lowercase letters, numbers, or hyphens.
8895    /// Reserved names: "default", "latest", and any name with the prefix "ah-".
8896    pub id: std::string::String,
8897
8898    /// Before an application can receive email or XMPP messages, the application
8899    /// must be configured to enable the service.
8900    pub inbound_services: std::vec::Vec<crate::model::InboundServiceType>,
8901
8902    /// Instance class that is used to run this version. Valid values are:
8903    ///
8904    /// * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
8905    /// * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
8906    ///
8907    /// Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
8908    /// BasicScaling.
8909    pub instance_class: std::string::String,
8910
8911    /// Extra network settings.
8912    /// Only applicable in the App Engine flexible environment.
8913    pub network: std::option::Option<crate::model::Network>,
8914
8915    /// The Google Compute Engine zones that are supported by this version in the
8916    /// App Engine flexible environment. Deprecated.
8917    pub zones: std::vec::Vec<std::string::String>,
8918
8919    /// Machine resources for this version.
8920    /// Only applicable in the App Engine flexible environment.
8921    pub resources: std::option::Option<crate::model::Resources>,
8922
8923    /// Desired runtime. Example: `python27`.
8924    pub runtime: std::string::String,
8925
8926    /// The channel of the runtime to use. Only available for some
8927    /// runtimes. Defaults to the `default` channel.
8928    pub runtime_channel: std::string::String,
8929
8930    /// Whether multiple requests can be dispatched to this version at once.
8931    pub threadsafe: bool,
8932
8933    /// Whether to deploy this version in a container on a virtual machine.
8934    pub vm: bool,
8935
8936    /// Allows App Engine second generation runtimes to access the legacy bundled
8937    /// services.
8938    pub app_engine_apis: bool,
8939
8940    /// Metadata settings that are supplied to this version to enable
8941    /// beta runtime features.
8942    pub beta_settings: std::collections::HashMap<std::string::String, std::string::String>,
8943
8944    /// App Engine execution environment for this version.
8945    ///
8946    /// Defaults to `standard`.
8947    pub env: std::string::String,
8948
8949    /// Current serving status of this version. Only the versions with a
8950    /// `SERVING` status create instances and can be billed.
8951    ///
8952    /// `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
8953    pub serving_status: crate::model::ServingStatus,
8954
8955    /// Email address of the user who created this version.
8956    ///
8957    /// @OutputOnly
8958    pub created_by: std::string::String,
8959
8960    /// Time that this version was created.
8961    ///
8962    /// @OutputOnly
8963    pub create_time: std::option::Option<wkt::Timestamp>,
8964
8965    /// Total size in bytes of all the files that are included in this version
8966    /// and currently hosted on the App Engine disk.
8967    ///
8968    /// @OutputOnly
8969    pub disk_usage_bytes: i64,
8970
8971    /// The version of the API in the given runtime environment. Please see the
8972    /// app.yaml reference for valid values at
8973    /// <https://cloud.google.com/appengine/docs/standard/>\<language\>/config/appref
8974    pub runtime_api_version: std::string::String,
8975
8976    /// The path or name of the app's main executable.
8977    pub runtime_main_executable_path: std::string::String,
8978
8979    /// The identity that the deployed version will run as.
8980    /// Admin API will use the App Engine Appspot service account as default if
8981    /// this field is neither provided in app.yaml file nor through CLI flag.
8982    pub service_account: std::string::String,
8983
8984    /// An ordered list of URL-matching patterns that should be applied to incoming
8985    /// requests. The first matching URL handles the request and other request
8986    /// handlers are not attempted.
8987    ///
8988    /// Only returned in `GET` requests if `view=FULL` is set.
8989    pub handlers: std::vec::Vec<crate::model::UrlMap>,
8990
8991    /// Custom static error pages. Limited to 10KB per page.
8992    ///
8993    /// Only returned in `GET` requests if `view=FULL` is set.
8994    pub error_handlers: std::vec::Vec<crate::model::ErrorHandler>,
8995
8996    /// Configuration for third-party Python runtime libraries that are required
8997    /// by the application.
8998    ///
8999    /// Only returned in `GET` requests if `view=FULL` is set.
9000    pub libraries: std::vec::Vec<crate::model::Library>,
9001
9002    /// Serving configuration for
9003    /// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
9004    ///
9005    /// Only returned in `GET` requests if `view=FULL` is set.
9006    pub api_config: std::option::Option<crate::model::ApiConfigHandler>,
9007
9008    /// Environment variables available to the application.
9009    ///
9010    /// Only returned in `GET` requests if `view=FULL` is set.
9011    pub env_variables: std::collections::HashMap<std::string::String, std::string::String>,
9012
9013    /// Environment variables available to the build environment.
9014    ///
9015    /// Only returned in `GET` requests if `view=FULL` is set.
9016    pub build_env_variables: std::collections::HashMap<std::string::String, std::string::String>,
9017
9018    /// Duration that static files should be cached by web proxies and browsers.
9019    /// Only applicable if the corresponding
9020    /// [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
9021    /// does not specify its own expiration time.
9022    ///
9023    /// Only returned in `GET` requests if `view=FULL` is set.
9024    pub default_expiration: std::option::Option<wkt::Duration>,
9025
9026    /// Configures health checking for instances. Unhealthy instances are
9027    /// stopped and replaced with new instances.
9028    /// Only applicable in the App Engine flexible environment.
9029    ///
9030    /// Only returned in `GET` requests if `view=FULL` is set.
9031    pub health_check: std::option::Option<crate::model::HealthCheck>,
9032
9033    /// Configures readiness health checking for instances.
9034    /// Unhealthy instances are not put into the backend traffic rotation.
9035    ///
9036    /// Only returned in `GET` requests if `view=FULL` is set.
9037    pub readiness_check: std::option::Option<crate::model::ReadinessCheck>,
9038
9039    /// Configures liveness health checking for instances.
9040    /// Unhealthy instances are stopped and replaced with new instances
9041    ///
9042    /// Only returned in `GET` requests if `view=FULL` is set.
9043    pub liveness_check: std::option::Option<crate::model::LivenessCheck>,
9044
9045    /// Files that match this pattern will not be built into this version.
9046    /// Only applicable for Go runtimes.
9047    ///
9048    /// Only returned in `GET` requests if `view=FULL` is set.
9049    pub nobuild_files_regex: std::string::String,
9050
9051    /// Code and application artifacts that make up this version.
9052    ///
9053    /// Only returned in `GET` requests if `view=FULL` is set.
9054    pub deployment: std::option::Option<crate::model::Deployment>,
9055
9056    /// Serving URL for this version. Example:
9057    /// `https://myversion-dot-myservice-dot-myapp.appspot.com`
9058    ///
9059    /// @OutputOnly
9060    pub version_url: std::string::String,
9061
9062    /// Cloud Endpoints configuration.
9063    ///
9064    /// If endpoints_api_service is set, the Cloud Endpoints Extensible Service
9065    /// Proxy will be provided to serve the API implemented by the app.
9066    pub endpoints_api_service: std::option::Option<crate::model::EndpointsApiService>,
9067
9068    /// The entrypoint for the application.
9069    pub entrypoint: std::option::Option<crate::model::Entrypoint>,
9070
9071    /// Enables VPC connectivity for standard apps.
9072    pub vpc_access_connector: std::option::Option<crate::model::VpcAccessConnector>,
9073
9074    /// Controls how instances are created, scaled, and reaped.
9075    ///
9076    /// Defaults to `AutomaticScaling`.
9077    pub scaling: std::option::Option<crate::model::version::Scaling>,
9078
9079    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9080}
9081
9082impl Version {
9083    /// Creates a new default instance.
9084    pub fn new() -> Self {
9085        std::default::Default::default()
9086    }
9087
9088    /// Sets the value of [name][crate::model::Version::name].
9089    ///
9090    /// # Example
9091    /// ```ignore,no_run
9092    /// # use google_cloud_appengine_v1::model::Version;
9093    /// let x = Version::new().set_name("example");
9094    /// ```
9095    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9096        self.name = v.into();
9097        self
9098    }
9099
9100    /// Sets the value of [id][crate::model::Version::id].
9101    ///
9102    /// # Example
9103    /// ```ignore,no_run
9104    /// # use google_cloud_appengine_v1::model::Version;
9105    /// let x = Version::new().set_id("example");
9106    /// ```
9107    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9108        self.id = v.into();
9109        self
9110    }
9111
9112    /// Sets the value of [inbound_services][crate::model::Version::inbound_services].
9113    ///
9114    /// # Example
9115    /// ```ignore,no_run
9116    /// # use google_cloud_appengine_v1::model::Version;
9117    /// use google_cloud_appengine_v1::model::InboundServiceType;
9118    /// let x = Version::new().set_inbound_services([
9119    ///     InboundServiceType::InboundServiceMail,
9120    ///     InboundServiceType::InboundServiceMailBounce,
9121    ///     InboundServiceType::InboundServiceXmppError,
9122    /// ]);
9123    /// ```
9124    pub fn set_inbound_services<T, V>(mut self, v: T) -> Self
9125    where
9126        T: std::iter::IntoIterator<Item = V>,
9127        V: std::convert::Into<crate::model::InboundServiceType>,
9128    {
9129        use std::iter::Iterator;
9130        self.inbound_services = v.into_iter().map(|i| i.into()).collect();
9131        self
9132    }
9133
9134    /// Sets the value of [instance_class][crate::model::Version::instance_class].
9135    ///
9136    /// # Example
9137    /// ```ignore,no_run
9138    /// # use google_cloud_appengine_v1::model::Version;
9139    /// let x = Version::new().set_instance_class("example");
9140    /// ```
9141    pub fn set_instance_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9142        self.instance_class = v.into();
9143        self
9144    }
9145
9146    /// Sets the value of [network][crate::model::Version::network].
9147    ///
9148    /// # Example
9149    /// ```ignore,no_run
9150    /// # use google_cloud_appengine_v1::model::Version;
9151    /// use google_cloud_appengine_v1::model::Network;
9152    /// let x = Version::new().set_network(Network::default()/* use setters */);
9153    /// ```
9154    pub fn set_network<T>(mut self, v: T) -> Self
9155    where
9156        T: std::convert::Into<crate::model::Network>,
9157    {
9158        self.network = std::option::Option::Some(v.into());
9159        self
9160    }
9161
9162    /// Sets or clears the value of [network][crate::model::Version::network].
9163    ///
9164    /// # Example
9165    /// ```ignore,no_run
9166    /// # use google_cloud_appengine_v1::model::Version;
9167    /// use google_cloud_appengine_v1::model::Network;
9168    /// let x = Version::new().set_or_clear_network(Some(Network::default()/* use setters */));
9169    /// let x = Version::new().set_or_clear_network(None::<Network>);
9170    /// ```
9171    pub fn set_or_clear_network<T>(mut self, v: std::option::Option<T>) -> Self
9172    where
9173        T: std::convert::Into<crate::model::Network>,
9174    {
9175        self.network = v.map(|x| x.into());
9176        self
9177    }
9178
9179    /// Sets the value of [zones][crate::model::Version::zones].
9180    ///
9181    /// # Example
9182    /// ```ignore,no_run
9183    /// # use google_cloud_appengine_v1::model::Version;
9184    /// let x = Version::new().set_zones(["a", "b", "c"]);
9185    /// ```
9186    pub fn set_zones<T, V>(mut self, v: T) -> Self
9187    where
9188        T: std::iter::IntoIterator<Item = V>,
9189        V: std::convert::Into<std::string::String>,
9190    {
9191        use std::iter::Iterator;
9192        self.zones = v.into_iter().map(|i| i.into()).collect();
9193        self
9194    }
9195
9196    /// Sets the value of [resources][crate::model::Version::resources].
9197    ///
9198    /// # Example
9199    /// ```ignore,no_run
9200    /// # use google_cloud_appengine_v1::model::Version;
9201    /// use google_cloud_appengine_v1::model::Resources;
9202    /// let x = Version::new().set_resources(Resources::default()/* use setters */);
9203    /// ```
9204    pub fn set_resources<T>(mut self, v: T) -> Self
9205    where
9206        T: std::convert::Into<crate::model::Resources>,
9207    {
9208        self.resources = std::option::Option::Some(v.into());
9209        self
9210    }
9211
9212    /// Sets or clears the value of [resources][crate::model::Version::resources].
9213    ///
9214    /// # Example
9215    /// ```ignore,no_run
9216    /// # use google_cloud_appengine_v1::model::Version;
9217    /// use google_cloud_appengine_v1::model::Resources;
9218    /// let x = Version::new().set_or_clear_resources(Some(Resources::default()/* use setters */));
9219    /// let x = Version::new().set_or_clear_resources(None::<Resources>);
9220    /// ```
9221    pub fn set_or_clear_resources<T>(mut self, v: std::option::Option<T>) -> Self
9222    where
9223        T: std::convert::Into<crate::model::Resources>,
9224    {
9225        self.resources = v.map(|x| x.into());
9226        self
9227    }
9228
9229    /// Sets the value of [runtime][crate::model::Version::runtime].
9230    ///
9231    /// # Example
9232    /// ```ignore,no_run
9233    /// # use google_cloud_appengine_v1::model::Version;
9234    /// let x = Version::new().set_runtime("example");
9235    /// ```
9236    pub fn set_runtime<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9237        self.runtime = v.into();
9238        self
9239    }
9240
9241    /// Sets the value of [runtime_channel][crate::model::Version::runtime_channel].
9242    ///
9243    /// # Example
9244    /// ```ignore,no_run
9245    /// # use google_cloud_appengine_v1::model::Version;
9246    /// let x = Version::new().set_runtime_channel("example");
9247    /// ```
9248    pub fn set_runtime_channel<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9249        self.runtime_channel = v.into();
9250        self
9251    }
9252
9253    /// Sets the value of [threadsafe][crate::model::Version::threadsafe].
9254    ///
9255    /// # Example
9256    /// ```ignore,no_run
9257    /// # use google_cloud_appengine_v1::model::Version;
9258    /// let x = Version::new().set_threadsafe(true);
9259    /// ```
9260    pub fn set_threadsafe<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9261        self.threadsafe = v.into();
9262        self
9263    }
9264
9265    /// Sets the value of [vm][crate::model::Version::vm].
9266    ///
9267    /// # Example
9268    /// ```ignore,no_run
9269    /// # use google_cloud_appengine_v1::model::Version;
9270    /// let x = Version::new().set_vm(true);
9271    /// ```
9272    pub fn set_vm<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9273        self.vm = v.into();
9274        self
9275    }
9276
9277    /// Sets the value of [app_engine_apis][crate::model::Version::app_engine_apis].
9278    ///
9279    /// # Example
9280    /// ```ignore,no_run
9281    /// # use google_cloud_appengine_v1::model::Version;
9282    /// let x = Version::new().set_app_engine_apis(true);
9283    /// ```
9284    pub fn set_app_engine_apis<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9285        self.app_engine_apis = v.into();
9286        self
9287    }
9288
9289    /// Sets the value of [beta_settings][crate::model::Version::beta_settings].
9290    ///
9291    /// # Example
9292    /// ```ignore,no_run
9293    /// # use google_cloud_appengine_v1::model::Version;
9294    /// let x = Version::new().set_beta_settings([
9295    ///     ("key0", "abc"),
9296    ///     ("key1", "xyz"),
9297    /// ]);
9298    /// ```
9299    pub fn set_beta_settings<T, K, V>(mut self, v: T) -> Self
9300    where
9301        T: std::iter::IntoIterator<Item = (K, V)>,
9302        K: std::convert::Into<std::string::String>,
9303        V: std::convert::Into<std::string::String>,
9304    {
9305        use std::iter::Iterator;
9306        self.beta_settings = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9307        self
9308    }
9309
9310    /// Sets the value of [env][crate::model::Version::env].
9311    ///
9312    /// # Example
9313    /// ```ignore,no_run
9314    /// # use google_cloud_appengine_v1::model::Version;
9315    /// let x = Version::new().set_env("example");
9316    /// ```
9317    pub fn set_env<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9318        self.env = v.into();
9319        self
9320    }
9321
9322    /// Sets the value of [serving_status][crate::model::Version::serving_status].
9323    ///
9324    /// # Example
9325    /// ```ignore,no_run
9326    /// # use google_cloud_appengine_v1::model::Version;
9327    /// use google_cloud_appengine_v1::model::ServingStatus;
9328    /// let x0 = Version::new().set_serving_status(ServingStatus::Serving);
9329    /// let x1 = Version::new().set_serving_status(ServingStatus::Stopped);
9330    /// ```
9331    pub fn set_serving_status<T: std::convert::Into<crate::model::ServingStatus>>(
9332        mut self,
9333        v: T,
9334    ) -> Self {
9335        self.serving_status = v.into();
9336        self
9337    }
9338
9339    /// Sets the value of [created_by][crate::model::Version::created_by].
9340    ///
9341    /// # Example
9342    /// ```ignore,no_run
9343    /// # use google_cloud_appengine_v1::model::Version;
9344    /// let x = Version::new().set_created_by("example");
9345    /// ```
9346    pub fn set_created_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9347        self.created_by = v.into();
9348        self
9349    }
9350
9351    /// Sets the value of [create_time][crate::model::Version::create_time].
9352    ///
9353    /// # Example
9354    /// ```ignore,no_run
9355    /// # use google_cloud_appengine_v1::model::Version;
9356    /// use wkt::Timestamp;
9357    /// let x = Version::new().set_create_time(Timestamp::default()/* use setters */);
9358    /// ```
9359    pub fn set_create_time<T>(mut self, v: T) -> Self
9360    where
9361        T: std::convert::Into<wkt::Timestamp>,
9362    {
9363        self.create_time = std::option::Option::Some(v.into());
9364        self
9365    }
9366
9367    /// Sets or clears the value of [create_time][crate::model::Version::create_time].
9368    ///
9369    /// # Example
9370    /// ```ignore,no_run
9371    /// # use google_cloud_appengine_v1::model::Version;
9372    /// use wkt::Timestamp;
9373    /// let x = Version::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9374    /// let x = Version::new().set_or_clear_create_time(None::<Timestamp>);
9375    /// ```
9376    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9377    where
9378        T: std::convert::Into<wkt::Timestamp>,
9379    {
9380        self.create_time = v.map(|x| x.into());
9381        self
9382    }
9383
9384    /// Sets the value of [disk_usage_bytes][crate::model::Version::disk_usage_bytes].
9385    ///
9386    /// # Example
9387    /// ```ignore,no_run
9388    /// # use google_cloud_appengine_v1::model::Version;
9389    /// let x = Version::new().set_disk_usage_bytes(42);
9390    /// ```
9391    pub fn set_disk_usage_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9392        self.disk_usage_bytes = v.into();
9393        self
9394    }
9395
9396    /// Sets the value of [runtime_api_version][crate::model::Version::runtime_api_version].
9397    ///
9398    /// # Example
9399    /// ```ignore,no_run
9400    /// # use google_cloud_appengine_v1::model::Version;
9401    /// let x = Version::new().set_runtime_api_version("example");
9402    /// ```
9403    pub fn set_runtime_api_version<T: std::convert::Into<std::string::String>>(
9404        mut self,
9405        v: T,
9406    ) -> Self {
9407        self.runtime_api_version = v.into();
9408        self
9409    }
9410
9411    /// Sets the value of [runtime_main_executable_path][crate::model::Version::runtime_main_executable_path].
9412    ///
9413    /// # Example
9414    /// ```ignore,no_run
9415    /// # use google_cloud_appengine_v1::model::Version;
9416    /// let x = Version::new().set_runtime_main_executable_path("example");
9417    /// ```
9418    pub fn set_runtime_main_executable_path<T: std::convert::Into<std::string::String>>(
9419        mut self,
9420        v: T,
9421    ) -> Self {
9422        self.runtime_main_executable_path = v.into();
9423        self
9424    }
9425
9426    /// Sets the value of [service_account][crate::model::Version::service_account].
9427    ///
9428    /// # Example
9429    /// ```ignore,no_run
9430    /// # use google_cloud_appengine_v1::model::Version;
9431    /// let x = Version::new().set_service_account("example");
9432    /// ```
9433    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9434        self.service_account = v.into();
9435        self
9436    }
9437
9438    /// Sets the value of [handlers][crate::model::Version::handlers].
9439    ///
9440    /// # Example
9441    /// ```ignore,no_run
9442    /// # use google_cloud_appengine_v1::model::Version;
9443    /// use google_cloud_appengine_v1::model::UrlMap;
9444    /// let x = Version::new()
9445    ///     .set_handlers([
9446    ///         UrlMap::default()/* use setters */,
9447    ///         UrlMap::default()/* use (different) setters */,
9448    ///     ]);
9449    /// ```
9450    pub fn set_handlers<T, V>(mut self, v: T) -> Self
9451    where
9452        T: std::iter::IntoIterator<Item = V>,
9453        V: std::convert::Into<crate::model::UrlMap>,
9454    {
9455        use std::iter::Iterator;
9456        self.handlers = v.into_iter().map(|i| i.into()).collect();
9457        self
9458    }
9459
9460    /// Sets the value of [error_handlers][crate::model::Version::error_handlers].
9461    ///
9462    /// # Example
9463    /// ```ignore,no_run
9464    /// # use google_cloud_appengine_v1::model::Version;
9465    /// use google_cloud_appengine_v1::model::ErrorHandler;
9466    /// let x = Version::new()
9467    ///     .set_error_handlers([
9468    ///         ErrorHandler::default()/* use setters */,
9469    ///         ErrorHandler::default()/* use (different) setters */,
9470    ///     ]);
9471    /// ```
9472    pub fn set_error_handlers<T, V>(mut self, v: T) -> Self
9473    where
9474        T: std::iter::IntoIterator<Item = V>,
9475        V: std::convert::Into<crate::model::ErrorHandler>,
9476    {
9477        use std::iter::Iterator;
9478        self.error_handlers = v.into_iter().map(|i| i.into()).collect();
9479        self
9480    }
9481
9482    /// Sets the value of [libraries][crate::model::Version::libraries].
9483    ///
9484    /// # Example
9485    /// ```ignore,no_run
9486    /// # use google_cloud_appengine_v1::model::Version;
9487    /// use google_cloud_appengine_v1::model::Library;
9488    /// let x = Version::new()
9489    ///     .set_libraries([
9490    ///         Library::default()/* use setters */,
9491    ///         Library::default()/* use (different) setters */,
9492    ///     ]);
9493    /// ```
9494    pub fn set_libraries<T, V>(mut self, v: T) -> Self
9495    where
9496        T: std::iter::IntoIterator<Item = V>,
9497        V: std::convert::Into<crate::model::Library>,
9498    {
9499        use std::iter::Iterator;
9500        self.libraries = v.into_iter().map(|i| i.into()).collect();
9501        self
9502    }
9503
9504    /// Sets the value of [api_config][crate::model::Version::api_config].
9505    ///
9506    /// # Example
9507    /// ```ignore,no_run
9508    /// # use google_cloud_appengine_v1::model::Version;
9509    /// use google_cloud_appengine_v1::model::ApiConfigHandler;
9510    /// let x = Version::new().set_api_config(ApiConfigHandler::default()/* use setters */);
9511    /// ```
9512    pub fn set_api_config<T>(mut self, v: T) -> Self
9513    where
9514        T: std::convert::Into<crate::model::ApiConfigHandler>,
9515    {
9516        self.api_config = std::option::Option::Some(v.into());
9517        self
9518    }
9519
9520    /// Sets or clears the value of [api_config][crate::model::Version::api_config].
9521    ///
9522    /// # Example
9523    /// ```ignore,no_run
9524    /// # use google_cloud_appengine_v1::model::Version;
9525    /// use google_cloud_appengine_v1::model::ApiConfigHandler;
9526    /// let x = Version::new().set_or_clear_api_config(Some(ApiConfigHandler::default()/* use setters */));
9527    /// let x = Version::new().set_or_clear_api_config(None::<ApiConfigHandler>);
9528    /// ```
9529    pub fn set_or_clear_api_config<T>(mut self, v: std::option::Option<T>) -> Self
9530    where
9531        T: std::convert::Into<crate::model::ApiConfigHandler>,
9532    {
9533        self.api_config = v.map(|x| x.into());
9534        self
9535    }
9536
9537    /// Sets the value of [env_variables][crate::model::Version::env_variables].
9538    ///
9539    /// # Example
9540    /// ```ignore,no_run
9541    /// # use google_cloud_appengine_v1::model::Version;
9542    /// let x = Version::new().set_env_variables([
9543    ///     ("key0", "abc"),
9544    ///     ("key1", "xyz"),
9545    /// ]);
9546    /// ```
9547    pub fn set_env_variables<T, K, V>(mut self, v: T) -> Self
9548    where
9549        T: std::iter::IntoIterator<Item = (K, V)>,
9550        K: std::convert::Into<std::string::String>,
9551        V: std::convert::Into<std::string::String>,
9552    {
9553        use std::iter::Iterator;
9554        self.env_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9555        self
9556    }
9557
9558    /// Sets the value of [build_env_variables][crate::model::Version::build_env_variables].
9559    ///
9560    /// # Example
9561    /// ```ignore,no_run
9562    /// # use google_cloud_appengine_v1::model::Version;
9563    /// let x = Version::new().set_build_env_variables([
9564    ///     ("key0", "abc"),
9565    ///     ("key1", "xyz"),
9566    /// ]);
9567    /// ```
9568    pub fn set_build_env_variables<T, K, V>(mut self, v: T) -> Self
9569    where
9570        T: std::iter::IntoIterator<Item = (K, V)>,
9571        K: std::convert::Into<std::string::String>,
9572        V: std::convert::Into<std::string::String>,
9573    {
9574        use std::iter::Iterator;
9575        self.build_env_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9576        self
9577    }
9578
9579    /// Sets the value of [default_expiration][crate::model::Version::default_expiration].
9580    ///
9581    /// # Example
9582    /// ```ignore,no_run
9583    /// # use google_cloud_appengine_v1::model::Version;
9584    /// use wkt::Duration;
9585    /// let x = Version::new().set_default_expiration(Duration::default()/* use setters */);
9586    /// ```
9587    pub fn set_default_expiration<T>(mut self, v: T) -> Self
9588    where
9589        T: std::convert::Into<wkt::Duration>,
9590    {
9591        self.default_expiration = std::option::Option::Some(v.into());
9592        self
9593    }
9594
9595    /// Sets or clears the value of [default_expiration][crate::model::Version::default_expiration].
9596    ///
9597    /// # Example
9598    /// ```ignore,no_run
9599    /// # use google_cloud_appengine_v1::model::Version;
9600    /// use wkt::Duration;
9601    /// let x = Version::new().set_or_clear_default_expiration(Some(Duration::default()/* use setters */));
9602    /// let x = Version::new().set_or_clear_default_expiration(None::<Duration>);
9603    /// ```
9604    pub fn set_or_clear_default_expiration<T>(mut self, v: std::option::Option<T>) -> Self
9605    where
9606        T: std::convert::Into<wkt::Duration>,
9607    {
9608        self.default_expiration = v.map(|x| x.into());
9609        self
9610    }
9611
9612    /// Sets the value of [health_check][crate::model::Version::health_check].
9613    ///
9614    /// # Example
9615    /// ```ignore,no_run
9616    /// # use google_cloud_appengine_v1::model::Version;
9617    /// use google_cloud_appengine_v1::model::HealthCheck;
9618    /// let x = Version::new().set_health_check(HealthCheck::default()/* use setters */);
9619    /// ```
9620    pub fn set_health_check<T>(mut self, v: T) -> Self
9621    where
9622        T: std::convert::Into<crate::model::HealthCheck>,
9623    {
9624        self.health_check = std::option::Option::Some(v.into());
9625        self
9626    }
9627
9628    /// Sets or clears the value of [health_check][crate::model::Version::health_check].
9629    ///
9630    /// # Example
9631    /// ```ignore,no_run
9632    /// # use google_cloud_appengine_v1::model::Version;
9633    /// use google_cloud_appengine_v1::model::HealthCheck;
9634    /// let x = Version::new().set_or_clear_health_check(Some(HealthCheck::default()/* use setters */));
9635    /// let x = Version::new().set_or_clear_health_check(None::<HealthCheck>);
9636    /// ```
9637    pub fn set_or_clear_health_check<T>(mut self, v: std::option::Option<T>) -> Self
9638    where
9639        T: std::convert::Into<crate::model::HealthCheck>,
9640    {
9641        self.health_check = v.map(|x| x.into());
9642        self
9643    }
9644
9645    /// Sets the value of [readiness_check][crate::model::Version::readiness_check].
9646    ///
9647    /// # Example
9648    /// ```ignore,no_run
9649    /// # use google_cloud_appengine_v1::model::Version;
9650    /// use google_cloud_appengine_v1::model::ReadinessCheck;
9651    /// let x = Version::new().set_readiness_check(ReadinessCheck::default()/* use setters */);
9652    /// ```
9653    pub fn set_readiness_check<T>(mut self, v: T) -> Self
9654    where
9655        T: std::convert::Into<crate::model::ReadinessCheck>,
9656    {
9657        self.readiness_check = std::option::Option::Some(v.into());
9658        self
9659    }
9660
9661    /// Sets or clears the value of [readiness_check][crate::model::Version::readiness_check].
9662    ///
9663    /// # Example
9664    /// ```ignore,no_run
9665    /// # use google_cloud_appengine_v1::model::Version;
9666    /// use google_cloud_appengine_v1::model::ReadinessCheck;
9667    /// let x = Version::new().set_or_clear_readiness_check(Some(ReadinessCheck::default()/* use setters */));
9668    /// let x = Version::new().set_or_clear_readiness_check(None::<ReadinessCheck>);
9669    /// ```
9670    pub fn set_or_clear_readiness_check<T>(mut self, v: std::option::Option<T>) -> Self
9671    where
9672        T: std::convert::Into<crate::model::ReadinessCheck>,
9673    {
9674        self.readiness_check = v.map(|x| x.into());
9675        self
9676    }
9677
9678    /// Sets the value of [liveness_check][crate::model::Version::liveness_check].
9679    ///
9680    /// # Example
9681    /// ```ignore,no_run
9682    /// # use google_cloud_appengine_v1::model::Version;
9683    /// use google_cloud_appengine_v1::model::LivenessCheck;
9684    /// let x = Version::new().set_liveness_check(LivenessCheck::default()/* use setters */);
9685    /// ```
9686    pub fn set_liveness_check<T>(mut self, v: T) -> Self
9687    where
9688        T: std::convert::Into<crate::model::LivenessCheck>,
9689    {
9690        self.liveness_check = std::option::Option::Some(v.into());
9691        self
9692    }
9693
9694    /// Sets or clears the value of [liveness_check][crate::model::Version::liveness_check].
9695    ///
9696    /// # Example
9697    /// ```ignore,no_run
9698    /// # use google_cloud_appengine_v1::model::Version;
9699    /// use google_cloud_appengine_v1::model::LivenessCheck;
9700    /// let x = Version::new().set_or_clear_liveness_check(Some(LivenessCheck::default()/* use setters */));
9701    /// let x = Version::new().set_or_clear_liveness_check(None::<LivenessCheck>);
9702    /// ```
9703    pub fn set_or_clear_liveness_check<T>(mut self, v: std::option::Option<T>) -> Self
9704    where
9705        T: std::convert::Into<crate::model::LivenessCheck>,
9706    {
9707        self.liveness_check = v.map(|x| x.into());
9708        self
9709    }
9710
9711    /// Sets the value of [nobuild_files_regex][crate::model::Version::nobuild_files_regex].
9712    ///
9713    /// # Example
9714    /// ```ignore,no_run
9715    /// # use google_cloud_appengine_v1::model::Version;
9716    /// let x = Version::new().set_nobuild_files_regex("example");
9717    /// ```
9718    pub fn set_nobuild_files_regex<T: std::convert::Into<std::string::String>>(
9719        mut self,
9720        v: T,
9721    ) -> Self {
9722        self.nobuild_files_regex = v.into();
9723        self
9724    }
9725
9726    /// Sets the value of [deployment][crate::model::Version::deployment].
9727    ///
9728    /// # Example
9729    /// ```ignore,no_run
9730    /// # use google_cloud_appengine_v1::model::Version;
9731    /// use google_cloud_appengine_v1::model::Deployment;
9732    /// let x = Version::new().set_deployment(Deployment::default()/* use setters */);
9733    /// ```
9734    pub fn set_deployment<T>(mut self, v: T) -> Self
9735    where
9736        T: std::convert::Into<crate::model::Deployment>,
9737    {
9738        self.deployment = std::option::Option::Some(v.into());
9739        self
9740    }
9741
9742    /// Sets or clears the value of [deployment][crate::model::Version::deployment].
9743    ///
9744    /// # Example
9745    /// ```ignore,no_run
9746    /// # use google_cloud_appengine_v1::model::Version;
9747    /// use google_cloud_appengine_v1::model::Deployment;
9748    /// let x = Version::new().set_or_clear_deployment(Some(Deployment::default()/* use setters */));
9749    /// let x = Version::new().set_or_clear_deployment(None::<Deployment>);
9750    /// ```
9751    pub fn set_or_clear_deployment<T>(mut self, v: std::option::Option<T>) -> Self
9752    where
9753        T: std::convert::Into<crate::model::Deployment>,
9754    {
9755        self.deployment = v.map(|x| x.into());
9756        self
9757    }
9758
9759    /// Sets the value of [version_url][crate::model::Version::version_url].
9760    ///
9761    /// # Example
9762    /// ```ignore,no_run
9763    /// # use google_cloud_appengine_v1::model::Version;
9764    /// let x = Version::new().set_version_url("example");
9765    /// ```
9766    pub fn set_version_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9767        self.version_url = v.into();
9768        self
9769    }
9770
9771    /// Sets the value of [endpoints_api_service][crate::model::Version::endpoints_api_service].
9772    ///
9773    /// # Example
9774    /// ```ignore,no_run
9775    /// # use google_cloud_appengine_v1::model::Version;
9776    /// use google_cloud_appengine_v1::model::EndpointsApiService;
9777    /// let x = Version::new().set_endpoints_api_service(EndpointsApiService::default()/* use setters */);
9778    /// ```
9779    pub fn set_endpoints_api_service<T>(mut self, v: T) -> Self
9780    where
9781        T: std::convert::Into<crate::model::EndpointsApiService>,
9782    {
9783        self.endpoints_api_service = std::option::Option::Some(v.into());
9784        self
9785    }
9786
9787    /// Sets or clears the value of [endpoints_api_service][crate::model::Version::endpoints_api_service].
9788    ///
9789    /// # Example
9790    /// ```ignore,no_run
9791    /// # use google_cloud_appengine_v1::model::Version;
9792    /// use google_cloud_appengine_v1::model::EndpointsApiService;
9793    /// let x = Version::new().set_or_clear_endpoints_api_service(Some(EndpointsApiService::default()/* use setters */));
9794    /// let x = Version::new().set_or_clear_endpoints_api_service(None::<EndpointsApiService>);
9795    /// ```
9796    pub fn set_or_clear_endpoints_api_service<T>(mut self, v: std::option::Option<T>) -> Self
9797    where
9798        T: std::convert::Into<crate::model::EndpointsApiService>,
9799    {
9800        self.endpoints_api_service = v.map(|x| x.into());
9801        self
9802    }
9803
9804    /// Sets the value of [entrypoint][crate::model::Version::entrypoint].
9805    ///
9806    /// # Example
9807    /// ```ignore,no_run
9808    /// # use google_cloud_appengine_v1::model::Version;
9809    /// use google_cloud_appengine_v1::model::Entrypoint;
9810    /// let x = Version::new().set_entrypoint(Entrypoint::default()/* use setters */);
9811    /// ```
9812    pub fn set_entrypoint<T>(mut self, v: T) -> Self
9813    where
9814        T: std::convert::Into<crate::model::Entrypoint>,
9815    {
9816        self.entrypoint = std::option::Option::Some(v.into());
9817        self
9818    }
9819
9820    /// Sets or clears the value of [entrypoint][crate::model::Version::entrypoint].
9821    ///
9822    /// # Example
9823    /// ```ignore,no_run
9824    /// # use google_cloud_appengine_v1::model::Version;
9825    /// use google_cloud_appengine_v1::model::Entrypoint;
9826    /// let x = Version::new().set_or_clear_entrypoint(Some(Entrypoint::default()/* use setters */));
9827    /// let x = Version::new().set_or_clear_entrypoint(None::<Entrypoint>);
9828    /// ```
9829    pub fn set_or_clear_entrypoint<T>(mut self, v: std::option::Option<T>) -> Self
9830    where
9831        T: std::convert::Into<crate::model::Entrypoint>,
9832    {
9833        self.entrypoint = v.map(|x| x.into());
9834        self
9835    }
9836
9837    /// Sets the value of [vpc_access_connector][crate::model::Version::vpc_access_connector].
9838    ///
9839    /// # Example
9840    /// ```ignore,no_run
9841    /// # use google_cloud_appengine_v1::model::Version;
9842    /// use google_cloud_appengine_v1::model::VpcAccessConnector;
9843    /// let x = Version::new().set_vpc_access_connector(VpcAccessConnector::default()/* use setters */);
9844    /// ```
9845    pub fn set_vpc_access_connector<T>(mut self, v: T) -> Self
9846    where
9847        T: std::convert::Into<crate::model::VpcAccessConnector>,
9848    {
9849        self.vpc_access_connector = std::option::Option::Some(v.into());
9850        self
9851    }
9852
9853    /// Sets or clears the value of [vpc_access_connector][crate::model::Version::vpc_access_connector].
9854    ///
9855    /// # Example
9856    /// ```ignore,no_run
9857    /// # use google_cloud_appengine_v1::model::Version;
9858    /// use google_cloud_appengine_v1::model::VpcAccessConnector;
9859    /// let x = Version::new().set_or_clear_vpc_access_connector(Some(VpcAccessConnector::default()/* use setters */));
9860    /// let x = Version::new().set_or_clear_vpc_access_connector(None::<VpcAccessConnector>);
9861    /// ```
9862    pub fn set_or_clear_vpc_access_connector<T>(mut self, v: std::option::Option<T>) -> Self
9863    where
9864        T: std::convert::Into<crate::model::VpcAccessConnector>,
9865    {
9866        self.vpc_access_connector = v.map(|x| x.into());
9867        self
9868    }
9869
9870    /// Sets the value of [scaling][crate::model::Version::scaling].
9871    ///
9872    /// Note that all the setters affecting `scaling` are mutually
9873    /// exclusive.
9874    ///
9875    /// # Example
9876    /// ```ignore,no_run
9877    /// # use google_cloud_appengine_v1::model::Version;
9878    /// use google_cloud_appengine_v1::model::AutomaticScaling;
9879    /// let x = Version::new().set_scaling(Some(
9880    ///     google_cloud_appengine_v1::model::version::Scaling::AutomaticScaling(AutomaticScaling::default().into())));
9881    /// ```
9882    pub fn set_scaling<
9883        T: std::convert::Into<std::option::Option<crate::model::version::Scaling>>,
9884    >(
9885        mut self,
9886        v: T,
9887    ) -> Self {
9888        self.scaling = v.into();
9889        self
9890    }
9891
9892    /// The value of [scaling][crate::model::Version::scaling]
9893    /// if it holds a `AutomaticScaling`, `None` if the field is not set or
9894    /// holds a different branch.
9895    pub fn automatic_scaling(
9896        &self,
9897    ) -> std::option::Option<&std::boxed::Box<crate::model::AutomaticScaling>> {
9898        #[allow(unreachable_patterns)]
9899        self.scaling.as_ref().and_then(|v| match v {
9900            crate::model::version::Scaling::AutomaticScaling(v) => std::option::Option::Some(v),
9901            _ => std::option::Option::None,
9902        })
9903    }
9904
9905    /// Sets the value of [scaling][crate::model::Version::scaling]
9906    /// to hold a `AutomaticScaling`.
9907    ///
9908    /// Note that all the setters affecting `scaling` are
9909    /// mutually exclusive.
9910    ///
9911    /// # Example
9912    /// ```ignore,no_run
9913    /// # use google_cloud_appengine_v1::model::Version;
9914    /// use google_cloud_appengine_v1::model::AutomaticScaling;
9915    /// let x = Version::new().set_automatic_scaling(AutomaticScaling::default()/* use setters */);
9916    /// assert!(x.automatic_scaling().is_some());
9917    /// assert!(x.basic_scaling().is_none());
9918    /// assert!(x.manual_scaling().is_none());
9919    /// ```
9920    pub fn set_automatic_scaling<
9921        T: std::convert::Into<std::boxed::Box<crate::model::AutomaticScaling>>,
9922    >(
9923        mut self,
9924        v: T,
9925    ) -> Self {
9926        self.scaling =
9927            std::option::Option::Some(crate::model::version::Scaling::AutomaticScaling(v.into()));
9928        self
9929    }
9930
9931    /// The value of [scaling][crate::model::Version::scaling]
9932    /// if it holds a `BasicScaling`, `None` if the field is not set or
9933    /// holds a different branch.
9934    pub fn basic_scaling(
9935        &self,
9936    ) -> std::option::Option<&std::boxed::Box<crate::model::BasicScaling>> {
9937        #[allow(unreachable_patterns)]
9938        self.scaling.as_ref().and_then(|v| match v {
9939            crate::model::version::Scaling::BasicScaling(v) => std::option::Option::Some(v),
9940            _ => std::option::Option::None,
9941        })
9942    }
9943
9944    /// Sets the value of [scaling][crate::model::Version::scaling]
9945    /// to hold a `BasicScaling`.
9946    ///
9947    /// Note that all the setters affecting `scaling` are
9948    /// mutually exclusive.
9949    ///
9950    /// # Example
9951    /// ```ignore,no_run
9952    /// # use google_cloud_appengine_v1::model::Version;
9953    /// use google_cloud_appengine_v1::model::BasicScaling;
9954    /// let x = Version::new().set_basic_scaling(BasicScaling::default()/* use setters */);
9955    /// assert!(x.basic_scaling().is_some());
9956    /// assert!(x.automatic_scaling().is_none());
9957    /// assert!(x.manual_scaling().is_none());
9958    /// ```
9959    pub fn set_basic_scaling<T: std::convert::Into<std::boxed::Box<crate::model::BasicScaling>>>(
9960        mut self,
9961        v: T,
9962    ) -> Self {
9963        self.scaling =
9964            std::option::Option::Some(crate::model::version::Scaling::BasicScaling(v.into()));
9965        self
9966    }
9967
9968    /// The value of [scaling][crate::model::Version::scaling]
9969    /// if it holds a `ManualScaling`, `None` if the field is not set or
9970    /// holds a different branch.
9971    pub fn manual_scaling(
9972        &self,
9973    ) -> std::option::Option<&std::boxed::Box<crate::model::ManualScaling>> {
9974        #[allow(unreachable_patterns)]
9975        self.scaling.as_ref().and_then(|v| match v {
9976            crate::model::version::Scaling::ManualScaling(v) => std::option::Option::Some(v),
9977            _ => std::option::Option::None,
9978        })
9979    }
9980
9981    /// Sets the value of [scaling][crate::model::Version::scaling]
9982    /// to hold a `ManualScaling`.
9983    ///
9984    /// Note that all the setters affecting `scaling` are
9985    /// mutually exclusive.
9986    ///
9987    /// # Example
9988    /// ```ignore,no_run
9989    /// # use google_cloud_appengine_v1::model::Version;
9990    /// use google_cloud_appengine_v1::model::ManualScaling;
9991    /// let x = Version::new().set_manual_scaling(ManualScaling::default()/* use setters */);
9992    /// assert!(x.manual_scaling().is_some());
9993    /// assert!(x.automatic_scaling().is_none());
9994    /// assert!(x.basic_scaling().is_none());
9995    /// ```
9996    pub fn set_manual_scaling<
9997        T: std::convert::Into<std::boxed::Box<crate::model::ManualScaling>>,
9998    >(
9999        mut self,
10000        v: T,
10001    ) -> Self {
10002        self.scaling =
10003            std::option::Option::Some(crate::model::version::Scaling::ManualScaling(v.into()));
10004        self
10005    }
10006}
10007
10008impl wkt::message::Message for Version {
10009    fn typename() -> &'static str {
10010        "type.googleapis.com/google.appengine.v1.Version"
10011    }
10012}
10013
10014/// Defines additional types related to [Version].
10015pub mod version {
10016    #[allow(unused_imports)]
10017    use super::*;
10018
10019    /// Controls how instances are created, scaled, and reaped.
10020    ///
10021    /// Defaults to `AutomaticScaling`.
10022    #[derive(Clone, Debug, PartialEq)]
10023    #[non_exhaustive]
10024    pub enum Scaling {
10025        /// Automatic scaling is based on request rate, response latencies, and other
10026        /// application metrics. Instances are dynamically created and destroyed as
10027        /// needed in order to handle traffic.
10028        AutomaticScaling(std::boxed::Box<crate::model::AutomaticScaling>),
10029        /// A service with basic scaling will create an instance when the application
10030        /// receives a request. The instance will be turned down when the app becomes
10031        /// idle. Basic scaling is ideal for work that is intermittent or driven by
10032        /// user activity.
10033        BasicScaling(std::boxed::Box<crate::model::BasicScaling>),
10034        /// A service with manual scaling runs continuously, allowing you to perform
10035        /// complex initialization and rely on the state of its memory over time.
10036        /// Manually scaled versions are sometimes referred to as "backends".
10037        ManualScaling(std::boxed::Box<crate::model::ManualScaling>),
10038    }
10039}
10040
10041/// [Cloud Endpoints](https://cloud.google.com/endpoints) configuration.
10042/// The Endpoints API Service provides tooling for serving Open API and gRPC
10043/// endpoints via an NGINX proxy. Only valid for App Engine Flexible environment
10044/// deployments.
10045///
10046/// The fields here refer to the name and configuration ID of a "service"
10047/// resource in the [Service Management API](https://cloud.google.com/service-management/overview).
10048#[derive(Clone, Default, PartialEq)]
10049#[non_exhaustive]
10050pub struct EndpointsApiService {
10051    /// Endpoints service name which is the name of the "service" resource in the
10052    /// Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
10053    pub name: std::string::String,
10054
10055    /// Endpoints service configuration ID as specified by the Service Management
10056    /// API. For example "2016-09-19r1".
10057    ///
10058    /// By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
10059    /// This means that Endpoints starts up with a particular configuration ID.
10060    /// When a new configuration is rolled out, Endpoints must be given the new
10061    /// configuration ID. The `config_id` field is used to give the configuration
10062    /// ID and is required in this case.
10063    ///
10064    /// Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
10065    /// When using this, Endpoints fetches the latest configuration and does not
10066    /// need the configuration ID. In this case, `config_id` must be omitted.
10067    pub config_id: std::string::String,
10068
10069    /// Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
10070    /// `MANAGED`, `config_id` must be omitted.
10071    pub rollout_strategy: crate::model::endpoints_api_service::RolloutStrategy,
10072
10073    /// Enable or disable trace sampling. By default, this is set to false for
10074    /// enabled.
10075    pub disable_trace_sampling: bool,
10076
10077    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10078}
10079
10080impl EndpointsApiService {
10081    /// Creates a new default instance.
10082    pub fn new() -> Self {
10083        std::default::Default::default()
10084    }
10085
10086    /// Sets the value of [name][crate::model::EndpointsApiService::name].
10087    ///
10088    /// # Example
10089    /// ```ignore,no_run
10090    /// # use google_cloud_appengine_v1::model::EndpointsApiService;
10091    /// let x = EndpointsApiService::new().set_name("example");
10092    /// ```
10093    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10094        self.name = v.into();
10095        self
10096    }
10097
10098    /// Sets the value of [config_id][crate::model::EndpointsApiService::config_id].
10099    ///
10100    /// # Example
10101    /// ```ignore,no_run
10102    /// # use google_cloud_appengine_v1::model::EndpointsApiService;
10103    /// let x = EndpointsApiService::new().set_config_id("example");
10104    /// ```
10105    pub fn set_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10106        self.config_id = v.into();
10107        self
10108    }
10109
10110    /// Sets the value of [rollout_strategy][crate::model::EndpointsApiService::rollout_strategy].
10111    ///
10112    /// # Example
10113    /// ```ignore,no_run
10114    /// # use google_cloud_appengine_v1::model::EndpointsApiService;
10115    /// use google_cloud_appengine_v1::model::endpoints_api_service::RolloutStrategy;
10116    /// let x0 = EndpointsApiService::new().set_rollout_strategy(RolloutStrategy::Fixed);
10117    /// let x1 = EndpointsApiService::new().set_rollout_strategy(RolloutStrategy::Managed);
10118    /// ```
10119    pub fn set_rollout_strategy<
10120        T: std::convert::Into<crate::model::endpoints_api_service::RolloutStrategy>,
10121    >(
10122        mut self,
10123        v: T,
10124    ) -> Self {
10125        self.rollout_strategy = v.into();
10126        self
10127    }
10128
10129    /// Sets the value of [disable_trace_sampling][crate::model::EndpointsApiService::disable_trace_sampling].
10130    ///
10131    /// # Example
10132    /// ```ignore,no_run
10133    /// # use google_cloud_appengine_v1::model::EndpointsApiService;
10134    /// let x = EndpointsApiService::new().set_disable_trace_sampling(true);
10135    /// ```
10136    pub fn set_disable_trace_sampling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10137        self.disable_trace_sampling = v.into();
10138        self
10139    }
10140}
10141
10142impl wkt::message::Message for EndpointsApiService {
10143    fn typename() -> &'static str {
10144        "type.googleapis.com/google.appengine.v1.EndpointsApiService"
10145    }
10146}
10147
10148/// Defines additional types related to [EndpointsApiService].
10149pub mod endpoints_api_service {
10150    #[allow(unused_imports)]
10151    use super::*;
10152
10153    /// Available rollout strategies.
10154    ///
10155    /// # Working with unknown values
10156    ///
10157    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10158    /// additional enum variants at any time. Adding new variants is not considered
10159    /// a breaking change. Applications should write their code in anticipation of:
10160    ///
10161    /// - New values appearing in future releases of the client library, **and**
10162    /// - New values received dynamically, without application changes.
10163    ///
10164    /// Please consult the [Working with enums] section in the user guide for some
10165    /// guidelines.
10166    ///
10167    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10168    #[derive(Clone, Debug, PartialEq)]
10169    #[non_exhaustive]
10170    pub enum RolloutStrategy {
10171        /// Not specified. Defaults to `FIXED`.
10172        UnspecifiedRolloutStrategy,
10173        /// Endpoints service configuration ID will be fixed to the configuration ID
10174        /// specified by `config_id`.
10175        Fixed,
10176        /// Endpoints service configuration ID will be updated with each rollout.
10177        Managed,
10178        /// If set, the enum was initialized with an unknown value.
10179        ///
10180        /// Applications can examine the value using [RolloutStrategy::value] or
10181        /// [RolloutStrategy::name].
10182        UnknownValue(rollout_strategy::UnknownValue),
10183    }
10184
10185    #[doc(hidden)]
10186    pub mod rollout_strategy {
10187        #[allow(unused_imports)]
10188        use super::*;
10189        #[derive(Clone, Debug, PartialEq)]
10190        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10191    }
10192
10193    impl RolloutStrategy {
10194        /// Gets the enum value.
10195        ///
10196        /// Returns `None` if the enum contains an unknown value deserialized from
10197        /// the string representation of enums.
10198        pub fn value(&self) -> std::option::Option<i32> {
10199            match self {
10200                Self::UnspecifiedRolloutStrategy => std::option::Option::Some(0),
10201                Self::Fixed => std::option::Option::Some(1),
10202                Self::Managed => std::option::Option::Some(2),
10203                Self::UnknownValue(u) => u.0.value(),
10204            }
10205        }
10206
10207        /// Gets the enum value as a string.
10208        ///
10209        /// Returns `None` if the enum contains an unknown value deserialized from
10210        /// the integer representation of enums.
10211        pub fn name(&self) -> std::option::Option<&str> {
10212            match self {
10213                Self::UnspecifiedRolloutStrategy => {
10214                    std::option::Option::Some("UNSPECIFIED_ROLLOUT_STRATEGY")
10215                }
10216                Self::Fixed => std::option::Option::Some("FIXED"),
10217                Self::Managed => std::option::Option::Some("MANAGED"),
10218                Self::UnknownValue(u) => u.0.name(),
10219            }
10220        }
10221    }
10222
10223    impl std::default::Default for RolloutStrategy {
10224        fn default() -> Self {
10225            use std::convert::From;
10226            Self::from(0)
10227        }
10228    }
10229
10230    impl std::fmt::Display for RolloutStrategy {
10231        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10232            wkt::internal::display_enum(f, self.name(), self.value())
10233        }
10234    }
10235
10236    impl std::convert::From<i32> for RolloutStrategy {
10237        fn from(value: i32) -> Self {
10238            match value {
10239                0 => Self::UnspecifiedRolloutStrategy,
10240                1 => Self::Fixed,
10241                2 => Self::Managed,
10242                _ => Self::UnknownValue(rollout_strategy::UnknownValue(
10243                    wkt::internal::UnknownEnumValue::Integer(value),
10244                )),
10245            }
10246        }
10247    }
10248
10249    impl std::convert::From<&str> for RolloutStrategy {
10250        fn from(value: &str) -> Self {
10251            use std::string::ToString;
10252            match value {
10253                "UNSPECIFIED_ROLLOUT_STRATEGY" => Self::UnspecifiedRolloutStrategy,
10254                "FIXED" => Self::Fixed,
10255                "MANAGED" => Self::Managed,
10256                _ => Self::UnknownValue(rollout_strategy::UnknownValue(
10257                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10258                )),
10259            }
10260        }
10261    }
10262
10263    impl serde::ser::Serialize for RolloutStrategy {
10264        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10265        where
10266            S: serde::Serializer,
10267        {
10268            match self {
10269                Self::UnspecifiedRolloutStrategy => serializer.serialize_i32(0),
10270                Self::Fixed => serializer.serialize_i32(1),
10271                Self::Managed => serializer.serialize_i32(2),
10272                Self::UnknownValue(u) => u.0.serialize(serializer),
10273            }
10274        }
10275    }
10276
10277    impl<'de> serde::de::Deserialize<'de> for RolloutStrategy {
10278        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10279        where
10280            D: serde::Deserializer<'de>,
10281        {
10282            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RolloutStrategy>::new(
10283                ".google.appengine.v1.EndpointsApiService.RolloutStrategy",
10284            ))
10285        }
10286    }
10287}
10288
10289/// Automatic scaling is based on request rate, response latencies, and other
10290/// application metrics.
10291#[derive(Clone, Default, PartialEq)]
10292#[non_exhaustive]
10293pub struct AutomaticScaling {
10294    /// The time period that the
10295    /// [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
10296    /// should wait before it starts collecting information from a new instance.
10297    /// This prevents the autoscaler from collecting information when the instance
10298    /// is initializing, during which the collected usage would not be reliable.
10299    /// Only applicable in the App Engine flexible environment.
10300    pub cool_down_period: std::option::Option<wkt::Duration>,
10301
10302    /// Target scaling by CPU usage.
10303    pub cpu_utilization: std::option::Option<crate::model::CpuUtilization>,
10304
10305    /// Number of concurrent requests an automatic scaling instance can accept
10306    /// before the scheduler spawns a new instance.
10307    ///
10308    /// Defaults to a runtime-specific value.
10309    pub max_concurrent_requests: i32,
10310
10311    /// Maximum number of idle instances that should be maintained for this
10312    /// version.
10313    pub max_idle_instances: i32,
10314
10315    /// Maximum number of instances that should be started to handle requests for
10316    /// this version.
10317    pub max_total_instances: i32,
10318
10319    /// Maximum amount of time that a request should wait in the pending queue
10320    /// before starting a new instance to handle it.
10321    pub max_pending_latency: std::option::Option<wkt::Duration>,
10322
10323    /// Minimum number of idle instances that should be maintained for
10324    /// this version. Only applicable for the default version of a service.
10325    pub min_idle_instances: i32,
10326
10327    /// Minimum number of running instances that should be maintained for this
10328    /// version.
10329    pub min_total_instances: i32,
10330
10331    /// Minimum amount of time a request should wait in the pending queue before
10332    /// starting a new instance to handle it.
10333    pub min_pending_latency: std::option::Option<wkt::Duration>,
10334
10335    /// Target scaling by request utilization.
10336    pub request_utilization: std::option::Option<crate::model::RequestUtilization>,
10337
10338    /// Target scaling by disk usage.
10339    pub disk_utilization: std::option::Option<crate::model::DiskUtilization>,
10340
10341    /// Target scaling by network usage.
10342    pub network_utilization: std::option::Option<crate::model::NetworkUtilization>,
10343
10344    /// Scheduler settings for standard environment.
10345    pub standard_scheduler_settings: std::option::Option<crate::model::StandardSchedulerSettings>,
10346
10347    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10348}
10349
10350impl AutomaticScaling {
10351    /// Creates a new default instance.
10352    pub fn new() -> Self {
10353        std::default::Default::default()
10354    }
10355
10356    /// Sets the value of [cool_down_period][crate::model::AutomaticScaling::cool_down_period].
10357    ///
10358    /// # Example
10359    /// ```ignore,no_run
10360    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10361    /// use wkt::Duration;
10362    /// let x = AutomaticScaling::new().set_cool_down_period(Duration::default()/* use setters */);
10363    /// ```
10364    pub fn set_cool_down_period<T>(mut self, v: T) -> Self
10365    where
10366        T: std::convert::Into<wkt::Duration>,
10367    {
10368        self.cool_down_period = std::option::Option::Some(v.into());
10369        self
10370    }
10371
10372    /// Sets or clears the value of [cool_down_period][crate::model::AutomaticScaling::cool_down_period].
10373    ///
10374    /// # Example
10375    /// ```ignore,no_run
10376    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10377    /// use wkt::Duration;
10378    /// let x = AutomaticScaling::new().set_or_clear_cool_down_period(Some(Duration::default()/* use setters */));
10379    /// let x = AutomaticScaling::new().set_or_clear_cool_down_period(None::<Duration>);
10380    /// ```
10381    pub fn set_or_clear_cool_down_period<T>(mut self, v: std::option::Option<T>) -> Self
10382    where
10383        T: std::convert::Into<wkt::Duration>,
10384    {
10385        self.cool_down_period = v.map(|x| x.into());
10386        self
10387    }
10388
10389    /// Sets the value of [cpu_utilization][crate::model::AutomaticScaling::cpu_utilization].
10390    ///
10391    /// # Example
10392    /// ```ignore,no_run
10393    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10394    /// use google_cloud_appengine_v1::model::CpuUtilization;
10395    /// let x = AutomaticScaling::new().set_cpu_utilization(CpuUtilization::default()/* use setters */);
10396    /// ```
10397    pub fn set_cpu_utilization<T>(mut self, v: T) -> Self
10398    where
10399        T: std::convert::Into<crate::model::CpuUtilization>,
10400    {
10401        self.cpu_utilization = std::option::Option::Some(v.into());
10402        self
10403    }
10404
10405    /// Sets or clears the value of [cpu_utilization][crate::model::AutomaticScaling::cpu_utilization].
10406    ///
10407    /// # Example
10408    /// ```ignore,no_run
10409    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10410    /// use google_cloud_appengine_v1::model::CpuUtilization;
10411    /// let x = AutomaticScaling::new().set_or_clear_cpu_utilization(Some(CpuUtilization::default()/* use setters */));
10412    /// let x = AutomaticScaling::new().set_or_clear_cpu_utilization(None::<CpuUtilization>);
10413    /// ```
10414    pub fn set_or_clear_cpu_utilization<T>(mut self, v: std::option::Option<T>) -> Self
10415    where
10416        T: std::convert::Into<crate::model::CpuUtilization>,
10417    {
10418        self.cpu_utilization = v.map(|x| x.into());
10419        self
10420    }
10421
10422    /// Sets the value of [max_concurrent_requests][crate::model::AutomaticScaling::max_concurrent_requests].
10423    ///
10424    /// # Example
10425    /// ```ignore,no_run
10426    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10427    /// let x = AutomaticScaling::new().set_max_concurrent_requests(42);
10428    /// ```
10429    pub fn set_max_concurrent_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10430        self.max_concurrent_requests = v.into();
10431        self
10432    }
10433
10434    /// Sets the value of [max_idle_instances][crate::model::AutomaticScaling::max_idle_instances].
10435    ///
10436    /// # Example
10437    /// ```ignore,no_run
10438    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10439    /// let x = AutomaticScaling::new().set_max_idle_instances(42);
10440    /// ```
10441    pub fn set_max_idle_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10442        self.max_idle_instances = v.into();
10443        self
10444    }
10445
10446    /// Sets the value of [max_total_instances][crate::model::AutomaticScaling::max_total_instances].
10447    ///
10448    /// # Example
10449    /// ```ignore,no_run
10450    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10451    /// let x = AutomaticScaling::new().set_max_total_instances(42);
10452    /// ```
10453    pub fn set_max_total_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10454        self.max_total_instances = v.into();
10455        self
10456    }
10457
10458    /// Sets the value of [max_pending_latency][crate::model::AutomaticScaling::max_pending_latency].
10459    ///
10460    /// # Example
10461    /// ```ignore,no_run
10462    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10463    /// use wkt::Duration;
10464    /// let x = AutomaticScaling::new().set_max_pending_latency(Duration::default()/* use setters */);
10465    /// ```
10466    pub fn set_max_pending_latency<T>(mut self, v: T) -> Self
10467    where
10468        T: std::convert::Into<wkt::Duration>,
10469    {
10470        self.max_pending_latency = std::option::Option::Some(v.into());
10471        self
10472    }
10473
10474    /// Sets or clears the value of [max_pending_latency][crate::model::AutomaticScaling::max_pending_latency].
10475    ///
10476    /// # Example
10477    /// ```ignore,no_run
10478    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10479    /// use wkt::Duration;
10480    /// let x = AutomaticScaling::new().set_or_clear_max_pending_latency(Some(Duration::default()/* use setters */));
10481    /// let x = AutomaticScaling::new().set_or_clear_max_pending_latency(None::<Duration>);
10482    /// ```
10483    pub fn set_or_clear_max_pending_latency<T>(mut self, v: std::option::Option<T>) -> Self
10484    where
10485        T: std::convert::Into<wkt::Duration>,
10486    {
10487        self.max_pending_latency = v.map(|x| x.into());
10488        self
10489    }
10490
10491    /// Sets the value of [min_idle_instances][crate::model::AutomaticScaling::min_idle_instances].
10492    ///
10493    /// # Example
10494    /// ```ignore,no_run
10495    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10496    /// let x = AutomaticScaling::new().set_min_idle_instances(42);
10497    /// ```
10498    pub fn set_min_idle_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10499        self.min_idle_instances = v.into();
10500        self
10501    }
10502
10503    /// Sets the value of [min_total_instances][crate::model::AutomaticScaling::min_total_instances].
10504    ///
10505    /// # Example
10506    /// ```ignore,no_run
10507    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10508    /// let x = AutomaticScaling::new().set_min_total_instances(42);
10509    /// ```
10510    pub fn set_min_total_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10511        self.min_total_instances = v.into();
10512        self
10513    }
10514
10515    /// Sets the value of [min_pending_latency][crate::model::AutomaticScaling::min_pending_latency].
10516    ///
10517    /// # Example
10518    /// ```ignore,no_run
10519    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10520    /// use wkt::Duration;
10521    /// let x = AutomaticScaling::new().set_min_pending_latency(Duration::default()/* use setters */);
10522    /// ```
10523    pub fn set_min_pending_latency<T>(mut self, v: T) -> Self
10524    where
10525        T: std::convert::Into<wkt::Duration>,
10526    {
10527        self.min_pending_latency = std::option::Option::Some(v.into());
10528        self
10529    }
10530
10531    /// Sets or clears the value of [min_pending_latency][crate::model::AutomaticScaling::min_pending_latency].
10532    ///
10533    /// # Example
10534    /// ```ignore,no_run
10535    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10536    /// use wkt::Duration;
10537    /// let x = AutomaticScaling::new().set_or_clear_min_pending_latency(Some(Duration::default()/* use setters */));
10538    /// let x = AutomaticScaling::new().set_or_clear_min_pending_latency(None::<Duration>);
10539    /// ```
10540    pub fn set_or_clear_min_pending_latency<T>(mut self, v: std::option::Option<T>) -> Self
10541    where
10542        T: std::convert::Into<wkt::Duration>,
10543    {
10544        self.min_pending_latency = v.map(|x| x.into());
10545        self
10546    }
10547
10548    /// Sets the value of [request_utilization][crate::model::AutomaticScaling::request_utilization].
10549    ///
10550    /// # Example
10551    /// ```ignore,no_run
10552    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10553    /// use google_cloud_appengine_v1::model::RequestUtilization;
10554    /// let x = AutomaticScaling::new().set_request_utilization(RequestUtilization::default()/* use setters */);
10555    /// ```
10556    pub fn set_request_utilization<T>(mut self, v: T) -> Self
10557    where
10558        T: std::convert::Into<crate::model::RequestUtilization>,
10559    {
10560        self.request_utilization = std::option::Option::Some(v.into());
10561        self
10562    }
10563
10564    /// Sets or clears the value of [request_utilization][crate::model::AutomaticScaling::request_utilization].
10565    ///
10566    /// # Example
10567    /// ```ignore,no_run
10568    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10569    /// use google_cloud_appengine_v1::model::RequestUtilization;
10570    /// let x = AutomaticScaling::new().set_or_clear_request_utilization(Some(RequestUtilization::default()/* use setters */));
10571    /// let x = AutomaticScaling::new().set_or_clear_request_utilization(None::<RequestUtilization>);
10572    /// ```
10573    pub fn set_or_clear_request_utilization<T>(mut self, v: std::option::Option<T>) -> Self
10574    where
10575        T: std::convert::Into<crate::model::RequestUtilization>,
10576    {
10577        self.request_utilization = v.map(|x| x.into());
10578        self
10579    }
10580
10581    /// Sets the value of [disk_utilization][crate::model::AutomaticScaling::disk_utilization].
10582    ///
10583    /// # Example
10584    /// ```ignore,no_run
10585    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10586    /// use google_cloud_appengine_v1::model::DiskUtilization;
10587    /// let x = AutomaticScaling::new().set_disk_utilization(DiskUtilization::default()/* use setters */);
10588    /// ```
10589    pub fn set_disk_utilization<T>(mut self, v: T) -> Self
10590    where
10591        T: std::convert::Into<crate::model::DiskUtilization>,
10592    {
10593        self.disk_utilization = std::option::Option::Some(v.into());
10594        self
10595    }
10596
10597    /// Sets or clears the value of [disk_utilization][crate::model::AutomaticScaling::disk_utilization].
10598    ///
10599    /// # Example
10600    /// ```ignore,no_run
10601    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10602    /// use google_cloud_appengine_v1::model::DiskUtilization;
10603    /// let x = AutomaticScaling::new().set_or_clear_disk_utilization(Some(DiskUtilization::default()/* use setters */));
10604    /// let x = AutomaticScaling::new().set_or_clear_disk_utilization(None::<DiskUtilization>);
10605    /// ```
10606    pub fn set_or_clear_disk_utilization<T>(mut self, v: std::option::Option<T>) -> Self
10607    where
10608        T: std::convert::Into<crate::model::DiskUtilization>,
10609    {
10610        self.disk_utilization = v.map(|x| x.into());
10611        self
10612    }
10613
10614    /// Sets the value of [network_utilization][crate::model::AutomaticScaling::network_utilization].
10615    ///
10616    /// # Example
10617    /// ```ignore,no_run
10618    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10619    /// use google_cloud_appengine_v1::model::NetworkUtilization;
10620    /// let x = AutomaticScaling::new().set_network_utilization(NetworkUtilization::default()/* use setters */);
10621    /// ```
10622    pub fn set_network_utilization<T>(mut self, v: T) -> Self
10623    where
10624        T: std::convert::Into<crate::model::NetworkUtilization>,
10625    {
10626        self.network_utilization = std::option::Option::Some(v.into());
10627        self
10628    }
10629
10630    /// Sets or clears the value of [network_utilization][crate::model::AutomaticScaling::network_utilization].
10631    ///
10632    /// # Example
10633    /// ```ignore,no_run
10634    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10635    /// use google_cloud_appengine_v1::model::NetworkUtilization;
10636    /// let x = AutomaticScaling::new().set_or_clear_network_utilization(Some(NetworkUtilization::default()/* use setters */));
10637    /// let x = AutomaticScaling::new().set_or_clear_network_utilization(None::<NetworkUtilization>);
10638    /// ```
10639    pub fn set_or_clear_network_utilization<T>(mut self, v: std::option::Option<T>) -> Self
10640    where
10641        T: std::convert::Into<crate::model::NetworkUtilization>,
10642    {
10643        self.network_utilization = v.map(|x| x.into());
10644        self
10645    }
10646
10647    /// Sets the value of [standard_scheduler_settings][crate::model::AutomaticScaling::standard_scheduler_settings].
10648    ///
10649    /// # Example
10650    /// ```ignore,no_run
10651    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10652    /// use google_cloud_appengine_v1::model::StandardSchedulerSettings;
10653    /// let x = AutomaticScaling::new().set_standard_scheduler_settings(StandardSchedulerSettings::default()/* use setters */);
10654    /// ```
10655    pub fn set_standard_scheduler_settings<T>(mut self, v: T) -> Self
10656    where
10657        T: std::convert::Into<crate::model::StandardSchedulerSettings>,
10658    {
10659        self.standard_scheduler_settings = std::option::Option::Some(v.into());
10660        self
10661    }
10662
10663    /// Sets or clears the value of [standard_scheduler_settings][crate::model::AutomaticScaling::standard_scheduler_settings].
10664    ///
10665    /// # Example
10666    /// ```ignore,no_run
10667    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10668    /// use google_cloud_appengine_v1::model::StandardSchedulerSettings;
10669    /// let x = AutomaticScaling::new().set_or_clear_standard_scheduler_settings(Some(StandardSchedulerSettings::default()/* use setters */));
10670    /// let x = AutomaticScaling::new().set_or_clear_standard_scheduler_settings(None::<StandardSchedulerSettings>);
10671    /// ```
10672    pub fn set_or_clear_standard_scheduler_settings<T>(mut self, v: std::option::Option<T>) -> Self
10673    where
10674        T: std::convert::Into<crate::model::StandardSchedulerSettings>,
10675    {
10676        self.standard_scheduler_settings = v.map(|x| x.into());
10677        self
10678    }
10679}
10680
10681impl wkt::message::Message for AutomaticScaling {
10682    fn typename() -> &'static str {
10683        "type.googleapis.com/google.appengine.v1.AutomaticScaling"
10684    }
10685}
10686
10687/// A service with basic scaling will create an instance when the application
10688/// receives a request. The instance will be turned down when the app becomes
10689/// idle. Basic scaling is ideal for work that is intermittent or driven by
10690/// user activity.
10691#[derive(Clone, Default, PartialEq)]
10692#[non_exhaustive]
10693pub struct BasicScaling {
10694    /// Duration of time after the last request that an instance must wait before
10695    /// the instance is shut down.
10696    pub idle_timeout: std::option::Option<wkt::Duration>,
10697
10698    /// Maximum number of instances to create for this version.
10699    pub max_instances: i32,
10700
10701    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10702}
10703
10704impl BasicScaling {
10705    /// Creates a new default instance.
10706    pub fn new() -> Self {
10707        std::default::Default::default()
10708    }
10709
10710    /// Sets the value of [idle_timeout][crate::model::BasicScaling::idle_timeout].
10711    ///
10712    /// # Example
10713    /// ```ignore,no_run
10714    /// # use google_cloud_appengine_v1::model::BasicScaling;
10715    /// use wkt::Duration;
10716    /// let x = BasicScaling::new().set_idle_timeout(Duration::default()/* use setters */);
10717    /// ```
10718    pub fn set_idle_timeout<T>(mut self, v: T) -> Self
10719    where
10720        T: std::convert::Into<wkt::Duration>,
10721    {
10722        self.idle_timeout = std::option::Option::Some(v.into());
10723        self
10724    }
10725
10726    /// Sets or clears the value of [idle_timeout][crate::model::BasicScaling::idle_timeout].
10727    ///
10728    /// # Example
10729    /// ```ignore,no_run
10730    /// # use google_cloud_appengine_v1::model::BasicScaling;
10731    /// use wkt::Duration;
10732    /// let x = BasicScaling::new().set_or_clear_idle_timeout(Some(Duration::default()/* use setters */));
10733    /// let x = BasicScaling::new().set_or_clear_idle_timeout(None::<Duration>);
10734    /// ```
10735    pub fn set_or_clear_idle_timeout<T>(mut self, v: std::option::Option<T>) -> Self
10736    where
10737        T: std::convert::Into<wkt::Duration>,
10738    {
10739        self.idle_timeout = v.map(|x| x.into());
10740        self
10741    }
10742
10743    /// Sets the value of [max_instances][crate::model::BasicScaling::max_instances].
10744    ///
10745    /// # Example
10746    /// ```ignore,no_run
10747    /// # use google_cloud_appengine_v1::model::BasicScaling;
10748    /// let x = BasicScaling::new().set_max_instances(42);
10749    /// ```
10750    pub fn set_max_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10751        self.max_instances = v.into();
10752        self
10753    }
10754}
10755
10756impl wkt::message::Message for BasicScaling {
10757    fn typename() -> &'static str {
10758        "type.googleapis.com/google.appengine.v1.BasicScaling"
10759    }
10760}
10761
10762/// A service with manual scaling runs continuously, allowing you to perform
10763/// complex initialization and rely on the state of its memory over time.
10764#[derive(Clone, Default, PartialEq)]
10765#[non_exhaustive]
10766pub struct ManualScaling {
10767    /// Number of instances to assign to the service at the start. This number
10768    /// can later be altered by using the
10769    /// [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
10770    /// `set_num_instances()` function.
10771    pub instances: i32,
10772
10773    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10774}
10775
10776impl ManualScaling {
10777    /// Creates a new default instance.
10778    pub fn new() -> Self {
10779        std::default::Default::default()
10780    }
10781
10782    /// Sets the value of [instances][crate::model::ManualScaling::instances].
10783    ///
10784    /// # Example
10785    /// ```ignore,no_run
10786    /// # use google_cloud_appengine_v1::model::ManualScaling;
10787    /// let x = ManualScaling::new().set_instances(42);
10788    /// ```
10789    pub fn set_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10790        self.instances = v.into();
10791        self
10792    }
10793}
10794
10795impl wkt::message::Message for ManualScaling {
10796    fn typename() -> &'static str {
10797        "type.googleapis.com/google.appengine.v1.ManualScaling"
10798    }
10799}
10800
10801/// Target scaling by CPU usage.
10802#[derive(Clone, Default, PartialEq)]
10803#[non_exhaustive]
10804pub struct CpuUtilization {
10805    /// Period of time over which CPU utilization is calculated.
10806    pub aggregation_window_length: std::option::Option<wkt::Duration>,
10807
10808    /// Target CPU utilization ratio to maintain when scaling. Must be between 0
10809    /// and 1.
10810    pub target_utilization: f64,
10811
10812    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10813}
10814
10815impl CpuUtilization {
10816    /// Creates a new default instance.
10817    pub fn new() -> Self {
10818        std::default::Default::default()
10819    }
10820
10821    /// Sets the value of [aggregation_window_length][crate::model::CpuUtilization::aggregation_window_length].
10822    ///
10823    /// # Example
10824    /// ```ignore,no_run
10825    /// # use google_cloud_appengine_v1::model::CpuUtilization;
10826    /// use wkt::Duration;
10827    /// let x = CpuUtilization::new().set_aggregation_window_length(Duration::default()/* use setters */);
10828    /// ```
10829    pub fn set_aggregation_window_length<T>(mut self, v: T) -> Self
10830    where
10831        T: std::convert::Into<wkt::Duration>,
10832    {
10833        self.aggregation_window_length = std::option::Option::Some(v.into());
10834        self
10835    }
10836
10837    /// Sets or clears the value of [aggregation_window_length][crate::model::CpuUtilization::aggregation_window_length].
10838    ///
10839    /// # Example
10840    /// ```ignore,no_run
10841    /// # use google_cloud_appengine_v1::model::CpuUtilization;
10842    /// use wkt::Duration;
10843    /// let x = CpuUtilization::new().set_or_clear_aggregation_window_length(Some(Duration::default()/* use setters */));
10844    /// let x = CpuUtilization::new().set_or_clear_aggregation_window_length(None::<Duration>);
10845    /// ```
10846    pub fn set_or_clear_aggregation_window_length<T>(mut self, v: std::option::Option<T>) -> Self
10847    where
10848        T: std::convert::Into<wkt::Duration>,
10849    {
10850        self.aggregation_window_length = v.map(|x| x.into());
10851        self
10852    }
10853
10854    /// Sets the value of [target_utilization][crate::model::CpuUtilization::target_utilization].
10855    ///
10856    /// # Example
10857    /// ```ignore,no_run
10858    /// # use google_cloud_appengine_v1::model::CpuUtilization;
10859    /// let x = CpuUtilization::new().set_target_utilization(42.0);
10860    /// ```
10861    pub fn set_target_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
10862        self.target_utilization = v.into();
10863        self
10864    }
10865}
10866
10867impl wkt::message::Message for CpuUtilization {
10868    fn typename() -> &'static str {
10869        "type.googleapis.com/google.appengine.v1.CpuUtilization"
10870    }
10871}
10872
10873/// Target scaling by request utilization.
10874/// Only applicable in the App Engine flexible environment.
10875#[derive(Clone, Default, PartialEq)]
10876#[non_exhaustive]
10877pub struct RequestUtilization {
10878    /// Target requests per second.
10879    pub target_request_count_per_second: i32,
10880
10881    /// Target number of concurrent requests.
10882    pub target_concurrent_requests: i32,
10883
10884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10885}
10886
10887impl RequestUtilization {
10888    /// Creates a new default instance.
10889    pub fn new() -> Self {
10890        std::default::Default::default()
10891    }
10892
10893    /// Sets the value of [target_request_count_per_second][crate::model::RequestUtilization::target_request_count_per_second].
10894    ///
10895    /// # Example
10896    /// ```ignore,no_run
10897    /// # use google_cloud_appengine_v1::model::RequestUtilization;
10898    /// let x = RequestUtilization::new().set_target_request_count_per_second(42);
10899    /// ```
10900    pub fn set_target_request_count_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10901        self.target_request_count_per_second = v.into();
10902        self
10903    }
10904
10905    /// Sets the value of [target_concurrent_requests][crate::model::RequestUtilization::target_concurrent_requests].
10906    ///
10907    /// # Example
10908    /// ```ignore,no_run
10909    /// # use google_cloud_appengine_v1::model::RequestUtilization;
10910    /// let x = RequestUtilization::new().set_target_concurrent_requests(42);
10911    /// ```
10912    pub fn set_target_concurrent_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10913        self.target_concurrent_requests = v.into();
10914        self
10915    }
10916}
10917
10918impl wkt::message::Message for RequestUtilization {
10919    fn typename() -> &'static str {
10920        "type.googleapis.com/google.appengine.v1.RequestUtilization"
10921    }
10922}
10923
10924/// Target scaling by disk usage.
10925/// Only applicable in the App Engine flexible environment.
10926#[derive(Clone, Default, PartialEq)]
10927#[non_exhaustive]
10928pub struct DiskUtilization {
10929    /// Target bytes written per second.
10930    pub target_write_bytes_per_second: i32,
10931
10932    /// Target ops written per second.
10933    pub target_write_ops_per_second: i32,
10934
10935    /// Target bytes read per second.
10936    pub target_read_bytes_per_second: i32,
10937
10938    /// Target ops read per seconds.
10939    pub target_read_ops_per_second: i32,
10940
10941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10942}
10943
10944impl DiskUtilization {
10945    /// Creates a new default instance.
10946    pub fn new() -> Self {
10947        std::default::Default::default()
10948    }
10949
10950    /// Sets the value of [target_write_bytes_per_second][crate::model::DiskUtilization::target_write_bytes_per_second].
10951    ///
10952    /// # Example
10953    /// ```ignore,no_run
10954    /// # use google_cloud_appengine_v1::model::DiskUtilization;
10955    /// let x = DiskUtilization::new().set_target_write_bytes_per_second(42);
10956    /// ```
10957    pub fn set_target_write_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10958        self.target_write_bytes_per_second = v.into();
10959        self
10960    }
10961
10962    /// Sets the value of [target_write_ops_per_second][crate::model::DiskUtilization::target_write_ops_per_second].
10963    ///
10964    /// # Example
10965    /// ```ignore,no_run
10966    /// # use google_cloud_appengine_v1::model::DiskUtilization;
10967    /// let x = DiskUtilization::new().set_target_write_ops_per_second(42);
10968    /// ```
10969    pub fn set_target_write_ops_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10970        self.target_write_ops_per_second = v.into();
10971        self
10972    }
10973
10974    /// Sets the value of [target_read_bytes_per_second][crate::model::DiskUtilization::target_read_bytes_per_second].
10975    ///
10976    /// # Example
10977    /// ```ignore,no_run
10978    /// # use google_cloud_appengine_v1::model::DiskUtilization;
10979    /// let x = DiskUtilization::new().set_target_read_bytes_per_second(42);
10980    /// ```
10981    pub fn set_target_read_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10982        self.target_read_bytes_per_second = v.into();
10983        self
10984    }
10985
10986    /// Sets the value of [target_read_ops_per_second][crate::model::DiskUtilization::target_read_ops_per_second].
10987    ///
10988    /// # Example
10989    /// ```ignore,no_run
10990    /// # use google_cloud_appengine_v1::model::DiskUtilization;
10991    /// let x = DiskUtilization::new().set_target_read_ops_per_second(42);
10992    /// ```
10993    pub fn set_target_read_ops_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10994        self.target_read_ops_per_second = v.into();
10995        self
10996    }
10997}
10998
10999impl wkt::message::Message for DiskUtilization {
11000    fn typename() -> &'static str {
11001        "type.googleapis.com/google.appengine.v1.DiskUtilization"
11002    }
11003}
11004
11005/// Target scaling by network usage.
11006/// Only applicable in the App Engine flexible environment.
11007#[derive(Clone, Default, PartialEq)]
11008#[non_exhaustive]
11009pub struct NetworkUtilization {
11010    /// Target bytes sent per second.
11011    pub target_sent_bytes_per_second: i32,
11012
11013    /// Target packets sent per second.
11014    pub target_sent_packets_per_second: i32,
11015
11016    /// Target bytes received per second.
11017    pub target_received_bytes_per_second: i32,
11018
11019    /// Target packets received per second.
11020    pub target_received_packets_per_second: i32,
11021
11022    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11023}
11024
11025impl NetworkUtilization {
11026    /// Creates a new default instance.
11027    pub fn new() -> Self {
11028        std::default::Default::default()
11029    }
11030
11031    /// Sets the value of [target_sent_bytes_per_second][crate::model::NetworkUtilization::target_sent_bytes_per_second].
11032    ///
11033    /// # Example
11034    /// ```ignore,no_run
11035    /// # use google_cloud_appengine_v1::model::NetworkUtilization;
11036    /// let x = NetworkUtilization::new().set_target_sent_bytes_per_second(42);
11037    /// ```
11038    pub fn set_target_sent_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11039        self.target_sent_bytes_per_second = v.into();
11040        self
11041    }
11042
11043    /// Sets the value of [target_sent_packets_per_second][crate::model::NetworkUtilization::target_sent_packets_per_second].
11044    ///
11045    /// # Example
11046    /// ```ignore,no_run
11047    /// # use google_cloud_appengine_v1::model::NetworkUtilization;
11048    /// let x = NetworkUtilization::new().set_target_sent_packets_per_second(42);
11049    /// ```
11050    pub fn set_target_sent_packets_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11051        self.target_sent_packets_per_second = v.into();
11052        self
11053    }
11054
11055    /// Sets the value of [target_received_bytes_per_second][crate::model::NetworkUtilization::target_received_bytes_per_second].
11056    ///
11057    /// # Example
11058    /// ```ignore,no_run
11059    /// # use google_cloud_appengine_v1::model::NetworkUtilization;
11060    /// let x = NetworkUtilization::new().set_target_received_bytes_per_second(42);
11061    /// ```
11062    pub fn set_target_received_bytes_per_second<T: std::convert::Into<i32>>(
11063        mut self,
11064        v: T,
11065    ) -> Self {
11066        self.target_received_bytes_per_second = v.into();
11067        self
11068    }
11069
11070    /// Sets the value of [target_received_packets_per_second][crate::model::NetworkUtilization::target_received_packets_per_second].
11071    ///
11072    /// # Example
11073    /// ```ignore,no_run
11074    /// # use google_cloud_appengine_v1::model::NetworkUtilization;
11075    /// let x = NetworkUtilization::new().set_target_received_packets_per_second(42);
11076    /// ```
11077    pub fn set_target_received_packets_per_second<T: std::convert::Into<i32>>(
11078        mut self,
11079        v: T,
11080    ) -> Self {
11081        self.target_received_packets_per_second = v.into();
11082        self
11083    }
11084}
11085
11086impl wkt::message::Message for NetworkUtilization {
11087    fn typename() -> &'static str {
11088        "type.googleapis.com/google.appengine.v1.NetworkUtilization"
11089    }
11090}
11091
11092/// Scheduler settings for standard environment.
11093#[derive(Clone, Default, PartialEq)]
11094#[non_exhaustive]
11095pub struct StandardSchedulerSettings {
11096    /// Target CPU utilization ratio to maintain when scaling.
11097    pub target_cpu_utilization: f64,
11098
11099    /// Target throughput utilization ratio to maintain when scaling
11100    pub target_throughput_utilization: f64,
11101
11102    /// Minimum number of instances to run for this version. Set to zero to disable
11103    /// `min_instances` configuration.
11104    pub min_instances: i32,
11105
11106    /// Maximum number of instances to run for this version. Set to zero to disable
11107    /// `max_instances` configuration.
11108    pub max_instances: i32,
11109
11110    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11111}
11112
11113impl StandardSchedulerSettings {
11114    /// Creates a new default instance.
11115    pub fn new() -> Self {
11116        std::default::Default::default()
11117    }
11118
11119    /// Sets the value of [target_cpu_utilization][crate::model::StandardSchedulerSettings::target_cpu_utilization].
11120    ///
11121    /// # Example
11122    /// ```ignore,no_run
11123    /// # use google_cloud_appengine_v1::model::StandardSchedulerSettings;
11124    /// let x = StandardSchedulerSettings::new().set_target_cpu_utilization(42.0);
11125    /// ```
11126    pub fn set_target_cpu_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11127        self.target_cpu_utilization = v.into();
11128        self
11129    }
11130
11131    /// Sets the value of [target_throughput_utilization][crate::model::StandardSchedulerSettings::target_throughput_utilization].
11132    ///
11133    /// # Example
11134    /// ```ignore,no_run
11135    /// # use google_cloud_appengine_v1::model::StandardSchedulerSettings;
11136    /// let x = StandardSchedulerSettings::new().set_target_throughput_utilization(42.0);
11137    /// ```
11138    pub fn set_target_throughput_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11139        self.target_throughput_utilization = v.into();
11140        self
11141    }
11142
11143    /// Sets the value of [min_instances][crate::model::StandardSchedulerSettings::min_instances].
11144    ///
11145    /// # Example
11146    /// ```ignore,no_run
11147    /// # use google_cloud_appengine_v1::model::StandardSchedulerSettings;
11148    /// let x = StandardSchedulerSettings::new().set_min_instances(42);
11149    /// ```
11150    pub fn set_min_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11151        self.min_instances = v.into();
11152        self
11153    }
11154
11155    /// Sets the value of [max_instances][crate::model::StandardSchedulerSettings::max_instances].
11156    ///
11157    /// # Example
11158    /// ```ignore,no_run
11159    /// # use google_cloud_appengine_v1::model::StandardSchedulerSettings;
11160    /// let x = StandardSchedulerSettings::new().set_max_instances(42);
11161    /// ```
11162    pub fn set_max_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11163        self.max_instances = v.into();
11164        self
11165    }
11166}
11167
11168impl wkt::message::Message for StandardSchedulerSettings {
11169    fn typename() -> &'static str {
11170        "type.googleapis.com/google.appengine.v1.StandardSchedulerSettings"
11171    }
11172}
11173
11174/// Extra network settings.
11175/// Only applicable in the App Engine flexible environment.
11176#[derive(Clone, Default, PartialEq)]
11177#[non_exhaustive]
11178pub struct Network {
11179    /// List of ports, or port pairs, to forward from the virtual machine to the
11180    /// application container.
11181    /// Only applicable in the App Engine flexible environment.
11182    pub forwarded_ports: std::vec::Vec<std::string::String>,
11183
11184    /// Tag to apply to the instance during creation.
11185    /// Only applicable in the App Engine flexible environment.
11186    pub instance_tag: std::string::String,
11187
11188    /// Google Compute Engine network where the virtual machines are created.
11189    /// Specify the short name, not the resource path.
11190    ///
11191    /// Defaults to `default`.
11192    pub name: std::string::String,
11193
11194    /// Google Cloud Platform sub-network where the virtual machines are created.
11195    /// Specify the short name, not the resource path.
11196    ///
11197    /// If a subnetwork name is specified, a network name will also be required
11198    /// unless it is for the default network.
11199    ///
11200    /// * If the network that the instance is being created in is a Legacy network,
11201    ///   then the IP address is allocated from the IPv4Range.
11202    /// * If the network that the instance is being created in is an auto Subnet
11203    ///   Mode Network, then only network name should be specified (not the
11204    ///   subnetwork_name) and the IP address is created from the IPCidrRange of the
11205    ///   subnetwork that exists in that zone for that network.
11206    /// * If the network that the instance is being created in is a custom Subnet
11207    ///   Mode Network, then the subnetwork_name must be specified and the
11208    ///   IP address is created from the IPCidrRange of the subnetwork.
11209    ///
11210    /// If specified, the subnetwork must exist in the same region as the
11211    /// App Engine flexible environment application.
11212    pub subnetwork_name: std::string::String,
11213
11214    /// Enable session affinity.
11215    /// Only applicable in the App Engine flexible environment.
11216    pub session_affinity: bool,
11217
11218    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11219}
11220
11221impl Network {
11222    /// Creates a new default instance.
11223    pub fn new() -> Self {
11224        std::default::Default::default()
11225    }
11226
11227    /// Sets the value of [forwarded_ports][crate::model::Network::forwarded_ports].
11228    ///
11229    /// # Example
11230    /// ```ignore,no_run
11231    /// # use google_cloud_appengine_v1::model::Network;
11232    /// let x = Network::new().set_forwarded_ports(["a", "b", "c"]);
11233    /// ```
11234    pub fn set_forwarded_ports<T, V>(mut self, v: T) -> Self
11235    where
11236        T: std::iter::IntoIterator<Item = V>,
11237        V: std::convert::Into<std::string::String>,
11238    {
11239        use std::iter::Iterator;
11240        self.forwarded_ports = v.into_iter().map(|i| i.into()).collect();
11241        self
11242    }
11243
11244    /// Sets the value of [instance_tag][crate::model::Network::instance_tag].
11245    ///
11246    /// # Example
11247    /// ```ignore,no_run
11248    /// # use google_cloud_appengine_v1::model::Network;
11249    /// let x = Network::new().set_instance_tag("example");
11250    /// ```
11251    pub fn set_instance_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11252        self.instance_tag = v.into();
11253        self
11254    }
11255
11256    /// Sets the value of [name][crate::model::Network::name].
11257    ///
11258    /// # Example
11259    /// ```ignore,no_run
11260    /// # use google_cloud_appengine_v1::model::Network;
11261    /// let x = Network::new().set_name("example");
11262    /// ```
11263    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11264        self.name = v.into();
11265        self
11266    }
11267
11268    /// Sets the value of [subnetwork_name][crate::model::Network::subnetwork_name].
11269    ///
11270    /// # Example
11271    /// ```ignore,no_run
11272    /// # use google_cloud_appengine_v1::model::Network;
11273    /// let x = Network::new().set_subnetwork_name("example");
11274    /// ```
11275    pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11276        self.subnetwork_name = v.into();
11277        self
11278    }
11279
11280    /// Sets the value of [session_affinity][crate::model::Network::session_affinity].
11281    ///
11282    /// # Example
11283    /// ```ignore,no_run
11284    /// # use google_cloud_appengine_v1::model::Network;
11285    /// let x = Network::new().set_session_affinity(true);
11286    /// ```
11287    pub fn set_session_affinity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11288        self.session_affinity = v.into();
11289        self
11290    }
11291}
11292
11293impl wkt::message::Message for Network {
11294    fn typename() -> &'static str {
11295        "type.googleapis.com/google.appengine.v1.Network"
11296    }
11297}
11298
11299/// Volumes mounted within the app container.
11300/// Only applicable in the App Engine flexible environment.
11301#[derive(Clone, Default, PartialEq)]
11302#[non_exhaustive]
11303pub struct Volume {
11304    /// Unique name for the volume.
11305    pub name: std::string::String,
11306
11307    /// Underlying volume type, e.g. 'tmpfs'.
11308    pub volume_type: std::string::String,
11309
11310    /// Volume size in gigabytes.
11311    pub size_gb: f64,
11312
11313    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11314}
11315
11316impl Volume {
11317    /// Creates a new default instance.
11318    pub fn new() -> Self {
11319        std::default::Default::default()
11320    }
11321
11322    /// Sets the value of [name][crate::model::Volume::name].
11323    ///
11324    /// # Example
11325    /// ```ignore,no_run
11326    /// # use google_cloud_appengine_v1::model::Volume;
11327    /// let x = Volume::new().set_name("example");
11328    /// ```
11329    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11330        self.name = v.into();
11331        self
11332    }
11333
11334    /// Sets the value of [volume_type][crate::model::Volume::volume_type].
11335    ///
11336    /// # Example
11337    /// ```ignore,no_run
11338    /// # use google_cloud_appengine_v1::model::Volume;
11339    /// let x = Volume::new().set_volume_type("example");
11340    /// ```
11341    pub fn set_volume_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11342        self.volume_type = v.into();
11343        self
11344    }
11345
11346    /// Sets the value of [size_gb][crate::model::Volume::size_gb].
11347    ///
11348    /// # Example
11349    /// ```ignore,no_run
11350    /// # use google_cloud_appengine_v1::model::Volume;
11351    /// let x = Volume::new().set_size_gb(42.0);
11352    /// ```
11353    pub fn set_size_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11354        self.size_gb = v.into();
11355        self
11356    }
11357}
11358
11359impl wkt::message::Message for Volume {
11360    fn typename() -> &'static str {
11361        "type.googleapis.com/google.appengine.v1.Volume"
11362    }
11363}
11364
11365/// Machine resources for a version.
11366#[derive(Clone, Default, PartialEq)]
11367#[non_exhaustive]
11368pub struct Resources {
11369    /// Number of CPU cores needed.
11370    pub cpu: f64,
11371
11372    /// Disk size (GB) needed.
11373    pub disk_gb: f64,
11374
11375    /// Memory (GB) needed.
11376    pub memory_gb: f64,
11377
11378    /// User specified volumes.
11379    pub volumes: std::vec::Vec<crate::model::Volume>,
11380
11381    /// The name of the encryption key that is stored in Google Cloud KMS.
11382    /// Only should be used by Cloud Composer to encrypt the vm disk
11383    pub kms_key_reference: std::string::String,
11384
11385    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11386}
11387
11388impl Resources {
11389    /// Creates a new default instance.
11390    pub fn new() -> Self {
11391        std::default::Default::default()
11392    }
11393
11394    /// Sets the value of [cpu][crate::model::Resources::cpu].
11395    ///
11396    /// # Example
11397    /// ```ignore,no_run
11398    /// # use google_cloud_appengine_v1::model::Resources;
11399    /// let x = Resources::new().set_cpu(42.0);
11400    /// ```
11401    pub fn set_cpu<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11402        self.cpu = v.into();
11403        self
11404    }
11405
11406    /// Sets the value of [disk_gb][crate::model::Resources::disk_gb].
11407    ///
11408    /// # Example
11409    /// ```ignore,no_run
11410    /// # use google_cloud_appengine_v1::model::Resources;
11411    /// let x = Resources::new().set_disk_gb(42.0);
11412    /// ```
11413    pub fn set_disk_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11414        self.disk_gb = v.into();
11415        self
11416    }
11417
11418    /// Sets the value of [memory_gb][crate::model::Resources::memory_gb].
11419    ///
11420    /// # Example
11421    /// ```ignore,no_run
11422    /// # use google_cloud_appengine_v1::model::Resources;
11423    /// let x = Resources::new().set_memory_gb(42.0);
11424    /// ```
11425    pub fn set_memory_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11426        self.memory_gb = v.into();
11427        self
11428    }
11429
11430    /// Sets the value of [volumes][crate::model::Resources::volumes].
11431    ///
11432    /// # Example
11433    /// ```ignore,no_run
11434    /// # use google_cloud_appengine_v1::model::Resources;
11435    /// use google_cloud_appengine_v1::model::Volume;
11436    /// let x = Resources::new()
11437    ///     .set_volumes([
11438    ///         Volume::default()/* use setters */,
11439    ///         Volume::default()/* use (different) setters */,
11440    ///     ]);
11441    /// ```
11442    pub fn set_volumes<T, V>(mut self, v: T) -> Self
11443    where
11444        T: std::iter::IntoIterator<Item = V>,
11445        V: std::convert::Into<crate::model::Volume>,
11446    {
11447        use std::iter::Iterator;
11448        self.volumes = v.into_iter().map(|i| i.into()).collect();
11449        self
11450    }
11451
11452    /// Sets the value of [kms_key_reference][crate::model::Resources::kms_key_reference].
11453    ///
11454    /// # Example
11455    /// ```ignore,no_run
11456    /// # use google_cloud_appengine_v1::model::Resources;
11457    /// let x = Resources::new().set_kms_key_reference("example");
11458    /// ```
11459    pub fn set_kms_key_reference<T: std::convert::Into<std::string::String>>(
11460        mut self,
11461        v: T,
11462    ) -> Self {
11463        self.kms_key_reference = v.into();
11464        self
11465    }
11466}
11467
11468impl wkt::message::Message for Resources {
11469    fn typename() -> &'static str {
11470        "type.googleapis.com/google.appengine.v1.Resources"
11471    }
11472}
11473
11474/// VPC access connector specification.
11475#[derive(Clone, Default, PartialEq)]
11476#[non_exhaustive]
11477pub struct VpcAccessConnector {
11478    /// Full Serverless VPC Access Connector name e.g.
11479    /// /projects/my-project/locations/us-central1/connectors/c1.
11480    pub name: std::string::String,
11481
11482    /// The egress setting for the connector, controlling what traffic is diverted
11483    /// through it.
11484    pub egress_setting: crate::model::vpc_access_connector::EgressSetting,
11485
11486    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11487}
11488
11489impl VpcAccessConnector {
11490    /// Creates a new default instance.
11491    pub fn new() -> Self {
11492        std::default::Default::default()
11493    }
11494
11495    /// Sets the value of [name][crate::model::VpcAccessConnector::name].
11496    ///
11497    /// # Example
11498    /// ```ignore,no_run
11499    /// # use google_cloud_appengine_v1::model::VpcAccessConnector;
11500    /// let x = VpcAccessConnector::new().set_name("example");
11501    /// ```
11502    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11503        self.name = v.into();
11504        self
11505    }
11506
11507    /// Sets the value of [egress_setting][crate::model::VpcAccessConnector::egress_setting].
11508    ///
11509    /// # Example
11510    /// ```ignore,no_run
11511    /// # use google_cloud_appengine_v1::model::VpcAccessConnector;
11512    /// use google_cloud_appengine_v1::model::vpc_access_connector::EgressSetting;
11513    /// let x0 = VpcAccessConnector::new().set_egress_setting(EgressSetting::AllTraffic);
11514    /// let x1 = VpcAccessConnector::new().set_egress_setting(EgressSetting::PrivateIpRanges);
11515    /// ```
11516    pub fn set_egress_setting<
11517        T: std::convert::Into<crate::model::vpc_access_connector::EgressSetting>,
11518    >(
11519        mut self,
11520        v: T,
11521    ) -> Self {
11522        self.egress_setting = v.into();
11523        self
11524    }
11525}
11526
11527impl wkt::message::Message for VpcAccessConnector {
11528    fn typename() -> &'static str {
11529        "type.googleapis.com/google.appengine.v1.VpcAccessConnector"
11530    }
11531}
11532
11533/// Defines additional types related to [VpcAccessConnector].
11534pub mod vpc_access_connector {
11535    #[allow(unused_imports)]
11536    use super::*;
11537
11538    /// Available egress settings.
11539    ///
11540    /// This controls what traffic is diverted through the VPC Access Connector
11541    /// resource. By default PRIVATE_IP_RANGES will be used.
11542    ///
11543    /// # Working with unknown values
11544    ///
11545    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11546    /// additional enum variants at any time. Adding new variants is not considered
11547    /// a breaking change. Applications should write their code in anticipation of:
11548    ///
11549    /// - New values appearing in future releases of the client library, **and**
11550    /// - New values received dynamically, without application changes.
11551    ///
11552    /// Please consult the [Working with enums] section in the user guide for some
11553    /// guidelines.
11554    ///
11555    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11556    #[derive(Clone, Debug, PartialEq)]
11557    #[non_exhaustive]
11558    pub enum EgressSetting {
11559        #[allow(missing_docs)]
11560        Unspecified,
11561        /// Force the use of VPC Access for all egress traffic from the function.
11562        AllTraffic,
11563        /// Use the VPC Access Connector for private IP space from RFC1918.
11564        PrivateIpRanges,
11565        /// If set, the enum was initialized with an unknown value.
11566        ///
11567        /// Applications can examine the value using [EgressSetting::value] or
11568        /// [EgressSetting::name].
11569        UnknownValue(egress_setting::UnknownValue),
11570    }
11571
11572    #[doc(hidden)]
11573    pub mod egress_setting {
11574        #[allow(unused_imports)]
11575        use super::*;
11576        #[derive(Clone, Debug, PartialEq)]
11577        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11578    }
11579
11580    impl EgressSetting {
11581        /// Gets the enum value.
11582        ///
11583        /// Returns `None` if the enum contains an unknown value deserialized from
11584        /// the string representation of enums.
11585        pub fn value(&self) -> std::option::Option<i32> {
11586            match self {
11587                Self::Unspecified => std::option::Option::Some(0),
11588                Self::AllTraffic => std::option::Option::Some(1),
11589                Self::PrivateIpRanges => std::option::Option::Some(2),
11590                Self::UnknownValue(u) => u.0.value(),
11591            }
11592        }
11593
11594        /// Gets the enum value as a string.
11595        ///
11596        /// Returns `None` if the enum contains an unknown value deserialized from
11597        /// the integer representation of enums.
11598        pub fn name(&self) -> std::option::Option<&str> {
11599            match self {
11600                Self::Unspecified => std::option::Option::Some("EGRESS_SETTING_UNSPECIFIED"),
11601                Self::AllTraffic => std::option::Option::Some("ALL_TRAFFIC"),
11602                Self::PrivateIpRanges => std::option::Option::Some("PRIVATE_IP_RANGES"),
11603                Self::UnknownValue(u) => u.0.name(),
11604            }
11605        }
11606    }
11607
11608    impl std::default::Default for EgressSetting {
11609        fn default() -> Self {
11610            use std::convert::From;
11611            Self::from(0)
11612        }
11613    }
11614
11615    impl std::fmt::Display for EgressSetting {
11616        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11617            wkt::internal::display_enum(f, self.name(), self.value())
11618        }
11619    }
11620
11621    impl std::convert::From<i32> for EgressSetting {
11622        fn from(value: i32) -> Self {
11623            match value {
11624                0 => Self::Unspecified,
11625                1 => Self::AllTraffic,
11626                2 => Self::PrivateIpRanges,
11627                _ => Self::UnknownValue(egress_setting::UnknownValue(
11628                    wkt::internal::UnknownEnumValue::Integer(value),
11629                )),
11630            }
11631        }
11632    }
11633
11634    impl std::convert::From<&str> for EgressSetting {
11635        fn from(value: &str) -> Self {
11636            use std::string::ToString;
11637            match value {
11638                "EGRESS_SETTING_UNSPECIFIED" => Self::Unspecified,
11639                "ALL_TRAFFIC" => Self::AllTraffic,
11640                "PRIVATE_IP_RANGES" => Self::PrivateIpRanges,
11641                _ => Self::UnknownValue(egress_setting::UnknownValue(
11642                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11643                )),
11644            }
11645        }
11646    }
11647
11648    impl serde::ser::Serialize for EgressSetting {
11649        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11650        where
11651            S: serde::Serializer,
11652        {
11653            match self {
11654                Self::Unspecified => serializer.serialize_i32(0),
11655                Self::AllTraffic => serializer.serialize_i32(1),
11656                Self::PrivateIpRanges => serializer.serialize_i32(2),
11657                Self::UnknownValue(u) => u.0.serialize(serializer),
11658            }
11659        }
11660    }
11661
11662    impl<'de> serde::de::Deserialize<'de> for EgressSetting {
11663        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11664        where
11665            D: serde::Deserializer<'de>,
11666        {
11667            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EgressSetting>::new(
11668                ".google.appengine.v1.VpcAccessConnector.EgressSetting",
11669            ))
11670        }
11671    }
11672}
11673
11674/// The entrypoint for the application.
11675#[derive(Clone, Default, PartialEq)]
11676#[non_exhaustive]
11677pub struct Entrypoint {
11678    /// The command to run.
11679    pub command: std::option::Option<crate::model::entrypoint::Command>,
11680
11681    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11682}
11683
11684impl Entrypoint {
11685    /// Creates a new default instance.
11686    pub fn new() -> Self {
11687        std::default::Default::default()
11688    }
11689
11690    /// Sets the value of [command][crate::model::Entrypoint::command].
11691    ///
11692    /// Note that all the setters affecting `command` are mutually
11693    /// exclusive.
11694    ///
11695    /// # Example
11696    /// ```ignore,no_run
11697    /// # use google_cloud_appengine_v1::model::Entrypoint;
11698    /// use google_cloud_appengine_v1::model::entrypoint::Command;
11699    /// let x = Entrypoint::new().set_command(Some(Command::Shell("example".to_string())));
11700    /// ```
11701    pub fn set_command<
11702        T: std::convert::Into<std::option::Option<crate::model::entrypoint::Command>>,
11703    >(
11704        mut self,
11705        v: T,
11706    ) -> Self {
11707        self.command = v.into();
11708        self
11709    }
11710
11711    /// The value of [command][crate::model::Entrypoint::command]
11712    /// if it holds a `Shell`, `None` if the field is not set or
11713    /// holds a different branch.
11714    pub fn shell(&self) -> std::option::Option<&std::string::String> {
11715        #[allow(unreachable_patterns)]
11716        self.command.as_ref().and_then(|v| match v {
11717            crate::model::entrypoint::Command::Shell(v) => std::option::Option::Some(v),
11718            _ => std::option::Option::None,
11719        })
11720    }
11721
11722    /// Sets the value of [command][crate::model::Entrypoint::command]
11723    /// to hold a `Shell`.
11724    ///
11725    /// Note that all the setters affecting `command` are
11726    /// mutually exclusive.
11727    ///
11728    /// # Example
11729    /// ```ignore,no_run
11730    /// # use google_cloud_appengine_v1::model::Entrypoint;
11731    /// let x = Entrypoint::new().set_shell("example");
11732    /// assert!(x.shell().is_some());
11733    /// ```
11734    pub fn set_shell<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11735        self.command =
11736            std::option::Option::Some(crate::model::entrypoint::Command::Shell(v.into()));
11737        self
11738    }
11739}
11740
11741impl wkt::message::Message for Entrypoint {
11742    fn typename() -> &'static str {
11743        "type.googleapis.com/google.appengine.v1.Entrypoint"
11744    }
11745}
11746
11747/// Defines additional types related to [Entrypoint].
11748pub mod entrypoint {
11749    #[allow(unused_imports)]
11750    use super::*;
11751
11752    /// The command to run.
11753    #[derive(Clone, Debug, PartialEq)]
11754    #[non_exhaustive]
11755    pub enum Command {
11756        /// The format should be a shell command that can be fed to `bash -c`.
11757        Shell(std::string::String),
11758    }
11759}
11760
11761/// Actions to take when the user is not logged in.
11762///
11763/// # Working with unknown values
11764///
11765/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11766/// additional enum variants at any time. Adding new variants is not considered
11767/// a breaking change. Applications should write their code in anticipation of:
11768///
11769/// - New values appearing in future releases of the client library, **and**
11770/// - New values received dynamically, without application changes.
11771///
11772/// Please consult the [Working with enums] section in the user guide for some
11773/// guidelines.
11774///
11775/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11776#[derive(Clone, Debug, PartialEq)]
11777#[non_exhaustive]
11778pub enum AuthFailAction {
11779    /// Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed.
11780    Unspecified,
11781    /// Redirects user to "accounts.google.com". The user is redirected back to the
11782    /// application URL after signing in or creating an account.
11783    Redirect,
11784    /// Rejects request with a `401` HTTP status code and an error
11785    /// message.
11786    Unauthorized,
11787    /// If set, the enum was initialized with an unknown value.
11788    ///
11789    /// Applications can examine the value using [AuthFailAction::value] or
11790    /// [AuthFailAction::name].
11791    UnknownValue(auth_fail_action::UnknownValue),
11792}
11793
11794#[doc(hidden)]
11795pub mod auth_fail_action {
11796    #[allow(unused_imports)]
11797    use super::*;
11798    #[derive(Clone, Debug, PartialEq)]
11799    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11800}
11801
11802impl AuthFailAction {
11803    /// Gets the enum value.
11804    ///
11805    /// Returns `None` if the enum contains an unknown value deserialized from
11806    /// the string representation of enums.
11807    pub fn value(&self) -> std::option::Option<i32> {
11808        match self {
11809            Self::Unspecified => std::option::Option::Some(0),
11810            Self::Redirect => std::option::Option::Some(1),
11811            Self::Unauthorized => std::option::Option::Some(2),
11812            Self::UnknownValue(u) => u.0.value(),
11813        }
11814    }
11815
11816    /// Gets the enum value as a string.
11817    ///
11818    /// Returns `None` if the enum contains an unknown value deserialized from
11819    /// the integer representation of enums.
11820    pub fn name(&self) -> std::option::Option<&str> {
11821        match self {
11822            Self::Unspecified => std::option::Option::Some("AUTH_FAIL_ACTION_UNSPECIFIED"),
11823            Self::Redirect => std::option::Option::Some("AUTH_FAIL_ACTION_REDIRECT"),
11824            Self::Unauthorized => std::option::Option::Some("AUTH_FAIL_ACTION_UNAUTHORIZED"),
11825            Self::UnknownValue(u) => u.0.name(),
11826        }
11827    }
11828}
11829
11830impl std::default::Default for AuthFailAction {
11831    fn default() -> Self {
11832        use std::convert::From;
11833        Self::from(0)
11834    }
11835}
11836
11837impl std::fmt::Display for AuthFailAction {
11838    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11839        wkt::internal::display_enum(f, self.name(), self.value())
11840    }
11841}
11842
11843impl std::convert::From<i32> for AuthFailAction {
11844    fn from(value: i32) -> Self {
11845        match value {
11846            0 => Self::Unspecified,
11847            1 => Self::Redirect,
11848            2 => Self::Unauthorized,
11849            _ => Self::UnknownValue(auth_fail_action::UnknownValue(
11850                wkt::internal::UnknownEnumValue::Integer(value),
11851            )),
11852        }
11853    }
11854}
11855
11856impl std::convert::From<&str> for AuthFailAction {
11857    fn from(value: &str) -> Self {
11858        use std::string::ToString;
11859        match value {
11860            "AUTH_FAIL_ACTION_UNSPECIFIED" => Self::Unspecified,
11861            "AUTH_FAIL_ACTION_REDIRECT" => Self::Redirect,
11862            "AUTH_FAIL_ACTION_UNAUTHORIZED" => Self::Unauthorized,
11863            _ => Self::UnknownValue(auth_fail_action::UnknownValue(
11864                wkt::internal::UnknownEnumValue::String(value.to_string()),
11865            )),
11866        }
11867    }
11868}
11869
11870impl serde::ser::Serialize for AuthFailAction {
11871    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11872    where
11873        S: serde::Serializer,
11874    {
11875        match self {
11876            Self::Unspecified => serializer.serialize_i32(0),
11877            Self::Redirect => serializer.serialize_i32(1),
11878            Self::Unauthorized => serializer.serialize_i32(2),
11879            Self::UnknownValue(u) => u.0.serialize(serializer),
11880        }
11881    }
11882}
11883
11884impl<'de> serde::de::Deserialize<'de> for AuthFailAction {
11885    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11886    where
11887        D: serde::Deserializer<'de>,
11888    {
11889        deserializer.deserialize_any(wkt::internal::EnumVisitor::<AuthFailAction>::new(
11890            ".google.appengine.v1.AuthFailAction",
11891        ))
11892    }
11893}
11894
11895/// Methods to restrict access to a URL based on login status.
11896///
11897/// # Working with unknown values
11898///
11899/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11900/// additional enum variants at any time. Adding new variants is not considered
11901/// a breaking change. Applications should write their code in anticipation of:
11902///
11903/// - New values appearing in future releases of the client library, **and**
11904/// - New values received dynamically, without application changes.
11905///
11906/// Please consult the [Working with enums] section in the user guide for some
11907/// guidelines.
11908///
11909/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11910#[derive(Clone, Debug, PartialEq)]
11911#[non_exhaustive]
11912pub enum LoginRequirement {
11913    /// Not specified. `LOGIN_OPTIONAL` is assumed.
11914    LoginUnspecified,
11915    /// Does not require that the user is signed in.
11916    LoginOptional,
11917    /// If the user is not signed in, the `auth_fail_action` is taken.
11918    /// In addition, if the user is not an administrator for the
11919    /// application, they are given an error message regardless of
11920    /// `auth_fail_action`. If the user is an administrator, the handler
11921    /// proceeds.
11922    LoginAdmin,
11923    /// If the user has signed in, the handler proceeds normally. Otherwise, the
11924    /// auth_fail_action is taken.
11925    LoginRequired,
11926    /// If set, the enum was initialized with an unknown value.
11927    ///
11928    /// Applications can examine the value using [LoginRequirement::value] or
11929    /// [LoginRequirement::name].
11930    UnknownValue(login_requirement::UnknownValue),
11931}
11932
11933#[doc(hidden)]
11934pub mod login_requirement {
11935    #[allow(unused_imports)]
11936    use super::*;
11937    #[derive(Clone, Debug, PartialEq)]
11938    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11939}
11940
11941impl LoginRequirement {
11942    /// Gets the enum value.
11943    ///
11944    /// Returns `None` if the enum contains an unknown value deserialized from
11945    /// the string representation of enums.
11946    pub fn value(&self) -> std::option::Option<i32> {
11947        match self {
11948            Self::LoginUnspecified => std::option::Option::Some(0),
11949            Self::LoginOptional => std::option::Option::Some(1),
11950            Self::LoginAdmin => std::option::Option::Some(2),
11951            Self::LoginRequired => std::option::Option::Some(3),
11952            Self::UnknownValue(u) => u.0.value(),
11953        }
11954    }
11955
11956    /// Gets the enum value as a string.
11957    ///
11958    /// Returns `None` if the enum contains an unknown value deserialized from
11959    /// the integer representation of enums.
11960    pub fn name(&self) -> std::option::Option<&str> {
11961        match self {
11962            Self::LoginUnspecified => std::option::Option::Some("LOGIN_UNSPECIFIED"),
11963            Self::LoginOptional => std::option::Option::Some("LOGIN_OPTIONAL"),
11964            Self::LoginAdmin => std::option::Option::Some("LOGIN_ADMIN"),
11965            Self::LoginRequired => std::option::Option::Some("LOGIN_REQUIRED"),
11966            Self::UnknownValue(u) => u.0.name(),
11967        }
11968    }
11969}
11970
11971impl std::default::Default for LoginRequirement {
11972    fn default() -> Self {
11973        use std::convert::From;
11974        Self::from(0)
11975    }
11976}
11977
11978impl std::fmt::Display for LoginRequirement {
11979    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11980        wkt::internal::display_enum(f, self.name(), self.value())
11981    }
11982}
11983
11984impl std::convert::From<i32> for LoginRequirement {
11985    fn from(value: i32) -> Self {
11986        match value {
11987            0 => Self::LoginUnspecified,
11988            1 => Self::LoginOptional,
11989            2 => Self::LoginAdmin,
11990            3 => Self::LoginRequired,
11991            _ => Self::UnknownValue(login_requirement::UnknownValue(
11992                wkt::internal::UnknownEnumValue::Integer(value),
11993            )),
11994        }
11995    }
11996}
11997
11998impl std::convert::From<&str> for LoginRequirement {
11999    fn from(value: &str) -> Self {
12000        use std::string::ToString;
12001        match value {
12002            "LOGIN_UNSPECIFIED" => Self::LoginUnspecified,
12003            "LOGIN_OPTIONAL" => Self::LoginOptional,
12004            "LOGIN_ADMIN" => Self::LoginAdmin,
12005            "LOGIN_REQUIRED" => Self::LoginRequired,
12006            _ => Self::UnknownValue(login_requirement::UnknownValue(
12007                wkt::internal::UnknownEnumValue::String(value.to_string()),
12008            )),
12009        }
12010    }
12011}
12012
12013impl serde::ser::Serialize for LoginRequirement {
12014    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12015    where
12016        S: serde::Serializer,
12017    {
12018        match self {
12019            Self::LoginUnspecified => serializer.serialize_i32(0),
12020            Self::LoginOptional => serializer.serialize_i32(1),
12021            Self::LoginAdmin => serializer.serialize_i32(2),
12022            Self::LoginRequired => serializer.serialize_i32(3),
12023            Self::UnknownValue(u) => u.0.serialize(serializer),
12024        }
12025    }
12026}
12027
12028impl<'de> serde::de::Deserialize<'de> for LoginRequirement {
12029    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12030    where
12031        D: serde::Deserializer<'de>,
12032    {
12033        deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoginRequirement>::new(
12034            ".google.appengine.v1.LoginRequirement",
12035        ))
12036    }
12037}
12038
12039/// Methods to enforce security (HTTPS) on a URL.
12040///
12041/// # Working with unknown values
12042///
12043/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12044/// additional enum variants at any time. Adding new variants is not considered
12045/// a breaking change. Applications should write their code in anticipation of:
12046///
12047/// - New values appearing in future releases of the client library, **and**
12048/// - New values received dynamically, without application changes.
12049///
12050/// Please consult the [Working with enums] section in the user guide for some
12051/// guidelines.
12052///
12053/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12054#[derive(Clone, Debug, PartialEq)]
12055#[non_exhaustive]
12056pub enum SecurityLevel {
12057    /// Not specified.
12058    SecureUnspecified,
12059    /// Both HTTP and HTTPS requests with URLs that match the handler succeed
12060    /// without redirects. The application can examine the request to determine
12061    /// which protocol was used, and respond accordingly.
12062    SecureDefault,
12063    /// Requests for a URL that match this handler that use HTTPS are automatically
12064    /// redirected to the HTTP equivalent URL.
12065    SecureNever,
12066    /// Both HTTP and HTTPS requests with URLs that match the handler succeed
12067    /// without redirects. The application can examine the request to determine
12068    /// which protocol was used and respond accordingly.
12069    SecureOptional,
12070    /// Requests for a URL that match this handler that do not use HTTPS are
12071    /// automatically redirected to the HTTPS URL with the same path. Query
12072    /// parameters are reserved for the redirect.
12073    SecureAlways,
12074    /// If set, the enum was initialized with an unknown value.
12075    ///
12076    /// Applications can examine the value using [SecurityLevel::value] or
12077    /// [SecurityLevel::name].
12078    UnknownValue(security_level::UnknownValue),
12079}
12080
12081#[doc(hidden)]
12082pub mod security_level {
12083    #[allow(unused_imports)]
12084    use super::*;
12085    #[derive(Clone, Debug, PartialEq)]
12086    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12087}
12088
12089impl SecurityLevel {
12090    /// Gets the enum value.
12091    ///
12092    /// Returns `None` if the enum contains an unknown value deserialized from
12093    /// the string representation of enums.
12094    pub fn value(&self) -> std::option::Option<i32> {
12095        match self {
12096            Self::SecureUnspecified => std::option::Option::Some(0),
12097            Self::SecureDefault => std::option::Option::Some(0),
12098            Self::SecureNever => std::option::Option::Some(1),
12099            Self::SecureOptional => std::option::Option::Some(2),
12100            Self::SecureAlways => std::option::Option::Some(3),
12101            Self::UnknownValue(u) => u.0.value(),
12102        }
12103    }
12104
12105    /// Gets the enum value as a string.
12106    ///
12107    /// Returns `None` if the enum contains an unknown value deserialized from
12108    /// the integer representation of enums.
12109    pub fn name(&self) -> std::option::Option<&str> {
12110        match self {
12111            Self::SecureUnspecified => std::option::Option::Some("SECURE_UNSPECIFIED"),
12112            Self::SecureDefault => std::option::Option::Some("SECURE_DEFAULT"),
12113            Self::SecureNever => std::option::Option::Some("SECURE_NEVER"),
12114            Self::SecureOptional => std::option::Option::Some("SECURE_OPTIONAL"),
12115            Self::SecureAlways => std::option::Option::Some("SECURE_ALWAYS"),
12116            Self::UnknownValue(u) => u.0.name(),
12117        }
12118    }
12119}
12120
12121impl std::default::Default for SecurityLevel {
12122    fn default() -> Self {
12123        use std::convert::From;
12124        Self::from(0)
12125    }
12126}
12127
12128impl std::fmt::Display for SecurityLevel {
12129    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12130        wkt::internal::display_enum(f, self.name(), self.value())
12131    }
12132}
12133
12134impl std::convert::From<i32> for SecurityLevel {
12135    fn from(value: i32) -> Self {
12136        match value {
12137            0 => Self::SecureDefault,
12138            1 => Self::SecureNever,
12139            2 => Self::SecureOptional,
12140            3 => Self::SecureAlways,
12141            _ => Self::UnknownValue(security_level::UnknownValue(
12142                wkt::internal::UnknownEnumValue::Integer(value),
12143            )),
12144        }
12145    }
12146}
12147
12148impl std::convert::From<&str> for SecurityLevel {
12149    fn from(value: &str) -> Self {
12150        use std::string::ToString;
12151        match value {
12152            "SECURE_UNSPECIFIED" => Self::SecureUnspecified,
12153            "SECURE_DEFAULT" => Self::SecureDefault,
12154            "SECURE_NEVER" => Self::SecureNever,
12155            "SECURE_OPTIONAL" => Self::SecureOptional,
12156            "SECURE_ALWAYS" => Self::SecureAlways,
12157            _ => Self::UnknownValue(security_level::UnknownValue(
12158                wkt::internal::UnknownEnumValue::String(value.to_string()),
12159            )),
12160        }
12161    }
12162}
12163
12164impl serde::ser::Serialize for SecurityLevel {
12165    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12166    where
12167        S: serde::Serializer,
12168    {
12169        match self {
12170            Self::SecureUnspecified => serializer.serialize_i32(0),
12171            Self::SecureDefault => serializer.serialize_i32(0),
12172            Self::SecureNever => serializer.serialize_i32(1),
12173            Self::SecureOptional => serializer.serialize_i32(2),
12174            Self::SecureAlways => serializer.serialize_i32(3),
12175            Self::UnknownValue(u) => u.0.serialize(serializer),
12176        }
12177    }
12178}
12179
12180impl<'de> serde::de::Deserialize<'de> for SecurityLevel {
12181    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12182    where
12183        D: serde::Deserializer<'de>,
12184    {
12185        deserializer.deserialize_any(wkt::internal::EnumVisitor::<SecurityLevel>::new(
12186            ".google.appengine.v1.SecurityLevel",
12187        ))
12188    }
12189}
12190
12191/// Fields that should be returned when [Version][google.appengine.v1.Version] resources
12192/// are retrieved.
12193///
12194/// [google.appengine.v1.Version]: crate::model::Version
12195///
12196/// # Working with unknown values
12197///
12198/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12199/// additional enum variants at any time. Adding new variants is not considered
12200/// a breaking change. Applications should write their code in anticipation of:
12201///
12202/// - New values appearing in future releases of the client library, **and**
12203/// - New values received dynamically, without application changes.
12204///
12205/// Please consult the [Working with enums] section in the user guide for some
12206/// guidelines.
12207///
12208/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12209#[derive(Clone, Debug, PartialEq)]
12210#[non_exhaustive]
12211pub enum VersionView {
12212    /// Basic version information including scaling and inbound services,
12213    /// but not detailed deployment information.
12214    Basic,
12215    /// The information from `BASIC`, plus detailed information about the
12216    /// deployment. This format is required when creating resources, but
12217    /// is not returned in `Get` or `List` by default.
12218    Full,
12219    /// If set, the enum was initialized with an unknown value.
12220    ///
12221    /// Applications can examine the value using [VersionView::value] or
12222    /// [VersionView::name].
12223    UnknownValue(version_view::UnknownValue),
12224}
12225
12226#[doc(hidden)]
12227pub mod version_view {
12228    #[allow(unused_imports)]
12229    use super::*;
12230    #[derive(Clone, Debug, PartialEq)]
12231    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12232}
12233
12234impl VersionView {
12235    /// Gets the enum value.
12236    ///
12237    /// Returns `None` if the enum contains an unknown value deserialized from
12238    /// the string representation of enums.
12239    pub fn value(&self) -> std::option::Option<i32> {
12240        match self {
12241            Self::Basic => std::option::Option::Some(0),
12242            Self::Full => std::option::Option::Some(1),
12243            Self::UnknownValue(u) => u.0.value(),
12244        }
12245    }
12246
12247    /// Gets the enum value as a string.
12248    ///
12249    /// Returns `None` if the enum contains an unknown value deserialized from
12250    /// the integer representation of enums.
12251    pub fn name(&self) -> std::option::Option<&str> {
12252        match self {
12253            Self::Basic => std::option::Option::Some("BASIC"),
12254            Self::Full => std::option::Option::Some("FULL"),
12255            Self::UnknownValue(u) => u.0.name(),
12256        }
12257    }
12258}
12259
12260impl std::default::Default for VersionView {
12261    fn default() -> Self {
12262        use std::convert::From;
12263        Self::from(0)
12264    }
12265}
12266
12267impl std::fmt::Display for VersionView {
12268    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12269        wkt::internal::display_enum(f, self.name(), self.value())
12270    }
12271}
12272
12273impl std::convert::From<i32> for VersionView {
12274    fn from(value: i32) -> Self {
12275        match value {
12276            0 => Self::Basic,
12277            1 => Self::Full,
12278            _ => Self::UnknownValue(version_view::UnknownValue(
12279                wkt::internal::UnknownEnumValue::Integer(value),
12280            )),
12281        }
12282    }
12283}
12284
12285impl std::convert::From<&str> for VersionView {
12286    fn from(value: &str) -> Self {
12287        use std::string::ToString;
12288        match value {
12289            "BASIC" => Self::Basic,
12290            "FULL" => Self::Full,
12291            _ => Self::UnknownValue(version_view::UnknownValue(
12292                wkt::internal::UnknownEnumValue::String(value.to_string()),
12293            )),
12294        }
12295    }
12296}
12297
12298impl serde::ser::Serialize for VersionView {
12299    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12300    where
12301        S: serde::Serializer,
12302    {
12303        match self {
12304            Self::Basic => serializer.serialize_i32(0),
12305            Self::Full => serializer.serialize_i32(1),
12306            Self::UnknownValue(u) => u.0.serialize(serializer),
12307        }
12308    }
12309}
12310
12311impl<'de> serde::de::Deserialize<'de> for VersionView {
12312    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12313    where
12314        D: serde::Deserializer<'de>,
12315    {
12316        deserializer.deserialize_any(wkt::internal::EnumVisitor::<VersionView>::new(
12317            ".google.appengine.v1.VersionView",
12318        ))
12319    }
12320}
12321
12322/// Fields that should be returned when an AuthorizedCertificate resource is
12323/// retrieved.
12324///
12325/// # Working with unknown values
12326///
12327/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12328/// additional enum variants at any time. Adding new variants is not considered
12329/// a breaking change. Applications should write their code in anticipation of:
12330///
12331/// - New values appearing in future releases of the client library, **and**
12332/// - New values received dynamically, without application changes.
12333///
12334/// Please consult the [Working with enums] section in the user guide for some
12335/// guidelines.
12336///
12337/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12338#[derive(Clone, Debug, PartialEq)]
12339#[non_exhaustive]
12340pub enum AuthorizedCertificateView {
12341    /// Basic certificate information, including applicable domains and expiration
12342    /// date.
12343    BasicCertificate,
12344    /// The information from `BASIC_CERTIFICATE`, plus detailed information on the
12345    /// domain mappings that have this certificate mapped.
12346    FullCertificate,
12347    /// If set, the enum was initialized with an unknown value.
12348    ///
12349    /// Applications can examine the value using [AuthorizedCertificateView::value] or
12350    /// [AuthorizedCertificateView::name].
12351    UnknownValue(authorized_certificate_view::UnknownValue),
12352}
12353
12354#[doc(hidden)]
12355pub mod authorized_certificate_view {
12356    #[allow(unused_imports)]
12357    use super::*;
12358    #[derive(Clone, Debug, PartialEq)]
12359    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12360}
12361
12362impl AuthorizedCertificateView {
12363    /// Gets the enum value.
12364    ///
12365    /// Returns `None` if the enum contains an unknown value deserialized from
12366    /// the string representation of enums.
12367    pub fn value(&self) -> std::option::Option<i32> {
12368        match self {
12369            Self::BasicCertificate => std::option::Option::Some(0),
12370            Self::FullCertificate => std::option::Option::Some(1),
12371            Self::UnknownValue(u) => u.0.value(),
12372        }
12373    }
12374
12375    /// Gets the enum value as a string.
12376    ///
12377    /// Returns `None` if the enum contains an unknown value deserialized from
12378    /// the integer representation of enums.
12379    pub fn name(&self) -> std::option::Option<&str> {
12380        match self {
12381            Self::BasicCertificate => std::option::Option::Some("BASIC_CERTIFICATE"),
12382            Self::FullCertificate => std::option::Option::Some("FULL_CERTIFICATE"),
12383            Self::UnknownValue(u) => u.0.name(),
12384        }
12385    }
12386}
12387
12388impl std::default::Default for AuthorizedCertificateView {
12389    fn default() -> Self {
12390        use std::convert::From;
12391        Self::from(0)
12392    }
12393}
12394
12395impl std::fmt::Display for AuthorizedCertificateView {
12396    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12397        wkt::internal::display_enum(f, self.name(), self.value())
12398    }
12399}
12400
12401impl std::convert::From<i32> for AuthorizedCertificateView {
12402    fn from(value: i32) -> Self {
12403        match value {
12404            0 => Self::BasicCertificate,
12405            1 => Self::FullCertificate,
12406            _ => Self::UnknownValue(authorized_certificate_view::UnknownValue(
12407                wkt::internal::UnknownEnumValue::Integer(value),
12408            )),
12409        }
12410    }
12411}
12412
12413impl std::convert::From<&str> for AuthorizedCertificateView {
12414    fn from(value: &str) -> Self {
12415        use std::string::ToString;
12416        match value {
12417            "BASIC_CERTIFICATE" => Self::BasicCertificate,
12418            "FULL_CERTIFICATE" => Self::FullCertificate,
12419            _ => Self::UnknownValue(authorized_certificate_view::UnknownValue(
12420                wkt::internal::UnknownEnumValue::String(value.to_string()),
12421            )),
12422        }
12423    }
12424}
12425
12426impl serde::ser::Serialize for AuthorizedCertificateView {
12427    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12428    where
12429        S: serde::Serializer,
12430    {
12431        match self {
12432            Self::BasicCertificate => serializer.serialize_i32(0),
12433            Self::FullCertificate => serializer.serialize_i32(1),
12434            Self::UnknownValue(u) => u.0.serialize(serializer),
12435        }
12436    }
12437}
12438
12439impl<'de> serde::de::Deserialize<'de> for AuthorizedCertificateView {
12440    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12441    where
12442        D: serde::Deserializer<'de>,
12443    {
12444        deserializer.deserialize_any(
12445            wkt::internal::EnumVisitor::<AuthorizedCertificateView>::new(
12446                ".google.appengine.v1.AuthorizedCertificateView",
12447            ),
12448        )
12449    }
12450}
12451
12452/// Override strategy for mutating an existing mapping.
12453///
12454/// # Working with unknown values
12455///
12456/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12457/// additional enum variants at any time. Adding new variants is not considered
12458/// a breaking change. Applications should write their code in anticipation of:
12459///
12460/// - New values appearing in future releases of the client library, **and**
12461/// - New values received dynamically, without application changes.
12462///
12463/// Please consult the [Working with enums] section in the user guide for some
12464/// guidelines.
12465///
12466/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12467#[derive(Clone, Debug, PartialEq)]
12468#[non_exhaustive]
12469pub enum DomainOverrideStrategy {
12470    /// Strategy unspecified. Defaults to `STRICT`.
12471    UnspecifiedDomainOverrideStrategy,
12472    /// Overrides not allowed. If a mapping already exists for the
12473    /// specified domain, the request will return an ALREADY_EXISTS (409).
12474    Strict,
12475    /// Overrides allowed. If a mapping already exists for the specified domain,
12476    /// the request will overwrite it. Note that this might stop another
12477    /// Google product from serving. For example, if the domain is
12478    /// mapped to another App Engine application, that app will no
12479    /// longer serve from that domain.
12480    Override,
12481    /// If set, the enum was initialized with an unknown value.
12482    ///
12483    /// Applications can examine the value using [DomainOverrideStrategy::value] or
12484    /// [DomainOverrideStrategy::name].
12485    UnknownValue(domain_override_strategy::UnknownValue),
12486}
12487
12488#[doc(hidden)]
12489pub mod domain_override_strategy {
12490    #[allow(unused_imports)]
12491    use super::*;
12492    #[derive(Clone, Debug, PartialEq)]
12493    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12494}
12495
12496impl DomainOverrideStrategy {
12497    /// Gets the enum value.
12498    ///
12499    /// Returns `None` if the enum contains an unknown value deserialized from
12500    /// the string representation of enums.
12501    pub fn value(&self) -> std::option::Option<i32> {
12502        match self {
12503            Self::UnspecifiedDomainOverrideStrategy => std::option::Option::Some(0),
12504            Self::Strict => std::option::Option::Some(1),
12505            Self::Override => std::option::Option::Some(2),
12506            Self::UnknownValue(u) => u.0.value(),
12507        }
12508    }
12509
12510    /// Gets the enum value as a string.
12511    ///
12512    /// Returns `None` if the enum contains an unknown value deserialized from
12513    /// the integer representation of enums.
12514    pub fn name(&self) -> std::option::Option<&str> {
12515        match self {
12516            Self::UnspecifiedDomainOverrideStrategy => {
12517                std::option::Option::Some("UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY")
12518            }
12519            Self::Strict => std::option::Option::Some("STRICT"),
12520            Self::Override => std::option::Option::Some("OVERRIDE"),
12521            Self::UnknownValue(u) => u.0.name(),
12522        }
12523    }
12524}
12525
12526impl std::default::Default for DomainOverrideStrategy {
12527    fn default() -> Self {
12528        use std::convert::From;
12529        Self::from(0)
12530    }
12531}
12532
12533impl std::fmt::Display for DomainOverrideStrategy {
12534    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12535        wkt::internal::display_enum(f, self.name(), self.value())
12536    }
12537}
12538
12539impl std::convert::From<i32> for DomainOverrideStrategy {
12540    fn from(value: i32) -> Self {
12541        match value {
12542            0 => Self::UnspecifiedDomainOverrideStrategy,
12543            1 => Self::Strict,
12544            2 => Self::Override,
12545            _ => Self::UnknownValue(domain_override_strategy::UnknownValue(
12546                wkt::internal::UnknownEnumValue::Integer(value),
12547            )),
12548        }
12549    }
12550}
12551
12552impl std::convert::From<&str> for DomainOverrideStrategy {
12553    fn from(value: &str) -> Self {
12554        use std::string::ToString;
12555        match value {
12556            "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY" => Self::UnspecifiedDomainOverrideStrategy,
12557            "STRICT" => Self::Strict,
12558            "OVERRIDE" => Self::Override,
12559            _ => Self::UnknownValue(domain_override_strategy::UnknownValue(
12560                wkt::internal::UnknownEnumValue::String(value.to_string()),
12561            )),
12562        }
12563    }
12564}
12565
12566impl serde::ser::Serialize for DomainOverrideStrategy {
12567    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12568    where
12569        S: serde::Serializer,
12570    {
12571        match self {
12572            Self::UnspecifiedDomainOverrideStrategy => serializer.serialize_i32(0),
12573            Self::Strict => serializer.serialize_i32(1),
12574            Self::Override => serializer.serialize_i32(2),
12575            Self::UnknownValue(u) => u.0.serialize(serializer),
12576        }
12577    }
12578}
12579
12580impl<'de> serde::de::Deserialize<'de> for DomainOverrideStrategy {
12581    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12582    where
12583        D: serde::Deserializer<'de>,
12584    {
12585        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DomainOverrideStrategy>::new(
12586            ".google.appengine.v1.DomainOverrideStrategy",
12587        ))
12588    }
12589}
12590
12591/// State of certificate management. Refers to the most recent certificate
12592/// acquisition or renewal attempt.
12593///
12594/// # Working with unknown values
12595///
12596/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12597/// additional enum variants at any time. Adding new variants is not considered
12598/// a breaking change. Applications should write their code in anticipation of:
12599///
12600/// - New values appearing in future releases of the client library, **and**
12601/// - New values received dynamically, without application changes.
12602///
12603/// Please consult the [Working with enums] section in the user guide for some
12604/// guidelines.
12605///
12606/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12607#[derive(Clone, Debug, PartialEq)]
12608#[non_exhaustive]
12609pub enum ManagementStatus {
12610    #[allow(missing_docs)]
12611    Unspecified,
12612    /// Certificate was successfully obtained and inserted into the serving
12613    /// system.
12614    Ok,
12615    /// Certificate is under active attempts to acquire or renew.
12616    Pending,
12617    /// Most recent renewal failed due to an invalid DNS setup and will be
12618    /// retried. Renewal attempts will continue to fail until the certificate
12619    /// domain's DNS configuration is fixed. The last successfully provisioned
12620    /// certificate may still be serving.
12621    FailedRetryingNotVisible,
12622    /// All renewal attempts have been exhausted, likely due to an invalid DNS
12623    /// setup.
12624    FailedPermanent,
12625    /// Most recent renewal failed due to an explicit CAA record that does not
12626    /// include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will
12627    /// continue to fail until the CAA is reconfigured. The last successfully
12628    /// provisioned certificate may still be serving.
12629    FailedRetryingCaaForbidden,
12630    /// Most recent renewal failed due to a CAA retrieval failure. This means that
12631    /// the domain's DNS provider does not properly handle CAA records, failing
12632    /// requests for CAA records when no CAA records are defined. Renewals will
12633    /// continue to fail until the DNS provider is changed or a CAA record is
12634    /// added for the given domain. The last successfully provisioned certificate
12635    /// may still be serving.
12636    FailedRetryingCaaChecking,
12637    /// If set, the enum was initialized with an unknown value.
12638    ///
12639    /// Applications can examine the value using [ManagementStatus::value] or
12640    /// [ManagementStatus::name].
12641    UnknownValue(management_status::UnknownValue),
12642}
12643
12644#[doc(hidden)]
12645pub mod management_status {
12646    #[allow(unused_imports)]
12647    use super::*;
12648    #[derive(Clone, Debug, PartialEq)]
12649    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12650}
12651
12652impl ManagementStatus {
12653    /// Gets the enum value.
12654    ///
12655    /// Returns `None` if the enum contains an unknown value deserialized from
12656    /// the string representation of enums.
12657    pub fn value(&self) -> std::option::Option<i32> {
12658        match self {
12659            Self::Unspecified => std::option::Option::Some(0),
12660            Self::Ok => std::option::Option::Some(1),
12661            Self::Pending => std::option::Option::Some(2),
12662            Self::FailedRetryingNotVisible => std::option::Option::Some(4),
12663            Self::FailedPermanent => std::option::Option::Some(6),
12664            Self::FailedRetryingCaaForbidden => std::option::Option::Some(7),
12665            Self::FailedRetryingCaaChecking => std::option::Option::Some(8),
12666            Self::UnknownValue(u) => u.0.value(),
12667        }
12668    }
12669
12670    /// Gets the enum value as a string.
12671    ///
12672    /// Returns `None` if the enum contains an unknown value deserialized from
12673    /// the integer representation of enums.
12674    pub fn name(&self) -> std::option::Option<&str> {
12675        match self {
12676            Self::Unspecified => std::option::Option::Some("MANAGEMENT_STATUS_UNSPECIFIED"),
12677            Self::Ok => std::option::Option::Some("OK"),
12678            Self::Pending => std::option::Option::Some("PENDING"),
12679            Self::FailedRetryingNotVisible => {
12680                std::option::Option::Some("FAILED_RETRYING_NOT_VISIBLE")
12681            }
12682            Self::FailedPermanent => std::option::Option::Some("FAILED_PERMANENT"),
12683            Self::FailedRetryingCaaForbidden => {
12684                std::option::Option::Some("FAILED_RETRYING_CAA_FORBIDDEN")
12685            }
12686            Self::FailedRetryingCaaChecking => {
12687                std::option::Option::Some("FAILED_RETRYING_CAA_CHECKING")
12688            }
12689            Self::UnknownValue(u) => u.0.name(),
12690        }
12691    }
12692}
12693
12694impl std::default::Default for ManagementStatus {
12695    fn default() -> Self {
12696        use std::convert::From;
12697        Self::from(0)
12698    }
12699}
12700
12701impl std::fmt::Display for ManagementStatus {
12702    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12703        wkt::internal::display_enum(f, self.name(), self.value())
12704    }
12705}
12706
12707impl std::convert::From<i32> for ManagementStatus {
12708    fn from(value: i32) -> Self {
12709        match value {
12710            0 => Self::Unspecified,
12711            1 => Self::Ok,
12712            2 => Self::Pending,
12713            4 => Self::FailedRetryingNotVisible,
12714            6 => Self::FailedPermanent,
12715            7 => Self::FailedRetryingCaaForbidden,
12716            8 => Self::FailedRetryingCaaChecking,
12717            _ => Self::UnknownValue(management_status::UnknownValue(
12718                wkt::internal::UnknownEnumValue::Integer(value),
12719            )),
12720        }
12721    }
12722}
12723
12724impl std::convert::From<&str> for ManagementStatus {
12725    fn from(value: &str) -> Self {
12726        use std::string::ToString;
12727        match value {
12728            "MANAGEMENT_STATUS_UNSPECIFIED" => Self::Unspecified,
12729            "OK" => Self::Ok,
12730            "PENDING" => Self::Pending,
12731            "FAILED_RETRYING_NOT_VISIBLE" => Self::FailedRetryingNotVisible,
12732            "FAILED_PERMANENT" => Self::FailedPermanent,
12733            "FAILED_RETRYING_CAA_FORBIDDEN" => Self::FailedRetryingCaaForbidden,
12734            "FAILED_RETRYING_CAA_CHECKING" => Self::FailedRetryingCaaChecking,
12735            _ => Self::UnknownValue(management_status::UnknownValue(
12736                wkt::internal::UnknownEnumValue::String(value.to_string()),
12737            )),
12738        }
12739    }
12740}
12741
12742impl serde::ser::Serialize for ManagementStatus {
12743    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12744    where
12745        S: serde::Serializer,
12746    {
12747        match self {
12748            Self::Unspecified => serializer.serialize_i32(0),
12749            Self::Ok => serializer.serialize_i32(1),
12750            Self::Pending => serializer.serialize_i32(2),
12751            Self::FailedRetryingNotVisible => serializer.serialize_i32(4),
12752            Self::FailedPermanent => serializer.serialize_i32(6),
12753            Self::FailedRetryingCaaForbidden => serializer.serialize_i32(7),
12754            Self::FailedRetryingCaaChecking => serializer.serialize_i32(8),
12755            Self::UnknownValue(u) => u.0.serialize(serializer),
12756        }
12757    }
12758}
12759
12760impl<'de> serde::de::Deserialize<'de> for ManagementStatus {
12761    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12762    where
12763        D: serde::Deserializer<'de>,
12764    {
12765        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ManagementStatus>::new(
12766            ".google.appengine.v1.ManagementStatus",
12767        ))
12768    }
12769}
12770
12771/// Available inbound services.
12772///
12773/// # Working with unknown values
12774///
12775/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12776/// additional enum variants at any time. Adding new variants is not considered
12777/// a breaking change. Applications should write their code in anticipation of:
12778///
12779/// - New values appearing in future releases of the client library, **and**
12780/// - New values received dynamically, without application changes.
12781///
12782/// Please consult the [Working with enums] section in the user guide for some
12783/// guidelines.
12784///
12785/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12786#[derive(Clone, Debug, PartialEq)]
12787#[non_exhaustive]
12788pub enum InboundServiceType {
12789    /// Not specified.
12790    InboundServiceUnspecified,
12791    /// Allows an application to receive mail.
12792    InboundServiceMail,
12793    /// Allows an application to receive email-bound notifications.
12794    InboundServiceMailBounce,
12795    /// Allows an application to receive error stanzas.
12796    InboundServiceXmppError,
12797    /// Allows an application to receive instant messages.
12798    InboundServiceXmppMessage,
12799    /// Allows an application to receive user subscription POSTs.
12800    InboundServiceXmppSubscribe,
12801    /// Allows an application to receive a user's chat presence.
12802    InboundServiceXmppPresence,
12803    /// Registers an application for notifications when a client connects or
12804    /// disconnects from a channel.
12805    InboundServiceChannelPresence,
12806    /// Enables warmup requests.
12807    InboundServiceWarmup,
12808    /// If set, the enum was initialized with an unknown value.
12809    ///
12810    /// Applications can examine the value using [InboundServiceType::value] or
12811    /// [InboundServiceType::name].
12812    UnknownValue(inbound_service_type::UnknownValue),
12813}
12814
12815#[doc(hidden)]
12816pub mod inbound_service_type {
12817    #[allow(unused_imports)]
12818    use super::*;
12819    #[derive(Clone, Debug, PartialEq)]
12820    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12821}
12822
12823impl InboundServiceType {
12824    /// Gets the enum value.
12825    ///
12826    /// Returns `None` if the enum contains an unknown value deserialized from
12827    /// the string representation of enums.
12828    pub fn value(&self) -> std::option::Option<i32> {
12829        match self {
12830            Self::InboundServiceUnspecified => std::option::Option::Some(0),
12831            Self::InboundServiceMail => std::option::Option::Some(1),
12832            Self::InboundServiceMailBounce => std::option::Option::Some(2),
12833            Self::InboundServiceXmppError => std::option::Option::Some(3),
12834            Self::InboundServiceXmppMessage => std::option::Option::Some(4),
12835            Self::InboundServiceXmppSubscribe => std::option::Option::Some(5),
12836            Self::InboundServiceXmppPresence => std::option::Option::Some(6),
12837            Self::InboundServiceChannelPresence => std::option::Option::Some(7),
12838            Self::InboundServiceWarmup => std::option::Option::Some(9),
12839            Self::UnknownValue(u) => u.0.value(),
12840        }
12841    }
12842
12843    /// Gets the enum value as a string.
12844    ///
12845    /// Returns `None` if the enum contains an unknown value deserialized from
12846    /// the integer representation of enums.
12847    pub fn name(&self) -> std::option::Option<&str> {
12848        match self {
12849            Self::InboundServiceUnspecified => {
12850                std::option::Option::Some("INBOUND_SERVICE_UNSPECIFIED")
12851            }
12852            Self::InboundServiceMail => std::option::Option::Some("INBOUND_SERVICE_MAIL"),
12853            Self::InboundServiceMailBounce => {
12854                std::option::Option::Some("INBOUND_SERVICE_MAIL_BOUNCE")
12855            }
12856            Self::InboundServiceXmppError => {
12857                std::option::Option::Some("INBOUND_SERVICE_XMPP_ERROR")
12858            }
12859            Self::InboundServiceXmppMessage => {
12860                std::option::Option::Some("INBOUND_SERVICE_XMPP_MESSAGE")
12861            }
12862            Self::InboundServiceXmppSubscribe => {
12863                std::option::Option::Some("INBOUND_SERVICE_XMPP_SUBSCRIBE")
12864            }
12865            Self::InboundServiceXmppPresence => {
12866                std::option::Option::Some("INBOUND_SERVICE_XMPP_PRESENCE")
12867            }
12868            Self::InboundServiceChannelPresence => {
12869                std::option::Option::Some("INBOUND_SERVICE_CHANNEL_PRESENCE")
12870            }
12871            Self::InboundServiceWarmup => std::option::Option::Some("INBOUND_SERVICE_WARMUP"),
12872            Self::UnknownValue(u) => u.0.name(),
12873        }
12874    }
12875}
12876
12877impl std::default::Default for InboundServiceType {
12878    fn default() -> Self {
12879        use std::convert::From;
12880        Self::from(0)
12881    }
12882}
12883
12884impl std::fmt::Display for InboundServiceType {
12885    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12886        wkt::internal::display_enum(f, self.name(), self.value())
12887    }
12888}
12889
12890impl std::convert::From<i32> for InboundServiceType {
12891    fn from(value: i32) -> Self {
12892        match value {
12893            0 => Self::InboundServiceUnspecified,
12894            1 => Self::InboundServiceMail,
12895            2 => Self::InboundServiceMailBounce,
12896            3 => Self::InboundServiceXmppError,
12897            4 => Self::InboundServiceXmppMessage,
12898            5 => Self::InboundServiceXmppSubscribe,
12899            6 => Self::InboundServiceXmppPresence,
12900            7 => Self::InboundServiceChannelPresence,
12901            9 => Self::InboundServiceWarmup,
12902            _ => Self::UnknownValue(inbound_service_type::UnknownValue(
12903                wkt::internal::UnknownEnumValue::Integer(value),
12904            )),
12905        }
12906    }
12907}
12908
12909impl std::convert::From<&str> for InboundServiceType {
12910    fn from(value: &str) -> Self {
12911        use std::string::ToString;
12912        match value {
12913            "INBOUND_SERVICE_UNSPECIFIED" => Self::InboundServiceUnspecified,
12914            "INBOUND_SERVICE_MAIL" => Self::InboundServiceMail,
12915            "INBOUND_SERVICE_MAIL_BOUNCE" => Self::InboundServiceMailBounce,
12916            "INBOUND_SERVICE_XMPP_ERROR" => Self::InboundServiceXmppError,
12917            "INBOUND_SERVICE_XMPP_MESSAGE" => Self::InboundServiceXmppMessage,
12918            "INBOUND_SERVICE_XMPP_SUBSCRIBE" => Self::InboundServiceXmppSubscribe,
12919            "INBOUND_SERVICE_XMPP_PRESENCE" => Self::InboundServiceXmppPresence,
12920            "INBOUND_SERVICE_CHANNEL_PRESENCE" => Self::InboundServiceChannelPresence,
12921            "INBOUND_SERVICE_WARMUP" => Self::InboundServiceWarmup,
12922            _ => Self::UnknownValue(inbound_service_type::UnknownValue(
12923                wkt::internal::UnknownEnumValue::String(value.to_string()),
12924            )),
12925        }
12926    }
12927}
12928
12929impl serde::ser::Serialize for InboundServiceType {
12930    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12931    where
12932        S: serde::Serializer,
12933    {
12934        match self {
12935            Self::InboundServiceUnspecified => serializer.serialize_i32(0),
12936            Self::InboundServiceMail => serializer.serialize_i32(1),
12937            Self::InboundServiceMailBounce => serializer.serialize_i32(2),
12938            Self::InboundServiceXmppError => serializer.serialize_i32(3),
12939            Self::InboundServiceXmppMessage => serializer.serialize_i32(4),
12940            Self::InboundServiceXmppSubscribe => serializer.serialize_i32(5),
12941            Self::InboundServiceXmppPresence => serializer.serialize_i32(6),
12942            Self::InboundServiceChannelPresence => serializer.serialize_i32(7),
12943            Self::InboundServiceWarmup => serializer.serialize_i32(9),
12944            Self::UnknownValue(u) => u.0.serialize(serializer),
12945        }
12946    }
12947}
12948
12949impl<'de> serde::de::Deserialize<'de> for InboundServiceType {
12950    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12951    where
12952        D: serde::Deserializer<'de>,
12953    {
12954        deserializer.deserialize_any(wkt::internal::EnumVisitor::<InboundServiceType>::new(
12955            ".google.appengine.v1.InboundServiceType",
12956        ))
12957    }
12958}
12959
12960/// Run states of a version.
12961///
12962/// # Working with unknown values
12963///
12964/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12965/// additional enum variants at any time. Adding new variants is not considered
12966/// a breaking change. Applications should write their code in anticipation of:
12967///
12968/// - New values appearing in future releases of the client library, **and**
12969/// - New values received dynamically, without application changes.
12970///
12971/// Please consult the [Working with enums] section in the user guide for some
12972/// guidelines.
12973///
12974/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12975#[derive(Clone, Debug, PartialEq)]
12976#[non_exhaustive]
12977pub enum ServingStatus {
12978    /// Not specified.
12979    Unspecified,
12980    /// Currently serving. Instances are created according to the
12981    /// scaling settings of the version.
12982    Serving,
12983    /// Disabled. No instances will be created and the scaling
12984    /// settings are ignored until the state of the version changes
12985    /// to `SERVING`.
12986    Stopped,
12987    /// If set, the enum was initialized with an unknown value.
12988    ///
12989    /// Applications can examine the value using [ServingStatus::value] or
12990    /// [ServingStatus::name].
12991    UnknownValue(serving_status::UnknownValue),
12992}
12993
12994#[doc(hidden)]
12995pub mod serving_status {
12996    #[allow(unused_imports)]
12997    use super::*;
12998    #[derive(Clone, Debug, PartialEq)]
12999    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13000}
13001
13002impl ServingStatus {
13003    /// Gets the enum value.
13004    ///
13005    /// Returns `None` if the enum contains an unknown value deserialized from
13006    /// the string representation of enums.
13007    pub fn value(&self) -> std::option::Option<i32> {
13008        match self {
13009            Self::Unspecified => std::option::Option::Some(0),
13010            Self::Serving => std::option::Option::Some(1),
13011            Self::Stopped => std::option::Option::Some(2),
13012            Self::UnknownValue(u) => u.0.value(),
13013        }
13014    }
13015
13016    /// Gets the enum value as a string.
13017    ///
13018    /// Returns `None` if the enum contains an unknown value deserialized from
13019    /// the integer representation of enums.
13020    pub fn name(&self) -> std::option::Option<&str> {
13021        match self {
13022            Self::Unspecified => std::option::Option::Some("SERVING_STATUS_UNSPECIFIED"),
13023            Self::Serving => std::option::Option::Some("SERVING"),
13024            Self::Stopped => std::option::Option::Some("STOPPED"),
13025            Self::UnknownValue(u) => u.0.name(),
13026        }
13027    }
13028}
13029
13030impl std::default::Default for ServingStatus {
13031    fn default() -> Self {
13032        use std::convert::From;
13033        Self::from(0)
13034    }
13035}
13036
13037impl std::fmt::Display for ServingStatus {
13038    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13039        wkt::internal::display_enum(f, self.name(), self.value())
13040    }
13041}
13042
13043impl std::convert::From<i32> for ServingStatus {
13044    fn from(value: i32) -> Self {
13045        match value {
13046            0 => Self::Unspecified,
13047            1 => Self::Serving,
13048            2 => Self::Stopped,
13049            _ => Self::UnknownValue(serving_status::UnknownValue(
13050                wkt::internal::UnknownEnumValue::Integer(value),
13051            )),
13052        }
13053    }
13054}
13055
13056impl std::convert::From<&str> for ServingStatus {
13057    fn from(value: &str) -> Self {
13058        use std::string::ToString;
13059        match value {
13060            "SERVING_STATUS_UNSPECIFIED" => Self::Unspecified,
13061            "SERVING" => Self::Serving,
13062            "STOPPED" => Self::Stopped,
13063            _ => Self::UnknownValue(serving_status::UnknownValue(
13064                wkt::internal::UnknownEnumValue::String(value.to_string()),
13065            )),
13066        }
13067    }
13068}
13069
13070impl serde::ser::Serialize for ServingStatus {
13071    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13072    where
13073        S: serde::Serializer,
13074    {
13075        match self {
13076            Self::Unspecified => serializer.serialize_i32(0),
13077            Self::Serving => serializer.serialize_i32(1),
13078            Self::Stopped => serializer.serialize_i32(2),
13079            Self::UnknownValue(u) => u.0.serialize(serializer),
13080        }
13081    }
13082}
13083
13084impl<'de> serde::de::Deserialize<'de> for ServingStatus {
13085    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13086    where
13087        D: serde::Deserializer<'de>,
13088    {
13089        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServingStatus>::new(
13090            ".google.appengine.v1.ServingStatus",
13091        ))
13092    }
13093}