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 lazy_static;
27extern crate serde;
28extern crate serde_json;
29extern crate serde_with;
30extern crate std;
31extern crate tracing;
32extern crate wkt;
33
34mod debug;
35mod deserialize;
36mod serialize;
37
38/// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/)
39/// configuration for API handlers.
40#[derive(Clone, Default, PartialEq)]
41#[non_exhaustive]
42pub struct ApiConfigHandler {
43    /// Action to take when users access resources that require
44    /// authentication. Defaults to `redirect`.
45    pub auth_fail_action: crate::model::AuthFailAction,
46
47    /// Level of login required to access this resource. Defaults to
48    /// `optional`.
49    pub login: crate::model::LoginRequirement,
50
51    /// Path to the script from the application root directory.
52    pub script: std::string::String,
53
54    /// Security (HTTPS) enforcement for this URL.
55    pub security_level: crate::model::SecurityLevel,
56
57    /// URL to serve the endpoint at.
58    pub url: std::string::String,
59
60    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
61}
62
63impl ApiConfigHandler {
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    pub fn new() -> Self {
170        std::default::Default::default()
171    }
172
173    /// Sets the value of [error_code][crate::model::ErrorHandler::error_code].
174    ///
175    /// # Example
176    /// ```ignore,no_run
177    /// # use google_cloud_appengine_v1::model::ErrorHandler;
178    /// use google_cloud_appengine_v1::model::error_handler::ErrorCode;
179    /// let x0 = ErrorHandler::new().set_error_code(ErrorCode::OverQuota);
180    /// let x1 = ErrorHandler::new().set_error_code(ErrorCode::DosApiDenial);
181    /// let x2 = ErrorHandler::new().set_error_code(ErrorCode::Timeout);
182    /// ```
183    pub fn set_error_code<T: std::convert::Into<crate::model::error_handler::ErrorCode>>(
184        mut self,
185        v: T,
186    ) -> Self {
187        self.error_code = v.into();
188        self
189    }
190
191    /// Sets the value of [static_file][crate::model::ErrorHandler::static_file].
192    ///
193    /// # Example
194    /// ```ignore,no_run
195    /// # use google_cloud_appengine_v1::model::ErrorHandler;
196    /// let x = ErrorHandler::new().set_static_file("example");
197    /// ```
198    pub fn set_static_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
199        self.static_file = v.into();
200        self
201    }
202
203    /// Sets the value of [mime_type][crate::model::ErrorHandler::mime_type].
204    ///
205    /// # Example
206    /// ```ignore,no_run
207    /// # use google_cloud_appengine_v1::model::ErrorHandler;
208    /// let x = ErrorHandler::new().set_mime_type("example");
209    /// ```
210    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
211        self.mime_type = v.into();
212        self
213    }
214}
215
216impl wkt::message::Message for ErrorHandler {
217    fn typename() -> &'static str {
218        "type.googleapis.com/google.appengine.v1.ErrorHandler"
219    }
220}
221
222/// Defines additional types related to [ErrorHandler].
223pub mod error_handler {
224    #[allow(unused_imports)]
225    use super::*;
226
227    /// Error codes.
228    ///
229    /// # Working with unknown values
230    ///
231    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
232    /// additional enum variants at any time. Adding new variants is not considered
233    /// a breaking change. Applications should write their code in anticipation of:
234    ///
235    /// - New values appearing in future releases of the client library, **and**
236    /// - New values received dynamically, without application changes.
237    ///
238    /// Please consult the [Working with enums] section in the user guide for some
239    /// guidelines.
240    ///
241    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
242    #[derive(Clone, Debug, PartialEq)]
243    #[non_exhaustive]
244    pub enum ErrorCode {
245        /// Not specified. ERROR_CODE_DEFAULT is assumed.
246        Unspecified,
247        /// All other error types.
248        Default,
249        /// Application has exceeded a resource quota.
250        OverQuota,
251        /// Client blocked by the application's Denial of Service protection
252        /// configuration.
253        DosApiDenial,
254        /// Deadline reached before the application responds.
255        Timeout,
256        /// If set, the enum was initialized with an unknown value.
257        ///
258        /// Applications can examine the value using [ErrorCode::value] or
259        /// [ErrorCode::name].
260        UnknownValue(error_code::UnknownValue),
261    }
262
263    #[doc(hidden)]
264    pub mod error_code {
265        #[allow(unused_imports)]
266        use super::*;
267        #[derive(Clone, Debug, PartialEq)]
268        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
269    }
270
271    impl ErrorCode {
272        /// Gets the enum value.
273        ///
274        /// Returns `None` if the enum contains an unknown value deserialized from
275        /// the string representation of enums.
276        pub fn value(&self) -> std::option::Option<i32> {
277            match self {
278                Self::Unspecified => std::option::Option::Some(0),
279                Self::Default => std::option::Option::Some(0),
280                Self::OverQuota => std::option::Option::Some(1),
281                Self::DosApiDenial => std::option::Option::Some(2),
282                Self::Timeout => std::option::Option::Some(3),
283                Self::UnknownValue(u) => u.0.value(),
284            }
285        }
286
287        /// Gets the enum value as a string.
288        ///
289        /// Returns `None` if the enum contains an unknown value deserialized from
290        /// the integer representation of enums.
291        pub fn name(&self) -> std::option::Option<&str> {
292            match self {
293                Self::Unspecified => std::option::Option::Some("ERROR_CODE_UNSPECIFIED"),
294                Self::Default => std::option::Option::Some("ERROR_CODE_DEFAULT"),
295                Self::OverQuota => std::option::Option::Some("ERROR_CODE_OVER_QUOTA"),
296                Self::DosApiDenial => std::option::Option::Some("ERROR_CODE_DOS_API_DENIAL"),
297                Self::Timeout => std::option::Option::Some("ERROR_CODE_TIMEOUT"),
298                Self::UnknownValue(u) => u.0.name(),
299            }
300        }
301    }
302
303    impl std::default::Default for ErrorCode {
304        fn default() -> Self {
305            use std::convert::From;
306            Self::from(0)
307        }
308    }
309
310    impl std::fmt::Display for ErrorCode {
311        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
312            wkt::internal::display_enum(f, self.name(), self.value())
313        }
314    }
315
316    impl std::convert::From<i32> for ErrorCode {
317        fn from(value: i32) -> Self {
318            match value {
319                0 => Self::Default,
320                1 => Self::OverQuota,
321                2 => Self::DosApiDenial,
322                3 => Self::Timeout,
323                _ => Self::UnknownValue(error_code::UnknownValue(
324                    wkt::internal::UnknownEnumValue::Integer(value),
325                )),
326            }
327        }
328    }
329
330    impl std::convert::From<&str> for ErrorCode {
331        fn from(value: &str) -> Self {
332            use std::string::ToString;
333            match value {
334                "ERROR_CODE_UNSPECIFIED" => Self::Unspecified,
335                "ERROR_CODE_DEFAULT" => Self::Default,
336                "ERROR_CODE_OVER_QUOTA" => Self::OverQuota,
337                "ERROR_CODE_DOS_API_DENIAL" => Self::DosApiDenial,
338                "ERROR_CODE_TIMEOUT" => Self::Timeout,
339                _ => Self::UnknownValue(error_code::UnknownValue(
340                    wkt::internal::UnknownEnumValue::String(value.to_string()),
341                )),
342            }
343        }
344    }
345
346    impl serde::ser::Serialize for ErrorCode {
347        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
348        where
349            S: serde::Serializer,
350        {
351            match self {
352                Self::Unspecified => serializer.serialize_i32(0),
353                Self::Default => serializer.serialize_i32(0),
354                Self::OverQuota => serializer.serialize_i32(1),
355                Self::DosApiDenial => serializer.serialize_i32(2),
356                Self::Timeout => serializer.serialize_i32(3),
357                Self::UnknownValue(u) => u.0.serialize(serializer),
358            }
359        }
360    }
361
362    impl<'de> serde::de::Deserialize<'de> for ErrorCode {
363        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
364        where
365            D: serde::Deserializer<'de>,
366        {
367            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
368                ".google.appengine.v1.ErrorHandler.ErrorCode",
369            ))
370        }
371    }
372}
373
374/// URL pattern and description of how the URL should be handled. App Engine can
375/// handle URLs by executing application code or by serving static files
376/// uploaded with the version, such as images, CSS, or JavaScript.
377#[derive(Clone, Default, PartialEq)]
378#[non_exhaustive]
379pub struct UrlMap {
380    /// URL prefix. Uses regular expression syntax, which means regexp
381    /// special characters must be escaped, but should not contain groupings.
382    /// All URLs that begin with this prefix are handled by this handler, using the
383    /// portion of the URL after the prefix as part of the file path.
384    pub url_regex: std::string::String,
385
386    /// Security (HTTPS) enforcement for this URL.
387    pub security_level: crate::model::SecurityLevel,
388
389    /// Level of login required to access this resource. Not supported for Node.js
390    /// in the App Engine standard environment.
391    pub login: crate::model::LoginRequirement,
392
393    /// Action to take when users access resources that require
394    /// authentication. Defaults to `redirect`.
395    pub auth_fail_action: crate::model::AuthFailAction,
396
397    /// `30x` code to use when performing redirects for the `secure` field.
398    /// Defaults to `302`.
399    pub redirect_http_response_code: crate::model::url_map::RedirectHttpResponseCode,
400
401    /// Type of handler for this URL pattern.
402    pub handler_type: std::option::Option<crate::model::url_map::HandlerType>,
403
404    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
405}
406
407impl UrlMap {
408    pub fn new() -> Self {
409        std::default::Default::default()
410    }
411
412    /// Sets the value of [url_regex][crate::model::UrlMap::url_regex].
413    ///
414    /// # Example
415    /// ```ignore,no_run
416    /// # use google_cloud_appengine_v1::model::UrlMap;
417    /// let x = UrlMap::new().set_url_regex("example");
418    /// ```
419    pub fn set_url_regex<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
420        self.url_regex = v.into();
421        self
422    }
423
424    /// Sets the value of [security_level][crate::model::UrlMap::security_level].
425    ///
426    /// # Example
427    /// ```ignore,no_run
428    /// # use google_cloud_appengine_v1::model::UrlMap;
429    /// use google_cloud_appengine_v1::model::SecurityLevel;
430    /// let x0 = UrlMap::new().set_security_level(SecurityLevel::SecureNever);
431    /// let x1 = UrlMap::new().set_security_level(SecurityLevel::SecureOptional);
432    /// let x2 = UrlMap::new().set_security_level(SecurityLevel::SecureAlways);
433    /// ```
434    pub fn set_security_level<T: std::convert::Into<crate::model::SecurityLevel>>(
435        mut self,
436        v: T,
437    ) -> Self {
438        self.security_level = v.into();
439        self
440    }
441
442    /// Sets the value of [login][crate::model::UrlMap::login].
443    ///
444    /// # Example
445    /// ```ignore,no_run
446    /// # use google_cloud_appengine_v1::model::UrlMap;
447    /// use google_cloud_appengine_v1::model::LoginRequirement;
448    /// let x0 = UrlMap::new().set_login(LoginRequirement::LoginOptional);
449    /// let x1 = UrlMap::new().set_login(LoginRequirement::LoginAdmin);
450    /// let x2 = UrlMap::new().set_login(LoginRequirement::LoginRequired);
451    /// ```
452    pub fn set_login<T: std::convert::Into<crate::model::LoginRequirement>>(
453        mut self,
454        v: T,
455    ) -> Self {
456        self.login = v.into();
457        self
458    }
459
460    /// Sets the value of [auth_fail_action][crate::model::UrlMap::auth_fail_action].
461    ///
462    /// # Example
463    /// ```ignore,no_run
464    /// # use google_cloud_appengine_v1::model::UrlMap;
465    /// use google_cloud_appengine_v1::model::AuthFailAction;
466    /// let x0 = UrlMap::new().set_auth_fail_action(AuthFailAction::Redirect);
467    /// let x1 = UrlMap::new().set_auth_fail_action(AuthFailAction::Unauthorized);
468    /// ```
469    pub fn set_auth_fail_action<T: std::convert::Into<crate::model::AuthFailAction>>(
470        mut self,
471        v: T,
472    ) -> Self {
473        self.auth_fail_action = v.into();
474        self
475    }
476
477    /// Sets the value of [redirect_http_response_code][crate::model::UrlMap::redirect_http_response_code].
478    ///
479    /// # Example
480    /// ```ignore,no_run
481    /// # use google_cloud_appengine_v1::model::UrlMap;
482    /// use google_cloud_appengine_v1::model::url_map::RedirectHttpResponseCode;
483    /// let x0 = UrlMap::new().set_redirect_http_response_code(RedirectHttpResponseCode::RedirectHttpResponseCode301);
484    /// let x1 = UrlMap::new().set_redirect_http_response_code(RedirectHttpResponseCode::RedirectHttpResponseCode302);
485    /// let x2 = UrlMap::new().set_redirect_http_response_code(RedirectHttpResponseCode::RedirectHttpResponseCode303);
486    /// ```
487    pub fn set_redirect_http_response_code<
488        T: std::convert::Into<crate::model::url_map::RedirectHttpResponseCode>,
489    >(
490        mut self,
491        v: T,
492    ) -> Self {
493        self.redirect_http_response_code = v.into();
494        self
495    }
496
497    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type].
498    ///
499    /// Note that all the setters affecting `handler_type` are mutually
500    /// exclusive.
501    ///
502    /// # Example
503    /// ```ignore,no_run
504    /// # use google_cloud_appengine_v1::model::UrlMap;
505    /// use google_cloud_appengine_v1::model::StaticFilesHandler;
506    /// let x = UrlMap::new().set_handler_type(Some(
507    ///     google_cloud_appengine_v1::model::url_map::HandlerType::StaticFiles(StaticFilesHandler::default().into())));
508    /// ```
509    pub fn set_handler_type<
510        T: std::convert::Into<std::option::Option<crate::model::url_map::HandlerType>>,
511    >(
512        mut self,
513        v: T,
514    ) -> Self {
515        self.handler_type = v.into();
516        self
517    }
518
519    /// The value of [handler_type][crate::model::UrlMap::handler_type]
520    /// if it holds a `StaticFiles`, `None` if the field is not set or
521    /// holds a different branch.
522    pub fn static_files(
523        &self,
524    ) -> std::option::Option<&std::boxed::Box<crate::model::StaticFilesHandler>> {
525        #[allow(unreachable_patterns)]
526        self.handler_type.as_ref().and_then(|v| match v {
527            crate::model::url_map::HandlerType::StaticFiles(v) => std::option::Option::Some(v),
528            _ => std::option::Option::None,
529        })
530    }
531
532    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
533    /// to hold a `StaticFiles`.
534    ///
535    /// Note that all the setters affecting `handler_type` are
536    /// mutually exclusive.
537    ///
538    /// # Example
539    /// ```ignore,no_run
540    /// # use google_cloud_appengine_v1::model::UrlMap;
541    /// use google_cloud_appengine_v1::model::StaticFilesHandler;
542    /// let x = UrlMap::new().set_static_files(StaticFilesHandler::default()/* use setters */);
543    /// assert!(x.static_files().is_some());
544    /// assert!(x.script().is_none());
545    /// assert!(x.api_endpoint().is_none());
546    /// ```
547    pub fn set_static_files<
548        T: std::convert::Into<std::boxed::Box<crate::model::StaticFilesHandler>>,
549    >(
550        mut self,
551        v: T,
552    ) -> Self {
553        self.handler_type =
554            std::option::Option::Some(crate::model::url_map::HandlerType::StaticFiles(v.into()));
555        self
556    }
557
558    /// The value of [handler_type][crate::model::UrlMap::handler_type]
559    /// if it holds a `Script`, `None` if the field is not set or
560    /// holds a different branch.
561    pub fn script(&self) -> std::option::Option<&std::boxed::Box<crate::model::ScriptHandler>> {
562        #[allow(unreachable_patterns)]
563        self.handler_type.as_ref().and_then(|v| match v {
564            crate::model::url_map::HandlerType::Script(v) => std::option::Option::Some(v),
565            _ => std::option::Option::None,
566        })
567    }
568
569    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
570    /// to hold a `Script`.
571    ///
572    /// Note that all the setters affecting `handler_type` are
573    /// mutually exclusive.
574    ///
575    /// # Example
576    /// ```ignore,no_run
577    /// # use google_cloud_appengine_v1::model::UrlMap;
578    /// use google_cloud_appengine_v1::model::ScriptHandler;
579    /// let x = UrlMap::new().set_script(ScriptHandler::default()/* use setters */);
580    /// assert!(x.script().is_some());
581    /// assert!(x.static_files().is_none());
582    /// assert!(x.api_endpoint().is_none());
583    /// ```
584    pub fn set_script<T: std::convert::Into<std::boxed::Box<crate::model::ScriptHandler>>>(
585        mut self,
586        v: T,
587    ) -> Self {
588        self.handler_type =
589            std::option::Option::Some(crate::model::url_map::HandlerType::Script(v.into()));
590        self
591    }
592
593    /// The value of [handler_type][crate::model::UrlMap::handler_type]
594    /// if it holds a `ApiEndpoint`, `None` if the field is not set or
595    /// holds a different branch.
596    pub fn api_endpoint(
597        &self,
598    ) -> std::option::Option<&std::boxed::Box<crate::model::ApiEndpointHandler>> {
599        #[allow(unreachable_patterns)]
600        self.handler_type.as_ref().and_then(|v| match v {
601            crate::model::url_map::HandlerType::ApiEndpoint(v) => std::option::Option::Some(v),
602            _ => std::option::Option::None,
603        })
604    }
605
606    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
607    /// to hold a `ApiEndpoint`.
608    ///
609    /// Note that all the setters affecting `handler_type` are
610    /// mutually exclusive.
611    ///
612    /// # Example
613    /// ```ignore,no_run
614    /// # use google_cloud_appengine_v1::model::UrlMap;
615    /// use google_cloud_appengine_v1::model::ApiEndpointHandler;
616    /// let x = UrlMap::new().set_api_endpoint(ApiEndpointHandler::default()/* use setters */);
617    /// assert!(x.api_endpoint().is_some());
618    /// assert!(x.static_files().is_none());
619    /// assert!(x.script().is_none());
620    /// ```
621    pub fn set_api_endpoint<
622        T: std::convert::Into<std::boxed::Box<crate::model::ApiEndpointHandler>>,
623    >(
624        mut self,
625        v: T,
626    ) -> Self {
627        self.handler_type =
628            std::option::Option::Some(crate::model::url_map::HandlerType::ApiEndpoint(v.into()));
629        self
630    }
631}
632
633impl wkt::message::Message for UrlMap {
634    fn typename() -> &'static str {
635        "type.googleapis.com/google.appengine.v1.UrlMap"
636    }
637}
638
639/// Defines additional types related to [UrlMap].
640pub mod url_map {
641    #[allow(unused_imports)]
642    use super::*;
643
644    /// Redirect codes.
645    ///
646    /// # Working with unknown values
647    ///
648    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
649    /// additional enum variants at any time. Adding new variants is not considered
650    /// a breaking change. Applications should write their code in anticipation of:
651    ///
652    /// - New values appearing in future releases of the client library, **and**
653    /// - New values received dynamically, without application changes.
654    ///
655    /// Please consult the [Working with enums] section in the user guide for some
656    /// guidelines.
657    ///
658    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
659    #[derive(Clone, Debug, PartialEq)]
660    #[non_exhaustive]
661    pub enum RedirectHttpResponseCode {
662        /// Not specified. `302` is assumed.
663        Unspecified,
664        /// `301 Moved Permanently` code.
665        RedirectHttpResponseCode301,
666        /// `302 Moved Temporarily` code.
667        RedirectHttpResponseCode302,
668        /// `303 See Other` code.
669        RedirectHttpResponseCode303,
670        /// `307 Temporary Redirect` code.
671        RedirectHttpResponseCode307,
672        /// If set, the enum was initialized with an unknown value.
673        ///
674        /// Applications can examine the value using [RedirectHttpResponseCode::value] or
675        /// [RedirectHttpResponseCode::name].
676        UnknownValue(redirect_http_response_code::UnknownValue),
677    }
678
679    #[doc(hidden)]
680    pub mod redirect_http_response_code {
681        #[allow(unused_imports)]
682        use super::*;
683        #[derive(Clone, Debug, PartialEq)]
684        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
685    }
686
687    impl RedirectHttpResponseCode {
688        /// Gets the enum value.
689        ///
690        /// Returns `None` if the enum contains an unknown value deserialized from
691        /// the string representation of enums.
692        pub fn value(&self) -> std::option::Option<i32> {
693            match self {
694                Self::Unspecified => std::option::Option::Some(0),
695                Self::RedirectHttpResponseCode301 => std::option::Option::Some(1),
696                Self::RedirectHttpResponseCode302 => std::option::Option::Some(2),
697                Self::RedirectHttpResponseCode303 => std::option::Option::Some(3),
698                Self::RedirectHttpResponseCode307 => std::option::Option::Some(4),
699                Self::UnknownValue(u) => u.0.value(),
700            }
701        }
702
703        /// Gets the enum value as a string.
704        ///
705        /// Returns `None` if the enum contains an unknown value deserialized from
706        /// the integer representation of enums.
707        pub fn name(&self) -> std::option::Option<&str> {
708            match self {
709                Self::Unspecified => {
710                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED")
711                }
712                Self::RedirectHttpResponseCode301 => {
713                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_301")
714                }
715                Self::RedirectHttpResponseCode302 => {
716                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_302")
717                }
718                Self::RedirectHttpResponseCode303 => {
719                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_303")
720                }
721                Self::RedirectHttpResponseCode307 => {
722                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_307")
723                }
724                Self::UnknownValue(u) => u.0.name(),
725            }
726        }
727    }
728
729    impl std::default::Default for RedirectHttpResponseCode {
730        fn default() -> Self {
731            use std::convert::From;
732            Self::from(0)
733        }
734    }
735
736    impl std::fmt::Display for RedirectHttpResponseCode {
737        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
738            wkt::internal::display_enum(f, self.name(), self.value())
739        }
740    }
741
742    impl std::convert::From<i32> for RedirectHttpResponseCode {
743        fn from(value: i32) -> Self {
744            match value {
745                0 => Self::Unspecified,
746                1 => Self::RedirectHttpResponseCode301,
747                2 => Self::RedirectHttpResponseCode302,
748                3 => Self::RedirectHttpResponseCode303,
749                4 => Self::RedirectHttpResponseCode307,
750                _ => Self::UnknownValue(redirect_http_response_code::UnknownValue(
751                    wkt::internal::UnknownEnumValue::Integer(value),
752                )),
753            }
754        }
755    }
756
757    impl std::convert::From<&str> for RedirectHttpResponseCode {
758        fn from(value: &str) -> Self {
759            use std::string::ToString;
760            match value {
761                "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" => Self::Unspecified,
762                "REDIRECT_HTTP_RESPONSE_CODE_301" => Self::RedirectHttpResponseCode301,
763                "REDIRECT_HTTP_RESPONSE_CODE_302" => Self::RedirectHttpResponseCode302,
764                "REDIRECT_HTTP_RESPONSE_CODE_303" => Self::RedirectHttpResponseCode303,
765                "REDIRECT_HTTP_RESPONSE_CODE_307" => Self::RedirectHttpResponseCode307,
766                _ => Self::UnknownValue(redirect_http_response_code::UnknownValue(
767                    wkt::internal::UnknownEnumValue::String(value.to_string()),
768                )),
769            }
770        }
771    }
772
773    impl serde::ser::Serialize for RedirectHttpResponseCode {
774        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
775        where
776            S: serde::Serializer,
777        {
778            match self {
779                Self::Unspecified => serializer.serialize_i32(0),
780                Self::RedirectHttpResponseCode301 => serializer.serialize_i32(1),
781                Self::RedirectHttpResponseCode302 => serializer.serialize_i32(2),
782                Self::RedirectHttpResponseCode303 => serializer.serialize_i32(3),
783                Self::RedirectHttpResponseCode307 => serializer.serialize_i32(4),
784                Self::UnknownValue(u) => u.0.serialize(serializer),
785            }
786        }
787    }
788
789    impl<'de> serde::de::Deserialize<'de> for RedirectHttpResponseCode {
790        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
791        where
792            D: serde::Deserializer<'de>,
793        {
794            deserializer.deserialize_any(
795                wkt::internal::EnumVisitor::<RedirectHttpResponseCode>::new(
796                    ".google.appengine.v1.UrlMap.RedirectHttpResponseCode",
797                ),
798            )
799        }
800    }
801
802    /// Type of handler for this URL pattern.
803    #[derive(Clone, Debug, PartialEq)]
804    #[non_exhaustive]
805    pub enum HandlerType {
806        /// Returns the contents of a file, such as an image, as the response.
807        StaticFiles(std::boxed::Box<crate::model::StaticFilesHandler>),
808        /// Executes a script to handle the requests that match this URL
809        /// pattern. Only the `auto` value is supported for Node.js in the
810        /// App Engine standard environment, for example `"script": "auto"`.
811        Script(std::boxed::Box<crate::model::ScriptHandler>),
812        /// Uses API Endpoints to handle requests.
813        ApiEndpoint(std::boxed::Box<crate::model::ApiEndpointHandler>),
814    }
815}
816
817/// Files served directly to the user for a given URL, such as images, CSS
818/// stylesheets, or JavaScript source files. Static file handlers describe which
819/// files in the application directory are static files, and which URLs serve
820/// them.
821#[derive(Clone, Default, PartialEq)]
822#[non_exhaustive]
823pub struct StaticFilesHandler {
824    /// Path to the static files matched by the URL pattern, from the
825    /// application root directory. The path can refer to text matched in groupings
826    /// in the URL pattern.
827    pub path: std::string::String,
828
829    /// Regular expression that matches the file paths for all files that should be
830    /// referenced by this handler.
831    pub upload_path_regex: std::string::String,
832
833    /// HTTP headers to use for all responses from these URLs.
834    pub http_headers: std::collections::HashMap<std::string::String, std::string::String>,
835
836    /// MIME type used to serve all files served by this handler.
837    ///
838    /// Defaults to file-specific MIME types, which are derived from each file's
839    /// filename extension.
840    pub mime_type: std::string::String,
841
842    /// Time a static file served by this handler should be cached
843    /// by web proxies and browsers.
844    pub expiration: std::option::Option<wkt::Duration>,
845
846    /// Whether this handler should match the request if the file
847    /// referenced by the handler does not exist.
848    pub require_matching_file: bool,
849
850    /// Whether files should also be uploaded as code data. By default, files
851    /// declared in static file handlers are uploaded as static
852    /// data and are only served to end users; they cannot be read by the
853    /// application. If enabled, uploads are charged against both your code and
854    /// static data storage resource quotas.
855    pub application_readable: bool,
856
857    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
858}
859
860impl StaticFilesHandler {
861    pub fn new() -> Self {
862        std::default::Default::default()
863    }
864
865    /// Sets the value of [path][crate::model::StaticFilesHandler::path].
866    ///
867    /// # Example
868    /// ```ignore,no_run
869    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
870    /// let x = StaticFilesHandler::new().set_path("example");
871    /// ```
872    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
873        self.path = v.into();
874        self
875    }
876
877    /// Sets the value of [upload_path_regex][crate::model::StaticFilesHandler::upload_path_regex].
878    ///
879    /// # Example
880    /// ```ignore,no_run
881    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
882    /// let x = StaticFilesHandler::new().set_upload_path_regex("example");
883    /// ```
884    pub fn set_upload_path_regex<T: std::convert::Into<std::string::String>>(
885        mut self,
886        v: T,
887    ) -> Self {
888        self.upload_path_regex = v.into();
889        self
890    }
891
892    /// Sets the value of [http_headers][crate::model::StaticFilesHandler::http_headers].
893    ///
894    /// # Example
895    /// ```ignore,no_run
896    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
897    /// let x = StaticFilesHandler::new().set_http_headers([
898    ///     ("key0", "abc"),
899    ///     ("key1", "xyz"),
900    /// ]);
901    /// ```
902    pub fn set_http_headers<T, K, V>(mut self, v: T) -> Self
903    where
904        T: std::iter::IntoIterator<Item = (K, V)>,
905        K: std::convert::Into<std::string::String>,
906        V: std::convert::Into<std::string::String>,
907    {
908        use std::iter::Iterator;
909        self.http_headers = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
910        self
911    }
912
913    /// Sets the value of [mime_type][crate::model::StaticFilesHandler::mime_type].
914    ///
915    /// # Example
916    /// ```ignore,no_run
917    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
918    /// let x = StaticFilesHandler::new().set_mime_type("example");
919    /// ```
920    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
921        self.mime_type = v.into();
922        self
923    }
924
925    /// Sets the value of [expiration][crate::model::StaticFilesHandler::expiration].
926    ///
927    /// # Example
928    /// ```ignore,no_run
929    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
930    /// use wkt::Duration;
931    /// let x = StaticFilesHandler::new().set_expiration(Duration::default()/* use setters */);
932    /// ```
933    pub fn set_expiration<T>(mut self, v: T) -> Self
934    where
935        T: std::convert::Into<wkt::Duration>,
936    {
937        self.expiration = std::option::Option::Some(v.into());
938        self
939    }
940
941    /// Sets or clears the value of [expiration][crate::model::StaticFilesHandler::expiration].
942    ///
943    /// # Example
944    /// ```ignore,no_run
945    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
946    /// use wkt::Duration;
947    /// let x = StaticFilesHandler::new().set_or_clear_expiration(Some(Duration::default()/* use setters */));
948    /// let x = StaticFilesHandler::new().set_or_clear_expiration(None::<Duration>);
949    /// ```
950    pub fn set_or_clear_expiration<T>(mut self, v: std::option::Option<T>) -> Self
951    where
952        T: std::convert::Into<wkt::Duration>,
953    {
954        self.expiration = v.map(|x| x.into());
955        self
956    }
957
958    /// Sets the value of [require_matching_file][crate::model::StaticFilesHandler::require_matching_file].
959    ///
960    /// # Example
961    /// ```ignore,no_run
962    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
963    /// let x = StaticFilesHandler::new().set_require_matching_file(true);
964    /// ```
965    pub fn set_require_matching_file<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
966        self.require_matching_file = v.into();
967        self
968    }
969
970    /// Sets the value of [application_readable][crate::model::StaticFilesHandler::application_readable].
971    ///
972    /// # Example
973    /// ```ignore,no_run
974    /// # use google_cloud_appengine_v1::model::StaticFilesHandler;
975    /// let x = StaticFilesHandler::new().set_application_readable(true);
976    /// ```
977    pub fn set_application_readable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
978        self.application_readable = v.into();
979        self
980    }
981}
982
983impl wkt::message::Message for StaticFilesHandler {
984    fn typename() -> &'static str {
985        "type.googleapis.com/google.appengine.v1.StaticFilesHandler"
986    }
987}
988
989/// Executes a script to handle the request that matches the URL pattern.
990#[derive(Clone, Default, PartialEq)]
991#[non_exhaustive]
992pub struct ScriptHandler {
993    /// Path to the script from the application root directory.
994    pub script_path: std::string::String,
995
996    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
997}
998
999impl ScriptHandler {
1000    pub fn new() -> Self {
1001        std::default::Default::default()
1002    }
1003
1004    /// Sets the value of [script_path][crate::model::ScriptHandler::script_path].
1005    ///
1006    /// # Example
1007    /// ```ignore,no_run
1008    /// # use google_cloud_appengine_v1::model::ScriptHandler;
1009    /// let x = ScriptHandler::new().set_script_path("example");
1010    /// ```
1011    pub fn set_script_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1012        self.script_path = v.into();
1013        self
1014    }
1015}
1016
1017impl wkt::message::Message for ScriptHandler {
1018    fn typename() -> &'static str {
1019        "type.googleapis.com/google.appengine.v1.ScriptHandler"
1020    }
1021}
1022
1023/// Uses Google Cloud Endpoints to handle requests.
1024#[derive(Clone, Default, PartialEq)]
1025#[non_exhaustive]
1026pub struct ApiEndpointHandler {
1027    /// Path to the script from the application root directory.
1028    pub script_path: std::string::String,
1029
1030    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1031}
1032
1033impl ApiEndpointHandler {
1034    pub fn new() -> Self {
1035        std::default::Default::default()
1036    }
1037
1038    /// Sets the value of [script_path][crate::model::ApiEndpointHandler::script_path].
1039    ///
1040    /// # Example
1041    /// ```ignore,no_run
1042    /// # use google_cloud_appengine_v1::model::ApiEndpointHandler;
1043    /// let x = ApiEndpointHandler::new().set_script_path("example");
1044    /// ```
1045    pub fn set_script_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1046        self.script_path = v.into();
1047        self
1048    }
1049}
1050
1051impl wkt::message::Message for ApiEndpointHandler {
1052    fn typename() -> &'static str {
1053        "type.googleapis.com/google.appengine.v1.ApiEndpointHandler"
1054    }
1055}
1056
1057/// Health checking configuration for VM instances. Unhealthy instances
1058/// are killed and replaced with new instances. Only applicable for
1059/// instances in App Engine flexible environment.
1060#[derive(Clone, Default, PartialEq)]
1061#[non_exhaustive]
1062pub struct HealthCheck {
1063    /// Whether to explicitly disable health checks for this instance.
1064    pub disable_health_check: bool,
1065
1066    /// Host header to send when performing an HTTP health check.
1067    /// Example: "myapp.appspot.com"
1068    pub host: std::string::String,
1069
1070    /// Number of consecutive successful health checks required before receiving
1071    /// traffic.
1072    pub healthy_threshold: u32,
1073
1074    /// Number of consecutive failed health checks required before removing
1075    /// traffic.
1076    pub unhealthy_threshold: u32,
1077
1078    /// Number of consecutive failed health checks required before an instance is
1079    /// restarted.
1080    pub restart_threshold: u32,
1081
1082    /// Interval between health checks.
1083    pub check_interval: std::option::Option<wkt::Duration>,
1084
1085    /// Time before the health check is considered failed.
1086    pub timeout: std::option::Option<wkt::Duration>,
1087
1088    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1089}
1090
1091impl HealthCheck {
1092    pub fn new() -> Self {
1093        std::default::Default::default()
1094    }
1095
1096    /// Sets the value of [disable_health_check][crate::model::HealthCheck::disable_health_check].
1097    ///
1098    /// # Example
1099    /// ```ignore,no_run
1100    /// # use google_cloud_appengine_v1::model::HealthCheck;
1101    /// let x = HealthCheck::new().set_disable_health_check(true);
1102    /// ```
1103    pub fn set_disable_health_check<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1104        self.disable_health_check = v.into();
1105        self
1106    }
1107
1108    /// Sets the value of [host][crate::model::HealthCheck::host].
1109    ///
1110    /// # Example
1111    /// ```ignore,no_run
1112    /// # use google_cloud_appengine_v1::model::HealthCheck;
1113    /// let x = HealthCheck::new().set_host("example");
1114    /// ```
1115    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1116        self.host = v.into();
1117        self
1118    }
1119
1120    /// Sets the value of [healthy_threshold][crate::model::HealthCheck::healthy_threshold].
1121    ///
1122    /// # Example
1123    /// ```ignore,no_run
1124    /// # use google_cloud_appengine_v1::model::HealthCheck;
1125    /// let x = HealthCheck::new().set_healthy_threshold(42_u32);
1126    /// ```
1127    pub fn set_healthy_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1128        self.healthy_threshold = v.into();
1129        self
1130    }
1131
1132    /// Sets the value of [unhealthy_threshold][crate::model::HealthCheck::unhealthy_threshold].
1133    ///
1134    /// # Example
1135    /// ```ignore,no_run
1136    /// # use google_cloud_appengine_v1::model::HealthCheck;
1137    /// let x = HealthCheck::new().set_unhealthy_threshold(42_u32);
1138    /// ```
1139    pub fn set_unhealthy_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1140        self.unhealthy_threshold = v.into();
1141        self
1142    }
1143
1144    /// Sets the value of [restart_threshold][crate::model::HealthCheck::restart_threshold].
1145    ///
1146    /// # Example
1147    /// ```ignore,no_run
1148    /// # use google_cloud_appengine_v1::model::HealthCheck;
1149    /// let x = HealthCheck::new().set_restart_threshold(42_u32);
1150    /// ```
1151    pub fn set_restart_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1152        self.restart_threshold = v.into();
1153        self
1154    }
1155
1156    /// Sets the value of [check_interval][crate::model::HealthCheck::check_interval].
1157    ///
1158    /// # Example
1159    /// ```ignore,no_run
1160    /// # use google_cloud_appengine_v1::model::HealthCheck;
1161    /// use wkt::Duration;
1162    /// let x = HealthCheck::new().set_check_interval(Duration::default()/* use setters */);
1163    /// ```
1164    pub fn set_check_interval<T>(mut self, v: T) -> Self
1165    where
1166        T: std::convert::Into<wkt::Duration>,
1167    {
1168        self.check_interval = std::option::Option::Some(v.into());
1169        self
1170    }
1171
1172    /// Sets or clears the value of [check_interval][crate::model::HealthCheck::check_interval].
1173    ///
1174    /// # Example
1175    /// ```ignore,no_run
1176    /// # use google_cloud_appengine_v1::model::HealthCheck;
1177    /// use wkt::Duration;
1178    /// let x = HealthCheck::new().set_or_clear_check_interval(Some(Duration::default()/* use setters */));
1179    /// let x = HealthCheck::new().set_or_clear_check_interval(None::<Duration>);
1180    /// ```
1181    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
1182    where
1183        T: std::convert::Into<wkt::Duration>,
1184    {
1185        self.check_interval = v.map(|x| x.into());
1186        self
1187    }
1188
1189    /// Sets the value of [timeout][crate::model::HealthCheck::timeout].
1190    ///
1191    /// # Example
1192    /// ```ignore,no_run
1193    /// # use google_cloud_appengine_v1::model::HealthCheck;
1194    /// use wkt::Duration;
1195    /// let x = HealthCheck::new().set_timeout(Duration::default()/* use setters */);
1196    /// ```
1197    pub fn set_timeout<T>(mut self, v: T) -> Self
1198    where
1199        T: std::convert::Into<wkt::Duration>,
1200    {
1201        self.timeout = std::option::Option::Some(v.into());
1202        self
1203    }
1204
1205    /// Sets or clears the value of [timeout][crate::model::HealthCheck::timeout].
1206    ///
1207    /// # Example
1208    /// ```ignore,no_run
1209    /// # use google_cloud_appengine_v1::model::HealthCheck;
1210    /// use wkt::Duration;
1211    /// let x = HealthCheck::new().set_or_clear_timeout(Some(Duration::default()/* use setters */));
1212    /// let x = HealthCheck::new().set_or_clear_timeout(None::<Duration>);
1213    /// ```
1214    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1215    where
1216        T: std::convert::Into<wkt::Duration>,
1217    {
1218        self.timeout = v.map(|x| x.into());
1219        self
1220    }
1221}
1222
1223impl wkt::message::Message for HealthCheck {
1224    fn typename() -> &'static str {
1225        "type.googleapis.com/google.appengine.v1.HealthCheck"
1226    }
1227}
1228
1229/// Readiness checking configuration for VM instances. Unhealthy instances
1230/// are removed from traffic rotation.
1231#[derive(Clone, Default, PartialEq)]
1232#[non_exhaustive]
1233pub struct ReadinessCheck {
1234    /// The request path.
1235    pub path: std::string::String,
1236
1237    /// Host header to send when performing a HTTP Readiness check.
1238    /// Example: "myapp.appspot.com"
1239    pub host: std::string::String,
1240
1241    /// Number of consecutive failed checks required before removing
1242    /// traffic.
1243    pub failure_threshold: u32,
1244
1245    /// Number of consecutive successful checks required before receiving
1246    /// traffic.
1247    pub success_threshold: u32,
1248
1249    /// Interval between health checks.
1250    pub check_interval: std::option::Option<wkt::Duration>,
1251
1252    /// Time before the check is considered failed.
1253    pub timeout: std::option::Option<wkt::Duration>,
1254
1255    /// A maximum time limit on application initialization, measured from moment
1256    /// the application successfully replies to a healthcheck until it is ready to
1257    /// serve traffic.
1258    pub app_start_timeout: std::option::Option<wkt::Duration>,
1259
1260    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1261}
1262
1263impl ReadinessCheck {
1264    pub fn new() -> Self {
1265        std::default::Default::default()
1266    }
1267
1268    /// Sets the value of [path][crate::model::ReadinessCheck::path].
1269    ///
1270    /// # Example
1271    /// ```ignore,no_run
1272    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1273    /// let x = ReadinessCheck::new().set_path("example");
1274    /// ```
1275    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1276        self.path = v.into();
1277        self
1278    }
1279
1280    /// Sets the value of [host][crate::model::ReadinessCheck::host].
1281    ///
1282    /// # Example
1283    /// ```ignore,no_run
1284    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1285    /// let x = ReadinessCheck::new().set_host("example");
1286    /// ```
1287    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1288        self.host = v.into();
1289        self
1290    }
1291
1292    /// Sets the value of [failure_threshold][crate::model::ReadinessCheck::failure_threshold].
1293    ///
1294    /// # Example
1295    /// ```ignore,no_run
1296    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1297    /// let x = ReadinessCheck::new().set_failure_threshold(42_u32);
1298    /// ```
1299    pub fn set_failure_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1300        self.failure_threshold = v.into();
1301        self
1302    }
1303
1304    /// Sets the value of [success_threshold][crate::model::ReadinessCheck::success_threshold].
1305    ///
1306    /// # Example
1307    /// ```ignore,no_run
1308    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1309    /// let x = ReadinessCheck::new().set_success_threshold(42_u32);
1310    /// ```
1311    pub fn set_success_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1312        self.success_threshold = v.into();
1313        self
1314    }
1315
1316    /// Sets the value of [check_interval][crate::model::ReadinessCheck::check_interval].
1317    ///
1318    /// # Example
1319    /// ```ignore,no_run
1320    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1321    /// use wkt::Duration;
1322    /// let x = ReadinessCheck::new().set_check_interval(Duration::default()/* use setters */);
1323    /// ```
1324    pub fn set_check_interval<T>(mut self, v: T) -> Self
1325    where
1326        T: std::convert::Into<wkt::Duration>,
1327    {
1328        self.check_interval = std::option::Option::Some(v.into());
1329        self
1330    }
1331
1332    /// Sets or clears the value of [check_interval][crate::model::ReadinessCheck::check_interval].
1333    ///
1334    /// # Example
1335    /// ```ignore,no_run
1336    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1337    /// use wkt::Duration;
1338    /// let x = ReadinessCheck::new().set_or_clear_check_interval(Some(Duration::default()/* use setters */));
1339    /// let x = ReadinessCheck::new().set_or_clear_check_interval(None::<Duration>);
1340    /// ```
1341    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
1342    where
1343        T: std::convert::Into<wkt::Duration>,
1344    {
1345        self.check_interval = v.map(|x| x.into());
1346        self
1347    }
1348
1349    /// Sets the value of [timeout][crate::model::ReadinessCheck::timeout].
1350    ///
1351    /// # Example
1352    /// ```ignore,no_run
1353    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1354    /// use wkt::Duration;
1355    /// let x = ReadinessCheck::new().set_timeout(Duration::default()/* use setters */);
1356    /// ```
1357    pub fn set_timeout<T>(mut self, v: T) -> Self
1358    where
1359        T: std::convert::Into<wkt::Duration>,
1360    {
1361        self.timeout = std::option::Option::Some(v.into());
1362        self
1363    }
1364
1365    /// Sets or clears the value of [timeout][crate::model::ReadinessCheck::timeout].
1366    ///
1367    /// # Example
1368    /// ```ignore,no_run
1369    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1370    /// use wkt::Duration;
1371    /// let x = ReadinessCheck::new().set_or_clear_timeout(Some(Duration::default()/* use setters */));
1372    /// let x = ReadinessCheck::new().set_or_clear_timeout(None::<Duration>);
1373    /// ```
1374    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1375    where
1376        T: std::convert::Into<wkt::Duration>,
1377    {
1378        self.timeout = v.map(|x| x.into());
1379        self
1380    }
1381
1382    /// Sets the value of [app_start_timeout][crate::model::ReadinessCheck::app_start_timeout].
1383    ///
1384    /// # Example
1385    /// ```ignore,no_run
1386    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1387    /// use wkt::Duration;
1388    /// let x = ReadinessCheck::new().set_app_start_timeout(Duration::default()/* use setters */);
1389    /// ```
1390    pub fn set_app_start_timeout<T>(mut self, v: T) -> Self
1391    where
1392        T: std::convert::Into<wkt::Duration>,
1393    {
1394        self.app_start_timeout = std::option::Option::Some(v.into());
1395        self
1396    }
1397
1398    /// Sets or clears the value of [app_start_timeout][crate::model::ReadinessCheck::app_start_timeout].
1399    ///
1400    /// # Example
1401    /// ```ignore,no_run
1402    /// # use google_cloud_appengine_v1::model::ReadinessCheck;
1403    /// use wkt::Duration;
1404    /// let x = ReadinessCheck::new().set_or_clear_app_start_timeout(Some(Duration::default()/* use setters */));
1405    /// let x = ReadinessCheck::new().set_or_clear_app_start_timeout(None::<Duration>);
1406    /// ```
1407    pub fn set_or_clear_app_start_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1408    where
1409        T: std::convert::Into<wkt::Duration>,
1410    {
1411        self.app_start_timeout = v.map(|x| x.into());
1412        self
1413    }
1414}
1415
1416impl wkt::message::Message for ReadinessCheck {
1417    fn typename() -> &'static str {
1418        "type.googleapis.com/google.appengine.v1.ReadinessCheck"
1419    }
1420}
1421
1422/// Health checking configuration for VM instances. Unhealthy instances
1423/// are killed and replaced with new instances.
1424#[derive(Clone, Default, PartialEq)]
1425#[non_exhaustive]
1426pub struct LivenessCheck {
1427    /// The request path.
1428    pub path: std::string::String,
1429
1430    /// Host header to send when performing a HTTP Liveness check.
1431    /// Example: "myapp.appspot.com"
1432    pub host: std::string::String,
1433
1434    /// Number of consecutive failed checks required before considering the
1435    /// VM unhealthy.
1436    pub failure_threshold: u32,
1437
1438    /// Number of consecutive successful checks required before considering
1439    /// the VM healthy.
1440    pub success_threshold: u32,
1441
1442    /// Interval between health checks.
1443    pub check_interval: std::option::Option<wkt::Duration>,
1444
1445    /// Time before the check is considered failed.
1446    pub timeout: std::option::Option<wkt::Duration>,
1447
1448    /// The initial delay before starting to execute the checks.
1449    pub initial_delay: std::option::Option<wkt::Duration>,
1450
1451    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1452}
1453
1454impl LivenessCheck {
1455    pub fn new() -> Self {
1456        std::default::Default::default()
1457    }
1458
1459    /// Sets the value of [path][crate::model::LivenessCheck::path].
1460    ///
1461    /// # Example
1462    /// ```ignore,no_run
1463    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1464    /// let x = LivenessCheck::new().set_path("example");
1465    /// ```
1466    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1467        self.path = v.into();
1468        self
1469    }
1470
1471    /// Sets the value of [host][crate::model::LivenessCheck::host].
1472    ///
1473    /// # Example
1474    /// ```ignore,no_run
1475    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1476    /// let x = LivenessCheck::new().set_host("example");
1477    /// ```
1478    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1479        self.host = v.into();
1480        self
1481    }
1482
1483    /// Sets the value of [failure_threshold][crate::model::LivenessCheck::failure_threshold].
1484    ///
1485    /// # Example
1486    /// ```ignore,no_run
1487    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1488    /// let x = LivenessCheck::new().set_failure_threshold(42_u32);
1489    /// ```
1490    pub fn set_failure_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1491        self.failure_threshold = v.into();
1492        self
1493    }
1494
1495    /// Sets the value of [success_threshold][crate::model::LivenessCheck::success_threshold].
1496    ///
1497    /// # Example
1498    /// ```ignore,no_run
1499    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1500    /// let x = LivenessCheck::new().set_success_threshold(42_u32);
1501    /// ```
1502    pub fn set_success_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1503        self.success_threshold = v.into();
1504        self
1505    }
1506
1507    /// Sets the value of [check_interval][crate::model::LivenessCheck::check_interval].
1508    ///
1509    /// # Example
1510    /// ```ignore,no_run
1511    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1512    /// use wkt::Duration;
1513    /// let x = LivenessCheck::new().set_check_interval(Duration::default()/* use setters */);
1514    /// ```
1515    pub fn set_check_interval<T>(mut self, v: T) -> Self
1516    where
1517        T: std::convert::Into<wkt::Duration>,
1518    {
1519        self.check_interval = std::option::Option::Some(v.into());
1520        self
1521    }
1522
1523    /// Sets or clears the value of [check_interval][crate::model::LivenessCheck::check_interval].
1524    ///
1525    /// # Example
1526    /// ```ignore,no_run
1527    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1528    /// use wkt::Duration;
1529    /// let x = LivenessCheck::new().set_or_clear_check_interval(Some(Duration::default()/* use setters */));
1530    /// let x = LivenessCheck::new().set_or_clear_check_interval(None::<Duration>);
1531    /// ```
1532    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
1533    where
1534        T: std::convert::Into<wkt::Duration>,
1535    {
1536        self.check_interval = v.map(|x| x.into());
1537        self
1538    }
1539
1540    /// Sets the value of [timeout][crate::model::LivenessCheck::timeout].
1541    ///
1542    /// # Example
1543    /// ```ignore,no_run
1544    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1545    /// use wkt::Duration;
1546    /// let x = LivenessCheck::new().set_timeout(Duration::default()/* use setters */);
1547    /// ```
1548    pub fn set_timeout<T>(mut self, v: T) -> Self
1549    where
1550        T: std::convert::Into<wkt::Duration>,
1551    {
1552        self.timeout = std::option::Option::Some(v.into());
1553        self
1554    }
1555
1556    /// Sets or clears the value of [timeout][crate::model::LivenessCheck::timeout].
1557    ///
1558    /// # Example
1559    /// ```ignore,no_run
1560    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1561    /// use wkt::Duration;
1562    /// let x = LivenessCheck::new().set_or_clear_timeout(Some(Duration::default()/* use setters */));
1563    /// let x = LivenessCheck::new().set_or_clear_timeout(None::<Duration>);
1564    /// ```
1565    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1566    where
1567        T: std::convert::Into<wkt::Duration>,
1568    {
1569        self.timeout = v.map(|x| x.into());
1570        self
1571    }
1572
1573    /// Sets the value of [initial_delay][crate::model::LivenessCheck::initial_delay].
1574    ///
1575    /// # Example
1576    /// ```ignore,no_run
1577    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1578    /// use wkt::Duration;
1579    /// let x = LivenessCheck::new().set_initial_delay(Duration::default()/* use setters */);
1580    /// ```
1581    pub fn set_initial_delay<T>(mut self, v: T) -> Self
1582    where
1583        T: std::convert::Into<wkt::Duration>,
1584    {
1585        self.initial_delay = std::option::Option::Some(v.into());
1586        self
1587    }
1588
1589    /// Sets or clears the value of [initial_delay][crate::model::LivenessCheck::initial_delay].
1590    ///
1591    /// # Example
1592    /// ```ignore,no_run
1593    /// # use google_cloud_appengine_v1::model::LivenessCheck;
1594    /// use wkt::Duration;
1595    /// let x = LivenessCheck::new().set_or_clear_initial_delay(Some(Duration::default()/* use setters */));
1596    /// let x = LivenessCheck::new().set_or_clear_initial_delay(None::<Duration>);
1597    /// ```
1598    pub fn set_or_clear_initial_delay<T>(mut self, v: std::option::Option<T>) -> Self
1599    where
1600        T: std::convert::Into<wkt::Duration>,
1601    {
1602        self.initial_delay = v.map(|x| x.into());
1603        self
1604    }
1605}
1606
1607impl wkt::message::Message for LivenessCheck {
1608    fn typename() -> &'static str {
1609        "type.googleapis.com/google.appengine.v1.LivenessCheck"
1610    }
1611}
1612
1613/// Third-party Python runtime library that is required by the application.
1614#[derive(Clone, Default, PartialEq)]
1615#[non_exhaustive]
1616pub struct Library {
1617    /// Name of the library. Example: "django".
1618    pub name: std::string::String,
1619
1620    /// Version of the library to select, or "latest".
1621    pub version: std::string::String,
1622
1623    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1624}
1625
1626impl Library {
1627    pub fn new() -> Self {
1628        std::default::Default::default()
1629    }
1630
1631    /// Sets the value of [name][crate::model::Library::name].
1632    ///
1633    /// # Example
1634    /// ```ignore,no_run
1635    /// # use google_cloud_appengine_v1::model::Library;
1636    /// let x = Library::new().set_name("example");
1637    /// ```
1638    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1639        self.name = v.into();
1640        self
1641    }
1642
1643    /// Sets the value of [version][crate::model::Library::version].
1644    ///
1645    /// # Example
1646    /// ```ignore,no_run
1647    /// # use google_cloud_appengine_v1::model::Library;
1648    /// let x = Library::new().set_version("example");
1649    /// ```
1650    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1651        self.version = v.into();
1652        self
1653    }
1654}
1655
1656impl wkt::message::Message for Library {
1657    fn typename() -> &'static str {
1658        "type.googleapis.com/google.appengine.v1.Library"
1659    }
1660}
1661
1662/// Request message for `Applications.GetApplication`.
1663#[derive(Clone, Default, PartialEq)]
1664#[non_exhaustive]
1665pub struct GetApplicationRequest {
1666    /// Name of the Application resource to get. Example: `apps/myapp`.
1667    pub name: std::string::String,
1668
1669    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1670}
1671
1672impl GetApplicationRequest {
1673    pub fn new() -> Self {
1674        std::default::Default::default()
1675    }
1676
1677    /// Sets the value of [name][crate::model::GetApplicationRequest::name].
1678    ///
1679    /// # Example
1680    /// ```ignore,no_run
1681    /// # use google_cloud_appengine_v1::model::GetApplicationRequest;
1682    /// let x = GetApplicationRequest::new().set_name("example");
1683    /// ```
1684    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1685        self.name = v.into();
1686        self
1687    }
1688}
1689
1690impl wkt::message::Message for GetApplicationRequest {
1691    fn typename() -> &'static str {
1692        "type.googleapis.com/google.appengine.v1.GetApplicationRequest"
1693    }
1694}
1695
1696/// Request message for `Applications.CreateApplication`.
1697#[derive(Clone, Default, PartialEq)]
1698#[non_exhaustive]
1699pub struct CreateApplicationRequest {
1700    /// Application configuration.
1701    pub application: std::option::Option<crate::model::Application>,
1702
1703    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1704}
1705
1706impl CreateApplicationRequest {
1707    pub fn new() -> Self {
1708        std::default::Default::default()
1709    }
1710
1711    /// Sets the value of [application][crate::model::CreateApplicationRequest::application].
1712    ///
1713    /// # Example
1714    /// ```ignore,no_run
1715    /// # use google_cloud_appengine_v1::model::CreateApplicationRequest;
1716    /// use google_cloud_appengine_v1::model::Application;
1717    /// let x = CreateApplicationRequest::new().set_application(Application::default()/* use setters */);
1718    /// ```
1719    pub fn set_application<T>(mut self, v: T) -> Self
1720    where
1721        T: std::convert::Into<crate::model::Application>,
1722    {
1723        self.application = std::option::Option::Some(v.into());
1724        self
1725    }
1726
1727    /// Sets or clears the value of [application][crate::model::CreateApplicationRequest::application].
1728    ///
1729    /// # Example
1730    /// ```ignore,no_run
1731    /// # use google_cloud_appengine_v1::model::CreateApplicationRequest;
1732    /// use google_cloud_appengine_v1::model::Application;
1733    /// let x = CreateApplicationRequest::new().set_or_clear_application(Some(Application::default()/* use setters */));
1734    /// let x = CreateApplicationRequest::new().set_or_clear_application(None::<Application>);
1735    /// ```
1736    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
1737    where
1738        T: std::convert::Into<crate::model::Application>,
1739    {
1740        self.application = v.map(|x| x.into());
1741        self
1742    }
1743}
1744
1745impl wkt::message::Message for CreateApplicationRequest {
1746    fn typename() -> &'static str {
1747        "type.googleapis.com/google.appengine.v1.CreateApplicationRequest"
1748    }
1749}
1750
1751/// Request message for `Applications.UpdateApplication`.
1752#[derive(Clone, Default, PartialEq)]
1753#[non_exhaustive]
1754pub struct UpdateApplicationRequest {
1755    /// Name of the Application resource to update. Example: `apps/myapp`.
1756    pub name: std::string::String,
1757
1758    /// An Application containing the updated resource.
1759    pub application: std::option::Option<crate::model::Application>,
1760
1761    /// Required. Standard field mask for the set of fields to be updated.
1762    pub update_mask: std::option::Option<wkt::FieldMask>,
1763
1764    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1765}
1766
1767impl UpdateApplicationRequest {
1768    pub fn new() -> Self {
1769        std::default::Default::default()
1770    }
1771
1772    /// Sets the value of [name][crate::model::UpdateApplicationRequest::name].
1773    ///
1774    /// # Example
1775    /// ```ignore,no_run
1776    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1777    /// let x = UpdateApplicationRequest::new().set_name("example");
1778    /// ```
1779    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1780        self.name = v.into();
1781        self
1782    }
1783
1784    /// Sets the value of [application][crate::model::UpdateApplicationRequest::application].
1785    ///
1786    /// # Example
1787    /// ```ignore,no_run
1788    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1789    /// use google_cloud_appengine_v1::model::Application;
1790    /// let x = UpdateApplicationRequest::new().set_application(Application::default()/* use setters */);
1791    /// ```
1792    pub fn set_application<T>(mut self, v: T) -> Self
1793    where
1794        T: std::convert::Into<crate::model::Application>,
1795    {
1796        self.application = std::option::Option::Some(v.into());
1797        self
1798    }
1799
1800    /// Sets or clears the value of [application][crate::model::UpdateApplicationRequest::application].
1801    ///
1802    /// # Example
1803    /// ```ignore,no_run
1804    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1805    /// use google_cloud_appengine_v1::model::Application;
1806    /// let x = UpdateApplicationRequest::new().set_or_clear_application(Some(Application::default()/* use setters */));
1807    /// let x = UpdateApplicationRequest::new().set_or_clear_application(None::<Application>);
1808    /// ```
1809    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
1810    where
1811        T: std::convert::Into<crate::model::Application>,
1812    {
1813        self.application = v.map(|x| x.into());
1814        self
1815    }
1816
1817    /// Sets the value of [update_mask][crate::model::UpdateApplicationRequest::update_mask].
1818    ///
1819    /// # Example
1820    /// ```ignore,no_run
1821    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1822    /// use wkt::FieldMask;
1823    /// let x = UpdateApplicationRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1824    /// ```
1825    pub fn set_update_mask<T>(mut self, v: T) -> Self
1826    where
1827        T: std::convert::Into<wkt::FieldMask>,
1828    {
1829        self.update_mask = std::option::Option::Some(v.into());
1830        self
1831    }
1832
1833    /// Sets or clears the value of [update_mask][crate::model::UpdateApplicationRequest::update_mask].
1834    ///
1835    /// # Example
1836    /// ```ignore,no_run
1837    /// # use google_cloud_appengine_v1::model::UpdateApplicationRequest;
1838    /// use wkt::FieldMask;
1839    /// let x = UpdateApplicationRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1840    /// let x = UpdateApplicationRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1841    /// ```
1842    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1843    where
1844        T: std::convert::Into<wkt::FieldMask>,
1845    {
1846        self.update_mask = v.map(|x| x.into());
1847        self
1848    }
1849}
1850
1851impl wkt::message::Message for UpdateApplicationRequest {
1852    fn typename() -> &'static str {
1853        "type.googleapis.com/google.appengine.v1.UpdateApplicationRequest"
1854    }
1855}
1856
1857/// Request message for 'Applications.RepairApplication'.
1858#[derive(Clone, Default, PartialEq)]
1859#[non_exhaustive]
1860pub struct RepairApplicationRequest {
1861    /// Name of the application to repair. Example: `apps/myapp`
1862    pub name: std::string::String,
1863
1864    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1865}
1866
1867impl RepairApplicationRequest {
1868    pub fn new() -> Self {
1869        std::default::Default::default()
1870    }
1871
1872    /// Sets the value of [name][crate::model::RepairApplicationRequest::name].
1873    ///
1874    /// # Example
1875    /// ```ignore,no_run
1876    /// # use google_cloud_appengine_v1::model::RepairApplicationRequest;
1877    /// let x = RepairApplicationRequest::new().set_name("example");
1878    /// ```
1879    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1880        self.name = v.into();
1881        self
1882    }
1883}
1884
1885impl wkt::message::Message for RepairApplicationRequest {
1886    fn typename() -> &'static str {
1887        "type.googleapis.com/google.appengine.v1.RepairApplicationRequest"
1888    }
1889}
1890
1891/// Request message for `Services.ListServices`.
1892#[derive(Clone, Default, PartialEq)]
1893#[non_exhaustive]
1894pub struct ListServicesRequest {
1895    /// Name of the parent Application resource. Example: `apps/myapp`.
1896    pub parent: std::string::String,
1897
1898    /// Maximum results to return per page.
1899    pub page_size: i32,
1900
1901    /// Continuation token for fetching the next page of results.
1902    pub page_token: std::string::String,
1903
1904    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1905}
1906
1907impl ListServicesRequest {
1908    pub fn new() -> Self {
1909        std::default::Default::default()
1910    }
1911
1912    /// Sets the value of [parent][crate::model::ListServicesRequest::parent].
1913    ///
1914    /// # Example
1915    /// ```ignore,no_run
1916    /// # use google_cloud_appengine_v1::model::ListServicesRequest;
1917    /// let x = ListServicesRequest::new().set_parent("example");
1918    /// ```
1919    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1920        self.parent = v.into();
1921        self
1922    }
1923
1924    /// Sets the value of [page_size][crate::model::ListServicesRequest::page_size].
1925    ///
1926    /// # Example
1927    /// ```ignore,no_run
1928    /// # use google_cloud_appengine_v1::model::ListServicesRequest;
1929    /// let x = ListServicesRequest::new().set_page_size(42);
1930    /// ```
1931    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1932        self.page_size = v.into();
1933        self
1934    }
1935
1936    /// Sets the value of [page_token][crate::model::ListServicesRequest::page_token].
1937    ///
1938    /// # Example
1939    /// ```ignore,no_run
1940    /// # use google_cloud_appengine_v1::model::ListServicesRequest;
1941    /// let x = ListServicesRequest::new().set_page_token("example");
1942    /// ```
1943    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1944        self.page_token = v.into();
1945        self
1946    }
1947}
1948
1949impl wkt::message::Message for ListServicesRequest {
1950    fn typename() -> &'static str {
1951        "type.googleapis.com/google.appengine.v1.ListServicesRequest"
1952    }
1953}
1954
1955/// Response message for `Services.ListServices`.
1956#[derive(Clone, Default, PartialEq)]
1957#[non_exhaustive]
1958pub struct ListServicesResponse {
1959    /// The services belonging to the requested application.
1960    pub services: std::vec::Vec<crate::model::Service>,
1961
1962    /// Continuation token for fetching the next page of results.
1963    pub next_page_token: std::string::String,
1964
1965    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1966}
1967
1968impl ListServicesResponse {
1969    pub fn new() -> Self {
1970        std::default::Default::default()
1971    }
1972
1973    /// Sets the value of [services][crate::model::ListServicesResponse::services].
1974    ///
1975    /// # Example
1976    /// ```ignore,no_run
1977    /// # use google_cloud_appengine_v1::model::ListServicesResponse;
1978    /// use google_cloud_appengine_v1::model::Service;
1979    /// let x = ListServicesResponse::new()
1980    ///     .set_services([
1981    ///         Service::default()/* use setters */,
1982    ///         Service::default()/* use (different) setters */,
1983    ///     ]);
1984    /// ```
1985    pub fn set_services<T, V>(mut self, v: T) -> Self
1986    where
1987        T: std::iter::IntoIterator<Item = V>,
1988        V: std::convert::Into<crate::model::Service>,
1989    {
1990        use std::iter::Iterator;
1991        self.services = v.into_iter().map(|i| i.into()).collect();
1992        self
1993    }
1994
1995    /// Sets the value of [next_page_token][crate::model::ListServicesResponse::next_page_token].
1996    ///
1997    /// # Example
1998    /// ```ignore,no_run
1999    /// # use google_cloud_appengine_v1::model::ListServicesResponse;
2000    /// let x = ListServicesResponse::new().set_next_page_token("example");
2001    /// ```
2002    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2003        self.next_page_token = v.into();
2004        self
2005    }
2006}
2007
2008impl wkt::message::Message for ListServicesResponse {
2009    fn typename() -> &'static str {
2010        "type.googleapis.com/google.appengine.v1.ListServicesResponse"
2011    }
2012}
2013
2014#[doc(hidden)]
2015impl google_cloud_gax::paginator::internal::PageableResponse for ListServicesResponse {
2016    type PageItem = crate::model::Service;
2017
2018    fn items(self) -> std::vec::Vec<Self::PageItem> {
2019        self.services
2020    }
2021
2022    fn next_page_token(&self) -> std::string::String {
2023        use std::clone::Clone;
2024        self.next_page_token.clone()
2025    }
2026}
2027
2028/// Request message for `Services.GetService`.
2029#[derive(Clone, Default, PartialEq)]
2030#[non_exhaustive]
2031pub struct GetServiceRequest {
2032    /// Name of the resource requested. Example: `apps/myapp/services/default`.
2033    pub name: std::string::String,
2034
2035    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2036}
2037
2038impl GetServiceRequest {
2039    pub fn new() -> Self {
2040        std::default::Default::default()
2041    }
2042
2043    /// Sets the value of [name][crate::model::GetServiceRequest::name].
2044    ///
2045    /// # Example
2046    /// ```ignore,no_run
2047    /// # use google_cloud_appengine_v1::model::GetServiceRequest;
2048    /// let x = GetServiceRequest::new().set_name("example");
2049    /// ```
2050    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2051        self.name = v.into();
2052        self
2053    }
2054}
2055
2056impl wkt::message::Message for GetServiceRequest {
2057    fn typename() -> &'static str {
2058        "type.googleapis.com/google.appengine.v1.GetServiceRequest"
2059    }
2060}
2061
2062/// Request message for `Services.UpdateService`.
2063#[derive(Clone, Default, PartialEq)]
2064#[non_exhaustive]
2065pub struct UpdateServiceRequest {
2066    /// Name of the resource to update. Example: `apps/myapp/services/default`.
2067    pub name: std::string::String,
2068
2069    /// A Service resource containing the updated service. Only fields set in the
2070    /// field mask will be updated.
2071    pub service: std::option::Option<crate::model::Service>,
2072
2073    /// Required. Standard field mask for the set of fields to be updated.
2074    pub update_mask: std::option::Option<wkt::FieldMask>,
2075
2076    /// Set to `true` to gradually shift traffic to one or more versions that you
2077    /// specify. By default, traffic is shifted immediately.
2078    /// For gradual traffic migration, the target versions
2079    /// must be located within instances that are configured for both
2080    /// [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
2081    /// and
2082    /// [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
2083    /// You must specify the
2084    /// [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
2085    /// field in the Service resource. Gradual traffic migration is not
2086    /// supported in the App Engine flexible environment. For examples, see
2087    /// [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
2088    pub migrate_traffic: bool,
2089
2090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2091}
2092
2093impl UpdateServiceRequest {
2094    pub fn new() -> Self {
2095        std::default::Default::default()
2096    }
2097
2098    /// Sets the value of [name][crate::model::UpdateServiceRequest::name].
2099    ///
2100    /// # Example
2101    /// ```ignore,no_run
2102    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2103    /// let x = UpdateServiceRequest::new().set_name("example");
2104    /// ```
2105    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2106        self.name = v.into();
2107        self
2108    }
2109
2110    /// Sets the value of [service][crate::model::UpdateServiceRequest::service].
2111    ///
2112    /// # Example
2113    /// ```ignore,no_run
2114    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2115    /// use google_cloud_appengine_v1::model::Service;
2116    /// let x = UpdateServiceRequest::new().set_service(Service::default()/* use setters */);
2117    /// ```
2118    pub fn set_service<T>(mut self, v: T) -> Self
2119    where
2120        T: std::convert::Into<crate::model::Service>,
2121    {
2122        self.service = std::option::Option::Some(v.into());
2123        self
2124    }
2125
2126    /// Sets or clears the value of [service][crate::model::UpdateServiceRequest::service].
2127    ///
2128    /// # Example
2129    /// ```ignore,no_run
2130    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2131    /// use google_cloud_appengine_v1::model::Service;
2132    /// let x = UpdateServiceRequest::new().set_or_clear_service(Some(Service::default()/* use setters */));
2133    /// let x = UpdateServiceRequest::new().set_or_clear_service(None::<Service>);
2134    /// ```
2135    pub fn set_or_clear_service<T>(mut self, v: std::option::Option<T>) -> Self
2136    where
2137        T: std::convert::Into<crate::model::Service>,
2138    {
2139        self.service = v.map(|x| x.into());
2140        self
2141    }
2142
2143    /// Sets the value of [update_mask][crate::model::UpdateServiceRequest::update_mask].
2144    ///
2145    /// # Example
2146    /// ```ignore,no_run
2147    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2148    /// use wkt::FieldMask;
2149    /// let x = UpdateServiceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2150    /// ```
2151    pub fn set_update_mask<T>(mut self, v: T) -> Self
2152    where
2153        T: std::convert::Into<wkt::FieldMask>,
2154    {
2155        self.update_mask = std::option::Option::Some(v.into());
2156        self
2157    }
2158
2159    /// Sets or clears the value of [update_mask][crate::model::UpdateServiceRequest::update_mask].
2160    ///
2161    /// # Example
2162    /// ```ignore,no_run
2163    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2164    /// use wkt::FieldMask;
2165    /// let x = UpdateServiceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2166    /// let x = UpdateServiceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2167    /// ```
2168    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2169    where
2170        T: std::convert::Into<wkt::FieldMask>,
2171    {
2172        self.update_mask = v.map(|x| x.into());
2173        self
2174    }
2175
2176    /// Sets the value of [migrate_traffic][crate::model::UpdateServiceRequest::migrate_traffic].
2177    ///
2178    /// # Example
2179    /// ```ignore,no_run
2180    /// # use google_cloud_appengine_v1::model::UpdateServiceRequest;
2181    /// let x = UpdateServiceRequest::new().set_migrate_traffic(true);
2182    /// ```
2183    pub fn set_migrate_traffic<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2184        self.migrate_traffic = v.into();
2185        self
2186    }
2187}
2188
2189impl wkt::message::Message for UpdateServiceRequest {
2190    fn typename() -> &'static str {
2191        "type.googleapis.com/google.appengine.v1.UpdateServiceRequest"
2192    }
2193}
2194
2195/// Request message for `Services.DeleteService`.
2196#[derive(Clone, Default, PartialEq)]
2197#[non_exhaustive]
2198pub struct DeleteServiceRequest {
2199    /// Name of the resource requested. Example: `apps/myapp/services/default`.
2200    pub name: std::string::String,
2201
2202    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2203}
2204
2205impl DeleteServiceRequest {
2206    pub fn new() -> Self {
2207        std::default::Default::default()
2208    }
2209
2210    /// Sets the value of [name][crate::model::DeleteServiceRequest::name].
2211    ///
2212    /// # Example
2213    /// ```ignore,no_run
2214    /// # use google_cloud_appengine_v1::model::DeleteServiceRequest;
2215    /// let x = DeleteServiceRequest::new().set_name("example");
2216    /// ```
2217    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2218        self.name = v.into();
2219        self
2220    }
2221}
2222
2223impl wkt::message::Message for DeleteServiceRequest {
2224    fn typename() -> &'static str {
2225        "type.googleapis.com/google.appengine.v1.DeleteServiceRequest"
2226    }
2227}
2228
2229/// Request message for `Versions.ListVersions`.
2230#[derive(Clone, Default, PartialEq)]
2231#[non_exhaustive]
2232pub struct ListVersionsRequest {
2233    /// Name of the parent Service resource. Example:
2234    /// `apps/myapp/services/default`.
2235    pub parent: std::string::String,
2236
2237    /// Controls the set of fields returned in the `List` response.
2238    pub view: crate::model::VersionView,
2239
2240    /// Maximum results to return per page.
2241    pub page_size: i32,
2242
2243    /// Continuation token for fetching the next page of results.
2244    pub page_token: std::string::String,
2245
2246    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2247}
2248
2249impl ListVersionsRequest {
2250    pub fn new() -> Self {
2251        std::default::Default::default()
2252    }
2253
2254    /// Sets the value of [parent][crate::model::ListVersionsRequest::parent].
2255    ///
2256    /// # Example
2257    /// ```ignore,no_run
2258    /// # use google_cloud_appengine_v1::model::ListVersionsRequest;
2259    /// let x = ListVersionsRequest::new().set_parent("example");
2260    /// ```
2261    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2262        self.parent = v.into();
2263        self
2264    }
2265
2266    /// Sets the value of [view][crate::model::ListVersionsRequest::view].
2267    ///
2268    /// # Example
2269    /// ```ignore,no_run
2270    /// # use google_cloud_appengine_v1::model::ListVersionsRequest;
2271    /// use google_cloud_appengine_v1::model::VersionView;
2272    /// let x0 = ListVersionsRequest::new().set_view(VersionView::Full);
2273    /// ```
2274    pub fn set_view<T: std::convert::Into<crate::model::VersionView>>(mut self, v: T) -> Self {
2275        self.view = v.into();
2276        self
2277    }
2278
2279    /// Sets the value of [page_size][crate::model::ListVersionsRequest::page_size].
2280    ///
2281    /// # Example
2282    /// ```ignore,no_run
2283    /// # use google_cloud_appengine_v1::model::ListVersionsRequest;
2284    /// let x = ListVersionsRequest::new().set_page_size(42);
2285    /// ```
2286    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2287        self.page_size = v.into();
2288        self
2289    }
2290
2291    /// Sets the value of [page_token][crate::model::ListVersionsRequest::page_token].
2292    ///
2293    /// # Example
2294    /// ```ignore,no_run
2295    /// # use google_cloud_appengine_v1::model::ListVersionsRequest;
2296    /// let x = ListVersionsRequest::new().set_page_token("example");
2297    /// ```
2298    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2299        self.page_token = v.into();
2300        self
2301    }
2302}
2303
2304impl wkt::message::Message for ListVersionsRequest {
2305    fn typename() -> &'static str {
2306        "type.googleapis.com/google.appengine.v1.ListVersionsRequest"
2307    }
2308}
2309
2310/// Response message for `Versions.ListVersions`.
2311#[derive(Clone, Default, PartialEq)]
2312#[non_exhaustive]
2313pub struct ListVersionsResponse {
2314    /// The versions belonging to the requested service.
2315    pub versions: std::vec::Vec<crate::model::Version>,
2316
2317    /// Continuation token for fetching the next page of results.
2318    pub next_page_token: std::string::String,
2319
2320    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2321}
2322
2323impl ListVersionsResponse {
2324    pub fn new() -> Self {
2325        std::default::Default::default()
2326    }
2327
2328    /// Sets the value of [versions][crate::model::ListVersionsResponse::versions].
2329    ///
2330    /// # Example
2331    /// ```ignore,no_run
2332    /// # use google_cloud_appengine_v1::model::ListVersionsResponse;
2333    /// use google_cloud_appengine_v1::model::Version;
2334    /// let x = ListVersionsResponse::new()
2335    ///     .set_versions([
2336    ///         Version::default()/* use setters */,
2337    ///         Version::default()/* use (different) setters */,
2338    ///     ]);
2339    /// ```
2340    pub fn set_versions<T, V>(mut self, v: T) -> Self
2341    where
2342        T: std::iter::IntoIterator<Item = V>,
2343        V: std::convert::Into<crate::model::Version>,
2344    {
2345        use std::iter::Iterator;
2346        self.versions = v.into_iter().map(|i| i.into()).collect();
2347        self
2348    }
2349
2350    /// Sets the value of [next_page_token][crate::model::ListVersionsResponse::next_page_token].
2351    ///
2352    /// # Example
2353    /// ```ignore,no_run
2354    /// # use google_cloud_appengine_v1::model::ListVersionsResponse;
2355    /// let x = ListVersionsResponse::new().set_next_page_token("example");
2356    /// ```
2357    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2358        self.next_page_token = v.into();
2359        self
2360    }
2361}
2362
2363impl wkt::message::Message for ListVersionsResponse {
2364    fn typename() -> &'static str {
2365        "type.googleapis.com/google.appengine.v1.ListVersionsResponse"
2366    }
2367}
2368
2369#[doc(hidden)]
2370impl google_cloud_gax::paginator::internal::PageableResponse for ListVersionsResponse {
2371    type PageItem = crate::model::Version;
2372
2373    fn items(self) -> std::vec::Vec<Self::PageItem> {
2374        self.versions
2375    }
2376
2377    fn next_page_token(&self) -> std::string::String {
2378        use std::clone::Clone;
2379        self.next_page_token.clone()
2380    }
2381}
2382
2383/// Request message for `Versions.GetVersion`.
2384#[derive(Clone, Default, PartialEq)]
2385#[non_exhaustive]
2386pub struct GetVersionRequest {
2387    /// Name of the resource requested. Example:
2388    /// `apps/myapp/services/default/versions/v1`.
2389    pub name: std::string::String,
2390
2391    /// Controls the set of fields returned in the `Get` response.
2392    pub view: crate::model::VersionView,
2393
2394    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2395}
2396
2397impl GetVersionRequest {
2398    pub fn new() -> Self {
2399        std::default::Default::default()
2400    }
2401
2402    /// Sets the value of [name][crate::model::GetVersionRequest::name].
2403    ///
2404    /// # Example
2405    /// ```ignore,no_run
2406    /// # use google_cloud_appengine_v1::model::GetVersionRequest;
2407    /// let x = GetVersionRequest::new().set_name("example");
2408    /// ```
2409    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2410        self.name = v.into();
2411        self
2412    }
2413
2414    /// Sets the value of [view][crate::model::GetVersionRequest::view].
2415    ///
2416    /// # Example
2417    /// ```ignore,no_run
2418    /// # use google_cloud_appengine_v1::model::GetVersionRequest;
2419    /// use google_cloud_appengine_v1::model::VersionView;
2420    /// let x0 = GetVersionRequest::new().set_view(VersionView::Full);
2421    /// ```
2422    pub fn set_view<T: std::convert::Into<crate::model::VersionView>>(mut self, v: T) -> Self {
2423        self.view = v.into();
2424        self
2425    }
2426}
2427
2428impl wkt::message::Message for GetVersionRequest {
2429    fn typename() -> &'static str {
2430        "type.googleapis.com/google.appengine.v1.GetVersionRequest"
2431    }
2432}
2433
2434/// Request message for `Versions.CreateVersion`.
2435#[derive(Clone, Default, PartialEq)]
2436#[non_exhaustive]
2437pub struct CreateVersionRequest {
2438    /// Name of the parent resource to create this version under. Example:
2439    /// `apps/myapp/services/default`.
2440    pub parent: std::string::String,
2441
2442    /// Application deployment configuration.
2443    pub version: std::option::Option<crate::model::Version>,
2444
2445    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2446}
2447
2448impl CreateVersionRequest {
2449    pub fn new() -> Self {
2450        std::default::Default::default()
2451    }
2452
2453    /// Sets the value of [parent][crate::model::CreateVersionRequest::parent].
2454    ///
2455    /// # Example
2456    /// ```ignore,no_run
2457    /// # use google_cloud_appengine_v1::model::CreateVersionRequest;
2458    /// let x = CreateVersionRequest::new().set_parent("example");
2459    /// ```
2460    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2461        self.parent = v.into();
2462        self
2463    }
2464
2465    /// Sets the value of [version][crate::model::CreateVersionRequest::version].
2466    ///
2467    /// # Example
2468    /// ```ignore,no_run
2469    /// # use google_cloud_appengine_v1::model::CreateVersionRequest;
2470    /// use google_cloud_appengine_v1::model::Version;
2471    /// let x = CreateVersionRequest::new().set_version(Version::default()/* use setters */);
2472    /// ```
2473    pub fn set_version<T>(mut self, v: T) -> Self
2474    where
2475        T: std::convert::Into<crate::model::Version>,
2476    {
2477        self.version = std::option::Option::Some(v.into());
2478        self
2479    }
2480
2481    /// Sets or clears the value of [version][crate::model::CreateVersionRequest::version].
2482    ///
2483    /// # Example
2484    /// ```ignore,no_run
2485    /// # use google_cloud_appengine_v1::model::CreateVersionRequest;
2486    /// use google_cloud_appengine_v1::model::Version;
2487    /// let x = CreateVersionRequest::new().set_or_clear_version(Some(Version::default()/* use setters */));
2488    /// let x = CreateVersionRequest::new().set_or_clear_version(None::<Version>);
2489    /// ```
2490    pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
2491    where
2492        T: std::convert::Into<crate::model::Version>,
2493    {
2494        self.version = v.map(|x| x.into());
2495        self
2496    }
2497}
2498
2499impl wkt::message::Message for CreateVersionRequest {
2500    fn typename() -> &'static str {
2501        "type.googleapis.com/google.appengine.v1.CreateVersionRequest"
2502    }
2503}
2504
2505/// Request message for `Versions.UpdateVersion`.
2506#[derive(Clone, Default, PartialEq)]
2507#[non_exhaustive]
2508pub struct UpdateVersionRequest {
2509    /// Name of the resource to update. Example:
2510    /// `apps/myapp/services/default/versions/1`.
2511    pub name: std::string::String,
2512
2513    /// A Version containing the updated resource. Only fields set in the field
2514    /// mask will be updated.
2515    pub version: std::option::Option<crate::model::Version>,
2516
2517    /// Standard field mask for the set of fields to be updated.
2518    pub update_mask: std::option::Option<wkt::FieldMask>,
2519
2520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2521}
2522
2523impl UpdateVersionRequest {
2524    pub fn new() -> Self {
2525        std::default::Default::default()
2526    }
2527
2528    /// Sets the value of [name][crate::model::UpdateVersionRequest::name].
2529    ///
2530    /// # Example
2531    /// ```ignore,no_run
2532    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2533    /// let x = UpdateVersionRequest::new().set_name("example");
2534    /// ```
2535    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2536        self.name = v.into();
2537        self
2538    }
2539
2540    /// Sets the value of [version][crate::model::UpdateVersionRequest::version].
2541    ///
2542    /// # Example
2543    /// ```ignore,no_run
2544    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2545    /// use google_cloud_appengine_v1::model::Version;
2546    /// let x = UpdateVersionRequest::new().set_version(Version::default()/* use setters */);
2547    /// ```
2548    pub fn set_version<T>(mut self, v: T) -> Self
2549    where
2550        T: std::convert::Into<crate::model::Version>,
2551    {
2552        self.version = std::option::Option::Some(v.into());
2553        self
2554    }
2555
2556    /// Sets or clears the value of [version][crate::model::UpdateVersionRequest::version].
2557    ///
2558    /// # Example
2559    /// ```ignore,no_run
2560    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2561    /// use google_cloud_appengine_v1::model::Version;
2562    /// let x = UpdateVersionRequest::new().set_or_clear_version(Some(Version::default()/* use setters */));
2563    /// let x = UpdateVersionRequest::new().set_or_clear_version(None::<Version>);
2564    /// ```
2565    pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
2566    where
2567        T: std::convert::Into<crate::model::Version>,
2568    {
2569        self.version = v.map(|x| x.into());
2570        self
2571    }
2572
2573    /// Sets the value of [update_mask][crate::model::UpdateVersionRequest::update_mask].
2574    ///
2575    /// # Example
2576    /// ```ignore,no_run
2577    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2578    /// use wkt::FieldMask;
2579    /// let x = UpdateVersionRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2580    /// ```
2581    pub fn set_update_mask<T>(mut self, v: T) -> Self
2582    where
2583        T: std::convert::Into<wkt::FieldMask>,
2584    {
2585        self.update_mask = std::option::Option::Some(v.into());
2586        self
2587    }
2588
2589    /// Sets or clears the value of [update_mask][crate::model::UpdateVersionRequest::update_mask].
2590    ///
2591    /// # Example
2592    /// ```ignore,no_run
2593    /// # use google_cloud_appengine_v1::model::UpdateVersionRequest;
2594    /// use wkt::FieldMask;
2595    /// let x = UpdateVersionRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2596    /// let x = UpdateVersionRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2597    /// ```
2598    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2599    where
2600        T: std::convert::Into<wkt::FieldMask>,
2601    {
2602        self.update_mask = v.map(|x| x.into());
2603        self
2604    }
2605}
2606
2607impl wkt::message::Message for UpdateVersionRequest {
2608    fn typename() -> &'static str {
2609        "type.googleapis.com/google.appengine.v1.UpdateVersionRequest"
2610    }
2611}
2612
2613/// Request message for `Versions.DeleteVersion`.
2614#[derive(Clone, Default, PartialEq)]
2615#[non_exhaustive]
2616pub struct DeleteVersionRequest {
2617    /// Name of the resource requested. Example:
2618    /// `apps/myapp/services/default/versions/v1`.
2619    pub name: std::string::String,
2620
2621    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2622}
2623
2624impl DeleteVersionRequest {
2625    pub fn new() -> Self {
2626        std::default::Default::default()
2627    }
2628
2629    /// Sets the value of [name][crate::model::DeleteVersionRequest::name].
2630    ///
2631    /// # Example
2632    /// ```ignore,no_run
2633    /// # use google_cloud_appengine_v1::model::DeleteVersionRequest;
2634    /// let x = DeleteVersionRequest::new().set_name("example");
2635    /// ```
2636    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2637        self.name = v.into();
2638        self
2639    }
2640}
2641
2642impl wkt::message::Message for DeleteVersionRequest {
2643    fn typename() -> &'static str {
2644        "type.googleapis.com/google.appengine.v1.DeleteVersionRequest"
2645    }
2646}
2647
2648/// Request message for `Instances.ListInstances`.
2649#[derive(Clone, Default, PartialEq)]
2650#[non_exhaustive]
2651pub struct ListInstancesRequest {
2652    /// Name of the parent Version resource. Example:
2653    /// `apps/myapp/services/default/versions/v1`.
2654    pub parent: std::string::String,
2655
2656    /// Maximum results to return per page.
2657    pub page_size: i32,
2658
2659    /// Continuation token for fetching the next page of results.
2660    pub page_token: std::string::String,
2661
2662    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2663}
2664
2665impl ListInstancesRequest {
2666    pub fn new() -> Self {
2667        std::default::Default::default()
2668    }
2669
2670    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
2671    ///
2672    /// # Example
2673    /// ```ignore,no_run
2674    /// # use google_cloud_appengine_v1::model::ListInstancesRequest;
2675    /// let x = ListInstancesRequest::new().set_parent("example");
2676    /// ```
2677    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2678        self.parent = v.into();
2679        self
2680    }
2681
2682    /// Sets the value of [page_size][crate::model::ListInstancesRequest::page_size].
2683    ///
2684    /// # Example
2685    /// ```ignore,no_run
2686    /// # use google_cloud_appengine_v1::model::ListInstancesRequest;
2687    /// let x = ListInstancesRequest::new().set_page_size(42);
2688    /// ```
2689    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2690        self.page_size = v.into();
2691        self
2692    }
2693
2694    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
2695    ///
2696    /// # Example
2697    /// ```ignore,no_run
2698    /// # use google_cloud_appengine_v1::model::ListInstancesRequest;
2699    /// let x = ListInstancesRequest::new().set_page_token("example");
2700    /// ```
2701    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2702        self.page_token = v.into();
2703        self
2704    }
2705}
2706
2707impl wkt::message::Message for ListInstancesRequest {
2708    fn typename() -> &'static str {
2709        "type.googleapis.com/google.appengine.v1.ListInstancesRequest"
2710    }
2711}
2712
2713/// Response message for `Instances.ListInstances`.
2714#[derive(Clone, Default, PartialEq)]
2715#[non_exhaustive]
2716pub struct ListInstancesResponse {
2717    /// The instances belonging to the requested version.
2718    pub instances: std::vec::Vec<crate::model::Instance>,
2719
2720    /// Continuation token for fetching the next page of results.
2721    pub next_page_token: std::string::String,
2722
2723    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2724}
2725
2726impl ListInstancesResponse {
2727    pub fn new() -> Self {
2728        std::default::Default::default()
2729    }
2730
2731    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
2732    ///
2733    /// # Example
2734    /// ```ignore,no_run
2735    /// # use google_cloud_appengine_v1::model::ListInstancesResponse;
2736    /// use google_cloud_appengine_v1::model::Instance;
2737    /// let x = ListInstancesResponse::new()
2738    ///     .set_instances([
2739    ///         Instance::default()/* use setters */,
2740    ///         Instance::default()/* use (different) setters */,
2741    ///     ]);
2742    /// ```
2743    pub fn set_instances<T, V>(mut self, v: T) -> Self
2744    where
2745        T: std::iter::IntoIterator<Item = V>,
2746        V: std::convert::Into<crate::model::Instance>,
2747    {
2748        use std::iter::Iterator;
2749        self.instances = v.into_iter().map(|i| i.into()).collect();
2750        self
2751    }
2752
2753    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
2754    ///
2755    /// # Example
2756    /// ```ignore,no_run
2757    /// # use google_cloud_appengine_v1::model::ListInstancesResponse;
2758    /// let x = ListInstancesResponse::new().set_next_page_token("example");
2759    /// ```
2760    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2761        self.next_page_token = v.into();
2762        self
2763    }
2764}
2765
2766impl wkt::message::Message for ListInstancesResponse {
2767    fn typename() -> &'static str {
2768        "type.googleapis.com/google.appengine.v1.ListInstancesResponse"
2769    }
2770}
2771
2772#[doc(hidden)]
2773impl google_cloud_gax::paginator::internal::PageableResponse for ListInstancesResponse {
2774    type PageItem = crate::model::Instance;
2775
2776    fn items(self) -> std::vec::Vec<Self::PageItem> {
2777        self.instances
2778    }
2779
2780    fn next_page_token(&self) -> std::string::String {
2781        use std::clone::Clone;
2782        self.next_page_token.clone()
2783    }
2784}
2785
2786/// Request message for `Instances.GetInstance`.
2787#[derive(Clone, Default, PartialEq)]
2788#[non_exhaustive]
2789pub struct GetInstanceRequest {
2790    /// Name of the resource requested. Example:
2791    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2792    pub name: std::string::String,
2793
2794    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2795}
2796
2797impl GetInstanceRequest {
2798    pub fn new() -> Self {
2799        std::default::Default::default()
2800    }
2801
2802    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
2803    ///
2804    /// # Example
2805    /// ```ignore,no_run
2806    /// # use google_cloud_appengine_v1::model::GetInstanceRequest;
2807    /// let x = GetInstanceRequest::new().set_name("example");
2808    /// ```
2809    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2810        self.name = v.into();
2811        self
2812    }
2813}
2814
2815impl wkt::message::Message for GetInstanceRequest {
2816    fn typename() -> &'static str {
2817        "type.googleapis.com/google.appengine.v1.GetInstanceRequest"
2818    }
2819}
2820
2821/// Request message for `Instances.DeleteInstance`.
2822#[derive(Clone, Default, PartialEq)]
2823#[non_exhaustive]
2824pub struct DeleteInstanceRequest {
2825    /// Name of the resource requested. Example:
2826    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2827    pub name: std::string::String,
2828
2829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2830}
2831
2832impl DeleteInstanceRequest {
2833    pub fn new() -> Self {
2834        std::default::Default::default()
2835    }
2836
2837    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
2838    ///
2839    /// # Example
2840    /// ```ignore,no_run
2841    /// # use google_cloud_appengine_v1::model::DeleteInstanceRequest;
2842    /// let x = DeleteInstanceRequest::new().set_name("example");
2843    /// ```
2844    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2845        self.name = v.into();
2846        self
2847    }
2848}
2849
2850impl wkt::message::Message for DeleteInstanceRequest {
2851    fn typename() -> &'static str {
2852        "type.googleapis.com/google.appengine.v1.DeleteInstanceRequest"
2853    }
2854}
2855
2856/// Request message for `Instances.DebugInstance`.
2857#[derive(Clone, Default, PartialEq)]
2858#[non_exhaustive]
2859pub struct DebugInstanceRequest {
2860    /// Name of the resource requested. Example:
2861    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2862    pub name: std::string::String,
2863
2864    /// Public SSH key to add to the instance. Examples:
2865    ///
2866    /// * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
2867    /// * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
2868    ///
2869    /// For more information, see
2870    /// [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
2871    pub ssh_key: std::string::String,
2872
2873    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2874}
2875
2876impl DebugInstanceRequest {
2877    pub fn new() -> Self {
2878        std::default::Default::default()
2879    }
2880
2881    /// Sets the value of [name][crate::model::DebugInstanceRequest::name].
2882    ///
2883    /// # Example
2884    /// ```ignore,no_run
2885    /// # use google_cloud_appengine_v1::model::DebugInstanceRequest;
2886    /// let x = DebugInstanceRequest::new().set_name("example");
2887    /// ```
2888    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2889        self.name = v.into();
2890        self
2891    }
2892
2893    /// Sets the value of [ssh_key][crate::model::DebugInstanceRequest::ssh_key].
2894    ///
2895    /// # Example
2896    /// ```ignore,no_run
2897    /// # use google_cloud_appengine_v1::model::DebugInstanceRequest;
2898    /// let x = DebugInstanceRequest::new().set_ssh_key("example");
2899    /// ```
2900    pub fn set_ssh_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2901        self.ssh_key = v.into();
2902        self
2903    }
2904}
2905
2906impl wkt::message::Message for DebugInstanceRequest {
2907    fn typename() -> &'static str {
2908        "type.googleapis.com/google.appengine.v1.DebugInstanceRequest"
2909    }
2910}
2911
2912/// Request message for `Firewall.ListIngressRules`.
2913#[derive(Clone, Default, PartialEq)]
2914#[non_exhaustive]
2915pub struct ListIngressRulesRequest {
2916    /// Name of the Firewall collection to retrieve.
2917    /// Example: `apps/myapp/firewall/ingressRules`.
2918    pub parent: std::string::String,
2919
2920    /// Maximum results to return per page.
2921    pub page_size: i32,
2922
2923    /// Continuation token for fetching the next page of results.
2924    pub page_token: std::string::String,
2925
2926    /// A valid IP Address. If set, only rules matching this address will be
2927    /// returned. The first returned rule will be the rule that fires on requests
2928    /// from this IP.
2929    pub matching_address: std::string::String,
2930
2931    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2932}
2933
2934impl ListIngressRulesRequest {
2935    pub fn new() -> Self {
2936        std::default::Default::default()
2937    }
2938
2939    /// Sets the value of [parent][crate::model::ListIngressRulesRequest::parent].
2940    ///
2941    /// # Example
2942    /// ```ignore,no_run
2943    /// # use google_cloud_appengine_v1::model::ListIngressRulesRequest;
2944    /// let x = ListIngressRulesRequest::new().set_parent("example");
2945    /// ```
2946    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2947        self.parent = v.into();
2948        self
2949    }
2950
2951    /// Sets the value of [page_size][crate::model::ListIngressRulesRequest::page_size].
2952    ///
2953    /// # Example
2954    /// ```ignore,no_run
2955    /// # use google_cloud_appengine_v1::model::ListIngressRulesRequest;
2956    /// let x = ListIngressRulesRequest::new().set_page_size(42);
2957    /// ```
2958    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2959        self.page_size = v.into();
2960        self
2961    }
2962
2963    /// Sets the value of [page_token][crate::model::ListIngressRulesRequest::page_token].
2964    ///
2965    /// # Example
2966    /// ```ignore,no_run
2967    /// # use google_cloud_appengine_v1::model::ListIngressRulesRequest;
2968    /// let x = ListIngressRulesRequest::new().set_page_token("example");
2969    /// ```
2970    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2971        self.page_token = v.into();
2972        self
2973    }
2974
2975    /// Sets the value of [matching_address][crate::model::ListIngressRulesRequest::matching_address].
2976    ///
2977    /// # Example
2978    /// ```ignore,no_run
2979    /// # use google_cloud_appengine_v1::model::ListIngressRulesRequest;
2980    /// let x = ListIngressRulesRequest::new().set_matching_address("example");
2981    /// ```
2982    pub fn set_matching_address<T: std::convert::Into<std::string::String>>(
2983        mut self,
2984        v: T,
2985    ) -> Self {
2986        self.matching_address = v.into();
2987        self
2988    }
2989}
2990
2991impl wkt::message::Message for ListIngressRulesRequest {
2992    fn typename() -> &'static str {
2993        "type.googleapis.com/google.appengine.v1.ListIngressRulesRequest"
2994    }
2995}
2996
2997/// Response message for `Firewall.ListIngressRules`.
2998#[derive(Clone, Default, PartialEq)]
2999#[non_exhaustive]
3000pub struct ListIngressRulesResponse {
3001    /// The ingress FirewallRules for this application.
3002    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
3003
3004    /// Continuation token for fetching the next page of results.
3005    pub next_page_token: std::string::String,
3006
3007    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3008}
3009
3010impl ListIngressRulesResponse {
3011    pub fn new() -> Self {
3012        std::default::Default::default()
3013    }
3014
3015    /// Sets the value of [ingress_rules][crate::model::ListIngressRulesResponse::ingress_rules].
3016    ///
3017    /// # Example
3018    /// ```ignore,no_run
3019    /// # use google_cloud_appengine_v1::model::ListIngressRulesResponse;
3020    /// use google_cloud_appengine_v1::model::FirewallRule;
3021    /// let x = ListIngressRulesResponse::new()
3022    ///     .set_ingress_rules([
3023    ///         FirewallRule::default()/* use setters */,
3024    ///         FirewallRule::default()/* use (different) setters */,
3025    ///     ]);
3026    /// ```
3027    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
3028    where
3029        T: std::iter::IntoIterator<Item = V>,
3030        V: std::convert::Into<crate::model::FirewallRule>,
3031    {
3032        use std::iter::Iterator;
3033        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
3034        self
3035    }
3036
3037    /// Sets the value of [next_page_token][crate::model::ListIngressRulesResponse::next_page_token].
3038    ///
3039    /// # Example
3040    /// ```ignore,no_run
3041    /// # use google_cloud_appengine_v1::model::ListIngressRulesResponse;
3042    /// let x = ListIngressRulesResponse::new().set_next_page_token("example");
3043    /// ```
3044    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3045        self.next_page_token = v.into();
3046        self
3047    }
3048}
3049
3050impl wkt::message::Message for ListIngressRulesResponse {
3051    fn typename() -> &'static str {
3052        "type.googleapis.com/google.appengine.v1.ListIngressRulesResponse"
3053    }
3054}
3055
3056#[doc(hidden)]
3057impl google_cloud_gax::paginator::internal::PageableResponse for ListIngressRulesResponse {
3058    type PageItem = crate::model::FirewallRule;
3059
3060    fn items(self) -> std::vec::Vec<Self::PageItem> {
3061        self.ingress_rules
3062    }
3063
3064    fn next_page_token(&self) -> std::string::String {
3065        use std::clone::Clone;
3066        self.next_page_token.clone()
3067    }
3068}
3069
3070/// Request message for `Firewall.BatchUpdateIngressRules`.
3071#[derive(Clone, Default, PartialEq)]
3072#[non_exhaustive]
3073pub struct BatchUpdateIngressRulesRequest {
3074    /// Name of the Firewall collection to set.
3075    /// Example: `apps/myapp/firewall/ingressRules`.
3076    pub name: std::string::String,
3077
3078    /// A list of FirewallRules to replace the existing set.
3079    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
3080
3081    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3082}
3083
3084impl BatchUpdateIngressRulesRequest {
3085    pub fn new() -> Self {
3086        std::default::Default::default()
3087    }
3088
3089    /// Sets the value of [name][crate::model::BatchUpdateIngressRulesRequest::name].
3090    ///
3091    /// # Example
3092    /// ```ignore,no_run
3093    /// # use google_cloud_appengine_v1::model::BatchUpdateIngressRulesRequest;
3094    /// let x = BatchUpdateIngressRulesRequest::new().set_name("example");
3095    /// ```
3096    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3097        self.name = v.into();
3098        self
3099    }
3100
3101    /// Sets the value of [ingress_rules][crate::model::BatchUpdateIngressRulesRequest::ingress_rules].
3102    ///
3103    /// # Example
3104    /// ```ignore,no_run
3105    /// # use google_cloud_appengine_v1::model::BatchUpdateIngressRulesRequest;
3106    /// use google_cloud_appengine_v1::model::FirewallRule;
3107    /// let x = BatchUpdateIngressRulesRequest::new()
3108    ///     .set_ingress_rules([
3109    ///         FirewallRule::default()/* use setters */,
3110    ///         FirewallRule::default()/* use (different) setters */,
3111    ///     ]);
3112    /// ```
3113    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
3114    where
3115        T: std::iter::IntoIterator<Item = V>,
3116        V: std::convert::Into<crate::model::FirewallRule>,
3117    {
3118        use std::iter::Iterator;
3119        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
3120        self
3121    }
3122}
3123
3124impl wkt::message::Message for BatchUpdateIngressRulesRequest {
3125    fn typename() -> &'static str {
3126        "type.googleapis.com/google.appengine.v1.BatchUpdateIngressRulesRequest"
3127    }
3128}
3129
3130/// Response message for `Firewall.UpdateAllIngressRules`.
3131#[derive(Clone, Default, PartialEq)]
3132#[non_exhaustive]
3133pub struct BatchUpdateIngressRulesResponse {
3134    /// The full list of ingress FirewallRules for this application.
3135    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
3136
3137    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3138}
3139
3140impl BatchUpdateIngressRulesResponse {
3141    pub fn new() -> Self {
3142        std::default::Default::default()
3143    }
3144
3145    /// Sets the value of [ingress_rules][crate::model::BatchUpdateIngressRulesResponse::ingress_rules].
3146    ///
3147    /// # Example
3148    /// ```ignore,no_run
3149    /// # use google_cloud_appengine_v1::model::BatchUpdateIngressRulesResponse;
3150    /// use google_cloud_appengine_v1::model::FirewallRule;
3151    /// let x = BatchUpdateIngressRulesResponse::new()
3152    ///     .set_ingress_rules([
3153    ///         FirewallRule::default()/* use setters */,
3154    ///         FirewallRule::default()/* use (different) setters */,
3155    ///     ]);
3156    /// ```
3157    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
3158    where
3159        T: std::iter::IntoIterator<Item = V>,
3160        V: std::convert::Into<crate::model::FirewallRule>,
3161    {
3162        use std::iter::Iterator;
3163        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
3164        self
3165    }
3166}
3167
3168impl wkt::message::Message for BatchUpdateIngressRulesResponse {
3169    fn typename() -> &'static str {
3170        "type.googleapis.com/google.appengine.v1.BatchUpdateIngressRulesResponse"
3171    }
3172}
3173
3174/// Request message for `Firewall.CreateIngressRule`.
3175#[derive(Clone, Default, PartialEq)]
3176#[non_exhaustive]
3177pub struct CreateIngressRuleRequest {
3178    /// Name of the parent Firewall collection in which to create a new rule.
3179    /// Example: `apps/myapp/firewall/ingressRules`.
3180    pub parent: std::string::String,
3181
3182    /// A FirewallRule containing the new resource.
3183    ///
3184    /// The user may optionally provide a position at which the new rule will be
3185    /// placed. The positions define a sequential list starting at 1. If a rule
3186    /// already exists at the given position, rules greater than the provided
3187    /// position will be moved forward by one.
3188    ///
3189    /// If no position is provided, the server will place the rule as the second to
3190    /// last rule in the sequence before the required default allow-all or deny-all
3191    /// rule.
3192    pub rule: std::option::Option<crate::model::FirewallRule>,
3193
3194    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3195}
3196
3197impl CreateIngressRuleRequest {
3198    pub fn new() -> Self {
3199        std::default::Default::default()
3200    }
3201
3202    /// Sets the value of [parent][crate::model::CreateIngressRuleRequest::parent].
3203    ///
3204    /// # Example
3205    /// ```ignore,no_run
3206    /// # use google_cloud_appengine_v1::model::CreateIngressRuleRequest;
3207    /// let x = CreateIngressRuleRequest::new().set_parent("example");
3208    /// ```
3209    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3210        self.parent = v.into();
3211        self
3212    }
3213
3214    /// Sets the value of [rule][crate::model::CreateIngressRuleRequest::rule].
3215    ///
3216    /// # Example
3217    /// ```ignore,no_run
3218    /// # use google_cloud_appengine_v1::model::CreateIngressRuleRequest;
3219    /// use google_cloud_appengine_v1::model::FirewallRule;
3220    /// let x = CreateIngressRuleRequest::new().set_rule(FirewallRule::default()/* use setters */);
3221    /// ```
3222    pub fn set_rule<T>(mut self, v: T) -> Self
3223    where
3224        T: std::convert::Into<crate::model::FirewallRule>,
3225    {
3226        self.rule = std::option::Option::Some(v.into());
3227        self
3228    }
3229
3230    /// Sets or clears the value of [rule][crate::model::CreateIngressRuleRequest::rule].
3231    ///
3232    /// # Example
3233    /// ```ignore,no_run
3234    /// # use google_cloud_appengine_v1::model::CreateIngressRuleRequest;
3235    /// use google_cloud_appengine_v1::model::FirewallRule;
3236    /// let x = CreateIngressRuleRequest::new().set_or_clear_rule(Some(FirewallRule::default()/* use setters */));
3237    /// let x = CreateIngressRuleRequest::new().set_or_clear_rule(None::<FirewallRule>);
3238    /// ```
3239    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
3240    where
3241        T: std::convert::Into<crate::model::FirewallRule>,
3242    {
3243        self.rule = v.map(|x| x.into());
3244        self
3245    }
3246}
3247
3248impl wkt::message::Message for CreateIngressRuleRequest {
3249    fn typename() -> &'static str {
3250        "type.googleapis.com/google.appengine.v1.CreateIngressRuleRequest"
3251    }
3252}
3253
3254/// Request message for `Firewall.GetIngressRule`.
3255#[derive(Clone, Default, PartialEq)]
3256#[non_exhaustive]
3257pub struct GetIngressRuleRequest {
3258    /// Name of the Firewall resource to retrieve.
3259    /// Example: `apps/myapp/firewall/ingressRules/100`.
3260    pub name: std::string::String,
3261
3262    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3263}
3264
3265impl GetIngressRuleRequest {
3266    pub fn new() -> Self {
3267        std::default::Default::default()
3268    }
3269
3270    /// Sets the value of [name][crate::model::GetIngressRuleRequest::name].
3271    ///
3272    /// # Example
3273    /// ```ignore,no_run
3274    /// # use google_cloud_appengine_v1::model::GetIngressRuleRequest;
3275    /// let x = GetIngressRuleRequest::new().set_name("example");
3276    /// ```
3277    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3278        self.name = v.into();
3279        self
3280    }
3281}
3282
3283impl wkt::message::Message for GetIngressRuleRequest {
3284    fn typename() -> &'static str {
3285        "type.googleapis.com/google.appengine.v1.GetIngressRuleRequest"
3286    }
3287}
3288
3289/// Request message for `Firewall.UpdateIngressRule`.
3290#[derive(Clone, Default, PartialEq)]
3291#[non_exhaustive]
3292pub struct UpdateIngressRuleRequest {
3293    /// Name of the Firewall resource to update.
3294    /// Example: `apps/myapp/firewall/ingressRules/100`.
3295    pub name: std::string::String,
3296
3297    /// A FirewallRule containing the updated resource
3298    pub rule: std::option::Option<crate::model::FirewallRule>,
3299
3300    /// Standard field mask for the set of fields to be updated.
3301    pub update_mask: std::option::Option<wkt::FieldMask>,
3302
3303    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3304}
3305
3306impl UpdateIngressRuleRequest {
3307    pub fn new() -> Self {
3308        std::default::Default::default()
3309    }
3310
3311    /// Sets the value of [name][crate::model::UpdateIngressRuleRequest::name].
3312    ///
3313    /// # Example
3314    /// ```ignore,no_run
3315    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3316    /// let x = UpdateIngressRuleRequest::new().set_name("example");
3317    /// ```
3318    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3319        self.name = v.into();
3320        self
3321    }
3322
3323    /// Sets the value of [rule][crate::model::UpdateIngressRuleRequest::rule].
3324    ///
3325    /// # Example
3326    /// ```ignore,no_run
3327    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3328    /// use google_cloud_appengine_v1::model::FirewallRule;
3329    /// let x = UpdateIngressRuleRequest::new().set_rule(FirewallRule::default()/* use setters */);
3330    /// ```
3331    pub fn set_rule<T>(mut self, v: T) -> Self
3332    where
3333        T: std::convert::Into<crate::model::FirewallRule>,
3334    {
3335        self.rule = std::option::Option::Some(v.into());
3336        self
3337    }
3338
3339    /// Sets or clears the value of [rule][crate::model::UpdateIngressRuleRequest::rule].
3340    ///
3341    /// # Example
3342    /// ```ignore,no_run
3343    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3344    /// use google_cloud_appengine_v1::model::FirewallRule;
3345    /// let x = UpdateIngressRuleRequest::new().set_or_clear_rule(Some(FirewallRule::default()/* use setters */));
3346    /// let x = UpdateIngressRuleRequest::new().set_or_clear_rule(None::<FirewallRule>);
3347    /// ```
3348    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
3349    where
3350        T: std::convert::Into<crate::model::FirewallRule>,
3351    {
3352        self.rule = v.map(|x| x.into());
3353        self
3354    }
3355
3356    /// Sets the value of [update_mask][crate::model::UpdateIngressRuleRequest::update_mask].
3357    ///
3358    /// # Example
3359    /// ```ignore,no_run
3360    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3361    /// use wkt::FieldMask;
3362    /// let x = UpdateIngressRuleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3363    /// ```
3364    pub fn set_update_mask<T>(mut self, v: T) -> Self
3365    where
3366        T: std::convert::Into<wkt::FieldMask>,
3367    {
3368        self.update_mask = std::option::Option::Some(v.into());
3369        self
3370    }
3371
3372    /// Sets or clears the value of [update_mask][crate::model::UpdateIngressRuleRequest::update_mask].
3373    ///
3374    /// # Example
3375    /// ```ignore,no_run
3376    /// # use google_cloud_appengine_v1::model::UpdateIngressRuleRequest;
3377    /// use wkt::FieldMask;
3378    /// let x = UpdateIngressRuleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3379    /// let x = UpdateIngressRuleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3380    /// ```
3381    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3382    where
3383        T: std::convert::Into<wkt::FieldMask>,
3384    {
3385        self.update_mask = v.map(|x| x.into());
3386        self
3387    }
3388}
3389
3390impl wkt::message::Message for UpdateIngressRuleRequest {
3391    fn typename() -> &'static str {
3392        "type.googleapis.com/google.appengine.v1.UpdateIngressRuleRequest"
3393    }
3394}
3395
3396/// Request message for `Firewall.DeleteIngressRule`.
3397#[derive(Clone, Default, PartialEq)]
3398#[non_exhaustive]
3399pub struct DeleteIngressRuleRequest {
3400    /// Name of the Firewall resource to delete.
3401    /// Example: `apps/myapp/firewall/ingressRules/100`.
3402    pub name: std::string::String,
3403
3404    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3405}
3406
3407impl DeleteIngressRuleRequest {
3408    pub fn new() -> Self {
3409        std::default::Default::default()
3410    }
3411
3412    /// Sets the value of [name][crate::model::DeleteIngressRuleRequest::name].
3413    ///
3414    /// # Example
3415    /// ```ignore,no_run
3416    /// # use google_cloud_appengine_v1::model::DeleteIngressRuleRequest;
3417    /// let x = DeleteIngressRuleRequest::new().set_name("example");
3418    /// ```
3419    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3420        self.name = v.into();
3421        self
3422    }
3423}
3424
3425impl wkt::message::Message for DeleteIngressRuleRequest {
3426    fn typename() -> &'static str {
3427        "type.googleapis.com/google.appengine.v1.DeleteIngressRuleRequest"
3428    }
3429}
3430
3431/// Request message for `AuthorizedDomains.ListAuthorizedDomains`.
3432#[derive(Clone, Default, PartialEq)]
3433#[non_exhaustive]
3434pub struct ListAuthorizedDomainsRequest {
3435    /// Name of the parent Application resource. Example: `apps/myapp`.
3436    pub parent: std::string::String,
3437
3438    /// Maximum results to return per page.
3439    pub page_size: i32,
3440
3441    /// Continuation token for fetching the next page of results.
3442    pub page_token: std::string::String,
3443
3444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3445}
3446
3447impl ListAuthorizedDomainsRequest {
3448    pub fn new() -> Self {
3449        std::default::Default::default()
3450    }
3451
3452    /// Sets the value of [parent][crate::model::ListAuthorizedDomainsRequest::parent].
3453    ///
3454    /// # Example
3455    /// ```ignore,no_run
3456    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsRequest;
3457    /// let x = ListAuthorizedDomainsRequest::new().set_parent("example");
3458    /// ```
3459    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3460        self.parent = v.into();
3461        self
3462    }
3463
3464    /// Sets the value of [page_size][crate::model::ListAuthorizedDomainsRequest::page_size].
3465    ///
3466    /// # Example
3467    /// ```ignore,no_run
3468    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsRequest;
3469    /// let x = ListAuthorizedDomainsRequest::new().set_page_size(42);
3470    /// ```
3471    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3472        self.page_size = v.into();
3473        self
3474    }
3475
3476    /// Sets the value of [page_token][crate::model::ListAuthorizedDomainsRequest::page_token].
3477    ///
3478    /// # Example
3479    /// ```ignore,no_run
3480    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsRequest;
3481    /// let x = ListAuthorizedDomainsRequest::new().set_page_token("example");
3482    /// ```
3483    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3484        self.page_token = v.into();
3485        self
3486    }
3487}
3488
3489impl wkt::message::Message for ListAuthorizedDomainsRequest {
3490    fn typename() -> &'static str {
3491        "type.googleapis.com/google.appengine.v1.ListAuthorizedDomainsRequest"
3492    }
3493}
3494
3495/// Response message for `AuthorizedDomains.ListAuthorizedDomains`.
3496#[derive(Clone, Default, PartialEq)]
3497#[non_exhaustive]
3498pub struct ListAuthorizedDomainsResponse {
3499    /// The authorized domains belonging to the user.
3500    pub domains: std::vec::Vec<crate::model::AuthorizedDomain>,
3501
3502    /// Continuation token for fetching the next page of results.
3503    pub next_page_token: std::string::String,
3504
3505    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3506}
3507
3508impl ListAuthorizedDomainsResponse {
3509    pub fn new() -> Self {
3510        std::default::Default::default()
3511    }
3512
3513    /// Sets the value of [domains][crate::model::ListAuthorizedDomainsResponse::domains].
3514    ///
3515    /// # Example
3516    /// ```ignore,no_run
3517    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsResponse;
3518    /// use google_cloud_appengine_v1::model::AuthorizedDomain;
3519    /// let x = ListAuthorizedDomainsResponse::new()
3520    ///     .set_domains([
3521    ///         AuthorizedDomain::default()/* use setters */,
3522    ///         AuthorizedDomain::default()/* use (different) setters */,
3523    ///     ]);
3524    /// ```
3525    pub fn set_domains<T, V>(mut self, v: T) -> Self
3526    where
3527        T: std::iter::IntoIterator<Item = V>,
3528        V: std::convert::Into<crate::model::AuthorizedDomain>,
3529    {
3530        use std::iter::Iterator;
3531        self.domains = v.into_iter().map(|i| i.into()).collect();
3532        self
3533    }
3534
3535    /// Sets the value of [next_page_token][crate::model::ListAuthorizedDomainsResponse::next_page_token].
3536    ///
3537    /// # Example
3538    /// ```ignore,no_run
3539    /// # use google_cloud_appengine_v1::model::ListAuthorizedDomainsResponse;
3540    /// let x = ListAuthorizedDomainsResponse::new().set_next_page_token("example");
3541    /// ```
3542    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3543        self.next_page_token = v.into();
3544        self
3545    }
3546}
3547
3548impl wkt::message::Message for ListAuthorizedDomainsResponse {
3549    fn typename() -> &'static str {
3550        "type.googleapis.com/google.appengine.v1.ListAuthorizedDomainsResponse"
3551    }
3552}
3553
3554#[doc(hidden)]
3555impl google_cloud_gax::paginator::internal::PageableResponse for ListAuthorizedDomainsResponse {
3556    type PageItem = crate::model::AuthorizedDomain;
3557
3558    fn items(self) -> std::vec::Vec<Self::PageItem> {
3559        self.domains
3560    }
3561
3562    fn next_page_token(&self) -> std::string::String {
3563        use std::clone::Clone;
3564        self.next_page_token.clone()
3565    }
3566}
3567
3568/// Request message for `AuthorizedCertificates.ListAuthorizedCertificates`.
3569#[derive(Clone, Default, PartialEq)]
3570#[non_exhaustive]
3571pub struct ListAuthorizedCertificatesRequest {
3572    /// Name of the parent `Application` resource. Example: `apps/myapp`.
3573    pub parent: std::string::String,
3574
3575    /// Controls the set of fields returned in the `LIST` response.
3576    pub view: crate::model::AuthorizedCertificateView,
3577
3578    /// Maximum results to return per page.
3579    pub page_size: i32,
3580
3581    /// Continuation token for fetching the next page of results.
3582    pub page_token: std::string::String,
3583
3584    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3585}
3586
3587impl ListAuthorizedCertificatesRequest {
3588    pub fn new() -> Self {
3589        std::default::Default::default()
3590    }
3591
3592    /// Sets the value of [parent][crate::model::ListAuthorizedCertificatesRequest::parent].
3593    ///
3594    /// # Example
3595    /// ```ignore,no_run
3596    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesRequest;
3597    /// let x = ListAuthorizedCertificatesRequest::new().set_parent("example");
3598    /// ```
3599    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3600        self.parent = v.into();
3601        self
3602    }
3603
3604    /// Sets the value of [view][crate::model::ListAuthorizedCertificatesRequest::view].
3605    ///
3606    /// # Example
3607    /// ```ignore,no_run
3608    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesRequest;
3609    /// use google_cloud_appengine_v1::model::AuthorizedCertificateView;
3610    /// let x0 = ListAuthorizedCertificatesRequest::new().set_view(AuthorizedCertificateView::FullCertificate);
3611    /// ```
3612    pub fn set_view<T: std::convert::Into<crate::model::AuthorizedCertificateView>>(
3613        mut self,
3614        v: T,
3615    ) -> Self {
3616        self.view = v.into();
3617        self
3618    }
3619
3620    /// Sets the value of [page_size][crate::model::ListAuthorizedCertificatesRequest::page_size].
3621    ///
3622    /// # Example
3623    /// ```ignore,no_run
3624    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesRequest;
3625    /// let x = ListAuthorizedCertificatesRequest::new().set_page_size(42);
3626    /// ```
3627    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3628        self.page_size = v.into();
3629        self
3630    }
3631
3632    /// Sets the value of [page_token][crate::model::ListAuthorizedCertificatesRequest::page_token].
3633    ///
3634    /// # Example
3635    /// ```ignore,no_run
3636    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesRequest;
3637    /// let x = ListAuthorizedCertificatesRequest::new().set_page_token("example");
3638    /// ```
3639    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3640        self.page_token = v.into();
3641        self
3642    }
3643}
3644
3645impl wkt::message::Message for ListAuthorizedCertificatesRequest {
3646    fn typename() -> &'static str {
3647        "type.googleapis.com/google.appengine.v1.ListAuthorizedCertificatesRequest"
3648    }
3649}
3650
3651/// Response message for `AuthorizedCertificates.ListAuthorizedCertificates`.
3652#[derive(Clone, Default, PartialEq)]
3653#[non_exhaustive]
3654pub struct ListAuthorizedCertificatesResponse {
3655    /// The SSL certificates the user is authorized to administer.
3656    pub certificates: std::vec::Vec<crate::model::AuthorizedCertificate>,
3657
3658    /// Continuation token for fetching the next page of results.
3659    pub next_page_token: std::string::String,
3660
3661    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3662}
3663
3664impl ListAuthorizedCertificatesResponse {
3665    pub fn new() -> Self {
3666        std::default::Default::default()
3667    }
3668
3669    /// Sets the value of [certificates][crate::model::ListAuthorizedCertificatesResponse::certificates].
3670    ///
3671    /// # Example
3672    /// ```ignore,no_run
3673    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesResponse;
3674    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3675    /// let x = ListAuthorizedCertificatesResponse::new()
3676    ///     .set_certificates([
3677    ///         AuthorizedCertificate::default()/* use setters */,
3678    ///         AuthorizedCertificate::default()/* use (different) setters */,
3679    ///     ]);
3680    /// ```
3681    pub fn set_certificates<T, V>(mut self, v: T) -> Self
3682    where
3683        T: std::iter::IntoIterator<Item = V>,
3684        V: std::convert::Into<crate::model::AuthorizedCertificate>,
3685    {
3686        use std::iter::Iterator;
3687        self.certificates = v.into_iter().map(|i| i.into()).collect();
3688        self
3689    }
3690
3691    /// Sets the value of [next_page_token][crate::model::ListAuthorizedCertificatesResponse::next_page_token].
3692    ///
3693    /// # Example
3694    /// ```ignore,no_run
3695    /// # use google_cloud_appengine_v1::model::ListAuthorizedCertificatesResponse;
3696    /// let x = ListAuthorizedCertificatesResponse::new().set_next_page_token("example");
3697    /// ```
3698    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3699        self.next_page_token = v.into();
3700        self
3701    }
3702}
3703
3704impl wkt::message::Message for ListAuthorizedCertificatesResponse {
3705    fn typename() -> &'static str {
3706        "type.googleapis.com/google.appengine.v1.ListAuthorizedCertificatesResponse"
3707    }
3708}
3709
3710#[doc(hidden)]
3711impl google_cloud_gax::paginator::internal::PageableResponse
3712    for ListAuthorizedCertificatesResponse
3713{
3714    type PageItem = crate::model::AuthorizedCertificate;
3715
3716    fn items(self) -> std::vec::Vec<Self::PageItem> {
3717        self.certificates
3718    }
3719
3720    fn next_page_token(&self) -> std::string::String {
3721        use std::clone::Clone;
3722        self.next_page_token.clone()
3723    }
3724}
3725
3726/// Request message for `AuthorizedCertificates.GetAuthorizedCertificate`.
3727#[derive(Clone, Default, PartialEq)]
3728#[non_exhaustive]
3729pub struct GetAuthorizedCertificateRequest {
3730    /// Name of the resource requested. Example:
3731    /// `apps/myapp/authorizedCertificates/12345`.
3732    pub name: std::string::String,
3733
3734    /// Controls the set of fields returned in the `GET` response.
3735    pub view: crate::model::AuthorizedCertificateView,
3736
3737    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3738}
3739
3740impl GetAuthorizedCertificateRequest {
3741    pub fn new() -> Self {
3742        std::default::Default::default()
3743    }
3744
3745    /// Sets the value of [name][crate::model::GetAuthorizedCertificateRequest::name].
3746    ///
3747    /// # Example
3748    /// ```ignore,no_run
3749    /// # use google_cloud_appengine_v1::model::GetAuthorizedCertificateRequest;
3750    /// let x = GetAuthorizedCertificateRequest::new().set_name("example");
3751    /// ```
3752    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3753        self.name = v.into();
3754        self
3755    }
3756
3757    /// Sets the value of [view][crate::model::GetAuthorizedCertificateRequest::view].
3758    ///
3759    /// # Example
3760    /// ```ignore,no_run
3761    /// # use google_cloud_appengine_v1::model::GetAuthorizedCertificateRequest;
3762    /// use google_cloud_appengine_v1::model::AuthorizedCertificateView;
3763    /// let x0 = GetAuthorizedCertificateRequest::new().set_view(AuthorizedCertificateView::FullCertificate);
3764    /// ```
3765    pub fn set_view<T: std::convert::Into<crate::model::AuthorizedCertificateView>>(
3766        mut self,
3767        v: T,
3768    ) -> Self {
3769        self.view = v.into();
3770        self
3771    }
3772}
3773
3774impl wkt::message::Message for GetAuthorizedCertificateRequest {
3775    fn typename() -> &'static str {
3776        "type.googleapis.com/google.appengine.v1.GetAuthorizedCertificateRequest"
3777    }
3778}
3779
3780/// Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`.
3781#[derive(Clone, Default, PartialEq)]
3782#[non_exhaustive]
3783pub struct CreateAuthorizedCertificateRequest {
3784    /// Name of the parent `Application` resource. Example: `apps/myapp`.
3785    pub parent: std::string::String,
3786
3787    /// SSL certificate data.
3788    pub certificate: std::option::Option<crate::model::AuthorizedCertificate>,
3789
3790    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3791}
3792
3793impl CreateAuthorizedCertificateRequest {
3794    pub fn new() -> Self {
3795        std::default::Default::default()
3796    }
3797
3798    /// Sets the value of [parent][crate::model::CreateAuthorizedCertificateRequest::parent].
3799    ///
3800    /// # Example
3801    /// ```ignore,no_run
3802    /// # use google_cloud_appengine_v1::model::CreateAuthorizedCertificateRequest;
3803    /// let x = CreateAuthorizedCertificateRequest::new().set_parent("example");
3804    /// ```
3805    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3806        self.parent = v.into();
3807        self
3808    }
3809
3810    /// Sets the value of [certificate][crate::model::CreateAuthorizedCertificateRequest::certificate].
3811    ///
3812    /// # Example
3813    /// ```ignore,no_run
3814    /// # use google_cloud_appengine_v1::model::CreateAuthorizedCertificateRequest;
3815    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3816    /// let x = CreateAuthorizedCertificateRequest::new().set_certificate(AuthorizedCertificate::default()/* use setters */);
3817    /// ```
3818    pub fn set_certificate<T>(mut self, v: T) -> Self
3819    where
3820        T: std::convert::Into<crate::model::AuthorizedCertificate>,
3821    {
3822        self.certificate = std::option::Option::Some(v.into());
3823        self
3824    }
3825
3826    /// Sets or clears the value of [certificate][crate::model::CreateAuthorizedCertificateRequest::certificate].
3827    ///
3828    /// # Example
3829    /// ```ignore,no_run
3830    /// # use google_cloud_appengine_v1::model::CreateAuthorizedCertificateRequest;
3831    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3832    /// let x = CreateAuthorizedCertificateRequest::new().set_or_clear_certificate(Some(AuthorizedCertificate::default()/* use setters */));
3833    /// let x = CreateAuthorizedCertificateRequest::new().set_or_clear_certificate(None::<AuthorizedCertificate>);
3834    /// ```
3835    pub fn set_or_clear_certificate<T>(mut self, v: std::option::Option<T>) -> Self
3836    where
3837        T: std::convert::Into<crate::model::AuthorizedCertificate>,
3838    {
3839        self.certificate = v.map(|x| x.into());
3840        self
3841    }
3842}
3843
3844impl wkt::message::Message for CreateAuthorizedCertificateRequest {
3845    fn typename() -> &'static str {
3846        "type.googleapis.com/google.appengine.v1.CreateAuthorizedCertificateRequest"
3847    }
3848}
3849
3850/// Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`.
3851#[derive(Clone, Default, PartialEq)]
3852#[non_exhaustive]
3853pub struct UpdateAuthorizedCertificateRequest {
3854    /// Name of the resource to update. Example:
3855    /// `apps/myapp/authorizedCertificates/12345`.
3856    pub name: std::string::String,
3857
3858    /// An `AuthorizedCertificate` containing the updated resource. Only fields set
3859    /// in the field mask will be updated.
3860    pub certificate: std::option::Option<crate::model::AuthorizedCertificate>,
3861
3862    /// Standard field mask for the set of fields to be updated. Updates are only
3863    /// supported on the `certificate_raw_data` and `display_name` fields.
3864    pub update_mask: std::option::Option<wkt::FieldMask>,
3865
3866    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3867}
3868
3869impl UpdateAuthorizedCertificateRequest {
3870    pub fn new() -> Self {
3871        std::default::Default::default()
3872    }
3873
3874    /// Sets the value of [name][crate::model::UpdateAuthorizedCertificateRequest::name].
3875    ///
3876    /// # Example
3877    /// ```ignore,no_run
3878    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3879    /// let x = UpdateAuthorizedCertificateRequest::new().set_name("example");
3880    /// ```
3881    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3882        self.name = v.into();
3883        self
3884    }
3885
3886    /// Sets the value of [certificate][crate::model::UpdateAuthorizedCertificateRequest::certificate].
3887    ///
3888    /// # Example
3889    /// ```ignore,no_run
3890    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3891    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3892    /// let x = UpdateAuthorizedCertificateRequest::new().set_certificate(AuthorizedCertificate::default()/* use setters */);
3893    /// ```
3894    pub fn set_certificate<T>(mut self, v: T) -> Self
3895    where
3896        T: std::convert::Into<crate::model::AuthorizedCertificate>,
3897    {
3898        self.certificate = std::option::Option::Some(v.into());
3899        self
3900    }
3901
3902    /// Sets or clears the value of [certificate][crate::model::UpdateAuthorizedCertificateRequest::certificate].
3903    ///
3904    /// # Example
3905    /// ```ignore,no_run
3906    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3907    /// use google_cloud_appengine_v1::model::AuthorizedCertificate;
3908    /// let x = UpdateAuthorizedCertificateRequest::new().set_or_clear_certificate(Some(AuthorizedCertificate::default()/* use setters */));
3909    /// let x = UpdateAuthorizedCertificateRequest::new().set_or_clear_certificate(None::<AuthorizedCertificate>);
3910    /// ```
3911    pub fn set_or_clear_certificate<T>(mut self, v: std::option::Option<T>) -> Self
3912    where
3913        T: std::convert::Into<crate::model::AuthorizedCertificate>,
3914    {
3915        self.certificate = v.map(|x| x.into());
3916        self
3917    }
3918
3919    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedCertificateRequest::update_mask].
3920    ///
3921    /// # Example
3922    /// ```ignore,no_run
3923    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3924    /// use wkt::FieldMask;
3925    /// let x = UpdateAuthorizedCertificateRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3926    /// ```
3927    pub fn set_update_mask<T>(mut self, v: T) -> Self
3928    where
3929        T: std::convert::Into<wkt::FieldMask>,
3930    {
3931        self.update_mask = std::option::Option::Some(v.into());
3932        self
3933    }
3934
3935    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedCertificateRequest::update_mask].
3936    ///
3937    /// # Example
3938    /// ```ignore,no_run
3939    /// # use google_cloud_appengine_v1::model::UpdateAuthorizedCertificateRequest;
3940    /// use wkt::FieldMask;
3941    /// let x = UpdateAuthorizedCertificateRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3942    /// let x = UpdateAuthorizedCertificateRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3943    /// ```
3944    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3945    where
3946        T: std::convert::Into<wkt::FieldMask>,
3947    {
3948        self.update_mask = v.map(|x| x.into());
3949        self
3950    }
3951}
3952
3953impl wkt::message::Message for UpdateAuthorizedCertificateRequest {
3954    fn typename() -> &'static str {
3955        "type.googleapis.com/google.appengine.v1.UpdateAuthorizedCertificateRequest"
3956    }
3957}
3958
3959/// Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`.
3960#[derive(Clone, Default, PartialEq)]
3961#[non_exhaustive]
3962pub struct DeleteAuthorizedCertificateRequest {
3963    /// Name of the resource to delete. Example:
3964    /// `apps/myapp/authorizedCertificates/12345`.
3965    pub name: std::string::String,
3966
3967    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3968}
3969
3970impl DeleteAuthorizedCertificateRequest {
3971    pub fn new() -> Self {
3972        std::default::Default::default()
3973    }
3974
3975    /// Sets the value of [name][crate::model::DeleteAuthorizedCertificateRequest::name].
3976    ///
3977    /// # Example
3978    /// ```ignore,no_run
3979    /// # use google_cloud_appengine_v1::model::DeleteAuthorizedCertificateRequest;
3980    /// let x = DeleteAuthorizedCertificateRequest::new().set_name("example");
3981    /// ```
3982    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3983        self.name = v.into();
3984        self
3985    }
3986}
3987
3988impl wkt::message::Message for DeleteAuthorizedCertificateRequest {
3989    fn typename() -> &'static str {
3990        "type.googleapis.com/google.appengine.v1.DeleteAuthorizedCertificateRequest"
3991    }
3992}
3993
3994/// Request message for `DomainMappings.ListDomainMappings`.
3995#[derive(Clone, Default, PartialEq)]
3996#[non_exhaustive]
3997pub struct ListDomainMappingsRequest {
3998    /// Name of the parent Application resource. Example: `apps/myapp`.
3999    pub parent: std::string::String,
4000
4001    /// Maximum results to return per page.
4002    pub page_size: i32,
4003
4004    /// Continuation token for fetching the next page of results.
4005    pub page_token: std::string::String,
4006
4007    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4008}
4009
4010impl ListDomainMappingsRequest {
4011    pub fn new() -> Self {
4012        std::default::Default::default()
4013    }
4014
4015    /// Sets the value of [parent][crate::model::ListDomainMappingsRequest::parent].
4016    ///
4017    /// # Example
4018    /// ```ignore,no_run
4019    /// # use google_cloud_appengine_v1::model::ListDomainMappingsRequest;
4020    /// let x = ListDomainMappingsRequest::new().set_parent("example");
4021    /// ```
4022    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4023        self.parent = v.into();
4024        self
4025    }
4026
4027    /// Sets the value of [page_size][crate::model::ListDomainMappingsRequest::page_size].
4028    ///
4029    /// # Example
4030    /// ```ignore,no_run
4031    /// # use google_cloud_appengine_v1::model::ListDomainMappingsRequest;
4032    /// let x = ListDomainMappingsRequest::new().set_page_size(42);
4033    /// ```
4034    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4035        self.page_size = v.into();
4036        self
4037    }
4038
4039    /// Sets the value of [page_token][crate::model::ListDomainMappingsRequest::page_token].
4040    ///
4041    /// # Example
4042    /// ```ignore,no_run
4043    /// # use google_cloud_appengine_v1::model::ListDomainMappingsRequest;
4044    /// let x = ListDomainMappingsRequest::new().set_page_token("example");
4045    /// ```
4046    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4047        self.page_token = v.into();
4048        self
4049    }
4050}
4051
4052impl wkt::message::Message for ListDomainMappingsRequest {
4053    fn typename() -> &'static str {
4054        "type.googleapis.com/google.appengine.v1.ListDomainMappingsRequest"
4055    }
4056}
4057
4058/// Response message for `DomainMappings.ListDomainMappings`.
4059#[derive(Clone, Default, PartialEq)]
4060#[non_exhaustive]
4061pub struct ListDomainMappingsResponse {
4062    /// The domain mappings for the application.
4063    pub domain_mappings: std::vec::Vec<crate::model::DomainMapping>,
4064
4065    /// Continuation token for fetching the next page of results.
4066    pub next_page_token: std::string::String,
4067
4068    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4069}
4070
4071impl ListDomainMappingsResponse {
4072    pub fn new() -> Self {
4073        std::default::Default::default()
4074    }
4075
4076    /// Sets the value of [domain_mappings][crate::model::ListDomainMappingsResponse::domain_mappings].
4077    ///
4078    /// # Example
4079    /// ```ignore,no_run
4080    /// # use google_cloud_appengine_v1::model::ListDomainMappingsResponse;
4081    /// use google_cloud_appengine_v1::model::DomainMapping;
4082    /// let x = ListDomainMappingsResponse::new()
4083    ///     .set_domain_mappings([
4084    ///         DomainMapping::default()/* use setters */,
4085    ///         DomainMapping::default()/* use (different) setters */,
4086    ///     ]);
4087    /// ```
4088    pub fn set_domain_mappings<T, V>(mut self, v: T) -> Self
4089    where
4090        T: std::iter::IntoIterator<Item = V>,
4091        V: std::convert::Into<crate::model::DomainMapping>,
4092    {
4093        use std::iter::Iterator;
4094        self.domain_mappings = v.into_iter().map(|i| i.into()).collect();
4095        self
4096    }
4097
4098    /// Sets the value of [next_page_token][crate::model::ListDomainMappingsResponse::next_page_token].
4099    ///
4100    /// # Example
4101    /// ```ignore,no_run
4102    /// # use google_cloud_appengine_v1::model::ListDomainMappingsResponse;
4103    /// let x = ListDomainMappingsResponse::new().set_next_page_token("example");
4104    /// ```
4105    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4106        self.next_page_token = v.into();
4107        self
4108    }
4109}
4110
4111impl wkt::message::Message for ListDomainMappingsResponse {
4112    fn typename() -> &'static str {
4113        "type.googleapis.com/google.appengine.v1.ListDomainMappingsResponse"
4114    }
4115}
4116
4117#[doc(hidden)]
4118impl google_cloud_gax::paginator::internal::PageableResponse for ListDomainMappingsResponse {
4119    type PageItem = crate::model::DomainMapping;
4120
4121    fn items(self) -> std::vec::Vec<Self::PageItem> {
4122        self.domain_mappings
4123    }
4124
4125    fn next_page_token(&self) -> std::string::String {
4126        use std::clone::Clone;
4127        self.next_page_token.clone()
4128    }
4129}
4130
4131/// Request message for `DomainMappings.GetDomainMapping`.
4132#[derive(Clone, Default, PartialEq)]
4133#[non_exhaustive]
4134pub struct GetDomainMappingRequest {
4135    /// Name of the resource requested. Example:
4136    /// `apps/myapp/domainMappings/example.com`.
4137    pub name: std::string::String,
4138
4139    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4140}
4141
4142impl GetDomainMappingRequest {
4143    pub fn new() -> Self {
4144        std::default::Default::default()
4145    }
4146
4147    /// Sets the value of [name][crate::model::GetDomainMappingRequest::name].
4148    ///
4149    /// # Example
4150    /// ```ignore,no_run
4151    /// # use google_cloud_appengine_v1::model::GetDomainMappingRequest;
4152    /// let x = GetDomainMappingRequest::new().set_name("example");
4153    /// ```
4154    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4155        self.name = v.into();
4156        self
4157    }
4158}
4159
4160impl wkt::message::Message for GetDomainMappingRequest {
4161    fn typename() -> &'static str {
4162        "type.googleapis.com/google.appengine.v1.GetDomainMappingRequest"
4163    }
4164}
4165
4166/// Request message for `DomainMappings.CreateDomainMapping`.
4167#[derive(Clone, Default, PartialEq)]
4168#[non_exhaustive]
4169pub struct CreateDomainMappingRequest {
4170    /// Name of the parent Application resource. Example: `apps/myapp`.
4171    pub parent: std::string::String,
4172
4173    /// Domain mapping configuration.
4174    pub domain_mapping: std::option::Option<crate::model::DomainMapping>,
4175
4176    /// Whether the domain creation should override any existing mappings for this
4177    /// domain. By default, overrides are rejected.
4178    pub override_strategy: crate::model::DomainOverrideStrategy,
4179
4180    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4181}
4182
4183impl CreateDomainMappingRequest {
4184    pub fn new() -> Self {
4185        std::default::Default::default()
4186    }
4187
4188    /// Sets the value of [parent][crate::model::CreateDomainMappingRequest::parent].
4189    ///
4190    /// # Example
4191    /// ```ignore,no_run
4192    /// # use google_cloud_appengine_v1::model::CreateDomainMappingRequest;
4193    /// let x = CreateDomainMappingRequest::new().set_parent("example");
4194    /// ```
4195    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4196        self.parent = v.into();
4197        self
4198    }
4199
4200    /// Sets the value of [domain_mapping][crate::model::CreateDomainMappingRequest::domain_mapping].
4201    ///
4202    /// # Example
4203    /// ```ignore,no_run
4204    /// # use google_cloud_appengine_v1::model::CreateDomainMappingRequest;
4205    /// use google_cloud_appengine_v1::model::DomainMapping;
4206    /// let x = CreateDomainMappingRequest::new().set_domain_mapping(DomainMapping::default()/* use setters */);
4207    /// ```
4208    pub fn set_domain_mapping<T>(mut self, v: T) -> Self
4209    where
4210        T: std::convert::Into<crate::model::DomainMapping>,
4211    {
4212        self.domain_mapping = std::option::Option::Some(v.into());
4213        self
4214    }
4215
4216    /// Sets or clears the value of [domain_mapping][crate::model::CreateDomainMappingRequest::domain_mapping].
4217    ///
4218    /// # Example
4219    /// ```ignore,no_run
4220    /// # use google_cloud_appengine_v1::model::CreateDomainMappingRequest;
4221    /// use google_cloud_appengine_v1::model::DomainMapping;
4222    /// let x = CreateDomainMappingRequest::new().set_or_clear_domain_mapping(Some(DomainMapping::default()/* use setters */));
4223    /// let x = CreateDomainMappingRequest::new().set_or_clear_domain_mapping(None::<DomainMapping>);
4224    /// ```
4225    pub fn set_or_clear_domain_mapping<T>(mut self, v: std::option::Option<T>) -> Self
4226    where
4227        T: std::convert::Into<crate::model::DomainMapping>,
4228    {
4229        self.domain_mapping = v.map(|x| x.into());
4230        self
4231    }
4232
4233    /// Sets the value of [override_strategy][crate::model::CreateDomainMappingRequest::override_strategy].
4234    ///
4235    /// # Example
4236    /// ```ignore,no_run
4237    /// # use google_cloud_appengine_v1::model::CreateDomainMappingRequest;
4238    /// use google_cloud_appengine_v1::model::DomainOverrideStrategy;
4239    /// let x0 = CreateDomainMappingRequest::new().set_override_strategy(DomainOverrideStrategy::Strict);
4240    /// let x1 = CreateDomainMappingRequest::new().set_override_strategy(DomainOverrideStrategy::Override);
4241    /// ```
4242    pub fn set_override_strategy<T: std::convert::Into<crate::model::DomainOverrideStrategy>>(
4243        mut self,
4244        v: T,
4245    ) -> Self {
4246        self.override_strategy = v.into();
4247        self
4248    }
4249}
4250
4251impl wkt::message::Message for CreateDomainMappingRequest {
4252    fn typename() -> &'static str {
4253        "type.googleapis.com/google.appengine.v1.CreateDomainMappingRequest"
4254    }
4255}
4256
4257/// Request message for `DomainMappings.UpdateDomainMapping`.
4258#[derive(Clone, Default, PartialEq)]
4259#[non_exhaustive]
4260pub struct UpdateDomainMappingRequest {
4261    /// Name of the resource to update. Example:
4262    /// `apps/myapp/domainMappings/example.com`.
4263    pub name: std::string::String,
4264
4265    /// A domain mapping containing the updated resource. Only fields set
4266    /// in the field mask will be updated.
4267    pub domain_mapping: std::option::Option<crate::model::DomainMapping>,
4268
4269    /// Required. Standard field mask for the set of fields to be updated.
4270    pub update_mask: std::option::Option<wkt::FieldMask>,
4271
4272    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4273}
4274
4275impl UpdateDomainMappingRequest {
4276    pub fn new() -> Self {
4277        std::default::Default::default()
4278    }
4279
4280    /// Sets the value of [name][crate::model::UpdateDomainMappingRequest::name].
4281    ///
4282    /// # Example
4283    /// ```ignore,no_run
4284    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4285    /// let x = UpdateDomainMappingRequest::new().set_name("example");
4286    /// ```
4287    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4288        self.name = v.into();
4289        self
4290    }
4291
4292    /// Sets the value of [domain_mapping][crate::model::UpdateDomainMappingRequest::domain_mapping].
4293    ///
4294    /// # Example
4295    /// ```ignore,no_run
4296    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4297    /// use google_cloud_appengine_v1::model::DomainMapping;
4298    /// let x = UpdateDomainMappingRequest::new().set_domain_mapping(DomainMapping::default()/* use setters */);
4299    /// ```
4300    pub fn set_domain_mapping<T>(mut self, v: T) -> Self
4301    where
4302        T: std::convert::Into<crate::model::DomainMapping>,
4303    {
4304        self.domain_mapping = std::option::Option::Some(v.into());
4305        self
4306    }
4307
4308    /// Sets or clears the value of [domain_mapping][crate::model::UpdateDomainMappingRequest::domain_mapping].
4309    ///
4310    /// # Example
4311    /// ```ignore,no_run
4312    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4313    /// use google_cloud_appengine_v1::model::DomainMapping;
4314    /// let x = UpdateDomainMappingRequest::new().set_or_clear_domain_mapping(Some(DomainMapping::default()/* use setters */));
4315    /// let x = UpdateDomainMappingRequest::new().set_or_clear_domain_mapping(None::<DomainMapping>);
4316    /// ```
4317    pub fn set_or_clear_domain_mapping<T>(mut self, v: std::option::Option<T>) -> Self
4318    where
4319        T: std::convert::Into<crate::model::DomainMapping>,
4320    {
4321        self.domain_mapping = v.map(|x| x.into());
4322        self
4323    }
4324
4325    /// Sets the value of [update_mask][crate::model::UpdateDomainMappingRequest::update_mask].
4326    ///
4327    /// # Example
4328    /// ```ignore,no_run
4329    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4330    /// use wkt::FieldMask;
4331    /// let x = UpdateDomainMappingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4332    /// ```
4333    pub fn set_update_mask<T>(mut self, v: T) -> Self
4334    where
4335        T: std::convert::Into<wkt::FieldMask>,
4336    {
4337        self.update_mask = std::option::Option::Some(v.into());
4338        self
4339    }
4340
4341    /// Sets or clears the value of [update_mask][crate::model::UpdateDomainMappingRequest::update_mask].
4342    ///
4343    /// # Example
4344    /// ```ignore,no_run
4345    /// # use google_cloud_appengine_v1::model::UpdateDomainMappingRequest;
4346    /// use wkt::FieldMask;
4347    /// let x = UpdateDomainMappingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4348    /// let x = UpdateDomainMappingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4349    /// ```
4350    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4351    where
4352        T: std::convert::Into<wkt::FieldMask>,
4353    {
4354        self.update_mask = v.map(|x| x.into());
4355        self
4356    }
4357}
4358
4359impl wkt::message::Message for UpdateDomainMappingRequest {
4360    fn typename() -> &'static str {
4361        "type.googleapis.com/google.appengine.v1.UpdateDomainMappingRequest"
4362    }
4363}
4364
4365/// Request message for `DomainMappings.DeleteDomainMapping`.
4366#[derive(Clone, Default, PartialEq)]
4367#[non_exhaustive]
4368pub struct DeleteDomainMappingRequest {
4369    /// Name of the resource to delete. Example:
4370    /// `apps/myapp/domainMappings/example.com`.
4371    pub name: std::string::String,
4372
4373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4374}
4375
4376impl DeleteDomainMappingRequest {
4377    pub fn new() -> Self {
4378        std::default::Default::default()
4379    }
4380
4381    /// Sets the value of [name][crate::model::DeleteDomainMappingRequest::name].
4382    ///
4383    /// # Example
4384    /// ```ignore,no_run
4385    /// # use google_cloud_appengine_v1::model::DeleteDomainMappingRequest;
4386    /// let x = DeleteDomainMappingRequest::new().set_name("example");
4387    /// ```
4388    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4389        self.name = v.into();
4390        self
4391    }
4392}
4393
4394impl wkt::message::Message for DeleteDomainMappingRequest {
4395    fn typename() -> &'static str {
4396        "type.googleapis.com/google.appengine.v1.DeleteDomainMappingRequest"
4397    }
4398}
4399
4400/// An Application resource contains the top-level configuration of an App
4401/// Engine application.
4402#[derive(Clone, Default, PartialEq)]
4403#[non_exhaustive]
4404pub struct Application {
4405    /// Full path to the Application resource in the API.
4406    /// Example: `apps/myapp`.
4407    ///
4408    /// @OutputOnly
4409    pub name: std::string::String,
4410
4411    /// Identifier of the Application resource. This identifier is equivalent
4412    /// to the project ID of the Google Cloud Platform project where you want to
4413    /// deploy your application.
4414    /// Example: `myapp`.
4415    pub id: std::string::String,
4416
4417    /// HTTP path dispatch rules for requests to the application that do not
4418    /// explicitly target a service or version. Rules are order-dependent.
4419    /// Up to 20 dispatch rules can be supported.
4420    pub dispatch_rules: std::vec::Vec<crate::model::UrlDispatchRule>,
4421
4422    /// Google Apps authentication domain that controls which users can access
4423    /// this application.
4424    ///
4425    /// Defaults to open access for any Google Account.
4426    pub auth_domain: std::string::String,
4427
4428    /// Location from which this application runs. Application instances
4429    /// run out of the data centers in the specified location, which is also where
4430    /// all of the application's end user content is stored.
4431    ///
4432    /// Defaults to `us-central`.
4433    ///
4434    /// View the list of
4435    /// [supported locations](https://cloud.google.com/appengine/docs/locations).
4436    pub location_id: std::string::String,
4437
4438    /// Google Cloud Storage bucket that can be used for storing files
4439    /// associated with this application. This bucket is associated with the
4440    /// application and can be used by the gcloud deployment commands.
4441    ///
4442    /// @OutputOnly
4443    pub code_bucket: std::string::String,
4444
4445    /// Cookie expiration policy for this application.
4446    pub default_cookie_expiration: std::option::Option<wkt::Duration>,
4447
4448    /// Serving status of this application.
4449    pub serving_status: crate::model::application::ServingStatus,
4450
4451    /// Hostname used to reach this application, as resolved by App Engine.
4452    ///
4453    /// @OutputOnly
4454    pub default_hostname: std::string::String,
4455
4456    /// Google Cloud Storage bucket that can be used by this application to store
4457    /// content.
4458    ///
4459    /// @OutputOnly
4460    pub default_bucket: std::string::String,
4461
4462    /// The service account associated with the application.
4463    /// This is the app-level default identity. If no identity provided during
4464    /// create version, Admin API will fallback to this one.
4465    pub service_account: std::string::String,
4466
4467    pub iap: std::option::Option<crate::model::application::IdentityAwareProxy>,
4468
4469    /// The Google Container Registry domain used for storing managed build docker
4470    /// images for this application.
4471    pub gcr_domain: std::string::String,
4472
4473    /// The type of the Cloud Firestore or Cloud Datastore database associated with
4474    /// this application.
4475    pub database_type: crate::model::application::DatabaseType,
4476
4477    /// The feature specific settings to be used in the application.
4478    pub feature_settings: std::option::Option<crate::model::application::FeatureSettings>,
4479
4480    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4481}
4482
4483impl Application {
4484    pub fn new() -> Self {
4485        std::default::Default::default()
4486    }
4487
4488    /// Sets the value of [name][crate::model::Application::name].
4489    ///
4490    /// # Example
4491    /// ```ignore,no_run
4492    /// # use google_cloud_appengine_v1::model::Application;
4493    /// let x = Application::new().set_name("example");
4494    /// ```
4495    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4496        self.name = v.into();
4497        self
4498    }
4499
4500    /// Sets the value of [id][crate::model::Application::id].
4501    ///
4502    /// # Example
4503    /// ```ignore,no_run
4504    /// # use google_cloud_appengine_v1::model::Application;
4505    /// let x = Application::new().set_id("example");
4506    /// ```
4507    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4508        self.id = v.into();
4509        self
4510    }
4511
4512    /// Sets the value of [dispatch_rules][crate::model::Application::dispatch_rules].
4513    ///
4514    /// # Example
4515    /// ```ignore,no_run
4516    /// # use google_cloud_appengine_v1::model::Application;
4517    /// use google_cloud_appengine_v1::model::UrlDispatchRule;
4518    /// let x = Application::new()
4519    ///     .set_dispatch_rules([
4520    ///         UrlDispatchRule::default()/* use setters */,
4521    ///         UrlDispatchRule::default()/* use (different) setters */,
4522    ///     ]);
4523    /// ```
4524    pub fn set_dispatch_rules<T, V>(mut self, v: T) -> Self
4525    where
4526        T: std::iter::IntoIterator<Item = V>,
4527        V: std::convert::Into<crate::model::UrlDispatchRule>,
4528    {
4529        use std::iter::Iterator;
4530        self.dispatch_rules = v.into_iter().map(|i| i.into()).collect();
4531        self
4532    }
4533
4534    /// Sets the value of [auth_domain][crate::model::Application::auth_domain].
4535    ///
4536    /// # Example
4537    /// ```ignore,no_run
4538    /// # use google_cloud_appengine_v1::model::Application;
4539    /// let x = Application::new().set_auth_domain("example");
4540    /// ```
4541    pub fn set_auth_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4542        self.auth_domain = v.into();
4543        self
4544    }
4545
4546    /// Sets the value of [location_id][crate::model::Application::location_id].
4547    ///
4548    /// # Example
4549    /// ```ignore,no_run
4550    /// # use google_cloud_appengine_v1::model::Application;
4551    /// let x = Application::new().set_location_id("example");
4552    /// ```
4553    pub fn set_location_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4554        self.location_id = v.into();
4555        self
4556    }
4557
4558    /// Sets the value of [code_bucket][crate::model::Application::code_bucket].
4559    ///
4560    /// # Example
4561    /// ```ignore,no_run
4562    /// # use google_cloud_appengine_v1::model::Application;
4563    /// let x = Application::new().set_code_bucket("example");
4564    /// ```
4565    pub fn set_code_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4566        self.code_bucket = v.into();
4567        self
4568    }
4569
4570    /// Sets the value of [default_cookie_expiration][crate::model::Application::default_cookie_expiration].
4571    ///
4572    /// # Example
4573    /// ```ignore,no_run
4574    /// # use google_cloud_appengine_v1::model::Application;
4575    /// use wkt::Duration;
4576    /// let x = Application::new().set_default_cookie_expiration(Duration::default()/* use setters */);
4577    /// ```
4578    pub fn set_default_cookie_expiration<T>(mut self, v: T) -> Self
4579    where
4580        T: std::convert::Into<wkt::Duration>,
4581    {
4582        self.default_cookie_expiration = std::option::Option::Some(v.into());
4583        self
4584    }
4585
4586    /// Sets or clears the value of [default_cookie_expiration][crate::model::Application::default_cookie_expiration].
4587    ///
4588    /// # Example
4589    /// ```ignore,no_run
4590    /// # use google_cloud_appengine_v1::model::Application;
4591    /// use wkt::Duration;
4592    /// let x = Application::new().set_or_clear_default_cookie_expiration(Some(Duration::default()/* use setters */));
4593    /// let x = Application::new().set_or_clear_default_cookie_expiration(None::<Duration>);
4594    /// ```
4595    pub fn set_or_clear_default_cookie_expiration<T>(mut self, v: std::option::Option<T>) -> Self
4596    where
4597        T: std::convert::Into<wkt::Duration>,
4598    {
4599        self.default_cookie_expiration = v.map(|x| x.into());
4600        self
4601    }
4602
4603    /// Sets the value of [serving_status][crate::model::Application::serving_status].
4604    ///
4605    /// # Example
4606    /// ```ignore,no_run
4607    /// # use google_cloud_appengine_v1::model::Application;
4608    /// use google_cloud_appengine_v1::model::application::ServingStatus;
4609    /// let x0 = Application::new().set_serving_status(ServingStatus::Serving);
4610    /// let x1 = Application::new().set_serving_status(ServingStatus::UserDisabled);
4611    /// let x2 = Application::new().set_serving_status(ServingStatus::SystemDisabled);
4612    /// ```
4613    pub fn set_serving_status<T: std::convert::Into<crate::model::application::ServingStatus>>(
4614        mut self,
4615        v: T,
4616    ) -> Self {
4617        self.serving_status = v.into();
4618        self
4619    }
4620
4621    /// Sets the value of [default_hostname][crate::model::Application::default_hostname].
4622    ///
4623    /// # Example
4624    /// ```ignore,no_run
4625    /// # use google_cloud_appengine_v1::model::Application;
4626    /// let x = Application::new().set_default_hostname("example");
4627    /// ```
4628    pub fn set_default_hostname<T: std::convert::Into<std::string::String>>(
4629        mut self,
4630        v: T,
4631    ) -> Self {
4632        self.default_hostname = v.into();
4633        self
4634    }
4635
4636    /// Sets the value of [default_bucket][crate::model::Application::default_bucket].
4637    ///
4638    /// # Example
4639    /// ```ignore,no_run
4640    /// # use google_cloud_appengine_v1::model::Application;
4641    /// let x = Application::new().set_default_bucket("example");
4642    /// ```
4643    pub fn set_default_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4644        self.default_bucket = v.into();
4645        self
4646    }
4647
4648    /// Sets the value of [service_account][crate::model::Application::service_account].
4649    ///
4650    /// # Example
4651    /// ```ignore,no_run
4652    /// # use google_cloud_appengine_v1::model::Application;
4653    /// let x = Application::new().set_service_account("example");
4654    /// ```
4655    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4656        self.service_account = v.into();
4657        self
4658    }
4659
4660    /// Sets the value of [iap][crate::model::Application::iap].
4661    ///
4662    /// # Example
4663    /// ```ignore,no_run
4664    /// # use google_cloud_appengine_v1::model::Application;
4665    /// use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4666    /// let x = Application::new().set_iap(IdentityAwareProxy::default()/* use setters */);
4667    /// ```
4668    pub fn set_iap<T>(mut self, v: T) -> Self
4669    where
4670        T: std::convert::Into<crate::model::application::IdentityAwareProxy>,
4671    {
4672        self.iap = std::option::Option::Some(v.into());
4673        self
4674    }
4675
4676    /// Sets or clears the value of [iap][crate::model::Application::iap].
4677    ///
4678    /// # Example
4679    /// ```ignore,no_run
4680    /// # use google_cloud_appengine_v1::model::Application;
4681    /// use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4682    /// let x = Application::new().set_or_clear_iap(Some(IdentityAwareProxy::default()/* use setters */));
4683    /// let x = Application::new().set_or_clear_iap(None::<IdentityAwareProxy>);
4684    /// ```
4685    pub fn set_or_clear_iap<T>(mut self, v: std::option::Option<T>) -> Self
4686    where
4687        T: std::convert::Into<crate::model::application::IdentityAwareProxy>,
4688    {
4689        self.iap = v.map(|x| x.into());
4690        self
4691    }
4692
4693    /// Sets the value of [gcr_domain][crate::model::Application::gcr_domain].
4694    ///
4695    /// # Example
4696    /// ```ignore,no_run
4697    /// # use google_cloud_appengine_v1::model::Application;
4698    /// let x = Application::new().set_gcr_domain("example");
4699    /// ```
4700    pub fn set_gcr_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4701        self.gcr_domain = v.into();
4702        self
4703    }
4704
4705    /// Sets the value of [database_type][crate::model::Application::database_type].
4706    ///
4707    /// # Example
4708    /// ```ignore,no_run
4709    /// # use google_cloud_appengine_v1::model::Application;
4710    /// use google_cloud_appengine_v1::model::application::DatabaseType;
4711    /// let x0 = Application::new().set_database_type(DatabaseType::CloudDatastore);
4712    /// let x1 = Application::new().set_database_type(DatabaseType::CloudFirestore);
4713    /// let x2 = Application::new().set_database_type(DatabaseType::CloudDatastoreCompatibility);
4714    /// ```
4715    pub fn set_database_type<T: std::convert::Into<crate::model::application::DatabaseType>>(
4716        mut self,
4717        v: T,
4718    ) -> Self {
4719        self.database_type = v.into();
4720        self
4721    }
4722
4723    /// Sets the value of [feature_settings][crate::model::Application::feature_settings].
4724    ///
4725    /// # Example
4726    /// ```ignore,no_run
4727    /// # use google_cloud_appengine_v1::model::Application;
4728    /// use google_cloud_appengine_v1::model::application::FeatureSettings;
4729    /// let x = Application::new().set_feature_settings(FeatureSettings::default()/* use setters */);
4730    /// ```
4731    pub fn set_feature_settings<T>(mut self, v: T) -> Self
4732    where
4733        T: std::convert::Into<crate::model::application::FeatureSettings>,
4734    {
4735        self.feature_settings = std::option::Option::Some(v.into());
4736        self
4737    }
4738
4739    /// Sets or clears the value of [feature_settings][crate::model::Application::feature_settings].
4740    ///
4741    /// # Example
4742    /// ```ignore,no_run
4743    /// # use google_cloud_appengine_v1::model::Application;
4744    /// use google_cloud_appengine_v1::model::application::FeatureSettings;
4745    /// let x = Application::new().set_or_clear_feature_settings(Some(FeatureSettings::default()/* use setters */));
4746    /// let x = Application::new().set_or_clear_feature_settings(None::<FeatureSettings>);
4747    /// ```
4748    pub fn set_or_clear_feature_settings<T>(mut self, v: std::option::Option<T>) -> Self
4749    where
4750        T: std::convert::Into<crate::model::application::FeatureSettings>,
4751    {
4752        self.feature_settings = v.map(|x| x.into());
4753        self
4754    }
4755}
4756
4757impl wkt::message::Message for Application {
4758    fn typename() -> &'static str {
4759        "type.googleapis.com/google.appengine.v1.Application"
4760    }
4761}
4762
4763/// Defines additional types related to [Application].
4764pub mod application {
4765    #[allow(unused_imports)]
4766    use super::*;
4767
4768    /// Identity-Aware Proxy
4769    #[derive(Clone, Default, PartialEq)]
4770    #[non_exhaustive]
4771    pub struct IdentityAwareProxy {
4772        /// Whether the serving infrastructure will authenticate and
4773        /// authorize all incoming requests.
4774        ///
4775        /// If true, the `oauth2_client_id` and `oauth2_client_secret`
4776        /// fields must be non-empty.
4777        pub enabled: bool,
4778
4779        /// OAuth2 client ID to use for the authentication flow.
4780        pub oauth2_client_id: std::string::String,
4781
4782        /// OAuth2 client secret to use for the authentication flow.
4783        ///
4784        /// For security reasons, this value cannot be retrieved via the API.
4785        /// Instead, the SHA-256 hash of the value is returned in the
4786        /// `oauth2_client_secret_sha256` field.
4787        ///
4788        /// @InputOnly
4789        pub oauth2_client_secret: std::string::String,
4790
4791        /// Hex-encoded SHA-256 hash of the client secret.
4792        ///
4793        /// @OutputOnly
4794        pub oauth2_client_secret_sha256: std::string::String,
4795
4796        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4797    }
4798
4799    impl IdentityAwareProxy {
4800        pub fn new() -> Self {
4801            std::default::Default::default()
4802        }
4803
4804        /// Sets the value of [enabled][crate::model::application::IdentityAwareProxy::enabled].
4805        ///
4806        /// # Example
4807        /// ```ignore,no_run
4808        /// # use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4809        /// let x = IdentityAwareProxy::new().set_enabled(true);
4810        /// ```
4811        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4812            self.enabled = v.into();
4813            self
4814        }
4815
4816        /// Sets the value of [oauth2_client_id][crate::model::application::IdentityAwareProxy::oauth2_client_id].
4817        ///
4818        /// # Example
4819        /// ```ignore,no_run
4820        /// # use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4821        /// let x = IdentityAwareProxy::new().set_oauth2_client_id("example");
4822        /// ```
4823        pub fn set_oauth2_client_id<T: std::convert::Into<std::string::String>>(
4824            mut self,
4825            v: T,
4826        ) -> Self {
4827            self.oauth2_client_id = v.into();
4828            self
4829        }
4830
4831        /// Sets the value of [oauth2_client_secret][crate::model::application::IdentityAwareProxy::oauth2_client_secret].
4832        ///
4833        /// # Example
4834        /// ```ignore,no_run
4835        /// # use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4836        /// let x = IdentityAwareProxy::new().set_oauth2_client_secret("example");
4837        /// ```
4838        pub fn set_oauth2_client_secret<T: std::convert::Into<std::string::String>>(
4839            mut self,
4840            v: T,
4841        ) -> Self {
4842            self.oauth2_client_secret = v.into();
4843            self
4844        }
4845
4846        /// Sets the value of [oauth2_client_secret_sha256][crate::model::application::IdentityAwareProxy::oauth2_client_secret_sha256].
4847        ///
4848        /// # Example
4849        /// ```ignore,no_run
4850        /// # use google_cloud_appengine_v1::model::application::IdentityAwareProxy;
4851        /// let x = IdentityAwareProxy::new().set_oauth2_client_secret_sha256("example");
4852        /// ```
4853        pub fn set_oauth2_client_secret_sha256<T: std::convert::Into<std::string::String>>(
4854            mut self,
4855            v: T,
4856        ) -> Self {
4857            self.oauth2_client_secret_sha256 = v.into();
4858            self
4859        }
4860    }
4861
4862    impl wkt::message::Message for IdentityAwareProxy {
4863        fn typename() -> &'static str {
4864            "type.googleapis.com/google.appengine.v1.Application.IdentityAwareProxy"
4865        }
4866    }
4867
4868    /// The feature specific settings to be used in the application. These define
4869    /// behaviors that are user configurable.
4870    #[derive(Clone, Default, PartialEq)]
4871    #[non_exhaustive]
4872    pub struct FeatureSettings {
4873        /// Boolean value indicating if split health checks should be used instead
4874        /// of the legacy health checks. At an app.yaml level, this means defaulting
4875        /// to 'readiness_check' and 'liveness_check' values instead of
4876        /// 'health_check' ones. Once the legacy 'health_check' behavior is
4877        /// deprecated, and this value is always true, this setting can
4878        /// be removed.
4879        pub split_health_checks: bool,
4880
4881        /// If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/)
4882        /// base image for VMs, rather than a base Debian image.
4883        pub use_container_optimized_os: bool,
4884
4885        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4886    }
4887
4888    impl FeatureSettings {
4889        pub fn new() -> Self {
4890            std::default::Default::default()
4891        }
4892
4893        /// Sets the value of [split_health_checks][crate::model::application::FeatureSettings::split_health_checks].
4894        ///
4895        /// # Example
4896        /// ```ignore,no_run
4897        /// # use google_cloud_appengine_v1::model::application::FeatureSettings;
4898        /// let x = FeatureSettings::new().set_split_health_checks(true);
4899        /// ```
4900        pub fn set_split_health_checks<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4901            self.split_health_checks = v.into();
4902            self
4903        }
4904
4905        /// Sets the value of [use_container_optimized_os][crate::model::application::FeatureSettings::use_container_optimized_os].
4906        ///
4907        /// # Example
4908        /// ```ignore,no_run
4909        /// # use google_cloud_appengine_v1::model::application::FeatureSettings;
4910        /// let x = FeatureSettings::new().set_use_container_optimized_os(true);
4911        /// ```
4912        pub fn set_use_container_optimized_os<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4913            self.use_container_optimized_os = v.into();
4914            self
4915        }
4916    }
4917
4918    impl wkt::message::Message for FeatureSettings {
4919        fn typename() -> &'static str {
4920            "type.googleapis.com/google.appengine.v1.Application.FeatureSettings"
4921        }
4922    }
4923
4924    ///
4925    /// # Working with unknown values
4926    ///
4927    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4928    /// additional enum variants at any time. Adding new variants is not considered
4929    /// a breaking change. Applications should write their code in anticipation of:
4930    ///
4931    /// - New values appearing in future releases of the client library, **and**
4932    /// - New values received dynamically, without application changes.
4933    ///
4934    /// Please consult the [Working with enums] section in the user guide for some
4935    /// guidelines.
4936    ///
4937    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4938    #[derive(Clone, Debug, PartialEq)]
4939    #[non_exhaustive]
4940    pub enum ServingStatus {
4941        /// Serving status is unspecified.
4942        Unspecified,
4943        /// Application is serving.
4944        Serving,
4945        /// Application has been disabled by the user.
4946        UserDisabled,
4947        /// Application has been disabled by the system.
4948        SystemDisabled,
4949        /// If set, the enum was initialized with an unknown value.
4950        ///
4951        /// Applications can examine the value using [ServingStatus::value] or
4952        /// [ServingStatus::name].
4953        UnknownValue(serving_status::UnknownValue),
4954    }
4955
4956    #[doc(hidden)]
4957    pub mod serving_status {
4958        #[allow(unused_imports)]
4959        use super::*;
4960        #[derive(Clone, Debug, PartialEq)]
4961        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4962    }
4963
4964    impl ServingStatus {
4965        /// Gets the enum value.
4966        ///
4967        /// Returns `None` if the enum contains an unknown value deserialized from
4968        /// the string representation of enums.
4969        pub fn value(&self) -> std::option::Option<i32> {
4970            match self {
4971                Self::Unspecified => std::option::Option::Some(0),
4972                Self::Serving => std::option::Option::Some(1),
4973                Self::UserDisabled => std::option::Option::Some(2),
4974                Self::SystemDisabled => std::option::Option::Some(3),
4975                Self::UnknownValue(u) => u.0.value(),
4976            }
4977        }
4978
4979        /// Gets the enum value as a string.
4980        ///
4981        /// Returns `None` if the enum contains an unknown value deserialized from
4982        /// the integer representation of enums.
4983        pub fn name(&self) -> std::option::Option<&str> {
4984            match self {
4985                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
4986                Self::Serving => std::option::Option::Some("SERVING"),
4987                Self::UserDisabled => std::option::Option::Some("USER_DISABLED"),
4988                Self::SystemDisabled => std::option::Option::Some("SYSTEM_DISABLED"),
4989                Self::UnknownValue(u) => u.0.name(),
4990            }
4991        }
4992    }
4993
4994    impl std::default::Default for ServingStatus {
4995        fn default() -> Self {
4996            use std::convert::From;
4997            Self::from(0)
4998        }
4999    }
5000
5001    impl std::fmt::Display for ServingStatus {
5002        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5003            wkt::internal::display_enum(f, self.name(), self.value())
5004        }
5005    }
5006
5007    impl std::convert::From<i32> for ServingStatus {
5008        fn from(value: i32) -> Self {
5009            match value {
5010                0 => Self::Unspecified,
5011                1 => Self::Serving,
5012                2 => Self::UserDisabled,
5013                3 => Self::SystemDisabled,
5014                _ => Self::UnknownValue(serving_status::UnknownValue(
5015                    wkt::internal::UnknownEnumValue::Integer(value),
5016                )),
5017            }
5018        }
5019    }
5020
5021    impl std::convert::From<&str> for ServingStatus {
5022        fn from(value: &str) -> Self {
5023            use std::string::ToString;
5024            match value {
5025                "UNSPECIFIED" => Self::Unspecified,
5026                "SERVING" => Self::Serving,
5027                "USER_DISABLED" => Self::UserDisabled,
5028                "SYSTEM_DISABLED" => Self::SystemDisabled,
5029                _ => Self::UnknownValue(serving_status::UnknownValue(
5030                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5031                )),
5032            }
5033        }
5034    }
5035
5036    impl serde::ser::Serialize for ServingStatus {
5037        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5038        where
5039            S: serde::Serializer,
5040        {
5041            match self {
5042                Self::Unspecified => serializer.serialize_i32(0),
5043                Self::Serving => serializer.serialize_i32(1),
5044                Self::UserDisabled => serializer.serialize_i32(2),
5045                Self::SystemDisabled => serializer.serialize_i32(3),
5046                Self::UnknownValue(u) => u.0.serialize(serializer),
5047            }
5048        }
5049    }
5050
5051    impl<'de> serde::de::Deserialize<'de> for ServingStatus {
5052        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5053        where
5054            D: serde::Deserializer<'de>,
5055        {
5056            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServingStatus>::new(
5057                ".google.appengine.v1.Application.ServingStatus",
5058            ))
5059        }
5060    }
5061
5062    ///
5063    /// # Working with unknown values
5064    ///
5065    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5066    /// additional enum variants at any time. Adding new variants is not considered
5067    /// a breaking change. Applications should write their code in anticipation of:
5068    ///
5069    /// - New values appearing in future releases of the client library, **and**
5070    /// - New values received dynamically, without application changes.
5071    ///
5072    /// Please consult the [Working with enums] section in the user guide for some
5073    /// guidelines.
5074    ///
5075    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5076    #[derive(Clone, Debug, PartialEq)]
5077    #[non_exhaustive]
5078    pub enum DatabaseType {
5079        /// Database type is unspecified.
5080        Unspecified,
5081        /// Cloud Datastore
5082        CloudDatastore,
5083        /// Cloud Firestore Native
5084        CloudFirestore,
5085        /// Cloud Firestore in Datastore Mode
5086        CloudDatastoreCompatibility,
5087        /// If set, the enum was initialized with an unknown value.
5088        ///
5089        /// Applications can examine the value using [DatabaseType::value] or
5090        /// [DatabaseType::name].
5091        UnknownValue(database_type::UnknownValue),
5092    }
5093
5094    #[doc(hidden)]
5095    pub mod database_type {
5096        #[allow(unused_imports)]
5097        use super::*;
5098        #[derive(Clone, Debug, PartialEq)]
5099        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5100    }
5101
5102    impl DatabaseType {
5103        /// Gets the enum value.
5104        ///
5105        /// Returns `None` if the enum contains an unknown value deserialized from
5106        /// the string representation of enums.
5107        pub fn value(&self) -> std::option::Option<i32> {
5108            match self {
5109                Self::Unspecified => std::option::Option::Some(0),
5110                Self::CloudDatastore => std::option::Option::Some(1),
5111                Self::CloudFirestore => std::option::Option::Some(2),
5112                Self::CloudDatastoreCompatibility => std::option::Option::Some(3),
5113                Self::UnknownValue(u) => u.0.value(),
5114            }
5115        }
5116
5117        /// Gets the enum value as a string.
5118        ///
5119        /// Returns `None` if the enum contains an unknown value deserialized from
5120        /// the integer representation of enums.
5121        pub fn name(&self) -> std::option::Option<&str> {
5122            match self {
5123                Self::Unspecified => std::option::Option::Some("DATABASE_TYPE_UNSPECIFIED"),
5124                Self::CloudDatastore => std::option::Option::Some("CLOUD_DATASTORE"),
5125                Self::CloudFirestore => std::option::Option::Some("CLOUD_FIRESTORE"),
5126                Self::CloudDatastoreCompatibility => {
5127                    std::option::Option::Some("CLOUD_DATASTORE_COMPATIBILITY")
5128                }
5129                Self::UnknownValue(u) => u.0.name(),
5130            }
5131        }
5132    }
5133
5134    impl std::default::Default for DatabaseType {
5135        fn default() -> Self {
5136            use std::convert::From;
5137            Self::from(0)
5138        }
5139    }
5140
5141    impl std::fmt::Display for DatabaseType {
5142        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5143            wkt::internal::display_enum(f, self.name(), self.value())
5144        }
5145    }
5146
5147    impl std::convert::From<i32> for DatabaseType {
5148        fn from(value: i32) -> Self {
5149            match value {
5150                0 => Self::Unspecified,
5151                1 => Self::CloudDatastore,
5152                2 => Self::CloudFirestore,
5153                3 => Self::CloudDatastoreCompatibility,
5154                _ => Self::UnknownValue(database_type::UnknownValue(
5155                    wkt::internal::UnknownEnumValue::Integer(value),
5156                )),
5157            }
5158        }
5159    }
5160
5161    impl std::convert::From<&str> for DatabaseType {
5162        fn from(value: &str) -> Self {
5163            use std::string::ToString;
5164            match value {
5165                "DATABASE_TYPE_UNSPECIFIED" => Self::Unspecified,
5166                "CLOUD_DATASTORE" => Self::CloudDatastore,
5167                "CLOUD_FIRESTORE" => Self::CloudFirestore,
5168                "CLOUD_DATASTORE_COMPATIBILITY" => Self::CloudDatastoreCompatibility,
5169                _ => Self::UnknownValue(database_type::UnknownValue(
5170                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5171                )),
5172            }
5173        }
5174    }
5175
5176    impl serde::ser::Serialize for DatabaseType {
5177        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5178        where
5179            S: serde::Serializer,
5180        {
5181            match self {
5182                Self::Unspecified => serializer.serialize_i32(0),
5183                Self::CloudDatastore => serializer.serialize_i32(1),
5184                Self::CloudFirestore => serializer.serialize_i32(2),
5185                Self::CloudDatastoreCompatibility => serializer.serialize_i32(3),
5186                Self::UnknownValue(u) => u.0.serialize(serializer),
5187            }
5188        }
5189    }
5190
5191    impl<'de> serde::de::Deserialize<'de> for DatabaseType {
5192        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5193        where
5194            D: serde::Deserializer<'de>,
5195        {
5196            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseType>::new(
5197                ".google.appengine.v1.Application.DatabaseType",
5198            ))
5199        }
5200    }
5201}
5202
5203/// Rules to match an HTTP request and dispatch that request to a service.
5204#[derive(Clone, Default, PartialEq)]
5205#[non_exhaustive]
5206pub struct UrlDispatchRule {
5207    /// Domain name to match against. The wildcard "`*`" is supported if
5208    /// specified before a period: "`*.`".
5209    ///
5210    /// Defaults to matching all domains: "`*`".
5211    pub domain: std::string::String,
5212
5213    /// Pathname within the host. Must start with a "`/`". A
5214    /// single "`*`" can be included at the end of the path.
5215    ///
5216    /// The sum of the lengths of the domain and path may not
5217    /// exceed 100 characters.
5218    pub path: std::string::String,
5219
5220    /// Resource ID of a service in this application that should
5221    /// serve the matched request. The service must already
5222    /// exist. Example: `default`.
5223    pub service: std::string::String,
5224
5225    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5226}
5227
5228impl UrlDispatchRule {
5229    pub fn new() -> Self {
5230        std::default::Default::default()
5231    }
5232
5233    /// Sets the value of [domain][crate::model::UrlDispatchRule::domain].
5234    ///
5235    /// # Example
5236    /// ```ignore,no_run
5237    /// # use google_cloud_appengine_v1::model::UrlDispatchRule;
5238    /// let x = UrlDispatchRule::new().set_domain("example");
5239    /// ```
5240    pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5241        self.domain = v.into();
5242        self
5243    }
5244
5245    /// Sets the value of [path][crate::model::UrlDispatchRule::path].
5246    ///
5247    /// # Example
5248    /// ```ignore,no_run
5249    /// # use google_cloud_appengine_v1::model::UrlDispatchRule;
5250    /// let x = UrlDispatchRule::new().set_path("example");
5251    /// ```
5252    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5253        self.path = v.into();
5254        self
5255    }
5256
5257    /// Sets the value of [service][crate::model::UrlDispatchRule::service].
5258    ///
5259    /// # Example
5260    /// ```ignore,no_run
5261    /// # use google_cloud_appengine_v1::model::UrlDispatchRule;
5262    /// let x = UrlDispatchRule::new().set_service("example");
5263    /// ```
5264    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5265        self.service = v.into();
5266        self
5267    }
5268}
5269
5270impl wkt::message::Message for UrlDispatchRule {
5271    fn typename() -> &'static str {
5272        "type.googleapis.com/google.appengine.v1.UrlDispatchRule"
5273    }
5274}
5275
5276/// App Engine admin service audit log.
5277#[derive(Clone, Default, PartialEq)]
5278#[non_exhaustive]
5279pub struct AuditData {
5280    /// Detailed information about methods that require it. Does not include
5281    /// simple Get, List or Delete methods because all significant information
5282    /// (resource name, number of returned elements for List operations) is already
5283    /// included in parent audit log message.
5284    pub method: std::option::Option<crate::model::audit_data::Method>,
5285
5286    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5287}
5288
5289impl AuditData {
5290    pub fn new() -> Self {
5291        std::default::Default::default()
5292    }
5293
5294    /// Sets the value of [method][crate::model::AuditData::method].
5295    ///
5296    /// Note that all the setters affecting `method` are mutually
5297    /// exclusive.
5298    ///
5299    /// # Example
5300    /// ```ignore,no_run
5301    /// # use google_cloud_appengine_v1::model::AuditData;
5302    /// use google_cloud_appengine_v1::model::UpdateServiceMethod;
5303    /// let x = AuditData::new().set_method(Some(
5304    ///     google_cloud_appengine_v1::model::audit_data::Method::UpdateService(UpdateServiceMethod::default().into())));
5305    /// ```
5306    pub fn set_method<
5307        T: std::convert::Into<std::option::Option<crate::model::audit_data::Method>>,
5308    >(
5309        mut self,
5310        v: T,
5311    ) -> Self {
5312        self.method = v.into();
5313        self
5314    }
5315
5316    /// The value of [method][crate::model::AuditData::method]
5317    /// if it holds a `UpdateService`, `None` if the field is not set or
5318    /// holds a different branch.
5319    pub fn update_service(
5320        &self,
5321    ) -> std::option::Option<&std::boxed::Box<crate::model::UpdateServiceMethod>> {
5322        #[allow(unreachable_patterns)]
5323        self.method.as_ref().and_then(|v| match v {
5324            crate::model::audit_data::Method::UpdateService(v) => std::option::Option::Some(v),
5325            _ => std::option::Option::None,
5326        })
5327    }
5328
5329    /// Sets the value of [method][crate::model::AuditData::method]
5330    /// to hold a `UpdateService`.
5331    ///
5332    /// Note that all the setters affecting `method` are
5333    /// mutually exclusive.
5334    ///
5335    /// # Example
5336    /// ```ignore,no_run
5337    /// # use google_cloud_appengine_v1::model::AuditData;
5338    /// use google_cloud_appengine_v1::model::UpdateServiceMethod;
5339    /// let x = AuditData::new().set_update_service(UpdateServiceMethod::default()/* use setters */);
5340    /// assert!(x.update_service().is_some());
5341    /// assert!(x.create_version().is_none());
5342    /// ```
5343    pub fn set_update_service<
5344        T: std::convert::Into<std::boxed::Box<crate::model::UpdateServiceMethod>>,
5345    >(
5346        mut self,
5347        v: T,
5348    ) -> Self {
5349        self.method =
5350            std::option::Option::Some(crate::model::audit_data::Method::UpdateService(v.into()));
5351        self
5352    }
5353
5354    /// The value of [method][crate::model::AuditData::method]
5355    /// if it holds a `CreateVersion`, `None` if the field is not set or
5356    /// holds a different branch.
5357    pub fn create_version(
5358        &self,
5359    ) -> std::option::Option<&std::boxed::Box<crate::model::CreateVersionMethod>> {
5360        #[allow(unreachable_patterns)]
5361        self.method.as_ref().and_then(|v| match v {
5362            crate::model::audit_data::Method::CreateVersion(v) => std::option::Option::Some(v),
5363            _ => std::option::Option::None,
5364        })
5365    }
5366
5367    /// Sets the value of [method][crate::model::AuditData::method]
5368    /// to hold a `CreateVersion`.
5369    ///
5370    /// Note that all the setters affecting `method` are
5371    /// mutually exclusive.
5372    ///
5373    /// # Example
5374    /// ```ignore,no_run
5375    /// # use google_cloud_appengine_v1::model::AuditData;
5376    /// use google_cloud_appengine_v1::model::CreateVersionMethod;
5377    /// let x = AuditData::new().set_create_version(CreateVersionMethod::default()/* use setters */);
5378    /// assert!(x.create_version().is_some());
5379    /// assert!(x.update_service().is_none());
5380    /// ```
5381    pub fn set_create_version<
5382        T: std::convert::Into<std::boxed::Box<crate::model::CreateVersionMethod>>,
5383    >(
5384        mut self,
5385        v: T,
5386    ) -> Self {
5387        self.method =
5388            std::option::Option::Some(crate::model::audit_data::Method::CreateVersion(v.into()));
5389        self
5390    }
5391}
5392
5393impl wkt::message::Message for AuditData {
5394    fn typename() -> &'static str {
5395        "type.googleapis.com/google.appengine.v1.AuditData"
5396    }
5397}
5398
5399/// Defines additional types related to [AuditData].
5400pub mod audit_data {
5401    #[allow(unused_imports)]
5402    use super::*;
5403
5404    /// Detailed information about methods that require it. Does not include
5405    /// simple Get, List or Delete methods because all significant information
5406    /// (resource name, number of returned elements for List operations) is already
5407    /// included in parent audit log message.
5408    #[derive(Clone, Debug, PartialEq)]
5409    #[non_exhaustive]
5410    pub enum Method {
5411        /// Detailed information about UpdateService call.
5412        UpdateService(std::boxed::Box<crate::model::UpdateServiceMethod>),
5413        /// Detailed information about CreateVersion call.
5414        CreateVersion(std::boxed::Box<crate::model::CreateVersionMethod>),
5415    }
5416}
5417
5418/// Detailed information about UpdateService call.
5419#[derive(Clone, Default, PartialEq)]
5420#[non_exhaustive]
5421pub struct UpdateServiceMethod {
5422    /// Update service request.
5423    pub request: std::option::Option<crate::model::UpdateServiceRequest>,
5424
5425    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5426}
5427
5428impl UpdateServiceMethod {
5429    pub fn new() -> Self {
5430        std::default::Default::default()
5431    }
5432
5433    /// Sets the value of [request][crate::model::UpdateServiceMethod::request].
5434    ///
5435    /// # Example
5436    /// ```ignore,no_run
5437    /// # use google_cloud_appengine_v1::model::UpdateServiceMethod;
5438    /// use google_cloud_appengine_v1::model::UpdateServiceRequest;
5439    /// let x = UpdateServiceMethod::new().set_request(UpdateServiceRequest::default()/* use setters */);
5440    /// ```
5441    pub fn set_request<T>(mut self, v: T) -> Self
5442    where
5443        T: std::convert::Into<crate::model::UpdateServiceRequest>,
5444    {
5445        self.request = std::option::Option::Some(v.into());
5446        self
5447    }
5448
5449    /// Sets or clears the value of [request][crate::model::UpdateServiceMethod::request].
5450    ///
5451    /// # Example
5452    /// ```ignore,no_run
5453    /// # use google_cloud_appengine_v1::model::UpdateServiceMethod;
5454    /// use google_cloud_appengine_v1::model::UpdateServiceRequest;
5455    /// let x = UpdateServiceMethod::new().set_or_clear_request(Some(UpdateServiceRequest::default()/* use setters */));
5456    /// let x = UpdateServiceMethod::new().set_or_clear_request(None::<UpdateServiceRequest>);
5457    /// ```
5458    pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
5459    where
5460        T: std::convert::Into<crate::model::UpdateServiceRequest>,
5461    {
5462        self.request = v.map(|x| x.into());
5463        self
5464    }
5465}
5466
5467impl wkt::message::Message for UpdateServiceMethod {
5468    fn typename() -> &'static str {
5469        "type.googleapis.com/google.appengine.v1.UpdateServiceMethod"
5470    }
5471}
5472
5473/// Detailed information about CreateVersion call.
5474#[derive(Clone, Default, PartialEq)]
5475#[non_exhaustive]
5476pub struct CreateVersionMethod {
5477    /// Create version request.
5478    pub request: std::option::Option<crate::model::CreateVersionRequest>,
5479
5480    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5481}
5482
5483impl CreateVersionMethod {
5484    pub fn new() -> Self {
5485        std::default::Default::default()
5486    }
5487
5488    /// Sets the value of [request][crate::model::CreateVersionMethod::request].
5489    ///
5490    /// # Example
5491    /// ```ignore,no_run
5492    /// # use google_cloud_appengine_v1::model::CreateVersionMethod;
5493    /// use google_cloud_appengine_v1::model::CreateVersionRequest;
5494    /// let x = CreateVersionMethod::new().set_request(CreateVersionRequest::default()/* use setters */);
5495    /// ```
5496    pub fn set_request<T>(mut self, v: T) -> Self
5497    where
5498        T: std::convert::Into<crate::model::CreateVersionRequest>,
5499    {
5500        self.request = std::option::Option::Some(v.into());
5501        self
5502    }
5503
5504    /// Sets or clears the value of [request][crate::model::CreateVersionMethod::request].
5505    ///
5506    /// # Example
5507    /// ```ignore,no_run
5508    /// # use google_cloud_appengine_v1::model::CreateVersionMethod;
5509    /// use google_cloud_appengine_v1::model::CreateVersionRequest;
5510    /// let x = CreateVersionMethod::new().set_or_clear_request(Some(CreateVersionRequest::default()/* use setters */));
5511    /// let x = CreateVersionMethod::new().set_or_clear_request(None::<CreateVersionRequest>);
5512    /// ```
5513    pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
5514    where
5515        T: std::convert::Into<crate::model::CreateVersionRequest>,
5516    {
5517        self.request = v.map(|x| x.into());
5518        self
5519    }
5520}
5521
5522impl wkt::message::Message for CreateVersionMethod {
5523    fn typename() -> &'static str {
5524        "type.googleapis.com/google.appengine.v1.CreateVersionMethod"
5525    }
5526}
5527
5528/// An SSL certificate that a user has been authorized to administer. A user
5529/// is authorized to administer any certificate that applies to one of their
5530/// authorized domains.
5531#[derive(Clone, Default, PartialEq)]
5532#[non_exhaustive]
5533pub struct AuthorizedCertificate {
5534    /// Full path to the `AuthorizedCertificate` resource in the API. Example:
5535    /// `apps/myapp/authorizedCertificates/12345`.
5536    ///
5537    /// @OutputOnly
5538    pub name: std::string::String,
5539
5540    /// Relative name of the certificate. This is a unique value autogenerated
5541    /// on `AuthorizedCertificate` resource creation. Example: `12345`.
5542    ///
5543    /// @OutputOnly
5544    pub id: std::string::String,
5545
5546    /// The user-specified display name of the certificate. This is not
5547    /// guaranteed to be unique. Example: `My Certificate`.
5548    pub display_name: std::string::String,
5549
5550    /// Topmost applicable domains of this certificate. This certificate
5551    /// applies to these domains and their subdomains. Example: `example.com`.
5552    ///
5553    /// @OutputOnly
5554    pub domain_names: std::vec::Vec<std::string::String>,
5555
5556    /// The time when this certificate expires. To update the renewal time on this
5557    /// certificate, upload an SSL certificate with a different expiration time
5558    /// using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
5559    ///
5560    /// @OutputOnly
5561    pub expire_time: std::option::Option<wkt::Timestamp>,
5562
5563    /// The SSL certificate serving the `AuthorizedCertificate` resource. This
5564    /// must be obtained independently from a certificate authority.
5565    pub certificate_raw_data: std::option::Option<crate::model::CertificateRawData>,
5566
5567    /// Only applicable if this certificate is managed by App Engine. Managed
5568    /// certificates are tied to the lifecycle of a `DomainMapping` and cannot be
5569    /// updated or deleted via the `AuthorizedCertificates` API. If this
5570    /// certificate is manually administered by the user, this field will be empty.
5571    ///
5572    /// @OutputOnly
5573    pub managed_certificate: std::option::Option<crate::model::ManagedCertificate>,
5574
5575    /// The full paths to user visible Domain Mapping resources that have this
5576    /// certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
5577    ///
5578    /// This may not represent the full list of mapped domain mappings if the user
5579    /// does not have `VIEWER` permissions on all of the applications that have
5580    /// this certificate mapped. See `domain_mappings_count` for a complete count.
5581    ///
5582    /// Only returned by `GET` or `LIST` requests when specifically requested by
5583    /// the `view=FULL_CERTIFICATE` option.
5584    ///
5585    /// @OutputOnly
5586    pub visible_domain_mappings: std::vec::Vec<std::string::String>,
5587
5588    /// Aggregate count of the domain mappings with this certificate mapped. This
5589    /// count includes domain mappings on applications for which the user does not
5590    /// have `VIEWER` permissions.
5591    ///
5592    /// Only returned by `GET` or `LIST` requests when specifically requested by
5593    /// the `view=FULL_CERTIFICATE` option.
5594    ///
5595    /// @OutputOnly
5596    pub domain_mappings_count: i32,
5597
5598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5599}
5600
5601impl AuthorizedCertificate {
5602    pub fn new() -> Self {
5603        std::default::Default::default()
5604    }
5605
5606    /// Sets the value of [name][crate::model::AuthorizedCertificate::name].
5607    ///
5608    /// # Example
5609    /// ```ignore,no_run
5610    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5611    /// let x = AuthorizedCertificate::new().set_name("example");
5612    /// ```
5613    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5614        self.name = v.into();
5615        self
5616    }
5617
5618    /// Sets the value of [id][crate::model::AuthorizedCertificate::id].
5619    ///
5620    /// # Example
5621    /// ```ignore,no_run
5622    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5623    /// let x = AuthorizedCertificate::new().set_id("example");
5624    /// ```
5625    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5626        self.id = v.into();
5627        self
5628    }
5629
5630    /// Sets the value of [display_name][crate::model::AuthorizedCertificate::display_name].
5631    ///
5632    /// # Example
5633    /// ```ignore,no_run
5634    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5635    /// let x = AuthorizedCertificate::new().set_display_name("example");
5636    /// ```
5637    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5638        self.display_name = v.into();
5639        self
5640    }
5641
5642    /// Sets the value of [domain_names][crate::model::AuthorizedCertificate::domain_names].
5643    ///
5644    /// # Example
5645    /// ```ignore,no_run
5646    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5647    /// let x = AuthorizedCertificate::new().set_domain_names(["a", "b", "c"]);
5648    /// ```
5649    pub fn set_domain_names<T, V>(mut self, v: T) -> Self
5650    where
5651        T: std::iter::IntoIterator<Item = V>,
5652        V: std::convert::Into<std::string::String>,
5653    {
5654        use std::iter::Iterator;
5655        self.domain_names = v.into_iter().map(|i| i.into()).collect();
5656        self
5657    }
5658
5659    /// Sets the value of [expire_time][crate::model::AuthorizedCertificate::expire_time].
5660    ///
5661    /// # Example
5662    /// ```ignore,no_run
5663    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5664    /// use wkt::Timestamp;
5665    /// let x = AuthorizedCertificate::new().set_expire_time(Timestamp::default()/* use setters */);
5666    /// ```
5667    pub fn set_expire_time<T>(mut self, v: T) -> Self
5668    where
5669        T: std::convert::Into<wkt::Timestamp>,
5670    {
5671        self.expire_time = std::option::Option::Some(v.into());
5672        self
5673    }
5674
5675    /// Sets or clears the value of [expire_time][crate::model::AuthorizedCertificate::expire_time].
5676    ///
5677    /// # Example
5678    /// ```ignore,no_run
5679    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5680    /// use wkt::Timestamp;
5681    /// let x = AuthorizedCertificate::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
5682    /// let x = AuthorizedCertificate::new().set_or_clear_expire_time(None::<Timestamp>);
5683    /// ```
5684    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
5685    where
5686        T: std::convert::Into<wkt::Timestamp>,
5687    {
5688        self.expire_time = v.map(|x| x.into());
5689        self
5690    }
5691
5692    /// Sets the value of [certificate_raw_data][crate::model::AuthorizedCertificate::certificate_raw_data].
5693    ///
5694    /// # Example
5695    /// ```ignore,no_run
5696    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5697    /// use google_cloud_appengine_v1::model::CertificateRawData;
5698    /// let x = AuthorizedCertificate::new().set_certificate_raw_data(CertificateRawData::default()/* use setters */);
5699    /// ```
5700    pub fn set_certificate_raw_data<T>(mut self, v: T) -> Self
5701    where
5702        T: std::convert::Into<crate::model::CertificateRawData>,
5703    {
5704        self.certificate_raw_data = std::option::Option::Some(v.into());
5705        self
5706    }
5707
5708    /// Sets or clears the value of [certificate_raw_data][crate::model::AuthorizedCertificate::certificate_raw_data].
5709    ///
5710    /// # Example
5711    /// ```ignore,no_run
5712    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5713    /// use google_cloud_appengine_v1::model::CertificateRawData;
5714    /// let x = AuthorizedCertificate::new().set_or_clear_certificate_raw_data(Some(CertificateRawData::default()/* use setters */));
5715    /// let x = AuthorizedCertificate::new().set_or_clear_certificate_raw_data(None::<CertificateRawData>);
5716    /// ```
5717    pub fn set_or_clear_certificate_raw_data<T>(mut self, v: std::option::Option<T>) -> Self
5718    where
5719        T: std::convert::Into<crate::model::CertificateRawData>,
5720    {
5721        self.certificate_raw_data = v.map(|x| x.into());
5722        self
5723    }
5724
5725    /// Sets the value of [managed_certificate][crate::model::AuthorizedCertificate::managed_certificate].
5726    ///
5727    /// # Example
5728    /// ```ignore,no_run
5729    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5730    /// use google_cloud_appengine_v1::model::ManagedCertificate;
5731    /// let x = AuthorizedCertificate::new().set_managed_certificate(ManagedCertificate::default()/* use setters */);
5732    /// ```
5733    pub fn set_managed_certificate<T>(mut self, v: T) -> Self
5734    where
5735        T: std::convert::Into<crate::model::ManagedCertificate>,
5736    {
5737        self.managed_certificate = std::option::Option::Some(v.into());
5738        self
5739    }
5740
5741    /// Sets or clears the value of [managed_certificate][crate::model::AuthorizedCertificate::managed_certificate].
5742    ///
5743    /// # Example
5744    /// ```ignore,no_run
5745    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5746    /// use google_cloud_appengine_v1::model::ManagedCertificate;
5747    /// let x = AuthorizedCertificate::new().set_or_clear_managed_certificate(Some(ManagedCertificate::default()/* use setters */));
5748    /// let x = AuthorizedCertificate::new().set_or_clear_managed_certificate(None::<ManagedCertificate>);
5749    /// ```
5750    pub fn set_or_clear_managed_certificate<T>(mut self, v: std::option::Option<T>) -> Self
5751    where
5752        T: std::convert::Into<crate::model::ManagedCertificate>,
5753    {
5754        self.managed_certificate = v.map(|x| x.into());
5755        self
5756    }
5757
5758    /// Sets the value of [visible_domain_mappings][crate::model::AuthorizedCertificate::visible_domain_mappings].
5759    ///
5760    /// # Example
5761    /// ```ignore,no_run
5762    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5763    /// let x = AuthorizedCertificate::new().set_visible_domain_mappings(["a", "b", "c"]);
5764    /// ```
5765    pub fn set_visible_domain_mappings<T, V>(mut self, v: T) -> Self
5766    where
5767        T: std::iter::IntoIterator<Item = V>,
5768        V: std::convert::Into<std::string::String>,
5769    {
5770        use std::iter::Iterator;
5771        self.visible_domain_mappings = v.into_iter().map(|i| i.into()).collect();
5772        self
5773    }
5774
5775    /// Sets the value of [domain_mappings_count][crate::model::AuthorizedCertificate::domain_mappings_count].
5776    ///
5777    /// # Example
5778    /// ```ignore,no_run
5779    /// # use google_cloud_appengine_v1::model::AuthorizedCertificate;
5780    /// let x = AuthorizedCertificate::new().set_domain_mappings_count(42);
5781    /// ```
5782    pub fn set_domain_mappings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5783        self.domain_mappings_count = v.into();
5784        self
5785    }
5786}
5787
5788impl wkt::message::Message for AuthorizedCertificate {
5789    fn typename() -> &'static str {
5790        "type.googleapis.com/google.appengine.v1.AuthorizedCertificate"
5791    }
5792}
5793
5794/// An SSL certificate obtained from a certificate authority.
5795#[derive(Clone, Default, PartialEq)]
5796#[non_exhaustive]
5797pub struct CertificateRawData {
5798    /// PEM encoded x.509 public key certificate. This field is set once on
5799    /// certificate creation. Must include the header and footer. Example:
5800    pub public_certificate: std::string::String,
5801
5802    /// Unencrypted PEM encoded RSA private key. This field is set once on
5803    /// certificate creation and then encrypted. The key size must be 2048
5804    /// bits or fewer. Must include the header and footer. Example:
5805    ///
5806    /// @InputOnly
5807    pub private_key: std::string::String,
5808
5809    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5810}
5811
5812impl CertificateRawData {
5813    pub fn new() -> Self {
5814        std::default::Default::default()
5815    }
5816
5817    /// Sets the value of [public_certificate][crate::model::CertificateRawData::public_certificate].
5818    ///
5819    /// # Example
5820    /// ```ignore,no_run
5821    /// # use google_cloud_appengine_v1::model::CertificateRawData;
5822    /// let x = CertificateRawData::new().set_public_certificate("example");
5823    /// ```
5824    pub fn set_public_certificate<T: std::convert::Into<std::string::String>>(
5825        mut self,
5826        v: T,
5827    ) -> Self {
5828        self.public_certificate = v.into();
5829        self
5830    }
5831
5832    /// Sets the value of [private_key][crate::model::CertificateRawData::private_key].
5833    ///
5834    /// # Example
5835    /// ```ignore,no_run
5836    /// # use google_cloud_appengine_v1::model::CertificateRawData;
5837    /// let x = CertificateRawData::new().set_private_key("example");
5838    /// ```
5839    pub fn set_private_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5840        self.private_key = v.into();
5841        self
5842    }
5843}
5844
5845impl wkt::message::Message for CertificateRawData {
5846    fn typename() -> &'static str {
5847        "type.googleapis.com/google.appengine.v1.CertificateRawData"
5848    }
5849}
5850
5851/// A certificate managed by App Engine.
5852#[derive(Clone, Default, PartialEq)]
5853#[non_exhaustive]
5854pub struct ManagedCertificate {
5855    /// Time at which the certificate was last renewed. The renewal process is
5856    /// fully managed. Certificate renewal will automatically occur before the
5857    /// certificate expires. Renewal errors can be tracked via `ManagementStatus`.
5858    ///
5859    /// @OutputOnly
5860    pub last_renewal_time: std::option::Option<wkt::Timestamp>,
5861
5862    /// Status of certificate management. Refers to the most recent certificate
5863    /// acquisition or renewal attempt.
5864    ///
5865    /// @OutputOnly
5866    pub status: crate::model::ManagementStatus,
5867
5868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5869}
5870
5871impl ManagedCertificate {
5872    pub fn new() -> Self {
5873        std::default::Default::default()
5874    }
5875
5876    /// Sets the value of [last_renewal_time][crate::model::ManagedCertificate::last_renewal_time].
5877    ///
5878    /// # Example
5879    /// ```ignore,no_run
5880    /// # use google_cloud_appengine_v1::model::ManagedCertificate;
5881    /// use wkt::Timestamp;
5882    /// let x = ManagedCertificate::new().set_last_renewal_time(Timestamp::default()/* use setters */);
5883    /// ```
5884    pub fn set_last_renewal_time<T>(mut self, v: T) -> Self
5885    where
5886        T: std::convert::Into<wkt::Timestamp>,
5887    {
5888        self.last_renewal_time = std::option::Option::Some(v.into());
5889        self
5890    }
5891
5892    /// Sets or clears the value of [last_renewal_time][crate::model::ManagedCertificate::last_renewal_time].
5893    ///
5894    /// # Example
5895    /// ```ignore,no_run
5896    /// # use google_cloud_appengine_v1::model::ManagedCertificate;
5897    /// use wkt::Timestamp;
5898    /// let x = ManagedCertificate::new().set_or_clear_last_renewal_time(Some(Timestamp::default()/* use setters */));
5899    /// let x = ManagedCertificate::new().set_or_clear_last_renewal_time(None::<Timestamp>);
5900    /// ```
5901    pub fn set_or_clear_last_renewal_time<T>(mut self, v: std::option::Option<T>) -> Self
5902    where
5903        T: std::convert::Into<wkt::Timestamp>,
5904    {
5905        self.last_renewal_time = v.map(|x| x.into());
5906        self
5907    }
5908
5909    /// Sets the value of [status][crate::model::ManagedCertificate::status].
5910    ///
5911    /// # Example
5912    /// ```ignore,no_run
5913    /// # use google_cloud_appengine_v1::model::ManagedCertificate;
5914    /// use google_cloud_appengine_v1::model::ManagementStatus;
5915    /// let x0 = ManagedCertificate::new().set_status(ManagementStatus::Ok);
5916    /// let x1 = ManagedCertificate::new().set_status(ManagementStatus::Pending);
5917    /// let x2 = ManagedCertificate::new().set_status(ManagementStatus::FailedRetryingNotVisible);
5918    /// ```
5919    pub fn set_status<T: std::convert::Into<crate::model::ManagementStatus>>(
5920        mut self,
5921        v: T,
5922    ) -> Self {
5923        self.status = v.into();
5924        self
5925    }
5926}
5927
5928impl wkt::message::Message for ManagedCertificate {
5929    fn typename() -> &'static str {
5930        "type.googleapis.com/google.appengine.v1.ManagedCertificate"
5931    }
5932}
5933
5934/// Code and application artifacts used to deploy a version to App Engine.
5935#[derive(Clone, Default, PartialEq)]
5936#[non_exhaustive]
5937pub struct Deployment {
5938    /// Manifest of the files stored in Google Cloud Storage that are included
5939    /// as part of this version. All files must be readable using the
5940    /// credentials supplied with this call.
5941    pub files: std::collections::HashMap<std::string::String, crate::model::FileInfo>,
5942
5943    /// The Docker image for the container that runs the version.
5944    /// Only applicable for instances running in the App Engine flexible environment.
5945    pub container: std::option::Option<crate::model::ContainerInfo>,
5946
5947    /// The zip file for this deployment, if this is a zip deployment.
5948    pub zip: std::option::Option<crate::model::ZipInfo>,
5949
5950    /// Options for any Google Cloud Build builds created as a part of this
5951    /// deployment.
5952    ///
5953    /// These options will only be used if a new build is created, such as when
5954    /// deploying to the App Engine flexible environment using files or zip.
5955    pub cloud_build_options: std::option::Option<crate::model::CloudBuildOptions>,
5956
5957    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5958}
5959
5960impl Deployment {
5961    pub fn new() -> Self {
5962        std::default::Default::default()
5963    }
5964
5965    /// Sets the value of [files][crate::model::Deployment::files].
5966    ///
5967    /// # Example
5968    /// ```ignore,no_run
5969    /// # use google_cloud_appengine_v1::model::Deployment;
5970    /// use google_cloud_appengine_v1::model::FileInfo;
5971    /// let x = Deployment::new().set_files([
5972    ///     ("key0", FileInfo::default()/* use setters */),
5973    ///     ("key1", FileInfo::default()/* use (different) setters */),
5974    /// ]);
5975    /// ```
5976    pub fn set_files<T, K, V>(mut self, v: T) -> Self
5977    where
5978        T: std::iter::IntoIterator<Item = (K, V)>,
5979        K: std::convert::Into<std::string::String>,
5980        V: std::convert::Into<crate::model::FileInfo>,
5981    {
5982        use std::iter::Iterator;
5983        self.files = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5984        self
5985    }
5986
5987    /// Sets the value of [container][crate::model::Deployment::container].
5988    ///
5989    /// # Example
5990    /// ```ignore,no_run
5991    /// # use google_cloud_appengine_v1::model::Deployment;
5992    /// use google_cloud_appengine_v1::model::ContainerInfo;
5993    /// let x = Deployment::new().set_container(ContainerInfo::default()/* use setters */);
5994    /// ```
5995    pub fn set_container<T>(mut self, v: T) -> Self
5996    where
5997        T: std::convert::Into<crate::model::ContainerInfo>,
5998    {
5999        self.container = std::option::Option::Some(v.into());
6000        self
6001    }
6002
6003    /// Sets or clears the value of [container][crate::model::Deployment::container].
6004    ///
6005    /// # Example
6006    /// ```ignore,no_run
6007    /// # use google_cloud_appengine_v1::model::Deployment;
6008    /// use google_cloud_appengine_v1::model::ContainerInfo;
6009    /// let x = Deployment::new().set_or_clear_container(Some(ContainerInfo::default()/* use setters */));
6010    /// let x = Deployment::new().set_or_clear_container(None::<ContainerInfo>);
6011    /// ```
6012    pub fn set_or_clear_container<T>(mut self, v: std::option::Option<T>) -> Self
6013    where
6014        T: std::convert::Into<crate::model::ContainerInfo>,
6015    {
6016        self.container = v.map(|x| x.into());
6017        self
6018    }
6019
6020    /// Sets the value of [zip][crate::model::Deployment::zip].
6021    ///
6022    /// # Example
6023    /// ```ignore,no_run
6024    /// # use google_cloud_appengine_v1::model::Deployment;
6025    /// use google_cloud_appengine_v1::model::ZipInfo;
6026    /// let x = Deployment::new().set_zip(ZipInfo::default()/* use setters */);
6027    /// ```
6028    pub fn set_zip<T>(mut self, v: T) -> Self
6029    where
6030        T: std::convert::Into<crate::model::ZipInfo>,
6031    {
6032        self.zip = std::option::Option::Some(v.into());
6033        self
6034    }
6035
6036    /// Sets or clears the value of [zip][crate::model::Deployment::zip].
6037    ///
6038    /// # Example
6039    /// ```ignore,no_run
6040    /// # use google_cloud_appengine_v1::model::Deployment;
6041    /// use google_cloud_appengine_v1::model::ZipInfo;
6042    /// let x = Deployment::new().set_or_clear_zip(Some(ZipInfo::default()/* use setters */));
6043    /// let x = Deployment::new().set_or_clear_zip(None::<ZipInfo>);
6044    /// ```
6045    pub fn set_or_clear_zip<T>(mut self, v: std::option::Option<T>) -> Self
6046    where
6047        T: std::convert::Into<crate::model::ZipInfo>,
6048    {
6049        self.zip = v.map(|x| x.into());
6050        self
6051    }
6052
6053    /// Sets the value of [cloud_build_options][crate::model::Deployment::cloud_build_options].
6054    ///
6055    /// # Example
6056    /// ```ignore,no_run
6057    /// # use google_cloud_appengine_v1::model::Deployment;
6058    /// use google_cloud_appengine_v1::model::CloudBuildOptions;
6059    /// let x = Deployment::new().set_cloud_build_options(CloudBuildOptions::default()/* use setters */);
6060    /// ```
6061    pub fn set_cloud_build_options<T>(mut self, v: T) -> Self
6062    where
6063        T: std::convert::Into<crate::model::CloudBuildOptions>,
6064    {
6065        self.cloud_build_options = std::option::Option::Some(v.into());
6066        self
6067    }
6068
6069    /// Sets or clears the value of [cloud_build_options][crate::model::Deployment::cloud_build_options].
6070    ///
6071    /// # Example
6072    /// ```ignore,no_run
6073    /// # use google_cloud_appengine_v1::model::Deployment;
6074    /// use google_cloud_appengine_v1::model::CloudBuildOptions;
6075    /// let x = Deployment::new().set_or_clear_cloud_build_options(Some(CloudBuildOptions::default()/* use setters */));
6076    /// let x = Deployment::new().set_or_clear_cloud_build_options(None::<CloudBuildOptions>);
6077    /// ```
6078    pub fn set_or_clear_cloud_build_options<T>(mut self, v: std::option::Option<T>) -> Self
6079    where
6080        T: std::convert::Into<crate::model::CloudBuildOptions>,
6081    {
6082        self.cloud_build_options = v.map(|x| x.into());
6083        self
6084    }
6085}
6086
6087impl wkt::message::Message for Deployment {
6088    fn typename() -> &'static str {
6089        "type.googleapis.com/google.appengine.v1.Deployment"
6090    }
6091}
6092
6093/// Single source file that is part of the version to be deployed. Each source
6094/// file that is deployed must be specified separately.
6095#[derive(Clone, Default, PartialEq)]
6096#[non_exhaustive]
6097pub struct FileInfo {
6098    /// URL source to use to fetch this file. Must be a URL to a resource in
6099    /// Google Cloud Storage in the form
6100    /// 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
6101    pub source_url: std::string::String,
6102
6103    /// The SHA1 hash of the file, in hex.
6104    pub sha1_sum: std::string::String,
6105
6106    /// The MIME type of the file.
6107    ///
6108    /// Defaults to the value from Google Cloud Storage.
6109    pub mime_type: std::string::String,
6110
6111    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6112}
6113
6114impl FileInfo {
6115    pub fn new() -> Self {
6116        std::default::Default::default()
6117    }
6118
6119    /// Sets the value of [source_url][crate::model::FileInfo::source_url].
6120    ///
6121    /// # Example
6122    /// ```ignore,no_run
6123    /// # use google_cloud_appengine_v1::model::FileInfo;
6124    /// let x = FileInfo::new().set_source_url("example");
6125    /// ```
6126    pub fn set_source_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6127        self.source_url = v.into();
6128        self
6129    }
6130
6131    /// Sets the value of [sha1_sum][crate::model::FileInfo::sha1_sum].
6132    ///
6133    /// # Example
6134    /// ```ignore,no_run
6135    /// # use google_cloud_appengine_v1::model::FileInfo;
6136    /// let x = FileInfo::new().set_sha1_sum("example");
6137    /// ```
6138    pub fn set_sha1_sum<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6139        self.sha1_sum = v.into();
6140        self
6141    }
6142
6143    /// Sets the value of [mime_type][crate::model::FileInfo::mime_type].
6144    ///
6145    /// # Example
6146    /// ```ignore,no_run
6147    /// # use google_cloud_appengine_v1::model::FileInfo;
6148    /// let x = FileInfo::new().set_mime_type("example");
6149    /// ```
6150    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6151        self.mime_type = v.into();
6152        self
6153    }
6154}
6155
6156impl wkt::message::Message for FileInfo {
6157    fn typename() -> &'static str {
6158        "type.googleapis.com/google.appengine.v1.FileInfo"
6159    }
6160}
6161
6162/// Docker image that is used to create a container and start a VM instance for
6163/// the version that you deploy. Only applicable for instances running in the App
6164/// Engine flexible environment.
6165#[derive(Clone, Default, PartialEq)]
6166#[non_exhaustive]
6167pub struct ContainerInfo {
6168    /// URI to the hosted container image in Google Container Registry. The URI
6169    /// must be fully qualified and include a tag or digest.
6170    /// Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
6171    pub image: std::string::String,
6172
6173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6174}
6175
6176impl ContainerInfo {
6177    pub fn new() -> Self {
6178        std::default::Default::default()
6179    }
6180
6181    /// Sets the value of [image][crate::model::ContainerInfo::image].
6182    ///
6183    /// # Example
6184    /// ```ignore,no_run
6185    /// # use google_cloud_appengine_v1::model::ContainerInfo;
6186    /// let x = ContainerInfo::new().set_image("example");
6187    /// ```
6188    pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6189        self.image = v.into();
6190        self
6191    }
6192}
6193
6194impl wkt::message::Message for ContainerInfo {
6195    fn typename() -> &'static str {
6196        "type.googleapis.com/google.appengine.v1.ContainerInfo"
6197    }
6198}
6199
6200/// Options for the build operations performed as a part of the version
6201/// deployment. Only applicable for App Engine flexible environment when creating
6202/// a version using source code directly.
6203#[derive(Clone, Default, PartialEq)]
6204#[non_exhaustive]
6205pub struct CloudBuildOptions {
6206    /// Path to the yaml file used in deployment, used to determine runtime
6207    /// configuration details.
6208    ///
6209    /// Required for flexible environment builds.
6210    ///
6211    /// See <https://cloud.google.com/appengine/docs/standard/python/config/appref>
6212    /// for more details.
6213    pub app_yaml_path: std::string::String,
6214
6215    /// The Cloud Build timeout used as part of any dependent builds performed by
6216    /// version creation. Defaults to 10 minutes.
6217    pub cloud_build_timeout: std::option::Option<wkt::Duration>,
6218
6219    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6220}
6221
6222impl CloudBuildOptions {
6223    pub fn new() -> Self {
6224        std::default::Default::default()
6225    }
6226
6227    /// Sets the value of [app_yaml_path][crate::model::CloudBuildOptions::app_yaml_path].
6228    ///
6229    /// # Example
6230    /// ```ignore,no_run
6231    /// # use google_cloud_appengine_v1::model::CloudBuildOptions;
6232    /// let x = CloudBuildOptions::new().set_app_yaml_path("example");
6233    /// ```
6234    pub fn set_app_yaml_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6235        self.app_yaml_path = v.into();
6236        self
6237    }
6238
6239    /// Sets the value of [cloud_build_timeout][crate::model::CloudBuildOptions::cloud_build_timeout].
6240    ///
6241    /// # Example
6242    /// ```ignore,no_run
6243    /// # use google_cloud_appengine_v1::model::CloudBuildOptions;
6244    /// use wkt::Duration;
6245    /// let x = CloudBuildOptions::new().set_cloud_build_timeout(Duration::default()/* use setters */);
6246    /// ```
6247    pub fn set_cloud_build_timeout<T>(mut self, v: T) -> Self
6248    where
6249        T: std::convert::Into<wkt::Duration>,
6250    {
6251        self.cloud_build_timeout = std::option::Option::Some(v.into());
6252        self
6253    }
6254
6255    /// Sets or clears the value of [cloud_build_timeout][crate::model::CloudBuildOptions::cloud_build_timeout].
6256    ///
6257    /// # Example
6258    /// ```ignore,no_run
6259    /// # use google_cloud_appengine_v1::model::CloudBuildOptions;
6260    /// use wkt::Duration;
6261    /// let x = CloudBuildOptions::new().set_or_clear_cloud_build_timeout(Some(Duration::default()/* use setters */));
6262    /// let x = CloudBuildOptions::new().set_or_clear_cloud_build_timeout(None::<Duration>);
6263    /// ```
6264    pub fn set_or_clear_cloud_build_timeout<T>(mut self, v: std::option::Option<T>) -> Self
6265    where
6266        T: std::convert::Into<wkt::Duration>,
6267    {
6268        self.cloud_build_timeout = v.map(|x| x.into());
6269        self
6270    }
6271}
6272
6273impl wkt::message::Message for CloudBuildOptions {
6274    fn typename() -> &'static str {
6275        "type.googleapis.com/google.appengine.v1.CloudBuildOptions"
6276    }
6277}
6278
6279/// The zip file information for a zip deployment.
6280#[derive(Clone, Default, PartialEq)]
6281#[non_exhaustive]
6282pub struct ZipInfo {
6283    /// URL of the zip file to deploy from. Must be a URL to a resource in
6284    /// Google Cloud Storage in the form
6285    /// 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
6286    pub source_url: std::string::String,
6287
6288    /// An estimate of the number of files in a zip for a zip deployment.
6289    /// If set, must be greater than or equal to the actual number of files.
6290    /// Used for optimizing performance; if not provided, deployment may be slow.
6291    pub files_count: i32,
6292
6293    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6294}
6295
6296impl ZipInfo {
6297    pub fn new() -> Self {
6298        std::default::Default::default()
6299    }
6300
6301    /// Sets the value of [source_url][crate::model::ZipInfo::source_url].
6302    ///
6303    /// # Example
6304    /// ```ignore,no_run
6305    /// # use google_cloud_appengine_v1::model::ZipInfo;
6306    /// let x = ZipInfo::new().set_source_url("example");
6307    /// ```
6308    pub fn set_source_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6309        self.source_url = v.into();
6310        self
6311    }
6312
6313    /// Sets the value of [files_count][crate::model::ZipInfo::files_count].
6314    ///
6315    /// # Example
6316    /// ```ignore,no_run
6317    /// # use google_cloud_appengine_v1::model::ZipInfo;
6318    /// let x = ZipInfo::new().set_files_count(42);
6319    /// ```
6320    pub fn set_files_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6321        self.files_count = v.into();
6322        self
6323    }
6324}
6325
6326impl wkt::message::Message for ZipInfo {
6327    fn typename() -> &'static str {
6328        "type.googleapis.com/google.appengine.v1.ZipInfo"
6329    }
6330}
6331
6332/// A domain that a user has been authorized to administer. To authorize use
6333/// of a domain, verify ownership via
6334/// [Search Console](https://search.google.com/search-console/welcome).
6335#[derive(Clone, Default, PartialEq)]
6336#[non_exhaustive]
6337pub struct AuthorizedDomain {
6338    /// Full path to the `AuthorizedDomain` resource in the API. Example:
6339    /// `apps/myapp/authorizedDomains/example.com`.
6340    ///
6341    /// @OutputOnly
6342    pub name: std::string::String,
6343
6344    /// Fully qualified domain name of the domain authorized for use. Example:
6345    /// `example.com`.
6346    pub id: std::string::String,
6347
6348    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6349}
6350
6351impl AuthorizedDomain {
6352    pub fn new() -> Self {
6353        std::default::Default::default()
6354    }
6355
6356    /// Sets the value of [name][crate::model::AuthorizedDomain::name].
6357    ///
6358    /// # Example
6359    /// ```ignore,no_run
6360    /// # use google_cloud_appengine_v1::model::AuthorizedDomain;
6361    /// let x = AuthorizedDomain::new().set_name("example");
6362    /// ```
6363    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6364        self.name = v.into();
6365        self
6366    }
6367
6368    /// Sets the value of [id][crate::model::AuthorizedDomain::id].
6369    ///
6370    /// # Example
6371    /// ```ignore,no_run
6372    /// # use google_cloud_appengine_v1::model::AuthorizedDomain;
6373    /// let x = AuthorizedDomain::new().set_id("example");
6374    /// ```
6375    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6376        self.id = v.into();
6377        self
6378    }
6379}
6380
6381impl wkt::message::Message for AuthorizedDomain {
6382    fn typename() -> &'static str {
6383        "type.googleapis.com/google.appengine.v1.AuthorizedDomain"
6384    }
6385}
6386
6387/// A domain serving an App Engine application.
6388#[derive(Clone, Default, PartialEq)]
6389#[non_exhaustive]
6390pub struct DomainMapping {
6391    /// Full path to the `DomainMapping` resource in the API. Example:
6392    /// `apps/myapp/domainMapping/example.com`.
6393    ///
6394    /// @OutputOnly
6395    pub name: std::string::String,
6396
6397    /// Relative name of the domain serving the application. Example:
6398    /// `example.com`.
6399    pub id: std::string::String,
6400
6401    /// SSL configuration for this domain. If unconfigured, this domain will not
6402    /// serve with SSL.
6403    pub ssl_settings: std::option::Option<crate::model::SslSettings>,
6404
6405    /// The resource records required to configure this domain mapping. These
6406    /// records must be added to the domain's DNS configuration in order to
6407    /// serve the application via this domain mapping.
6408    ///
6409    /// @OutputOnly
6410    pub resource_records: std::vec::Vec<crate::model::ResourceRecord>,
6411
6412    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6413}
6414
6415impl DomainMapping {
6416    pub fn new() -> Self {
6417        std::default::Default::default()
6418    }
6419
6420    /// Sets the value of [name][crate::model::DomainMapping::name].
6421    ///
6422    /// # Example
6423    /// ```ignore,no_run
6424    /// # use google_cloud_appengine_v1::model::DomainMapping;
6425    /// let x = DomainMapping::new().set_name("example");
6426    /// ```
6427    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6428        self.name = v.into();
6429        self
6430    }
6431
6432    /// Sets the value of [id][crate::model::DomainMapping::id].
6433    ///
6434    /// # Example
6435    /// ```ignore,no_run
6436    /// # use google_cloud_appengine_v1::model::DomainMapping;
6437    /// let x = DomainMapping::new().set_id("example");
6438    /// ```
6439    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6440        self.id = v.into();
6441        self
6442    }
6443
6444    /// Sets the value of [ssl_settings][crate::model::DomainMapping::ssl_settings].
6445    ///
6446    /// # Example
6447    /// ```ignore,no_run
6448    /// # use google_cloud_appengine_v1::model::DomainMapping;
6449    /// use google_cloud_appengine_v1::model::SslSettings;
6450    /// let x = DomainMapping::new().set_ssl_settings(SslSettings::default()/* use setters */);
6451    /// ```
6452    pub fn set_ssl_settings<T>(mut self, v: T) -> Self
6453    where
6454        T: std::convert::Into<crate::model::SslSettings>,
6455    {
6456        self.ssl_settings = std::option::Option::Some(v.into());
6457        self
6458    }
6459
6460    /// Sets or clears the value of [ssl_settings][crate::model::DomainMapping::ssl_settings].
6461    ///
6462    /// # Example
6463    /// ```ignore,no_run
6464    /// # use google_cloud_appengine_v1::model::DomainMapping;
6465    /// use google_cloud_appengine_v1::model::SslSettings;
6466    /// let x = DomainMapping::new().set_or_clear_ssl_settings(Some(SslSettings::default()/* use setters */));
6467    /// let x = DomainMapping::new().set_or_clear_ssl_settings(None::<SslSettings>);
6468    /// ```
6469    pub fn set_or_clear_ssl_settings<T>(mut self, v: std::option::Option<T>) -> Self
6470    where
6471        T: std::convert::Into<crate::model::SslSettings>,
6472    {
6473        self.ssl_settings = v.map(|x| x.into());
6474        self
6475    }
6476
6477    /// Sets the value of [resource_records][crate::model::DomainMapping::resource_records].
6478    ///
6479    /// # Example
6480    /// ```ignore,no_run
6481    /// # use google_cloud_appengine_v1::model::DomainMapping;
6482    /// use google_cloud_appengine_v1::model::ResourceRecord;
6483    /// let x = DomainMapping::new()
6484    ///     .set_resource_records([
6485    ///         ResourceRecord::default()/* use setters */,
6486    ///         ResourceRecord::default()/* use (different) setters */,
6487    ///     ]);
6488    /// ```
6489    pub fn set_resource_records<T, V>(mut self, v: T) -> Self
6490    where
6491        T: std::iter::IntoIterator<Item = V>,
6492        V: std::convert::Into<crate::model::ResourceRecord>,
6493    {
6494        use std::iter::Iterator;
6495        self.resource_records = v.into_iter().map(|i| i.into()).collect();
6496        self
6497    }
6498}
6499
6500impl wkt::message::Message for DomainMapping {
6501    fn typename() -> &'static str {
6502        "type.googleapis.com/google.appengine.v1.DomainMapping"
6503    }
6504}
6505
6506/// SSL configuration for a `DomainMapping` resource.
6507#[derive(Clone, Default, PartialEq)]
6508#[non_exhaustive]
6509pub struct SslSettings {
6510    /// ID of the `AuthorizedCertificate` resource configuring SSL for the
6511    /// application. Clearing this field will remove SSL support.
6512    ///
6513    /// By default, a managed certificate is automatically created for every
6514    /// domain mapping. To omit SSL support or to configure SSL manually, specify
6515    /// `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
6516    /// be authorized to administer the `AuthorizedCertificate` resource to
6517    /// manually map it to a `DomainMapping` resource.
6518    /// Example: `12345`.
6519    pub certificate_id: std::string::String,
6520
6521    /// SSL management type for this domain. If `AUTOMATIC`, a managed certificate
6522    /// is automatically provisioned. If `MANUAL`, `certificate_id` must be
6523    /// manually specified in order to configure SSL for this domain.
6524    pub ssl_management_type: crate::model::ssl_settings::SslManagementType,
6525
6526    /// ID of the managed `AuthorizedCertificate` resource currently being
6527    /// provisioned, if applicable. Until the new managed certificate has been
6528    /// successfully provisioned, the previous SSL state will be preserved. Once
6529    /// the provisioning process completes, the `certificate_id` field will reflect
6530    /// the new managed certificate and this field will be left empty. To remove
6531    /// SSL support while there is still a pending managed certificate, clear the
6532    /// `certificate_id` field with an `UpdateDomainMappingRequest`.
6533    ///
6534    /// @OutputOnly
6535    pub pending_managed_certificate_id: std::string::String,
6536
6537    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6538}
6539
6540impl SslSettings {
6541    pub fn new() -> Self {
6542        std::default::Default::default()
6543    }
6544
6545    /// Sets the value of [certificate_id][crate::model::SslSettings::certificate_id].
6546    ///
6547    /// # Example
6548    /// ```ignore,no_run
6549    /// # use google_cloud_appengine_v1::model::SslSettings;
6550    /// let x = SslSettings::new().set_certificate_id("example");
6551    /// ```
6552    pub fn set_certificate_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6553        self.certificate_id = v.into();
6554        self
6555    }
6556
6557    /// Sets the value of [ssl_management_type][crate::model::SslSettings::ssl_management_type].
6558    ///
6559    /// # Example
6560    /// ```ignore,no_run
6561    /// # use google_cloud_appengine_v1::model::SslSettings;
6562    /// use google_cloud_appengine_v1::model::ssl_settings::SslManagementType;
6563    /// let x0 = SslSettings::new().set_ssl_management_type(SslManagementType::Automatic);
6564    /// let x1 = SslSettings::new().set_ssl_management_type(SslManagementType::Manual);
6565    /// ```
6566    pub fn set_ssl_management_type<
6567        T: std::convert::Into<crate::model::ssl_settings::SslManagementType>,
6568    >(
6569        mut self,
6570        v: T,
6571    ) -> Self {
6572        self.ssl_management_type = v.into();
6573        self
6574    }
6575
6576    /// Sets the value of [pending_managed_certificate_id][crate::model::SslSettings::pending_managed_certificate_id].
6577    ///
6578    /// # Example
6579    /// ```ignore,no_run
6580    /// # use google_cloud_appengine_v1::model::SslSettings;
6581    /// let x = SslSettings::new().set_pending_managed_certificate_id("example");
6582    /// ```
6583    pub fn set_pending_managed_certificate_id<T: std::convert::Into<std::string::String>>(
6584        mut self,
6585        v: T,
6586    ) -> Self {
6587        self.pending_managed_certificate_id = v.into();
6588        self
6589    }
6590}
6591
6592impl wkt::message::Message for SslSettings {
6593    fn typename() -> &'static str {
6594        "type.googleapis.com/google.appengine.v1.SslSettings"
6595    }
6596}
6597
6598/// Defines additional types related to [SslSettings].
6599pub mod ssl_settings {
6600    #[allow(unused_imports)]
6601    use super::*;
6602
6603    /// The SSL management type for this domain.
6604    ///
6605    /// # Working with unknown values
6606    ///
6607    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6608    /// additional enum variants at any time. Adding new variants is not considered
6609    /// a breaking change. Applications should write their code in anticipation of:
6610    ///
6611    /// - New values appearing in future releases of the client library, **and**
6612    /// - New values received dynamically, without application changes.
6613    ///
6614    /// Please consult the [Working with enums] section in the user guide for some
6615    /// guidelines.
6616    ///
6617    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6618    #[derive(Clone, Debug, PartialEq)]
6619    #[non_exhaustive]
6620    pub enum SslManagementType {
6621        /// Defaults to `AUTOMATIC`.
6622        Unspecified,
6623        /// SSL support for this domain is configured automatically. The mapped SSL
6624        /// certificate will be automatically renewed.
6625        Automatic,
6626        /// SSL support for this domain is configured manually by the user. Either
6627        /// the domain has no SSL support or a user-obtained SSL certificate has been
6628        /// explictly mapped to this domain.
6629        Manual,
6630        /// If set, the enum was initialized with an unknown value.
6631        ///
6632        /// Applications can examine the value using [SslManagementType::value] or
6633        /// [SslManagementType::name].
6634        UnknownValue(ssl_management_type::UnknownValue),
6635    }
6636
6637    #[doc(hidden)]
6638    pub mod ssl_management_type {
6639        #[allow(unused_imports)]
6640        use super::*;
6641        #[derive(Clone, Debug, PartialEq)]
6642        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6643    }
6644
6645    impl SslManagementType {
6646        /// Gets the enum value.
6647        ///
6648        /// Returns `None` if the enum contains an unknown value deserialized from
6649        /// the string representation of enums.
6650        pub fn value(&self) -> std::option::Option<i32> {
6651            match self {
6652                Self::Unspecified => std::option::Option::Some(0),
6653                Self::Automatic => std::option::Option::Some(1),
6654                Self::Manual => std::option::Option::Some(2),
6655                Self::UnknownValue(u) => u.0.value(),
6656            }
6657        }
6658
6659        /// Gets the enum value as a string.
6660        ///
6661        /// Returns `None` if the enum contains an unknown value deserialized from
6662        /// the integer representation of enums.
6663        pub fn name(&self) -> std::option::Option<&str> {
6664            match self {
6665                Self::Unspecified => std::option::Option::Some("SSL_MANAGEMENT_TYPE_UNSPECIFIED"),
6666                Self::Automatic => std::option::Option::Some("AUTOMATIC"),
6667                Self::Manual => std::option::Option::Some("MANUAL"),
6668                Self::UnknownValue(u) => u.0.name(),
6669            }
6670        }
6671    }
6672
6673    impl std::default::Default for SslManagementType {
6674        fn default() -> Self {
6675            use std::convert::From;
6676            Self::from(0)
6677        }
6678    }
6679
6680    impl std::fmt::Display for SslManagementType {
6681        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6682            wkt::internal::display_enum(f, self.name(), self.value())
6683        }
6684    }
6685
6686    impl std::convert::From<i32> for SslManagementType {
6687        fn from(value: i32) -> Self {
6688            match value {
6689                0 => Self::Unspecified,
6690                1 => Self::Automatic,
6691                2 => Self::Manual,
6692                _ => Self::UnknownValue(ssl_management_type::UnknownValue(
6693                    wkt::internal::UnknownEnumValue::Integer(value),
6694                )),
6695            }
6696        }
6697    }
6698
6699    impl std::convert::From<&str> for SslManagementType {
6700        fn from(value: &str) -> Self {
6701            use std::string::ToString;
6702            match value {
6703                "SSL_MANAGEMENT_TYPE_UNSPECIFIED" => Self::Unspecified,
6704                "AUTOMATIC" => Self::Automatic,
6705                "MANUAL" => Self::Manual,
6706                _ => Self::UnknownValue(ssl_management_type::UnknownValue(
6707                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6708                )),
6709            }
6710        }
6711    }
6712
6713    impl serde::ser::Serialize for SslManagementType {
6714        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6715        where
6716            S: serde::Serializer,
6717        {
6718            match self {
6719                Self::Unspecified => serializer.serialize_i32(0),
6720                Self::Automatic => serializer.serialize_i32(1),
6721                Self::Manual => serializer.serialize_i32(2),
6722                Self::UnknownValue(u) => u.0.serialize(serializer),
6723            }
6724        }
6725    }
6726
6727    impl<'de> serde::de::Deserialize<'de> for SslManagementType {
6728        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6729        where
6730            D: serde::Deserializer<'de>,
6731        {
6732            deserializer.deserialize_any(wkt::internal::EnumVisitor::<SslManagementType>::new(
6733                ".google.appengine.v1.SslSettings.SslManagementType",
6734            ))
6735        }
6736    }
6737}
6738
6739/// A DNS resource record.
6740#[derive(Clone, Default, PartialEq)]
6741#[non_exhaustive]
6742pub struct ResourceRecord {
6743    /// Relative name of the object affected by this record. Only applicable for
6744    /// `CNAME` records. Example: 'www'.
6745    pub name: std::string::String,
6746
6747    /// Data for this record. Values vary by record type, as defined in RFC 1035
6748    /// (section 5) and RFC 1034 (section 3.6.1).
6749    pub rrdata: std::string::String,
6750
6751    /// Resource record type. Example: `AAAA`.
6752    pub r#type: crate::model::resource_record::RecordType,
6753
6754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6755}
6756
6757impl ResourceRecord {
6758    pub fn new() -> Self {
6759        std::default::Default::default()
6760    }
6761
6762    /// Sets the value of [name][crate::model::ResourceRecord::name].
6763    ///
6764    /// # Example
6765    /// ```ignore,no_run
6766    /// # use google_cloud_appengine_v1::model::ResourceRecord;
6767    /// let x = ResourceRecord::new().set_name("example");
6768    /// ```
6769    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6770        self.name = v.into();
6771        self
6772    }
6773
6774    /// Sets the value of [rrdata][crate::model::ResourceRecord::rrdata].
6775    ///
6776    /// # Example
6777    /// ```ignore,no_run
6778    /// # use google_cloud_appengine_v1::model::ResourceRecord;
6779    /// let x = ResourceRecord::new().set_rrdata("example");
6780    /// ```
6781    pub fn set_rrdata<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6782        self.rrdata = v.into();
6783        self
6784    }
6785
6786    /// Sets the value of [r#type][crate::model::ResourceRecord::type].
6787    ///
6788    /// # Example
6789    /// ```ignore,no_run
6790    /// # use google_cloud_appengine_v1::model::ResourceRecord;
6791    /// use google_cloud_appengine_v1::model::resource_record::RecordType;
6792    /// let x0 = ResourceRecord::new().set_type(RecordType::A);
6793    /// let x1 = ResourceRecord::new().set_type(RecordType::Aaaa);
6794    /// let x2 = ResourceRecord::new().set_type(RecordType::Cname);
6795    /// ```
6796    pub fn set_type<T: std::convert::Into<crate::model::resource_record::RecordType>>(
6797        mut self,
6798        v: T,
6799    ) -> Self {
6800        self.r#type = v.into();
6801        self
6802    }
6803}
6804
6805impl wkt::message::Message for ResourceRecord {
6806    fn typename() -> &'static str {
6807        "type.googleapis.com/google.appengine.v1.ResourceRecord"
6808    }
6809}
6810
6811/// Defines additional types related to [ResourceRecord].
6812pub mod resource_record {
6813    #[allow(unused_imports)]
6814    use super::*;
6815
6816    /// A resource record type.
6817    ///
6818    /// # Working with unknown values
6819    ///
6820    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6821    /// additional enum variants at any time. Adding new variants is not considered
6822    /// a breaking change. Applications should write their code in anticipation of:
6823    ///
6824    /// - New values appearing in future releases of the client library, **and**
6825    /// - New values received dynamically, without application changes.
6826    ///
6827    /// Please consult the [Working with enums] section in the user guide for some
6828    /// guidelines.
6829    ///
6830    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6831    #[derive(Clone, Debug, PartialEq)]
6832    #[non_exhaustive]
6833    pub enum RecordType {
6834        /// An unknown resource record.
6835        Unspecified,
6836        /// An A resource record. Data is an IPv4 address.
6837        A,
6838        /// An AAAA resource record. Data is an IPv6 address.
6839        Aaaa,
6840        /// A CNAME resource record. Data is a domain name to be aliased.
6841        Cname,
6842        /// If set, the enum was initialized with an unknown value.
6843        ///
6844        /// Applications can examine the value using [RecordType::value] or
6845        /// [RecordType::name].
6846        UnknownValue(record_type::UnknownValue),
6847    }
6848
6849    #[doc(hidden)]
6850    pub mod record_type {
6851        #[allow(unused_imports)]
6852        use super::*;
6853        #[derive(Clone, Debug, PartialEq)]
6854        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6855    }
6856
6857    impl RecordType {
6858        /// Gets the enum value.
6859        ///
6860        /// Returns `None` if the enum contains an unknown value deserialized from
6861        /// the string representation of enums.
6862        pub fn value(&self) -> std::option::Option<i32> {
6863            match self {
6864                Self::Unspecified => std::option::Option::Some(0),
6865                Self::A => std::option::Option::Some(1),
6866                Self::Aaaa => std::option::Option::Some(2),
6867                Self::Cname => std::option::Option::Some(3),
6868                Self::UnknownValue(u) => u.0.value(),
6869            }
6870        }
6871
6872        /// Gets the enum value as a string.
6873        ///
6874        /// Returns `None` if the enum contains an unknown value deserialized from
6875        /// the integer representation of enums.
6876        pub fn name(&self) -> std::option::Option<&str> {
6877            match self {
6878                Self::Unspecified => std::option::Option::Some("RECORD_TYPE_UNSPECIFIED"),
6879                Self::A => std::option::Option::Some("A"),
6880                Self::Aaaa => std::option::Option::Some("AAAA"),
6881                Self::Cname => std::option::Option::Some("CNAME"),
6882                Self::UnknownValue(u) => u.0.name(),
6883            }
6884        }
6885    }
6886
6887    impl std::default::Default for RecordType {
6888        fn default() -> Self {
6889            use std::convert::From;
6890            Self::from(0)
6891        }
6892    }
6893
6894    impl std::fmt::Display for RecordType {
6895        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6896            wkt::internal::display_enum(f, self.name(), self.value())
6897        }
6898    }
6899
6900    impl std::convert::From<i32> for RecordType {
6901        fn from(value: i32) -> Self {
6902            match value {
6903                0 => Self::Unspecified,
6904                1 => Self::A,
6905                2 => Self::Aaaa,
6906                3 => Self::Cname,
6907                _ => Self::UnknownValue(record_type::UnknownValue(
6908                    wkt::internal::UnknownEnumValue::Integer(value),
6909                )),
6910            }
6911        }
6912    }
6913
6914    impl std::convert::From<&str> for RecordType {
6915        fn from(value: &str) -> Self {
6916            use std::string::ToString;
6917            match value {
6918                "RECORD_TYPE_UNSPECIFIED" => Self::Unspecified,
6919                "A" => Self::A,
6920                "AAAA" => Self::Aaaa,
6921                "CNAME" => Self::Cname,
6922                _ => Self::UnknownValue(record_type::UnknownValue(
6923                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6924                )),
6925            }
6926        }
6927    }
6928
6929    impl serde::ser::Serialize for RecordType {
6930        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6931        where
6932            S: serde::Serializer,
6933        {
6934            match self {
6935                Self::Unspecified => serializer.serialize_i32(0),
6936                Self::A => serializer.serialize_i32(1),
6937                Self::Aaaa => serializer.serialize_i32(2),
6938                Self::Cname => serializer.serialize_i32(3),
6939                Self::UnknownValue(u) => u.0.serialize(serializer),
6940            }
6941        }
6942    }
6943
6944    impl<'de> serde::de::Deserialize<'de> for RecordType {
6945        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6946        where
6947            D: serde::Deserializer<'de>,
6948        {
6949            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RecordType>::new(
6950                ".google.appengine.v1.ResourceRecord.RecordType",
6951            ))
6952        }
6953    }
6954}
6955
6956/// A single firewall rule that is evaluated against incoming traffic
6957/// and provides an action to take on matched requests.
6958#[derive(Clone, Default, PartialEq)]
6959#[non_exhaustive]
6960pub struct FirewallRule {
6961    /// A positive integer between [1, Int32.MaxValue-1] that defines the order of
6962    /// rule evaluation. Rules with the lowest priority are evaluated first.
6963    ///
6964    /// A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic
6965    /// when no previous rule matches. Only the action of this rule can be modified
6966    /// by the user.
6967    pub priority: i32,
6968
6969    /// The action to take on matched requests.
6970    pub action: crate::model::firewall_rule::Action,
6971
6972    /// IP address or range, defined using CIDR notation, of requests that this
6973    /// rule applies to. You can use the wildcard character "*" to match all IPs
6974    /// equivalent to "0/0" and "::/0" together.
6975    /// Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
6976    /// or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
6977    pub source_range: std::string::String,
6978
6979    /// An optional string description of this rule.
6980    /// This field has a maximum length of 100 characters.
6981    pub description: std::string::String,
6982
6983    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6984}
6985
6986impl FirewallRule {
6987    pub fn new() -> Self {
6988        std::default::Default::default()
6989    }
6990
6991    /// Sets the value of [priority][crate::model::FirewallRule::priority].
6992    ///
6993    /// # Example
6994    /// ```ignore,no_run
6995    /// # use google_cloud_appengine_v1::model::FirewallRule;
6996    /// let x = FirewallRule::new().set_priority(42);
6997    /// ```
6998    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6999        self.priority = v.into();
7000        self
7001    }
7002
7003    /// Sets the value of [action][crate::model::FirewallRule::action].
7004    ///
7005    /// # Example
7006    /// ```ignore,no_run
7007    /// # use google_cloud_appengine_v1::model::FirewallRule;
7008    /// use google_cloud_appengine_v1::model::firewall_rule::Action;
7009    /// let x0 = FirewallRule::new().set_action(Action::Allow);
7010    /// let x1 = FirewallRule::new().set_action(Action::Deny);
7011    /// ```
7012    pub fn set_action<T: std::convert::Into<crate::model::firewall_rule::Action>>(
7013        mut self,
7014        v: T,
7015    ) -> Self {
7016        self.action = v.into();
7017        self
7018    }
7019
7020    /// Sets the value of [source_range][crate::model::FirewallRule::source_range].
7021    ///
7022    /// # Example
7023    /// ```ignore,no_run
7024    /// # use google_cloud_appengine_v1::model::FirewallRule;
7025    /// let x = FirewallRule::new().set_source_range("example");
7026    /// ```
7027    pub fn set_source_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7028        self.source_range = v.into();
7029        self
7030    }
7031
7032    /// Sets the value of [description][crate::model::FirewallRule::description].
7033    ///
7034    /// # Example
7035    /// ```ignore,no_run
7036    /// # use google_cloud_appengine_v1::model::FirewallRule;
7037    /// let x = FirewallRule::new().set_description("example");
7038    /// ```
7039    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7040        self.description = v.into();
7041        self
7042    }
7043}
7044
7045impl wkt::message::Message for FirewallRule {
7046    fn typename() -> &'static str {
7047        "type.googleapis.com/google.appengine.v1.FirewallRule"
7048    }
7049}
7050
7051/// Defines additional types related to [FirewallRule].
7052pub mod firewall_rule {
7053    #[allow(unused_imports)]
7054    use super::*;
7055
7056    /// Available actions to take on matching requests.
7057    ///
7058    /// # Working with unknown values
7059    ///
7060    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7061    /// additional enum variants at any time. Adding new variants is not considered
7062    /// a breaking change. Applications should write their code in anticipation of:
7063    ///
7064    /// - New values appearing in future releases of the client library, **and**
7065    /// - New values received dynamically, without application changes.
7066    ///
7067    /// Please consult the [Working with enums] section in the user guide for some
7068    /// guidelines.
7069    ///
7070    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7071    #[derive(Clone, Debug, PartialEq)]
7072    #[non_exhaustive]
7073    pub enum Action {
7074        UnspecifiedAction,
7075        /// Matching requests are allowed.
7076        Allow,
7077        /// Matching requests are denied.
7078        Deny,
7079        /// If set, the enum was initialized with an unknown value.
7080        ///
7081        /// Applications can examine the value using [Action::value] or
7082        /// [Action::name].
7083        UnknownValue(action::UnknownValue),
7084    }
7085
7086    #[doc(hidden)]
7087    pub mod action {
7088        #[allow(unused_imports)]
7089        use super::*;
7090        #[derive(Clone, Debug, PartialEq)]
7091        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7092    }
7093
7094    impl Action {
7095        /// Gets the enum value.
7096        ///
7097        /// Returns `None` if the enum contains an unknown value deserialized from
7098        /// the string representation of enums.
7099        pub fn value(&self) -> std::option::Option<i32> {
7100            match self {
7101                Self::UnspecifiedAction => std::option::Option::Some(0),
7102                Self::Allow => std::option::Option::Some(1),
7103                Self::Deny => std::option::Option::Some(2),
7104                Self::UnknownValue(u) => u.0.value(),
7105            }
7106        }
7107
7108        /// Gets the enum value as a string.
7109        ///
7110        /// Returns `None` if the enum contains an unknown value deserialized from
7111        /// the integer representation of enums.
7112        pub fn name(&self) -> std::option::Option<&str> {
7113            match self {
7114                Self::UnspecifiedAction => std::option::Option::Some("UNSPECIFIED_ACTION"),
7115                Self::Allow => std::option::Option::Some("ALLOW"),
7116                Self::Deny => std::option::Option::Some("DENY"),
7117                Self::UnknownValue(u) => u.0.name(),
7118            }
7119        }
7120    }
7121
7122    impl std::default::Default for Action {
7123        fn default() -> Self {
7124            use std::convert::From;
7125            Self::from(0)
7126        }
7127    }
7128
7129    impl std::fmt::Display for Action {
7130        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7131            wkt::internal::display_enum(f, self.name(), self.value())
7132        }
7133    }
7134
7135    impl std::convert::From<i32> for Action {
7136        fn from(value: i32) -> Self {
7137            match value {
7138                0 => Self::UnspecifiedAction,
7139                1 => Self::Allow,
7140                2 => Self::Deny,
7141                _ => Self::UnknownValue(action::UnknownValue(
7142                    wkt::internal::UnknownEnumValue::Integer(value),
7143                )),
7144            }
7145        }
7146    }
7147
7148    impl std::convert::From<&str> for Action {
7149        fn from(value: &str) -> Self {
7150            use std::string::ToString;
7151            match value {
7152                "UNSPECIFIED_ACTION" => Self::UnspecifiedAction,
7153                "ALLOW" => Self::Allow,
7154                "DENY" => Self::Deny,
7155                _ => Self::UnknownValue(action::UnknownValue(
7156                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7157                )),
7158            }
7159        }
7160    }
7161
7162    impl serde::ser::Serialize for Action {
7163        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7164        where
7165            S: serde::Serializer,
7166        {
7167            match self {
7168                Self::UnspecifiedAction => serializer.serialize_i32(0),
7169                Self::Allow => serializer.serialize_i32(1),
7170                Self::Deny => serializer.serialize_i32(2),
7171                Self::UnknownValue(u) => u.0.serialize(serializer),
7172            }
7173        }
7174    }
7175
7176    impl<'de> serde::de::Deserialize<'de> for Action {
7177        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7178        where
7179            D: serde::Deserializer<'de>,
7180        {
7181            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
7182                ".google.appengine.v1.FirewallRule.Action",
7183            ))
7184        }
7185    }
7186}
7187
7188/// An Instance resource is the computing unit that App Engine uses to
7189/// automatically scale an application.
7190#[derive(Clone, Default, PartialEq)]
7191#[non_exhaustive]
7192pub struct Instance {
7193    /// Output only. Full path to the Instance resource in the API.
7194    /// Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
7195    pub name: std::string::String,
7196
7197    /// Output only. Relative name of the instance within the version.
7198    /// Example: `instance-1`.
7199    pub id: std::string::String,
7200
7201    /// Output only. App Engine release this instance is running on.
7202    pub app_engine_release: std::string::String,
7203
7204    /// Output only. Availability of the instance.
7205    pub availability: crate::model::instance::Availability,
7206
7207    /// Output only. Name of the virtual machine where this instance lives. Only applicable
7208    /// for instances in App Engine flexible environment.
7209    pub vm_name: std::string::String,
7210
7211    /// Output only. Zone where the virtual machine is located. Only applicable for instances
7212    /// in App Engine flexible environment.
7213    pub vm_zone_name: std::string::String,
7214
7215    /// Output only. Virtual machine ID of this instance. Only applicable for instances in
7216    /// App Engine flexible environment.
7217    pub vm_id: std::string::String,
7218
7219    /// Output only. Time that this instance was started.
7220    ///
7221    /// @OutputOnly
7222    pub start_time: std::option::Option<wkt::Timestamp>,
7223
7224    /// Output only. Number of requests since this instance was started.
7225    pub requests: i32,
7226
7227    /// Output only. Number of errors since this instance was started.
7228    pub errors: i32,
7229
7230    /// Output only. Average queries per second (QPS) over the last minute.
7231    pub qps: f32,
7232
7233    /// Output only. Average latency (ms) over the last minute.
7234    pub average_latency: i32,
7235
7236    /// Output only. Total memory in use (bytes).
7237    pub memory_usage: i64,
7238
7239    /// Output only. Status of the virtual machine where this instance lives. Only applicable
7240    /// for instances in App Engine flexible environment.
7241    pub vm_status: std::string::String,
7242
7243    /// Output only. Whether this instance is in debug mode. Only applicable for instances in
7244    /// App Engine flexible environment.
7245    pub vm_debug_enabled: bool,
7246
7247    /// Output only. The IP address of this instance. Only applicable for instances in App
7248    /// Engine flexible environment.
7249    pub vm_ip: std::string::String,
7250
7251    /// Output only. The liveness health check of this instance. Only applicable for instances
7252    /// in App Engine flexible environment.
7253    pub vm_liveness: crate::model::instance::liveness::LivenessState,
7254
7255    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7256}
7257
7258impl Instance {
7259    pub fn new() -> Self {
7260        std::default::Default::default()
7261    }
7262
7263    /// Sets the value of [name][crate::model::Instance::name].
7264    ///
7265    /// # Example
7266    /// ```ignore,no_run
7267    /// # use google_cloud_appengine_v1::model::Instance;
7268    /// let x = Instance::new().set_name("example");
7269    /// ```
7270    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7271        self.name = v.into();
7272        self
7273    }
7274
7275    /// Sets the value of [id][crate::model::Instance::id].
7276    ///
7277    /// # Example
7278    /// ```ignore,no_run
7279    /// # use google_cloud_appengine_v1::model::Instance;
7280    /// let x = Instance::new().set_id("example");
7281    /// ```
7282    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7283        self.id = v.into();
7284        self
7285    }
7286
7287    /// Sets the value of [app_engine_release][crate::model::Instance::app_engine_release].
7288    ///
7289    /// # Example
7290    /// ```ignore,no_run
7291    /// # use google_cloud_appengine_v1::model::Instance;
7292    /// let x = Instance::new().set_app_engine_release("example");
7293    /// ```
7294    pub fn set_app_engine_release<T: std::convert::Into<std::string::String>>(
7295        mut self,
7296        v: T,
7297    ) -> Self {
7298        self.app_engine_release = v.into();
7299        self
7300    }
7301
7302    /// Sets the value of [availability][crate::model::Instance::availability].
7303    ///
7304    /// # Example
7305    /// ```ignore,no_run
7306    /// # use google_cloud_appengine_v1::model::Instance;
7307    /// use google_cloud_appengine_v1::model::instance::Availability;
7308    /// let x0 = Instance::new().set_availability(Availability::Resident);
7309    /// let x1 = Instance::new().set_availability(Availability::Dynamic);
7310    /// ```
7311    pub fn set_availability<T: std::convert::Into<crate::model::instance::Availability>>(
7312        mut self,
7313        v: T,
7314    ) -> Self {
7315        self.availability = v.into();
7316        self
7317    }
7318
7319    /// Sets the value of [vm_name][crate::model::Instance::vm_name].
7320    ///
7321    /// # Example
7322    /// ```ignore,no_run
7323    /// # use google_cloud_appengine_v1::model::Instance;
7324    /// let x = Instance::new().set_vm_name("example");
7325    /// ```
7326    pub fn set_vm_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7327        self.vm_name = v.into();
7328        self
7329    }
7330
7331    /// Sets the value of [vm_zone_name][crate::model::Instance::vm_zone_name].
7332    ///
7333    /// # Example
7334    /// ```ignore,no_run
7335    /// # use google_cloud_appengine_v1::model::Instance;
7336    /// let x = Instance::new().set_vm_zone_name("example");
7337    /// ```
7338    pub fn set_vm_zone_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7339        self.vm_zone_name = v.into();
7340        self
7341    }
7342
7343    /// Sets the value of [vm_id][crate::model::Instance::vm_id].
7344    ///
7345    /// # Example
7346    /// ```ignore,no_run
7347    /// # use google_cloud_appengine_v1::model::Instance;
7348    /// let x = Instance::new().set_vm_id("example");
7349    /// ```
7350    pub fn set_vm_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7351        self.vm_id = v.into();
7352        self
7353    }
7354
7355    /// Sets the value of [start_time][crate::model::Instance::start_time].
7356    ///
7357    /// # Example
7358    /// ```ignore,no_run
7359    /// # use google_cloud_appengine_v1::model::Instance;
7360    /// use wkt::Timestamp;
7361    /// let x = Instance::new().set_start_time(Timestamp::default()/* use setters */);
7362    /// ```
7363    pub fn set_start_time<T>(mut self, v: T) -> Self
7364    where
7365        T: std::convert::Into<wkt::Timestamp>,
7366    {
7367        self.start_time = std::option::Option::Some(v.into());
7368        self
7369    }
7370
7371    /// Sets or clears the value of [start_time][crate::model::Instance::start_time].
7372    ///
7373    /// # Example
7374    /// ```ignore,no_run
7375    /// # use google_cloud_appengine_v1::model::Instance;
7376    /// use wkt::Timestamp;
7377    /// let x = Instance::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
7378    /// let x = Instance::new().set_or_clear_start_time(None::<Timestamp>);
7379    /// ```
7380    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
7381    where
7382        T: std::convert::Into<wkt::Timestamp>,
7383    {
7384        self.start_time = v.map(|x| x.into());
7385        self
7386    }
7387
7388    /// Sets the value of [requests][crate::model::Instance::requests].
7389    ///
7390    /// # Example
7391    /// ```ignore,no_run
7392    /// # use google_cloud_appengine_v1::model::Instance;
7393    /// let x = Instance::new().set_requests(42);
7394    /// ```
7395    pub fn set_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7396        self.requests = v.into();
7397        self
7398    }
7399
7400    /// Sets the value of [errors][crate::model::Instance::errors].
7401    ///
7402    /// # Example
7403    /// ```ignore,no_run
7404    /// # use google_cloud_appengine_v1::model::Instance;
7405    /// let x = Instance::new().set_errors(42);
7406    /// ```
7407    pub fn set_errors<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7408        self.errors = v.into();
7409        self
7410    }
7411
7412    /// Sets the value of [qps][crate::model::Instance::qps].
7413    ///
7414    /// # Example
7415    /// ```ignore,no_run
7416    /// # use google_cloud_appengine_v1::model::Instance;
7417    /// let x = Instance::new().set_qps(42.0);
7418    /// ```
7419    pub fn set_qps<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
7420        self.qps = v.into();
7421        self
7422    }
7423
7424    /// Sets the value of [average_latency][crate::model::Instance::average_latency].
7425    ///
7426    /// # Example
7427    /// ```ignore,no_run
7428    /// # use google_cloud_appengine_v1::model::Instance;
7429    /// let x = Instance::new().set_average_latency(42);
7430    /// ```
7431    pub fn set_average_latency<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7432        self.average_latency = v.into();
7433        self
7434    }
7435
7436    /// Sets the value of [memory_usage][crate::model::Instance::memory_usage].
7437    ///
7438    /// # Example
7439    /// ```ignore,no_run
7440    /// # use google_cloud_appengine_v1::model::Instance;
7441    /// let x = Instance::new().set_memory_usage(42);
7442    /// ```
7443    pub fn set_memory_usage<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7444        self.memory_usage = v.into();
7445        self
7446    }
7447
7448    /// Sets the value of [vm_status][crate::model::Instance::vm_status].
7449    ///
7450    /// # Example
7451    /// ```ignore,no_run
7452    /// # use google_cloud_appengine_v1::model::Instance;
7453    /// let x = Instance::new().set_vm_status("example");
7454    /// ```
7455    pub fn set_vm_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7456        self.vm_status = v.into();
7457        self
7458    }
7459
7460    /// Sets the value of [vm_debug_enabled][crate::model::Instance::vm_debug_enabled].
7461    ///
7462    /// # Example
7463    /// ```ignore,no_run
7464    /// # use google_cloud_appengine_v1::model::Instance;
7465    /// let x = Instance::new().set_vm_debug_enabled(true);
7466    /// ```
7467    pub fn set_vm_debug_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7468        self.vm_debug_enabled = v.into();
7469        self
7470    }
7471
7472    /// Sets the value of [vm_ip][crate::model::Instance::vm_ip].
7473    ///
7474    /// # Example
7475    /// ```ignore,no_run
7476    /// # use google_cloud_appengine_v1::model::Instance;
7477    /// let x = Instance::new().set_vm_ip("example");
7478    /// ```
7479    pub fn set_vm_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7480        self.vm_ip = v.into();
7481        self
7482    }
7483
7484    /// Sets the value of [vm_liveness][crate::model::Instance::vm_liveness].
7485    ///
7486    /// # Example
7487    /// ```ignore,no_run
7488    /// # use google_cloud_appengine_v1::model::Instance;
7489    /// use google_cloud_appengine_v1::model::instance::liveness::LivenessState;
7490    /// let x0 = Instance::new().set_vm_liveness(LivenessState::Unknown);
7491    /// let x1 = Instance::new().set_vm_liveness(LivenessState::Healthy);
7492    /// let x2 = Instance::new().set_vm_liveness(LivenessState::Unhealthy);
7493    /// ```
7494    pub fn set_vm_liveness<
7495        T: std::convert::Into<crate::model::instance::liveness::LivenessState>,
7496    >(
7497        mut self,
7498        v: T,
7499    ) -> Self {
7500        self.vm_liveness = v.into();
7501        self
7502    }
7503}
7504
7505impl wkt::message::Message for Instance {
7506    fn typename() -> &'static str {
7507        "type.googleapis.com/google.appengine.v1.Instance"
7508    }
7509}
7510
7511/// Defines additional types related to [Instance].
7512pub mod instance {
7513    #[allow(unused_imports)]
7514    use super::*;
7515
7516    /// Wrapper for LivenessState enum.
7517    #[derive(Clone, Default, PartialEq)]
7518    #[non_exhaustive]
7519    pub struct Liveness {
7520        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7521    }
7522
7523    impl Liveness {
7524        pub fn new() -> Self {
7525            std::default::Default::default()
7526        }
7527    }
7528
7529    impl wkt::message::Message for Liveness {
7530        fn typename() -> &'static str {
7531            "type.googleapis.com/google.appengine.v1.Instance.Liveness"
7532        }
7533    }
7534
7535    /// Defines additional types related to [Liveness].
7536    pub mod liveness {
7537        #[allow(unused_imports)]
7538        use super::*;
7539
7540        /// Liveness health check status for Flex instances.
7541        ///
7542        /// # Working with unknown values
7543        ///
7544        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7545        /// additional enum variants at any time. Adding new variants is not considered
7546        /// a breaking change. Applications should write their code in anticipation of:
7547        ///
7548        /// - New values appearing in future releases of the client library, **and**
7549        /// - New values received dynamically, without application changes.
7550        ///
7551        /// Please consult the [Working with enums] section in the user guide for some
7552        /// guidelines.
7553        ///
7554        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7555        #[derive(Clone, Debug, PartialEq)]
7556        #[non_exhaustive]
7557        pub enum LivenessState {
7558            /// There is no liveness health check for the instance. Only applicable for
7559            /// instances in App Engine standard environment.
7560            Unspecified,
7561            /// The health checking system is aware of the instance but its health is
7562            /// not known at the moment.
7563            Unknown,
7564            /// The instance is reachable i.e. a connection to the application health
7565            /// checking endpoint can be established, and conforms to the requirements
7566            /// defined by the health check.
7567            Healthy,
7568            /// The instance is reachable, but does not conform to the requirements
7569            /// defined by the health check.
7570            Unhealthy,
7571            /// The instance is being drained. The existing connections to the instance
7572            /// have time to complete, but the new ones are being refused.
7573            Draining,
7574            /// The instance is unreachable i.e. a connection to the application health
7575            /// checking endpoint cannot be established, or the server does not respond
7576            /// within the specified timeout.
7577            Timeout,
7578            /// If set, the enum was initialized with an unknown value.
7579            ///
7580            /// Applications can examine the value using [LivenessState::value] or
7581            /// [LivenessState::name].
7582            UnknownValue(liveness_state::UnknownValue),
7583        }
7584
7585        #[doc(hidden)]
7586        pub mod liveness_state {
7587            #[allow(unused_imports)]
7588            use super::*;
7589            #[derive(Clone, Debug, PartialEq)]
7590            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7591        }
7592
7593        impl LivenessState {
7594            /// Gets the enum value.
7595            ///
7596            /// Returns `None` if the enum contains an unknown value deserialized from
7597            /// the string representation of enums.
7598            pub fn value(&self) -> std::option::Option<i32> {
7599                match self {
7600                    Self::Unspecified => std::option::Option::Some(0),
7601                    Self::Unknown => std::option::Option::Some(1),
7602                    Self::Healthy => std::option::Option::Some(2),
7603                    Self::Unhealthy => std::option::Option::Some(3),
7604                    Self::Draining => std::option::Option::Some(4),
7605                    Self::Timeout => std::option::Option::Some(5),
7606                    Self::UnknownValue(u) => u.0.value(),
7607                }
7608            }
7609
7610            /// Gets the enum value as a string.
7611            ///
7612            /// Returns `None` if the enum contains an unknown value deserialized from
7613            /// the integer representation of enums.
7614            pub fn name(&self) -> std::option::Option<&str> {
7615                match self {
7616                    Self::Unspecified => std::option::Option::Some("LIVENESS_STATE_UNSPECIFIED"),
7617                    Self::Unknown => std::option::Option::Some("UNKNOWN"),
7618                    Self::Healthy => std::option::Option::Some("HEALTHY"),
7619                    Self::Unhealthy => std::option::Option::Some("UNHEALTHY"),
7620                    Self::Draining => std::option::Option::Some("DRAINING"),
7621                    Self::Timeout => std::option::Option::Some("TIMEOUT"),
7622                    Self::UnknownValue(u) => u.0.name(),
7623                }
7624            }
7625        }
7626
7627        impl std::default::Default for LivenessState {
7628            fn default() -> Self {
7629                use std::convert::From;
7630                Self::from(0)
7631            }
7632        }
7633
7634        impl std::fmt::Display for LivenessState {
7635            fn fmt(
7636                &self,
7637                f: &mut std::fmt::Formatter<'_>,
7638            ) -> std::result::Result<(), std::fmt::Error> {
7639                wkt::internal::display_enum(f, self.name(), self.value())
7640            }
7641        }
7642
7643        impl std::convert::From<i32> for LivenessState {
7644            fn from(value: i32) -> Self {
7645                match value {
7646                    0 => Self::Unspecified,
7647                    1 => Self::Unknown,
7648                    2 => Self::Healthy,
7649                    3 => Self::Unhealthy,
7650                    4 => Self::Draining,
7651                    5 => Self::Timeout,
7652                    _ => Self::UnknownValue(liveness_state::UnknownValue(
7653                        wkt::internal::UnknownEnumValue::Integer(value),
7654                    )),
7655                }
7656            }
7657        }
7658
7659        impl std::convert::From<&str> for LivenessState {
7660            fn from(value: &str) -> Self {
7661                use std::string::ToString;
7662                match value {
7663                    "LIVENESS_STATE_UNSPECIFIED" => Self::Unspecified,
7664                    "UNKNOWN" => Self::Unknown,
7665                    "HEALTHY" => Self::Healthy,
7666                    "UNHEALTHY" => Self::Unhealthy,
7667                    "DRAINING" => Self::Draining,
7668                    "TIMEOUT" => Self::Timeout,
7669                    _ => Self::UnknownValue(liveness_state::UnknownValue(
7670                        wkt::internal::UnknownEnumValue::String(value.to_string()),
7671                    )),
7672                }
7673            }
7674        }
7675
7676        impl serde::ser::Serialize for LivenessState {
7677            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7678            where
7679                S: serde::Serializer,
7680            {
7681                match self {
7682                    Self::Unspecified => serializer.serialize_i32(0),
7683                    Self::Unknown => serializer.serialize_i32(1),
7684                    Self::Healthy => serializer.serialize_i32(2),
7685                    Self::Unhealthy => serializer.serialize_i32(3),
7686                    Self::Draining => serializer.serialize_i32(4),
7687                    Self::Timeout => serializer.serialize_i32(5),
7688                    Self::UnknownValue(u) => u.0.serialize(serializer),
7689                }
7690            }
7691        }
7692
7693        impl<'de> serde::de::Deserialize<'de> for LivenessState {
7694            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7695            where
7696                D: serde::Deserializer<'de>,
7697            {
7698                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LivenessState>::new(
7699                    ".google.appengine.v1.Instance.Liveness.LivenessState",
7700                ))
7701            }
7702        }
7703    }
7704
7705    /// Availability of the instance.
7706    ///
7707    /// # Working with unknown values
7708    ///
7709    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7710    /// additional enum variants at any time. Adding new variants is not considered
7711    /// a breaking change. Applications should write their code in anticipation of:
7712    ///
7713    /// - New values appearing in future releases of the client library, **and**
7714    /// - New values received dynamically, without application changes.
7715    ///
7716    /// Please consult the [Working with enums] section in the user guide for some
7717    /// guidelines.
7718    ///
7719    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7720    #[derive(Clone, Debug, PartialEq)]
7721    #[non_exhaustive]
7722    pub enum Availability {
7723        Unspecified,
7724        Resident,
7725        Dynamic,
7726        /// If set, the enum was initialized with an unknown value.
7727        ///
7728        /// Applications can examine the value using [Availability::value] or
7729        /// [Availability::name].
7730        UnknownValue(availability::UnknownValue),
7731    }
7732
7733    #[doc(hidden)]
7734    pub mod availability {
7735        #[allow(unused_imports)]
7736        use super::*;
7737        #[derive(Clone, Debug, PartialEq)]
7738        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7739    }
7740
7741    impl Availability {
7742        /// Gets the enum value.
7743        ///
7744        /// Returns `None` if the enum contains an unknown value deserialized from
7745        /// the string representation of enums.
7746        pub fn value(&self) -> std::option::Option<i32> {
7747            match self {
7748                Self::Unspecified => std::option::Option::Some(0),
7749                Self::Resident => std::option::Option::Some(1),
7750                Self::Dynamic => std::option::Option::Some(2),
7751                Self::UnknownValue(u) => u.0.value(),
7752            }
7753        }
7754
7755        /// Gets the enum value as a string.
7756        ///
7757        /// Returns `None` if the enum contains an unknown value deserialized from
7758        /// the integer representation of enums.
7759        pub fn name(&self) -> std::option::Option<&str> {
7760            match self {
7761                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
7762                Self::Resident => std::option::Option::Some("RESIDENT"),
7763                Self::Dynamic => std::option::Option::Some("DYNAMIC"),
7764                Self::UnknownValue(u) => u.0.name(),
7765            }
7766        }
7767    }
7768
7769    impl std::default::Default for Availability {
7770        fn default() -> Self {
7771            use std::convert::From;
7772            Self::from(0)
7773        }
7774    }
7775
7776    impl std::fmt::Display for Availability {
7777        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7778            wkt::internal::display_enum(f, self.name(), self.value())
7779        }
7780    }
7781
7782    impl std::convert::From<i32> for Availability {
7783        fn from(value: i32) -> Self {
7784            match value {
7785                0 => Self::Unspecified,
7786                1 => Self::Resident,
7787                2 => Self::Dynamic,
7788                _ => Self::UnknownValue(availability::UnknownValue(
7789                    wkt::internal::UnknownEnumValue::Integer(value),
7790                )),
7791            }
7792        }
7793    }
7794
7795    impl std::convert::From<&str> for Availability {
7796        fn from(value: &str) -> Self {
7797            use std::string::ToString;
7798            match value {
7799                "UNSPECIFIED" => Self::Unspecified,
7800                "RESIDENT" => Self::Resident,
7801                "DYNAMIC" => Self::Dynamic,
7802                _ => Self::UnknownValue(availability::UnknownValue(
7803                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7804                )),
7805            }
7806        }
7807    }
7808
7809    impl serde::ser::Serialize for Availability {
7810        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7811        where
7812            S: serde::Serializer,
7813        {
7814            match self {
7815                Self::Unspecified => serializer.serialize_i32(0),
7816                Self::Resident => serializer.serialize_i32(1),
7817                Self::Dynamic => serializer.serialize_i32(2),
7818                Self::UnknownValue(u) => u.0.serialize(serializer),
7819            }
7820        }
7821    }
7822
7823    impl<'de> serde::de::Deserialize<'de> for Availability {
7824        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7825        where
7826            D: serde::Deserializer<'de>,
7827        {
7828            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Availability>::new(
7829                ".google.appengine.v1.Instance.Availability",
7830            ))
7831        }
7832    }
7833}
7834
7835/// Metadata for the given [google.cloud.location.Location][google.cloud.location.Location].
7836#[derive(Clone, Default, PartialEq)]
7837#[non_exhaustive]
7838pub struct LocationMetadata {
7839    /// App Engine standard environment is available in the given location.
7840    ///
7841    /// @OutputOnly
7842    pub standard_environment_available: bool,
7843
7844    /// App Engine flexible environment is available in the given location.
7845    ///
7846    /// @OutputOnly
7847    pub flexible_environment_available: bool,
7848
7849    /// Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search)
7850    /// is available in the given location.
7851    pub search_api_available: bool,
7852
7853    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7854}
7855
7856impl LocationMetadata {
7857    pub fn new() -> Self {
7858        std::default::Default::default()
7859    }
7860
7861    /// Sets the value of [standard_environment_available][crate::model::LocationMetadata::standard_environment_available].
7862    ///
7863    /// # Example
7864    /// ```ignore,no_run
7865    /// # use google_cloud_appengine_v1::model::LocationMetadata;
7866    /// let x = LocationMetadata::new().set_standard_environment_available(true);
7867    /// ```
7868    pub fn set_standard_environment_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7869        self.standard_environment_available = v.into();
7870        self
7871    }
7872
7873    /// Sets the value of [flexible_environment_available][crate::model::LocationMetadata::flexible_environment_available].
7874    ///
7875    /// # Example
7876    /// ```ignore,no_run
7877    /// # use google_cloud_appengine_v1::model::LocationMetadata;
7878    /// let x = LocationMetadata::new().set_flexible_environment_available(true);
7879    /// ```
7880    pub fn set_flexible_environment_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7881        self.flexible_environment_available = v.into();
7882        self
7883    }
7884
7885    /// Sets the value of [search_api_available][crate::model::LocationMetadata::search_api_available].
7886    ///
7887    /// # Example
7888    /// ```ignore,no_run
7889    /// # use google_cloud_appengine_v1::model::LocationMetadata;
7890    /// let x = LocationMetadata::new().set_search_api_available(true);
7891    /// ```
7892    pub fn set_search_api_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7893        self.search_api_available = v.into();
7894        self
7895    }
7896}
7897
7898impl wkt::message::Message for LocationMetadata {
7899    fn typename() -> &'static str {
7900        "type.googleapis.com/google.appengine.v1.LocationMetadata"
7901    }
7902}
7903
7904/// A NetworkSettings resource is a container for ingress settings for a version
7905/// or service.
7906#[derive(Clone, Default, PartialEq)]
7907#[non_exhaustive]
7908pub struct NetworkSettings {
7909    /// The ingress settings for version or service.
7910    pub ingress_traffic_allowed: crate::model::network_settings::IngressTrafficAllowed,
7911
7912    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7913}
7914
7915impl NetworkSettings {
7916    pub fn new() -> Self {
7917        std::default::Default::default()
7918    }
7919
7920    /// Sets the value of [ingress_traffic_allowed][crate::model::NetworkSettings::ingress_traffic_allowed].
7921    ///
7922    /// # Example
7923    /// ```ignore,no_run
7924    /// # use google_cloud_appengine_v1::model::NetworkSettings;
7925    /// use google_cloud_appengine_v1::model::network_settings::IngressTrafficAllowed;
7926    /// let x0 = NetworkSettings::new().set_ingress_traffic_allowed(IngressTrafficAllowed::All);
7927    /// let x1 = NetworkSettings::new().set_ingress_traffic_allowed(IngressTrafficAllowed::InternalOnly);
7928    /// let x2 = NetworkSettings::new().set_ingress_traffic_allowed(IngressTrafficAllowed::InternalAndLb);
7929    /// ```
7930    pub fn set_ingress_traffic_allowed<
7931        T: std::convert::Into<crate::model::network_settings::IngressTrafficAllowed>,
7932    >(
7933        mut self,
7934        v: T,
7935    ) -> Self {
7936        self.ingress_traffic_allowed = v.into();
7937        self
7938    }
7939}
7940
7941impl wkt::message::Message for NetworkSettings {
7942    fn typename() -> &'static str {
7943        "type.googleapis.com/google.appengine.v1.NetworkSettings"
7944    }
7945}
7946
7947/// Defines additional types related to [NetworkSettings].
7948pub mod network_settings {
7949    #[allow(unused_imports)]
7950    use super::*;
7951
7952    /// If unspecified, INGRESS_TRAFFIC_ALLOWED_ALL will be used.
7953    ///
7954    /// # Working with unknown values
7955    ///
7956    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7957    /// additional enum variants at any time. Adding new variants is not considered
7958    /// a breaking change. Applications should write their code in anticipation of:
7959    ///
7960    /// - New values appearing in future releases of the client library, **and**
7961    /// - New values received dynamically, without application changes.
7962    ///
7963    /// Please consult the [Working with enums] section in the user guide for some
7964    /// guidelines.
7965    ///
7966    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7967    #[derive(Clone, Debug, PartialEq)]
7968    #[non_exhaustive]
7969    pub enum IngressTrafficAllowed {
7970        /// Unspecified
7971        Unspecified,
7972        /// Allow HTTP traffic from public and private sources.
7973        All,
7974        /// Allow HTTP traffic from only private VPC sources.
7975        InternalOnly,
7976        /// Allow HTTP traffic from private VPC sources and through load balancers.
7977        InternalAndLb,
7978        /// If set, the enum was initialized with an unknown value.
7979        ///
7980        /// Applications can examine the value using [IngressTrafficAllowed::value] or
7981        /// [IngressTrafficAllowed::name].
7982        UnknownValue(ingress_traffic_allowed::UnknownValue),
7983    }
7984
7985    #[doc(hidden)]
7986    pub mod ingress_traffic_allowed {
7987        #[allow(unused_imports)]
7988        use super::*;
7989        #[derive(Clone, Debug, PartialEq)]
7990        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7991    }
7992
7993    impl IngressTrafficAllowed {
7994        /// Gets the enum value.
7995        ///
7996        /// Returns `None` if the enum contains an unknown value deserialized from
7997        /// the string representation of enums.
7998        pub fn value(&self) -> std::option::Option<i32> {
7999            match self {
8000                Self::Unspecified => std::option::Option::Some(0),
8001                Self::All => std::option::Option::Some(1),
8002                Self::InternalOnly => std::option::Option::Some(2),
8003                Self::InternalAndLb => std::option::Option::Some(3),
8004                Self::UnknownValue(u) => u.0.value(),
8005            }
8006        }
8007
8008        /// Gets the enum value as a string.
8009        ///
8010        /// Returns `None` if the enum contains an unknown value deserialized from
8011        /// the integer representation of enums.
8012        pub fn name(&self) -> std::option::Option<&str> {
8013            match self {
8014                Self::Unspecified => {
8015                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED")
8016                }
8017                Self::All => std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_ALL"),
8018                Self::InternalOnly => {
8019                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY")
8020                }
8021                Self::InternalAndLb => {
8022                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB")
8023                }
8024                Self::UnknownValue(u) => u.0.name(),
8025            }
8026        }
8027    }
8028
8029    impl std::default::Default for IngressTrafficAllowed {
8030        fn default() -> Self {
8031            use std::convert::From;
8032            Self::from(0)
8033        }
8034    }
8035
8036    impl std::fmt::Display for IngressTrafficAllowed {
8037        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8038            wkt::internal::display_enum(f, self.name(), self.value())
8039        }
8040    }
8041
8042    impl std::convert::From<i32> for IngressTrafficAllowed {
8043        fn from(value: i32) -> Self {
8044            match value {
8045                0 => Self::Unspecified,
8046                1 => Self::All,
8047                2 => Self::InternalOnly,
8048                3 => Self::InternalAndLb,
8049                _ => Self::UnknownValue(ingress_traffic_allowed::UnknownValue(
8050                    wkt::internal::UnknownEnumValue::Integer(value),
8051                )),
8052            }
8053        }
8054    }
8055
8056    impl std::convert::From<&str> for IngressTrafficAllowed {
8057        fn from(value: &str) -> Self {
8058            use std::string::ToString;
8059            match value {
8060                "INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED" => Self::Unspecified,
8061                "INGRESS_TRAFFIC_ALLOWED_ALL" => Self::All,
8062                "INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY" => Self::InternalOnly,
8063                "INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB" => Self::InternalAndLb,
8064                _ => Self::UnknownValue(ingress_traffic_allowed::UnknownValue(
8065                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8066                )),
8067            }
8068        }
8069    }
8070
8071    impl serde::ser::Serialize for IngressTrafficAllowed {
8072        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8073        where
8074            S: serde::Serializer,
8075        {
8076            match self {
8077                Self::Unspecified => serializer.serialize_i32(0),
8078                Self::All => serializer.serialize_i32(1),
8079                Self::InternalOnly => serializer.serialize_i32(2),
8080                Self::InternalAndLb => serializer.serialize_i32(3),
8081                Self::UnknownValue(u) => u.0.serialize(serializer),
8082            }
8083        }
8084    }
8085
8086    impl<'de> serde::de::Deserialize<'de> for IngressTrafficAllowed {
8087        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8088        where
8089            D: serde::Deserializer<'de>,
8090        {
8091            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IngressTrafficAllowed>::new(
8092                ".google.appengine.v1.NetworkSettings.IngressTrafficAllowed",
8093            ))
8094        }
8095    }
8096}
8097
8098/// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation].
8099///
8100/// [google.longrunning.Operation]: google_cloud_longrunning::model::Operation
8101#[derive(Clone, Default, PartialEq)]
8102#[non_exhaustive]
8103pub struct OperationMetadataV1 {
8104    /// API method that initiated this operation. Example:
8105    /// `google.appengine.v1.Versions.CreateVersion`.
8106    ///
8107    /// @OutputOnly
8108    pub method: std::string::String,
8109
8110    /// Time that this operation was created.
8111    ///
8112    /// @OutputOnly
8113    pub insert_time: std::option::Option<wkt::Timestamp>,
8114
8115    /// Time that this operation completed.
8116    ///
8117    /// @OutputOnly
8118    pub end_time: std::option::Option<wkt::Timestamp>,
8119
8120    /// User who requested this operation.
8121    ///
8122    /// @OutputOnly
8123    pub user: std::string::String,
8124
8125    /// Name of the resource that this operation is acting on. Example:
8126    /// `apps/myapp/services/default`.
8127    ///
8128    /// @OutputOnly
8129    pub target: std::string::String,
8130
8131    /// Ephemeral message that may change every time the operation is polled.
8132    /// @OutputOnly
8133    pub ephemeral_message: std::string::String,
8134
8135    /// Durable messages that persist on every operation poll.
8136    /// @OutputOnly
8137    pub warning: std::vec::Vec<std::string::String>,
8138
8139    /// Metadata specific to the type of operation in progress.
8140    /// @OutputOnly
8141    pub method_metadata: std::option::Option<crate::model::operation_metadata_v_1::MethodMetadata>,
8142
8143    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8144}
8145
8146impl OperationMetadataV1 {
8147    pub fn new() -> Self {
8148        std::default::Default::default()
8149    }
8150
8151    /// Sets the value of [method][crate::model::OperationMetadataV1::method].
8152    ///
8153    /// # Example
8154    /// ```ignore,no_run
8155    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8156    /// let x = OperationMetadataV1::new().set_method("example");
8157    /// ```
8158    pub fn set_method<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8159        self.method = v.into();
8160        self
8161    }
8162
8163    /// Sets the value of [insert_time][crate::model::OperationMetadataV1::insert_time].
8164    ///
8165    /// # Example
8166    /// ```ignore,no_run
8167    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8168    /// use wkt::Timestamp;
8169    /// let x = OperationMetadataV1::new().set_insert_time(Timestamp::default()/* use setters */);
8170    /// ```
8171    pub fn set_insert_time<T>(mut self, v: T) -> Self
8172    where
8173        T: std::convert::Into<wkt::Timestamp>,
8174    {
8175        self.insert_time = std::option::Option::Some(v.into());
8176        self
8177    }
8178
8179    /// Sets or clears the value of [insert_time][crate::model::OperationMetadataV1::insert_time].
8180    ///
8181    /// # Example
8182    /// ```ignore,no_run
8183    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8184    /// use wkt::Timestamp;
8185    /// let x = OperationMetadataV1::new().set_or_clear_insert_time(Some(Timestamp::default()/* use setters */));
8186    /// let x = OperationMetadataV1::new().set_or_clear_insert_time(None::<Timestamp>);
8187    /// ```
8188    pub fn set_or_clear_insert_time<T>(mut self, v: std::option::Option<T>) -> Self
8189    where
8190        T: std::convert::Into<wkt::Timestamp>,
8191    {
8192        self.insert_time = v.map(|x| x.into());
8193        self
8194    }
8195
8196    /// Sets the value of [end_time][crate::model::OperationMetadataV1::end_time].
8197    ///
8198    /// # Example
8199    /// ```ignore,no_run
8200    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8201    /// use wkt::Timestamp;
8202    /// let x = OperationMetadataV1::new().set_end_time(Timestamp::default()/* use setters */);
8203    /// ```
8204    pub fn set_end_time<T>(mut self, v: T) -> Self
8205    where
8206        T: std::convert::Into<wkt::Timestamp>,
8207    {
8208        self.end_time = std::option::Option::Some(v.into());
8209        self
8210    }
8211
8212    /// Sets or clears the value of [end_time][crate::model::OperationMetadataV1::end_time].
8213    ///
8214    /// # Example
8215    /// ```ignore,no_run
8216    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8217    /// use wkt::Timestamp;
8218    /// let x = OperationMetadataV1::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8219    /// let x = OperationMetadataV1::new().set_or_clear_end_time(None::<Timestamp>);
8220    /// ```
8221    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8222    where
8223        T: std::convert::Into<wkt::Timestamp>,
8224    {
8225        self.end_time = v.map(|x| x.into());
8226        self
8227    }
8228
8229    /// Sets the value of [user][crate::model::OperationMetadataV1::user].
8230    ///
8231    /// # Example
8232    /// ```ignore,no_run
8233    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8234    /// let x = OperationMetadataV1::new().set_user("example");
8235    /// ```
8236    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8237        self.user = v.into();
8238        self
8239    }
8240
8241    /// Sets the value of [target][crate::model::OperationMetadataV1::target].
8242    ///
8243    /// # Example
8244    /// ```ignore,no_run
8245    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8246    /// let x = OperationMetadataV1::new().set_target("example");
8247    /// ```
8248    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8249        self.target = v.into();
8250        self
8251    }
8252
8253    /// Sets the value of [ephemeral_message][crate::model::OperationMetadataV1::ephemeral_message].
8254    ///
8255    /// # Example
8256    /// ```ignore,no_run
8257    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8258    /// let x = OperationMetadataV1::new().set_ephemeral_message("example");
8259    /// ```
8260    pub fn set_ephemeral_message<T: std::convert::Into<std::string::String>>(
8261        mut self,
8262        v: T,
8263    ) -> Self {
8264        self.ephemeral_message = v.into();
8265        self
8266    }
8267
8268    /// Sets the value of [warning][crate::model::OperationMetadataV1::warning].
8269    ///
8270    /// # Example
8271    /// ```ignore,no_run
8272    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8273    /// let x = OperationMetadataV1::new().set_warning(["a", "b", "c"]);
8274    /// ```
8275    pub fn set_warning<T, V>(mut self, v: T) -> Self
8276    where
8277        T: std::iter::IntoIterator<Item = V>,
8278        V: std::convert::Into<std::string::String>,
8279    {
8280        use std::iter::Iterator;
8281        self.warning = v.into_iter().map(|i| i.into()).collect();
8282        self
8283    }
8284
8285    /// Sets the value of [method_metadata][crate::model::OperationMetadataV1::method_metadata].
8286    ///
8287    /// Note that all the setters affecting `method_metadata` are mutually
8288    /// exclusive.
8289    ///
8290    /// # Example
8291    /// ```ignore,no_run
8292    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8293    /// use google_cloud_appengine_v1::model::CreateVersionMetadataV1;
8294    /// let x = OperationMetadataV1::new().set_method_metadata(Some(
8295    ///     google_cloud_appengine_v1::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(CreateVersionMetadataV1::default().into())));
8296    /// ```
8297    pub fn set_method_metadata<
8298        T: std::convert::Into<
8299                std::option::Option<crate::model::operation_metadata_v_1::MethodMetadata>,
8300            >,
8301    >(
8302        mut self,
8303        v: T,
8304    ) -> Self {
8305        self.method_metadata = v.into();
8306        self
8307    }
8308
8309    /// The value of [method_metadata][crate::model::OperationMetadataV1::method_metadata]
8310    /// if it holds a `CreateVersionMetadata`, `None` if the field is not set or
8311    /// holds a different branch.
8312    pub fn create_version_metadata(
8313        &self,
8314    ) -> std::option::Option<&std::boxed::Box<crate::model::CreateVersionMetadataV1>> {
8315        #[allow(unreachable_patterns)]
8316        self.method_metadata.as_ref().and_then(|v| match v {
8317            crate::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(v) => {
8318                std::option::Option::Some(v)
8319            }
8320            _ => std::option::Option::None,
8321        })
8322    }
8323
8324    /// Sets the value of [method_metadata][crate::model::OperationMetadataV1::method_metadata]
8325    /// to hold a `CreateVersionMetadata`.
8326    ///
8327    /// Note that all the setters affecting `method_metadata` are
8328    /// mutually exclusive.
8329    ///
8330    /// # Example
8331    /// ```ignore,no_run
8332    /// # use google_cloud_appengine_v1::model::OperationMetadataV1;
8333    /// use google_cloud_appengine_v1::model::CreateVersionMetadataV1;
8334    /// let x = OperationMetadataV1::new().set_create_version_metadata(CreateVersionMetadataV1::default()/* use setters */);
8335    /// assert!(x.create_version_metadata().is_some());
8336    /// ```
8337    pub fn set_create_version_metadata<
8338        T: std::convert::Into<std::boxed::Box<crate::model::CreateVersionMetadataV1>>,
8339    >(
8340        mut self,
8341        v: T,
8342    ) -> Self {
8343        self.method_metadata = std::option::Option::Some(
8344            crate::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(v.into()),
8345        );
8346        self
8347    }
8348}
8349
8350impl wkt::message::Message for OperationMetadataV1 {
8351    fn typename() -> &'static str {
8352        "type.googleapis.com/google.appengine.v1.OperationMetadataV1"
8353    }
8354}
8355
8356/// Defines additional types related to [OperationMetadataV1].
8357pub mod operation_metadata_v_1 {
8358    #[allow(unused_imports)]
8359    use super::*;
8360
8361    /// Metadata specific to the type of operation in progress.
8362    /// @OutputOnly
8363    #[derive(Clone, Debug, PartialEq)]
8364    #[non_exhaustive]
8365    pub enum MethodMetadata {
8366        CreateVersionMetadata(std::boxed::Box<crate::model::CreateVersionMetadataV1>),
8367    }
8368}
8369
8370/// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation] during a
8371/// [google.appengine.v1.CreateVersionRequest][google.appengine.v1.CreateVersionRequest].
8372///
8373/// [google.appengine.v1.CreateVersionRequest]: crate::model::CreateVersionRequest
8374/// [google.longrunning.Operation]: google_cloud_longrunning::model::Operation
8375#[derive(Clone, Default, PartialEq)]
8376#[non_exhaustive]
8377pub struct CreateVersionMetadataV1 {
8378    /// The Cloud Build ID if one was created as part of the version create.
8379    /// @OutputOnly
8380    pub cloud_build_id: std::string::String,
8381
8382    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8383}
8384
8385impl CreateVersionMetadataV1 {
8386    pub fn new() -> Self {
8387        std::default::Default::default()
8388    }
8389
8390    /// Sets the value of [cloud_build_id][crate::model::CreateVersionMetadataV1::cloud_build_id].
8391    ///
8392    /// # Example
8393    /// ```ignore,no_run
8394    /// # use google_cloud_appengine_v1::model::CreateVersionMetadataV1;
8395    /// let x = CreateVersionMetadataV1::new().set_cloud_build_id("example");
8396    /// ```
8397    pub fn set_cloud_build_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8398        self.cloud_build_id = v.into();
8399        self
8400    }
8401}
8402
8403impl wkt::message::Message for CreateVersionMetadataV1 {
8404    fn typename() -> &'static str {
8405        "type.googleapis.com/google.appengine.v1.CreateVersionMetadataV1"
8406    }
8407}
8408
8409/// A Service resource is a logical component of an application that can share
8410/// state and communicate in a secure fashion with other services.
8411/// For example, an application that handles customer requests might
8412/// include separate services to handle tasks such as backend data
8413/// analysis or API requests from mobile devices. Each service has a
8414/// collection of versions that define a specific set of code used to
8415/// implement the functionality of that service.
8416#[derive(Clone, Default, PartialEq)]
8417#[non_exhaustive]
8418pub struct Service {
8419    /// Full path to the Service resource in the API.
8420    /// Example: `apps/myapp/services/default`.
8421    ///
8422    /// @OutputOnly
8423    pub name: std::string::String,
8424
8425    /// Relative name of the service within the application.
8426    /// Example: `default`.
8427    ///
8428    /// @OutputOnly
8429    pub id: std::string::String,
8430
8431    /// Mapping that defines fractional HTTP traffic diversion to
8432    /// different versions within the service.
8433    pub split: std::option::Option<crate::model::TrafficSplit>,
8434
8435    /// A set of labels to apply to this service. Labels are key/value pairs that
8436    /// describe the service and all resources that belong to it (e.g.,
8437    /// versions). The labels can be used to search and group resources, and are
8438    /// propagated to the usage and billing reports, enabling fine-grain analysis
8439    /// of costs. An example of using labels is to tag resources belonging to
8440    /// different environments (e.g., "env=prod", "env=qa").
8441    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
8442
8443    /// Ingress settings for this service. Will apply to all versions.
8444    pub network_settings: std::option::Option<crate::model::NetworkSettings>,
8445
8446    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8447}
8448
8449impl Service {
8450    pub fn new() -> Self {
8451        std::default::Default::default()
8452    }
8453
8454    /// Sets the value of [name][crate::model::Service::name].
8455    ///
8456    /// # Example
8457    /// ```ignore,no_run
8458    /// # use google_cloud_appengine_v1::model::Service;
8459    /// let x = Service::new().set_name("example");
8460    /// ```
8461    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8462        self.name = v.into();
8463        self
8464    }
8465
8466    /// Sets the value of [id][crate::model::Service::id].
8467    ///
8468    /// # Example
8469    /// ```ignore,no_run
8470    /// # use google_cloud_appengine_v1::model::Service;
8471    /// let x = Service::new().set_id("example");
8472    /// ```
8473    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8474        self.id = v.into();
8475        self
8476    }
8477
8478    /// Sets the value of [split][crate::model::Service::split].
8479    ///
8480    /// # Example
8481    /// ```ignore,no_run
8482    /// # use google_cloud_appengine_v1::model::Service;
8483    /// use google_cloud_appengine_v1::model::TrafficSplit;
8484    /// let x = Service::new().set_split(TrafficSplit::default()/* use setters */);
8485    /// ```
8486    pub fn set_split<T>(mut self, v: T) -> Self
8487    where
8488        T: std::convert::Into<crate::model::TrafficSplit>,
8489    {
8490        self.split = std::option::Option::Some(v.into());
8491        self
8492    }
8493
8494    /// Sets or clears the value of [split][crate::model::Service::split].
8495    ///
8496    /// # Example
8497    /// ```ignore,no_run
8498    /// # use google_cloud_appengine_v1::model::Service;
8499    /// use google_cloud_appengine_v1::model::TrafficSplit;
8500    /// let x = Service::new().set_or_clear_split(Some(TrafficSplit::default()/* use setters */));
8501    /// let x = Service::new().set_or_clear_split(None::<TrafficSplit>);
8502    /// ```
8503    pub fn set_or_clear_split<T>(mut self, v: std::option::Option<T>) -> Self
8504    where
8505        T: std::convert::Into<crate::model::TrafficSplit>,
8506    {
8507        self.split = v.map(|x| x.into());
8508        self
8509    }
8510
8511    /// Sets the value of [labels][crate::model::Service::labels].
8512    ///
8513    /// # Example
8514    /// ```ignore,no_run
8515    /// # use google_cloud_appengine_v1::model::Service;
8516    /// let x = Service::new().set_labels([
8517    ///     ("key0", "abc"),
8518    ///     ("key1", "xyz"),
8519    /// ]);
8520    /// ```
8521    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
8522    where
8523        T: std::iter::IntoIterator<Item = (K, V)>,
8524        K: std::convert::Into<std::string::String>,
8525        V: std::convert::Into<std::string::String>,
8526    {
8527        use std::iter::Iterator;
8528        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8529        self
8530    }
8531
8532    /// Sets the value of [network_settings][crate::model::Service::network_settings].
8533    ///
8534    /// # Example
8535    /// ```ignore,no_run
8536    /// # use google_cloud_appengine_v1::model::Service;
8537    /// use google_cloud_appengine_v1::model::NetworkSettings;
8538    /// let x = Service::new().set_network_settings(NetworkSettings::default()/* use setters */);
8539    /// ```
8540    pub fn set_network_settings<T>(mut self, v: T) -> Self
8541    where
8542        T: std::convert::Into<crate::model::NetworkSettings>,
8543    {
8544        self.network_settings = std::option::Option::Some(v.into());
8545        self
8546    }
8547
8548    /// Sets or clears the value of [network_settings][crate::model::Service::network_settings].
8549    ///
8550    /// # Example
8551    /// ```ignore,no_run
8552    /// # use google_cloud_appengine_v1::model::Service;
8553    /// use google_cloud_appengine_v1::model::NetworkSettings;
8554    /// let x = Service::new().set_or_clear_network_settings(Some(NetworkSettings::default()/* use setters */));
8555    /// let x = Service::new().set_or_clear_network_settings(None::<NetworkSettings>);
8556    /// ```
8557    pub fn set_or_clear_network_settings<T>(mut self, v: std::option::Option<T>) -> Self
8558    where
8559        T: std::convert::Into<crate::model::NetworkSettings>,
8560    {
8561        self.network_settings = v.map(|x| x.into());
8562        self
8563    }
8564}
8565
8566impl wkt::message::Message for Service {
8567    fn typename() -> &'static str {
8568        "type.googleapis.com/google.appengine.v1.Service"
8569    }
8570}
8571
8572/// Traffic routing configuration for versions within a single service. Traffic
8573/// splits define how traffic directed to the service is assigned to versions.
8574#[derive(Clone, Default, PartialEq)]
8575#[non_exhaustive]
8576pub struct TrafficSplit {
8577    /// Mechanism used to determine which version a request is sent to.
8578    /// The traffic selection algorithm will
8579    /// be stable for either type until allocations are changed.
8580    pub shard_by: crate::model::traffic_split::ShardBy,
8581
8582    /// Mapping from version IDs within the service to fractional
8583    /// (0.000, 1] allocations of traffic for that version. Each version can
8584    /// be specified only once, but some versions in the service may not
8585    /// have any traffic allocation. Services that have traffic allocated
8586    /// cannot be deleted until either the service is deleted or
8587    /// their traffic allocation is removed. Allocations must sum to 1.
8588    /// Up to two decimal place precision is supported for IP-based splits and
8589    /// up to three decimal places is supported for cookie-based splits.
8590    pub allocations: std::collections::HashMap<std::string::String, f64>,
8591
8592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8593}
8594
8595impl TrafficSplit {
8596    pub fn new() -> Self {
8597        std::default::Default::default()
8598    }
8599
8600    /// Sets the value of [shard_by][crate::model::TrafficSplit::shard_by].
8601    ///
8602    /// # Example
8603    /// ```ignore,no_run
8604    /// # use google_cloud_appengine_v1::model::TrafficSplit;
8605    /// use google_cloud_appengine_v1::model::traffic_split::ShardBy;
8606    /// let x0 = TrafficSplit::new().set_shard_by(ShardBy::Cookie);
8607    /// let x1 = TrafficSplit::new().set_shard_by(ShardBy::Ip);
8608    /// let x2 = TrafficSplit::new().set_shard_by(ShardBy::Random);
8609    /// ```
8610    pub fn set_shard_by<T: std::convert::Into<crate::model::traffic_split::ShardBy>>(
8611        mut self,
8612        v: T,
8613    ) -> Self {
8614        self.shard_by = v.into();
8615        self
8616    }
8617
8618    /// Sets the value of [allocations][crate::model::TrafficSplit::allocations].
8619    ///
8620    /// # Example
8621    /// ```ignore,no_run
8622    /// # use google_cloud_appengine_v1::model::TrafficSplit;
8623    /// let x = TrafficSplit::new().set_allocations([
8624    ///     ("key0", 123.5),
8625    ///     ("key1", 456.5),
8626    /// ]);
8627    /// ```
8628    pub fn set_allocations<T, K, V>(mut self, v: T) -> Self
8629    where
8630        T: std::iter::IntoIterator<Item = (K, V)>,
8631        K: std::convert::Into<std::string::String>,
8632        V: std::convert::Into<f64>,
8633    {
8634        use std::iter::Iterator;
8635        self.allocations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8636        self
8637    }
8638}
8639
8640impl wkt::message::Message for TrafficSplit {
8641    fn typename() -> &'static str {
8642        "type.googleapis.com/google.appengine.v1.TrafficSplit"
8643    }
8644}
8645
8646/// Defines additional types related to [TrafficSplit].
8647pub mod traffic_split {
8648    #[allow(unused_imports)]
8649    use super::*;
8650
8651    /// Available sharding mechanisms.
8652    ///
8653    /// # Working with unknown values
8654    ///
8655    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8656    /// additional enum variants at any time. Adding new variants is not considered
8657    /// a breaking change. Applications should write their code in anticipation of:
8658    ///
8659    /// - New values appearing in future releases of the client library, **and**
8660    /// - New values received dynamically, without application changes.
8661    ///
8662    /// Please consult the [Working with enums] section in the user guide for some
8663    /// guidelines.
8664    ///
8665    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8666    #[derive(Clone, Debug, PartialEq)]
8667    #[non_exhaustive]
8668    pub enum ShardBy {
8669        /// Diversion method unspecified.
8670        Unspecified,
8671        /// Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
8672        /// must be set by the application itself or no diversion will occur.
8673        Cookie,
8674        /// Diversion based on applying the modulus operation to a fingerprint
8675        /// of the IP address.
8676        Ip,
8677        /// Diversion based on weighted random assignment. An incoming request is
8678        /// randomly routed to a version in the traffic split, with probability
8679        /// proportional to the version's traffic share.
8680        Random,
8681        /// If set, the enum was initialized with an unknown value.
8682        ///
8683        /// Applications can examine the value using [ShardBy::value] or
8684        /// [ShardBy::name].
8685        UnknownValue(shard_by::UnknownValue),
8686    }
8687
8688    #[doc(hidden)]
8689    pub mod shard_by {
8690        #[allow(unused_imports)]
8691        use super::*;
8692        #[derive(Clone, Debug, PartialEq)]
8693        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8694    }
8695
8696    impl ShardBy {
8697        /// Gets the enum value.
8698        ///
8699        /// Returns `None` if the enum contains an unknown value deserialized from
8700        /// the string representation of enums.
8701        pub fn value(&self) -> std::option::Option<i32> {
8702            match self {
8703                Self::Unspecified => std::option::Option::Some(0),
8704                Self::Cookie => std::option::Option::Some(1),
8705                Self::Ip => std::option::Option::Some(2),
8706                Self::Random => std::option::Option::Some(3),
8707                Self::UnknownValue(u) => u.0.value(),
8708            }
8709        }
8710
8711        /// Gets the enum value as a string.
8712        ///
8713        /// Returns `None` if the enum contains an unknown value deserialized from
8714        /// the integer representation of enums.
8715        pub fn name(&self) -> std::option::Option<&str> {
8716            match self {
8717                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
8718                Self::Cookie => std::option::Option::Some("COOKIE"),
8719                Self::Ip => std::option::Option::Some("IP"),
8720                Self::Random => std::option::Option::Some("RANDOM"),
8721                Self::UnknownValue(u) => u.0.name(),
8722            }
8723        }
8724    }
8725
8726    impl std::default::Default for ShardBy {
8727        fn default() -> Self {
8728            use std::convert::From;
8729            Self::from(0)
8730        }
8731    }
8732
8733    impl std::fmt::Display for ShardBy {
8734        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8735            wkt::internal::display_enum(f, self.name(), self.value())
8736        }
8737    }
8738
8739    impl std::convert::From<i32> for ShardBy {
8740        fn from(value: i32) -> Self {
8741            match value {
8742                0 => Self::Unspecified,
8743                1 => Self::Cookie,
8744                2 => Self::Ip,
8745                3 => Self::Random,
8746                _ => Self::UnknownValue(shard_by::UnknownValue(
8747                    wkt::internal::UnknownEnumValue::Integer(value),
8748                )),
8749            }
8750        }
8751    }
8752
8753    impl std::convert::From<&str> for ShardBy {
8754        fn from(value: &str) -> Self {
8755            use std::string::ToString;
8756            match value {
8757                "UNSPECIFIED" => Self::Unspecified,
8758                "COOKIE" => Self::Cookie,
8759                "IP" => Self::Ip,
8760                "RANDOM" => Self::Random,
8761                _ => Self::UnknownValue(shard_by::UnknownValue(
8762                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8763                )),
8764            }
8765        }
8766    }
8767
8768    impl serde::ser::Serialize for ShardBy {
8769        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8770        where
8771            S: serde::Serializer,
8772        {
8773            match self {
8774                Self::Unspecified => serializer.serialize_i32(0),
8775                Self::Cookie => serializer.serialize_i32(1),
8776                Self::Ip => serializer.serialize_i32(2),
8777                Self::Random => serializer.serialize_i32(3),
8778                Self::UnknownValue(u) => u.0.serialize(serializer),
8779            }
8780        }
8781    }
8782
8783    impl<'de> serde::de::Deserialize<'de> for ShardBy {
8784        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8785        where
8786            D: serde::Deserializer<'de>,
8787        {
8788            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ShardBy>::new(
8789                ".google.appengine.v1.TrafficSplit.ShardBy",
8790            ))
8791        }
8792    }
8793}
8794
8795/// A Version resource is a specific set of source code and configuration files
8796/// that are deployed into a service.
8797#[derive(Clone, Default, PartialEq)]
8798#[non_exhaustive]
8799pub struct Version {
8800    /// Full path to the Version resource in the API.  Example:
8801    /// `apps/myapp/services/default/versions/v1`.
8802    ///
8803    /// @OutputOnly
8804    pub name: std::string::String,
8805
8806    /// Relative name of the version within the service.  Example: `v1`.
8807    /// Version names can contain only lowercase letters, numbers, or hyphens.
8808    /// Reserved names: "default", "latest", and any name with the prefix "ah-".
8809    pub id: std::string::String,
8810
8811    /// Before an application can receive email or XMPP messages, the application
8812    /// must be configured to enable the service.
8813    pub inbound_services: std::vec::Vec<crate::model::InboundServiceType>,
8814
8815    /// Instance class that is used to run this version. Valid values are:
8816    ///
8817    /// * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
8818    /// * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
8819    ///
8820    /// Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
8821    /// BasicScaling.
8822    pub instance_class: std::string::String,
8823
8824    /// Extra network settings.
8825    /// Only applicable in the App Engine flexible environment.
8826    pub network: std::option::Option<crate::model::Network>,
8827
8828    /// The Google Compute Engine zones that are supported by this version in the
8829    /// App Engine flexible environment. Deprecated.
8830    pub zones: std::vec::Vec<std::string::String>,
8831
8832    /// Machine resources for this version.
8833    /// Only applicable in the App Engine flexible environment.
8834    pub resources: std::option::Option<crate::model::Resources>,
8835
8836    /// Desired runtime. Example: `python27`.
8837    pub runtime: std::string::String,
8838
8839    /// The channel of the runtime to use. Only available for some
8840    /// runtimes. Defaults to the `default` channel.
8841    pub runtime_channel: std::string::String,
8842
8843    /// Whether multiple requests can be dispatched to this version at once.
8844    pub threadsafe: bool,
8845
8846    /// Whether to deploy this version in a container on a virtual machine.
8847    pub vm: bool,
8848
8849    /// Allows App Engine second generation runtimes to access the legacy bundled
8850    /// services.
8851    pub app_engine_apis: bool,
8852
8853    /// Metadata settings that are supplied to this version to enable
8854    /// beta runtime features.
8855    pub beta_settings: std::collections::HashMap<std::string::String, std::string::String>,
8856
8857    /// App Engine execution environment for this version.
8858    ///
8859    /// Defaults to `standard`.
8860    pub env: std::string::String,
8861
8862    /// Current serving status of this version. Only the versions with a
8863    /// `SERVING` status create instances and can be billed.
8864    ///
8865    /// `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
8866    pub serving_status: crate::model::ServingStatus,
8867
8868    /// Email address of the user who created this version.
8869    ///
8870    /// @OutputOnly
8871    pub created_by: std::string::String,
8872
8873    /// Time that this version was created.
8874    ///
8875    /// @OutputOnly
8876    pub create_time: std::option::Option<wkt::Timestamp>,
8877
8878    /// Total size in bytes of all the files that are included in this version
8879    /// and currently hosted on the App Engine disk.
8880    ///
8881    /// @OutputOnly
8882    pub disk_usage_bytes: i64,
8883
8884    /// The version of the API in the given runtime environment. Please see the
8885    /// app.yaml reference for valid values at
8886    /// <https://cloud.google.com/appengine/docs/standard/>\<language\>/config/appref
8887    pub runtime_api_version: std::string::String,
8888
8889    /// The path or name of the app's main executable.
8890    pub runtime_main_executable_path: std::string::String,
8891
8892    /// The identity that the deployed version will run as.
8893    /// Admin API will use the App Engine Appspot service account as default if
8894    /// this field is neither provided in app.yaml file nor through CLI flag.
8895    pub service_account: std::string::String,
8896
8897    /// An ordered list of URL-matching patterns that should be applied to incoming
8898    /// requests. The first matching URL handles the request and other request
8899    /// handlers are not attempted.
8900    ///
8901    /// Only returned in `GET` requests if `view=FULL` is set.
8902    pub handlers: std::vec::Vec<crate::model::UrlMap>,
8903
8904    /// Custom static error pages. Limited to 10KB per page.
8905    ///
8906    /// Only returned in `GET` requests if `view=FULL` is set.
8907    pub error_handlers: std::vec::Vec<crate::model::ErrorHandler>,
8908
8909    /// Configuration for third-party Python runtime libraries that are required
8910    /// by the application.
8911    ///
8912    /// Only returned in `GET` requests if `view=FULL` is set.
8913    pub libraries: std::vec::Vec<crate::model::Library>,
8914
8915    /// Serving configuration for
8916    /// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
8917    ///
8918    /// Only returned in `GET` requests if `view=FULL` is set.
8919    pub api_config: std::option::Option<crate::model::ApiConfigHandler>,
8920
8921    /// Environment variables available to the application.
8922    ///
8923    /// Only returned in `GET` requests if `view=FULL` is set.
8924    pub env_variables: std::collections::HashMap<std::string::String, std::string::String>,
8925
8926    /// Environment variables available to the build environment.
8927    ///
8928    /// Only returned in `GET` requests if `view=FULL` is set.
8929    pub build_env_variables: std::collections::HashMap<std::string::String, std::string::String>,
8930
8931    /// Duration that static files should be cached by web proxies and browsers.
8932    /// Only applicable if the corresponding
8933    /// [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
8934    /// does not specify its own expiration time.
8935    ///
8936    /// Only returned in `GET` requests if `view=FULL` is set.
8937    pub default_expiration: std::option::Option<wkt::Duration>,
8938
8939    /// Configures health checking for instances. Unhealthy instances are
8940    /// stopped and replaced with new instances.
8941    /// Only applicable in the App Engine flexible environment.
8942    ///
8943    /// Only returned in `GET` requests if `view=FULL` is set.
8944    pub health_check: std::option::Option<crate::model::HealthCheck>,
8945
8946    /// Configures readiness health checking for instances.
8947    /// Unhealthy instances are not put into the backend traffic rotation.
8948    ///
8949    /// Only returned in `GET` requests if `view=FULL` is set.
8950    pub readiness_check: std::option::Option<crate::model::ReadinessCheck>,
8951
8952    /// Configures liveness health checking for instances.
8953    /// Unhealthy instances are stopped and replaced with new instances
8954    ///
8955    /// Only returned in `GET` requests if `view=FULL` is set.
8956    pub liveness_check: std::option::Option<crate::model::LivenessCheck>,
8957
8958    /// Files that match this pattern will not be built into this version.
8959    /// Only applicable for Go runtimes.
8960    ///
8961    /// Only returned in `GET` requests if `view=FULL` is set.
8962    pub nobuild_files_regex: std::string::String,
8963
8964    /// Code and application artifacts that make up this version.
8965    ///
8966    /// Only returned in `GET` requests if `view=FULL` is set.
8967    pub deployment: std::option::Option<crate::model::Deployment>,
8968
8969    /// Serving URL for this version. Example:
8970    /// `https://myversion-dot-myservice-dot-myapp.appspot.com`
8971    ///
8972    /// @OutputOnly
8973    pub version_url: std::string::String,
8974
8975    /// Cloud Endpoints configuration.
8976    ///
8977    /// If endpoints_api_service is set, the Cloud Endpoints Extensible Service
8978    /// Proxy will be provided to serve the API implemented by the app.
8979    pub endpoints_api_service: std::option::Option<crate::model::EndpointsApiService>,
8980
8981    /// The entrypoint for the application.
8982    pub entrypoint: std::option::Option<crate::model::Entrypoint>,
8983
8984    /// Enables VPC connectivity for standard apps.
8985    pub vpc_access_connector: std::option::Option<crate::model::VpcAccessConnector>,
8986
8987    /// Controls how instances are created, scaled, and reaped.
8988    ///
8989    /// Defaults to `AutomaticScaling`.
8990    pub scaling: std::option::Option<crate::model::version::Scaling>,
8991
8992    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8993}
8994
8995impl Version {
8996    pub fn new() -> Self {
8997        std::default::Default::default()
8998    }
8999
9000    /// Sets the value of [name][crate::model::Version::name].
9001    ///
9002    /// # Example
9003    /// ```ignore,no_run
9004    /// # use google_cloud_appengine_v1::model::Version;
9005    /// let x = Version::new().set_name("example");
9006    /// ```
9007    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9008        self.name = v.into();
9009        self
9010    }
9011
9012    /// Sets the value of [id][crate::model::Version::id].
9013    ///
9014    /// # Example
9015    /// ```ignore,no_run
9016    /// # use google_cloud_appengine_v1::model::Version;
9017    /// let x = Version::new().set_id("example");
9018    /// ```
9019    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9020        self.id = v.into();
9021        self
9022    }
9023
9024    /// Sets the value of [inbound_services][crate::model::Version::inbound_services].
9025    ///
9026    /// # Example
9027    /// ```ignore,no_run
9028    /// # use google_cloud_appengine_v1::model::Version;
9029    /// use google_cloud_appengine_v1::model::InboundServiceType;
9030    /// let x = Version::new().set_inbound_services([
9031    ///     InboundServiceType::InboundServiceMail,
9032    ///     InboundServiceType::InboundServiceMailBounce,
9033    ///     InboundServiceType::InboundServiceXmppError,
9034    /// ]);
9035    /// ```
9036    pub fn set_inbound_services<T, V>(mut self, v: T) -> Self
9037    where
9038        T: std::iter::IntoIterator<Item = V>,
9039        V: std::convert::Into<crate::model::InboundServiceType>,
9040    {
9041        use std::iter::Iterator;
9042        self.inbound_services = v.into_iter().map(|i| i.into()).collect();
9043        self
9044    }
9045
9046    /// Sets the value of [instance_class][crate::model::Version::instance_class].
9047    ///
9048    /// # Example
9049    /// ```ignore,no_run
9050    /// # use google_cloud_appengine_v1::model::Version;
9051    /// let x = Version::new().set_instance_class("example");
9052    /// ```
9053    pub fn set_instance_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9054        self.instance_class = v.into();
9055        self
9056    }
9057
9058    /// Sets the value of [network][crate::model::Version::network].
9059    ///
9060    /// # Example
9061    /// ```ignore,no_run
9062    /// # use google_cloud_appengine_v1::model::Version;
9063    /// use google_cloud_appengine_v1::model::Network;
9064    /// let x = Version::new().set_network(Network::default()/* use setters */);
9065    /// ```
9066    pub fn set_network<T>(mut self, v: T) -> Self
9067    where
9068        T: std::convert::Into<crate::model::Network>,
9069    {
9070        self.network = std::option::Option::Some(v.into());
9071        self
9072    }
9073
9074    /// Sets or clears the value of [network][crate::model::Version::network].
9075    ///
9076    /// # Example
9077    /// ```ignore,no_run
9078    /// # use google_cloud_appengine_v1::model::Version;
9079    /// use google_cloud_appengine_v1::model::Network;
9080    /// let x = Version::new().set_or_clear_network(Some(Network::default()/* use setters */));
9081    /// let x = Version::new().set_or_clear_network(None::<Network>);
9082    /// ```
9083    pub fn set_or_clear_network<T>(mut self, v: std::option::Option<T>) -> Self
9084    where
9085        T: std::convert::Into<crate::model::Network>,
9086    {
9087        self.network = v.map(|x| x.into());
9088        self
9089    }
9090
9091    /// Sets the value of [zones][crate::model::Version::zones].
9092    ///
9093    /// # Example
9094    /// ```ignore,no_run
9095    /// # use google_cloud_appengine_v1::model::Version;
9096    /// let x = Version::new().set_zones(["a", "b", "c"]);
9097    /// ```
9098    pub fn set_zones<T, V>(mut self, v: T) -> Self
9099    where
9100        T: std::iter::IntoIterator<Item = V>,
9101        V: std::convert::Into<std::string::String>,
9102    {
9103        use std::iter::Iterator;
9104        self.zones = v.into_iter().map(|i| i.into()).collect();
9105        self
9106    }
9107
9108    /// Sets the value of [resources][crate::model::Version::resources].
9109    ///
9110    /// # Example
9111    /// ```ignore,no_run
9112    /// # use google_cloud_appengine_v1::model::Version;
9113    /// use google_cloud_appengine_v1::model::Resources;
9114    /// let x = Version::new().set_resources(Resources::default()/* use setters */);
9115    /// ```
9116    pub fn set_resources<T>(mut self, v: T) -> Self
9117    where
9118        T: std::convert::Into<crate::model::Resources>,
9119    {
9120        self.resources = std::option::Option::Some(v.into());
9121        self
9122    }
9123
9124    /// Sets or clears the value of [resources][crate::model::Version::resources].
9125    ///
9126    /// # Example
9127    /// ```ignore,no_run
9128    /// # use google_cloud_appengine_v1::model::Version;
9129    /// use google_cloud_appengine_v1::model::Resources;
9130    /// let x = Version::new().set_or_clear_resources(Some(Resources::default()/* use setters */));
9131    /// let x = Version::new().set_or_clear_resources(None::<Resources>);
9132    /// ```
9133    pub fn set_or_clear_resources<T>(mut self, v: std::option::Option<T>) -> Self
9134    where
9135        T: std::convert::Into<crate::model::Resources>,
9136    {
9137        self.resources = v.map(|x| x.into());
9138        self
9139    }
9140
9141    /// Sets the value of [runtime][crate::model::Version::runtime].
9142    ///
9143    /// # Example
9144    /// ```ignore,no_run
9145    /// # use google_cloud_appengine_v1::model::Version;
9146    /// let x = Version::new().set_runtime("example");
9147    /// ```
9148    pub fn set_runtime<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9149        self.runtime = v.into();
9150        self
9151    }
9152
9153    /// Sets the value of [runtime_channel][crate::model::Version::runtime_channel].
9154    ///
9155    /// # Example
9156    /// ```ignore,no_run
9157    /// # use google_cloud_appengine_v1::model::Version;
9158    /// let x = Version::new().set_runtime_channel("example");
9159    /// ```
9160    pub fn set_runtime_channel<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9161        self.runtime_channel = v.into();
9162        self
9163    }
9164
9165    /// Sets the value of [threadsafe][crate::model::Version::threadsafe].
9166    ///
9167    /// # Example
9168    /// ```ignore,no_run
9169    /// # use google_cloud_appengine_v1::model::Version;
9170    /// let x = Version::new().set_threadsafe(true);
9171    /// ```
9172    pub fn set_threadsafe<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9173        self.threadsafe = v.into();
9174        self
9175    }
9176
9177    /// Sets the value of [vm][crate::model::Version::vm].
9178    ///
9179    /// # Example
9180    /// ```ignore,no_run
9181    /// # use google_cloud_appengine_v1::model::Version;
9182    /// let x = Version::new().set_vm(true);
9183    /// ```
9184    pub fn set_vm<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9185        self.vm = v.into();
9186        self
9187    }
9188
9189    /// Sets the value of [app_engine_apis][crate::model::Version::app_engine_apis].
9190    ///
9191    /// # Example
9192    /// ```ignore,no_run
9193    /// # use google_cloud_appengine_v1::model::Version;
9194    /// let x = Version::new().set_app_engine_apis(true);
9195    /// ```
9196    pub fn set_app_engine_apis<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9197        self.app_engine_apis = v.into();
9198        self
9199    }
9200
9201    /// Sets the value of [beta_settings][crate::model::Version::beta_settings].
9202    ///
9203    /// # Example
9204    /// ```ignore,no_run
9205    /// # use google_cloud_appengine_v1::model::Version;
9206    /// let x = Version::new().set_beta_settings([
9207    ///     ("key0", "abc"),
9208    ///     ("key1", "xyz"),
9209    /// ]);
9210    /// ```
9211    pub fn set_beta_settings<T, K, V>(mut self, v: T) -> Self
9212    where
9213        T: std::iter::IntoIterator<Item = (K, V)>,
9214        K: std::convert::Into<std::string::String>,
9215        V: std::convert::Into<std::string::String>,
9216    {
9217        use std::iter::Iterator;
9218        self.beta_settings = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9219        self
9220    }
9221
9222    /// Sets the value of [env][crate::model::Version::env].
9223    ///
9224    /// # Example
9225    /// ```ignore,no_run
9226    /// # use google_cloud_appengine_v1::model::Version;
9227    /// let x = Version::new().set_env("example");
9228    /// ```
9229    pub fn set_env<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9230        self.env = v.into();
9231        self
9232    }
9233
9234    /// Sets the value of [serving_status][crate::model::Version::serving_status].
9235    ///
9236    /// # Example
9237    /// ```ignore,no_run
9238    /// # use google_cloud_appengine_v1::model::Version;
9239    /// use google_cloud_appengine_v1::model::ServingStatus;
9240    /// let x0 = Version::new().set_serving_status(ServingStatus::Serving);
9241    /// let x1 = Version::new().set_serving_status(ServingStatus::Stopped);
9242    /// ```
9243    pub fn set_serving_status<T: std::convert::Into<crate::model::ServingStatus>>(
9244        mut self,
9245        v: T,
9246    ) -> Self {
9247        self.serving_status = v.into();
9248        self
9249    }
9250
9251    /// Sets the value of [created_by][crate::model::Version::created_by].
9252    ///
9253    /// # Example
9254    /// ```ignore,no_run
9255    /// # use google_cloud_appengine_v1::model::Version;
9256    /// let x = Version::new().set_created_by("example");
9257    /// ```
9258    pub fn set_created_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9259        self.created_by = v.into();
9260        self
9261    }
9262
9263    /// Sets the value of [create_time][crate::model::Version::create_time].
9264    ///
9265    /// # Example
9266    /// ```ignore,no_run
9267    /// # use google_cloud_appengine_v1::model::Version;
9268    /// use wkt::Timestamp;
9269    /// let x = Version::new().set_create_time(Timestamp::default()/* use setters */);
9270    /// ```
9271    pub fn set_create_time<T>(mut self, v: T) -> Self
9272    where
9273        T: std::convert::Into<wkt::Timestamp>,
9274    {
9275        self.create_time = std::option::Option::Some(v.into());
9276        self
9277    }
9278
9279    /// Sets or clears the value of [create_time][crate::model::Version::create_time].
9280    ///
9281    /// # Example
9282    /// ```ignore,no_run
9283    /// # use google_cloud_appengine_v1::model::Version;
9284    /// use wkt::Timestamp;
9285    /// let x = Version::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9286    /// let x = Version::new().set_or_clear_create_time(None::<Timestamp>);
9287    /// ```
9288    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9289    where
9290        T: std::convert::Into<wkt::Timestamp>,
9291    {
9292        self.create_time = v.map(|x| x.into());
9293        self
9294    }
9295
9296    /// Sets the value of [disk_usage_bytes][crate::model::Version::disk_usage_bytes].
9297    ///
9298    /// # Example
9299    /// ```ignore,no_run
9300    /// # use google_cloud_appengine_v1::model::Version;
9301    /// let x = Version::new().set_disk_usage_bytes(42);
9302    /// ```
9303    pub fn set_disk_usage_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9304        self.disk_usage_bytes = v.into();
9305        self
9306    }
9307
9308    /// Sets the value of [runtime_api_version][crate::model::Version::runtime_api_version].
9309    ///
9310    /// # Example
9311    /// ```ignore,no_run
9312    /// # use google_cloud_appengine_v1::model::Version;
9313    /// let x = Version::new().set_runtime_api_version("example");
9314    /// ```
9315    pub fn set_runtime_api_version<T: std::convert::Into<std::string::String>>(
9316        mut self,
9317        v: T,
9318    ) -> Self {
9319        self.runtime_api_version = v.into();
9320        self
9321    }
9322
9323    /// Sets the value of [runtime_main_executable_path][crate::model::Version::runtime_main_executable_path].
9324    ///
9325    /// # Example
9326    /// ```ignore,no_run
9327    /// # use google_cloud_appengine_v1::model::Version;
9328    /// let x = Version::new().set_runtime_main_executable_path("example");
9329    /// ```
9330    pub fn set_runtime_main_executable_path<T: std::convert::Into<std::string::String>>(
9331        mut self,
9332        v: T,
9333    ) -> Self {
9334        self.runtime_main_executable_path = v.into();
9335        self
9336    }
9337
9338    /// Sets the value of [service_account][crate::model::Version::service_account].
9339    ///
9340    /// # Example
9341    /// ```ignore,no_run
9342    /// # use google_cloud_appengine_v1::model::Version;
9343    /// let x = Version::new().set_service_account("example");
9344    /// ```
9345    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9346        self.service_account = v.into();
9347        self
9348    }
9349
9350    /// Sets the value of [handlers][crate::model::Version::handlers].
9351    ///
9352    /// # Example
9353    /// ```ignore,no_run
9354    /// # use google_cloud_appengine_v1::model::Version;
9355    /// use google_cloud_appengine_v1::model::UrlMap;
9356    /// let x = Version::new()
9357    ///     .set_handlers([
9358    ///         UrlMap::default()/* use setters */,
9359    ///         UrlMap::default()/* use (different) setters */,
9360    ///     ]);
9361    /// ```
9362    pub fn set_handlers<T, V>(mut self, v: T) -> Self
9363    where
9364        T: std::iter::IntoIterator<Item = V>,
9365        V: std::convert::Into<crate::model::UrlMap>,
9366    {
9367        use std::iter::Iterator;
9368        self.handlers = v.into_iter().map(|i| i.into()).collect();
9369        self
9370    }
9371
9372    /// Sets the value of [error_handlers][crate::model::Version::error_handlers].
9373    ///
9374    /// # Example
9375    /// ```ignore,no_run
9376    /// # use google_cloud_appengine_v1::model::Version;
9377    /// use google_cloud_appengine_v1::model::ErrorHandler;
9378    /// let x = Version::new()
9379    ///     .set_error_handlers([
9380    ///         ErrorHandler::default()/* use setters */,
9381    ///         ErrorHandler::default()/* use (different) setters */,
9382    ///     ]);
9383    /// ```
9384    pub fn set_error_handlers<T, V>(mut self, v: T) -> Self
9385    where
9386        T: std::iter::IntoIterator<Item = V>,
9387        V: std::convert::Into<crate::model::ErrorHandler>,
9388    {
9389        use std::iter::Iterator;
9390        self.error_handlers = v.into_iter().map(|i| i.into()).collect();
9391        self
9392    }
9393
9394    /// Sets the value of [libraries][crate::model::Version::libraries].
9395    ///
9396    /// # Example
9397    /// ```ignore,no_run
9398    /// # use google_cloud_appengine_v1::model::Version;
9399    /// use google_cloud_appengine_v1::model::Library;
9400    /// let x = Version::new()
9401    ///     .set_libraries([
9402    ///         Library::default()/* use setters */,
9403    ///         Library::default()/* use (different) setters */,
9404    ///     ]);
9405    /// ```
9406    pub fn set_libraries<T, V>(mut self, v: T) -> Self
9407    where
9408        T: std::iter::IntoIterator<Item = V>,
9409        V: std::convert::Into<crate::model::Library>,
9410    {
9411        use std::iter::Iterator;
9412        self.libraries = v.into_iter().map(|i| i.into()).collect();
9413        self
9414    }
9415
9416    /// Sets the value of [api_config][crate::model::Version::api_config].
9417    ///
9418    /// # Example
9419    /// ```ignore,no_run
9420    /// # use google_cloud_appengine_v1::model::Version;
9421    /// use google_cloud_appengine_v1::model::ApiConfigHandler;
9422    /// let x = Version::new().set_api_config(ApiConfigHandler::default()/* use setters */);
9423    /// ```
9424    pub fn set_api_config<T>(mut self, v: T) -> Self
9425    where
9426        T: std::convert::Into<crate::model::ApiConfigHandler>,
9427    {
9428        self.api_config = std::option::Option::Some(v.into());
9429        self
9430    }
9431
9432    /// Sets or clears the value of [api_config][crate::model::Version::api_config].
9433    ///
9434    /// # Example
9435    /// ```ignore,no_run
9436    /// # use google_cloud_appengine_v1::model::Version;
9437    /// use google_cloud_appengine_v1::model::ApiConfigHandler;
9438    /// let x = Version::new().set_or_clear_api_config(Some(ApiConfigHandler::default()/* use setters */));
9439    /// let x = Version::new().set_or_clear_api_config(None::<ApiConfigHandler>);
9440    /// ```
9441    pub fn set_or_clear_api_config<T>(mut self, v: std::option::Option<T>) -> Self
9442    where
9443        T: std::convert::Into<crate::model::ApiConfigHandler>,
9444    {
9445        self.api_config = v.map(|x| x.into());
9446        self
9447    }
9448
9449    /// Sets the value of [env_variables][crate::model::Version::env_variables].
9450    ///
9451    /// # Example
9452    /// ```ignore,no_run
9453    /// # use google_cloud_appengine_v1::model::Version;
9454    /// let x = Version::new().set_env_variables([
9455    ///     ("key0", "abc"),
9456    ///     ("key1", "xyz"),
9457    /// ]);
9458    /// ```
9459    pub fn set_env_variables<T, K, V>(mut self, v: T) -> Self
9460    where
9461        T: std::iter::IntoIterator<Item = (K, V)>,
9462        K: std::convert::Into<std::string::String>,
9463        V: std::convert::Into<std::string::String>,
9464    {
9465        use std::iter::Iterator;
9466        self.env_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9467        self
9468    }
9469
9470    /// Sets the value of [build_env_variables][crate::model::Version::build_env_variables].
9471    ///
9472    /// # Example
9473    /// ```ignore,no_run
9474    /// # use google_cloud_appengine_v1::model::Version;
9475    /// let x = Version::new().set_build_env_variables([
9476    ///     ("key0", "abc"),
9477    ///     ("key1", "xyz"),
9478    /// ]);
9479    /// ```
9480    pub fn set_build_env_variables<T, K, V>(mut self, v: T) -> Self
9481    where
9482        T: std::iter::IntoIterator<Item = (K, V)>,
9483        K: std::convert::Into<std::string::String>,
9484        V: std::convert::Into<std::string::String>,
9485    {
9486        use std::iter::Iterator;
9487        self.build_env_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9488        self
9489    }
9490
9491    /// Sets the value of [default_expiration][crate::model::Version::default_expiration].
9492    ///
9493    /// # Example
9494    /// ```ignore,no_run
9495    /// # use google_cloud_appengine_v1::model::Version;
9496    /// use wkt::Duration;
9497    /// let x = Version::new().set_default_expiration(Duration::default()/* use setters */);
9498    /// ```
9499    pub fn set_default_expiration<T>(mut self, v: T) -> Self
9500    where
9501        T: std::convert::Into<wkt::Duration>,
9502    {
9503        self.default_expiration = std::option::Option::Some(v.into());
9504        self
9505    }
9506
9507    /// Sets or clears the value of [default_expiration][crate::model::Version::default_expiration].
9508    ///
9509    /// # Example
9510    /// ```ignore,no_run
9511    /// # use google_cloud_appengine_v1::model::Version;
9512    /// use wkt::Duration;
9513    /// let x = Version::new().set_or_clear_default_expiration(Some(Duration::default()/* use setters */));
9514    /// let x = Version::new().set_or_clear_default_expiration(None::<Duration>);
9515    /// ```
9516    pub fn set_or_clear_default_expiration<T>(mut self, v: std::option::Option<T>) -> Self
9517    where
9518        T: std::convert::Into<wkt::Duration>,
9519    {
9520        self.default_expiration = v.map(|x| x.into());
9521        self
9522    }
9523
9524    /// Sets the value of [health_check][crate::model::Version::health_check].
9525    ///
9526    /// # Example
9527    /// ```ignore,no_run
9528    /// # use google_cloud_appengine_v1::model::Version;
9529    /// use google_cloud_appengine_v1::model::HealthCheck;
9530    /// let x = Version::new().set_health_check(HealthCheck::default()/* use setters */);
9531    /// ```
9532    pub fn set_health_check<T>(mut self, v: T) -> Self
9533    where
9534        T: std::convert::Into<crate::model::HealthCheck>,
9535    {
9536        self.health_check = std::option::Option::Some(v.into());
9537        self
9538    }
9539
9540    /// Sets or clears the value of [health_check][crate::model::Version::health_check].
9541    ///
9542    /// # Example
9543    /// ```ignore,no_run
9544    /// # use google_cloud_appengine_v1::model::Version;
9545    /// use google_cloud_appengine_v1::model::HealthCheck;
9546    /// let x = Version::new().set_or_clear_health_check(Some(HealthCheck::default()/* use setters */));
9547    /// let x = Version::new().set_or_clear_health_check(None::<HealthCheck>);
9548    /// ```
9549    pub fn set_or_clear_health_check<T>(mut self, v: std::option::Option<T>) -> Self
9550    where
9551        T: std::convert::Into<crate::model::HealthCheck>,
9552    {
9553        self.health_check = v.map(|x| x.into());
9554        self
9555    }
9556
9557    /// Sets the value of [readiness_check][crate::model::Version::readiness_check].
9558    ///
9559    /// # Example
9560    /// ```ignore,no_run
9561    /// # use google_cloud_appengine_v1::model::Version;
9562    /// use google_cloud_appengine_v1::model::ReadinessCheck;
9563    /// let x = Version::new().set_readiness_check(ReadinessCheck::default()/* use setters */);
9564    /// ```
9565    pub fn set_readiness_check<T>(mut self, v: T) -> Self
9566    where
9567        T: std::convert::Into<crate::model::ReadinessCheck>,
9568    {
9569        self.readiness_check = std::option::Option::Some(v.into());
9570        self
9571    }
9572
9573    /// Sets or clears the value of [readiness_check][crate::model::Version::readiness_check].
9574    ///
9575    /// # Example
9576    /// ```ignore,no_run
9577    /// # use google_cloud_appengine_v1::model::Version;
9578    /// use google_cloud_appengine_v1::model::ReadinessCheck;
9579    /// let x = Version::new().set_or_clear_readiness_check(Some(ReadinessCheck::default()/* use setters */));
9580    /// let x = Version::new().set_or_clear_readiness_check(None::<ReadinessCheck>);
9581    /// ```
9582    pub fn set_or_clear_readiness_check<T>(mut self, v: std::option::Option<T>) -> Self
9583    where
9584        T: std::convert::Into<crate::model::ReadinessCheck>,
9585    {
9586        self.readiness_check = v.map(|x| x.into());
9587        self
9588    }
9589
9590    /// Sets the value of [liveness_check][crate::model::Version::liveness_check].
9591    ///
9592    /// # Example
9593    /// ```ignore,no_run
9594    /// # use google_cloud_appengine_v1::model::Version;
9595    /// use google_cloud_appengine_v1::model::LivenessCheck;
9596    /// let x = Version::new().set_liveness_check(LivenessCheck::default()/* use setters */);
9597    /// ```
9598    pub fn set_liveness_check<T>(mut self, v: T) -> Self
9599    where
9600        T: std::convert::Into<crate::model::LivenessCheck>,
9601    {
9602        self.liveness_check = std::option::Option::Some(v.into());
9603        self
9604    }
9605
9606    /// Sets or clears the value of [liveness_check][crate::model::Version::liveness_check].
9607    ///
9608    /// # Example
9609    /// ```ignore,no_run
9610    /// # use google_cloud_appengine_v1::model::Version;
9611    /// use google_cloud_appengine_v1::model::LivenessCheck;
9612    /// let x = Version::new().set_or_clear_liveness_check(Some(LivenessCheck::default()/* use setters */));
9613    /// let x = Version::new().set_or_clear_liveness_check(None::<LivenessCheck>);
9614    /// ```
9615    pub fn set_or_clear_liveness_check<T>(mut self, v: std::option::Option<T>) -> Self
9616    where
9617        T: std::convert::Into<crate::model::LivenessCheck>,
9618    {
9619        self.liveness_check = v.map(|x| x.into());
9620        self
9621    }
9622
9623    /// Sets the value of [nobuild_files_regex][crate::model::Version::nobuild_files_regex].
9624    ///
9625    /// # Example
9626    /// ```ignore,no_run
9627    /// # use google_cloud_appengine_v1::model::Version;
9628    /// let x = Version::new().set_nobuild_files_regex("example");
9629    /// ```
9630    pub fn set_nobuild_files_regex<T: std::convert::Into<std::string::String>>(
9631        mut self,
9632        v: T,
9633    ) -> Self {
9634        self.nobuild_files_regex = v.into();
9635        self
9636    }
9637
9638    /// Sets the value of [deployment][crate::model::Version::deployment].
9639    ///
9640    /// # Example
9641    /// ```ignore,no_run
9642    /// # use google_cloud_appengine_v1::model::Version;
9643    /// use google_cloud_appengine_v1::model::Deployment;
9644    /// let x = Version::new().set_deployment(Deployment::default()/* use setters */);
9645    /// ```
9646    pub fn set_deployment<T>(mut self, v: T) -> Self
9647    where
9648        T: std::convert::Into<crate::model::Deployment>,
9649    {
9650        self.deployment = std::option::Option::Some(v.into());
9651        self
9652    }
9653
9654    /// Sets or clears the value of [deployment][crate::model::Version::deployment].
9655    ///
9656    /// # Example
9657    /// ```ignore,no_run
9658    /// # use google_cloud_appengine_v1::model::Version;
9659    /// use google_cloud_appengine_v1::model::Deployment;
9660    /// let x = Version::new().set_or_clear_deployment(Some(Deployment::default()/* use setters */));
9661    /// let x = Version::new().set_or_clear_deployment(None::<Deployment>);
9662    /// ```
9663    pub fn set_or_clear_deployment<T>(mut self, v: std::option::Option<T>) -> Self
9664    where
9665        T: std::convert::Into<crate::model::Deployment>,
9666    {
9667        self.deployment = v.map(|x| x.into());
9668        self
9669    }
9670
9671    /// Sets the value of [version_url][crate::model::Version::version_url].
9672    ///
9673    /// # Example
9674    /// ```ignore,no_run
9675    /// # use google_cloud_appengine_v1::model::Version;
9676    /// let x = Version::new().set_version_url("example");
9677    /// ```
9678    pub fn set_version_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9679        self.version_url = v.into();
9680        self
9681    }
9682
9683    /// Sets the value of [endpoints_api_service][crate::model::Version::endpoints_api_service].
9684    ///
9685    /// # Example
9686    /// ```ignore,no_run
9687    /// # use google_cloud_appengine_v1::model::Version;
9688    /// use google_cloud_appengine_v1::model::EndpointsApiService;
9689    /// let x = Version::new().set_endpoints_api_service(EndpointsApiService::default()/* use setters */);
9690    /// ```
9691    pub fn set_endpoints_api_service<T>(mut self, v: T) -> Self
9692    where
9693        T: std::convert::Into<crate::model::EndpointsApiService>,
9694    {
9695        self.endpoints_api_service = std::option::Option::Some(v.into());
9696        self
9697    }
9698
9699    /// Sets or clears the value of [endpoints_api_service][crate::model::Version::endpoints_api_service].
9700    ///
9701    /// # Example
9702    /// ```ignore,no_run
9703    /// # use google_cloud_appengine_v1::model::Version;
9704    /// use google_cloud_appengine_v1::model::EndpointsApiService;
9705    /// let x = Version::new().set_or_clear_endpoints_api_service(Some(EndpointsApiService::default()/* use setters */));
9706    /// let x = Version::new().set_or_clear_endpoints_api_service(None::<EndpointsApiService>);
9707    /// ```
9708    pub fn set_or_clear_endpoints_api_service<T>(mut self, v: std::option::Option<T>) -> Self
9709    where
9710        T: std::convert::Into<crate::model::EndpointsApiService>,
9711    {
9712        self.endpoints_api_service = v.map(|x| x.into());
9713        self
9714    }
9715
9716    /// Sets the value of [entrypoint][crate::model::Version::entrypoint].
9717    ///
9718    /// # Example
9719    /// ```ignore,no_run
9720    /// # use google_cloud_appengine_v1::model::Version;
9721    /// use google_cloud_appengine_v1::model::Entrypoint;
9722    /// let x = Version::new().set_entrypoint(Entrypoint::default()/* use setters */);
9723    /// ```
9724    pub fn set_entrypoint<T>(mut self, v: T) -> Self
9725    where
9726        T: std::convert::Into<crate::model::Entrypoint>,
9727    {
9728        self.entrypoint = std::option::Option::Some(v.into());
9729        self
9730    }
9731
9732    /// Sets or clears the value of [entrypoint][crate::model::Version::entrypoint].
9733    ///
9734    /// # Example
9735    /// ```ignore,no_run
9736    /// # use google_cloud_appengine_v1::model::Version;
9737    /// use google_cloud_appengine_v1::model::Entrypoint;
9738    /// let x = Version::new().set_or_clear_entrypoint(Some(Entrypoint::default()/* use setters */));
9739    /// let x = Version::new().set_or_clear_entrypoint(None::<Entrypoint>);
9740    /// ```
9741    pub fn set_or_clear_entrypoint<T>(mut self, v: std::option::Option<T>) -> Self
9742    where
9743        T: std::convert::Into<crate::model::Entrypoint>,
9744    {
9745        self.entrypoint = v.map(|x| x.into());
9746        self
9747    }
9748
9749    /// Sets the value of [vpc_access_connector][crate::model::Version::vpc_access_connector].
9750    ///
9751    /// # Example
9752    /// ```ignore,no_run
9753    /// # use google_cloud_appengine_v1::model::Version;
9754    /// use google_cloud_appengine_v1::model::VpcAccessConnector;
9755    /// let x = Version::new().set_vpc_access_connector(VpcAccessConnector::default()/* use setters */);
9756    /// ```
9757    pub fn set_vpc_access_connector<T>(mut self, v: T) -> Self
9758    where
9759        T: std::convert::Into<crate::model::VpcAccessConnector>,
9760    {
9761        self.vpc_access_connector = std::option::Option::Some(v.into());
9762        self
9763    }
9764
9765    /// Sets or clears the value of [vpc_access_connector][crate::model::Version::vpc_access_connector].
9766    ///
9767    /// # Example
9768    /// ```ignore,no_run
9769    /// # use google_cloud_appengine_v1::model::Version;
9770    /// use google_cloud_appengine_v1::model::VpcAccessConnector;
9771    /// let x = Version::new().set_or_clear_vpc_access_connector(Some(VpcAccessConnector::default()/* use setters */));
9772    /// let x = Version::new().set_or_clear_vpc_access_connector(None::<VpcAccessConnector>);
9773    /// ```
9774    pub fn set_or_clear_vpc_access_connector<T>(mut self, v: std::option::Option<T>) -> Self
9775    where
9776        T: std::convert::Into<crate::model::VpcAccessConnector>,
9777    {
9778        self.vpc_access_connector = v.map(|x| x.into());
9779        self
9780    }
9781
9782    /// Sets the value of [scaling][crate::model::Version::scaling].
9783    ///
9784    /// Note that all the setters affecting `scaling` are mutually
9785    /// exclusive.
9786    ///
9787    /// # Example
9788    /// ```ignore,no_run
9789    /// # use google_cloud_appengine_v1::model::Version;
9790    /// use google_cloud_appengine_v1::model::AutomaticScaling;
9791    /// let x = Version::new().set_scaling(Some(
9792    ///     google_cloud_appengine_v1::model::version::Scaling::AutomaticScaling(AutomaticScaling::default().into())));
9793    /// ```
9794    pub fn set_scaling<
9795        T: std::convert::Into<std::option::Option<crate::model::version::Scaling>>,
9796    >(
9797        mut self,
9798        v: T,
9799    ) -> Self {
9800        self.scaling = v.into();
9801        self
9802    }
9803
9804    /// The value of [scaling][crate::model::Version::scaling]
9805    /// if it holds a `AutomaticScaling`, `None` if the field is not set or
9806    /// holds a different branch.
9807    pub fn automatic_scaling(
9808        &self,
9809    ) -> std::option::Option<&std::boxed::Box<crate::model::AutomaticScaling>> {
9810        #[allow(unreachable_patterns)]
9811        self.scaling.as_ref().and_then(|v| match v {
9812            crate::model::version::Scaling::AutomaticScaling(v) => std::option::Option::Some(v),
9813            _ => std::option::Option::None,
9814        })
9815    }
9816
9817    /// Sets the value of [scaling][crate::model::Version::scaling]
9818    /// to hold a `AutomaticScaling`.
9819    ///
9820    /// Note that all the setters affecting `scaling` are
9821    /// mutually exclusive.
9822    ///
9823    /// # Example
9824    /// ```ignore,no_run
9825    /// # use google_cloud_appengine_v1::model::Version;
9826    /// use google_cloud_appengine_v1::model::AutomaticScaling;
9827    /// let x = Version::new().set_automatic_scaling(AutomaticScaling::default()/* use setters */);
9828    /// assert!(x.automatic_scaling().is_some());
9829    /// assert!(x.basic_scaling().is_none());
9830    /// assert!(x.manual_scaling().is_none());
9831    /// ```
9832    pub fn set_automatic_scaling<
9833        T: std::convert::Into<std::boxed::Box<crate::model::AutomaticScaling>>,
9834    >(
9835        mut self,
9836        v: T,
9837    ) -> Self {
9838        self.scaling =
9839            std::option::Option::Some(crate::model::version::Scaling::AutomaticScaling(v.into()));
9840        self
9841    }
9842
9843    /// The value of [scaling][crate::model::Version::scaling]
9844    /// if it holds a `BasicScaling`, `None` if the field is not set or
9845    /// holds a different branch.
9846    pub fn basic_scaling(
9847        &self,
9848    ) -> std::option::Option<&std::boxed::Box<crate::model::BasicScaling>> {
9849        #[allow(unreachable_patterns)]
9850        self.scaling.as_ref().and_then(|v| match v {
9851            crate::model::version::Scaling::BasicScaling(v) => std::option::Option::Some(v),
9852            _ => std::option::Option::None,
9853        })
9854    }
9855
9856    /// Sets the value of [scaling][crate::model::Version::scaling]
9857    /// to hold a `BasicScaling`.
9858    ///
9859    /// Note that all the setters affecting `scaling` are
9860    /// mutually exclusive.
9861    ///
9862    /// # Example
9863    /// ```ignore,no_run
9864    /// # use google_cloud_appengine_v1::model::Version;
9865    /// use google_cloud_appengine_v1::model::BasicScaling;
9866    /// let x = Version::new().set_basic_scaling(BasicScaling::default()/* use setters */);
9867    /// assert!(x.basic_scaling().is_some());
9868    /// assert!(x.automatic_scaling().is_none());
9869    /// assert!(x.manual_scaling().is_none());
9870    /// ```
9871    pub fn set_basic_scaling<T: std::convert::Into<std::boxed::Box<crate::model::BasicScaling>>>(
9872        mut self,
9873        v: T,
9874    ) -> Self {
9875        self.scaling =
9876            std::option::Option::Some(crate::model::version::Scaling::BasicScaling(v.into()));
9877        self
9878    }
9879
9880    /// The value of [scaling][crate::model::Version::scaling]
9881    /// if it holds a `ManualScaling`, `None` if the field is not set or
9882    /// holds a different branch.
9883    pub fn manual_scaling(
9884        &self,
9885    ) -> std::option::Option<&std::boxed::Box<crate::model::ManualScaling>> {
9886        #[allow(unreachable_patterns)]
9887        self.scaling.as_ref().and_then(|v| match v {
9888            crate::model::version::Scaling::ManualScaling(v) => std::option::Option::Some(v),
9889            _ => std::option::Option::None,
9890        })
9891    }
9892
9893    /// Sets the value of [scaling][crate::model::Version::scaling]
9894    /// to hold a `ManualScaling`.
9895    ///
9896    /// Note that all the setters affecting `scaling` are
9897    /// mutually exclusive.
9898    ///
9899    /// # Example
9900    /// ```ignore,no_run
9901    /// # use google_cloud_appengine_v1::model::Version;
9902    /// use google_cloud_appengine_v1::model::ManualScaling;
9903    /// let x = Version::new().set_manual_scaling(ManualScaling::default()/* use setters */);
9904    /// assert!(x.manual_scaling().is_some());
9905    /// assert!(x.automatic_scaling().is_none());
9906    /// assert!(x.basic_scaling().is_none());
9907    /// ```
9908    pub fn set_manual_scaling<
9909        T: std::convert::Into<std::boxed::Box<crate::model::ManualScaling>>,
9910    >(
9911        mut self,
9912        v: T,
9913    ) -> Self {
9914        self.scaling =
9915            std::option::Option::Some(crate::model::version::Scaling::ManualScaling(v.into()));
9916        self
9917    }
9918}
9919
9920impl wkt::message::Message for Version {
9921    fn typename() -> &'static str {
9922        "type.googleapis.com/google.appengine.v1.Version"
9923    }
9924}
9925
9926/// Defines additional types related to [Version].
9927pub mod version {
9928    #[allow(unused_imports)]
9929    use super::*;
9930
9931    /// Controls how instances are created, scaled, and reaped.
9932    ///
9933    /// Defaults to `AutomaticScaling`.
9934    #[derive(Clone, Debug, PartialEq)]
9935    #[non_exhaustive]
9936    pub enum Scaling {
9937        /// Automatic scaling is based on request rate, response latencies, and other
9938        /// application metrics. Instances are dynamically created and destroyed as
9939        /// needed in order to handle traffic.
9940        AutomaticScaling(std::boxed::Box<crate::model::AutomaticScaling>),
9941        /// A service with basic scaling will create an instance when the application
9942        /// receives a request. The instance will be turned down when the app becomes
9943        /// idle. Basic scaling is ideal for work that is intermittent or driven by
9944        /// user activity.
9945        BasicScaling(std::boxed::Box<crate::model::BasicScaling>),
9946        /// A service with manual scaling runs continuously, allowing you to perform
9947        /// complex initialization and rely on the state of its memory over time.
9948        /// Manually scaled versions are sometimes referred to as "backends".
9949        ManualScaling(std::boxed::Box<crate::model::ManualScaling>),
9950    }
9951}
9952
9953/// [Cloud Endpoints](https://cloud.google.com/endpoints) configuration.
9954/// The Endpoints API Service provides tooling for serving Open API and gRPC
9955/// endpoints via an NGINX proxy. Only valid for App Engine Flexible environment
9956/// deployments.
9957///
9958/// The fields here refer to the name and configuration ID of a "service"
9959/// resource in the [Service Management API](https://cloud.google.com/service-management/overview).
9960#[derive(Clone, Default, PartialEq)]
9961#[non_exhaustive]
9962pub struct EndpointsApiService {
9963    /// Endpoints service name which is the name of the "service" resource in the
9964    /// Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
9965    pub name: std::string::String,
9966
9967    /// Endpoints service configuration ID as specified by the Service Management
9968    /// API. For example "2016-09-19r1".
9969    ///
9970    /// By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
9971    /// This means that Endpoints starts up with a particular configuration ID.
9972    /// When a new configuration is rolled out, Endpoints must be given the new
9973    /// configuration ID. The `config_id` field is used to give the configuration
9974    /// ID and is required in this case.
9975    ///
9976    /// Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
9977    /// When using this, Endpoints fetches the latest configuration and does not
9978    /// need the configuration ID. In this case, `config_id` must be omitted.
9979    pub config_id: std::string::String,
9980
9981    /// Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
9982    /// `MANAGED`, `config_id` must be omitted.
9983    pub rollout_strategy: crate::model::endpoints_api_service::RolloutStrategy,
9984
9985    /// Enable or disable trace sampling. By default, this is set to false for
9986    /// enabled.
9987    pub disable_trace_sampling: bool,
9988
9989    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9990}
9991
9992impl EndpointsApiService {
9993    pub fn new() -> Self {
9994        std::default::Default::default()
9995    }
9996
9997    /// Sets the value of [name][crate::model::EndpointsApiService::name].
9998    ///
9999    /// # Example
10000    /// ```ignore,no_run
10001    /// # use google_cloud_appengine_v1::model::EndpointsApiService;
10002    /// let x = EndpointsApiService::new().set_name("example");
10003    /// ```
10004    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10005        self.name = v.into();
10006        self
10007    }
10008
10009    /// Sets the value of [config_id][crate::model::EndpointsApiService::config_id].
10010    ///
10011    /// # Example
10012    /// ```ignore,no_run
10013    /// # use google_cloud_appengine_v1::model::EndpointsApiService;
10014    /// let x = EndpointsApiService::new().set_config_id("example");
10015    /// ```
10016    pub fn set_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10017        self.config_id = v.into();
10018        self
10019    }
10020
10021    /// Sets the value of [rollout_strategy][crate::model::EndpointsApiService::rollout_strategy].
10022    ///
10023    /// # Example
10024    /// ```ignore,no_run
10025    /// # use google_cloud_appengine_v1::model::EndpointsApiService;
10026    /// use google_cloud_appengine_v1::model::endpoints_api_service::RolloutStrategy;
10027    /// let x0 = EndpointsApiService::new().set_rollout_strategy(RolloutStrategy::Fixed);
10028    /// let x1 = EndpointsApiService::new().set_rollout_strategy(RolloutStrategy::Managed);
10029    /// ```
10030    pub fn set_rollout_strategy<
10031        T: std::convert::Into<crate::model::endpoints_api_service::RolloutStrategy>,
10032    >(
10033        mut self,
10034        v: T,
10035    ) -> Self {
10036        self.rollout_strategy = v.into();
10037        self
10038    }
10039
10040    /// Sets the value of [disable_trace_sampling][crate::model::EndpointsApiService::disable_trace_sampling].
10041    ///
10042    /// # Example
10043    /// ```ignore,no_run
10044    /// # use google_cloud_appengine_v1::model::EndpointsApiService;
10045    /// let x = EndpointsApiService::new().set_disable_trace_sampling(true);
10046    /// ```
10047    pub fn set_disable_trace_sampling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10048        self.disable_trace_sampling = v.into();
10049        self
10050    }
10051}
10052
10053impl wkt::message::Message for EndpointsApiService {
10054    fn typename() -> &'static str {
10055        "type.googleapis.com/google.appengine.v1.EndpointsApiService"
10056    }
10057}
10058
10059/// Defines additional types related to [EndpointsApiService].
10060pub mod endpoints_api_service {
10061    #[allow(unused_imports)]
10062    use super::*;
10063
10064    /// Available rollout strategies.
10065    ///
10066    /// # Working with unknown values
10067    ///
10068    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10069    /// additional enum variants at any time. Adding new variants is not considered
10070    /// a breaking change. Applications should write their code in anticipation of:
10071    ///
10072    /// - New values appearing in future releases of the client library, **and**
10073    /// - New values received dynamically, without application changes.
10074    ///
10075    /// Please consult the [Working with enums] section in the user guide for some
10076    /// guidelines.
10077    ///
10078    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10079    #[derive(Clone, Debug, PartialEq)]
10080    #[non_exhaustive]
10081    pub enum RolloutStrategy {
10082        /// Not specified. Defaults to `FIXED`.
10083        UnspecifiedRolloutStrategy,
10084        /// Endpoints service configuration ID will be fixed to the configuration ID
10085        /// specified by `config_id`.
10086        Fixed,
10087        /// Endpoints service configuration ID will be updated with each rollout.
10088        Managed,
10089        /// If set, the enum was initialized with an unknown value.
10090        ///
10091        /// Applications can examine the value using [RolloutStrategy::value] or
10092        /// [RolloutStrategy::name].
10093        UnknownValue(rollout_strategy::UnknownValue),
10094    }
10095
10096    #[doc(hidden)]
10097    pub mod rollout_strategy {
10098        #[allow(unused_imports)]
10099        use super::*;
10100        #[derive(Clone, Debug, PartialEq)]
10101        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10102    }
10103
10104    impl RolloutStrategy {
10105        /// Gets the enum value.
10106        ///
10107        /// Returns `None` if the enum contains an unknown value deserialized from
10108        /// the string representation of enums.
10109        pub fn value(&self) -> std::option::Option<i32> {
10110            match self {
10111                Self::UnspecifiedRolloutStrategy => std::option::Option::Some(0),
10112                Self::Fixed => std::option::Option::Some(1),
10113                Self::Managed => std::option::Option::Some(2),
10114                Self::UnknownValue(u) => u.0.value(),
10115            }
10116        }
10117
10118        /// Gets the enum value as a string.
10119        ///
10120        /// Returns `None` if the enum contains an unknown value deserialized from
10121        /// the integer representation of enums.
10122        pub fn name(&self) -> std::option::Option<&str> {
10123            match self {
10124                Self::UnspecifiedRolloutStrategy => {
10125                    std::option::Option::Some("UNSPECIFIED_ROLLOUT_STRATEGY")
10126                }
10127                Self::Fixed => std::option::Option::Some("FIXED"),
10128                Self::Managed => std::option::Option::Some("MANAGED"),
10129                Self::UnknownValue(u) => u.0.name(),
10130            }
10131        }
10132    }
10133
10134    impl std::default::Default for RolloutStrategy {
10135        fn default() -> Self {
10136            use std::convert::From;
10137            Self::from(0)
10138        }
10139    }
10140
10141    impl std::fmt::Display for RolloutStrategy {
10142        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10143            wkt::internal::display_enum(f, self.name(), self.value())
10144        }
10145    }
10146
10147    impl std::convert::From<i32> for RolloutStrategy {
10148        fn from(value: i32) -> Self {
10149            match value {
10150                0 => Self::UnspecifiedRolloutStrategy,
10151                1 => Self::Fixed,
10152                2 => Self::Managed,
10153                _ => Self::UnknownValue(rollout_strategy::UnknownValue(
10154                    wkt::internal::UnknownEnumValue::Integer(value),
10155                )),
10156            }
10157        }
10158    }
10159
10160    impl std::convert::From<&str> for RolloutStrategy {
10161        fn from(value: &str) -> Self {
10162            use std::string::ToString;
10163            match value {
10164                "UNSPECIFIED_ROLLOUT_STRATEGY" => Self::UnspecifiedRolloutStrategy,
10165                "FIXED" => Self::Fixed,
10166                "MANAGED" => Self::Managed,
10167                _ => Self::UnknownValue(rollout_strategy::UnknownValue(
10168                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10169                )),
10170            }
10171        }
10172    }
10173
10174    impl serde::ser::Serialize for RolloutStrategy {
10175        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10176        where
10177            S: serde::Serializer,
10178        {
10179            match self {
10180                Self::UnspecifiedRolloutStrategy => serializer.serialize_i32(0),
10181                Self::Fixed => serializer.serialize_i32(1),
10182                Self::Managed => serializer.serialize_i32(2),
10183                Self::UnknownValue(u) => u.0.serialize(serializer),
10184            }
10185        }
10186    }
10187
10188    impl<'de> serde::de::Deserialize<'de> for RolloutStrategy {
10189        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10190        where
10191            D: serde::Deserializer<'de>,
10192        {
10193            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RolloutStrategy>::new(
10194                ".google.appengine.v1.EndpointsApiService.RolloutStrategy",
10195            ))
10196        }
10197    }
10198}
10199
10200/// Automatic scaling is based on request rate, response latencies, and other
10201/// application metrics.
10202#[derive(Clone, Default, PartialEq)]
10203#[non_exhaustive]
10204pub struct AutomaticScaling {
10205    /// The time period that the
10206    /// [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
10207    /// should wait before it starts collecting information from a new instance.
10208    /// This prevents the autoscaler from collecting information when the instance
10209    /// is initializing, during which the collected usage would not be reliable.
10210    /// Only applicable in the App Engine flexible environment.
10211    pub cool_down_period: std::option::Option<wkt::Duration>,
10212
10213    /// Target scaling by CPU usage.
10214    pub cpu_utilization: std::option::Option<crate::model::CpuUtilization>,
10215
10216    /// Number of concurrent requests an automatic scaling instance can accept
10217    /// before the scheduler spawns a new instance.
10218    ///
10219    /// Defaults to a runtime-specific value.
10220    pub max_concurrent_requests: i32,
10221
10222    /// Maximum number of idle instances that should be maintained for this
10223    /// version.
10224    pub max_idle_instances: i32,
10225
10226    /// Maximum number of instances that should be started to handle requests for
10227    /// this version.
10228    pub max_total_instances: i32,
10229
10230    /// Maximum amount of time that a request should wait in the pending queue
10231    /// before starting a new instance to handle it.
10232    pub max_pending_latency: std::option::Option<wkt::Duration>,
10233
10234    /// Minimum number of idle instances that should be maintained for
10235    /// this version. Only applicable for the default version of a service.
10236    pub min_idle_instances: i32,
10237
10238    /// Minimum number of running instances that should be maintained for this
10239    /// version.
10240    pub min_total_instances: i32,
10241
10242    /// Minimum amount of time a request should wait in the pending queue before
10243    /// starting a new instance to handle it.
10244    pub min_pending_latency: std::option::Option<wkt::Duration>,
10245
10246    /// Target scaling by request utilization.
10247    pub request_utilization: std::option::Option<crate::model::RequestUtilization>,
10248
10249    /// Target scaling by disk usage.
10250    pub disk_utilization: std::option::Option<crate::model::DiskUtilization>,
10251
10252    /// Target scaling by network usage.
10253    pub network_utilization: std::option::Option<crate::model::NetworkUtilization>,
10254
10255    /// Scheduler settings for standard environment.
10256    pub standard_scheduler_settings: std::option::Option<crate::model::StandardSchedulerSettings>,
10257
10258    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10259}
10260
10261impl AutomaticScaling {
10262    pub fn new() -> Self {
10263        std::default::Default::default()
10264    }
10265
10266    /// Sets the value of [cool_down_period][crate::model::AutomaticScaling::cool_down_period].
10267    ///
10268    /// # Example
10269    /// ```ignore,no_run
10270    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10271    /// use wkt::Duration;
10272    /// let x = AutomaticScaling::new().set_cool_down_period(Duration::default()/* use setters */);
10273    /// ```
10274    pub fn set_cool_down_period<T>(mut self, v: T) -> Self
10275    where
10276        T: std::convert::Into<wkt::Duration>,
10277    {
10278        self.cool_down_period = std::option::Option::Some(v.into());
10279        self
10280    }
10281
10282    /// Sets or clears the value of [cool_down_period][crate::model::AutomaticScaling::cool_down_period].
10283    ///
10284    /// # Example
10285    /// ```ignore,no_run
10286    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10287    /// use wkt::Duration;
10288    /// let x = AutomaticScaling::new().set_or_clear_cool_down_period(Some(Duration::default()/* use setters */));
10289    /// let x = AutomaticScaling::new().set_or_clear_cool_down_period(None::<Duration>);
10290    /// ```
10291    pub fn set_or_clear_cool_down_period<T>(mut self, v: std::option::Option<T>) -> Self
10292    where
10293        T: std::convert::Into<wkt::Duration>,
10294    {
10295        self.cool_down_period = v.map(|x| x.into());
10296        self
10297    }
10298
10299    /// Sets the value of [cpu_utilization][crate::model::AutomaticScaling::cpu_utilization].
10300    ///
10301    /// # Example
10302    /// ```ignore,no_run
10303    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10304    /// use google_cloud_appengine_v1::model::CpuUtilization;
10305    /// let x = AutomaticScaling::new().set_cpu_utilization(CpuUtilization::default()/* use setters */);
10306    /// ```
10307    pub fn set_cpu_utilization<T>(mut self, v: T) -> Self
10308    where
10309        T: std::convert::Into<crate::model::CpuUtilization>,
10310    {
10311        self.cpu_utilization = std::option::Option::Some(v.into());
10312        self
10313    }
10314
10315    /// Sets or clears the value of [cpu_utilization][crate::model::AutomaticScaling::cpu_utilization].
10316    ///
10317    /// # Example
10318    /// ```ignore,no_run
10319    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10320    /// use google_cloud_appengine_v1::model::CpuUtilization;
10321    /// let x = AutomaticScaling::new().set_or_clear_cpu_utilization(Some(CpuUtilization::default()/* use setters */));
10322    /// let x = AutomaticScaling::new().set_or_clear_cpu_utilization(None::<CpuUtilization>);
10323    /// ```
10324    pub fn set_or_clear_cpu_utilization<T>(mut self, v: std::option::Option<T>) -> Self
10325    where
10326        T: std::convert::Into<crate::model::CpuUtilization>,
10327    {
10328        self.cpu_utilization = v.map(|x| x.into());
10329        self
10330    }
10331
10332    /// Sets the value of [max_concurrent_requests][crate::model::AutomaticScaling::max_concurrent_requests].
10333    ///
10334    /// # Example
10335    /// ```ignore,no_run
10336    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10337    /// let x = AutomaticScaling::new().set_max_concurrent_requests(42);
10338    /// ```
10339    pub fn set_max_concurrent_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10340        self.max_concurrent_requests = v.into();
10341        self
10342    }
10343
10344    /// Sets the value of [max_idle_instances][crate::model::AutomaticScaling::max_idle_instances].
10345    ///
10346    /// # Example
10347    /// ```ignore,no_run
10348    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10349    /// let x = AutomaticScaling::new().set_max_idle_instances(42);
10350    /// ```
10351    pub fn set_max_idle_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10352        self.max_idle_instances = v.into();
10353        self
10354    }
10355
10356    /// Sets the value of [max_total_instances][crate::model::AutomaticScaling::max_total_instances].
10357    ///
10358    /// # Example
10359    /// ```ignore,no_run
10360    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10361    /// let x = AutomaticScaling::new().set_max_total_instances(42);
10362    /// ```
10363    pub fn set_max_total_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10364        self.max_total_instances = v.into();
10365        self
10366    }
10367
10368    /// Sets the value of [max_pending_latency][crate::model::AutomaticScaling::max_pending_latency].
10369    ///
10370    /// # Example
10371    /// ```ignore,no_run
10372    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10373    /// use wkt::Duration;
10374    /// let x = AutomaticScaling::new().set_max_pending_latency(Duration::default()/* use setters */);
10375    /// ```
10376    pub fn set_max_pending_latency<T>(mut self, v: T) -> Self
10377    where
10378        T: std::convert::Into<wkt::Duration>,
10379    {
10380        self.max_pending_latency = std::option::Option::Some(v.into());
10381        self
10382    }
10383
10384    /// Sets or clears the value of [max_pending_latency][crate::model::AutomaticScaling::max_pending_latency].
10385    ///
10386    /// # Example
10387    /// ```ignore,no_run
10388    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10389    /// use wkt::Duration;
10390    /// let x = AutomaticScaling::new().set_or_clear_max_pending_latency(Some(Duration::default()/* use setters */));
10391    /// let x = AutomaticScaling::new().set_or_clear_max_pending_latency(None::<Duration>);
10392    /// ```
10393    pub fn set_or_clear_max_pending_latency<T>(mut self, v: std::option::Option<T>) -> Self
10394    where
10395        T: std::convert::Into<wkt::Duration>,
10396    {
10397        self.max_pending_latency = v.map(|x| x.into());
10398        self
10399    }
10400
10401    /// Sets the value of [min_idle_instances][crate::model::AutomaticScaling::min_idle_instances].
10402    ///
10403    /// # Example
10404    /// ```ignore,no_run
10405    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10406    /// let x = AutomaticScaling::new().set_min_idle_instances(42);
10407    /// ```
10408    pub fn set_min_idle_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10409        self.min_idle_instances = v.into();
10410        self
10411    }
10412
10413    /// Sets the value of [min_total_instances][crate::model::AutomaticScaling::min_total_instances].
10414    ///
10415    /// # Example
10416    /// ```ignore,no_run
10417    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10418    /// let x = AutomaticScaling::new().set_min_total_instances(42);
10419    /// ```
10420    pub fn set_min_total_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10421        self.min_total_instances = v.into();
10422        self
10423    }
10424
10425    /// Sets the value of [min_pending_latency][crate::model::AutomaticScaling::min_pending_latency].
10426    ///
10427    /// # Example
10428    /// ```ignore,no_run
10429    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10430    /// use wkt::Duration;
10431    /// let x = AutomaticScaling::new().set_min_pending_latency(Duration::default()/* use setters */);
10432    /// ```
10433    pub fn set_min_pending_latency<T>(mut self, v: T) -> Self
10434    where
10435        T: std::convert::Into<wkt::Duration>,
10436    {
10437        self.min_pending_latency = std::option::Option::Some(v.into());
10438        self
10439    }
10440
10441    /// Sets or clears the value of [min_pending_latency][crate::model::AutomaticScaling::min_pending_latency].
10442    ///
10443    /// # Example
10444    /// ```ignore,no_run
10445    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10446    /// use wkt::Duration;
10447    /// let x = AutomaticScaling::new().set_or_clear_min_pending_latency(Some(Duration::default()/* use setters */));
10448    /// let x = AutomaticScaling::new().set_or_clear_min_pending_latency(None::<Duration>);
10449    /// ```
10450    pub fn set_or_clear_min_pending_latency<T>(mut self, v: std::option::Option<T>) -> Self
10451    where
10452        T: std::convert::Into<wkt::Duration>,
10453    {
10454        self.min_pending_latency = v.map(|x| x.into());
10455        self
10456    }
10457
10458    /// Sets the value of [request_utilization][crate::model::AutomaticScaling::request_utilization].
10459    ///
10460    /// # Example
10461    /// ```ignore,no_run
10462    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10463    /// use google_cloud_appengine_v1::model::RequestUtilization;
10464    /// let x = AutomaticScaling::new().set_request_utilization(RequestUtilization::default()/* use setters */);
10465    /// ```
10466    pub fn set_request_utilization<T>(mut self, v: T) -> Self
10467    where
10468        T: std::convert::Into<crate::model::RequestUtilization>,
10469    {
10470        self.request_utilization = std::option::Option::Some(v.into());
10471        self
10472    }
10473
10474    /// Sets or clears the value of [request_utilization][crate::model::AutomaticScaling::request_utilization].
10475    ///
10476    /// # Example
10477    /// ```ignore,no_run
10478    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10479    /// use google_cloud_appengine_v1::model::RequestUtilization;
10480    /// let x = AutomaticScaling::new().set_or_clear_request_utilization(Some(RequestUtilization::default()/* use setters */));
10481    /// let x = AutomaticScaling::new().set_or_clear_request_utilization(None::<RequestUtilization>);
10482    /// ```
10483    pub fn set_or_clear_request_utilization<T>(mut self, v: std::option::Option<T>) -> Self
10484    where
10485        T: std::convert::Into<crate::model::RequestUtilization>,
10486    {
10487        self.request_utilization = v.map(|x| x.into());
10488        self
10489    }
10490
10491    /// Sets the value of [disk_utilization][crate::model::AutomaticScaling::disk_utilization].
10492    ///
10493    /// # Example
10494    /// ```ignore,no_run
10495    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10496    /// use google_cloud_appengine_v1::model::DiskUtilization;
10497    /// let x = AutomaticScaling::new().set_disk_utilization(DiskUtilization::default()/* use setters */);
10498    /// ```
10499    pub fn set_disk_utilization<T>(mut self, v: T) -> Self
10500    where
10501        T: std::convert::Into<crate::model::DiskUtilization>,
10502    {
10503        self.disk_utilization = std::option::Option::Some(v.into());
10504        self
10505    }
10506
10507    /// Sets or clears the value of [disk_utilization][crate::model::AutomaticScaling::disk_utilization].
10508    ///
10509    /// # Example
10510    /// ```ignore,no_run
10511    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10512    /// use google_cloud_appengine_v1::model::DiskUtilization;
10513    /// let x = AutomaticScaling::new().set_or_clear_disk_utilization(Some(DiskUtilization::default()/* use setters */));
10514    /// let x = AutomaticScaling::new().set_or_clear_disk_utilization(None::<DiskUtilization>);
10515    /// ```
10516    pub fn set_or_clear_disk_utilization<T>(mut self, v: std::option::Option<T>) -> Self
10517    where
10518        T: std::convert::Into<crate::model::DiskUtilization>,
10519    {
10520        self.disk_utilization = v.map(|x| x.into());
10521        self
10522    }
10523
10524    /// Sets the value of [network_utilization][crate::model::AutomaticScaling::network_utilization].
10525    ///
10526    /// # Example
10527    /// ```ignore,no_run
10528    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10529    /// use google_cloud_appengine_v1::model::NetworkUtilization;
10530    /// let x = AutomaticScaling::new().set_network_utilization(NetworkUtilization::default()/* use setters */);
10531    /// ```
10532    pub fn set_network_utilization<T>(mut self, v: T) -> Self
10533    where
10534        T: std::convert::Into<crate::model::NetworkUtilization>,
10535    {
10536        self.network_utilization = std::option::Option::Some(v.into());
10537        self
10538    }
10539
10540    /// Sets or clears the value of [network_utilization][crate::model::AutomaticScaling::network_utilization].
10541    ///
10542    /// # Example
10543    /// ```ignore,no_run
10544    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10545    /// use google_cloud_appengine_v1::model::NetworkUtilization;
10546    /// let x = AutomaticScaling::new().set_or_clear_network_utilization(Some(NetworkUtilization::default()/* use setters */));
10547    /// let x = AutomaticScaling::new().set_or_clear_network_utilization(None::<NetworkUtilization>);
10548    /// ```
10549    pub fn set_or_clear_network_utilization<T>(mut self, v: std::option::Option<T>) -> Self
10550    where
10551        T: std::convert::Into<crate::model::NetworkUtilization>,
10552    {
10553        self.network_utilization = v.map(|x| x.into());
10554        self
10555    }
10556
10557    /// Sets the value of [standard_scheduler_settings][crate::model::AutomaticScaling::standard_scheduler_settings].
10558    ///
10559    /// # Example
10560    /// ```ignore,no_run
10561    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10562    /// use google_cloud_appengine_v1::model::StandardSchedulerSettings;
10563    /// let x = AutomaticScaling::new().set_standard_scheduler_settings(StandardSchedulerSettings::default()/* use setters */);
10564    /// ```
10565    pub fn set_standard_scheduler_settings<T>(mut self, v: T) -> Self
10566    where
10567        T: std::convert::Into<crate::model::StandardSchedulerSettings>,
10568    {
10569        self.standard_scheduler_settings = std::option::Option::Some(v.into());
10570        self
10571    }
10572
10573    /// Sets or clears the value of [standard_scheduler_settings][crate::model::AutomaticScaling::standard_scheduler_settings].
10574    ///
10575    /// # Example
10576    /// ```ignore,no_run
10577    /// # use google_cloud_appengine_v1::model::AutomaticScaling;
10578    /// use google_cloud_appengine_v1::model::StandardSchedulerSettings;
10579    /// let x = AutomaticScaling::new().set_or_clear_standard_scheduler_settings(Some(StandardSchedulerSettings::default()/* use setters */));
10580    /// let x = AutomaticScaling::new().set_or_clear_standard_scheduler_settings(None::<StandardSchedulerSettings>);
10581    /// ```
10582    pub fn set_or_clear_standard_scheduler_settings<T>(mut self, v: std::option::Option<T>) -> Self
10583    where
10584        T: std::convert::Into<crate::model::StandardSchedulerSettings>,
10585    {
10586        self.standard_scheduler_settings = v.map(|x| x.into());
10587        self
10588    }
10589}
10590
10591impl wkt::message::Message for AutomaticScaling {
10592    fn typename() -> &'static str {
10593        "type.googleapis.com/google.appengine.v1.AutomaticScaling"
10594    }
10595}
10596
10597/// A service with basic scaling will create an instance when the application
10598/// receives a request. The instance will be turned down when the app becomes
10599/// idle. Basic scaling is ideal for work that is intermittent or driven by
10600/// user activity.
10601#[derive(Clone, Default, PartialEq)]
10602#[non_exhaustive]
10603pub struct BasicScaling {
10604    /// Duration of time after the last request that an instance must wait before
10605    /// the instance is shut down.
10606    pub idle_timeout: std::option::Option<wkt::Duration>,
10607
10608    /// Maximum number of instances to create for this version.
10609    pub max_instances: i32,
10610
10611    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10612}
10613
10614impl BasicScaling {
10615    pub fn new() -> Self {
10616        std::default::Default::default()
10617    }
10618
10619    /// Sets the value of [idle_timeout][crate::model::BasicScaling::idle_timeout].
10620    ///
10621    /// # Example
10622    /// ```ignore,no_run
10623    /// # use google_cloud_appengine_v1::model::BasicScaling;
10624    /// use wkt::Duration;
10625    /// let x = BasicScaling::new().set_idle_timeout(Duration::default()/* use setters */);
10626    /// ```
10627    pub fn set_idle_timeout<T>(mut self, v: T) -> Self
10628    where
10629        T: std::convert::Into<wkt::Duration>,
10630    {
10631        self.idle_timeout = std::option::Option::Some(v.into());
10632        self
10633    }
10634
10635    /// Sets or clears the value of [idle_timeout][crate::model::BasicScaling::idle_timeout].
10636    ///
10637    /// # Example
10638    /// ```ignore,no_run
10639    /// # use google_cloud_appengine_v1::model::BasicScaling;
10640    /// use wkt::Duration;
10641    /// let x = BasicScaling::new().set_or_clear_idle_timeout(Some(Duration::default()/* use setters */));
10642    /// let x = BasicScaling::new().set_or_clear_idle_timeout(None::<Duration>);
10643    /// ```
10644    pub fn set_or_clear_idle_timeout<T>(mut self, v: std::option::Option<T>) -> Self
10645    where
10646        T: std::convert::Into<wkt::Duration>,
10647    {
10648        self.idle_timeout = v.map(|x| x.into());
10649        self
10650    }
10651
10652    /// Sets the value of [max_instances][crate::model::BasicScaling::max_instances].
10653    ///
10654    /// # Example
10655    /// ```ignore,no_run
10656    /// # use google_cloud_appengine_v1::model::BasicScaling;
10657    /// let x = BasicScaling::new().set_max_instances(42);
10658    /// ```
10659    pub fn set_max_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10660        self.max_instances = v.into();
10661        self
10662    }
10663}
10664
10665impl wkt::message::Message for BasicScaling {
10666    fn typename() -> &'static str {
10667        "type.googleapis.com/google.appengine.v1.BasicScaling"
10668    }
10669}
10670
10671/// A service with manual scaling runs continuously, allowing you to perform
10672/// complex initialization and rely on the state of its memory over time.
10673#[derive(Clone, Default, PartialEq)]
10674#[non_exhaustive]
10675pub struct ManualScaling {
10676    /// Number of instances to assign to the service at the start. This number
10677    /// can later be altered by using the
10678    /// [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
10679    /// `set_num_instances()` function.
10680    pub instances: i32,
10681
10682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10683}
10684
10685impl ManualScaling {
10686    pub fn new() -> Self {
10687        std::default::Default::default()
10688    }
10689
10690    /// Sets the value of [instances][crate::model::ManualScaling::instances].
10691    ///
10692    /// # Example
10693    /// ```ignore,no_run
10694    /// # use google_cloud_appengine_v1::model::ManualScaling;
10695    /// let x = ManualScaling::new().set_instances(42);
10696    /// ```
10697    pub fn set_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10698        self.instances = v.into();
10699        self
10700    }
10701}
10702
10703impl wkt::message::Message for ManualScaling {
10704    fn typename() -> &'static str {
10705        "type.googleapis.com/google.appengine.v1.ManualScaling"
10706    }
10707}
10708
10709/// Target scaling by CPU usage.
10710#[derive(Clone, Default, PartialEq)]
10711#[non_exhaustive]
10712pub struct CpuUtilization {
10713    /// Period of time over which CPU utilization is calculated.
10714    pub aggregation_window_length: std::option::Option<wkt::Duration>,
10715
10716    /// Target CPU utilization ratio to maintain when scaling. Must be between 0
10717    /// and 1.
10718    pub target_utilization: f64,
10719
10720    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10721}
10722
10723impl CpuUtilization {
10724    pub fn new() -> Self {
10725        std::default::Default::default()
10726    }
10727
10728    /// Sets the value of [aggregation_window_length][crate::model::CpuUtilization::aggregation_window_length].
10729    ///
10730    /// # Example
10731    /// ```ignore,no_run
10732    /// # use google_cloud_appengine_v1::model::CpuUtilization;
10733    /// use wkt::Duration;
10734    /// let x = CpuUtilization::new().set_aggregation_window_length(Duration::default()/* use setters */);
10735    /// ```
10736    pub fn set_aggregation_window_length<T>(mut self, v: T) -> Self
10737    where
10738        T: std::convert::Into<wkt::Duration>,
10739    {
10740        self.aggregation_window_length = std::option::Option::Some(v.into());
10741        self
10742    }
10743
10744    /// Sets or clears the value of [aggregation_window_length][crate::model::CpuUtilization::aggregation_window_length].
10745    ///
10746    /// # Example
10747    /// ```ignore,no_run
10748    /// # use google_cloud_appengine_v1::model::CpuUtilization;
10749    /// use wkt::Duration;
10750    /// let x = CpuUtilization::new().set_or_clear_aggregation_window_length(Some(Duration::default()/* use setters */));
10751    /// let x = CpuUtilization::new().set_or_clear_aggregation_window_length(None::<Duration>);
10752    /// ```
10753    pub fn set_or_clear_aggregation_window_length<T>(mut self, v: std::option::Option<T>) -> Self
10754    where
10755        T: std::convert::Into<wkt::Duration>,
10756    {
10757        self.aggregation_window_length = v.map(|x| x.into());
10758        self
10759    }
10760
10761    /// Sets the value of [target_utilization][crate::model::CpuUtilization::target_utilization].
10762    ///
10763    /// # Example
10764    /// ```ignore,no_run
10765    /// # use google_cloud_appengine_v1::model::CpuUtilization;
10766    /// let x = CpuUtilization::new().set_target_utilization(42.0);
10767    /// ```
10768    pub fn set_target_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
10769        self.target_utilization = v.into();
10770        self
10771    }
10772}
10773
10774impl wkt::message::Message for CpuUtilization {
10775    fn typename() -> &'static str {
10776        "type.googleapis.com/google.appengine.v1.CpuUtilization"
10777    }
10778}
10779
10780/// Target scaling by request utilization.
10781/// Only applicable in the App Engine flexible environment.
10782#[derive(Clone, Default, PartialEq)]
10783#[non_exhaustive]
10784pub struct RequestUtilization {
10785    /// Target requests per second.
10786    pub target_request_count_per_second: i32,
10787
10788    /// Target number of concurrent requests.
10789    pub target_concurrent_requests: i32,
10790
10791    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10792}
10793
10794impl RequestUtilization {
10795    pub fn new() -> Self {
10796        std::default::Default::default()
10797    }
10798
10799    /// Sets the value of [target_request_count_per_second][crate::model::RequestUtilization::target_request_count_per_second].
10800    ///
10801    /// # Example
10802    /// ```ignore,no_run
10803    /// # use google_cloud_appengine_v1::model::RequestUtilization;
10804    /// let x = RequestUtilization::new().set_target_request_count_per_second(42);
10805    /// ```
10806    pub fn set_target_request_count_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10807        self.target_request_count_per_second = v.into();
10808        self
10809    }
10810
10811    /// Sets the value of [target_concurrent_requests][crate::model::RequestUtilization::target_concurrent_requests].
10812    ///
10813    /// # Example
10814    /// ```ignore,no_run
10815    /// # use google_cloud_appengine_v1::model::RequestUtilization;
10816    /// let x = RequestUtilization::new().set_target_concurrent_requests(42);
10817    /// ```
10818    pub fn set_target_concurrent_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10819        self.target_concurrent_requests = v.into();
10820        self
10821    }
10822}
10823
10824impl wkt::message::Message for RequestUtilization {
10825    fn typename() -> &'static str {
10826        "type.googleapis.com/google.appengine.v1.RequestUtilization"
10827    }
10828}
10829
10830/// Target scaling by disk usage.
10831/// Only applicable in the App Engine flexible environment.
10832#[derive(Clone, Default, PartialEq)]
10833#[non_exhaustive]
10834pub struct DiskUtilization {
10835    /// Target bytes written per second.
10836    pub target_write_bytes_per_second: i32,
10837
10838    /// Target ops written per second.
10839    pub target_write_ops_per_second: i32,
10840
10841    /// Target bytes read per second.
10842    pub target_read_bytes_per_second: i32,
10843
10844    /// Target ops read per seconds.
10845    pub target_read_ops_per_second: i32,
10846
10847    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10848}
10849
10850impl DiskUtilization {
10851    pub fn new() -> Self {
10852        std::default::Default::default()
10853    }
10854
10855    /// Sets the value of [target_write_bytes_per_second][crate::model::DiskUtilization::target_write_bytes_per_second].
10856    ///
10857    /// # Example
10858    /// ```ignore,no_run
10859    /// # use google_cloud_appengine_v1::model::DiskUtilization;
10860    /// let x = DiskUtilization::new().set_target_write_bytes_per_second(42);
10861    /// ```
10862    pub fn set_target_write_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10863        self.target_write_bytes_per_second = v.into();
10864        self
10865    }
10866
10867    /// Sets the value of [target_write_ops_per_second][crate::model::DiskUtilization::target_write_ops_per_second].
10868    ///
10869    /// # Example
10870    /// ```ignore,no_run
10871    /// # use google_cloud_appengine_v1::model::DiskUtilization;
10872    /// let x = DiskUtilization::new().set_target_write_ops_per_second(42);
10873    /// ```
10874    pub fn set_target_write_ops_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10875        self.target_write_ops_per_second = v.into();
10876        self
10877    }
10878
10879    /// Sets the value of [target_read_bytes_per_second][crate::model::DiskUtilization::target_read_bytes_per_second].
10880    ///
10881    /// # Example
10882    /// ```ignore,no_run
10883    /// # use google_cloud_appengine_v1::model::DiskUtilization;
10884    /// let x = DiskUtilization::new().set_target_read_bytes_per_second(42);
10885    /// ```
10886    pub fn set_target_read_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10887        self.target_read_bytes_per_second = v.into();
10888        self
10889    }
10890
10891    /// Sets the value of [target_read_ops_per_second][crate::model::DiskUtilization::target_read_ops_per_second].
10892    ///
10893    /// # Example
10894    /// ```ignore,no_run
10895    /// # use google_cloud_appengine_v1::model::DiskUtilization;
10896    /// let x = DiskUtilization::new().set_target_read_ops_per_second(42);
10897    /// ```
10898    pub fn set_target_read_ops_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10899        self.target_read_ops_per_second = v.into();
10900        self
10901    }
10902}
10903
10904impl wkt::message::Message for DiskUtilization {
10905    fn typename() -> &'static str {
10906        "type.googleapis.com/google.appengine.v1.DiskUtilization"
10907    }
10908}
10909
10910/// Target scaling by network usage.
10911/// Only applicable in the App Engine flexible environment.
10912#[derive(Clone, Default, PartialEq)]
10913#[non_exhaustive]
10914pub struct NetworkUtilization {
10915    /// Target bytes sent per second.
10916    pub target_sent_bytes_per_second: i32,
10917
10918    /// Target packets sent per second.
10919    pub target_sent_packets_per_second: i32,
10920
10921    /// Target bytes received per second.
10922    pub target_received_bytes_per_second: i32,
10923
10924    /// Target packets received per second.
10925    pub target_received_packets_per_second: i32,
10926
10927    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10928}
10929
10930impl NetworkUtilization {
10931    pub fn new() -> Self {
10932        std::default::Default::default()
10933    }
10934
10935    /// Sets the value of [target_sent_bytes_per_second][crate::model::NetworkUtilization::target_sent_bytes_per_second].
10936    ///
10937    /// # Example
10938    /// ```ignore,no_run
10939    /// # use google_cloud_appengine_v1::model::NetworkUtilization;
10940    /// let x = NetworkUtilization::new().set_target_sent_bytes_per_second(42);
10941    /// ```
10942    pub fn set_target_sent_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10943        self.target_sent_bytes_per_second = v.into();
10944        self
10945    }
10946
10947    /// Sets the value of [target_sent_packets_per_second][crate::model::NetworkUtilization::target_sent_packets_per_second].
10948    ///
10949    /// # Example
10950    /// ```ignore,no_run
10951    /// # use google_cloud_appengine_v1::model::NetworkUtilization;
10952    /// let x = NetworkUtilization::new().set_target_sent_packets_per_second(42);
10953    /// ```
10954    pub fn set_target_sent_packets_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10955        self.target_sent_packets_per_second = v.into();
10956        self
10957    }
10958
10959    /// Sets the value of [target_received_bytes_per_second][crate::model::NetworkUtilization::target_received_bytes_per_second].
10960    ///
10961    /// # Example
10962    /// ```ignore,no_run
10963    /// # use google_cloud_appengine_v1::model::NetworkUtilization;
10964    /// let x = NetworkUtilization::new().set_target_received_bytes_per_second(42);
10965    /// ```
10966    pub fn set_target_received_bytes_per_second<T: std::convert::Into<i32>>(
10967        mut self,
10968        v: T,
10969    ) -> Self {
10970        self.target_received_bytes_per_second = v.into();
10971        self
10972    }
10973
10974    /// Sets the value of [target_received_packets_per_second][crate::model::NetworkUtilization::target_received_packets_per_second].
10975    ///
10976    /// # Example
10977    /// ```ignore,no_run
10978    /// # use google_cloud_appengine_v1::model::NetworkUtilization;
10979    /// let x = NetworkUtilization::new().set_target_received_packets_per_second(42);
10980    /// ```
10981    pub fn set_target_received_packets_per_second<T: std::convert::Into<i32>>(
10982        mut self,
10983        v: T,
10984    ) -> Self {
10985        self.target_received_packets_per_second = v.into();
10986        self
10987    }
10988}
10989
10990impl wkt::message::Message for NetworkUtilization {
10991    fn typename() -> &'static str {
10992        "type.googleapis.com/google.appengine.v1.NetworkUtilization"
10993    }
10994}
10995
10996/// Scheduler settings for standard environment.
10997#[derive(Clone, Default, PartialEq)]
10998#[non_exhaustive]
10999pub struct StandardSchedulerSettings {
11000    /// Target CPU utilization ratio to maintain when scaling.
11001    pub target_cpu_utilization: f64,
11002
11003    /// Target throughput utilization ratio to maintain when scaling
11004    pub target_throughput_utilization: f64,
11005
11006    /// Minimum number of instances to run for this version. Set to zero to disable
11007    /// `min_instances` configuration.
11008    pub min_instances: i32,
11009
11010    /// Maximum number of instances to run for this version. Set to zero to disable
11011    /// `max_instances` configuration.
11012    pub max_instances: i32,
11013
11014    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11015}
11016
11017impl StandardSchedulerSettings {
11018    pub fn new() -> Self {
11019        std::default::Default::default()
11020    }
11021
11022    /// Sets the value of [target_cpu_utilization][crate::model::StandardSchedulerSettings::target_cpu_utilization].
11023    ///
11024    /// # Example
11025    /// ```ignore,no_run
11026    /// # use google_cloud_appengine_v1::model::StandardSchedulerSettings;
11027    /// let x = StandardSchedulerSettings::new().set_target_cpu_utilization(42.0);
11028    /// ```
11029    pub fn set_target_cpu_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11030        self.target_cpu_utilization = v.into();
11031        self
11032    }
11033
11034    /// Sets the value of [target_throughput_utilization][crate::model::StandardSchedulerSettings::target_throughput_utilization].
11035    ///
11036    /// # Example
11037    /// ```ignore,no_run
11038    /// # use google_cloud_appengine_v1::model::StandardSchedulerSettings;
11039    /// let x = StandardSchedulerSettings::new().set_target_throughput_utilization(42.0);
11040    /// ```
11041    pub fn set_target_throughput_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11042        self.target_throughput_utilization = v.into();
11043        self
11044    }
11045
11046    /// Sets the value of [min_instances][crate::model::StandardSchedulerSettings::min_instances].
11047    ///
11048    /// # Example
11049    /// ```ignore,no_run
11050    /// # use google_cloud_appengine_v1::model::StandardSchedulerSettings;
11051    /// let x = StandardSchedulerSettings::new().set_min_instances(42);
11052    /// ```
11053    pub fn set_min_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11054        self.min_instances = v.into();
11055        self
11056    }
11057
11058    /// Sets the value of [max_instances][crate::model::StandardSchedulerSettings::max_instances].
11059    ///
11060    /// # Example
11061    /// ```ignore,no_run
11062    /// # use google_cloud_appengine_v1::model::StandardSchedulerSettings;
11063    /// let x = StandardSchedulerSettings::new().set_max_instances(42);
11064    /// ```
11065    pub fn set_max_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11066        self.max_instances = v.into();
11067        self
11068    }
11069}
11070
11071impl wkt::message::Message for StandardSchedulerSettings {
11072    fn typename() -> &'static str {
11073        "type.googleapis.com/google.appengine.v1.StandardSchedulerSettings"
11074    }
11075}
11076
11077/// Extra network settings.
11078/// Only applicable in the App Engine flexible environment.
11079#[derive(Clone, Default, PartialEq)]
11080#[non_exhaustive]
11081pub struct Network {
11082    /// List of ports, or port pairs, to forward from the virtual machine to the
11083    /// application container.
11084    /// Only applicable in the App Engine flexible environment.
11085    pub forwarded_ports: std::vec::Vec<std::string::String>,
11086
11087    /// Tag to apply to the instance during creation.
11088    /// Only applicable in the App Engine flexible environment.
11089    pub instance_tag: std::string::String,
11090
11091    /// Google Compute Engine network where the virtual machines are created.
11092    /// Specify the short name, not the resource path.
11093    ///
11094    /// Defaults to `default`.
11095    pub name: std::string::String,
11096
11097    /// Google Cloud Platform sub-network where the virtual machines are created.
11098    /// Specify the short name, not the resource path.
11099    ///
11100    /// If a subnetwork name is specified, a network name will also be required
11101    /// unless it is for the default network.
11102    ///
11103    /// * If the network that the instance is being created in is a Legacy network,
11104    ///   then the IP address is allocated from the IPv4Range.
11105    /// * If the network that the instance is being created in is an auto Subnet
11106    ///   Mode Network, then only network name should be specified (not the
11107    ///   subnetwork_name) and the IP address is created from the IPCidrRange of the
11108    ///   subnetwork that exists in that zone for that network.
11109    /// * If the network that the instance is being created in is a custom Subnet
11110    ///   Mode Network, then the subnetwork_name must be specified and the
11111    ///   IP address is created from the IPCidrRange of the subnetwork.
11112    ///
11113    /// If specified, the subnetwork must exist in the same region as the
11114    /// App Engine flexible environment application.
11115    pub subnetwork_name: std::string::String,
11116
11117    /// Enable session affinity.
11118    /// Only applicable in the App Engine flexible environment.
11119    pub session_affinity: bool,
11120
11121    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11122}
11123
11124impl Network {
11125    pub fn new() -> Self {
11126        std::default::Default::default()
11127    }
11128
11129    /// Sets the value of [forwarded_ports][crate::model::Network::forwarded_ports].
11130    ///
11131    /// # Example
11132    /// ```ignore,no_run
11133    /// # use google_cloud_appengine_v1::model::Network;
11134    /// let x = Network::new().set_forwarded_ports(["a", "b", "c"]);
11135    /// ```
11136    pub fn set_forwarded_ports<T, V>(mut self, v: T) -> Self
11137    where
11138        T: std::iter::IntoIterator<Item = V>,
11139        V: std::convert::Into<std::string::String>,
11140    {
11141        use std::iter::Iterator;
11142        self.forwarded_ports = v.into_iter().map(|i| i.into()).collect();
11143        self
11144    }
11145
11146    /// Sets the value of [instance_tag][crate::model::Network::instance_tag].
11147    ///
11148    /// # Example
11149    /// ```ignore,no_run
11150    /// # use google_cloud_appengine_v1::model::Network;
11151    /// let x = Network::new().set_instance_tag("example");
11152    /// ```
11153    pub fn set_instance_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11154        self.instance_tag = v.into();
11155        self
11156    }
11157
11158    /// Sets the value of [name][crate::model::Network::name].
11159    ///
11160    /// # Example
11161    /// ```ignore,no_run
11162    /// # use google_cloud_appengine_v1::model::Network;
11163    /// let x = Network::new().set_name("example");
11164    /// ```
11165    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11166        self.name = v.into();
11167        self
11168    }
11169
11170    /// Sets the value of [subnetwork_name][crate::model::Network::subnetwork_name].
11171    ///
11172    /// # Example
11173    /// ```ignore,no_run
11174    /// # use google_cloud_appengine_v1::model::Network;
11175    /// let x = Network::new().set_subnetwork_name("example");
11176    /// ```
11177    pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11178        self.subnetwork_name = v.into();
11179        self
11180    }
11181
11182    /// Sets the value of [session_affinity][crate::model::Network::session_affinity].
11183    ///
11184    /// # Example
11185    /// ```ignore,no_run
11186    /// # use google_cloud_appengine_v1::model::Network;
11187    /// let x = Network::new().set_session_affinity(true);
11188    /// ```
11189    pub fn set_session_affinity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11190        self.session_affinity = v.into();
11191        self
11192    }
11193}
11194
11195impl wkt::message::Message for Network {
11196    fn typename() -> &'static str {
11197        "type.googleapis.com/google.appengine.v1.Network"
11198    }
11199}
11200
11201/// Volumes mounted within the app container.
11202/// Only applicable in the App Engine flexible environment.
11203#[derive(Clone, Default, PartialEq)]
11204#[non_exhaustive]
11205pub struct Volume {
11206    /// Unique name for the volume.
11207    pub name: std::string::String,
11208
11209    /// Underlying volume type, e.g. 'tmpfs'.
11210    pub volume_type: std::string::String,
11211
11212    /// Volume size in gigabytes.
11213    pub size_gb: f64,
11214
11215    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11216}
11217
11218impl Volume {
11219    pub fn new() -> Self {
11220        std::default::Default::default()
11221    }
11222
11223    /// Sets the value of [name][crate::model::Volume::name].
11224    ///
11225    /// # Example
11226    /// ```ignore,no_run
11227    /// # use google_cloud_appengine_v1::model::Volume;
11228    /// let x = Volume::new().set_name("example");
11229    /// ```
11230    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11231        self.name = v.into();
11232        self
11233    }
11234
11235    /// Sets the value of [volume_type][crate::model::Volume::volume_type].
11236    ///
11237    /// # Example
11238    /// ```ignore,no_run
11239    /// # use google_cloud_appengine_v1::model::Volume;
11240    /// let x = Volume::new().set_volume_type("example");
11241    /// ```
11242    pub fn set_volume_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11243        self.volume_type = v.into();
11244        self
11245    }
11246
11247    /// Sets the value of [size_gb][crate::model::Volume::size_gb].
11248    ///
11249    /// # Example
11250    /// ```ignore,no_run
11251    /// # use google_cloud_appengine_v1::model::Volume;
11252    /// let x = Volume::new().set_size_gb(42.0);
11253    /// ```
11254    pub fn set_size_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11255        self.size_gb = v.into();
11256        self
11257    }
11258}
11259
11260impl wkt::message::Message for Volume {
11261    fn typename() -> &'static str {
11262        "type.googleapis.com/google.appengine.v1.Volume"
11263    }
11264}
11265
11266/// Machine resources for a version.
11267#[derive(Clone, Default, PartialEq)]
11268#[non_exhaustive]
11269pub struct Resources {
11270    /// Number of CPU cores needed.
11271    pub cpu: f64,
11272
11273    /// Disk size (GB) needed.
11274    pub disk_gb: f64,
11275
11276    /// Memory (GB) needed.
11277    pub memory_gb: f64,
11278
11279    /// User specified volumes.
11280    pub volumes: std::vec::Vec<crate::model::Volume>,
11281
11282    /// The name of the encryption key that is stored in Google Cloud KMS.
11283    /// Only should be used by Cloud Composer to encrypt the vm disk
11284    pub kms_key_reference: std::string::String,
11285
11286    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11287}
11288
11289impl Resources {
11290    pub fn new() -> Self {
11291        std::default::Default::default()
11292    }
11293
11294    /// Sets the value of [cpu][crate::model::Resources::cpu].
11295    ///
11296    /// # Example
11297    /// ```ignore,no_run
11298    /// # use google_cloud_appengine_v1::model::Resources;
11299    /// let x = Resources::new().set_cpu(42.0);
11300    /// ```
11301    pub fn set_cpu<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11302        self.cpu = v.into();
11303        self
11304    }
11305
11306    /// Sets the value of [disk_gb][crate::model::Resources::disk_gb].
11307    ///
11308    /// # Example
11309    /// ```ignore,no_run
11310    /// # use google_cloud_appengine_v1::model::Resources;
11311    /// let x = Resources::new().set_disk_gb(42.0);
11312    /// ```
11313    pub fn set_disk_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11314        self.disk_gb = v.into();
11315        self
11316    }
11317
11318    /// Sets the value of [memory_gb][crate::model::Resources::memory_gb].
11319    ///
11320    /// # Example
11321    /// ```ignore,no_run
11322    /// # use google_cloud_appengine_v1::model::Resources;
11323    /// let x = Resources::new().set_memory_gb(42.0);
11324    /// ```
11325    pub fn set_memory_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11326        self.memory_gb = v.into();
11327        self
11328    }
11329
11330    /// Sets the value of [volumes][crate::model::Resources::volumes].
11331    ///
11332    /// # Example
11333    /// ```ignore,no_run
11334    /// # use google_cloud_appengine_v1::model::Resources;
11335    /// use google_cloud_appengine_v1::model::Volume;
11336    /// let x = Resources::new()
11337    ///     .set_volumes([
11338    ///         Volume::default()/* use setters */,
11339    ///         Volume::default()/* use (different) setters */,
11340    ///     ]);
11341    /// ```
11342    pub fn set_volumes<T, V>(mut self, v: T) -> Self
11343    where
11344        T: std::iter::IntoIterator<Item = V>,
11345        V: std::convert::Into<crate::model::Volume>,
11346    {
11347        use std::iter::Iterator;
11348        self.volumes = v.into_iter().map(|i| i.into()).collect();
11349        self
11350    }
11351
11352    /// Sets the value of [kms_key_reference][crate::model::Resources::kms_key_reference].
11353    ///
11354    /// # Example
11355    /// ```ignore,no_run
11356    /// # use google_cloud_appengine_v1::model::Resources;
11357    /// let x = Resources::new().set_kms_key_reference("example");
11358    /// ```
11359    pub fn set_kms_key_reference<T: std::convert::Into<std::string::String>>(
11360        mut self,
11361        v: T,
11362    ) -> Self {
11363        self.kms_key_reference = v.into();
11364        self
11365    }
11366}
11367
11368impl wkt::message::Message for Resources {
11369    fn typename() -> &'static str {
11370        "type.googleapis.com/google.appengine.v1.Resources"
11371    }
11372}
11373
11374/// VPC access connector specification.
11375#[derive(Clone, Default, PartialEq)]
11376#[non_exhaustive]
11377pub struct VpcAccessConnector {
11378    /// Full Serverless VPC Access Connector name e.g.
11379    /// /projects/my-project/locations/us-central1/connectors/c1.
11380    pub name: std::string::String,
11381
11382    /// The egress setting for the connector, controlling what traffic is diverted
11383    /// through it.
11384    pub egress_setting: crate::model::vpc_access_connector::EgressSetting,
11385
11386    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11387}
11388
11389impl VpcAccessConnector {
11390    pub fn new() -> Self {
11391        std::default::Default::default()
11392    }
11393
11394    /// Sets the value of [name][crate::model::VpcAccessConnector::name].
11395    ///
11396    /// # Example
11397    /// ```ignore,no_run
11398    /// # use google_cloud_appengine_v1::model::VpcAccessConnector;
11399    /// let x = VpcAccessConnector::new().set_name("example");
11400    /// ```
11401    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11402        self.name = v.into();
11403        self
11404    }
11405
11406    /// Sets the value of [egress_setting][crate::model::VpcAccessConnector::egress_setting].
11407    ///
11408    /// # Example
11409    /// ```ignore,no_run
11410    /// # use google_cloud_appengine_v1::model::VpcAccessConnector;
11411    /// use google_cloud_appengine_v1::model::vpc_access_connector::EgressSetting;
11412    /// let x0 = VpcAccessConnector::new().set_egress_setting(EgressSetting::AllTraffic);
11413    /// let x1 = VpcAccessConnector::new().set_egress_setting(EgressSetting::PrivateIpRanges);
11414    /// ```
11415    pub fn set_egress_setting<
11416        T: std::convert::Into<crate::model::vpc_access_connector::EgressSetting>,
11417    >(
11418        mut self,
11419        v: T,
11420    ) -> Self {
11421        self.egress_setting = v.into();
11422        self
11423    }
11424}
11425
11426impl wkt::message::Message for VpcAccessConnector {
11427    fn typename() -> &'static str {
11428        "type.googleapis.com/google.appengine.v1.VpcAccessConnector"
11429    }
11430}
11431
11432/// Defines additional types related to [VpcAccessConnector].
11433pub mod vpc_access_connector {
11434    #[allow(unused_imports)]
11435    use super::*;
11436
11437    /// Available egress settings.
11438    ///
11439    /// This controls what traffic is diverted through the VPC Access Connector
11440    /// resource. By default PRIVATE_IP_RANGES will be used.
11441    ///
11442    /// # Working with unknown values
11443    ///
11444    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11445    /// additional enum variants at any time. Adding new variants is not considered
11446    /// a breaking change. Applications should write their code in anticipation of:
11447    ///
11448    /// - New values appearing in future releases of the client library, **and**
11449    /// - New values received dynamically, without application changes.
11450    ///
11451    /// Please consult the [Working with enums] section in the user guide for some
11452    /// guidelines.
11453    ///
11454    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11455    #[derive(Clone, Debug, PartialEq)]
11456    #[non_exhaustive]
11457    pub enum EgressSetting {
11458        Unspecified,
11459        /// Force the use of VPC Access for all egress traffic from the function.
11460        AllTraffic,
11461        /// Use the VPC Access Connector for private IP space from RFC1918.
11462        PrivateIpRanges,
11463        /// If set, the enum was initialized with an unknown value.
11464        ///
11465        /// Applications can examine the value using [EgressSetting::value] or
11466        /// [EgressSetting::name].
11467        UnknownValue(egress_setting::UnknownValue),
11468    }
11469
11470    #[doc(hidden)]
11471    pub mod egress_setting {
11472        #[allow(unused_imports)]
11473        use super::*;
11474        #[derive(Clone, Debug, PartialEq)]
11475        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11476    }
11477
11478    impl EgressSetting {
11479        /// Gets the enum value.
11480        ///
11481        /// Returns `None` if the enum contains an unknown value deserialized from
11482        /// the string representation of enums.
11483        pub fn value(&self) -> std::option::Option<i32> {
11484            match self {
11485                Self::Unspecified => std::option::Option::Some(0),
11486                Self::AllTraffic => std::option::Option::Some(1),
11487                Self::PrivateIpRanges => std::option::Option::Some(2),
11488                Self::UnknownValue(u) => u.0.value(),
11489            }
11490        }
11491
11492        /// Gets the enum value as a string.
11493        ///
11494        /// Returns `None` if the enum contains an unknown value deserialized from
11495        /// the integer representation of enums.
11496        pub fn name(&self) -> std::option::Option<&str> {
11497            match self {
11498                Self::Unspecified => std::option::Option::Some("EGRESS_SETTING_UNSPECIFIED"),
11499                Self::AllTraffic => std::option::Option::Some("ALL_TRAFFIC"),
11500                Self::PrivateIpRanges => std::option::Option::Some("PRIVATE_IP_RANGES"),
11501                Self::UnknownValue(u) => u.0.name(),
11502            }
11503        }
11504    }
11505
11506    impl std::default::Default for EgressSetting {
11507        fn default() -> Self {
11508            use std::convert::From;
11509            Self::from(0)
11510        }
11511    }
11512
11513    impl std::fmt::Display for EgressSetting {
11514        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11515            wkt::internal::display_enum(f, self.name(), self.value())
11516        }
11517    }
11518
11519    impl std::convert::From<i32> for EgressSetting {
11520        fn from(value: i32) -> Self {
11521            match value {
11522                0 => Self::Unspecified,
11523                1 => Self::AllTraffic,
11524                2 => Self::PrivateIpRanges,
11525                _ => Self::UnknownValue(egress_setting::UnknownValue(
11526                    wkt::internal::UnknownEnumValue::Integer(value),
11527                )),
11528            }
11529        }
11530    }
11531
11532    impl std::convert::From<&str> for EgressSetting {
11533        fn from(value: &str) -> Self {
11534            use std::string::ToString;
11535            match value {
11536                "EGRESS_SETTING_UNSPECIFIED" => Self::Unspecified,
11537                "ALL_TRAFFIC" => Self::AllTraffic,
11538                "PRIVATE_IP_RANGES" => Self::PrivateIpRanges,
11539                _ => Self::UnknownValue(egress_setting::UnknownValue(
11540                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11541                )),
11542            }
11543        }
11544    }
11545
11546    impl serde::ser::Serialize for EgressSetting {
11547        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11548        where
11549            S: serde::Serializer,
11550        {
11551            match self {
11552                Self::Unspecified => serializer.serialize_i32(0),
11553                Self::AllTraffic => serializer.serialize_i32(1),
11554                Self::PrivateIpRanges => serializer.serialize_i32(2),
11555                Self::UnknownValue(u) => u.0.serialize(serializer),
11556            }
11557        }
11558    }
11559
11560    impl<'de> serde::de::Deserialize<'de> for EgressSetting {
11561        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11562        where
11563            D: serde::Deserializer<'de>,
11564        {
11565            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EgressSetting>::new(
11566                ".google.appengine.v1.VpcAccessConnector.EgressSetting",
11567            ))
11568        }
11569    }
11570}
11571
11572/// The entrypoint for the application.
11573#[derive(Clone, Default, PartialEq)]
11574#[non_exhaustive]
11575pub struct Entrypoint {
11576    /// The command to run.
11577    pub command: std::option::Option<crate::model::entrypoint::Command>,
11578
11579    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11580}
11581
11582impl Entrypoint {
11583    pub fn new() -> Self {
11584        std::default::Default::default()
11585    }
11586
11587    /// Sets the value of [command][crate::model::Entrypoint::command].
11588    ///
11589    /// Note that all the setters affecting `command` are mutually
11590    /// exclusive.
11591    ///
11592    /// # Example
11593    /// ```ignore,no_run
11594    /// # use google_cloud_appengine_v1::model::Entrypoint;
11595    /// use google_cloud_appengine_v1::model::entrypoint::Command;
11596    /// let x = Entrypoint::new().set_command(Some(Command::Shell("example".to_string())));
11597    /// ```
11598    pub fn set_command<
11599        T: std::convert::Into<std::option::Option<crate::model::entrypoint::Command>>,
11600    >(
11601        mut self,
11602        v: T,
11603    ) -> Self {
11604        self.command = v.into();
11605        self
11606    }
11607
11608    /// The value of [command][crate::model::Entrypoint::command]
11609    /// if it holds a `Shell`, `None` if the field is not set or
11610    /// holds a different branch.
11611    pub fn shell(&self) -> std::option::Option<&std::string::String> {
11612        #[allow(unreachable_patterns)]
11613        self.command.as_ref().and_then(|v| match v {
11614            crate::model::entrypoint::Command::Shell(v) => std::option::Option::Some(v),
11615            _ => std::option::Option::None,
11616        })
11617    }
11618
11619    /// Sets the value of [command][crate::model::Entrypoint::command]
11620    /// to hold a `Shell`.
11621    ///
11622    /// Note that all the setters affecting `command` are
11623    /// mutually exclusive.
11624    ///
11625    /// # Example
11626    /// ```ignore,no_run
11627    /// # use google_cloud_appengine_v1::model::Entrypoint;
11628    /// let x = Entrypoint::new().set_shell("example");
11629    /// assert!(x.shell().is_some());
11630    /// ```
11631    pub fn set_shell<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11632        self.command =
11633            std::option::Option::Some(crate::model::entrypoint::Command::Shell(v.into()));
11634        self
11635    }
11636}
11637
11638impl wkt::message::Message for Entrypoint {
11639    fn typename() -> &'static str {
11640        "type.googleapis.com/google.appengine.v1.Entrypoint"
11641    }
11642}
11643
11644/// Defines additional types related to [Entrypoint].
11645pub mod entrypoint {
11646    #[allow(unused_imports)]
11647    use super::*;
11648
11649    /// The command to run.
11650    #[derive(Clone, Debug, PartialEq)]
11651    #[non_exhaustive]
11652    pub enum Command {
11653        /// The format should be a shell command that can be fed to `bash -c`.
11654        Shell(std::string::String),
11655    }
11656}
11657
11658/// Actions to take when the user is not logged in.
11659///
11660/// # Working with unknown values
11661///
11662/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11663/// additional enum variants at any time. Adding new variants is not considered
11664/// a breaking change. Applications should write their code in anticipation of:
11665///
11666/// - New values appearing in future releases of the client library, **and**
11667/// - New values received dynamically, without application changes.
11668///
11669/// Please consult the [Working with enums] section in the user guide for some
11670/// guidelines.
11671///
11672/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11673#[derive(Clone, Debug, PartialEq)]
11674#[non_exhaustive]
11675pub enum AuthFailAction {
11676    /// Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed.
11677    Unspecified,
11678    /// Redirects user to "accounts.google.com". The user is redirected back to the
11679    /// application URL after signing in or creating an account.
11680    Redirect,
11681    /// Rejects request with a `401` HTTP status code and an error
11682    /// message.
11683    Unauthorized,
11684    /// If set, the enum was initialized with an unknown value.
11685    ///
11686    /// Applications can examine the value using [AuthFailAction::value] or
11687    /// [AuthFailAction::name].
11688    UnknownValue(auth_fail_action::UnknownValue),
11689}
11690
11691#[doc(hidden)]
11692pub mod auth_fail_action {
11693    #[allow(unused_imports)]
11694    use super::*;
11695    #[derive(Clone, Debug, PartialEq)]
11696    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11697}
11698
11699impl AuthFailAction {
11700    /// Gets the enum value.
11701    ///
11702    /// Returns `None` if the enum contains an unknown value deserialized from
11703    /// the string representation of enums.
11704    pub fn value(&self) -> std::option::Option<i32> {
11705        match self {
11706            Self::Unspecified => std::option::Option::Some(0),
11707            Self::Redirect => std::option::Option::Some(1),
11708            Self::Unauthorized => std::option::Option::Some(2),
11709            Self::UnknownValue(u) => u.0.value(),
11710        }
11711    }
11712
11713    /// Gets the enum value as a string.
11714    ///
11715    /// Returns `None` if the enum contains an unknown value deserialized from
11716    /// the integer representation of enums.
11717    pub fn name(&self) -> std::option::Option<&str> {
11718        match self {
11719            Self::Unspecified => std::option::Option::Some("AUTH_FAIL_ACTION_UNSPECIFIED"),
11720            Self::Redirect => std::option::Option::Some("AUTH_FAIL_ACTION_REDIRECT"),
11721            Self::Unauthorized => std::option::Option::Some("AUTH_FAIL_ACTION_UNAUTHORIZED"),
11722            Self::UnknownValue(u) => u.0.name(),
11723        }
11724    }
11725}
11726
11727impl std::default::Default for AuthFailAction {
11728    fn default() -> Self {
11729        use std::convert::From;
11730        Self::from(0)
11731    }
11732}
11733
11734impl std::fmt::Display for AuthFailAction {
11735    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11736        wkt::internal::display_enum(f, self.name(), self.value())
11737    }
11738}
11739
11740impl std::convert::From<i32> for AuthFailAction {
11741    fn from(value: i32) -> Self {
11742        match value {
11743            0 => Self::Unspecified,
11744            1 => Self::Redirect,
11745            2 => Self::Unauthorized,
11746            _ => Self::UnknownValue(auth_fail_action::UnknownValue(
11747                wkt::internal::UnknownEnumValue::Integer(value),
11748            )),
11749        }
11750    }
11751}
11752
11753impl std::convert::From<&str> for AuthFailAction {
11754    fn from(value: &str) -> Self {
11755        use std::string::ToString;
11756        match value {
11757            "AUTH_FAIL_ACTION_UNSPECIFIED" => Self::Unspecified,
11758            "AUTH_FAIL_ACTION_REDIRECT" => Self::Redirect,
11759            "AUTH_FAIL_ACTION_UNAUTHORIZED" => Self::Unauthorized,
11760            _ => Self::UnknownValue(auth_fail_action::UnknownValue(
11761                wkt::internal::UnknownEnumValue::String(value.to_string()),
11762            )),
11763        }
11764    }
11765}
11766
11767impl serde::ser::Serialize for AuthFailAction {
11768    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11769    where
11770        S: serde::Serializer,
11771    {
11772        match self {
11773            Self::Unspecified => serializer.serialize_i32(0),
11774            Self::Redirect => serializer.serialize_i32(1),
11775            Self::Unauthorized => serializer.serialize_i32(2),
11776            Self::UnknownValue(u) => u.0.serialize(serializer),
11777        }
11778    }
11779}
11780
11781impl<'de> serde::de::Deserialize<'de> for AuthFailAction {
11782    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11783    where
11784        D: serde::Deserializer<'de>,
11785    {
11786        deserializer.deserialize_any(wkt::internal::EnumVisitor::<AuthFailAction>::new(
11787            ".google.appengine.v1.AuthFailAction",
11788        ))
11789    }
11790}
11791
11792/// Methods to restrict access to a URL based on login status.
11793///
11794/// # Working with unknown values
11795///
11796/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11797/// additional enum variants at any time. Adding new variants is not considered
11798/// a breaking change. Applications should write their code in anticipation of:
11799///
11800/// - New values appearing in future releases of the client library, **and**
11801/// - New values received dynamically, without application changes.
11802///
11803/// Please consult the [Working with enums] section in the user guide for some
11804/// guidelines.
11805///
11806/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11807#[derive(Clone, Debug, PartialEq)]
11808#[non_exhaustive]
11809pub enum LoginRequirement {
11810    /// Not specified. `LOGIN_OPTIONAL` is assumed.
11811    LoginUnspecified,
11812    /// Does not require that the user is signed in.
11813    LoginOptional,
11814    /// If the user is not signed in, the `auth_fail_action` is taken.
11815    /// In addition, if the user is not an administrator for the
11816    /// application, they are given an error message regardless of
11817    /// `auth_fail_action`. If the user is an administrator, the handler
11818    /// proceeds.
11819    LoginAdmin,
11820    /// If the user has signed in, the handler proceeds normally. Otherwise, the
11821    /// auth_fail_action is taken.
11822    LoginRequired,
11823    /// If set, the enum was initialized with an unknown value.
11824    ///
11825    /// Applications can examine the value using [LoginRequirement::value] or
11826    /// [LoginRequirement::name].
11827    UnknownValue(login_requirement::UnknownValue),
11828}
11829
11830#[doc(hidden)]
11831pub mod login_requirement {
11832    #[allow(unused_imports)]
11833    use super::*;
11834    #[derive(Clone, Debug, PartialEq)]
11835    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11836}
11837
11838impl LoginRequirement {
11839    /// Gets the enum value.
11840    ///
11841    /// Returns `None` if the enum contains an unknown value deserialized from
11842    /// the string representation of enums.
11843    pub fn value(&self) -> std::option::Option<i32> {
11844        match self {
11845            Self::LoginUnspecified => std::option::Option::Some(0),
11846            Self::LoginOptional => std::option::Option::Some(1),
11847            Self::LoginAdmin => std::option::Option::Some(2),
11848            Self::LoginRequired => std::option::Option::Some(3),
11849            Self::UnknownValue(u) => u.0.value(),
11850        }
11851    }
11852
11853    /// Gets the enum value as a string.
11854    ///
11855    /// Returns `None` if the enum contains an unknown value deserialized from
11856    /// the integer representation of enums.
11857    pub fn name(&self) -> std::option::Option<&str> {
11858        match self {
11859            Self::LoginUnspecified => std::option::Option::Some("LOGIN_UNSPECIFIED"),
11860            Self::LoginOptional => std::option::Option::Some("LOGIN_OPTIONAL"),
11861            Self::LoginAdmin => std::option::Option::Some("LOGIN_ADMIN"),
11862            Self::LoginRequired => std::option::Option::Some("LOGIN_REQUIRED"),
11863            Self::UnknownValue(u) => u.0.name(),
11864        }
11865    }
11866}
11867
11868impl std::default::Default for LoginRequirement {
11869    fn default() -> Self {
11870        use std::convert::From;
11871        Self::from(0)
11872    }
11873}
11874
11875impl std::fmt::Display for LoginRequirement {
11876    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11877        wkt::internal::display_enum(f, self.name(), self.value())
11878    }
11879}
11880
11881impl std::convert::From<i32> for LoginRequirement {
11882    fn from(value: i32) -> Self {
11883        match value {
11884            0 => Self::LoginUnspecified,
11885            1 => Self::LoginOptional,
11886            2 => Self::LoginAdmin,
11887            3 => Self::LoginRequired,
11888            _ => Self::UnknownValue(login_requirement::UnknownValue(
11889                wkt::internal::UnknownEnumValue::Integer(value),
11890            )),
11891        }
11892    }
11893}
11894
11895impl std::convert::From<&str> for LoginRequirement {
11896    fn from(value: &str) -> Self {
11897        use std::string::ToString;
11898        match value {
11899            "LOGIN_UNSPECIFIED" => Self::LoginUnspecified,
11900            "LOGIN_OPTIONAL" => Self::LoginOptional,
11901            "LOGIN_ADMIN" => Self::LoginAdmin,
11902            "LOGIN_REQUIRED" => Self::LoginRequired,
11903            _ => Self::UnknownValue(login_requirement::UnknownValue(
11904                wkt::internal::UnknownEnumValue::String(value.to_string()),
11905            )),
11906        }
11907    }
11908}
11909
11910impl serde::ser::Serialize for LoginRequirement {
11911    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11912    where
11913        S: serde::Serializer,
11914    {
11915        match self {
11916            Self::LoginUnspecified => serializer.serialize_i32(0),
11917            Self::LoginOptional => serializer.serialize_i32(1),
11918            Self::LoginAdmin => serializer.serialize_i32(2),
11919            Self::LoginRequired => serializer.serialize_i32(3),
11920            Self::UnknownValue(u) => u.0.serialize(serializer),
11921        }
11922    }
11923}
11924
11925impl<'de> serde::de::Deserialize<'de> for LoginRequirement {
11926    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11927    where
11928        D: serde::Deserializer<'de>,
11929    {
11930        deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoginRequirement>::new(
11931            ".google.appengine.v1.LoginRequirement",
11932        ))
11933    }
11934}
11935
11936/// Methods to enforce security (HTTPS) on a URL.
11937///
11938/// # Working with unknown values
11939///
11940/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11941/// additional enum variants at any time. Adding new variants is not considered
11942/// a breaking change. Applications should write their code in anticipation of:
11943///
11944/// - New values appearing in future releases of the client library, **and**
11945/// - New values received dynamically, without application changes.
11946///
11947/// Please consult the [Working with enums] section in the user guide for some
11948/// guidelines.
11949///
11950/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11951#[derive(Clone, Debug, PartialEq)]
11952#[non_exhaustive]
11953pub enum SecurityLevel {
11954    /// Not specified.
11955    SecureUnspecified,
11956    /// Both HTTP and HTTPS requests with URLs that match the handler succeed
11957    /// without redirects. The application can examine the request to determine
11958    /// which protocol was used, and respond accordingly.
11959    SecureDefault,
11960    /// Requests for a URL that match this handler that use HTTPS are automatically
11961    /// redirected to the HTTP equivalent URL.
11962    SecureNever,
11963    /// Both HTTP and HTTPS requests with URLs that match the handler succeed
11964    /// without redirects. The application can examine the request to determine
11965    /// which protocol was used and respond accordingly.
11966    SecureOptional,
11967    /// Requests for a URL that match this handler that do not use HTTPS are
11968    /// automatically redirected to the HTTPS URL with the same path. Query
11969    /// parameters are reserved for the redirect.
11970    SecureAlways,
11971    /// If set, the enum was initialized with an unknown value.
11972    ///
11973    /// Applications can examine the value using [SecurityLevel::value] or
11974    /// [SecurityLevel::name].
11975    UnknownValue(security_level::UnknownValue),
11976}
11977
11978#[doc(hidden)]
11979pub mod security_level {
11980    #[allow(unused_imports)]
11981    use super::*;
11982    #[derive(Clone, Debug, PartialEq)]
11983    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11984}
11985
11986impl SecurityLevel {
11987    /// Gets the enum value.
11988    ///
11989    /// Returns `None` if the enum contains an unknown value deserialized from
11990    /// the string representation of enums.
11991    pub fn value(&self) -> std::option::Option<i32> {
11992        match self {
11993            Self::SecureUnspecified => std::option::Option::Some(0),
11994            Self::SecureDefault => std::option::Option::Some(0),
11995            Self::SecureNever => std::option::Option::Some(1),
11996            Self::SecureOptional => std::option::Option::Some(2),
11997            Self::SecureAlways => std::option::Option::Some(3),
11998            Self::UnknownValue(u) => u.0.value(),
11999        }
12000    }
12001
12002    /// Gets the enum value as a string.
12003    ///
12004    /// Returns `None` if the enum contains an unknown value deserialized from
12005    /// the integer representation of enums.
12006    pub fn name(&self) -> std::option::Option<&str> {
12007        match self {
12008            Self::SecureUnspecified => std::option::Option::Some("SECURE_UNSPECIFIED"),
12009            Self::SecureDefault => std::option::Option::Some("SECURE_DEFAULT"),
12010            Self::SecureNever => std::option::Option::Some("SECURE_NEVER"),
12011            Self::SecureOptional => std::option::Option::Some("SECURE_OPTIONAL"),
12012            Self::SecureAlways => std::option::Option::Some("SECURE_ALWAYS"),
12013            Self::UnknownValue(u) => u.0.name(),
12014        }
12015    }
12016}
12017
12018impl std::default::Default for SecurityLevel {
12019    fn default() -> Self {
12020        use std::convert::From;
12021        Self::from(0)
12022    }
12023}
12024
12025impl std::fmt::Display for SecurityLevel {
12026    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12027        wkt::internal::display_enum(f, self.name(), self.value())
12028    }
12029}
12030
12031impl std::convert::From<i32> for SecurityLevel {
12032    fn from(value: i32) -> Self {
12033        match value {
12034            0 => Self::SecureDefault,
12035            1 => Self::SecureNever,
12036            2 => Self::SecureOptional,
12037            3 => Self::SecureAlways,
12038            _ => Self::UnknownValue(security_level::UnknownValue(
12039                wkt::internal::UnknownEnumValue::Integer(value),
12040            )),
12041        }
12042    }
12043}
12044
12045impl std::convert::From<&str> for SecurityLevel {
12046    fn from(value: &str) -> Self {
12047        use std::string::ToString;
12048        match value {
12049            "SECURE_UNSPECIFIED" => Self::SecureUnspecified,
12050            "SECURE_DEFAULT" => Self::SecureDefault,
12051            "SECURE_NEVER" => Self::SecureNever,
12052            "SECURE_OPTIONAL" => Self::SecureOptional,
12053            "SECURE_ALWAYS" => Self::SecureAlways,
12054            _ => Self::UnknownValue(security_level::UnknownValue(
12055                wkt::internal::UnknownEnumValue::String(value.to_string()),
12056            )),
12057        }
12058    }
12059}
12060
12061impl serde::ser::Serialize for SecurityLevel {
12062    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12063    where
12064        S: serde::Serializer,
12065    {
12066        match self {
12067            Self::SecureUnspecified => serializer.serialize_i32(0),
12068            Self::SecureDefault => serializer.serialize_i32(0),
12069            Self::SecureNever => serializer.serialize_i32(1),
12070            Self::SecureOptional => serializer.serialize_i32(2),
12071            Self::SecureAlways => serializer.serialize_i32(3),
12072            Self::UnknownValue(u) => u.0.serialize(serializer),
12073        }
12074    }
12075}
12076
12077impl<'de> serde::de::Deserialize<'de> for SecurityLevel {
12078    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12079    where
12080        D: serde::Deserializer<'de>,
12081    {
12082        deserializer.deserialize_any(wkt::internal::EnumVisitor::<SecurityLevel>::new(
12083            ".google.appengine.v1.SecurityLevel",
12084        ))
12085    }
12086}
12087
12088/// Fields that should be returned when [Version][google.appengine.v1.Version] resources
12089/// are retrieved.
12090///
12091/// [google.appengine.v1.Version]: crate::model::Version
12092///
12093/// # Working with unknown values
12094///
12095/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12096/// additional enum variants at any time. Adding new variants is not considered
12097/// a breaking change. Applications should write their code in anticipation of:
12098///
12099/// - New values appearing in future releases of the client library, **and**
12100/// - New values received dynamically, without application changes.
12101///
12102/// Please consult the [Working with enums] section in the user guide for some
12103/// guidelines.
12104///
12105/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12106#[derive(Clone, Debug, PartialEq)]
12107#[non_exhaustive]
12108pub enum VersionView {
12109    /// Basic version information including scaling and inbound services,
12110    /// but not detailed deployment information.
12111    Basic,
12112    /// The information from `BASIC`, plus detailed information about the
12113    /// deployment. This format is required when creating resources, but
12114    /// is not returned in `Get` or `List` by default.
12115    Full,
12116    /// If set, the enum was initialized with an unknown value.
12117    ///
12118    /// Applications can examine the value using [VersionView::value] or
12119    /// [VersionView::name].
12120    UnknownValue(version_view::UnknownValue),
12121}
12122
12123#[doc(hidden)]
12124pub mod version_view {
12125    #[allow(unused_imports)]
12126    use super::*;
12127    #[derive(Clone, Debug, PartialEq)]
12128    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12129}
12130
12131impl VersionView {
12132    /// Gets the enum value.
12133    ///
12134    /// Returns `None` if the enum contains an unknown value deserialized from
12135    /// the string representation of enums.
12136    pub fn value(&self) -> std::option::Option<i32> {
12137        match self {
12138            Self::Basic => std::option::Option::Some(0),
12139            Self::Full => std::option::Option::Some(1),
12140            Self::UnknownValue(u) => u.0.value(),
12141        }
12142    }
12143
12144    /// Gets the enum value as a string.
12145    ///
12146    /// Returns `None` if the enum contains an unknown value deserialized from
12147    /// the integer representation of enums.
12148    pub fn name(&self) -> std::option::Option<&str> {
12149        match self {
12150            Self::Basic => std::option::Option::Some("BASIC"),
12151            Self::Full => std::option::Option::Some("FULL"),
12152            Self::UnknownValue(u) => u.0.name(),
12153        }
12154    }
12155}
12156
12157impl std::default::Default for VersionView {
12158    fn default() -> Self {
12159        use std::convert::From;
12160        Self::from(0)
12161    }
12162}
12163
12164impl std::fmt::Display for VersionView {
12165    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12166        wkt::internal::display_enum(f, self.name(), self.value())
12167    }
12168}
12169
12170impl std::convert::From<i32> for VersionView {
12171    fn from(value: i32) -> Self {
12172        match value {
12173            0 => Self::Basic,
12174            1 => Self::Full,
12175            _ => Self::UnknownValue(version_view::UnknownValue(
12176                wkt::internal::UnknownEnumValue::Integer(value),
12177            )),
12178        }
12179    }
12180}
12181
12182impl std::convert::From<&str> for VersionView {
12183    fn from(value: &str) -> Self {
12184        use std::string::ToString;
12185        match value {
12186            "BASIC" => Self::Basic,
12187            "FULL" => Self::Full,
12188            _ => Self::UnknownValue(version_view::UnknownValue(
12189                wkt::internal::UnknownEnumValue::String(value.to_string()),
12190            )),
12191        }
12192    }
12193}
12194
12195impl serde::ser::Serialize for VersionView {
12196    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12197    where
12198        S: serde::Serializer,
12199    {
12200        match self {
12201            Self::Basic => serializer.serialize_i32(0),
12202            Self::Full => serializer.serialize_i32(1),
12203            Self::UnknownValue(u) => u.0.serialize(serializer),
12204        }
12205    }
12206}
12207
12208impl<'de> serde::de::Deserialize<'de> for VersionView {
12209    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12210    where
12211        D: serde::Deserializer<'de>,
12212    {
12213        deserializer.deserialize_any(wkt::internal::EnumVisitor::<VersionView>::new(
12214            ".google.appengine.v1.VersionView",
12215        ))
12216    }
12217}
12218
12219/// Fields that should be returned when an AuthorizedCertificate resource is
12220/// retrieved.
12221///
12222/// # Working with unknown values
12223///
12224/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12225/// additional enum variants at any time. Adding new variants is not considered
12226/// a breaking change. Applications should write their code in anticipation of:
12227///
12228/// - New values appearing in future releases of the client library, **and**
12229/// - New values received dynamically, without application changes.
12230///
12231/// Please consult the [Working with enums] section in the user guide for some
12232/// guidelines.
12233///
12234/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12235#[derive(Clone, Debug, PartialEq)]
12236#[non_exhaustive]
12237pub enum AuthorizedCertificateView {
12238    /// Basic certificate information, including applicable domains and expiration
12239    /// date.
12240    BasicCertificate,
12241    /// The information from `BASIC_CERTIFICATE`, plus detailed information on the
12242    /// domain mappings that have this certificate mapped.
12243    FullCertificate,
12244    /// If set, the enum was initialized with an unknown value.
12245    ///
12246    /// Applications can examine the value using [AuthorizedCertificateView::value] or
12247    /// [AuthorizedCertificateView::name].
12248    UnknownValue(authorized_certificate_view::UnknownValue),
12249}
12250
12251#[doc(hidden)]
12252pub mod authorized_certificate_view {
12253    #[allow(unused_imports)]
12254    use super::*;
12255    #[derive(Clone, Debug, PartialEq)]
12256    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12257}
12258
12259impl AuthorizedCertificateView {
12260    /// Gets the enum value.
12261    ///
12262    /// Returns `None` if the enum contains an unknown value deserialized from
12263    /// the string representation of enums.
12264    pub fn value(&self) -> std::option::Option<i32> {
12265        match self {
12266            Self::BasicCertificate => std::option::Option::Some(0),
12267            Self::FullCertificate => std::option::Option::Some(1),
12268            Self::UnknownValue(u) => u.0.value(),
12269        }
12270    }
12271
12272    /// Gets the enum value as a string.
12273    ///
12274    /// Returns `None` if the enum contains an unknown value deserialized from
12275    /// the integer representation of enums.
12276    pub fn name(&self) -> std::option::Option<&str> {
12277        match self {
12278            Self::BasicCertificate => std::option::Option::Some("BASIC_CERTIFICATE"),
12279            Self::FullCertificate => std::option::Option::Some("FULL_CERTIFICATE"),
12280            Self::UnknownValue(u) => u.0.name(),
12281        }
12282    }
12283}
12284
12285impl std::default::Default for AuthorizedCertificateView {
12286    fn default() -> Self {
12287        use std::convert::From;
12288        Self::from(0)
12289    }
12290}
12291
12292impl std::fmt::Display for AuthorizedCertificateView {
12293    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12294        wkt::internal::display_enum(f, self.name(), self.value())
12295    }
12296}
12297
12298impl std::convert::From<i32> for AuthorizedCertificateView {
12299    fn from(value: i32) -> Self {
12300        match value {
12301            0 => Self::BasicCertificate,
12302            1 => Self::FullCertificate,
12303            _ => Self::UnknownValue(authorized_certificate_view::UnknownValue(
12304                wkt::internal::UnknownEnumValue::Integer(value),
12305            )),
12306        }
12307    }
12308}
12309
12310impl std::convert::From<&str> for AuthorizedCertificateView {
12311    fn from(value: &str) -> Self {
12312        use std::string::ToString;
12313        match value {
12314            "BASIC_CERTIFICATE" => Self::BasicCertificate,
12315            "FULL_CERTIFICATE" => Self::FullCertificate,
12316            _ => Self::UnknownValue(authorized_certificate_view::UnknownValue(
12317                wkt::internal::UnknownEnumValue::String(value.to_string()),
12318            )),
12319        }
12320    }
12321}
12322
12323impl serde::ser::Serialize for AuthorizedCertificateView {
12324    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12325    where
12326        S: serde::Serializer,
12327    {
12328        match self {
12329            Self::BasicCertificate => serializer.serialize_i32(0),
12330            Self::FullCertificate => serializer.serialize_i32(1),
12331            Self::UnknownValue(u) => u.0.serialize(serializer),
12332        }
12333    }
12334}
12335
12336impl<'de> serde::de::Deserialize<'de> for AuthorizedCertificateView {
12337    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12338    where
12339        D: serde::Deserializer<'de>,
12340    {
12341        deserializer.deserialize_any(
12342            wkt::internal::EnumVisitor::<AuthorizedCertificateView>::new(
12343                ".google.appengine.v1.AuthorizedCertificateView",
12344            ),
12345        )
12346    }
12347}
12348
12349/// Override strategy for mutating an existing mapping.
12350///
12351/// # Working with unknown values
12352///
12353/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12354/// additional enum variants at any time. Adding new variants is not considered
12355/// a breaking change. Applications should write their code in anticipation of:
12356///
12357/// - New values appearing in future releases of the client library, **and**
12358/// - New values received dynamically, without application changes.
12359///
12360/// Please consult the [Working with enums] section in the user guide for some
12361/// guidelines.
12362///
12363/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12364#[derive(Clone, Debug, PartialEq)]
12365#[non_exhaustive]
12366pub enum DomainOverrideStrategy {
12367    /// Strategy unspecified. Defaults to `STRICT`.
12368    UnspecifiedDomainOverrideStrategy,
12369    /// Overrides not allowed. If a mapping already exists for the
12370    /// specified domain, the request will return an ALREADY_EXISTS (409).
12371    Strict,
12372    /// Overrides allowed. If a mapping already exists for the specified domain,
12373    /// the request will overwrite it. Note that this might stop another
12374    /// Google product from serving. For example, if the domain is
12375    /// mapped to another App Engine application, that app will no
12376    /// longer serve from that domain.
12377    Override,
12378    /// If set, the enum was initialized with an unknown value.
12379    ///
12380    /// Applications can examine the value using [DomainOverrideStrategy::value] or
12381    /// [DomainOverrideStrategy::name].
12382    UnknownValue(domain_override_strategy::UnknownValue),
12383}
12384
12385#[doc(hidden)]
12386pub mod domain_override_strategy {
12387    #[allow(unused_imports)]
12388    use super::*;
12389    #[derive(Clone, Debug, PartialEq)]
12390    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12391}
12392
12393impl DomainOverrideStrategy {
12394    /// Gets the enum value.
12395    ///
12396    /// Returns `None` if the enum contains an unknown value deserialized from
12397    /// the string representation of enums.
12398    pub fn value(&self) -> std::option::Option<i32> {
12399        match self {
12400            Self::UnspecifiedDomainOverrideStrategy => std::option::Option::Some(0),
12401            Self::Strict => std::option::Option::Some(1),
12402            Self::Override => std::option::Option::Some(2),
12403            Self::UnknownValue(u) => u.0.value(),
12404        }
12405    }
12406
12407    /// Gets the enum value as a string.
12408    ///
12409    /// Returns `None` if the enum contains an unknown value deserialized from
12410    /// the integer representation of enums.
12411    pub fn name(&self) -> std::option::Option<&str> {
12412        match self {
12413            Self::UnspecifiedDomainOverrideStrategy => {
12414                std::option::Option::Some("UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY")
12415            }
12416            Self::Strict => std::option::Option::Some("STRICT"),
12417            Self::Override => std::option::Option::Some("OVERRIDE"),
12418            Self::UnknownValue(u) => u.0.name(),
12419        }
12420    }
12421}
12422
12423impl std::default::Default for DomainOverrideStrategy {
12424    fn default() -> Self {
12425        use std::convert::From;
12426        Self::from(0)
12427    }
12428}
12429
12430impl std::fmt::Display for DomainOverrideStrategy {
12431    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12432        wkt::internal::display_enum(f, self.name(), self.value())
12433    }
12434}
12435
12436impl std::convert::From<i32> for DomainOverrideStrategy {
12437    fn from(value: i32) -> Self {
12438        match value {
12439            0 => Self::UnspecifiedDomainOverrideStrategy,
12440            1 => Self::Strict,
12441            2 => Self::Override,
12442            _ => Self::UnknownValue(domain_override_strategy::UnknownValue(
12443                wkt::internal::UnknownEnumValue::Integer(value),
12444            )),
12445        }
12446    }
12447}
12448
12449impl std::convert::From<&str> for DomainOverrideStrategy {
12450    fn from(value: &str) -> Self {
12451        use std::string::ToString;
12452        match value {
12453            "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY" => Self::UnspecifiedDomainOverrideStrategy,
12454            "STRICT" => Self::Strict,
12455            "OVERRIDE" => Self::Override,
12456            _ => Self::UnknownValue(domain_override_strategy::UnknownValue(
12457                wkt::internal::UnknownEnumValue::String(value.to_string()),
12458            )),
12459        }
12460    }
12461}
12462
12463impl serde::ser::Serialize for DomainOverrideStrategy {
12464    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12465    where
12466        S: serde::Serializer,
12467    {
12468        match self {
12469            Self::UnspecifiedDomainOverrideStrategy => serializer.serialize_i32(0),
12470            Self::Strict => serializer.serialize_i32(1),
12471            Self::Override => serializer.serialize_i32(2),
12472            Self::UnknownValue(u) => u.0.serialize(serializer),
12473        }
12474    }
12475}
12476
12477impl<'de> serde::de::Deserialize<'de> for DomainOverrideStrategy {
12478    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12479    where
12480        D: serde::Deserializer<'de>,
12481    {
12482        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DomainOverrideStrategy>::new(
12483            ".google.appengine.v1.DomainOverrideStrategy",
12484        ))
12485    }
12486}
12487
12488/// State of certificate management. Refers to the most recent certificate
12489/// acquisition or renewal attempt.
12490///
12491/// # Working with unknown values
12492///
12493/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12494/// additional enum variants at any time. Adding new variants is not considered
12495/// a breaking change. Applications should write their code in anticipation of:
12496///
12497/// - New values appearing in future releases of the client library, **and**
12498/// - New values received dynamically, without application changes.
12499///
12500/// Please consult the [Working with enums] section in the user guide for some
12501/// guidelines.
12502///
12503/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12504#[derive(Clone, Debug, PartialEq)]
12505#[non_exhaustive]
12506pub enum ManagementStatus {
12507    Unspecified,
12508    /// Certificate was successfully obtained and inserted into the serving
12509    /// system.
12510    Ok,
12511    /// Certificate is under active attempts to acquire or renew.
12512    Pending,
12513    /// Most recent renewal failed due to an invalid DNS setup and will be
12514    /// retried. Renewal attempts will continue to fail until the certificate
12515    /// domain's DNS configuration is fixed. The last successfully provisioned
12516    /// certificate may still be serving.
12517    FailedRetryingNotVisible,
12518    /// All renewal attempts have been exhausted, likely due to an invalid DNS
12519    /// setup.
12520    FailedPermanent,
12521    /// Most recent renewal failed due to an explicit CAA record that does not
12522    /// include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will
12523    /// continue to fail until the CAA is reconfigured. The last successfully
12524    /// provisioned certificate may still be serving.
12525    FailedRetryingCaaForbidden,
12526    /// Most recent renewal failed due to a CAA retrieval failure. This means that
12527    /// the domain's DNS provider does not properly handle CAA records, failing
12528    /// requests for CAA records when no CAA records are defined. Renewals will
12529    /// continue to fail until the DNS provider is changed or a CAA record is
12530    /// added for the given domain. The last successfully provisioned certificate
12531    /// may still be serving.
12532    FailedRetryingCaaChecking,
12533    /// If set, the enum was initialized with an unknown value.
12534    ///
12535    /// Applications can examine the value using [ManagementStatus::value] or
12536    /// [ManagementStatus::name].
12537    UnknownValue(management_status::UnknownValue),
12538}
12539
12540#[doc(hidden)]
12541pub mod management_status {
12542    #[allow(unused_imports)]
12543    use super::*;
12544    #[derive(Clone, Debug, PartialEq)]
12545    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12546}
12547
12548impl ManagementStatus {
12549    /// Gets the enum value.
12550    ///
12551    /// Returns `None` if the enum contains an unknown value deserialized from
12552    /// the string representation of enums.
12553    pub fn value(&self) -> std::option::Option<i32> {
12554        match self {
12555            Self::Unspecified => std::option::Option::Some(0),
12556            Self::Ok => std::option::Option::Some(1),
12557            Self::Pending => std::option::Option::Some(2),
12558            Self::FailedRetryingNotVisible => std::option::Option::Some(4),
12559            Self::FailedPermanent => std::option::Option::Some(6),
12560            Self::FailedRetryingCaaForbidden => std::option::Option::Some(7),
12561            Self::FailedRetryingCaaChecking => std::option::Option::Some(8),
12562            Self::UnknownValue(u) => u.0.value(),
12563        }
12564    }
12565
12566    /// Gets the enum value as a string.
12567    ///
12568    /// Returns `None` if the enum contains an unknown value deserialized from
12569    /// the integer representation of enums.
12570    pub fn name(&self) -> std::option::Option<&str> {
12571        match self {
12572            Self::Unspecified => std::option::Option::Some("MANAGEMENT_STATUS_UNSPECIFIED"),
12573            Self::Ok => std::option::Option::Some("OK"),
12574            Self::Pending => std::option::Option::Some("PENDING"),
12575            Self::FailedRetryingNotVisible => {
12576                std::option::Option::Some("FAILED_RETRYING_NOT_VISIBLE")
12577            }
12578            Self::FailedPermanent => std::option::Option::Some("FAILED_PERMANENT"),
12579            Self::FailedRetryingCaaForbidden => {
12580                std::option::Option::Some("FAILED_RETRYING_CAA_FORBIDDEN")
12581            }
12582            Self::FailedRetryingCaaChecking => {
12583                std::option::Option::Some("FAILED_RETRYING_CAA_CHECKING")
12584            }
12585            Self::UnknownValue(u) => u.0.name(),
12586        }
12587    }
12588}
12589
12590impl std::default::Default for ManagementStatus {
12591    fn default() -> Self {
12592        use std::convert::From;
12593        Self::from(0)
12594    }
12595}
12596
12597impl std::fmt::Display for ManagementStatus {
12598    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12599        wkt::internal::display_enum(f, self.name(), self.value())
12600    }
12601}
12602
12603impl std::convert::From<i32> for ManagementStatus {
12604    fn from(value: i32) -> Self {
12605        match value {
12606            0 => Self::Unspecified,
12607            1 => Self::Ok,
12608            2 => Self::Pending,
12609            4 => Self::FailedRetryingNotVisible,
12610            6 => Self::FailedPermanent,
12611            7 => Self::FailedRetryingCaaForbidden,
12612            8 => Self::FailedRetryingCaaChecking,
12613            _ => Self::UnknownValue(management_status::UnknownValue(
12614                wkt::internal::UnknownEnumValue::Integer(value),
12615            )),
12616        }
12617    }
12618}
12619
12620impl std::convert::From<&str> for ManagementStatus {
12621    fn from(value: &str) -> Self {
12622        use std::string::ToString;
12623        match value {
12624            "MANAGEMENT_STATUS_UNSPECIFIED" => Self::Unspecified,
12625            "OK" => Self::Ok,
12626            "PENDING" => Self::Pending,
12627            "FAILED_RETRYING_NOT_VISIBLE" => Self::FailedRetryingNotVisible,
12628            "FAILED_PERMANENT" => Self::FailedPermanent,
12629            "FAILED_RETRYING_CAA_FORBIDDEN" => Self::FailedRetryingCaaForbidden,
12630            "FAILED_RETRYING_CAA_CHECKING" => Self::FailedRetryingCaaChecking,
12631            _ => Self::UnknownValue(management_status::UnknownValue(
12632                wkt::internal::UnknownEnumValue::String(value.to_string()),
12633            )),
12634        }
12635    }
12636}
12637
12638impl serde::ser::Serialize for ManagementStatus {
12639    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12640    where
12641        S: serde::Serializer,
12642    {
12643        match self {
12644            Self::Unspecified => serializer.serialize_i32(0),
12645            Self::Ok => serializer.serialize_i32(1),
12646            Self::Pending => serializer.serialize_i32(2),
12647            Self::FailedRetryingNotVisible => serializer.serialize_i32(4),
12648            Self::FailedPermanent => serializer.serialize_i32(6),
12649            Self::FailedRetryingCaaForbidden => serializer.serialize_i32(7),
12650            Self::FailedRetryingCaaChecking => serializer.serialize_i32(8),
12651            Self::UnknownValue(u) => u.0.serialize(serializer),
12652        }
12653    }
12654}
12655
12656impl<'de> serde::de::Deserialize<'de> for ManagementStatus {
12657    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12658    where
12659        D: serde::Deserializer<'de>,
12660    {
12661        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ManagementStatus>::new(
12662            ".google.appengine.v1.ManagementStatus",
12663        ))
12664    }
12665}
12666
12667/// Available inbound services.
12668///
12669/// # Working with unknown values
12670///
12671/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12672/// additional enum variants at any time. Adding new variants is not considered
12673/// a breaking change. Applications should write their code in anticipation of:
12674///
12675/// - New values appearing in future releases of the client library, **and**
12676/// - New values received dynamically, without application changes.
12677///
12678/// Please consult the [Working with enums] section in the user guide for some
12679/// guidelines.
12680///
12681/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12682#[derive(Clone, Debug, PartialEq)]
12683#[non_exhaustive]
12684pub enum InboundServiceType {
12685    /// Not specified.
12686    InboundServiceUnspecified,
12687    /// Allows an application to receive mail.
12688    InboundServiceMail,
12689    /// Allows an application to receive email-bound notifications.
12690    InboundServiceMailBounce,
12691    /// Allows an application to receive error stanzas.
12692    InboundServiceXmppError,
12693    /// Allows an application to receive instant messages.
12694    InboundServiceXmppMessage,
12695    /// Allows an application to receive user subscription POSTs.
12696    InboundServiceXmppSubscribe,
12697    /// Allows an application to receive a user's chat presence.
12698    InboundServiceXmppPresence,
12699    /// Registers an application for notifications when a client connects or
12700    /// disconnects from a channel.
12701    InboundServiceChannelPresence,
12702    /// Enables warmup requests.
12703    InboundServiceWarmup,
12704    /// If set, the enum was initialized with an unknown value.
12705    ///
12706    /// Applications can examine the value using [InboundServiceType::value] or
12707    /// [InboundServiceType::name].
12708    UnknownValue(inbound_service_type::UnknownValue),
12709}
12710
12711#[doc(hidden)]
12712pub mod inbound_service_type {
12713    #[allow(unused_imports)]
12714    use super::*;
12715    #[derive(Clone, Debug, PartialEq)]
12716    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12717}
12718
12719impl InboundServiceType {
12720    /// Gets the enum value.
12721    ///
12722    /// Returns `None` if the enum contains an unknown value deserialized from
12723    /// the string representation of enums.
12724    pub fn value(&self) -> std::option::Option<i32> {
12725        match self {
12726            Self::InboundServiceUnspecified => std::option::Option::Some(0),
12727            Self::InboundServiceMail => std::option::Option::Some(1),
12728            Self::InboundServiceMailBounce => std::option::Option::Some(2),
12729            Self::InboundServiceXmppError => std::option::Option::Some(3),
12730            Self::InboundServiceXmppMessage => std::option::Option::Some(4),
12731            Self::InboundServiceXmppSubscribe => std::option::Option::Some(5),
12732            Self::InboundServiceXmppPresence => std::option::Option::Some(6),
12733            Self::InboundServiceChannelPresence => std::option::Option::Some(7),
12734            Self::InboundServiceWarmup => std::option::Option::Some(9),
12735            Self::UnknownValue(u) => u.0.value(),
12736        }
12737    }
12738
12739    /// Gets the enum value as a string.
12740    ///
12741    /// Returns `None` if the enum contains an unknown value deserialized from
12742    /// the integer representation of enums.
12743    pub fn name(&self) -> std::option::Option<&str> {
12744        match self {
12745            Self::InboundServiceUnspecified => {
12746                std::option::Option::Some("INBOUND_SERVICE_UNSPECIFIED")
12747            }
12748            Self::InboundServiceMail => std::option::Option::Some("INBOUND_SERVICE_MAIL"),
12749            Self::InboundServiceMailBounce => {
12750                std::option::Option::Some("INBOUND_SERVICE_MAIL_BOUNCE")
12751            }
12752            Self::InboundServiceXmppError => {
12753                std::option::Option::Some("INBOUND_SERVICE_XMPP_ERROR")
12754            }
12755            Self::InboundServiceXmppMessage => {
12756                std::option::Option::Some("INBOUND_SERVICE_XMPP_MESSAGE")
12757            }
12758            Self::InboundServiceXmppSubscribe => {
12759                std::option::Option::Some("INBOUND_SERVICE_XMPP_SUBSCRIBE")
12760            }
12761            Self::InboundServiceXmppPresence => {
12762                std::option::Option::Some("INBOUND_SERVICE_XMPP_PRESENCE")
12763            }
12764            Self::InboundServiceChannelPresence => {
12765                std::option::Option::Some("INBOUND_SERVICE_CHANNEL_PRESENCE")
12766            }
12767            Self::InboundServiceWarmup => std::option::Option::Some("INBOUND_SERVICE_WARMUP"),
12768            Self::UnknownValue(u) => u.0.name(),
12769        }
12770    }
12771}
12772
12773impl std::default::Default for InboundServiceType {
12774    fn default() -> Self {
12775        use std::convert::From;
12776        Self::from(0)
12777    }
12778}
12779
12780impl std::fmt::Display for InboundServiceType {
12781    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12782        wkt::internal::display_enum(f, self.name(), self.value())
12783    }
12784}
12785
12786impl std::convert::From<i32> for InboundServiceType {
12787    fn from(value: i32) -> Self {
12788        match value {
12789            0 => Self::InboundServiceUnspecified,
12790            1 => Self::InboundServiceMail,
12791            2 => Self::InboundServiceMailBounce,
12792            3 => Self::InboundServiceXmppError,
12793            4 => Self::InboundServiceXmppMessage,
12794            5 => Self::InboundServiceXmppSubscribe,
12795            6 => Self::InboundServiceXmppPresence,
12796            7 => Self::InboundServiceChannelPresence,
12797            9 => Self::InboundServiceWarmup,
12798            _ => Self::UnknownValue(inbound_service_type::UnknownValue(
12799                wkt::internal::UnknownEnumValue::Integer(value),
12800            )),
12801        }
12802    }
12803}
12804
12805impl std::convert::From<&str> for InboundServiceType {
12806    fn from(value: &str) -> Self {
12807        use std::string::ToString;
12808        match value {
12809            "INBOUND_SERVICE_UNSPECIFIED" => Self::InboundServiceUnspecified,
12810            "INBOUND_SERVICE_MAIL" => Self::InboundServiceMail,
12811            "INBOUND_SERVICE_MAIL_BOUNCE" => Self::InboundServiceMailBounce,
12812            "INBOUND_SERVICE_XMPP_ERROR" => Self::InboundServiceXmppError,
12813            "INBOUND_SERVICE_XMPP_MESSAGE" => Self::InboundServiceXmppMessage,
12814            "INBOUND_SERVICE_XMPP_SUBSCRIBE" => Self::InboundServiceXmppSubscribe,
12815            "INBOUND_SERVICE_XMPP_PRESENCE" => Self::InboundServiceXmppPresence,
12816            "INBOUND_SERVICE_CHANNEL_PRESENCE" => Self::InboundServiceChannelPresence,
12817            "INBOUND_SERVICE_WARMUP" => Self::InboundServiceWarmup,
12818            _ => Self::UnknownValue(inbound_service_type::UnknownValue(
12819                wkt::internal::UnknownEnumValue::String(value.to_string()),
12820            )),
12821        }
12822    }
12823}
12824
12825impl serde::ser::Serialize for InboundServiceType {
12826    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12827    where
12828        S: serde::Serializer,
12829    {
12830        match self {
12831            Self::InboundServiceUnspecified => serializer.serialize_i32(0),
12832            Self::InboundServiceMail => serializer.serialize_i32(1),
12833            Self::InboundServiceMailBounce => serializer.serialize_i32(2),
12834            Self::InboundServiceXmppError => serializer.serialize_i32(3),
12835            Self::InboundServiceXmppMessage => serializer.serialize_i32(4),
12836            Self::InboundServiceXmppSubscribe => serializer.serialize_i32(5),
12837            Self::InboundServiceXmppPresence => serializer.serialize_i32(6),
12838            Self::InboundServiceChannelPresence => serializer.serialize_i32(7),
12839            Self::InboundServiceWarmup => serializer.serialize_i32(9),
12840            Self::UnknownValue(u) => u.0.serialize(serializer),
12841        }
12842    }
12843}
12844
12845impl<'de> serde::de::Deserialize<'de> for InboundServiceType {
12846    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12847    where
12848        D: serde::Deserializer<'de>,
12849    {
12850        deserializer.deserialize_any(wkt::internal::EnumVisitor::<InboundServiceType>::new(
12851            ".google.appengine.v1.InboundServiceType",
12852        ))
12853    }
12854}
12855
12856/// Run states of a version.
12857///
12858/// # Working with unknown values
12859///
12860/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12861/// additional enum variants at any time. Adding new variants is not considered
12862/// a breaking change. Applications should write their code in anticipation of:
12863///
12864/// - New values appearing in future releases of the client library, **and**
12865/// - New values received dynamically, without application changes.
12866///
12867/// Please consult the [Working with enums] section in the user guide for some
12868/// guidelines.
12869///
12870/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12871#[derive(Clone, Debug, PartialEq)]
12872#[non_exhaustive]
12873pub enum ServingStatus {
12874    /// Not specified.
12875    Unspecified,
12876    /// Currently serving. Instances are created according to the
12877    /// scaling settings of the version.
12878    Serving,
12879    /// Disabled. No instances will be created and the scaling
12880    /// settings are ignored until the state of the version changes
12881    /// to `SERVING`.
12882    Stopped,
12883    /// If set, the enum was initialized with an unknown value.
12884    ///
12885    /// Applications can examine the value using [ServingStatus::value] or
12886    /// [ServingStatus::name].
12887    UnknownValue(serving_status::UnknownValue),
12888}
12889
12890#[doc(hidden)]
12891pub mod serving_status {
12892    #[allow(unused_imports)]
12893    use super::*;
12894    #[derive(Clone, Debug, PartialEq)]
12895    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12896}
12897
12898impl ServingStatus {
12899    /// Gets the enum value.
12900    ///
12901    /// Returns `None` if the enum contains an unknown value deserialized from
12902    /// the string representation of enums.
12903    pub fn value(&self) -> std::option::Option<i32> {
12904        match self {
12905            Self::Unspecified => std::option::Option::Some(0),
12906            Self::Serving => std::option::Option::Some(1),
12907            Self::Stopped => std::option::Option::Some(2),
12908            Self::UnknownValue(u) => u.0.value(),
12909        }
12910    }
12911
12912    /// Gets the enum value as a string.
12913    ///
12914    /// Returns `None` if the enum contains an unknown value deserialized from
12915    /// the integer representation of enums.
12916    pub fn name(&self) -> std::option::Option<&str> {
12917        match self {
12918            Self::Unspecified => std::option::Option::Some("SERVING_STATUS_UNSPECIFIED"),
12919            Self::Serving => std::option::Option::Some("SERVING"),
12920            Self::Stopped => std::option::Option::Some("STOPPED"),
12921            Self::UnknownValue(u) => u.0.name(),
12922        }
12923    }
12924}
12925
12926impl std::default::Default for ServingStatus {
12927    fn default() -> Self {
12928        use std::convert::From;
12929        Self::from(0)
12930    }
12931}
12932
12933impl std::fmt::Display for ServingStatus {
12934    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12935        wkt::internal::display_enum(f, self.name(), self.value())
12936    }
12937}
12938
12939impl std::convert::From<i32> for ServingStatus {
12940    fn from(value: i32) -> Self {
12941        match value {
12942            0 => Self::Unspecified,
12943            1 => Self::Serving,
12944            2 => Self::Stopped,
12945            _ => Self::UnknownValue(serving_status::UnknownValue(
12946                wkt::internal::UnknownEnumValue::Integer(value),
12947            )),
12948        }
12949    }
12950}
12951
12952impl std::convert::From<&str> for ServingStatus {
12953    fn from(value: &str) -> Self {
12954        use std::string::ToString;
12955        match value {
12956            "SERVING_STATUS_UNSPECIFIED" => Self::Unspecified,
12957            "SERVING" => Self::Serving,
12958            "STOPPED" => Self::Stopped,
12959            _ => Self::UnknownValue(serving_status::UnknownValue(
12960                wkt::internal::UnknownEnumValue::String(value.to_string()),
12961            )),
12962        }
12963    }
12964}
12965
12966impl serde::ser::Serialize for ServingStatus {
12967    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12968    where
12969        S: serde::Serializer,
12970    {
12971        match self {
12972            Self::Unspecified => serializer.serialize_i32(0),
12973            Self::Serving => serializer.serialize_i32(1),
12974            Self::Stopped => serializer.serialize_i32(2),
12975            Self::UnknownValue(u) => u.0.serialize(serializer),
12976        }
12977    }
12978}
12979
12980impl<'de> serde::de::Deserialize<'de> for ServingStatus {
12981    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12982    where
12983        D: serde::Deserializer<'de>,
12984    {
12985        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServingStatus>::new(
12986            ".google.appengine.v1.ServingStatus",
12987        ))
12988    }
12989}