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 gax;
23extern crate gaxi;
24extern crate lazy_static;
25extern crate longrunning;
26extern crate lro;
27extern crate reqwest;
28extern crate serde;
29extern crate serde_json;
30extern crate serde_with;
31extern crate std;
32extern crate tracing;
33extern crate wkt;
34
35mod debug;
36mod deserialize;
37mod serialize;
38
39/// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/)
40/// configuration for API handlers.
41#[derive(Clone, Default, PartialEq)]
42#[non_exhaustive]
43pub struct ApiConfigHandler {
44    /// Action to take when users access resources that require
45    /// authentication. Defaults to `redirect`.
46    pub auth_fail_action: crate::model::AuthFailAction,
47
48    /// Level of login required to access this resource. Defaults to
49    /// `optional`.
50    pub login: crate::model::LoginRequirement,
51
52    /// Path to the script from the application root directory.
53    pub script: std::string::String,
54
55    /// Security (HTTPS) enforcement for this URL.
56    pub security_level: crate::model::SecurityLevel,
57
58    /// URL to serve the endpoint at.
59    pub url: std::string::String,
60
61    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62}
63
64impl ApiConfigHandler {
65    pub fn new() -> Self {
66        std::default::Default::default()
67    }
68
69    /// Sets the value of [auth_fail_action][crate::model::ApiConfigHandler::auth_fail_action].
70    pub fn set_auth_fail_action<T: std::convert::Into<crate::model::AuthFailAction>>(
71        mut self,
72        v: T,
73    ) -> Self {
74        self.auth_fail_action = v.into();
75        self
76    }
77
78    /// Sets the value of [login][crate::model::ApiConfigHandler::login].
79    pub fn set_login<T: std::convert::Into<crate::model::LoginRequirement>>(
80        mut self,
81        v: T,
82    ) -> Self {
83        self.login = v.into();
84        self
85    }
86
87    /// Sets the value of [script][crate::model::ApiConfigHandler::script].
88    pub fn set_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89        self.script = v.into();
90        self
91    }
92
93    /// Sets the value of [security_level][crate::model::ApiConfigHandler::security_level].
94    pub fn set_security_level<T: std::convert::Into<crate::model::SecurityLevel>>(
95        mut self,
96        v: T,
97    ) -> Self {
98        self.security_level = v.into();
99        self
100    }
101
102    /// Sets the value of [url][crate::model::ApiConfigHandler::url].
103    pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104        self.url = v.into();
105        self
106    }
107}
108
109impl wkt::message::Message for ApiConfigHandler {
110    fn typename() -> &'static str {
111        "type.googleapis.com/google.appengine.v1.ApiConfigHandler"
112    }
113}
114
115/// Custom static error page to be served when an error occurs.
116#[derive(Clone, Default, PartialEq)]
117#[non_exhaustive]
118pub struct ErrorHandler {
119    /// Error condition this handler applies to.
120    pub error_code: crate::model::error_handler::ErrorCode,
121
122    /// Static file content to be served for this error.
123    pub static_file: std::string::String,
124
125    /// MIME type of file. Defaults to `text/html`.
126    pub mime_type: std::string::String,
127
128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
129}
130
131impl ErrorHandler {
132    pub fn new() -> Self {
133        std::default::Default::default()
134    }
135
136    /// Sets the value of [error_code][crate::model::ErrorHandler::error_code].
137    pub fn set_error_code<T: std::convert::Into<crate::model::error_handler::ErrorCode>>(
138        mut self,
139        v: T,
140    ) -> Self {
141        self.error_code = v.into();
142        self
143    }
144
145    /// Sets the value of [static_file][crate::model::ErrorHandler::static_file].
146    pub fn set_static_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
147        self.static_file = v.into();
148        self
149    }
150
151    /// Sets the value of [mime_type][crate::model::ErrorHandler::mime_type].
152    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
153        self.mime_type = v.into();
154        self
155    }
156}
157
158impl wkt::message::Message for ErrorHandler {
159    fn typename() -> &'static str {
160        "type.googleapis.com/google.appengine.v1.ErrorHandler"
161    }
162}
163
164/// Defines additional types related to [ErrorHandler].
165pub mod error_handler {
166    #[allow(unused_imports)]
167    use super::*;
168
169    /// Error codes.
170    ///
171    /// # Working with unknown values
172    ///
173    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
174    /// additional enum variants at any time. Adding new variants is not considered
175    /// a breaking change. Applications should write their code in anticipation of:
176    ///
177    /// - New values appearing in future releases of the client library, **and**
178    /// - New values received dynamically, without application changes.
179    ///
180    /// Please consult the [Working with enums] section in the user guide for some
181    /// guidelines.
182    ///
183    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
184    #[derive(Clone, Debug, PartialEq)]
185    #[non_exhaustive]
186    pub enum ErrorCode {
187        /// Not specified. ERROR_CODE_DEFAULT is assumed.
188        Unspecified,
189        /// All other error types.
190        Default,
191        /// Application has exceeded a resource quota.
192        OverQuota,
193        /// Client blocked by the application's Denial of Service protection
194        /// configuration.
195        DosApiDenial,
196        /// Deadline reached before the application responds.
197        Timeout,
198        /// If set, the enum was initialized with an unknown value.
199        ///
200        /// Applications can examine the value using [ErrorCode::value] or
201        /// [ErrorCode::name].
202        UnknownValue(error_code::UnknownValue),
203    }
204
205    #[doc(hidden)]
206    pub mod error_code {
207        #[allow(unused_imports)]
208        use super::*;
209        #[derive(Clone, Debug, PartialEq)]
210        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
211    }
212
213    impl ErrorCode {
214        /// Gets the enum value.
215        ///
216        /// Returns `None` if the enum contains an unknown value deserialized from
217        /// the string representation of enums.
218        pub fn value(&self) -> std::option::Option<i32> {
219            match self {
220                Self::Unspecified => std::option::Option::Some(0),
221                Self::Default => std::option::Option::Some(0),
222                Self::OverQuota => std::option::Option::Some(1),
223                Self::DosApiDenial => std::option::Option::Some(2),
224                Self::Timeout => std::option::Option::Some(3),
225                Self::UnknownValue(u) => u.0.value(),
226            }
227        }
228
229        /// Gets the enum value as a string.
230        ///
231        /// Returns `None` if the enum contains an unknown value deserialized from
232        /// the integer representation of enums.
233        pub fn name(&self) -> std::option::Option<&str> {
234            match self {
235                Self::Unspecified => std::option::Option::Some("ERROR_CODE_UNSPECIFIED"),
236                Self::Default => std::option::Option::Some("ERROR_CODE_DEFAULT"),
237                Self::OverQuota => std::option::Option::Some("ERROR_CODE_OVER_QUOTA"),
238                Self::DosApiDenial => std::option::Option::Some("ERROR_CODE_DOS_API_DENIAL"),
239                Self::Timeout => std::option::Option::Some("ERROR_CODE_TIMEOUT"),
240                Self::UnknownValue(u) => u.0.name(),
241            }
242        }
243    }
244
245    impl std::default::Default for ErrorCode {
246        fn default() -> Self {
247            use std::convert::From;
248            Self::from(0)
249        }
250    }
251
252    impl std::fmt::Display for ErrorCode {
253        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
254            wkt::internal::display_enum(f, self.name(), self.value())
255        }
256    }
257
258    impl std::convert::From<i32> for ErrorCode {
259        fn from(value: i32) -> Self {
260            match value {
261                0 => Self::Default,
262                1 => Self::OverQuota,
263                2 => Self::DosApiDenial,
264                3 => Self::Timeout,
265                _ => Self::UnknownValue(error_code::UnknownValue(
266                    wkt::internal::UnknownEnumValue::Integer(value),
267                )),
268            }
269        }
270    }
271
272    impl std::convert::From<&str> for ErrorCode {
273        fn from(value: &str) -> Self {
274            use std::string::ToString;
275            match value {
276                "ERROR_CODE_UNSPECIFIED" => Self::Unspecified,
277                "ERROR_CODE_DEFAULT" => Self::Default,
278                "ERROR_CODE_OVER_QUOTA" => Self::OverQuota,
279                "ERROR_CODE_DOS_API_DENIAL" => Self::DosApiDenial,
280                "ERROR_CODE_TIMEOUT" => Self::Timeout,
281                _ => Self::UnknownValue(error_code::UnknownValue(
282                    wkt::internal::UnknownEnumValue::String(value.to_string()),
283                )),
284            }
285        }
286    }
287
288    impl serde::ser::Serialize for ErrorCode {
289        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
290        where
291            S: serde::Serializer,
292        {
293            match self {
294                Self::Unspecified => serializer.serialize_i32(0),
295                Self::Default => serializer.serialize_i32(0),
296                Self::OverQuota => serializer.serialize_i32(1),
297                Self::DosApiDenial => serializer.serialize_i32(2),
298                Self::Timeout => serializer.serialize_i32(3),
299                Self::UnknownValue(u) => u.0.serialize(serializer),
300            }
301        }
302    }
303
304    impl<'de> serde::de::Deserialize<'de> for ErrorCode {
305        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
306        where
307            D: serde::Deserializer<'de>,
308        {
309            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
310                ".google.appengine.v1.ErrorHandler.ErrorCode",
311            ))
312        }
313    }
314}
315
316/// URL pattern and description of how the URL should be handled. App Engine can
317/// handle URLs by executing application code or by serving static files
318/// uploaded with the version, such as images, CSS, or JavaScript.
319#[derive(Clone, Default, PartialEq)]
320#[non_exhaustive]
321pub struct UrlMap {
322    /// URL prefix. Uses regular expression syntax, which means regexp
323    /// special characters must be escaped, but should not contain groupings.
324    /// All URLs that begin with this prefix are handled by this handler, using the
325    /// portion of the URL after the prefix as part of the file path.
326    pub url_regex: std::string::String,
327
328    /// Security (HTTPS) enforcement for this URL.
329    pub security_level: crate::model::SecurityLevel,
330
331    /// Level of login required to access this resource. Not supported for Node.js
332    /// in the App Engine standard environment.
333    pub login: crate::model::LoginRequirement,
334
335    /// Action to take when users access resources that require
336    /// authentication. Defaults to `redirect`.
337    pub auth_fail_action: crate::model::AuthFailAction,
338
339    /// `30x` code to use when performing redirects for the `secure` field.
340    /// Defaults to `302`.
341    pub redirect_http_response_code: crate::model::url_map::RedirectHttpResponseCode,
342
343    /// Type of handler for this URL pattern.
344    pub handler_type: std::option::Option<crate::model::url_map::HandlerType>,
345
346    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
347}
348
349impl UrlMap {
350    pub fn new() -> Self {
351        std::default::Default::default()
352    }
353
354    /// Sets the value of [url_regex][crate::model::UrlMap::url_regex].
355    pub fn set_url_regex<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
356        self.url_regex = v.into();
357        self
358    }
359
360    /// Sets the value of [security_level][crate::model::UrlMap::security_level].
361    pub fn set_security_level<T: std::convert::Into<crate::model::SecurityLevel>>(
362        mut self,
363        v: T,
364    ) -> Self {
365        self.security_level = v.into();
366        self
367    }
368
369    /// Sets the value of [login][crate::model::UrlMap::login].
370    pub fn set_login<T: std::convert::Into<crate::model::LoginRequirement>>(
371        mut self,
372        v: T,
373    ) -> Self {
374        self.login = v.into();
375        self
376    }
377
378    /// Sets the value of [auth_fail_action][crate::model::UrlMap::auth_fail_action].
379    pub fn set_auth_fail_action<T: std::convert::Into<crate::model::AuthFailAction>>(
380        mut self,
381        v: T,
382    ) -> Self {
383        self.auth_fail_action = v.into();
384        self
385    }
386
387    /// Sets the value of [redirect_http_response_code][crate::model::UrlMap::redirect_http_response_code].
388    pub fn set_redirect_http_response_code<
389        T: std::convert::Into<crate::model::url_map::RedirectHttpResponseCode>,
390    >(
391        mut self,
392        v: T,
393    ) -> Self {
394        self.redirect_http_response_code = v.into();
395        self
396    }
397
398    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type].
399    ///
400    /// Note that all the setters affecting `handler_type` are mutually
401    /// exclusive.
402    pub fn set_handler_type<
403        T: std::convert::Into<std::option::Option<crate::model::url_map::HandlerType>>,
404    >(
405        mut self,
406        v: T,
407    ) -> Self {
408        self.handler_type = v.into();
409        self
410    }
411
412    /// The value of [handler_type][crate::model::UrlMap::handler_type]
413    /// if it holds a `StaticFiles`, `None` if the field is not set or
414    /// holds a different branch.
415    pub fn static_files(
416        &self,
417    ) -> std::option::Option<&std::boxed::Box<crate::model::StaticFilesHandler>> {
418        #[allow(unreachable_patterns)]
419        self.handler_type.as_ref().and_then(|v| match v {
420            crate::model::url_map::HandlerType::StaticFiles(v) => std::option::Option::Some(v),
421            _ => std::option::Option::None,
422        })
423    }
424
425    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
426    /// to hold a `StaticFiles`.
427    ///
428    /// Note that all the setters affecting `handler_type` are
429    /// mutually exclusive.
430    pub fn set_static_files<
431        T: std::convert::Into<std::boxed::Box<crate::model::StaticFilesHandler>>,
432    >(
433        mut self,
434        v: T,
435    ) -> Self {
436        self.handler_type =
437            std::option::Option::Some(crate::model::url_map::HandlerType::StaticFiles(v.into()));
438        self
439    }
440
441    /// The value of [handler_type][crate::model::UrlMap::handler_type]
442    /// if it holds a `Script`, `None` if the field is not set or
443    /// holds a different branch.
444    pub fn script(&self) -> std::option::Option<&std::boxed::Box<crate::model::ScriptHandler>> {
445        #[allow(unreachable_patterns)]
446        self.handler_type.as_ref().and_then(|v| match v {
447            crate::model::url_map::HandlerType::Script(v) => std::option::Option::Some(v),
448            _ => std::option::Option::None,
449        })
450    }
451
452    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
453    /// to hold a `Script`.
454    ///
455    /// Note that all the setters affecting `handler_type` are
456    /// mutually exclusive.
457    pub fn set_script<T: std::convert::Into<std::boxed::Box<crate::model::ScriptHandler>>>(
458        mut self,
459        v: T,
460    ) -> Self {
461        self.handler_type =
462            std::option::Option::Some(crate::model::url_map::HandlerType::Script(v.into()));
463        self
464    }
465
466    /// The value of [handler_type][crate::model::UrlMap::handler_type]
467    /// if it holds a `ApiEndpoint`, `None` if the field is not set or
468    /// holds a different branch.
469    pub fn api_endpoint(
470        &self,
471    ) -> std::option::Option<&std::boxed::Box<crate::model::ApiEndpointHandler>> {
472        #[allow(unreachable_patterns)]
473        self.handler_type.as_ref().and_then(|v| match v {
474            crate::model::url_map::HandlerType::ApiEndpoint(v) => std::option::Option::Some(v),
475            _ => std::option::Option::None,
476        })
477    }
478
479    /// Sets the value of [handler_type][crate::model::UrlMap::handler_type]
480    /// to hold a `ApiEndpoint`.
481    ///
482    /// Note that all the setters affecting `handler_type` are
483    /// mutually exclusive.
484    pub fn set_api_endpoint<
485        T: std::convert::Into<std::boxed::Box<crate::model::ApiEndpointHandler>>,
486    >(
487        mut self,
488        v: T,
489    ) -> Self {
490        self.handler_type =
491            std::option::Option::Some(crate::model::url_map::HandlerType::ApiEndpoint(v.into()));
492        self
493    }
494}
495
496impl wkt::message::Message for UrlMap {
497    fn typename() -> &'static str {
498        "type.googleapis.com/google.appengine.v1.UrlMap"
499    }
500}
501
502/// Defines additional types related to [UrlMap].
503pub mod url_map {
504    #[allow(unused_imports)]
505    use super::*;
506
507    /// Redirect codes.
508    ///
509    /// # Working with unknown values
510    ///
511    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
512    /// additional enum variants at any time. Adding new variants is not considered
513    /// a breaking change. Applications should write their code in anticipation of:
514    ///
515    /// - New values appearing in future releases of the client library, **and**
516    /// - New values received dynamically, without application changes.
517    ///
518    /// Please consult the [Working with enums] section in the user guide for some
519    /// guidelines.
520    ///
521    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
522    #[derive(Clone, Debug, PartialEq)]
523    #[non_exhaustive]
524    pub enum RedirectHttpResponseCode {
525        /// Not specified. `302` is assumed.
526        Unspecified,
527        /// `301 Moved Permanently` code.
528        RedirectHttpResponseCode301,
529        /// `302 Moved Temporarily` code.
530        RedirectHttpResponseCode302,
531        /// `303 See Other` code.
532        RedirectHttpResponseCode303,
533        /// `307 Temporary Redirect` code.
534        RedirectHttpResponseCode307,
535        /// If set, the enum was initialized with an unknown value.
536        ///
537        /// Applications can examine the value using [RedirectHttpResponseCode::value] or
538        /// [RedirectHttpResponseCode::name].
539        UnknownValue(redirect_http_response_code::UnknownValue),
540    }
541
542    #[doc(hidden)]
543    pub mod redirect_http_response_code {
544        #[allow(unused_imports)]
545        use super::*;
546        #[derive(Clone, Debug, PartialEq)]
547        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
548    }
549
550    impl RedirectHttpResponseCode {
551        /// Gets the enum value.
552        ///
553        /// Returns `None` if the enum contains an unknown value deserialized from
554        /// the string representation of enums.
555        pub fn value(&self) -> std::option::Option<i32> {
556            match self {
557                Self::Unspecified => std::option::Option::Some(0),
558                Self::RedirectHttpResponseCode301 => std::option::Option::Some(1),
559                Self::RedirectHttpResponseCode302 => std::option::Option::Some(2),
560                Self::RedirectHttpResponseCode303 => std::option::Option::Some(3),
561                Self::RedirectHttpResponseCode307 => std::option::Option::Some(4),
562                Self::UnknownValue(u) => u.0.value(),
563            }
564        }
565
566        /// Gets the enum value as a string.
567        ///
568        /// Returns `None` if the enum contains an unknown value deserialized from
569        /// the integer representation of enums.
570        pub fn name(&self) -> std::option::Option<&str> {
571            match self {
572                Self::Unspecified => {
573                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED")
574                }
575                Self::RedirectHttpResponseCode301 => {
576                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_301")
577                }
578                Self::RedirectHttpResponseCode302 => {
579                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_302")
580                }
581                Self::RedirectHttpResponseCode303 => {
582                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_303")
583                }
584                Self::RedirectHttpResponseCode307 => {
585                    std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_307")
586                }
587                Self::UnknownValue(u) => u.0.name(),
588            }
589        }
590    }
591
592    impl std::default::Default for RedirectHttpResponseCode {
593        fn default() -> Self {
594            use std::convert::From;
595            Self::from(0)
596        }
597    }
598
599    impl std::fmt::Display for RedirectHttpResponseCode {
600        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
601            wkt::internal::display_enum(f, self.name(), self.value())
602        }
603    }
604
605    impl std::convert::From<i32> for RedirectHttpResponseCode {
606        fn from(value: i32) -> Self {
607            match value {
608                0 => Self::Unspecified,
609                1 => Self::RedirectHttpResponseCode301,
610                2 => Self::RedirectHttpResponseCode302,
611                3 => Self::RedirectHttpResponseCode303,
612                4 => Self::RedirectHttpResponseCode307,
613                _ => Self::UnknownValue(redirect_http_response_code::UnknownValue(
614                    wkt::internal::UnknownEnumValue::Integer(value),
615                )),
616            }
617        }
618    }
619
620    impl std::convert::From<&str> for RedirectHttpResponseCode {
621        fn from(value: &str) -> Self {
622            use std::string::ToString;
623            match value {
624                "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" => Self::Unspecified,
625                "REDIRECT_HTTP_RESPONSE_CODE_301" => Self::RedirectHttpResponseCode301,
626                "REDIRECT_HTTP_RESPONSE_CODE_302" => Self::RedirectHttpResponseCode302,
627                "REDIRECT_HTTP_RESPONSE_CODE_303" => Self::RedirectHttpResponseCode303,
628                "REDIRECT_HTTP_RESPONSE_CODE_307" => Self::RedirectHttpResponseCode307,
629                _ => Self::UnknownValue(redirect_http_response_code::UnknownValue(
630                    wkt::internal::UnknownEnumValue::String(value.to_string()),
631                )),
632            }
633        }
634    }
635
636    impl serde::ser::Serialize for RedirectHttpResponseCode {
637        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
638        where
639            S: serde::Serializer,
640        {
641            match self {
642                Self::Unspecified => serializer.serialize_i32(0),
643                Self::RedirectHttpResponseCode301 => serializer.serialize_i32(1),
644                Self::RedirectHttpResponseCode302 => serializer.serialize_i32(2),
645                Self::RedirectHttpResponseCode303 => serializer.serialize_i32(3),
646                Self::RedirectHttpResponseCode307 => serializer.serialize_i32(4),
647                Self::UnknownValue(u) => u.0.serialize(serializer),
648            }
649        }
650    }
651
652    impl<'de> serde::de::Deserialize<'de> for RedirectHttpResponseCode {
653        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
654        where
655            D: serde::Deserializer<'de>,
656        {
657            deserializer.deserialize_any(
658                wkt::internal::EnumVisitor::<RedirectHttpResponseCode>::new(
659                    ".google.appengine.v1.UrlMap.RedirectHttpResponseCode",
660                ),
661            )
662        }
663    }
664
665    /// Type of handler for this URL pattern.
666    #[derive(Clone, Debug, PartialEq)]
667    #[non_exhaustive]
668    pub enum HandlerType {
669        /// Returns the contents of a file, such as an image, as the response.
670        StaticFiles(std::boxed::Box<crate::model::StaticFilesHandler>),
671        /// Executes a script to handle the requests that match this URL
672        /// pattern. Only the `auto` value is supported for Node.js in the
673        /// App Engine standard environment, for example `"script": "auto"`.
674        Script(std::boxed::Box<crate::model::ScriptHandler>),
675        /// Uses API Endpoints to handle requests.
676        ApiEndpoint(std::boxed::Box<crate::model::ApiEndpointHandler>),
677    }
678}
679
680/// Files served directly to the user for a given URL, such as images, CSS
681/// stylesheets, or JavaScript source files. Static file handlers describe which
682/// files in the application directory are static files, and which URLs serve
683/// them.
684#[derive(Clone, Default, PartialEq)]
685#[non_exhaustive]
686pub struct StaticFilesHandler {
687    /// Path to the static files matched by the URL pattern, from the
688    /// application root directory. The path can refer to text matched in groupings
689    /// in the URL pattern.
690    pub path: std::string::String,
691
692    /// Regular expression that matches the file paths for all files that should be
693    /// referenced by this handler.
694    pub upload_path_regex: std::string::String,
695
696    /// HTTP headers to use for all responses from these URLs.
697    pub http_headers: std::collections::HashMap<std::string::String, std::string::String>,
698
699    /// MIME type used to serve all files served by this handler.
700    ///
701    /// Defaults to file-specific MIME types, which are derived from each file's
702    /// filename extension.
703    pub mime_type: std::string::String,
704
705    /// Time a static file served by this handler should be cached
706    /// by web proxies and browsers.
707    pub expiration: std::option::Option<wkt::Duration>,
708
709    /// Whether this handler should match the request if the file
710    /// referenced by the handler does not exist.
711    pub require_matching_file: bool,
712
713    /// Whether files should also be uploaded as code data. By default, files
714    /// declared in static file handlers are uploaded as static
715    /// data and are only served to end users; they cannot be read by the
716    /// application. If enabled, uploads are charged against both your code and
717    /// static data storage resource quotas.
718    pub application_readable: bool,
719
720    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
721}
722
723impl StaticFilesHandler {
724    pub fn new() -> Self {
725        std::default::Default::default()
726    }
727
728    /// Sets the value of [path][crate::model::StaticFilesHandler::path].
729    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
730        self.path = v.into();
731        self
732    }
733
734    /// Sets the value of [upload_path_regex][crate::model::StaticFilesHandler::upload_path_regex].
735    pub fn set_upload_path_regex<T: std::convert::Into<std::string::String>>(
736        mut self,
737        v: T,
738    ) -> Self {
739        self.upload_path_regex = v.into();
740        self
741    }
742
743    /// Sets the value of [http_headers][crate::model::StaticFilesHandler::http_headers].
744    pub fn set_http_headers<T, K, V>(mut self, v: T) -> Self
745    where
746        T: std::iter::IntoIterator<Item = (K, V)>,
747        K: std::convert::Into<std::string::String>,
748        V: std::convert::Into<std::string::String>,
749    {
750        use std::iter::Iterator;
751        self.http_headers = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
752        self
753    }
754
755    /// Sets the value of [mime_type][crate::model::StaticFilesHandler::mime_type].
756    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
757        self.mime_type = v.into();
758        self
759    }
760
761    /// Sets the value of [expiration][crate::model::StaticFilesHandler::expiration].
762    pub fn set_expiration<T>(mut self, v: T) -> Self
763    where
764        T: std::convert::Into<wkt::Duration>,
765    {
766        self.expiration = std::option::Option::Some(v.into());
767        self
768    }
769
770    /// Sets or clears the value of [expiration][crate::model::StaticFilesHandler::expiration].
771    pub fn set_or_clear_expiration<T>(mut self, v: std::option::Option<T>) -> Self
772    where
773        T: std::convert::Into<wkt::Duration>,
774    {
775        self.expiration = v.map(|x| x.into());
776        self
777    }
778
779    /// Sets the value of [require_matching_file][crate::model::StaticFilesHandler::require_matching_file].
780    pub fn set_require_matching_file<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
781        self.require_matching_file = v.into();
782        self
783    }
784
785    /// Sets the value of [application_readable][crate::model::StaticFilesHandler::application_readable].
786    pub fn set_application_readable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
787        self.application_readable = v.into();
788        self
789    }
790}
791
792impl wkt::message::Message for StaticFilesHandler {
793    fn typename() -> &'static str {
794        "type.googleapis.com/google.appengine.v1.StaticFilesHandler"
795    }
796}
797
798/// Executes a script to handle the request that matches the URL pattern.
799#[derive(Clone, Default, PartialEq)]
800#[non_exhaustive]
801pub struct ScriptHandler {
802    /// Path to the script from the application root directory.
803    pub script_path: std::string::String,
804
805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
806}
807
808impl ScriptHandler {
809    pub fn new() -> Self {
810        std::default::Default::default()
811    }
812
813    /// Sets the value of [script_path][crate::model::ScriptHandler::script_path].
814    pub fn set_script_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
815        self.script_path = v.into();
816        self
817    }
818}
819
820impl wkt::message::Message for ScriptHandler {
821    fn typename() -> &'static str {
822        "type.googleapis.com/google.appengine.v1.ScriptHandler"
823    }
824}
825
826/// Uses Google Cloud Endpoints to handle requests.
827#[derive(Clone, Default, PartialEq)]
828#[non_exhaustive]
829pub struct ApiEndpointHandler {
830    /// Path to the script from the application root directory.
831    pub script_path: std::string::String,
832
833    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
834}
835
836impl ApiEndpointHandler {
837    pub fn new() -> Self {
838        std::default::Default::default()
839    }
840
841    /// Sets the value of [script_path][crate::model::ApiEndpointHandler::script_path].
842    pub fn set_script_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
843        self.script_path = v.into();
844        self
845    }
846}
847
848impl wkt::message::Message for ApiEndpointHandler {
849    fn typename() -> &'static str {
850        "type.googleapis.com/google.appengine.v1.ApiEndpointHandler"
851    }
852}
853
854/// Health checking configuration for VM instances. Unhealthy instances
855/// are killed and replaced with new instances. Only applicable for
856/// instances in App Engine flexible environment.
857#[derive(Clone, Default, PartialEq)]
858#[non_exhaustive]
859pub struct HealthCheck {
860    /// Whether to explicitly disable health checks for this instance.
861    pub disable_health_check: bool,
862
863    /// Host header to send when performing an HTTP health check.
864    /// Example: "myapp.appspot.com"
865    pub host: std::string::String,
866
867    /// Number of consecutive successful health checks required before receiving
868    /// traffic.
869    pub healthy_threshold: u32,
870
871    /// Number of consecutive failed health checks required before removing
872    /// traffic.
873    pub unhealthy_threshold: u32,
874
875    /// Number of consecutive failed health checks required before an instance is
876    /// restarted.
877    pub restart_threshold: u32,
878
879    /// Interval between health checks.
880    pub check_interval: std::option::Option<wkt::Duration>,
881
882    /// Time before the health check is considered failed.
883    pub timeout: std::option::Option<wkt::Duration>,
884
885    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
886}
887
888impl HealthCheck {
889    pub fn new() -> Self {
890        std::default::Default::default()
891    }
892
893    /// Sets the value of [disable_health_check][crate::model::HealthCheck::disable_health_check].
894    pub fn set_disable_health_check<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
895        self.disable_health_check = v.into();
896        self
897    }
898
899    /// Sets the value of [host][crate::model::HealthCheck::host].
900    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
901        self.host = v.into();
902        self
903    }
904
905    /// Sets the value of [healthy_threshold][crate::model::HealthCheck::healthy_threshold].
906    pub fn set_healthy_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
907        self.healthy_threshold = v.into();
908        self
909    }
910
911    /// Sets the value of [unhealthy_threshold][crate::model::HealthCheck::unhealthy_threshold].
912    pub fn set_unhealthy_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
913        self.unhealthy_threshold = v.into();
914        self
915    }
916
917    /// Sets the value of [restart_threshold][crate::model::HealthCheck::restart_threshold].
918    pub fn set_restart_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
919        self.restart_threshold = v.into();
920        self
921    }
922
923    /// Sets the value of [check_interval][crate::model::HealthCheck::check_interval].
924    pub fn set_check_interval<T>(mut self, v: T) -> Self
925    where
926        T: std::convert::Into<wkt::Duration>,
927    {
928        self.check_interval = std::option::Option::Some(v.into());
929        self
930    }
931
932    /// Sets or clears the value of [check_interval][crate::model::HealthCheck::check_interval].
933    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
934    where
935        T: std::convert::Into<wkt::Duration>,
936    {
937        self.check_interval = v.map(|x| x.into());
938        self
939    }
940
941    /// Sets the value of [timeout][crate::model::HealthCheck::timeout].
942    pub fn set_timeout<T>(mut self, v: T) -> Self
943    where
944        T: std::convert::Into<wkt::Duration>,
945    {
946        self.timeout = std::option::Option::Some(v.into());
947        self
948    }
949
950    /// Sets or clears the value of [timeout][crate::model::HealthCheck::timeout].
951    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
952    where
953        T: std::convert::Into<wkt::Duration>,
954    {
955        self.timeout = v.map(|x| x.into());
956        self
957    }
958}
959
960impl wkt::message::Message for HealthCheck {
961    fn typename() -> &'static str {
962        "type.googleapis.com/google.appengine.v1.HealthCheck"
963    }
964}
965
966/// Readiness checking configuration for VM instances. Unhealthy instances
967/// are removed from traffic rotation.
968#[derive(Clone, Default, PartialEq)]
969#[non_exhaustive]
970pub struct ReadinessCheck {
971    /// The request path.
972    pub path: std::string::String,
973
974    /// Host header to send when performing a HTTP Readiness check.
975    /// Example: "myapp.appspot.com"
976    pub host: std::string::String,
977
978    /// Number of consecutive failed checks required before removing
979    /// traffic.
980    pub failure_threshold: u32,
981
982    /// Number of consecutive successful checks required before receiving
983    /// traffic.
984    pub success_threshold: u32,
985
986    /// Interval between health checks.
987    pub check_interval: std::option::Option<wkt::Duration>,
988
989    /// Time before the check is considered failed.
990    pub timeout: std::option::Option<wkt::Duration>,
991
992    /// A maximum time limit on application initialization, measured from moment
993    /// the application successfully replies to a healthcheck until it is ready to
994    /// serve traffic.
995    pub app_start_timeout: std::option::Option<wkt::Duration>,
996
997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
998}
999
1000impl ReadinessCheck {
1001    pub fn new() -> Self {
1002        std::default::Default::default()
1003    }
1004
1005    /// Sets the value of [path][crate::model::ReadinessCheck::path].
1006    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1007        self.path = v.into();
1008        self
1009    }
1010
1011    /// Sets the value of [host][crate::model::ReadinessCheck::host].
1012    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1013        self.host = v.into();
1014        self
1015    }
1016
1017    /// Sets the value of [failure_threshold][crate::model::ReadinessCheck::failure_threshold].
1018    pub fn set_failure_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1019        self.failure_threshold = v.into();
1020        self
1021    }
1022
1023    /// Sets the value of [success_threshold][crate::model::ReadinessCheck::success_threshold].
1024    pub fn set_success_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1025        self.success_threshold = v.into();
1026        self
1027    }
1028
1029    /// Sets the value of [check_interval][crate::model::ReadinessCheck::check_interval].
1030    pub fn set_check_interval<T>(mut self, v: T) -> Self
1031    where
1032        T: std::convert::Into<wkt::Duration>,
1033    {
1034        self.check_interval = std::option::Option::Some(v.into());
1035        self
1036    }
1037
1038    /// Sets or clears the value of [check_interval][crate::model::ReadinessCheck::check_interval].
1039    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
1040    where
1041        T: std::convert::Into<wkt::Duration>,
1042    {
1043        self.check_interval = v.map(|x| x.into());
1044        self
1045    }
1046
1047    /// Sets the value of [timeout][crate::model::ReadinessCheck::timeout].
1048    pub fn set_timeout<T>(mut self, v: T) -> Self
1049    where
1050        T: std::convert::Into<wkt::Duration>,
1051    {
1052        self.timeout = std::option::Option::Some(v.into());
1053        self
1054    }
1055
1056    /// Sets or clears the value of [timeout][crate::model::ReadinessCheck::timeout].
1057    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1058    where
1059        T: std::convert::Into<wkt::Duration>,
1060    {
1061        self.timeout = v.map(|x| x.into());
1062        self
1063    }
1064
1065    /// Sets the value of [app_start_timeout][crate::model::ReadinessCheck::app_start_timeout].
1066    pub fn set_app_start_timeout<T>(mut self, v: T) -> Self
1067    where
1068        T: std::convert::Into<wkt::Duration>,
1069    {
1070        self.app_start_timeout = std::option::Option::Some(v.into());
1071        self
1072    }
1073
1074    /// Sets or clears the value of [app_start_timeout][crate::model::ReadinessCheck::app_start_timeout].
1075    pub fn set_or_clear_app_start_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1076    where
1077        T: std::convert::Into<wkt::Duration>,
1078    {
1079        self.app_start_timeout = v.map(|x| x.into());
1080        self
1081    }
1082}
1083
1084impl wkt::message::Message for ReadinessCheck {
1085    fn typename() -> &'static str {
1086        "type.googleapis.com/google.appengine.v1.ReadinessCheck"
1087    }
1088}
1089
1090/// Health checking configuration for VM instances. Unhealthy instances
1091/// are killed and replaced with new instances.
1092#[derive(Clone, Default, PartialEq)]
1093#[non_exhaustive]
1094pub struct LivenessCheck {
1095    /// The request path.
1096    pub path: std::string::String,
1097
1098    /// Host header to send when performing a HTTP Liveness check.
1099    /// Example: "myapp.appspot.com"
1100    pub host: std::string::String,
1101
1102    /// Number of consecutive failed checks required before considering the
1103    /// VM unhealthy.
1104    pub failure_threshold: u32,
1105
1106    /// Number of consecutive successful checks required before considering
1107    /// the VM healthy.
1108    pub success_threshold: u32,
1109
1110    /// Interval between health checks.
1111    pub check_interval: std::option::Option<wkt::Duration>,
1112
1113    /// Time before the check is considered failed.
1114    pub timeout: std::option::Option<wkt::Duration>,
1115
1116    /// The initial delay before starting to execute the checks.
1117    pub initial_delay: std::option::Option<wkt::Duration>,
1118
1119    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1120}
1121
1122impl LivenessCheck {
1123    pub fn new() -> Self {
1124        std::default::Default::default()
1125    }
1126
1127    /// Sets the value of [path][crate::model::LivenessCheck::path].
1128    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1129        self.path = v.into();
1130        self
1131    }
1132
1133    /// Sets the value of [host][crate::model::LivenessCheck::host].
1134    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1135        self.host = v.into();
1136        self
1137    }
1138
1139    /// Sets the value of [failure_threshold][crate::model::LivenessCheck::failure_threshold].
1140    pub fn set_failure_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1141        self.failure_threshold = v.into();
1142        self
1143    }
1144
1145    /// Sets the value of [success_threshold][crate::model::LivenessCheck::success_threshold].
1146    pub fn set_success_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1147        self.success_threshold = v.into();
1148        self
1149    }
1150
1151    /// Sets the value of [check_interval][crate::model::LivenessCheck::check_interval].
1152    pub fn set_check_interval<T>(mut self, v: T) -> Self
1153    where
1154        T: std::convert::Into<wkt::Duration>,
1155    {
1156        self.check_interval = std::option::Option::Some(v.into());
1157        self
1158    }
1159
1160    /// Sets or clears the value of [check_interval][crate::model::LivenessCheck::check_interval].
1161    pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
1162    where
1163        T: std::convert::Into<wkt::Duration>,
1164    {
1165        self.check_interval = v.map(|x| x.into());
1166        self
1167    }
1168
1169    /// Sets the value of [timeout][crate::model::LivenessCheck::timeout].
1170    pub fn set_timeout<T>(mut self, v: T) -> Self
1171    where
1172        T: std::convert::Into<wkt::Duration>,
1173    {
1174        self.timeout = std::option::Option::Some(v.into());
1175        self
1176    }
1177
1178    /// Sets or clears the value of [timeout][crate::model::LivenessCheck::timeout].
1179    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
1180    where
1181        T: std::convert::Into<wkt::Duration>,
1182    {
1183        self.timeout = v.map(|x| x.into());
1184        self
1185    }
1186
1187    /// Sets the value of [initial_delay][crate::model::LivenessCheck::initial_delay].
1188    pub fn set_initial_delay<T>(mut self, v: T) -> Self
1189    where
1190        T: std::convert::Into<wkt::Duration>,
1191    {
1192        self.initial_delay = std::option::Option::Some(v.into());
1193        self
1194    }
1195
1196    /// Sets or clears the value of [initial_delay][crate::model::LivenessCheck::initial_delay].
1197    pub fn set_or_clear_initial_delay<T>(mut self, v: std::option::Option<T>) -> Self
1198    where
1199        T: std::convert::Into<wkt::Duration>,
1200    {
1201        self.initial_delay = v.map(|x| x.into());
1202        self
1203    }
1204}
1205
1206impl wkt::message::Message for LivenessCheck {
1207    fn typename() -> &'static str {
1208        "type.googleapis.com/google.appengine.v1.LivenessCheck"
1209    }
1210}
1211
1212/// Third-party Python runtime library that is required by the application.
1213#[derive(Clone, Default, PartialEq)]
1214#[non_exhaustive]
1215pub struct Library {
1216    /// Name of the library. Example: "django".
1217    pub name: std::string::String,
1218
1219    /// Version of the library to select, or "latest".
1220    pub version: std::string::String,
1221
1222    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1223}
1224
1225impl Library {
1226    pub fn new() -> Self {
1227        std::default::Default::default()
1228    }
1229
1230    /// Sets the value of [name][crate::model::Library::name].
1231    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1232        self.name = v.into();
1233        self
1234    }
1235
1236    /// Sets the value of [version][crate::model::Library::version].
1237    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1238        self.version = v.into();
1239        self
1240    }
1241}
1242
1243impl wkt::message::Message for Library {
1244    fn typename() -> &'static str {
1245        "type.googleapis.com/google.appengine.v1.Library"
1246    }
1247}
1248
1249/// Request message for `Applications.GetApplication`.
1250#[derive(Clone, Default, PartialEq)]
1251#[non_exhaustive]
1252pub struct GetApplicationRequest {
1253    /// Name of the Application resource to get. Example: `apps/myapp`.
1254    pub name: std::string::String,
1255
1256    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1257}
1258
1259impl GetApplicationRequest {
1260    pub fn new() -> Self {
1261        std::default::Default::default()
1262    }
1263
1264    /// Sets the value of [name][crate::model::GetApplicationRequest::name].
1265    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1266        self.name = v.into();
1267        self
1268    }
1269}
1270
1271impl wkt::message::Message for GetApplicationRequest {
1272    fn typename() -> &'static str {
1273        "type.googleapis.com/google.appengine.v1.GetApplicationRequest"
1274    }
1275}
1276
1277/// Request message for `Applications.CreateApplication`.
1278#[derive(Clone, Default, PartialEq)]
1279#[non_exhaustive]
1280pub struct CreateApplicationRequest {
1281    /// Application configuration.
1282    pub application: std::option::Option<crate::model::Application>,
1283
1284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1285}
1286
1287impl CreateApplicationRequest {
1288    pub fn new() -> Self {
1289        std::default::Default::default()
1290    }
1291
1292    /// Sets the value of [application][crate::model::CreateApplicationRequest::application].
1293    pub fn set_application<T>(mut self, v: T) -> Self
1294    where
1295        T: std::convert::Into<crate::model::Application>,
1296    {
1297        self.application = std::option::Option::Some(v.into());
1298        self
1299    }
1300
1301    /// Sets or clears the value of [application][crate::model::CreateApplicationRequest::application].
1302    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
1303    where
1304        T: std::convert::Into<crate::model::Application>,
1305    {
1306        self.application = v.map(|x| x.into());
1307        self
1308    }
1309}
1310
1311impl wkt::message::Message for CreateApplicationRequest {
1312    fn typename() -> &'static str {
1313        "type.googleapis.com/google.appengine.v1.CreateApplicationRequest"
1314    }
1315}
1316
1317/// Request message for `Applications.UpdateApplication`.
1318#[derive(Clone, Default, PartialEq)]
1319#[non_exhaustive]
1320pub struct UpdateApplicationRequest {
1321    /// Name of the Application resource to update. Example: `apps/myapp`.
1322    pub name: std::string::String,
1323
1324    /// An Application containing the updated resource.
1325    pub application: std::option::Option<crate::model::Application>,
1326
1327    /// Required. Standard field mask for the set of fields to be updated.
1328    pub update_mask: std::option::Option<wkt::FieldMask>,
1329
1330    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1331}
1332
1333impl UpdateApplicationRequest {
1334    pub fn new() -> Self {
1335        std::default::Default::default()
1336    }
1337
1338    /// Sets the value of [name][crate::model::UpdateApplicationRequest::name].
1339    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1340        self.name = v.into();
1341        self
1342    }
1343
1344    /// Sets the value of [application][crate::model::UpdateApplicationRequest::application].
1345    pub fn set_application<T>(mut self, v: T) -> Self
1346    where
1347        T: std::convert::Into<crate::model::Application>,
1348    {
1349        self.application = std::option::Option::Some(v.into());
1350        self
1351    }
1352
1353    /// Sets or clears the value of [application][crate::model::UpdateApplicationRequest::application].
1354    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
1355    where
1356        T: std::convert::Into<crate::model::Application>,
1357    {
1358        self.application = v.map(|x| x.into());
1359        self
1360    }
1361
1362    /// Sets the value of [update_mask][crate::model::UpdateApplicationRequest::update_mask].
1363    pub fn set_update_mask<T>(mut self, v: T) -> Self
1364    where
1365        T: std::convert::Into<wkt::FieldMask>,
1366    {
1367        self.update_mask = std::option::Option::Some(v.into());
1368        self
1369    }
1370
1371    /// Sets or clears the value of [update_mask][crate::model::UpdateApplicationRequest::update_mask].
1372    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1373    where
1374        T: std::convert::Into<wkt::FieldMask>,
1375    {
1376        self.update_mask = v.map(|x| x.into());
1377        self
1378    }
1379}
1380
1381impl wkt::message::Message for UpdateApplicationRequest {
1382    fn typename() -> &'static str {
1383        "type.googleapis.com/google.appengine.v1.UpdateApplicationRequest"
1384    }
1385}
1386
1387/// Request message for 'Applications.RepairApplication'.
1388#[derive(Clone, Default, PartialEq)]
1389#[non_exhaustive]
1390pub struct RepairApplicationRequest {
1391    /// Name of the application to repair. Example: `apps/myapp`
1392    pub name: std::string::String,
1393
1394    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1395}
1396
1397impl RepairApplicationRequest {
1398    pub fn new() -> Self {
1399        std::default::Default::default()
1400    }
1401
1402    /// Sets the value of [name][crate::model::RepairApplicationRequest::name].
1403    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1404        self.name = v.into();
1405        self
1406    }
1407}
1408
1409impl wkt::message::Message for RepairApplicationRequest {
1410    fn typename() -> &'static str {
1411        "type.googleapis.com/google.appengine.v1.RepairApplicationRequest"
1412    }
1413}
1414
1415/// Request message for `Services.ListServices`.
1416#[derive(Clone, Default, PartialEq)]
1417#[non_exhaustive]
1418pub struct ListServicesRequest {
1419    /// Name of the parent Application resource. Example: `apps/myapp`.
1420    pub parent: std::string::String,
1421
1422    /// Maximum results to return per page.
1423    pub page_size: i32,
1424
1425    /// Continuation token for fetching the next page of results.
1426    pub page_token: std::string::String,
1427
1428    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1429}
1430
1431impl ListServicesRequest {
1432    pub fn new() -> Self {
1433        std::default::Default::default()
1434    }
1435
1436    /// Sets the value of [parent][crate::model::ListServicesRequest::parent].
1437    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1438        self.parent = v.into();
1439        self
1440    }
1441
1442    /// Sets the value of [page_size][crate::model::ListServicesRequest::page_size].
1443    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1444        self.page_size = v.into();
1445        self
1446    }
1447
1448    /// Sets the value of [page_token][crate::model::ListServicesRequest::page_token].
1449    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1450        self.page_token = v.into();
1451        self
1452    }
1453}
1454
1455impl wkt::message::Message for ListServicesRequest {
1456    fn typename() -> &'static str {
1457        "type.googleapis.com/google.appengine.v1.ListServicesRequest"
1458    }
1459}
1460
1461/// Response message for `Services.ListServices`.
1462#[derive(Clone, Default, PartialEq)]
1463#[non_exhaustive]
1464pub struct ListServicesResponse {
1465    /// The services belonging to the requested application.
1466    pub services: std::vec::Vec<crate::model::Service>,
1467
1468    /// Continuation token for fetching the next page of results.
1469    pub next_page_token: std::string::String,
1470
1471    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1472}
1473
1474impl ListServicesResponse {
1475    pub fn new() -> Self {
1476        std::default::Default::default()
1477    }
1478
1479    /// Sets the value of [services][crate::model::ListServicesResponse::services].
1480    pub fn set_services<T, V>(mut self, v: T) -> Self
1481    where
1482        T: std::iter::IntoIterator<Item = V>,
1483        V: std::convert::Into<crate::model::Service>,
1484    {
1485        use std::iter::Iterator;
1486        self.services = v.into_iter().map(|i| i.into()).collect();
1487        self
1488    }
1489
1490    /// Sets the value of [next_page_token][crate::model::ListServicesResponse::next_page_token].
1491    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1492        self.next_page_token = v.into();
1493        self
1494    }
1495}
1496
1497impl wkt::message::Message for ListServicesResponse {
1498    fn typename() -> &'static str {
1499        "type.googleapis.com/google.appengine.v1.ListServicesResponse"
1500    }
1501}
1502
1503#[doc(hidden)]
1504impl gax::paginator::internal::PageableResponse for ListServicesResponse {
1505    type PageItem = crate::model::Service;
1506
1507    fn items(self) -> std::vec::Vec<Self::PageItem> {
1508        self.services
1509    }
1510
1511    fn next_page_token(&self) -> std::string::String {
1512        use std::clone::Clone;
1513        self.next_page_token.clone()
1514    }
1515}
1516
1517/// Request message for `Services.GetService`.
1518#[derive(Clone, Default, PartialEq)]
1519#[non_exhaustive]
1520pub struct GetServiceRequest {
1521    /// Name of the resource requested. Example: `apps/myapp/services/default`.
1522    pub name: std::string::String,
1523
1524    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1525}
1526
1527impl GetServiceRequest {
1528    pub fn new() -> Self {
1529        std::default::Default::default()
1530    }
1531
1532    /// Sets the value of [name][crate::model::GetServiceRequest::name].
1533    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1534        self.name = v.into();
1535        self
1536    }
1537}
1538
1539impl wkt::message::Message for GetServiceRequest {
1540    fn typename() -> &'static str {
1541        "type.googleapis.com/google.appengine.v1.GetServiceRequest"
1542    }
1543}
1544
1545/// Request message for `Services.UpdateService`.
1546#[derive(Clone, Default, PartialEq)]
1547#[non_exhaustive]
1548pub struct UpdateServiceRequest {
1549    /// Name of the resource to update. Example: `apps/myapp/services/default`.
1550    pub name: std::string::String,
1551
1552    /// A Service resource containing the updated service. Only fields set in the
1553    /// field mask will be updated.
1554    pub service: std::option::Option<crate::model::Service>,
1555
1556    /// Required. Standard field mask for the set of fields to be updated.
1557    pub update_mask: std::option::Option<wkt::FieldMask>,
1558
1559    /// Set to `true` to gradually shift traffic to one or more versions that you
1560    /// specify. By default, traffic is shifted immediately.
1561    /// For gradual traffic migration, the target versions
1562    /// must be located within instances that are configured for both
1563    /// [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
1564    /// and
1565    /// [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
1566    /// You must specify the
1567    /// [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
1568    /// field in the Service resource. Gradual traffic migration is not
1569    /// supported in the App Engine flexible environment. For examples, see
1570    /// [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
1571    pub migrate_traffic: bool,
1572
1573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1574}
1575
1576impl UpdateServiceRequest {
1577    pub fn new() -> Self {
1578        std::default::Default::default()
1579    }
1580
1581    /// Sets the value of [name][crate::model::UpdateServiceRequest::name].
1582    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1583        self.name = v.into();
1584        self
1585    }
1586
1587    /// Sets the value of [service][crate::model::UpdateServiceRequest::service].
1588    pub fn set_service<T>(mut self, v: T) -> Self
1589    where
1590        T: std::convert::Into<crate::model::Service>,
1591    {
1592        self.service = std::option::Option::Some(v.into());
1593        self
1594    }
1595
1596    /// Sets or clears the value of [service][crate::model::UpdateServiceRequest::service].
1597    pub fn set_or_clear_service<T>(mut self, v: std::option::Option<T>) -> Self
1598    where
1599        T: std::convert::Into<crate::model::Service>,
1600    {
1601        self.service = v.map(|x| x.into());
1602        self
1603    }
1604
1605    /// Sets the value of [update_mask][crate::model::UpdateServiceRequest::update_mask].
1606    pub fn set_update_mask<T>(mut self, v: T) -> Self
1607    where
1608        T: std::convert::Into<wkt::FieldMask>,
1609    {
1610        self.update_mask = std::option::Option::Some(v.into());
1611        self
1612    }
1613
1614    /// Sets or clears the value of [update_mask][crate::model::UpdateServiceRequest::update_mask].
1615    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1616    where
1617        T: std::convert::Into<wkt::FieldMask>,
1618    {
1619        self.update_mask = v.map(|x| x.into());
1620        self
1621    }
1622
1623    /// Sets the value of [migrate_traffic][crate::model::UpdateServiceRequest::migrate_traffic].
1624    pub fn set_migrate_traffic<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1625        self.migrate_traffic = v.into();
1626        self
1627    }
1628}
1629
1630impl wkt::message::Message for UpdateServiceRequest {
1631    fn typename() -> &'static str {
1632        "type.googleapis.com/google.appengine.v1.UpdateServiceRequest"
1633    }
1634}
1635
1636/// Request message for `Services.DeleteService`.
1637#[derive(Clone, Default, PartialEq)]
1638#[non_exhaustive]
1639pub struct DeleteServiceRequest {
1640    /// Name of the resource requested. Example: `apps/myapp/services/default`.
1641    pub name: std::string::String,
1642
1643    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1644}
1645
1646impl DeleteServiceRequest {
1647    pub fn new() -> Self {
1648        std::default::Default::default()
1649    }
1650
1651    /// Sets the value of [name][crate::model::DeleteServiceRequest::name].
1652    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1653        self.name = v.into();
1654        self
1655    }
1656}
1657
1658impl wkt::message::Message for DeleteServiceRequest {
1659    fn typename() -> &'static str {
1660        "type.googleapis.com/google.appengine.v1.DeleteServiceRequest"
1661    }
1662}
1663
1664/// Request message for `Versions.ListVersions`.
1665#[derive(Clone, Default, PartialEq)]
1666#[non_exhaustive]
1667pub struct ListVersionsRequest {
1668    /// Name of the parent Service resource. Example:
1669    /// `apps/myapp/services/default`.
1670    pub parent: std::string::String,
1671
1672    /// Controls the set of fields returned in the `List` response.
1673    pub view: crate::model::VersionView,
1674
1675    /// Maximum results to return per page.
1676    pub page_size: i32,
1677
1678    /// Continuation token for fetching the next page of results.
1679    pub page_token: std::string::String,
1680
1681    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1682}
1683
1684impl ListVersionsRequest {
1685    pub fn new() -> Self {
1686        std::default::Default::default()
1687    }
1688
1689    /// Sets the value of [parent][crate::model::ListVersionsRequest::parent].
1690    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1691        self.parent = v.into();
1692        self
1693    }
1694
1695    /// Sets the value of [view][crate::model::ListVersionsRequest::view].
1696    pub fn set_view<T: std::convert::Into<crate::model::VersionView>>(mut self, v: T) -> Self {
1697        self.view = v.into();
1698        self
1699    }
1700
1701    /// Sets the value of [page_size][crate::model::ListVersionsRequest::page_size].
1702    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1703        self.page_size = v.into();
1704        self
1705    }
1706
1707    /// Sets the value of [page_token][crate::model::ListVersionsRequest::page_token].
1708    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1709        self.page_token = v.into();
1710        self
1711    }
1712}
1713
1714impl wkt::message::Message for ListVersionsRequest {
1715    fn typename() -> &'static str {
1716        "type.googleapis.com/google.appengine.v1.ListVersionsRequest"
1717    }
1718}
1719
1720/// Response message for `Versions.ListVersions`.
1721#[derive(Clone, Default, PartialEq)]
1722#[non_exhaustive]
1723pub struct ListVersionsResponse {
1724    /// The versions belonging to the requested service.
1725    pub versions: std::vec::Vec<crate::model::Version>,
1726
1727    /// Continuation token for fetching the next page of results.
1728    pub next_page_token: std::string::String,
1729
1730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1731}
1732
1733impl ListVersionsResponse {
1734    pub fn new() -> Self {
1735        std::default::Default::default()
1736    }
1737
1738    /// Sets the value of [versions][crate::model::ListVersionsResponse::versions].
1739    pub fn set_versions<T, V>(mut self, v: T) -> Self
1740    where
1741        T: std::iter::IntoIterator<Item = V>,
1742        V: std::convert::Into<crate::model::Version>,
1743    {
1744        use std::iter::Iterator;
1745        self.versions = v.into_iter().map(|i| i.into()).collect();
1746        self
1747    }
1748
1749    /// Sets the value of [next_page_token][crate::model::ListVersionsResponse::next_page_token].
1750    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1751        self.next_page_token = v.into();
1752        self
1753    }
1754}
1755
1756impl wkt::message::Message for ListVersionsResponse {
1757    fn typename() -> &'static str {
1758        "type.googleapis.com/google.appengine.v1.ListVersionsResponse"
1759    }
1760}
1761
1762#[doc(hidden)]
1763impl gax::paginator::internal::PageableResponse for ListVersionsResponse {
1764    type PageItem = crate::model::Version;
1765
1766    fn items(self) -> std::vec::Vec<Self::PageItem> {
1767        self.versions
1768    }
1769
1770    fn next_page_token(&self) -> std::string::String {
1771        use std::clone::Clone;
1772        self.next_page_token.clone()
1773    }
1774}
1775
1776/// Request message for `Versions.GetVersion`.
1777#[derive(Clone, Default, PartialEq)]
1778#[non_exhaustive]
1779pub struct GetVersionRequest {
1780    /// Name of the resource requested. Example:
1781    /// `apps/myapp/services/default/versions/v1`.
1782    pub name: std::string::String,
1783
1784    /// Controls the set of fields returned in the `Get` response.
1785    pub view: crate::model::VersionView,
1786
1787    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1788}
1789
1790impl GetVersionRequest {
1791    pub fn new() -> Self {
1792        std::default::Default::default()
1793    }
1794
1795    /// Sets the value of [name][crate::model::GetVersionRequest::name].
1796    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1797        self.name = v.into();
1798        self
1799    }
1800
1801    /// Sets the value of [view][crate::model::GetVersionRequest::view].
1802    pub fn set_view<T: std::convert::Into<crate::model::VersionView>>(mut self, v: T) -> Self {
1803        self.view = v.into();
1804        self
1805    }
1806}
1807
1808impl wkt::message::Message for GetVersionRequest {
1809    fn typename() -> &'static str {
1810        "type.googleapis.com/google.appengine.v1.GetVersionRequest"
1811    }
1812}
1813
1814/// Request message for `Versions.CreateVersion`.
1815#[derive(Clone, Default, PartialEq)]
1816#[non_exhaustive]
1817pub struct CreateVersionRequest {
1818    /// Name of the parent resource to create this version under. Example:
1819    /// `apps/myapp/services/default`.
1820    pub parent: std::string::String,
1821
1822    /// Application deployment configuration.
1823    pub version: std::option::Option<crate::model::Version>,
1824
1825    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1826}
1827
1828impl CreateVersionRequest {
1829    pub fn new() -> Self {
1830        std::default::Default::default()
1831    }
1832
1833    /// Sets the value of [parent][crate::model::CreateVersionRequest::parent].
1834    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1835        self.parent = v.into();
1836        self
1837    }
1838
1839    /// Sets the value of [version][crate::model::CreateVersionRequest::version].
1840    pub fn set_version<T>(mut self, v: T) -> Self
1841    where
1842        T: std::convert::Into<crate::model::Version>,
1843    {
1844        self.version = std::option::Option::Some(v.into());
1845        self
1846    }
1847
1848    /// Sets or clears the value of [version][crate::model::CreateVersionRequest::version].
1849    pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
1850    where
1851        T: std::convert::Into<crate::model::Version>,
1852    {
1853        self.version = v.map(|x| x.into());
1854        self
1855    }
1856}
1857
1858impl wkt::message::Message for CreateVersionRequest {
1859    fn typename() -> &'static str {
1860        "type.googleapis.com/google.appengine.v1.CreateVersionRequest"
1861    }
1862}
1863
1864/// Request message for `Versions.UpdateVersion`.
1865#[derive(Clone, Default, PartialEq)]
1866#[non_exhaustive]
1867pub struct UpdateVersionRequest {
1868    /// Name of the resource to update. Example:
1869    /// `apps/myapp/services/default/versions/1`.
1870    pub name: std::string::String,
1871
1872    /// A Version containing the updated resource. Only fields set in the field
1873    /// mask will be updated.
1874    pub version: std::option::Option<crate::model::Version>,
1875
1876    /// Standard field mask for the set of fields to be updated.
1877    pub update_mask: std::option::Option<wkt::FieldMask>,
1878
1879    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1880}
1881
1882impl UpdateVersionRequest {
1883    pub fn new() -> Self {
1884        std::default::Default::default()
1885    }
1886
1887    /// Sets the value of [name][crate::model::UpdateVersionRequest::name].
1888    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1889        self.name = v.into();
1890        self
1891    }
1892
1893    /// Sets the value of [version][crate::model::UpdateVersionRequest::version].
1894    pub fn set_version<T>(mut self, v: T) -> Self
1895    where
1896        T: std::convert::Into<crate::model::Version>,
1897    {
1898        self.version = std::option::Option::Some(v.into());
1899        self
1900    }
1901
1902    /// Sets or clears the value of [version][crate::model::UpdateVersionRequest::version].
1903    pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
1904    where
1905        T: std::convert::Into<crate::model::Version>,
1906    {
1907        self.version = v.map(|x| x.into());
1908        self
1909    }
1910
1911    /// Sets the value of [update_mask][crate::model::UpdateVersionRequest::update_mask].
1912    pub fn set_update_mask<T>(mut self, v: T) -> Self
1913    where
1914        T: std::convert::Into<wkt::FieldMask>,
1915    {
1916        self.update_mask = std::option::Option::Some(v.into());
1917        self
1918    }
1919
1920    /// Sets or clears the value of [update_mask][crate::model::UpdateVersionRequest::update_mask].
1921    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1922    where
1923        T: std::convert::Into<wkt::FieldMask>,
1924    {
1925        self.update_mask = v.map(|x| x.into());
1926        self
1927    }
1928}
1929
1930impl wkt::message::Message for UpdateVersionRequest {
1931    fn typename() -> &'static str {
1932        "type.googleapis.com/google.appengine.v1.UpdateVersionRequest"
1933    }
1934}
1935
1936/// Request message for `Versions.DeleteVersion`.
1937#[derive(Clone, Default, PartialEq)]
1938#[non_exhaustive]
1939pub struct DeleteVersionRequest {
1940    /// Name of the resource requested. Example:
1941    /// `apps/myapp/services/default/versions/v1`.
1942    pub name: std::string::String,
1943
1944    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1945}
1946
1947impl DeleteVersionRequest {
1948    pub fn new() -> Self {
1949        std::default::Default::default()
1950    }
1951
1952    /// Sets the value of [name][crate::model::DeleteVersionRequest::name].
1953    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1954        self.name = v.into();
1955        self
1956    }
1957}
1958
1959impl wkt::message::Message for DeleteVersionRequest {
1960    fn typename() -> &'static str {
1961        "type.googleapis.com/google.appengine.v1.DeleteVersionRequest"
1962    }
1963}
1964
1965/// Request message for `Instances.ListInstances`.
1966#[derive(Clone, Default, PartialEq)]
1967#[non_exhaustive]
1968pub struct ListInstancesRequest {
1969    /// Name of the parent Version resource. Example:
1970    /// `apps/myapp/services/default/versions/v1`.
1971    pub parent: std::string::String,
1972
1973    /// Maximum results to return per page.
1974    pub page_size: i32,
1975
1976    /// Continuation token for fetching the next page of results.
1977    pub page_token: std::string::String,
1978
1979    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1980}
1981
1982impl ListInstancesRequest {
1983    pub fn new() -> Self {
1984        std::default::Default::default()
1985    }
1986
1987    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
1988    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1989        self.parent = v.into();
1990        self
1991    }
1992
1993    /// Sets the value of [page_size][crate::model::ListInstancesRequest::page_size].
1994    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1995        self.page_size = v.into();
1996        self
1997    }
1998
1999    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
2000    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2001        self.page_token = v.into();
2002        self
2003    }
2004}
2005
2006impl wkt::message::Message for ListInstancesRequest {
2007    fn typename() -> &'static str {
2008        "type.googleapis.com/google.appengine.v1.ListInstancesRequest"
2009    }
2010}
2011
2012/// Response message for `Instances.ListInstances`.
2013#[derive(Clone, Default, PartialEq)]
2014#[non_exhaustive]
2015pub struct ListInstancesResponse {
2016    /// The instances belonging to the requested version.
2017    pub instances: std::vec::Vec<crate::model::Instance>,
2018
2019    /// Continuation token for fetching the next page of results.
2020    pub next_page_token: std::string::String,
2021
2022    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2023}
2024
2025impl ListInstancesResponse {
2026    pub fn new() -> Self {
2027        std::default::Default::default()
2028    }
2029
2030    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
2031    pub fn set_instances<T, V>(mut self, v: T) -> Self
2032    where
2033        T: std::iter::IntoIterator<Item = V>,
2034        V: std::convert::Into<crate::model::Instance>,
2035    {
2036        use std::iter::Iterator;
2037        self.instances = v.into_iter().map(|i| i.into()).collect();
2038        self
2039    }
2040
2041    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
2042    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2043        self.next_page_token = v.into();
2044        self
2045    }
2046}
2047
2048impl wkt::message::Message for ListInstancesResponse {
2049    fn typename() -> &'static str {
2050        "type.googleapis.com/google.appengine.v1.ListInstancesResponse"
2051    }
2052}
2053
2054#[doc(hidden)]
2055impl gax::paginator::internal::PageableResponse for ListInstancesResponse {
2056    type PageItem = crate::model::Instance;
2057
2058    fn items(self) -> std::vec::Vec<Self::PageItem> {
2059        self.instances
2060    }
2061
2062    fn next_page_token(&self) -> std::string::String {
2063        use std::clone::Clone;
2064        self.next_page_token.clone()
2065    }
2066}
2067
2068/// Request message for `Instances.GetInstance`.
2069#[derive(Clone, Default, PartialEq)]
2070#[non_exhaustive]
2071pub struct GetInstanceRequest {
2072    /// Name of the resource requested. Example:
2073    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2074    pub name: std::string::String,
2075
2076    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2077}
2078
2079impl GetInstanceRequest {
2080    pub fn new() -> Self {
2081        std::default::Default::default()
2082    }
2083
2084    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
2085    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2086        self.name = v.into();
2087        self
2088    }
2089}
2090
2091impl wkt::message::Message for GetInstanceRequest {
2092    fn typename() -> &'static str {
2093        "type.googleapis.com/google.appengine.v1.GetInstanceRequest"
2094    }
2095}
2096
2097/// Request message for `Instances.DeleteInstance`.
2098#[derive(Clone, Default, PartialEq)]
2099#[non_exhaustive]
2100pub struct DeleteInstanceRequest {
2101    /// Name of the resource requested. Example:
2102    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2103    pub name: std::string::String,
2104
2105    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2106}
2107
2108impl DeleteInstanceRequest {
2109    pub fn new() -> Self {
2110        std::default::Default::default()
2111    }
2112
2113    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
2114    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2115        self.name = v.into();
2116        self
2117    }
2118}
2119
2120impl wkt::message::Message for DeleteInstanceRequest {
2121    fn typename() -> &'static str {
2122        "type.googleapis.com/google.appengine.v1.DeleteInstanceRequest"
2123    }
2124}
2125
2126/// Request message for `Instances.DebugInstance`.
2127#[derive(Clone, Default, PartialEq)]
2128#[non_exhaustive]
2129pub struct DebugInstanceRequest {
2130    /// Name of the resource requested. Example:
2131    /// `apps/myapp/services/default/versions/v1/instances/instance-1`.
2132    pub name: std::string::String,
2133
2134    /// Public SSH key to add to the instance. Examples:
2135    ///
2136    /// * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
2137    /// * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
2138    ///
2139    /// For more information, see
2140    /// [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
2141    pub ssh_key: std::string::String,
2142
2143    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2144}
2145
2146impl DebugInstanceRequest {
2147    pub fn new() -> Self {
2148        std::default::Default::default()
2149    }
2150
2151    /// Sets the value of [name][crate::model::DebugInstanceRequest::name].
2152    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2153        self.name = v.into();
2154        self
2155    }
2156
2157    /// Sets the value of [ssh_key][crate::model::DebugInstanceRequest::ssh_key].
2158    pub fn set_ssh_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2159        self.ssh_key = v.into();
2160        self
2161    }
2162}
2163
2164impl wkt::message::Message for DebugInstanceRequest {
2165    fn typename() -> &'static str {
2166        "type.googleapis.com/google.appengine.v1.DebugInstanceRequest"
2167    }
2168}
2169
2170/// Request message for `Firewall.ListIngressRules`.
2171#[derive(Clone, Default, PartialEq)]
2172#[non_exhaustive]
2173pub struct ListIngressRulesRequest {
2174    /// Name of the Firewall collection to retrieve.
2175    /// Example: `apps/myapp/firewall/ingressRules`.
2176    pub parent: std::string::String,
2177
2178    /// Maximum results to return per page.
2179    pub page_size: i32,
2180
2181    /// Continuation token for fetching the next page of results.
2182    pub page_token: std::string::String,
2183
2184    /// A valid IP Address. If set, only rules matching this address will be
2185    /// returned. The first returned rule will be the rule that fires on requests
2186    /// from this IP.
2187    pub matching_address: std::string::String,
2188
2189    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2190}
2191
2192impl ListIngressRulesRequest {
2193    pub fn new() -> Self {
2194        std::default::Default::default()
2195    }
2196
2197    /// Sets the value of [parent][crate::model::ListIngressRulesRequest::parent].
2198    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2199        self.parent = v.into();
2200        self
2201    }
2202
2203    /// Sets the value of [page_size][crate::model::ListIngressRulesRequest::page_size].
2204    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2205        self.page_size = v.into();
2206        self
2207    }
2208
2209    /// Sets the value of [page_token][crate::model::ListIngressRulesRequest::page_token].
2210    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2211        self.page_token = v.into();
2212        self
2213    }
2214
2215    /// Sets the value of [matching_address][crate::model::ListIngressRulesRequest::matching_address].
2216    pub fn set_matching_address<T: std::convert::Into<std::string::String>>(
2217        mut self,
2218        v: T,
2219    ) -> Self {
2220        self.matching_address = v.into();
2221        self
2222    }
2223}
2224
2225impl wkt::message::Message for ListIngressRulesRequest {
2226    fn typename() -> &'static str {
2227        "type.googleapis.com/google.appengine.v1.ListIngressRulesRequest"
2228    }
2229}
2230
2231/// Response message for `Firewall.ListIngressRules`.
2232#[derive(Clone, Default, PartialEq)]
2233#[non_exhaustive]
2234pub struct ListIngressRulesResponse {
2235    /// The ingress FirewallRules for this application.
2236    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
2237
2238    /// Continuation token for fetching the next page of results.
2239    pub next_page_token: std::string::String,
2240
2241    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2242}
2243
2244impl ListIngressRulesResponse {
2245    pub fn new() -> Self {
2246        std::default::Default::default()
2247    }
2248
2249    /// Sets the value of [ingress_rules][crate::model::ListIngressRulesResponse::ingress_rules].
2250    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
2251    where
2252        T: std::iter::IntoIterator<Item = V>,
2253        V: std::convert::Into<crate::model::FirewallRule>,
2254    {
2255        use std::iter::Iterator;
2256        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
2257        self
2258    }
2259
2260    /// Sets the value of [next_page_token][crate::model::ListIngressRulesResponse::next_page_token].
2261    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2262        self.next_page_token = v.into();
2263        self
2264    }
2265}
2266
2267impl wkt::message::Message for ListIngressRulesResponse {
2268    fn typename() -> &'static str {
2269        "type.googleapis.com/google.appengine.v1.ListIngressRulesResponse"
2270    }
2271}
2272
2273#[doc(hidden)]
2274impl gax::paginator::internal::PageableResponse for ListIngressRulesResponse {
2275    type PageItem = crate::model::FirewallRule;
2276
2277    fn items(self) -> std::vec::Vec<Self::PageItem> {
2278        self.ingress_rules
2279    }
2280
2281    fn next_page_token(&self) -> std::string::String {
2282        use std::clone::Clone;
2283        self.next_page_token.clone()
2284    }
2285}
2286
2287/// Request message for `Firewall.BatchUpdateIngressRules`.
2288#[derive(Clone, Default, PartialEq)]
2289#[non_exhaustive]
2290pub struct BatchUpdateIngressRulesRequest {
2291    /// Name of the Firewall collection to set.
2292    /// Example: `apps/myapp/firewall/ingressRules`.
2293    pub name: std::string::String,
2294
2295    /// A list of FirewallRules to replace the existing set.
2296    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
2297
2298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2299}
2300
2301impl BatchUpdateIngressRulesRequest {
2302    pub fn new() -> Self {
2303        std::default::Default::default()
2304    }
2305
2306    /// Sets the value of [name][crate::model::BatchUpdateIngressRulesRequest::name].
2307    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2308        self.name = v.into();
2309        self
2310    }
2311
2312    /// Sets the value of [ingress_rules][crate::model::BatchUpdateIngressRulesRequest::ingress_rules].
2313    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
2314    where
2315        T: std::iter::IntoIterator<Item = V>,
2316        V: std::convert::Into<crate::model::FirewallRule>,
2317    {
2318        use std::iter::Iterator;
2319        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
2320        self
2321    }
2322}
2323
2324impl wkt::message::Message for BatchUpdateIngressRulesRequest {
2325    fn typename() -> &'static str {
2326        "type.googleapis.com/google.appengine.v1.BatchUpdateIngressRulesRequest"
2327    }
2328}
2329
2330/// Response message for `Firewall.UpdateAllIngressRules`.
2331#[derive(Clone, Default, PartialEq)]
2332#[non_exhaustive]
2333pub struct BatchUpdateIngressRulesResponse {
2334    /// The full list of ingress FirewallRules for this application.
2335    pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
2336
2337    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2338}
2339
2340impl BatchUpdateIngressRulesResponse {
2341    pub fn new() -> Self {
2342        std::default::Default::default()
2343    }
2344
2345    /// Sets the value of [ingress_rules][crate::model::BatchUpdateIngressRulesResponse::ingress_rules].
2346    pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
2347    where
2348        T: std::iter::IntoIterator<Item = V>,
2349        V: std::convert::Into<crate::model::FirewallRule>,
2350    {
2351        use std::iter::Iterator;
2352        self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
2353        self
2354    }
2355}
2356
2357impl wkt::message::Message for BatchUpdateIngressRulesResponse {
2358    fn typename() -> &'static str {
2359        "type.googleapis.com/google.appengine.v1.BatchUpdateIngressRulesResponse"
2360    }
2361}
2362
2363/// Request message for `Firewall.CreateIngressRule`.
2364#[derive(Clone, Default, PartialEq)]
2365#[non_exhaustive]
2366pub struct CreateIngressRuleRequest {
2367    /// Name of the parent Firewall collection in which to create a new rule.
2368    /// Example: `apps/myapp/firewall/ingressRules`.
2369    pub parent: std::string::String,
2370
2371    /// A FirewallRule containing the new resource.
2372    ///
2373    /// The user may optionally provide a position at which the new rule will be
2374    /// placed. The positions define a sequential list starting at 1. If a rule
2375    /// already exists at the given position, rules greater than the provided
2376    /// position will be moved forward by one.
2377    ///
2378    /// If no position is provided, the server will place the rule as the second to
2379    /// last rule in the sequence before the required default allow-all or deny-all
2380    /// rule.
2381    pub rule: std::option::Option<crate::model::FirewallRule>,
2382
2383    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2384}
2385
2386impl CreateIngressRuleRequest {
2387    pub fn new() -> Self {
2388        std::default::Default::default()
2389    }
2390
2391    /// Sets the value of [parent][crate::model::CreateIngressRuleRequest::parent].
2392    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2393        self.parent = v.into();
2394        self
2395    }
2396
2397    /// Sets the value of [rule][crate::model::CreateIngressRuleRequest::rule].
2398    pub fn set_rule<T>(mut self, v: T) -> Self
2399    where
2400        T: std::convert::Into<crate::model::FirewallRule>,
2401    {
2402        self.rule = std::option::Option::Some(v.into());
2403        self
2404    }
2405
2406    /// Sets or clears the value of [rule][crate::model::CreateIngressRuleRequest::rule].
2407    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
2408    where
2409        T: std::convert::Into<crate::model::FirewallRule>,
2410    {
2411        self.rule = v.map(|x| x.into());
2412        self
2413    }
2414}
2415
2416impl wkt::message::Message for CreateIngressRuleRequest {
2417    fn typename() -> &'static str {
2418        "type.googleapis.com/google.appengine.v1.CreateIngressRuleRequest"
2419    }
2420}
2421
2422/// Request message for `Firewall.GetIngressRule`.
2423#[derive(Clone, Default, PartialEq)]
2424#[non_exhaustive]
2425pub struct GetIngressRuleRequest {
2426    /// Name of the Firewall resource to retrieve.
2427    /// Example: `apps/myapp/firewall/ingressRules/100`.
2428    pub name: std::string::String,
2429
2430    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2431}
2432
2433impl GetIngressRuleRequest {
2434    pub fn new() -> Self {
2435        std::default::Default::default()
2436    }
2437
2438    /// Sets the value of [name][crate::model::GetIngressRuleRequest::name].
2439    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2440        self.name = v.into();
2441        self
2442    }
2443}
2444
2445impl wkt::message::Message for GetIngressRuleRequest {
2446    fn typename() -> &'static str {
2447        "type.googleapis.com/google.appengine.v1.GetIngressRuleRequest"
2448    }
2449}
2450
2451/// Request message for `Firewall.UpdateIngressRule`.
2452#[derive(Clone, Default, PartialEq)]
2453#[non_exhaustive]
2454pub struct UpdateIngressRuleRequest {
2455    /// Name of the Firewall resource to update.
2456    /// Example: `apps/myapp/firewall/ingressRules/100`.
2457    pub name: std::string::String,
2458
2459    /// A FirewallRule containing the updated resource
2460    pub rule: std::option::Option<crate::model::FirewallRule>,
2461
2462    /// Standard field mask for the set of fields to be updated.
2463    pub update_mask: std::option::Option<wkt::FieldMask>,
2464
2465    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2466}
2467
2468impl UpdateIngressRuleRequest {
2469    pub fn new() -> Self {
2470        std::default::Default::default()
2471    }
2472
2473    /// Sets the value of [name][crate::model::UpdateIngressRuleRequest::name].
2474    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2475        self.name = v.into();
2476        self
2477    }
2478
2479    /// Sets the value of [rule][crate::model::UpdateIngressRuleRequest::rule].
2480    pub fn set_rule<T>(mut self, v: T) -> Self
2481    where
2482        T: std::convert::Into<crate::model::FirewallRule>,
2483    {
2484        self.rule = std::option::Option::Some(v.into());
2485        self
2486    }
2487
2488    /// Sets or clears the value of [rule][crate::model::UpdateIngressRuleRequest::rule].
2489    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
2490    where
2491        T: std::convert::Into<crate::model::FirewallRule>,
2492    {
2493        self.rule = v.map(|x| x.into());
2494        self
2495    }
2496
2497    /// Sets the value of [update_mask][crate::model::UpdateIngressRuleRequest::update_mask].
2498    pub fn set_update_mask<T>(mut self, v: T) -> Self
2499    where
2500        T: std::convert::Into<wkt::FieldMask>,
2501    {
2502        self.update_mask = std::option::Option::Some(v.into());
2503        self
2504    }
2505
2506    /// Sets or clears the value of [update_mask][crate::model::UpdateIngressRuleRequest::update_mask].
2507    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2508    where
2509        T: std::convert::Into<wkt::FieldMask>,
2510    {
2511        self.update_mask = v.map(|x| x.into());
2512        self
2513    }
2514}
2515
2516impl wkt::message::Message for UpdateIngressRuleRequest {
2517    fn typename() -> &'static str {
2518        "type.googleapis.com/google.appengine.v1.UpdateIngressRuleRequest"
2519    }
2520}
2521
2522/// Request message for `Firewall.DeleteIngressRule`.
2523#[derive(Clone, Default, PartialEq)]
2524#[non_exhaustive]
2525pub struct DeleteIngressRuleRequest {
2526    /// Name of the Firewall resource to delete.
2527    /// Example: `apps/myapp/firewall/ingressRules/100`.
2528    pub name: std::string::String,
2529
2530    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2531}
2532
2533impl DeleteIngressRuleRequest {
2534    pub fn new() -> Self {
2535        std::default::Default::default()
2536    }
2537
2538    /// Sets the value of [name][crate::model::DeleteIngressRuleRequest::name].
2539    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2540        self.name = v.into();
2541        self
2542    }
2543}
2544
2545impl wkt::message::Message for DeleteIngressRuleRequest {
2546    fn typename() -> &'static str {
2547        "type.googleapis.com/google.appengine.v1.DeleteIngressRuleRequest"
2548    }
2549}
2550
2551/// Request message for `AuthorizedDomains.ListAuthorizedDomains`.
2552#[derive(Clone, Default, PartialEq)]
2553#[non_exhaustive]
2554pub struct ListAuthorizedDomainsRequest {
2555    /// Name of the parent Application resource. Example: `apps/myapp`.
2556    pub parent: std::string::String,
2557
2558    /// Maximum results to return per page.
2559    pub page_size: i32,
2560
2561    /// Continuation token for fetching the next page of results.
2562    pub page_token: std::string::String,
2563
2564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2565}
2566
2567impl ListAuthorizedDomainsRequest {
2568    pub fn new() -> Self {
2569        std::default::Default::default()
2570    }
2571
2572    /// Sets the value of [parent][crate::model::ListAuthorizedDomainsRequest::parent].
2573    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2574        self.parent = v.into();
2575        self
2576    }
2577
2578    /// Sets the value of [page_size][crate::model::ListAuthorizedDomainsRequest::page_size].
2579    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2580        self.page_size = v.into();
2581        self
2582    }
2583
2584    /// Sets the value of [page_token][crate::model::ListAuthorizedDomainsRequest::page_token].
2585    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2586        self.page_token = v.into();
2587        self
2588    }
2589}
2590
2591impl wkt::message::Message for ListAuthorizedDomainsRequest {
2592    fn typename() -> &'static str {
2593        "type.googleapis.com/google.appengine.v1.ListAuthorizedDomainsRequest"
2594    }
2595}
2596
2597/// Response message for `AuthorizedDomains.ListAuthorizedDomains`.
2598#[derive(Clone, Default, PartialEq)]
2599#[non_exhaustive]
2600pub struct ListAuthorizedDomainsResponse {
2601    /// The authorized domains belonging to the user.
2602    pub domains: std::vec::Vec<crate::model::AuthorizedDomain>,
2603
2604    /// Continuation token for fetching the next page of results.
2605    pub next_page_token: std::string::String,
2606
2607    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2608}
2609
2610impl ListAuthorizedDomainsResponse {
2611    pub fn new() -> Self {
2612        std::default::Default::default()
2613    }
2614
2615    /// Sets the value of [domains][crate::model::ListAuthorizedDomainsResponse::domains].
2616    pub fn set_domains<T, V>(mut self, v: T) -> Self
2617    where
2618        T: std::iter::IntoIterator<Item = V>,
2619        V: std::convert::Into<crate::model::AuthorizedDomain>,
2620    {
2621        use std::iter::Iterator;
2622        self.domains = v.into_iter().map(|i| i.into()).collect();
2623        self
2624    }
2625
2626    /// Sets the value of [next_page_token][crate::model::ListAuthorizedDomainsResponse::next_page_token].
2627    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2628        self.next_page_token = v.into();
2629        self
2630    }
2631}
2632
2633impl wkt::message::Message for ListAuthorizedDomainsResponse {
2634    fn typename() -> &'static str {
2635        "type.googleapis.com/google.appengine.v1.ListAuthorizedDomainsResponse"
2636    }
2637}
2638
2639#[doc(hidden)]
2640impl gax::paginator::internal::PageableResponse for ListAuthorizedDomainsResponse {
2641    type PageItem = crate::model::AuthorizedDomain;
2642
2643    fn items(self) -> std::vec::Vec<Self::PageItem> {
2644        self.domains
2645    }
2646
2647    fn next_page_token(&self) -> std::string::String {
2648        use std::clone::Clone;
2649        self.next_page_token.clone()
2650    }
2651}
2652
2653/// Request message for `AuthorizedCertificates.ListAuthorizedCertificates`.
2654#[derive(Clone, Default, PartialEq)]
2655#[non_exhaustive]
2656pub struct ListAuthorizedCertificatesRequest {
2657    /// Name of the parent `Application` resource. Example: `apps/myapp`.
2658    pub parent: std::string::String,
2659
2660    /// Controls the set of fields returned in the `LIST` response.
2661    pub view: crate::model::AuthorizedCertificateView,
2662
2663    /// Maximum results to return per page.
2664    pub page_size: i32,
2665
2666    /// Continuation token for fetching the next page of results.
2667    pub page_token: std::string::String,
2668
2669    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2670}
2671
2672impl ListAuthorizedCertificatesRequest {
2673    pub fn new() -> Self {
2674        std::default::Default::default()
2675    }
2676
2677    /// Sets the value of [parent][crate::model::ListAuthorizedCertificatesRequest::parent].
2678    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2679        self.parent = v.into();
2680        self
2681    }
2682
2683    /// Sets the value of [view][crate::model::ListAuthorizedCertificatesRequest::view].
2684    pub fn set_view<T: std::convert::Into<crate::model::AuthorizedCertificateView>>(
2685        mut self,
2686        v: T,
2687    ) -> Self {
2688        self.view = v.into();
2689        self
2690    }
2691
2692    /// Sets the value of [page_size][crate::model::ListAuthorizedCertificatesRequest::page_size].
2693    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2694        self.page_size = v.into();
2695        self
2696    }
2697
2698    /// Sets the value of [page_token][crate::model::ListAuthorizedCertificatesRequest::page_token].
2699    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2700        self.page_token = v.into();
2701        self
2702    }
2703}
2704
2705impl wkt::message::Message for ListAuthorizedCertificatesRequest {
2706    fn typename() -> &'static str {
2707        "type.googleapis.com/google.appengine.v1.ListAuthorizedCertificatesRequest"
2708    }
2709}
2710
2711/// Response message for `AuthorizedCertificates.ListAuthorizedCertificates`.
2712#[derive(Clone, Default, PartialEq)]
2713#[non_exhaustive]
2714pub struct ListAuthorizedCertificatesResponse {
2715    /// The SSL certificates the user is authorized to administer.
2716    pub certificates: std::vec::Vec<crate::model::AuthorizedCertificate>,
2717
2718    /// Continuation token for fetching the next page of results.
2719    pub next_page_token: std::string::String,
2720
2721    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2722}
2723
2724impl ListAuthorizedCertificatesResponse {
2725    pub fn new() -> Self {
2726        std::default::Default::default()
2727    }
2728
2729    /// Sets the value of [certificates][crate::model::ListAuthorizedCertificatesResponse::certificates].
2730    pub fn set_certificates<T, V>(mut self, v: T) -> Self
2731    where
2732        T: std::iter::IntoIterator<Item = V>,
2733        V: std::convert::Into<crate::model::AuthorizedCertificate>,
2734    {
2735        use std::iter::Iterator;
2736        self.certificates = v.into_iter().map(|i| i.into()).collect();
2737        self
2738    }
2739
2740    /// Sets the value of [next_page_token][crate::model::ListAuthorizedCertificatesResponse::next_page_token].
2741    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2742        self.next_page_token = v.into();
2743        self
2744    }
2745}
2746
2747impl wkt::message::Message for ListAuthorizedCertificatesResponse {
2748    fn typename() -> &'static str {
2749        "type.googleapis.com/google.appengine.v1.ListAuthorizedCertificatesResponse"
2750    }
2751}
2752
2753#[doc(hidden)]
2754impl gax::paginator::internal::PageableResponse for ListAuthorizedCertificatesResponse {
2755    type PageItem = crate::model::AuthorizedCertificate;
2756
2757    fn items(self) -> std::vec::Vec<Self::PageItem> {
2758        self.certificates
2759    }
2760
2761    fn next_page_token(&self) -> std::string::String {
2762        use std::clone::Clone;
2763        self.next_page_token.clone()
2764    }
2765}
2766
2767/// Request message for `AuthorizedCertificates.GetAuthorizedCertificate`.
2768#[derive(Clone, Default, PartialEq)]
2769#[non_exhaustive]
2770pub struct GetAuthorizedCertificateRequest {
2771    /// Name of the resource requested. Example:
2772    /// `apps/myapp/authorizedCertificates/12345`.
2773    pub name: std::string::String,
2774
2775    /// Controls the set of fields returned in the `GET` response.
2776    pub view: crate::model::AuthorizedCertificateView,
2777
2778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2779}
2780
2781impl GetAuthorizedCertificateRequest {
2782    pub fn new() -> Self {
2783        std::default::Default::default()
2784    }
2785
2786    /// Sets the value of [name][crate::model::GetAuthorizedCertificateRequest::name].
2787    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2788        self.name = v.into();
2789        self
2790    }
2791
2792    /// Sets the value of [view][crate::model::GetAuthorizedCertificateRequest::view].
2793    pub fn set_view<T: std::convert::Into<crate::model::AuthorizedCertificateView>>(
2794        mut self,
2795        v: T,
2796    ) -> Self {
2797        self.view = v.into();
2798        self
2799    }
2800}
2801
2802impl wkt::message::Message for GetAuthorizedCertificateRequest {
2803    fn typename() -> &'static str {
2804        "type.googleapis.com/google.appengine.v1.GetAuthorizedCertificateRequest"
2805    }
2806}
2807
2808/// Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`.
2809#[derive(Clone, Default, PartialEq)]
2810#[non_exhaustive]
2811pub struct CreateAuthorizedCertificateRequest {
2812    /// Name of the parent `Application` resource. Example: `apps/myapp`.
2813    pub parent: std::string::String,
2814
2815    /// SSL certificate data.
2816    pub certificate: std::option::Option<crate::model::AuthorizedCertificate>,
2817
2818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2819}
2820
2821impl CreateAuthorizedCertificateRequest {
2822    pub fn new() -> Self {
2823        std::default::Default::default()
2824    }
2825
2826    /// Sets the value of [parent][crate::model::CreateAuthorizedCertificateRequest::parent].
2827    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2828        self.parent = v.into();
2829        self
2830    }
2831
2832    /// Sets the value of [certificate][crate::model::CreateAuthorizedCertificateRequest::certificate].
2833    pub fn set_certificate<T>(mut self, v: T) -> Self
2834    where
2835        T: std::convert::Into<crate::model::AuthorizedCertificate>,
2836    {
2837        self.certificate = std::option::Option::Some(v.into());
2838        self
2839    }
2840
2841    /// Sets or clears the value of [certificate][crate::model::CreateAuthorizedCertificateRequest::certificate].
2842    pub fn set_or_clear_certificate<T>(mut self, v: std::option::Option<T>) -> Self
2843    where
2844        T: std::convert::Into<crate::model::AuthorizedCertificate>,
2845    {
2846        self.certificate = v.map(|x| x.into());
2847        self
2848    }
2849}
2850
2851impl wkt::message::Message for CreateAuthorizedCertificateRequest {
2852    fn typename() -> &'static str {
2853        "type.googleapis.com/google.appengine.v1.CreateAuthorizedCertificateRequest"
2854    }
2855}
2856
2857/// Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`.
2858#[derive(Clone, Default, PartialEq)]
2859#[non_exhaustive]
2860pub struct UpdateAuthorizedCertificateRequest {
2861    /// Name of the resource to update. Example:
2862    /// `apps/myapp/authorizedCertificates/12345`.
2863    pub name: std::string::String,
2864
2865    /// An `AuthorizedCertificate` containing the updated resource. Only fields set
2866    /// in the field mask will be updated.
2867    pub certificate: std::option::Option<crate::model::AuthorizedCertificate>,
2868
2869    /// Standard field mask for the set of fields to be updated. Updates are only
2870    /// supported on the `certificate_raw_data` and `display_name` fields.
2871    pub update_mask: std::option::Option<wkt::FieldMask>,
2872
2873    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2874}
2875
2876impl UpdateAuthorizedCertificateRequest {
2877    pub fn new() -> Self {
2878        std::default::Default::default()
2879    }
2880
2881    /// Sets the value of [name][crate::model::UpdateAuthorizedCertificateRequest::name].
2882    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2883        self.name = v.into();
2884        self
2885    }
2886
2887    /// Sets the value of [certificate][crate::model::UpdateAuthorizedCertificateRequest::certificate].
2888    pub fn set_certificate<T>(mut self, v: T) -> Self
2889    where
2890        T: std::convert::Into<crate::model::AuthorizedCertificate>,
2891    {
2892        self.certificate = std::option::Option::Some(v.into());
2893        self
2894    }
2895
2896    /// Sets or clears the value of [certificate][crate::model::UpdateAuthorizedCertificateRequest::certificate].
2897    pub fn set_or_clear_certificate<T>(mut self, v: std::option::Option<T>) -> Self
2898    where
2899        T: std::convert::Into<crate::model::AuthorizedCertificate>,
2900    {
2901        self.certificate = v.map(|x| x.into());
2902        self
2903    }
2904
2905    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedCertificateRequest::update_mask].
2906    pub fn set_update_mask<T>(mut self, v: T) -> Self
2907    where
2908        T: std::convert::Into<wkt::FieldMask>,
2909    {
2910        self.update_mask = std::option::Option::Some(v.into());
2911        self
2912    }
2913
2914    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedCertificateRequest::update_mask].
2915    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2916    where
2917        T: std::convert::Into<wkt::FieldMask>,
2918    {
2919        self.update_mask = v.map(|x| x.into());
2920        self
2921    }
2922}
2923
2924impl wkt::message::Message for UpdateAuthorizedCertificateRequest {
2925    fn typename() -> &'static str {
2926        "type.googleapis.com/google.appengine.v1.UpdateAuthorizedCertificateRequest"
2927    }
2928}
2929
2930/// Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`.
2931#[derive(Clone, Default, PartialEq)]
2932#[non_exhaustive]
2933pub struct DeleteAuthorizedCertificateRequest {
2934    /// Name of the resource to delete. Example:
2935    /// `apps/myapp/authorizedCertificates/12345`.
2936    pub name: std::string::String,
2937
2938    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2939}
2940
2941impl DeleteAuthorizedCertificateRequest {
2942    pub fn new() -> Self {
2943        std::default::Default::default()
2944    }
2945
2946    /// Sets the value of [name][crate::model::DeleteAuthorizedCertificateRequest::name].
2947    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2948        self.name = v.into();
2949        self
2950    }
2951}
2952
2953impl wkt::message::Message for DeleteAuthorizedCertificateRequest {
2954    fn typename() -> &'static str {
2955        "type.googleapis.com/google.appengine.v1.DeleteAuthorizedCertificateRequest"
2956    }
2957}
2958
2959/// Request message for `DomainMappings.ListDomainMappings`.
2960#[derive(Clone, Default, PartialEq)]
2961#[non_exhaustive]
2962pub struct ListDomainMappingsRequest {
2963    /// Name of the parent Application resource. Example: `apps/myapp`.
2964    pub parent: std::string::String,
2965
2966    /// Maximum results to return per page.
2967    pub page_size: i32,
2968
2969    /// Continuation token for fetching the next page of results.
2970    pub page_token: std::string::String,
2971
2972    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2973}
2974
2975impl ListDomainMappingsRequest {
2976    pub fn new() -> Self {
2977        std::default::Default::default()
2978    }
2979
2980    /// Sets the value of [parent][crate::model::ListDomainMappingsRequest::parent].
2981    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2982        self.parent = v.into();
2983        self
2984    }
2985
2986    /// Sets the value of [page_size][crate::model::ListDomainMappingsRequest::page_size].
2987    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2988        self.page_size = v.into();
2989        self
2990    }
2991
2992    /// Sets the value of [page_token][crate::model::ListDomainMappingsRequest::page_token].
2993    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2994        self.page_token = v.into();
2995        self
2996    }
2997}
2998
2999impl wkt::message::Message for ListDomainMappingsRequest {
3000    fn typename() -> &'static str {
3001        "type.googleapis.com/google.appengine.v1.ListDomainMappingsRequest"
3002    }
3003}
3004
3005/// Response message for `DomainMappings.ListDomainMappings`.
3006#[derive(Clone, Default, PartialEq)]
3007#[non_exhaustive]
3008pub struct ListDomainMappingsResponse {
3009    /// The domain mappings for the application.
3010    pub domain_mappings: std::vec::Vec<crate::model::DomainMapping>,
3011
3012    /// Continuation token for fetching the next page of results.
3013    pub next_page_token: std::string::String,
3014
3015    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3016}
3017
3018impl ListDomainMappingsResponse {
3019    pub fn new() -> Self {
3020        std::default::Default::default()
3021    }
3022
3023    /// Sets the value of [domain_mappings][crate::model::ListDomainMappingsResponse::domain_mappings].
3024    pub fn set_domain_mappings<T, V>(mut self, v: T) -> Self
3025    where
3026        T: std::iter::IntoIterator<Item = V>,
3027        V: std::convert::Into<crate::model::DomainMapping>,
3028    {
3029        use std::iter::Iterator;
3030        self.domain_mappings = v.into_iter().map(|i| i.into()).collect();
3031        self
3032    }
3033
3034    /// Sets the value of [next_page_token][crate::model::ListDomainMappingsResponse::next_page_token].
3035    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3036        self.next_page_token = v.into();
3037        self
3038    }
3039}
3040
3041impl wkt::message::Message for ListDomainMappingsResponse {
3042    fn typename() -> &'static str {
3043        "type.googleapis.com/google.appengine.v1.ListDomainMappingsResponse"
3044    }
3045}
3046
3047#[doc(hidden)]
3048impl gax::paginator::internal::PageableResponse for ListDomainMappingsResponse {
3049    type PageItem = crate::model::DomainMapping;
3050
3051    fn items(self) -> std::vec::Vec<Self::PageItem> {
3052        self.domain_mappings
3053    }
3054
3055    fn next_page_token(&self) -> std::string::String {
3056        use std::clone::Clone;
3057        self.next_page_token.clone()
3058    }
3059}
3060
3061/// Request message for `DomainMappings.GetDomainMapping`.
3062#[derive(Clone, Default, PartialEq)]
3063#[non_exhaustive]
3064pub struct GetDomainMappingRequest {
3065    /// Name of the resource requested. Example:
3066    /// `apps/myapp/domainMappings/example.com`.
3067    pub name: std::string::String,
3068
3069    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3070}
3071
3072impl GetDomainMappingRequest {
3073    pub fn new() -> Self {
3074        std::default::Default::default()
3075    }
3076
3077    /// Sets the value of [name][crate::model::GetDomainMappingRequest::name].
3078    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3079        self.name = v.into();
3080        self
3081    }
3082}
3083
3084impl wkt::message::Message for GetDomainMappingRequest {
3085    fn typename() -> &'static str {
3086        "type.googleapis.com/google.appengine.v1.GetDomainMappingRequest"
3087    }
3088}
3089
3090/// Request message for `DomainMappings.CreateDomainMapping`.
3091#[derive(Clone, Default, PartialEq)]
3092#[non_exhaustive]
3093pub struct CreateDomainMappingRequest {
3094    /// Name of the parent Application resource. Example: `apps/myapp`.
3095    pub parent: std::string::String,
3096
3097    /// Domain mapping configuration.
3098    pub domain_mapping: std::option::Option<crate::model::DomainMapping>,
3099
3100    /// Whether the domain creation should override any existing mappings for this
3101    /// domain. By default, overrides are rejected.
3102    pub override_strategy: crate::model::DomainOverrideStrategy,
3103
3104    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3105}
3106
3107impl CreateDomainMappingRequest {
3108    pub fn new() -> Self {
3109        std::default::Default::default()
3110    }
3111
3112    /// Sets the value of [parent][crate::model::CreateDomainMappingRequest::parent].
3113    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3114        self.parent = v.into();
3115        self
3116    }
3117
3118    /// Sets the value of [domain_mapping][crate::model::CreateDomainMappingRequest::domain_mapping].
3119    pub fn set_domain_mapping<T>(mut self, v: T) -> Self
3120    where
3121        T: std::convert::Into<crate::model::DomainMapping>,
3122    {
3123        self.domain_mapping = std::option::Option::Some(v.into());
3124        self
3125    }
3126
3127    /// Sets or clears the value of [domain_mapping][crate::model::CreateDomainMappingRequest::domain_mapping].
3128    pub fn set_or_clear_domain_mapping<T>(mut self, v: std::option::Option<T>) -> Self
3129    where
3130        T: std::convert::Into<crate::model::DomainMapping>,
3131    {
3132        self.domain_mapping = v.map(|x| x.into());
3133        self
3134    }
3135
3136    /// Sets the value of [override_strategy][crate::model::CreateDomainMappingRequest::override_strategy].
3137    pub fn set_override_strategy<T: std::convert::Into<crate::model::DomainOverrideStrategy>>(
3138        mut self,
3139        v: T,
3140    ) -> Self {
3141        self.override_strategy = v.into();
3142        self
3143    }
3144}
3145
3146impl wkt::message::Message for CreateDomainMappingRequest {
3147    fn typename() -> &'static str {
3148        "type.googleapis.com/google.appengine.v1.CreateDomainMappingRequest"
3149    }
3150}
3151
3152/// Request message for `DomainMappings.UpdateDomainMapping`.
3153#[derive(Clone, Default, PartialEq)]
3154#[non_exhaustive]
3155pub struct UpdateDomainMappingRequest {
3156    /// Name of the resource to update. Example:
3157    /// `apps/myapp/domainMappings/example.com`.
3158    pub name: std::string::String,
3159
3160    /// A domain mapping containing the updated resource. Only fields set
3161    /// in the field mask will be updated.
3162    pub domain_mapping: std::option::Option<crate::model::DomainMapping>,
3163
3164    /// Required. Standard field mask for the set of fields to be updated.
3165    pub update_mask: std::option::Option<wkt::FieldMask>,
3166
3167    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3168}
3169
3170impl UpdateDomainMappingRequest {
3171    pub fn new() -> Self {
3172        std::default::Default::default()
3173    }
3174
3175    /// Sets the value of [name][crate::model::UpdateDomainMappingRequest::name].
3176    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3177        self.name = v.into();
3178        self
3179    }
3180
3181    /// Sets the value of [domain_mapping][crate::model::UpdateDomainMappingRequest::domain_mapping].
3182    pub fn set_domain_mapping<T>(mut self, v: T) -> Self
3183    where
3184        T: std::convert::Into<crate::model::DomainMapping>,
3185    {
3186        self.domain_mapping = std::option::Option::Some(v.into());
3187        self
3188    }
3189
3190    /// Sets or clears the value of [domain_mapping][crate::model::UpdateDomainMappingRequest::domain_mapping].
3191    pub fn set_or_clear_domain_mapping<T>(mut self, v: std::option::Option<T>) -> Self
3192    where
3193        T: std::convert::Into<crate::model::DomainMapping>,
3194    {
3195        self.domain_mapping = v.map(|x| x.into());
3196        self
3197    }
3198
3199    /// Sets the value of [update_mask][crate::model::UpdateDomainMappingRequest::update_mask].
3200    pub fn set_update_mask<T>(mut self, v: T) -> Self
3201    where
3202        T: std::convert::Into<wkt::FieldMask>,
3203    {
3204        self.update_mask = std::option::Option::Some(v.into());
3205        self
3206    }
3207
3208    /// Sets or clears the value of [update_mask][crate::model::UpdateDomainMappingRequest::update_mask].
3209    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3210    where
3211        T: std::convert::Into<wkt::FieldMask>,
3212    {
3213        self.update_mask = v.map(|x| x.into());
3214        self
3215    }
3216}
3217
3218impl wkt::message::Message for UpdateDomainMappingRequest {
3219    fn typename() -> &'static str {
3220        "type.googleapis.com/google.appengine.v1.UpdateDomainMappingRequest"
3221    }
3222}
3223
3224/// Request message for `DomainMappings.DeleteDomainMapping`.
3225#[derive(Clone, Default, PartialEq)]
3226#[non_exhaustive]
3227pub struct DeleteDomainMappingRequest {
3228    /// Name of the resource to delete. Example:
3229    /// `apps/myapp/domainMappings/example.com`.
3230    pub name: std::string::String,
3231
3232    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3233}
3234
3235impl DeleteDomainMappingRequest {
3236    pub fn new() -> Self {
3237        std::default::Default::default()
3238    }
3239
3240    /// Sets the value of [name][crate::model::DeleteDomainMappingRequest::name].
3241    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3242        self.name = v.into();
3243        self
3244    }
3245}
3246
3247impl wkt::message::Message for DeleteDomainMappingRequest {
3248    fn typename() -> &'static str {
3249        "type.googleapis.com/google.appengine.v1.DeleteDomainMappingRequest"
3250    }
3251}
3252
3253/// An Application resource contains the top-level configuration of an App
3254/// Engine application.
3255#[derive(Clone, Default, PartialEq)]
3256#[non_exhaustive]
3257pub struct Application {
3258    /// Full path to the Application resource in the API.
3259    /// Example: `apps/myapp`.
3260    ///
3261    /// @OutputOnly
3262    pub name: std::string::String,
3263
3264    /// Identifier of the Application resource. This identifier is equivalent
3265    /// to the project ID of the Google Cloud Platform project where you want to
3266    /// deploy your application.
3267    /// Example: `myapp`.
3268    pub id: std::string::String,
3269
3270    /// HTTP path dispatch rules for requests to the application that do not
3271    /// explicitly target a service or version. Rules are order-dependent.
3272    /// Up to 20 dispatch rules can be supported.
3273    pub dispatch_rules: std::vec::Vec<crate::model::UrlDispatchRule>,
3274
3275    /// Google Apps authentication domain that controls which users can access
3276    /// this application.
3277    ///
3278    /// Defaults to open access for any Google Account.
3279    pub auth_domain: std::string::String,
3280
3281    /// Location from which this application runs. Application instances
3282    /// run out of the data centers in the specified location, which is also where
3283    /// all of the application's end user content is stored.
3284    ///
3285    /// Defaults to `us-central`.
3286    ///
3287    /// View the list of
3288    /// [supported locations](https://cloud.google.com/appengine/docs/locations).
3289    pub location_id: std::string::String,
3290
3291    /// Google Cloud Storage bucket that can be used for storing files
3292    /// associated with this application. This bucket is associated with the
3293    /// application and can be used by the gcloud deployment commands.
3294    ///
3295    /// @OutputOnly
3296    pub code_bucket: std::string::String,
3297
3298    /// Cookie expiration policy for this application.
3299    pub default_cookie_expiration: std::option::Option<wkt::Duration>,
3300
3301    /// Serving status of this application.
3302    pub serving_status: crate::model::application::ServingStatus,
3303
3304    /// Hostname used to reach this application, as resolved by App Engine.
3305    ///
3306    /// @OutputOnly
3307    pub default_hostname: std::string::String,
3308
3309    /// Google Cloud Storage bucket that can be used by this application to store
3310    /// content.
3311    ///
3312    /// @OutputOnly
3313    pub default_bucket: std::string::String,
3314
3315    /// The service account associated with the application.
3316    /// This is the app-level default identity. If no identity provided during
3317    /// create version, Admin API will fallback to this one.
3318    pub service_account: std::string::String,
3319
3320    pub iap: std::option::Option<crate::model::application::IdentityAwareProxy>,
3321
3322    /// The Google Container Registry domain used for storing managed build docker
3323    /// images for this application.
3324    pub gcr_domain: std::string::String,
3325
3326    /// The type of the Cloud Firestore or Cloud Datastore database associated with
3327    /// this application.
3328    pub database_type: crate::model::application::DatabaseType,
3329
3330    /// The feature specific settings to be used in the application.
3331    pub feature_settings: std::option::Option<crate::model::application::FeatureSettings>,
3332
3333    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3334}
3335
3336impl Application {
3337    pub fn new() -> Self {
3338        std::default::Default::default()
3339    }
3340
3341    /// Sets the value of [name][crate::model::Application::name].
3342    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3343        self.name = v.into();
3344        self
3345    }
3346
3347    /// Sets the value of [id][crate::model::Application::id].
3348    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3349        self.id = v.into();
3350        self
3351    }
3352
3353    /// Sets the value of [dispatch_rules][crate::model::Application::dispatch_rules].
3354    pub fn set_dispatch_rules<T, V>(mut self, v: T) -> Self
3355    where
3356        T: std::iter::IntoIterator<Item = V>,
3357        V: std::convert::Into<crate::model::UrlDispatchRule>,
3358    {
3359        use std::iter::Iterator;
3360        self.dispatch_rules = v.into_iter().map(|i| i.into()).collect();
3361        self
3362    }
3363
3364    /// Sets the value of [auth_domain][crate::model::Application::auth_domain].
3365    pub fn set_auth_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3366        self.auth_domain = v.into();
3367        self
3368    }
3369
3370    /// Sets the value of [location_id][crate::model::Application::location_id].
3371    pub fn set_location_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3372        self.location_id = v.into();
3373        self
3374    }
3375
3376    /// Sets the value of [code_bucket][crate::model::Application::code_bucket].
3377    pub fn set_code_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3378        self.code_bucket = v.into();
3379        self
3380    }
3381
3382    /// Sets the value of [default_cookie_expiration][crate::model::Application::default_cookie_expiration].
3383    pub fn set_default_cookie_expiration<T>(mut self, v: T) -> Self
3384    where
3385        T: std::convert::Into<wkt::Duration>,
3386    {
3387        self.default_cookie_expiration = std::option::Option::Some(v.into());
3388        self
3389    }
3390
3391    /// Sets or clears the value of [default_cookie_expiration][crate::model::Application::default_cookie_expiration].
3392    pub fn set_or_clear_default_cookie_expiration<T>(mut self, v: std::option::Option<T>) -> Self
3393    where
3394        T: std::convert::Into<wkt::Duration>,
3395    {
3396        self.default_cookie_expiration = v.map(|x| x.into());
3397        self
3398    }
3399
3400    /// Sets the value of [serving_status][crate::model::Application::serving_status].
3401    pub fn set_serving_status<T: std::convert::Into<crate::model::application::ServingStatus>>(
3402        mut self,
3403        v: T,
3404    ) -> Self {
3405        self.serving_status = v.into();
3406        self
3407    }
3408
3409    /// Sets the value of [default_hostname][crate::model::Application::default_hostname].
3410    pub fn set_default_hostname<T: std::convert::Into<std::string::String>>(
3411        mut self,
3412        v: T,
3413    ) -> Self {
3414        self.default_hostname = v.into();
3415        self
3416    }
3417
3418    /// Sets the value of [default_bucket][crate::model::Application::default_bucket].
3419    pub fn set_default_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3420        self.default_bucket = v.into();
3421        self
3422    }
3423
3424    /// Sets the value of [service_account][crate::model::Application::service_account].
3425    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3426        self.service_account = v.into();
3427        self
3428    }
3429
3430    /// Sets the value of [iap][crate::model::Application::iap].
3431    pub fn set_iap<T>(mut self, v: T) -> Self
3432    where
3433        T: std::convert::Into<crate::model::application::IdentityAwareProxy>,
3434    {
3435        self.iap = std::option::Option::Some(v.into());
3436        self
3437    }
3438
3439    /// Sets or clears the value of [iap][crate::model::Application::iap].
3440    pub fn set_or_clear_iap<T>(mut self, v: std::option::Option<T>) -> Self
3441    where
3442        T: std::convert::Into<crate::model::application::IdentityAwareProxy>,
3443    {
3444        self.iap = v.map(|x| x.into());
3445        self
3446    }
3447
3448    /// Sets the value of [gcr_domain][crate::model::Application::gcr_domain].
3449    pub fn set_gcr_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3450        self.gcr_domain = v.into();
3451        self
3452    }
3453
3454    /// Sets the value of [database_type][crate::model::Application::database_type].
3455    pub fn set_database_type<T: std::convert::Into<crate::model::application::DatabaseType>>(
3456        mut self,
3457        v: T,
3458    ) -> Self {
3459        self.database_type = v.into();
3460        self
3461    }
3462
3463    /// Sets the value of [feature_settings][crate::model::Application::feature_settings].
3464    pub fn set_feature_settings<T>(mut self, v: T) -> Self
3465    where
3466        T: std::convert::Into<crate::model::application::FeatureSettings>,
3467    {
3468        self.feature_settings = std::option::Option::Some(v.into());
3469        self
3470    }
3471
3472    /// Sets or clears the value of [feature_settings][crate::model::Application::feature_settings].
3473    pub fn set_or_clear_feature_settings<T>(mut self, v: std::option::Option<T>) -> Self
3474    where
3475        T: std::convert::Into<crate::model::application::FeatureSettings>,
3476    {
3477        self.feature_settings = v.map(|x| x.into());
3478        self
3479    }
3480}
3481
3482impl wkt::message::Message for Application {
3483    fn typename() -> &'static str {
3484        "type.googleapis.com/google.appengine.v1.Application"
3485    }
3486}
3487
3488/// Defines additional types related to [Application].
3489pub mod application {
3490    #[allow(unused_imports)]
3491    use super::*;
3492
3493    /// Identity-Aware Proxy
3494    #[derive(Clone, Default, PartialEq)]
3495    #[non_exhaustive]
3496    pub struct IdentityAwareProxy {
3497        /// Whether the serving infrastructure will authenticate and
3498        /// authorize all incoming requests.
3499        ///
3500        /// If true, the `oauth2_client_id` and `oauth2_client_secret`
3501        /// fields must be non-empty.
3502        pub enabled: bool,
3503
3504        /// OAuth2 client ID to use for the authentication flow.
3505        pub oauth2_client_id: std::string::String,
3506
3507        /// OAuth2 client secret to use for the authentication flow.
3508        ///
3509        /// For security reasons, this value cannot be retrieved via the API.
3510        /// Instead, the SHA-256 hash of the value is returned in the
3511        /// `oauth2_client_secret_sha256` field.
3512        ///
3513        /// @InputOnly
3514        pub oauth2_client_secret: std::string::String,
3515
3516        /// Hex-encoded SHA-256 hash of the client secret.
3517        ///
3518        /// @OutputOnly
3519        pub oauth2_client_secret_sha256: std::string::String,
3520
3521        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3522    }
3523
3524    impl IdentityAwareProxy {
3525        pub fn new() -> Self {
3526            std::default::Default::default()
3527        }
3528
3529        /// Sets the value of [enabled][crate::model::application::IdentityAwareProxy::enabled].
3530        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3531            self.enabled = v.into();
3532            self
3533        }
3534
3535        /// Sets the value of [oauth2_client_id][crate::model::application::IdentityAwareProxy::oauth2_client_id].
3536        pub fn set_oauth2_client_id<T: std::convert::Into<std::string::String>>(
3537            mut self,
3538            v: T,
3539        ) -> Self {
3540            self.oauth2_client_id = v.into();
3541            self
3542        }
3543
3544        /// Sets the value of [oauth2_client_secret][crate::model::application::IdentityAwareProxy::oauth2_client_secret].
3545        pub fn set_oauth2_client_secret<T: std::convert::Into<std::string::String>>(
3546            mut self,
3547            v: T,
3548        ) -> Self {
3549            self.oauth2_client_secret = v.into();
3550            self
3551        }
3552
3553        /// Sets the value of [oauth2_client_secret_sha256][crate::model::application::IdentityAwareProxy::oauth2_client_secret_sha256].
3554        pub fn set_oauth2_client_secret_sha256<T: std::convert::Into<std::string::String>>(
3555            mut self,
3556            v: T,
3557        ) -> Self {
3558            self.oauth2_client_secret_sha256 = v.into();
3559            self
3560        }
3561    }
3562
3563    impl wkt::message::Message for IdentityAwareProxy {
3564        fn typename() -> &'static str {
3565            "type.googleapis.com/google.appengine.v1.Application.IdentityAwareProxy"
3566        }
3567    }
3568
3569    /// The feature specific settings to be used in the application. These define
3570    /// behaviors that are user configurable.
3571    #[derive(Clone, Default, PartialEq)]
3572    #[non_exhaustive]
3573    pub struct FeatureSettings {
3574        /// Boolean value indicating if split health checks should be used instead
3575        /// of the legacy health checks. At an app.yaml level, this means defaulting
3576        /// to 'readiness_check' and 'liveness_check' values instead of
3577        /// 'health_check' ones. Once the legacy 'health_check' behavior is
3578        /// deprecated, and this value is always true, this setting can
3579        /// be removed.
3580        pub split_health_checks: bool,
3581
3582        /// If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/)
3583        /// base image for VMs, rather than a base Debian image.
3584        pub use_container_optimized_os: bool,
3585
3586        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3587    }
3588
3589    impl FeatureSettings {
3590        pub fn new() -> Self {
3591            std::default::Default::default()
3592        }
3593
3594        /// Sets the value of [split_health_checks][crate::model::application::FeatureSettings::split_health_checks].
3595        pub fn set_split_health_checks<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3596            self.split_health_checks = v.into();
3597            self
3598        }
3599
3600        /// Sets the value of [use_container_optimized_os][crate::model::application::FeatureSettings::use_container_optimized_os].
3601        pub fn set_use_container_optimized_os<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3602            self.use_container_optimized_os = v.into();
3603            self
3604        }
3605    }
3606
3607    impl wkt::message::Message for FeatureSettings {
3608        fn typename() -> &'static str {
3609            "type.googleapis.com/google.appengine.v1.Application.FeatureSettings"
3610        }
3611    }
3612
3613    ///
3614    /// # Working with unknown values
3615    ///
3616    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3617    /// additional enum variants at any time. Adding new variants is not considered
3618    /// a breaking change. Applications should write their code in anticipation of:
3619    ///
3620    /// - New values appearing in future releases of the client library, **and**
3621    /// - New values received dynamically, without application changes.
3622    ///
3623    /// Please consult the [Working with enums] section in the user guide for some
3624    /// guidelines.
3625    ///
3626    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3627    #[derive(Clone, Debug, PartialEq)]
3628    #[non_exhaustive]
3629    pub enum ServingStatus {
3630        /// Serving status is unspecified.
3631        Unspecified,
3632        /// Application is serving.
3633        Serving,
3634        /// Application has been disabled by the user.
3635        UserDisabled,
3636        /// Application has been disabled by the system.
3637        SystemDisabled,
3638        /// If set, the enum was initialized with an unknown value.
3639        ///
3640        /// Applications can examine the value using [ServingStatus::value] or
3641        /// [ServingStatus::name].
3642        UnknownValue(serving_status::UnknownValue),
3643    }
3644
3645    #[doc(hidden)]
3646    pub mod serving_status {
3647        #[allow(unused_imports)]
3648        use super::*;
3649        #[derive(Clone, Debug, PartialEq)]
3650        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3651    }
3652
3653    impl ServingStatus {
3654        /// Gets the enum value.
3655        ///
3656        /// Returns `None` if the enum contains an unknown value deserialized from
3657        /// the string representation of enums.
3658        pub fn value(&self) -> std::option::Option<i32> {
3659            match self {
3660                Self::Unspecified => std::option::Option::Some(0),
3661                Self::Serving => std::option::Option::Some(1),
3662                Self::UserDisabled => std::option::Option::Some(2),
3663                Self::SystemDisabled => std::option::Option::Some(3),
3664                Self::UnknownValue(u) => u.0.value(),
3665            }
3666        }
3667
3668        /// Gets the enum value as a string.
3669        ///
3670        /// Returns `None` if the enum contains an unknown value deserialized from
3671        /// the integer representation of enums.
3672        pub fn name(&self) -> std::option::Option<&str> {
3673            match self {
3674                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
3675                Self::Serving => std::option::Option::Some("SERVING"),
3676                Self::UserDisabled => std::option::Option::Some("USER_DISABLED"),
3677                Self::SystemDisabled => std::option::Option::Some("SYSTEM_DISABLED"),
3678                Self::UnknownValue(u) => u.0.name(),
3679            }
3680        }
3681    }
3682
3683    impl std::default::Default for ServingStatus {
3684        fn default() -> Self {
3685            use std::convert::From;
3686            Self::from(0)
3687        }
3688    }
3689
3690    impl std::fmt::Display for ServingStatus {
3691        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3692            wkt::internal::display_enum(f, self.name(), self.value())
3693        }
3694    }
3695
3696    impl std::convert::From<i32> for ServingStatus {
3697        fn from(value: i32) -> Self {
3698            match value {
3699                0 => Self::Unspecified,
3700                1 => Self::Serving,
3701                2 => Self::UserDisabled,
3702                3 => Self::SystemDisabled,
3703                _ => Self::UnknownValue(serving_status::UnknownValue(
3704                    wkt::internal::UnknownEnumValue::Integer(value),
3705                )),
3706            }
3707        }
3708    }
3709
3710    impl std::convert::From<&str> for ServingStatus {
3711        fn from(value: &str) -> Self {
3712            use std::string::ToString;
3713            match value {
3714                "UNSPECIFIED" => Self::Unspecified,
3715                "SERVING" => Self::Serving,
3716                "USER_DISABLED" => Self::UserDisabled,
3717                "SYSTEM_DISABLED" => Self::SystemDisabled,
3718                _ => Self::UnknownValue(serving_status::UnknownValue(
3719                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3720                )),
3721            }
3722        }
3723    }
3724
3725    impl serde::ser::Serialize for ServingStatus {
3726        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3727        where
3728            S: serde::Serializer,
3729        {
3730            match self {
3731                Self::Unspecified => serializer.serialize_i32(0),
3732                Self::Serving => serializer.serialize_i32(1),
3733                Self::UserDisabled => serializer.serialize_i32(2),
3734                Self::SystemDisabled => serializer.serialize_i32(3),
3735                Self::UnknownValue(u) => u.0.serialize(serializer),
3736            }
3737        }
3738    }
3739
3740    impl<'de> serde::de::Deserialize<'de> for ServingStatus {
3741        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3742        where
3743            D: serde::Deserializer<'de>,
3744        {
3745            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServingStatus>::new(
3746                ".google.appengine.v1.Application.ServingStatus",
3747            ))
3748        }
3749    }
3750
3751    ///
3752    /// # Working with unknown values
3753    ///
3754    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3755    /// additional enum variants at any time. Adding new variants is not considered
3756    /// a breaking change. Applications should write their code in anticipation of:
3757    ///
3758    /// - New values appearing in future releases of the client library, **and**
3759    /// - New values received dynamically, without application changes.
3760    ///
3761    /// Please consult the [Working with enums] section in the user guide for some
3762    /// guidelines.
3763    ///
3764    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3765    #[derive(Clone, Debug, PartialEq)]
3766    #[non_exhaustive]
3767    pub enum DatabaseType {
3768        /// Database type is unspecified.
3769        Unspecified,
3770        /// Cloud Datastore
3771        CloudDatastore,
3772        /// Cloud Firestore Native
3773        CloudFirestore,
3774        /// Cloud Firestore in Datastore Mode
3775        CloudDatastoreCompatibility,
3776        /// If set, the enum was initialized with an unknown value.
3777        ///
3778        /// Applications can examine the value using [DatabaseType::value] or
3779        /// [DatabaseType::name].
3780        UnknownValue(database_type::UnknownValue),
3781    }
3782
3783    #[doc(hidden)]
3784    pub mod database_type {
3785        #[allow(unused_imports)]
3786        use super::*;
3787        #[derive(Clone, Debug, PartialEq)]
3788        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3789    }
3790
3791    impl DatabaseType {
3792        /// Gets the enum value.
3793        ///
3794        /// Returns `None` if the enum contains an unknown value deserialized from
3795        /// the string representation of enums.
3796        pub fn value(&self) -> std::option::Option<i32> {
3797            match self {
3798                Self::Unspecified => std::option::Option::Some(0),
3799                Self::CloudDatastore => std::option::Option::Some(1),
3800                Self::CloudFirestore => std::option::Option::Some(2),
3801                Self::CloudDatastoreCompatibility => std::option::Option::Some(3),
3802                Self::UnknownValue(u) => u.0.value(),
3803            }
3804        }
3805
3806        /// Gets the enum value as a string.
3807        ///
3808        /// Returns `None` if the enum contains an unknown value deserialized from
3809        /// the integer representation of enums.
3810        pub fn name(&self) -> std::option::Option<&str> {
3811            match self {
3812                Self::Unspecified => std::option::Option::Some("DATABASE_TYPE_UNSPECIFIED"),
3813                Self::CloudDatastore => std::option::Option::Some("CLOUD_DATASTORE"),
3814                Self::CloudFirestore => std::option::Option::Some("CLOUD_FIRESTORE"),
3815                Self::CloudDatastoreCompatibility => {
3816                    std::option::Option::Some("CLOUD_DATASTORE_COMPATIBILITY")
3817                }
3818                Self::UnknownValue(u) => u.0.name(),
3819            }
3820        }
3821    }
3822
3823    impl std::default::Default for DatabaseType {
3824        fn default() -> Self {
3825            use std::convert::From;
3826            Self::from(0)
3827        }
3828    }
3829
3830    impl std::fmt::Display for DatabaseType {
3831        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3832            wkt::internal::display_enum(f, self.name(), self.value())
3833        }
3834    }
3835
3836    impl std::convert::From<i32> for DatabaseType {
3837        fn from(value: i32) -> Self {
3838            match value {
3839                0 => Self::Unspecified,
3840                1 => Self::CloudDatastore,
3841                2 => Self::CloudFirestore,
3842                3 => Self::CloudDatastoreCompatibility,
3843                _ => Self::UnknownValue(database_type::UnknownValue(
3844                    wkt::internal::UnknownEnumValue::Integer(value),
3845                )),
3846            }
3847        }
3848    }
3849
3850    impl std::convert::From<&str> for DatabaseType {
3851        fn from(value: &str) -> Self {
3852            use std::string::ToString;
3853            match value {
3854                "DATABASE_TYPE_UNSPECIFIED" => Self::Unspecified,
3855                "CLOUD_DATASTORE" => Self::CloudDatastore,
3856                "CLOUD_FIRESTORE" => Self::CloudFirestore,
3857                "CLOUD_DATASTORE_COMPATIBILITY" => Self::CloudDatastoreCompatibility,
3858                _ => Self::UnknownValue(database_type::UnknownValue(
3859                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3860                )),
3861            }
3862        }
3863    }
3864
3865    impl serde::ser::Serialize for DatabaseType {
3866        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3867        where
3868            S: serde::Serializer,
3869        {
3870            match self {
3871                Self::Unspecified => serializer.serialize_i32(0),
3872                Self::CloudDatastore => serializer.serialize_i32(1),
3873                Self::CloudFirestore => serializer.serialize_i32(2),
3874                Self::CloudDatastoreCompatibility => serializer.serialize_i32(3),
3875                Self::UnknownValue(u) => u.0.serialize(serializer),
3876            }
3877        }
3878    }
3879
3880    impl<'de> serde::de::Deserialize<'de> for DatabaseType {
3881        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3882        where
3883            D: serde::Deserializer<'de>,
3884        {
3885            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseType>::new(
3886                ".google.appengine.v1.Application.DatabaseType",
3887            ))
3888        }
3889    }
3890}
3891
3892/// Rules to match an HTTP request and dispatch that request to a service.
3893#[derive(Clone, Default, PartialEq)]
3894#[non_exhaustive]
3895pub struct UrlDispatchRule {
3896    /// Domain name to match against. The wildcard "`*`" is supported if
3897    /// specified before a period: "`*.`".
3898    ///
3899    /// Defaults to matching all domains: "`*`".
3900    pub domain: std::string::String,
3901
3902    /// Pathname within the host. Must start with a "`/`". A
3903    /// single "`*`" can be included at the end of the path.
3904    ///
3905    /// The sum of the lengths of the domain and path may not
3906    /// exceed 100 characters.
3907    pub path: std::string::String,
3908
3909    /// Resource ID of a service in this application that should
3910    /// serve the matched request. The service must already
3911    /// exist. Example: `default`.
3912    pub service: std::string::String,
3913
3914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3915}
3916
3917impl UrlDispatchRule {
3918    pub fn new() -> Self {
3919        std::default::Default::default()
3920    }
3921
3922    /// Sets the value of [domain][crate::model::UrlDispatchRule::domain].
3923    pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3924        self.domain = v.into();
3925        self
3926    }
3927
3928    /// Sets the value of [path][crate::model::UrlDispatchRule::path].
3929    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3930        self.path = v.into();
3931        self
3932    }
3933
3934    /// Sets the value of [service][crate::model::UrlDispatchRule::service].
3935    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3936        self.service = v.into();
3937        self
3938    }
3939}
3940
3941impl wkt::message::Message for UrlDispatchRule {
3942    fn typename() -> &'static str {
3943        "type.googleapis.com/google.appengine.v1.UrlDispatchRule"
3944    }
3945}
3946
3947/// App Engine admin service audit log.
3948#[derive(Clone, Default, PartialEq)]
3949#[non_exhaustive]
3950pub struct AuditData {
3951    /// Detailed information about methods that require it. Does not include
3952    /// simple Get, List or Delete methods because all significant information
3953    /// (resource name, number of returned elements for List operations) is already
3954    /// included in parent audit log message.
3955    pub method: std::option::Option<crate::model::audit_data::Method>,
3956
3957    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3958}
3959
3960impl AuditData {
3961    pub fn new() -> Self {
3962        std::default::Default::default()
3963    }
3964
3965    /// Sets the value of [method][crate::model::AuditData::method].
3966    ///
3967    /// Note that all the setters affecting `method` are mutually
3968    /// exclusive.
3969    pub fn set_method<
3970        T: std::convert::Into<std::option::Option<crate::model::audit_data::Method>>,
3971    >(
3972        mut self,
3973        v: T,
3974    ) -> Self {
3975        self.method = v.into();
3976        self
3977    }
3978
3979    /// The value of [method][crate::model::AuditData::method]
3980    /// if it holds a `UpdateService`, `None` if the field is not set or
3981    /// holds a different branch.
3982    pub fn update_service(
3983        &self,
3984    ) -> std::option::Option<&std::boxed::Box<crate::model::UpdateServiceMethod>> {
3985        #[allow(unreachable_patterns)]
3986        self.method.as_ref().and_then(|v| match v {
3987            crate::model::audit_data::Method::UpdateService(v) => std::option::Option::Some(v),
3988            _ => std::option::Option::None,
3989        })
3990    }
3991
3992    /// Sets the value of [method][crate::model::AuditData::method]
3993    /// to hold a `UpdateService`.
3994    ///
3995    /// Note that all the setters affecting `method` are
3996    /// mutually exclusive.
3997    pub fn set_update_service<
3998        T: std::convert::Into<std::boxed::Box<crate::model::UpdateServiceMethod>>,
3999    >(
4000        mut self,
4001        v: T,
4002    ) -> Self {
4003        self.method =
4004            std::option::Option::Some(crate::model::audit_data::Method::UpdateService(v.into()));
4005        self
4006    }
4007
4008    /// The value of [method][crate::model::AuditData::method]
4009    /// if it holds a `CreateVersion`, `None` if the field is not set or
4010    /// holds a different branch.
4011    pub fn create_version(
4012        &self,
4013    ) -> std::option::Option<&std::boxed::Box<crate::model::CreateVersionMethod>> {
4014        #[allow(unreachable_patterns)]
4015        self.method.as_ref().and_then(|v| match v {
4016            crate::model::audit_data::Method::CreateVersion(v) => std::option::Option::Some(v),
4017            _ => std::option::Option::None,
4018        })
4019    }
4020
4021    /// Sets the value of [method][crate::model::AuditData::method]
4022    /// to hold a `CreateVersion`.
4023    ///
4024    /// Note that all the setters affecting `method` are
4025    /// mutually exclusive.
4026    pub fn set_create_version<
4027        T: std::convert::Into<std::boxed::Box<crate::model::CreateVersionMethod>>,
4028    >(
4029        mut self,
4030        v: T,
4031    ) -> Self {
4032        self.method =
4033            std::option::Option::Some(crate::model::audit_data::Method::CreateVersion(v.into()));
4034        self
4035    }
4036}
4037
4038impl wkt::message::Message for AuditData {
4039    fn typename() -> &'static str {
4040        "type.googleapis.com/google.appengine.v1.AuditData"
4041    }
4042}
4043
4044/// Defines additional types related to [AuditData].
4045pub mod audit_data {
4046    #[allow(unused_imports)]
4047    use super::*;
4048
4049    /// Detailed information about methods that require it. Does not include
4050    /// simple Get, List or Delete methods because all significant information
4051    /// (resource name, number of returned elements for List operations) is already
4052    /// included in parent audit log message.
4053    #[derive(Clone, Debug, PartialEq)]
4054    #[non_exhaustive]
4055    pub enum Method {
4056        /// Detailed information about UpdateService call.
4057        UpdateService(std::boxed::Box<crate::model::UpdateServiceMethod>),
4058        /// Detailed information about CreateVersion call.
4059        CreateVersion(std::boxed::Box<crate::model::CreateVersionMethod>),
4060    }
4061}
4062
4063/// Detailed information about UpdateService call.
4064#[derive(Clone, Default, PartialEq)]
4065#[non_exhaustive]
4066pub struct UpdateServiceMethod {
4067    /// Update service request.
4068    pub request: std::option::Option<crate::model::UpdateServiceRequest>,
4069
4070    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4071}
4072
4073impl UpdateServiceMethod {
4074    pub fn new() -> Self {
4075        std::default::Default::default()
4076    }
4077
4078    /// Sets the value of [request][crate::model::UpdateServiceMethod::request].
4079    pub fn set_request<T>(mut self, v: T) -> Self
4080    where
4081        T: std::convert::Into<crate::model::UpdateServiceRequest>,
4082    {
4083        self.request = std::option::Option::Some(v.into());
4084        self
4085    }
4086
4087    /// Sets or clears the value of [request][crate::model::UpdateServiceMethod::request].
4088    pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
4089    where
4090        T: std::convert::Into<crate::model::UpdateServiceRequest>,
4091    {
4092        self.request = v.map(|x| x.into());
4093        self
4094    }
4095}
4096
4097impl wkt::message::Message for UpdateServiceMethod {
4098    fn typename() -> &'static str {
4099        "type.googleapis.com/google.appengine.v1.UpdateServiceMethod"
4100    }
4101}
4102
4103/// Detailed information about CreateVersion call.
4104#[derive(Clone, Default, PartialEq)]
4105#[non_exhaustive]
4106pub struct CreateVersionMethod {
4107    /// Create version request.
4108    pub request: std::option::Option<crate::model::CreateVersionRequest>,
4109
4110    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4111}
4112
4113impl CreateVersionMethod {
4114    pub fn new() -> Self {
4115        std::default::Default::default()
4116    }
4117
4118    /// Sets the value of [request][crate::model::CreateVersionMethod::request].
4119    pub fn set_request<T>(mut self, v: T) -> Self
4120    where
4121        T: std::convert::Into<crate::model::CreateVersionRequest>,
4122    {
4123        self.request = std::option::Option::Some(v.into());
4124        self
4125    }
4126
4127    /// Sets or clears the value of [request][crate::model::CreateVersionMethod::request].
4128    pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
4129    where
4130        T: std::convert::Into<crate::model::CreateVersionRequest>,
4131    {
4132        self.request = v.map(|x| x.into());
4133        self
4134    }
4135}
4136
4137impl wkt::message::Message for CreateVersionMethod {
4138    fn typename() -> &'static str {
4139        "type.googleapis.com/google.appengine.v1.CreateVersionMethod"
4140    }
4141}
4142
4143/// An SSL certificate that a user has been authorized to administer. A user
4144/// is authorized to administer any certificate that applies to one of their
4145/// authorized domains.
4146#[derive(Clone, Default, PartialEq)]
4147#[non_exhaustive]
4148pub struct AuthorizedCertificate {
4149    /// Full path to the `AuthorizedCertificate` resource in the API. Example:
4150    /// `apps/myapp/authorizedCertificates/12345`.
4151    ///
4152    /// @OutputOnly
4153    pub name: std::string::String,
4154
4155    /// Relative name of the certificate. This is a unique value autogenerated
4156    /// on `AuthorizedCertificate` resource creation. Example: `12345`.
4157    ///
4158    /// @OutputOnly
4159    pub id: std::string::String,
4160
4161    /// The user-specified display name of the certificate. This is not
4162    /// guaranteed to be unique. Example: `My Certificate`.
4163    pub display_name: std::string::String,
4164
4165    /// Topmost applicable domains of this certificate. This certificate
4166    /// applies to these domains and their subdomains. Example: `example.com`.
4167    ///
4168    /// @OutputOnly
4169    pub domain_names: std::vec::Vec<std::string::String>,
4170
4171    /// The time when this certificate expires. To update the renewal time on this
4172    /// certificate, upload an SSL certificate with a different expiration time
4173    /// using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
4174    ///
4175    /// @OutputOnly
4176    pub expire_time: std::option::Option<wkt::Timestamp>,
4177
4178    /// The SSL certificate serving the `AuthorizedCertificate` resource. This
4179    /// must be obtained independently from a certificate authority.
4180    pub certificate_raw_data: std::option::Option<crate::model::CertificateRawData>,
4181
4182    /// Only applicable if this certificate is managed by App Engine. Managed
4183    /// certificates are tied to the lifecycle of a `DomainMapping` and cannot be
4184    /// updated or deleted via the `AuthorizedCertificates` API. If this
4185    /// certificate is manually administered by the user, this field will be empty.
4186    ///
4187    /// @OutputOnly
4188    pub managed_certificate: std::option::Option<crate::model::ManagedCertificate>,
4189
4190    /// The full paths to user visible Domain Mapping resources that have this
4191    /// certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
4192    ///
4193    /// This may not represent the full list of mapped domain mappings if the user
4194    /// does not have `VIEWER` permissions on all of the applications that have
4195    /// this certificate mapped. See `domain_mappings_count` for a complete count.
4196    ///
4197    /// Only returned by `GET` or `LIST` requests when specifically requested by
4198    /// the `view=FULL_CERTIFICATE` option.
4199    ///
4200    /// @OutputOnly
4201    pub visible_domain_mappings: std::vec::Vec<std::string::String>,
4202
4203    /// Aggregate count of the domain mappings with this certificate mapped. This
4204    /// count includes domain mappings on applications for which the user does not
4205    /// have `VIEWER` permissions.
4206    ///
4207    /// Only returned by `GET` or `LIST` requests when specifically requested by
4208    /// the `view=FULL_CERTIFICATE` option.
4209    ///
4210    /// @OutputOnly
4211    pub domain_mappings_count: i32,
4212
4213    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4214}
4215
4216impl AuthorizedCertificate {
4217    pub fn new() -> Self {
4218        std::default::Default::default()
4219    }
4220
4221    /// Sets the value of [name][crate::model::AuthorizedCertificate::name].
4222    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4223        self.name = v.into();
4224        self
4225    }
4226
4227    /// Sets the value of [id][crate::model::AuthorizedCertificate::id].
4228    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4229        self.id = v.into();
4230        self
4231    }
4232
4233    /// Sets the value of [display_name][crate::model::AuthorizedCertificate::display_name].
4234    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4235        self.display_name = v.into();
4236        self
4237    }
4238
4239    /// Sets the value of [domain_names][crate::model::AuthorizedCertificate::domain_names].
4240    pub fn set_domain_names<T, V>(mut self, v: T) -> Self
4241    where
4242        T: std::iter::IntoIterator<Item = V>,
4243        V: std::convert::Into<std::string::String>,
4244    {
4245        use std::iter::Iterator;
4246        self.domain_names = v.into_iter().map(|i| i.into()).collect();
4247        self
4248    }
4249
4250    /// Sets the value of [expire_time][crate::model::AuthorizedCertificate::expire_time].
4251    pub fn set_expire_time<T>(mut self, v: T) -> Self
4252    where
4253        T: std::convert::Into<wkt::Timestamp>,
4254    {
4255        self.expire_time = std::option::Option::Some(v.into());
4256        self
4257    }
4258
4259    /// Sets or clears the value of [expire_time][crate::model::AuthorizedCertificate::expire_time].
4260    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
4261    where
4262        T: std::convert::Into<wkt::Timestamp>,
4263    {
4264        self.expire_time = v.map(|x| x.into());
4265        self
4266    }
4267
4268    /// Sets the value of [certificate_raw_data][crate::model::AuthorizedCertificate::certificate_raw_data].
4269    pub fn set_certificate_raw_data<T>(mut self, v: T) -> Self
4270    where
4271        T: std::convert::Into<crate::model::CertificateRawData>,
4272    {
4273        self.certificate_raw_data = std::option::Option::Some(v.into());
4274        self
4275    }
4276
4277    /// Sets or clears the value of [certificate_raw_data][crate::model::AuthorizedCertificate::certificate_raw_data].
4278    pub fn set_or_clear_certificate_raw_data<T>(mut self, v: std::option::Option<T>) -> Self
4279    where
4280        T: std::convert::Into<crate::model::CertificateRawData>,
4281    {
4282        self.certificate_raw_data = v.map(|x| x.into());
4283        self
4284    }
4285
4286    /// Sets the value of [managed_certificate][crate::model::AuthorizedCertificate::managed_certificate].
4287    pub fn set_managed_certificate<T>(mut self, v: T) -> Self
4288    where
4289        T: std::convert::Into<crate::model::ManagedCertificate>,
4290    {
4291        self.managed_certificate = std::option::Option::Some(v.into());
4292        self
4293    }
4294
4295    /// Sets or clears the value of [managed_certificate][crate::model::AuthorizedCertificate::managed_certificate].
4296    pub fn set_or_clear_managed_certificate<T>(mut self, v: std::option::Option<T>) -> Self
4297    where
4298        T: std::convert::Into<crate::model::ManagedCertificate>,
4299    {
4300        self.managed_certificate = v.map(|x| x.into());
4301        self
4302    }
4303
4304    /// Sets the value of [visible_domain_mappings][crate::model::AuthorizedCertificate::visible_domain_mappings].
4305    pub fn set_visible_domain_mappings<T, V>(mut self, v: T) -> Self
4306    where
4307        T: std::iter::IntoIterator<Item = V>,
4308        V: std::convert::Into<std::string::String>,
4309    {
4310        use std::iter::Iterator;
4311        self.visible_domain_mappings = v.into_iter().map(|i| i.into()).collect();
4312        self
4313    }
4314
4315    /// Sets the value of [domain_mappings_count][crate::model::AuthorizedCertificate::domain_mappings_count].
4316    pub fn set_domain_mappings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4317        self.domain_mappings_count = v.into();
4318        self
4319    }
4320}
4321
4322impl wkt::message::Message for AuthorizedCertificate {
4323    fn typename() -> &'static str {
4324        "type.googleapis.com/google.appengine.v1.AuthorizedCertificate"
4325    }
4326}
4327
4328/// An SSL certificate obtained from a certificate authority.
4329#[derive(Clone, Default, PartialEq)]
4330#[non_exhaustive]
4331pub struct CertificateRawData {
4332    /// PEM encoded x.509 public key certificate. This field is set once on
4333    /// certificate creation. Must include the header and footer. Example:
4334    pub public_certificate: std::string::String,
4335
4336    /// Unencrypted PEM encoded RSA private key. This field is set once on
4337    /// certificate creation and then encrypted. The key size must be 2048
4338    /// bits or fewer. Must include the header and footer. Example:
4339    ///
4340    /// @InputOnly
4341    pub private_key: std::string::String,
4342
4343    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4344}
4345
4346impl CertificateRawData {
4347    pub fn new() -> Self {
4348        std::default::Default::default()
4349    }
4350
4351    /// Sets the value of [public_certificate][crate::model::CertificateRawData::public_certificate].
4352    pub fn set_public_certificate<T: std::convert::Into<std::string::String>>(
4353        mut self,
4354        v: T,
4355    ) -> Self {
4356        self.public_certificate = v.into();
4357        self
4358    }
4359
4360    /// Sets the value of [private_key][crate::model::CertificateRawData::private_key].
4361    pub fn set_private_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4362        self.private_key = v.into();
4363        self
4364    }
4365}
4366
4367impl wkt::message::Message for CertificateRawData {
4368    fn typename() -> &'static str {
4369        "type.googleapis.com/google.appengine.v1.CertificateRawData"
4370    }
4371}
4372
4373/// A certificate managed by App Engine.
4374#[derive(Clone, Default, PartialEq)]
4375#[non_exhaustive]
4376pub struct ManagedCertificate {
4377    /// Time at which the certificate was last renewed. The renewal process is
4378    /// fully managed. Certificate renewal will automatically occur before the
4379    /// certificate expires. Renewal errors can be tracked via `ManagementStatus`.
4380    ///
4381    /// @OutputOnly
4382    pub last_renewal_time: std::option::Option<wkt::Timestamp>,
4383
4384    /// Status of certificate management. Refers to the most recent certificate
4385    /// acquisition or renewal attempt.
4386    ///
4387    /// @OutputOnly
4388    pub status: crate::model::ManagementStatus,
4389
4390    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4391}
4392
4393impl ManagedCertificate {
4394    pub fn new() -> Self {
4395        std::default::Default::default()
4396    }
4397
4398    /// Sets the value of [last_renewal_time][crate::model::ManagedCertificate::last_renewal_time].
4399    pub fn set_last_renewal_time<T>(mut self, v: T) -> Self
4400    where
4401        T: std::convert::Into<wkt::Timestamp>,
4402    {
4403        self.last_renewal_time = std::option::Option::Some(v.into());
4404        self
4405    }
4406
4407    /// Sets or clears the value of [last_renewal_time][crate::model::ManagedCertificate::last_renewal_time].
4408    pub fn set_or_clear_last_renewal_time<T>(mut self, v: std::option::Option<T>) -> Self
4409    where
4410        T: std::convert::Into<wkt::Timestamp>,
4411    {
4412        self.last_renewal_time = v.map(|x| x.into());
4413        self
4414    }
4415
4416    /// Sets the value of [status][crate::model::ManagedCertificate::status].
4417    pub fn set_status<T: std::convert::Into<crate::model::ManagementStatus>>(
4418        mut self,
4419        v: T,
4420    ) -> Self {
4421        self.status = v.into();
4422        self
4423    }
4424}
4425
4426impl wkt::message::Message for ManagedCertificate {
4427    fn typename() -> &'static str {
4428        "type.googleapis.com/google.appengine.v1.ManagedCertificate"
4429    }
4430}
4431
4432/// Code and application artifacts used to deploy a version to App Engine.
4433#[derive(Clone, Default, PartialEq)]
4434#[non_exhaustive]
4435pub struct Deployment {
4436    /// Manifest of the files stored in Google Cloud Storage that are included
4437    /// as part of this version. All files must be readable using the
4438    /// credentials supplied with this call.
4439    pub files: std::collections::HashMap<std::string::String, crate::model::FileInfo>,
4440
4441    /// The Docker image for the container that runs the version.
4442    /// Only applicable for instances running in the App Engine flexible environment.
4443    pub container: std::option::Option<crate::model::ContainerInfo>,
4444
4445    /// The zip file for this deployment, if this is a zip deployment.
4446    pub zip: std::option::Option<crate::model::ZipInfo>,
4447
4448    /// Options for any Google Cloud Build builds created as a part of this
4449    /// deployment.
4450    ///
4451    /// These options will only be used if a new build is created, such as when
4452    /// deploying to the App Engine flexible environment using files or zip.
4453    pub cloud_build_options: std::option::Option<crate::model::CloudBuildOptions>,
4454
4455    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4456}
4457
4458impl Deployment {
4459    pub fn new() -> Self {
4460        std::default::Default::default()
4461    }
4462
4463    /// Sets the value of [files][crate::model::Deployment::files].
4464    pub fn set_files<T, K, V>(mut self, v: T) -> Self
4465    where
4466        T: std::iter::IntoIterator<Item = (K, V)>,
4467        K: std::convert::Into<std::string::String>,
4468        V: std::convert::Into<crate::model::FileInfo>,
4469    {
4470        use std::iter::Iterator;
4471        self.files = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4472        self
4473    }
4474
4475    /// Sets the value of [container][crate::model::Deployment::container].
4476    pub fn set_container<T>(mut self, v: T) -> Self
4477    where
4478        T: std::convert::Into<crate::model::ContainerInfo>,
4479    {
4480        self.container = std::option::Option::Some(v.into());
4481        self
4482    }
4483
4484    /// Sets or clears the value of [container][crate::model::Deployment::container].
4485    pub fn set_or_clear_container<T>(mut self, v: std::option::Option<T>) -> Self
4486    where
4487        T: std::convert::Into<crate::model::ContainerInfo>,
4488    {
4489        self.container = v.map(|x| x.into());
4490        self
4491    }
4492
4493    /// Sets the value of [zip][crate::model::Deployment::zip].
4494    pub fn set_zip<T>(mut self, v: T) -> Self
4495    where
4496        T: std::convert::Into<crate::model::ZipInfo>,
4497    {
4498        self.zip = std::option::Option::Some(v.into());
4499        self
4500    }
4501
4502    /// Sets or clears the value of [zip][crate::model::Deployment::zip].
4503    pub fn set_or_clear_zip<T>(mut self, v: std::option::Option<T>) -> Self
4504    where
4505        T: std::convert::Into<crate::model::ZipInfo>,
4506    {
4507        self.zip = v.map(|x| x.into());
4508        self
4509    }
4510
4511    /// Sets the value of [cloud_build_options][crate::model::Deployment::cloud_build_options].
4512    pub fn set_cloud_build_options<T>(mut self, v: T) -> Self
4513    where
4514        T: std::convert::Into<crate::model::CloudBuildOptions>,
4515    {
4516        self.cloud_build_options = std::option::Option::Some(v.into());
4517        self
4518    }
4519
4520    /// Sets or clears the value of [cloud_build_options][crate::model::Deployment::cloud_build_options].
4521    pub fn set_or_clear_cloud_build_options<T>(mut self, v: std::option::Option<T>) -> Self
4522    where
4523        T: std::convert::Into<crate::model::CloudBuildOptions>,
4524    {
4525        self.cloud_build_options = v.map(|x| x.into());
4526        self
4527    }
4528}
4529
4530impl wkt::message::Message for Deployment {
4531    fn typename() -> &'static str {
4532        "type.googleapis.com/google.appengine.v1.Deployment"
4533    }
4534}
4535
4536/// Single source file that is part of the version to be deployed. Each source
4537/// file that is deployed must be specified separately.
4538#[derive(Clone, Default, PartialEq)]
4539#[non_exhaustive]
4540pub struct FileInfo {
4541    /// URL source to use to fetch this file. Must be a URL to a resource in
4542    /// Google Cloud Storage in the form
4543    /// 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
4544    pub source_url: std::string::String,
4545
4546    /// The SHA1 hash of the file, in hex.
4547    pub sha1_sum: std::string::String,
4548
4549    /// The MIME type of the file.
4550    ///
4551    /// Defaults to the value from Google Cloud Storage.
4552    pub mime_type: std::string::String,
4553
4554    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4555}
4556
4557impl FileInfo {
4558    pub fn new() -> Self {
4559        std::default::Default::default()
4560    }
4561
4562    /// Sets the value of [source_url][crate::model::FileInfo::source_url].
4563    pub fn set_source_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4564        self.source_url = v.into();
4565        self
4566    }
4567
4568    /// Sets the value of [sha1_sum][crate::model::FileInfo::sha1_sum].
4569    pub fn set_sha1_sum<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4570        self.sha1_sum = v.into();
4571        self
4572    }
4573
4574    /// Sets the value of [mime_type][crate::model::FileInfo::mime_type].
4575    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4576        self.mime_type = v.into();
4577        self
4578    }
4579}
4580
4581impl wkt::message::Message for FileInfo {
4582    fn typename() -> &'static str {
4583        "type.googleapis.com/google.appengine.v1.FileInfo"
4584    }
4585}
4586
4587/// Docker image that is used to create a container and start a VM instance for
4588/// the version that you deploy. Only applicable for instances running in the App
4589/// Engine flexible environment.
4590#[derive(Clone, Default, PartialEq)]
4591#[non_exhaustive]
4592pub struct ContainerInfo {
4593    /// URI to the hosted container image in Google Container Registry. The URI
4594    /// must be fully qualified and include a tag or digest.
4595    /// Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
4596    pub image: std::string::String,
4597
4598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4599}
4600
4601impl ContainerInfo {
4602    pub fn new() -> Self {
4603        std::default::Default::default()
4604    }
4605
4606    /// Sets the value of [image][crate::model::ContainerInfo::image].
4607    pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4608        self.image = v.into();
4609        self
4610    }
4611}
4612
4613impl wkt::message::Message for ContainerInfo {
4614    fn typename() -> &'static str {
4615        "type.googleapis.com/google.appengine.v1.ContainerInfo"
4616    }
4617}
4618
4619/// Options for the build operations performed as a part of the version
4620/// deployment. Only applicable for App Engine flexible environment when creating
4621/// a version using source code directly.
4622#[derive(Clone, Default, PartialEq)]
4623#[non_exhaustive]
4624pub struct CloudBuildOptions {
4625    /// Path to the yaml file used in deployment, used to determine runtime
4626    /// configuration details.
4627    ///
4628    /// Required for flexible environment builds.
4629    ///
4630    /// See <https://cloud.google.com/appengine/docs/standard/python/config/appref>
4631    /// for more details.
4632    pub app_yaml_path: std::string::String,
4633
4634    /// The Cloud Build timeout used as part of any dependent builds performed by
4635    /// version creation. Defaults to 10 minutes.
4636    pub cloud_build_timeout: std::option::Option<wkt::Duration>,
4637
4638    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4639}
4640
4641impl CloudBuildOptions {
4642    pub fn new() -> Self {
4643        std::default::Default::default()
4644    }
4645
4646    /// Sets the value of [app_yaml_path][crate::model::CloudBuildOptions::app_yaml_path].
4647    pub fn set_app_yaml_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4648        self.app_yaml_path = v.into();
4649        self
4650    }
4651
4652    /// Sets the value of [cloud_build_timeout][crate::model::CloudBuildOptions::cloud_build_timeout].
4653    pub fn set_cloud_build_timeout<T>(mut self, v: T) -> Self
4654    where
4655        T: std::convert::Into<wkt::Duration>,
4656    {
4657        self.cloud_build_timeout = std::option::Option::Some(v.into());
4658        self
4659    }
4660
4661    /// Sets or clears the value of [cloud_build_timeout][crate::model::CloudBuildOptions::cloud_build_timeout].
4662    pub fn set_or_clear_cloud_build_timeout<T>(mut self, v: std::option::Option<T>) -> Self
4663    where
4664        T: std::convert::Into<wkt::Duration>,
4665    {
4666        self.cloud_build_timeout = v.map(|x| x.into());
4667        self
4668    }
4669}
4670
4671impl wkt::message::Message for CloudBuildOptions {
4672    fn typename() -> &'static str {
4673        "type.googleapis.com/google.appengine.v1.CloudBuildOptions"
4674    }
4675}
4676
4677/// The zip file information for a zip deployment.
4678#[derive(Clone, Default, PartialEq)]
4679#[non_exhaustive]
4680pub struct ZipInfo {
4681    /// URL of the zip file to deploy from. Must be a URL to a resource in
4682    /// Google Cloud Storage in the form
4683    /// 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
4684    pub source_url: std::string::String,
4685
4686    /// An estimate of the number of files in a zip for a zip deployment.
4687    /// If set, must be greater than or equal to the actual number of files.
4688    /// Used for optimizing performance; if not provided, deployment may be slow.
4689    pub files_count: i32,
4690
4691    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4692}
4693
4694impl ZipInfo {
4695    pub fn new() -> Self {
4696        std::default::Default::default()
4697    }
4698
4699    /// Sets the value of [source_url][crate::model::ZipInfo::source_url].
4700    pub fn set_source_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4701        self.source_url = v.into();
4702        self
4703    }
4704
4705    /// Sets the value of [files_count][crate::model::ZipInfo::files_count].
4706    pub fn set_files_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4707        self.files_count = v.into();
4708        self
4709    }
4710}
4711
4712impl wkt::message::Message for ZipInfo {
4713    fn typename() -> &'static str {
4714        "type.googleapis.com/google.appengine.v1.ZipInfo"
4715    }
4716}
4717
4718/// A domain that a user has been authorized to administer. To authorize use
4719/// of a domain, verify ownership via
4720/// [Search Console](https://search.google.com/search-console/welcome).
4721#[derive(Clone, Default, PartialEq)]
4722#[non_exhaustive]
4723pub struct AuthorizedDomain {
4724    /// Full path to the `AuthorizedDomain` resource in the API. Example:
4725    /// `apps/myapp/authorizedDomains/example.com`.
4726    ///
4727    /// @OutputOnly
4728    pub name: std::string::String,
4729
4730    /// Fully qualified domain name of the domain authorized for use. Example:
4731    /// `example.com`.
4732    pub id: std::string::String,
4733
4734    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4735}
4736
4737impl AuthorizedDomain {
4738    pub fn new() -> Self {
4739        std::default::Default::default()
4740    }
4741
4742    /// Sets the value of [name][crate::model::AuthorizedDomain::name].
4743    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4744        self.name = v.into();
4745        self
4746    }
4747
4748    /// Sets the value of [id][crate::model::AuthorizedDomain::id].
4749    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4750        self.id = v.into();
4751        self
4752    }
4753}
4754
4755impl wkt::message::Message for AuthorizedDomain {
4756    fn typename() -> &'static str {
4757        "type.googleapis.com/google.appengine.v1.AuthorizedDomain"
4758    }
4759}
4760
4761/// A domain serving an App Engine application.
4762#[derive(Clone, Default, PartialEq)]
4763#[non_exhaustive]
4764pub struct DomainMapping {
4765    /// Full path to the `DomainMapping` resource in the API. Example:
4766    /// `apps/myapp/domainMapping/example.com`.
4767    ///
4768    /// @OutputOnly
4769    pub name: std::string::String,
4770
4771    /// Relative name of the domain serving the application. Example:
4772    /// `example.com`.
4773    pub id: std::string::String,
4774
4775    /// SSL configuration for this domain. If unconfigured, this domain will not
4776    /// serve with SSL.
4777    pub ssl_settings: std::option::Option<crate::model::SslSettings>,
4778
4779    /// The resource records required to configure this domain mapping. These
4780    /// records must be added to the domain's DNS configuration in order to
4781    /// serve the application via this domain mapping.
4782    ///
4783    /// @OutputOnly
4784    pub resource_records: std::vec::Vec<crate::model::ResourceRecord>,
4785
4786    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4787}
4788
4789impl DomainMapping {
4790    pub fn new() -> Self {
4791        std::default::Default::default()
4792    }
4793
4794    /// Sets the value of [name][crate::model::DomainMapping::name].
4795    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4796        self.name = v.into();
4797        self
4798    }
4799
4800    /// Sets the value of [id][crate::model::DomainMapping::id].
4801    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4802        self.id = v.into();
4803        self
4804    }
4805
4806    /// Sets the value of [ssl_settings][crate::model::DomainMapping::ssl_settings].
4807    pub fn set_ssl_settings<T>(mut self, v: T) -> Self
4808    where
4809        T: std::convert::Into<crate::model::SslSettings>,
4810    {
4811        self.ssl_settings = std::option::Option::Some(v.into());
4812        self
4813    }
4814
4815    /// Sets or clears the value of [ssl_settings][crate::model::DomainMapping::ssl_settings].
4816    pub fn set_or_clear_ssl_settings<T>(mut self, v: std::option::Option<T>) -> Self
4817    where
4818        T: std::convert::Into<crate::model::SslSettings>,
4819    {
4820        self.ssl_settings = v.map(|x| x.into());
4821        self
4822    }
4823
4824    /// Sets the value of [resource_records][crate::model::DomainMapping::resource_records].
4825    pub fn set_resource_records<T, V>(mut self, v: T) -> Self
4826    where
4827        T: std::iter::IntoIterator<Item = V>,
4828        V: std::convert::Into<crate::model::ResourceRecord>,
4829    {
4830        use std::iter::Iterator;
4831        self.resource_records = v.into_iter().map(|i| i.into()).collect();
4832        self
4833    }
4834}
4835
4836impl wkt::message::Message for DomainMapping {
4837    fn typename() -> &'static str {
4838        "type.googleapis.com/google.appengine.v1.DomainMapping"
4839    }
4840}
4841
4842/// SSL configuration for a `DomainMapping` resource.
4843#[derive(Clone, Default, PartialEq)]
4844#[non_exhaustive]
4845pub struct SslSettings {
4846    /// ID of the `AuthorizedCertificate` resource configuring SSL for the
4847    /// application. Clearing this field will remove SSL support.
4848    ///
4849    /// By default, a managed certificate is automatically created for every
4850    /// domain mapping. To omit SSL support or to configure SSL manually, specify
4851    /// `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
4852    /// be authorized to administer the `AuthorizedCertificate` resource to
4853    /// manually map it to a `DomainMapping` resource.
4854    /// Example: `12345`.
4855    pub certificate_id: std::string::String,
4856
4857    /// SSL management type for this domain. If `AUTOMATIC`, a managed certificate
4858    /// is automatically provisioned. If `MANUAL`, `certificate_id` must be
4859    /// manually specified in order to configure SSL for this domain.
4860    pub ssl_management_type: crate::model::ssl_settings::SslManagementType,
4861
4862    /// ID of the managed `AuthorizedCertificate` resource currently being
4863    /// provisioned, if applicable. Until the new managed certificate has been
4864    /// successfully provisioned, the previous SSL state will be preserved. Once
4865    /// the provisioning process completes, the `certificate_id` field will reflect
4866    /// the new managed certificate and this field will be left empty. To remove
4867    /// SSL support while there is still a pending managed certificate, clear the
4868    /// `certificate_id` field with an `UpdateDomainMappingRequest`.
4869    ///
4870    /// @OutputOnly
4871    pub pending_managed_certificate_id: std::string::String,
4872
4873    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4874}
4875
4876impl SslSettings {
4877    pub fn new() -> Self {
4878        std::default::Default::default()
4879    }
4880
4881    /// Sets the value of [certificate_id][crate::model::SslSettings::certificate_id].
4882    pub fn set_certificate_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4883        self.certificate_id = v.into();
4884        self
4885    }
4886
4887    /// Sets the value of [ssl_management_type][crate::model::SslSettings::ssl_management_type].
4888    pub fn set_ssl_management_type<
4889        T: std::convert::Into<crate::model::ssl_settings::SslManagementType>,
4890    >(
4891        mut self,
4892        v: T,
4893    ) -> Self {
4894        self.ssl_management_type = v.into();
4895        self
4896    }
4897
4898    /// Sets the value of [pending_managed_certificate_id][crate::model::SslSettings::pending_managed_certificate_id].
4899    pub fn set_pending_managed_certificate_id<T: std::convert::Into<std::string::String>>(
4900        mut self,
4901        v: T,
4902    ) -> Self {
4903        self.pending_managed_certificate_id = v.into();
4904        self
4905    }
4906}
4907
4908impl wkt::message::Message for SslSettings {
4909    fn typename() -> &'static str {
4910        "type.googleapis.com/google.appengine.v1.SslSettings"
4911    }
4912}
4913
4914/// Defines additional types related to [SslSettings].
4915pub mod ssl_settings {
4916    #[allow(unused_imports)]
4917    use super::*;
4918
4919    /// The SSL management type for this domain.
4920    ///
4921    /// # Working with unknown values
4922    ///
4923    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4924    /// additional enum variants at any time. Adding new variants is not considered
4925    /// a breaking change. Applications should write their code in anticipation of:
4926    ///
4927    /// - New values appearing in future releases of the client library, **and**
4928    /// - New values received dynamically, without application changes.
4929    ///
4930    /// Please consult the [Working with enums] section in the user guide for some
4931    /// guidelines.
4932    ///
4933    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4934    #[derive(Clone, Debug, PartialEq)]
4935    #[non_exhaustive]
4936    pub enum SslManagementType {
4937        /// Defaults to `AUTOMATIC`.
4938        Unspecified,
4939        /// SSL support for this domain is configured automatically. The mapped SSL
4940        /// certificate will be automatically renewed.
4941        Automatic,
4942        /// SSL support for this domain is configured manually by the user. Either
4943        /// the domain has no SSL support or a user-obtained SSL certificate has been
4944        /// explictly mapped to this domain.
4945        Manual,
4946        /// If set, the enum was initialized with an unknown value.
4947        ///
4948        /// Applications can examine the value using [SslManagementType::value] or
4949        /// [SslManagementType::name].
4950        UnknownValue(ssl_management_type::UnknownValue),
4951    }
4952
4953    #[doc(hidden)]
4954    pub mod ssl_management_type {
4955        #[allow(unused_imports)]
4956        use super::*;
4957        #[derive(Clone, Debug, PartialEq)]
4958        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4959    }
4960
4961    impl SslManagementType {
4962        /// Gets the enum value.
4963        ///
4964        /// Returns `None` if the enum contains an unknown value deserialized from
4965        /// the string representation of enums.
4966        pub fn value(&self) -> std::option::Option<i32> {
4967            match self {
4968                Self::Unspecified => std::option::Option::Some(0),
4969                Self::Automatic => std::option::Option::Some(1),
4970                Self::Manual => std::option::Option::Some(2),
4971                Self::UnknownValue(u) => u.0.value(),
4972            }
4973        }
4974
4975        /// Gets the enum value as a string.
4976        ///
4977        /// Returns `None` if the enum contains an unknown value deserialized from
4978        /// the integer representation of enums.
4979        pub fn name(&self) -> std::option::Option<&str> {
4980            match self {
4981                Self::Unspecified => std::option::Option::Some("SSL_MANAGEMENT_TYPE_UNSPECIFIED"),
4982                Self::Automatic => std::option::Option::Some("AUTOMATIC"),
4983                Self::Manual => std::option::Option::Some("MANUAL"),
4984                Self::UnknownValue(u) => u.0.name(),
4985            }
4986        }
4987    }
4988
4989    impl std::default::Default for SslManagementType {
4990        fn default() -> Self {
4991            use std::convert::From;
4992            Self::from(0)
4993        }
4994    }
4995
4996    impl std::fmt::Display for SslManagementType {
4997        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4998            wkt::internal::display_enum(f, self.name(), self.value())
4999        }
5000    }
5001
5002    impl std::convert::From<i32> for SslManagementType {
5003        fn from(value: i32) -> Self {
5004            match value {
5005                0 => Self::Unspecified,
5006                1 => Self::Automatic,
5007                2 => Self::Manual,
5008                _ => Self::UnknownValue(ssl_management_type::UnknownValue(
5009                    wkt::internal::UnknownEnumValue::Integer(value),
5010                )),
5011            }
5012        }
5013    }
5014
5015    impl std::convert::From<&str> for SslManagementType {
5016        fn from(value: &str) -> Self {
5017            use std::string::ToString;
5018            match value {
5019                "SSL_MANAGEMENT_TYPE_UNSPECIFIED" => Self::Unspecified,
5020                "AUTOMATIC" => Self::Automatic,
5021                "MANUAL" => Self::Manual,
5022                _ => Self::UnknownValue(ssl_management_type::UnknownValue(
5023                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5024                )),
5025            }
5026        }
5027    }
5028
5029    impl serde::ser::Serialize for SslManagementType {
5030        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5031        where
5032            S: serde::Serializer,
5033        {
5034            match self {
5035                Self::Unspecified => serializer.serialize_i32(0),
5036                Self::Automatic => serializer.serialize_i32(1),
5037                Self::Manual => serializer.serialize_i32(2),
5038                Self::UnknownValue(u) => u.0.serialize(serializer),
5039            }
5040        }
5041    }
5042
5043    impl<'de> serde::de::Deserialize<'de> for SslManagementType {
5044        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5045        where
5046            D: serde::Deserializer<'de>,
5047        {
5048            deserializer.deserialize_any(wkt::internal::EnumVisitor::<SslManagementType>::new(
5049                ".google.appengine.v1.SslSettings.SslManagementType",
5050            ))
5051        }
5052    }
5053}
5054
5055/// A DNS resource record.
5056#[derive(Clone, Default, PartialEq)]
5057#[non_exhaustive]
5058pub struct ResourceRecord {
5059    /// Relative name of the object affected by this record. Only applicable for
5060    /// `CNAME` records. Example: 'www'.
5061    pub name: std::string::String,
5062
5063    /// Data for this record. Values vary by record type, as defined in RFC 1035
5064    /// (section 5) and RFC 1034 (section 3.6.1).
5065    pub rrdata: std::string::String,
5066
5067    /// Resource record type. Example: `AAAA`.
5068    pub r#type: crate::model::resource_record::RecordType,
5069
5070    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5071}
5072
5073impl ResourceRecord {
5074    pub fn new() -> Self {
5075        std::default::Default::default()
5076    }
5077
5078    /// Sets the value of [name][crate::model::ResourceRecord::name].
5079    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5080        self.name = v.into();
5081        self
5082    }
5083
5084    /// Sets the value of [rrdata][crate::model::ResourceRecord::rrdata].
5085    pub fn set_rrdata<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5086        self.rrdata = v.into();
5087        self
5088    }
5089
5090    /// Sets the value of [r#type][crate::model::ResourceRecord::type].
5091    pub fn set_type<T: std::convert::Into<crate::model::resource_record::RecordType>>(
5092        mut self,
5093        v: T,
5094    ) -> Self {
5095        self.r#type = v.into();
5096        self
5097    }
5098}
5099
5100impl wkt::message::Message for ResourceRecord {
5101    fn typename() -> &'static str {
5102        "type.googleapis.com/google.appengine.v1.ResourceRecord"
5103    }
5104}
5105
5106/// Defines additional types related to [ResourceRecord].
5107pub mod resource_record {
5108    #[allow(unused_imports)]
5109    use super::*;
5110
5111    /// A resource record type.
5112    ///
5113    /// # Working with unknown values
5114    ///
5115    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5116    /// additional enum variants at any time. Adding new variants is not considered
5117    /// a breaking change. Applications should write their code in anticipation of:
5118    ///
5119    /// - New values appearing in future releases of the client library, **and**
5120    /// - New values received dynamically, without application changes.
5121    ///
5122    /// Please consult the [Working with enums] section in the user guide for some
5123    /// guidelines.
5124    ///
5125    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5126    #[derive(Clone, Debug, PartialEq)]
5127    #[non_exhaustive]
5128    pub enum RecordType {
5129        /// An unknown resource record.
5130        Unspecified,
5131        /// An A resource record. Data is an IPv4 address.
5132        A,
5133        /// An AAAA resource record. Data is an IPv6 address.
5134        Aaaa,
5135        /// A CNAME resource record. Data is a domain name to be aliased.
5136        Cname,
5137        /// If set, the enum was initialized with an unknown value.
5138        ///
5139        /// Applications can examine the value using [RecordType::value] or
5140        /// [RecordType::name].
5141        UnknownValue(record_type::UnknownValue),
5142    }
5143
5144    #[doc(hidden)]
5145    pub mod record_type {
5146        #[allow(unused_imports)]
5147        use super::*;
5148        #[derive(Clone, Debug, PartialEq)]
5149        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5150    }
5151
5152    impl RecordType {
5153        /// Gets the enum value.
5154        ///
5155        /// Returns `None` if the enum contains an unknown value deserialized from
5156        /// the string representation of enums.
5157        pub fn value(&self) -> std::option::Option<i32> {
5158            match self {
5159                Self::Unspecified => std::option::Option::Some(0),
5160                Self::A => std::option::Option::Some(1),
5161                Self::Aaaa => std::option::Option::Some(2),
5162                Self::Cname => std::option::Option::Some(3),
5163                Self::UnknownValue(u) => u.0.value(),
5164            }
5165        }
5166
5167        /// Gets the enum value as a string.
5168        ///
5169        /// Returns `None` if the enum contains an unknown value deserialized from
5170        /// the integer representation of enums.
5171        pub fn name(&self) -> std::option::Option<&str> {
5172            match self {
5173                Self::Unspecified => std::option::Option::Some("RECORD_TYPE_UNSPECIFIED"),
5174                Self::A => std::option::Option::Some("A"),
5175                Self::Aaaa => std::option::Option::Some("AAAA"),
5176                Self::Cname => std::option::Option::Some("CNAME"),
5177                Self::UnknownValue(u) => u.0.name(),
5178            }
5179        }
5180    }
5181
5182    impl std::default::Default for RecordType {
5183        fn default() -> Self {
5184            use std::convert::From;
5185            Self::from(0)
5186        }
5187    }
5188
5189    impl std::fmt::Display for RecordType {
5190        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5191            wkt::internal::display_enum(f, self.name(), self.value())
5192        }
5193    }
5194
5195    impl std::convert::From<i32> for RecordType {
5196        fn from(value: i32) -> Self {
5197            match value {
5198                0 => Self::Unspecified,
5199                1 => Self::A,
5200                2 => Self::Aaaa,
5201                3 => Self::Cname,
5202                _ => Self::UnknownValue(record_type::UnknownValue(
5203                    wkt::internal::UnknownEnumValue::Integer(value),
5204                )),
5205            }
5206        }
5207    }
5208
5209    impl std::convert::From<&str> for RecordType {
5210        fn from(value: &str) -> Self {
5211            use std::string::ToString;
5212            match value {
5213                "RECORD_TYPE_UNSPECIFIED" => Self::Unspecified,
5214                "A" => Self::A,
5215                "AAAA" => Self::Aaaa,
5216                "CNAME" => Self::Cname,
5217                _ => Self::UnknownValue(record_type::UnknownValue(
5218                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5219                )),
5220            }
5221        }
5222    }
5223
5224    impl serde::ser::Serialize for RecordType {
5225        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5226        where
5227            S: serde::Serializer,
5228        {
5229            match self {
5230                Self::Unspecified => serializer.serialize_i32(0),
5231                Self::A => serializer.serialize_i32(1),
5232                Self::Aaaa => serializer.serialize_i32(2),
5233                Self::Cname => serializer.serialize_i32(3),
5234                Self::UnknownValue(u) => u.0.serialize(serializer),
5235            }
5236        }
5237    }
5238
5239    impl<'de> serde::de::Deserialize<'de> for RecordType {
5240        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5241        where
5242            D: serde::Deserializer<'de>,
5243        {
5244            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RecordType>::new(
5245                ".google.appengine.v1.ResourceRecord.RecordType",
5246            ))
5247        }
5248    }
5249}
5250
5251/// A single firewall rule that is evaluated against incoming traffic
5252/// and provides an action to take on matched requests.
5253#[derive(Clone, Default, PartialEq)]
5254#[non_exhaustive]
5255pub struct FirewallRule {
5256    /// A positive integer between [1, Int32.MaxValue-1] that defines the order of
5257    /// rule evaluation. Rules with the lowest priority are evaluated first.
5258    ///
5259    /// A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic
5260    /// when no previous rule matches. Only the action of this rule can be modified
5261    /// by the user.
5262    pub priority: i32,
5263
5264    /// The action to take on matched requests.
5265    pub action: crate::model::firewall_rule::Action,
5266
5267    /// IP address or range, defined using CIDR notation, of requests that this
5268    /// rule applies to. You can use the wildcard character "*" to match all IPs
5269    /// equivalent to "0/0" and "::/0" together.
5270    /// Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
5271    /// or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
5272    pub source_range: std::string::String,
5273
5274    /// An optional string description of this rule.
5275    /// This field has a maximum length of 100 characters.
5276    pub description: std::string::String,
5277
5278    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5279}
5280
5281impl FirewallRule {
5282    pub fn new() -> Self {
5283        std::default::Default::default()
5284    }
5285
5286    /// Sets the value of [priority][crate::model::FirewallRule::priority].
5287    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5288        self.priority = v.into();
5289        self
5290    }
5291
5292    /// Sets the value of [action][crate::model::FirewallRule::action].
5293    pub fn set_action<T: std::convert::Into<crate::model::firewall_rule::Action>>(
5294        mut self,
5295        v: T,
5296    ) -> Self {
5297        self.action = v.into();
5298        self
5299    }
5300
5301    /// Sets the value of [source_range][crate::model::FirewallRule::source_range].
5302    pub fn set_source_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5303        self.source_range = v.into();
5304        self
5305    }
5306
5307    /// Sets the value of [description][crate::model::FirewallRule::description].
5308    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5309        self.description = v.into();
5310        self
5311    }
5312}
5313
5314impl wkt::message::Message for FirewallRule {
5315    fn typename() -> &'static str {
5316        "type.googleapis.com/google.appengine.v1.FirewallRule"
5317    }
5318}
5319
5320/// Defines additional types related to [FirewallRule].
5321pub mod firewall_rule {
5322    #[allow(unused_imports)]
5323    use super::*;
5324
5325    /// Available actions to take on matching requests.
5326    ///
5327    /// # Working with unknown values
5328    ///
5329    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5330    /// additional enum variants at any time. Adding new variants is not considered
5331    /// a breaking change. Applications should write their code in anticipation of:
5332    ///
5333    /// - New values appearing in future releases of the client library, **and**
5334    /// - New values received dynamically, without application changes.
5335    ///
5336    /// Please consult the [Working with enums] section in the user guide for some
5337    /// guidelines.
5338    ///
5339    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5340    #[derive(Clone, Debug, PartialEq)]
5341    #[non_exhaustive]
5342    pub enum Action {
5343        UnspecifiedAction,
5344        /// Matching requests are allowed.
5345        Allow,
5346        /// Matching requests are denied.
5347        Deny,
5348        /// If set, the enum was initialized with an unknown value.
5349        ///
5350        /// Applications can examine the value using [Action::value] or
5351        /// [Action::name].
5352        UnknownValue(action::UnknownValue),
5353    }
5354
5355    #[doc(hidden)]
5356    pub mod action {
5357        #[allow(unused_imports)]
5358        use super::*;
5359        #[derive(Clone, Debug, PartialEq)]
5360        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5361    }
5362
5363    impl Action {
5364        /// Gets the enum value.
5365        ///
5366        /// Returns `None` if the enum contains an unknown value deserialized from
5367        /// the string representation of enums.
5368        pub fn value(&self) -> std::option::Option<i32> {
5369            match self {
5370                Self::UnspecifiedAction => std::option::Option::Some(0),
5371                Self::Allow => std::option::Option::Some(1),
5372                Self::Deny => std::option::Option::Some(2),
5373                Self::UnknownValue(u) => u.0.value(),
5374            }
5375        }
5376
5377        /// Gets the enum value as a string.
5378        ///
5379        /// Returns `None` if the enum contains an unknown value deserialized from
5380        /// the integer representation of enums.
5381        pub fn name(&self) -> std::option::Option<&str> {
5382            match self {
5383                Self::UnspecifiedAction => std::option::Option::Some("UNSPECIFIED_ACTION"),
5384                Self::Allow => std::option::Option::Some("ALLOW"),
5385                Self::Deny => std::option::Option::Some("DENY"),
5386                Self::UnknownValue(u) => u.0.name(),
5387            }
5388        }
5389    }
5390
5391    impl std::default::Default for Action {
5392        fn default() -> Self {
5393            use std::convert::From;
5394            Self::from(0)
5395        }
5396    }
5397
5398    impl std::fmt::Display for Action {
5399        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5400            wkt::internal::display_enum(f, self.name(), self.value())
5401        }
5402    }
5403
5404    impl std::convert::From<i32> for Action {
5405        fn from(value: i32) -> Self {
5406            match value {
5407                0 => Self::UnspecifiedAction,
5408                1 => Self::Allow,
5409                2 => Self::Deny,
5410                _ => Self::UnknownValue(action::UnknownValue(
5411                    wkt::internal::UnknownEnumValue::Integer(value),
5412                )),
5413            }
5414        }
5415    }
5416
5417    impl std::convert::From<&str> for Action {
5418        fn from(value: &str) -> Self {
5419            use std::string::ToString;
5420            match value {
5421                "UNSPECIFIED_ACTION" => Self::UnspecifiedAction,
5422                "ALLOW" => Self::Allow,
5423                "DENY" => Self::Deny,
5424                _ => Self::UnknownValue(action::UnknownValue(
5425                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5426                )),
5427            }
5428        }
5429    }
5430
5431    impl serde::ser::Serialize for Action {
5432        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5433        where
5434            S: serde::Serializer,
5435        {
5436            match self {
5437                Self::UnspecifiedAction => serializer.serialize_i32(0),
5438                Self::Allow => serializer.serialize_i32(1),
5439                Self::Deny => serializer.serialize_i32(2),
5440                Self::UnknownValue(u) => u.0.serialize(serializer),
5441            }
5442        }
5443    }
5444
5445    impl<'de> serde::de::Deserialize<'de> for Action {
5446        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5447        where
5448            D: serde::Deserializer<'de>,
5449        {
5450            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
5451                ".google.appengine.v1.FirewallRule.Action",
5452            ))
5453        }
5454    }
5455}
5456
5457/// An Instance resource is the computing unit that App Engine uses to
5458/// automatically scale an application.
5459#[derive(Clone, Default, PartialEq)]
5460#[non_exhaustive]
5461pub struct Instance {
5462    /// Output only. Full path to the Instance resource in the API.
5463    /// Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
5464    pub name: std::string::String,
5465
5466    /// Output only. Relative name of the instance within the version.
5467    /// Example: `instance-1`.
5468    pub id: std::string::String,
5469
5470    /// Output only. App Engine release this instance is running on.
5471    pub app_engine_release: std::string::String,
5472
5473    /// Output only. Availability of the instance.
5474    pub availability: crate::model::instance::Availability,
5475
5476    /// Output only. Name of the virtual machine where this instance lives. Only applicable
5477    /// for instances in App Engine flexible environment.
5478    pub vm_name: std::string::String,
5479
5480    /// Output only. Zone where the virtual machine is located. Only applicable for instances
5481    /// in App Engine flexible environment.
5482    pub vm_zone_name: std::string::String,
5483
5484    /// Output only. Virtual machine ID of this instance. Only applicable for instances in
5485    /// App Engine flexible environment.
5486    pub vm_id: std::string::String,
5487
5488    /// Output only. Time that this instance was started.
5489    ///
5490    /// @OutputOnly
5491    pub start_time: std::option::Option<wkt::Timestamp>,
5492
5493    /// Output only. Number of requests since this instance was started.
5494    pub requests: i32,
5495
5496    /// Output only. Number of errors since this instance was started.
5497    pub errors: i32,
5498
5499    /// Output only. Average queries per second (QPS) over the last minute.
5500    pub qps: f32,
5501
5502    /// Output only. Average latency (ms) over the last minute.
5503    pub average_latency: i32,
5504
5505    /// Output only. Total memory in use (bytes).
5506    pub memory_usage: i64,
5507
5508    /// Output only. Status of the virtual machine where this instance lives. Only applicable
5509    /// for instances in App Engine flexible environment.
5510    pub vm_status: std::string::String,
5511
5512    /// Output only. Whether this instance is in debug mode. Only applicable for instances in
5513    /// App Engine flexible environment.
5514    pub vm_debug_enabled: bool,
5515
5516    /// Output only. The IP address of this instance. Only applicable for instances in App
5517    /// Engine flexible environment.
5518    pub vm_ip: std::string::String,
5519
5520    /// Output only. The liveness health check of this instance. Only applicable for instances
5521    /// in App Engine flexible environment.
5522    pub vm_liveness: crate::model::instance::liveness::LivenessState,
5523
5524    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5525}
5526
5527impl Instance {
5528    pub fn new() -> Self {
5529        std::default::Default::default()
5530    }
5531
5532    /// Sets the value of [name][crate::model::Instance::name].
5533    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5534        self.name = v.into();
5535        self
5536    }
5537
5538    /// Sets the value of [id][crate::model::Instance::id].
5539    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5540        self.id = v.into();
5541        self
5542    }
5543
5544    /// Sets the value of [app_engine_release][crate::model::Instance::app_engine_release].
5545    pub fn set_app_engine_release<T: std::convert::Into<std::string::String>>(
5546        mut self,
5547        v: T,
5548    ) -> Self {
5549        self.app_engine_release = v.into();
5550        self
5551    }
5552
5553    /// Sets the value of [availability][crate::model::Instance::availability].
5554    pub fn set_availability<T: std::convert::Into<crate::model::instance::Availability>>(
5555        mut self,
5556        v: T,
5557    ) -> Self {
5558        self.availability = v.into();
5559        self
5560    }
5561
5562    /// Sets the value of [vm_name][crate::model::Instance::vm_name].
5563    pub fn set_vm_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5564        self.vm_name = v.into();
5565        self
5566    }
5567
5568    /// Sets the value of [vm_zone_name][crate::model::Instance::vm_zone_name].
5569    pub fn set_vm_zone_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5570        self.vm_zone_name = v.into();
5571        self
5572    }
5573
5574    /// Sets the value of [vm_id][crate::model::Instance::vm_id].
5575    pub fn set_vm_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5576        self.vm_id = v.into();
5577        self
5578    }
5579
5580    /// Sets the value of [start_time][crate::model::Instance::start_time].
5581    pub fn set_start_time<T>(mut self, v: T) -> Self
5582    where
5583        T: std::convert::Into<wkt::Timestamp>,
5584    {
5585        self.start_time = std::option::Option::Some(v.into());
5586        self
5587    }
5588
5589    /// Sets or clears the value of [start_time][crate::model::Instance::start_time].
5590    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5591    where
5592        T: std::convert::Into<wkt::Timestamp>,
5593    {
5594        self.start_time = v.map(|x| x.into());
5595        self
5596    }
5597
5598    /// Sets the value of [requests][crate::model::Instance::requests].
5599    pub fn set_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5600        self.requests = v.into();
5601        self
5602    }
5603
5604    /// Sets the value of [errors][crate::model::Instance::errors].
5605    pub fn set_errors<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5606        self.errors = v.into();
5607        self
5608    }
5609
5610    /// Sets the value of [qps][crate::model::Instance::qps].
5611    pub fn set_qps<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
5612        self.qps = v.into();
5613        self
5614    }
5615
5616    /// Sets the value of [average_latency][crate::model::Instance::average_latency].
5617    pub fn set_average_latency<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5618        self.average_latency = v.into();
5619        self
5620    }
5621
5622    /// Sets the value of [memory_usage][crate::model::Instance::memory_usage].
5623    pub fn set_memory_usage<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5624        self.memory_usage = v.into();
5625        self
5626    }
5627
5628    /// Sets the value of [vm_status][crate::model::Instance::vm_status].
5629    pub fn set_vm_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5630        self.vm_status = v.into();
5631        self
5632    }
5633
5634    /// Sets the value of [vm_debug_enabled][crate::model::Instance::vm_debug_enabled].
5635    pub fn set_vm_debug_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5636        self.vm_debug_enabled = v.into();
5637        self
5638    }
5639
5640    /// Sets the value of [vm_ip][crate::model::Instance::vm_ip].
5641    pub fn set_vm_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5642        self.vm_ip = v.into();
5643        self
5644    }
5645
5646    /// Sets the value of [vm_liveness][crate::model::Instance::vm_liveness].
5647    pub fn set_vm_liveness<
5648        T: std::convert::Into<crate::model::instance::liveness::LivenessState>,
5649    >(
5650        mut self,
5651        v: T,
5652    ) -> Self {
5653        self.vm_liveness = v.into();
5654        self
5655    }
5656}
5657
5658impl wkt::message::Message for Instance {
5659    fn typename() -> &'static str {
5660        "type.googleapis.com/google.appengine.v1.Instance"
5661    }
5662}
5663
5664/// Defines additional types related to [Instance].
5665pub mod instance {
5666    #[allow(unused_imports)]
5667    use super::*;
5668
5669    /// Wrapper for LivenessState enum.
5670    #[derive(Clone, Default, PartialEq)]
5671    #[non_exhaustive]
5672    pub struct Liveness {
5673        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5674    }
5675
5676    impl Liveness {
5677        pub fn new() -> Self {
5678            std::default::Default::default()
5679        }
5680    }
5681
5682    impl wkt::message::Message for Liveness {
5683        fn typename() -> &'static str {
5684            "type.googleapis.com/google.appengine.v1.Instance.Liveness"
5685        }
5686    }
5687
5688    /// Defines additional types related to [Liveness].
5689    pub mod liveness {
5690        #[allow(unused_imports)]
5691        use super::*;
5692
5693        /// Liveness health check status for Flex instances.
5694        ///
5695        /// # Working with unknown values
5696        ///
5697        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5698        /// additional enum variants at any time. Adding new variants is not considered
5699        /// a breaking change. Applications should write their code in anticipation of:
5700        ///
5701        /// - New values appearing in future releases of the client library, **and**
5702        /// - New values received dynamically, without application changes.
5703        ///
5704        /// Please consult the [Working with enums] section in the user guide for some
5705        /// guidelines.
5706        ///
5707        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5708        #[derive(Clone, Debug, PartialEq)]
5709        #[non_exhaustive]
5710        pub enum LivenessState {
5711            /// There is no liveness health check for the instance. Only applicable for
5712            /// instances in App Engine standard environment.
5713            Unspecified,
5714            /// The health checking system is aware of the instance but its health is
5715            /// not known at the moment.
5716            Unknown,
5717            /// The instance is reachable i.e. a connection to the application health
5718            /// checking endpoint can be established, and conforms to the requirements
5719            /// defined by the health check.
5720            Healthy,
5721            /// The instance is reachable, but does not conform to the requirements
5722            /// defined by the health check.
5723            Unhealthy,
5724            /// The instance is being drained. The existing connections to the instance
5725            /// have time to complete, but the new ones are being refused.
5726            Draining,
5727            /// The instance is unreachable i.e. a connection to the application health
5728            /// checking endpoint cannot be established, or the server does not respond
5729            /// within the specified timeout.
5730            Timeout,
5731            /// If set, the enum was initialized with an unknown value.
5732            ///
5733            /// Applications can examine the value using [LivenessState::value] or
5734            /// [LivenessState::name].
5735            UnknownValue(liveness_state::UnknownValue),
5736        }
5737
5738        #[doc(hidden)]
5739        pub mod liveness_state {
5740            #[allow(unused_imports)]
5741            use super::*;
5742            #[derive(Clone, Debug, PartialEq)]
5743            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5744        }
5745
5746        impl LivenessState {
5747            /// Gets the enum value.
5748            ///
5749            /// Returns `None` if the enum contains an unknown value deserialized from
5750            /// the string representation of enums.
5751            pub fn value(&self) -> std::option::Option<i32> {
5752                match self {
5753                    Self::Unspecified => std::option::Option::Some(0),
5754                    Self::Unknown => std::option::Option::Some(1),
5755                    Self::Healthy => std::option::Option::Some(2),
5756                    Self::Unhealthy => std::option::Option::Some(3),
5757                    Self::Draining => std::option::Option::Some(4),
5758                    Self::Timeout => std::option::Option::Some(5),
5759                    Self::UnknownValue(u) => u.0.value(),
5760                }
5761            }
5762
5763            /// Gets the enum value as a string.
5764            ///
5765            /// Returns `None` if the enum contains an unknown value deserialized from
5766            /// the integer representation of enums.
5767            pub fn name(&self) -> std::option::Option<&str> {
5768                match self {
5769                    Self::Unspecified => std::option::Option::Some("LIVENESS_STATE_UNSPECIFIED"),
5770                    Self::Unknown => std::option::Option::Some("UNKNOWN"),
5771                    Self::Healthy => std::option::Option::Some("HEALTHY"),
5772                    Self::Unhealthy => std::option::Option::Some("UNHEALTHY"),
5773                    Self::Draining => std::option::Option::Some("DRAINING"),
5774                    Self::Timeout => std::option::Option::Some("TIMEOUT"),
5775                    Self::UnknownValue(u) => u.0.name(),
5776                }
5777            }
5778        }
5779
5780        impl std::default::Default for LivenessState {
5781            fn default() -> Self {
5782                use std::convert::From;
5783                Self::from(0)
5784            }
5785        }
5786
5787        impl std::fmt::Display for LivenessState {
5788            fn fmt(
5789                &self,
5790                f: &mut std::fmt::Formatter<'_>,
5791            ) -> std::result::Result<(), std::fmt::Error> {
5792                wkt::internal::display_enum(f, self.name(), self.value())
5793            }
5794        }
5795
5796        impl std::convert::From<i32> for LivenessState {
5797            fn from(value: i32) -> Self {
5798                match value {
5799                    0 => Self::Unspecified,
5800                    1 => Self::Unknown,
5801                    2 => Self::Healthy,
5802                    3 => Self::Unhealthy,
5803                    4 => Self::Draining,
5804                    5 => Self::Timeout,
5805                    _ => Self::UnknownValue(liveness_state::UnknownValue(
5806                        wkt::internal::UnknownEnumValue::Integer(value),
5807                    )),
5808                }
5809            }
5810        }
5811
5812        impl std::convert::From<&str> for LivenessState {
5813            fn from(value: &str) -> Self {
5814                use std::string::ToString;
5815                match value {
5816                    "LIVENESS_STATE_UNSPECIFIED" => Self::Unspecified,
5817                    "UNKNOWN" => Self::Unknown,
5818                    "HEALTHY" => Self::Healthy,
5819                    "UNHEALTHY" => Self::Unhealthy,
5820                    "DRAINING" => Self::Draining,
5821                    "TIMEOUT" => Self::Timeout,
5822                    _ => Self::UnknownValue(liveness_state::UnknownValue(
5823                        wkt::internal::UnknownEnumValue::String(value.to_string()),
5824                    )),
5825                }
5826            }
5827        }
5828
5829        impl serde::ser::Serialize for LivenessState {
5830            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5831            where
5832                S: serde::Serializer,
5833            {
5834                match self {
5835                    Self::Unspecified => serializer.serialize_i32(0),
5836                    Self::Unknown => serializer.serialize_i32(1),
5837                    Self::Healthy => serializer.serialize_i32(2),
5838                    Self::Unhealthy => serializer.serialize_i32(3),
5839                    Self::Draining => serializer.serialize_i32(4),
5840                    Self::Timeout => serializer.serialize_i32(5),
5841                    Self::UnknownValue(u) => u.0.serialize(serializer),
5842                }
5843            }
5844        }
5845
5846        impl<'de> serde::de::Deserialize<'de> for LivenessState {
5847            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5848            where
5849                D: serde::Deserializer<'de>,
5850            {
5851                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LivenessState>::new(
5852                    ".google.appengine.v1.Instance.Liveness.LivenessState",
5853                ))
5854            }
5855        }
5856    }
5857
5858    /// Availability of the instance.
5859    ///
5860    /// # Working with unknown values
5861    ///
5862    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5863    /// additional enum variants at any time. Adding new variants is not considered
5864    /// a breaking change. Applications should write their code in anticipation of:
5865    ///
5866    /// - New values appearing in future releases of the client library, **and**
5867    /// - New values received dynamically, without application changes.
5868    ///
5869    /// Please consult the [Working with enums] section in the user guide for some
5870    /// guidelines.
5871    ///
5872    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5873    #[derive(Clone, Debug, PartialEq)]
5874    #[non_exhaustive]
5875    pub enum Availability {
5876        Unspecified,
5877        Resident,
5878        Dynamic,
5879        /// If set, the enum was initialized with an unknown value.
5880        ///
5881        /// Applications can examine the value using [Availability::value] or
5882        /// [Availability::name].
5883        UnknownValue(availability::UnknownValue),
5884    }
5885
5886    #[doc(hidden)]
5887    pub mod availability {
5888        #[allow(unused_imports)]
5889        use super::*;
5890        #[derive(Clone, Debug, PartialEq)]
5891        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5892    }
5893
5894    impl Availability {
5895        /// Gets the enum value.
5896        ///
5897        /// Returns `None` if the enum contains an unknown value deserialized from
5898        /// the string representation of enums.
5899        pub fn value(&self) -> std::option::Option<i32> {
5900            match self {
5901                Self::Unspecified => std::option::Option::Some(0),
5902                Self::Resident => std::option::Option::Some(1),
5903                Self::Dynamic => std::option::Option::Some(2),
5904                Self::UnknownValue(u) => u.0.value(),
5905            }
5906        }
5907
5908        /// Gets the enum value as a string.
5909        ///
5910        /// Returns `None` if the enum contains an unknown value deserialized from
5911        /// the integer representation of enums.
5912        pub fn name(&self) -> std::option::Option<&str> {
5913            match self {
5914                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
5915                Self::Resident => std::option::Option::Some("RESIDENT"),
5916                Self::Dynamic => std::option::Option::Some("DYNAMIC"),
5917                Self::UnknownValue(u) => u.0.name(),
5918            }
5919        }
5920    }
5921
5922    impl std::default::Default for Availability {
5923        fn default() -> Self {
5924            use std::convert::From;
5925            Self::from(0)
5926        }
5927    }
5928
5929    impl std::fmt::Display for Availability {
5930        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5931            wkt::internal::display_enum(f, self.name(), self.value())
5932        }
5933    }
5934
5935    impl std::convert::From<i32> for Availability {
5936        fn from(value: i32) -> Self {
5937            match value {
5938                0 => Self::Unspecified,
5939                1 => Self::Resident,
5940                2 => Self::Dynamic,
5941                _ => Self::UnknownValue(availability::UnknownValue(
5942                    wkt::internal::UnknownEnumValue::Integer(value),
5943                )),
5944            }
5945        }
5946    }
5947
5948    impl std::convert::From<&str> for Availability {
5949        fn from(value: &str) -> Self {
5950            use std::string::ToString;
5951            match value {
5952                "UNSPECIFIED" => Self::Unspecified,
5953                "RESIDENT" => Self::Resident,
5954                "DYNAMIC" => Self::Dynamic,
5955                _ => Self::UnknownValue(availability::UnknownValue(
5956                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5957                )),
5958            }
5959        }
5960    }
5961
5962    impl serde::ser::Serialize for Availability {
5963        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5964        where
5965            S: serde::Serializer,
5966        {
5967            match self {
5968                Self::Unspecified => serializer.serialize_i32(0),
5969                Self::Resident => serializer.serialize_i32(1),
5970                Self::Dynamic => serializer.serialize_i32(2),
5971                Self::UnknownValue(u) => u.0.serialize(serializer),
5972            }
5973        }
5974    }
5975
5976    impl<'de> serde::de::Deserialize<'de> for Availability {
5977        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5978        where
5979            D: serde::Deserializer<'de>,
5980        {
5981            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Availability>::new(
5982                ".google.appengine.v1.Instance.Availability",
5983            ))
5984        }
5985    }
5986}
5987
5988/// Metadata for the given [google.cloud.location.Location][google.cloud.location.Location].
5989#[derive(Clone, Default, PartialEq)]
5990#[non_exhaustive]
5991pub struct LocationMetadata {
5992    /// App Engine standard environment is available in the given location.
5993    ///
5994    /// @OutputOnly
5995    pub standard_environment_available: bool,
5996
5997    /// App Engine flexible environment is available in the given location.
5998    ///
5999    /// @OutputOnly
6000    pub flexible_environment_available: bool,
6001
6002    /// Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search)
6003    /// is available in the given location.
6004    pub search_api_available: bool,
6005
6006    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6007}
6008
6009impl LocationMetadata {
6010    pub fn new() -> Self {
6011        std::default::Default::default()
6012    }
6013
6014    /// Sets the value of [standard_environment_available][crate::model::LocationMetadata::standard_environment_available].
6015    pub fn set_standard_environment_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6016        self.standard_environment_available = v.into();
6017        self
6018    }
6019
6020    /// Sets the value of [flexible_environment_available][crate::model::LocationMetadata::flexible_environment_available].
6021    pub fn set_flexible_environment_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6022        self.flexible_environment_available = v.into();
6023        self
6024    }
6025
6026    /// Sets the value of [search_api_available][crate::model::LocationMetadata::search_api_available].
6027    pub fn set_search_api_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6028        self.search_api_available = v.into();
6029        self
6030    }
6031}
6032
6033impl wkt::message::Message for LocationMetadata {
6034    fn typename() -> &'static str {
6035        "type.googleapis.com/google.appengine.v1.LocationMetadata"
6036    }
6037}
6038
6039/// A NetworkSettings resource is a container for ingress settings for a version
6040/// or service.
6041#[derive(Clone, Default, PartialEq)]
6042#[non_exhaustive]
6043pub struct NetworkSettings {
6044    /// The ingress settings for version or service.
6045    pub ingress_traffic_allowed: crate::model::network_settings::IngressTrafficAllowed,
6046
6047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6048}
6049
6050impl NetworkSettings {
6051    pub fn new() -> Self {
6052        std::default::Default::default()
6053    }
6054
6055    /// Sets the value of [ingress_traffic_allowed][crate::model::NetworkSettings::ingress_traffic_allowed].
6056    pub fn set_ingress_traffic_allowed<
6057        T: std::convert::Into<crate::model::network_settings::IngressTrafficAllowed>,
6058    >(
6059        mut self,
6060        v: T,
6061    ) -> Self {
6062        self.ingress_traffic_allowed = v.into();
6063        self
6064    }
6065}
6066
6067impl wkt::message::Message for NetworkSettings {
6068    fn typename() -> &'static str {
6069        "type.googleapis.com/google.appengine.v1.NetworkSettings"
6070    }
6071}
6072
6073/// Defines additional types related to [NetworkSettings].
6074pub mod network_settings {
6075    #[allow(unused_imports)]
6076    use super::*;
6077
6078    /// If unspecified, INGRESS_TRAFFIC_ALLOWED_ALL will be used.
6079    ///
6080    /// # Working with unknown values
6081    ///
6082    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6083    /// additional enum variants at any time. Adding new variants is not considered
6084    /// a breaking change. Applications should write their code in anticipation of:
6085    ///
6086    /// - New values appearing in future releases of the client library, **and**
6087    /// - New values received dynamically, without application changes.
6088    ///
6089    /// Please consult the [Working with enums] section in the user guide for some
6090    /// guidelines.
6091    ///
6092    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6093    #[derive(Clone, Debug, PartialEq)]
6094    #[non_exhaustive]
6095    pub enum IngressTrafficAllowed {
6096        /// Unspecified
6097        Unspecified,
6098        /// Allow HTTP traffic from public and private sources.
6099        All,
6100        /// Allow HTTP traffic from only private VPC sources.
6101        InternalOnly,
6102        /// Allow HTTP traffic from private VPC sources and through load balancers.
6103        InternalAndLb,
6104        /// If set, the enum was initialized with an unknown value.
6105        ///
6106        /// Applications can examine the value using [IngressTrafficAllowed::value] or
6107        /// [IngressTrafficAllowed::name].
6108        UnknownValue(ingress_traffic_allowed::UnknownValue),
6109    }
6110
6111    #[doc(hidden)]
6112    pub mod ingress_traffic_allowed {
6113        #[allow(unused_imports)]
6114        use super::*;
6115        #[derive(Clone, Debug, PartialEq)]
6116        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6117    }
6118
6119    impl IngressTrafficAllowed {
6120        /// Gets the enum value.
6121        ///
6122        /// Returns `None` if the enum contains an unknown value deserialized from
6123        /// the string representation of enums.
6124        pub fn value(&self) -> std::option::Option<i32> {
6125            match self {
6126                Self::Unspecified => std::option::Option::Some(0),
6127                Self::All => std::option::Option::Some(1),
6128                Self::InternalOnly => std::option::Option::Some(2),
6129                Self::InternalAndLb => std::option::Option::Some(3),
6130                Self::UnknownValue(u) => u.0.value(),
6131            }
6132        }
6133
6134        /// Gets the enum value as a string.
6135        ///
6136        /// Returns `None` if the enum contains an unknown value deserialized from
6137        /// the integer representation of enums.
6138        pub fn name(&self) -> std::option::Option<&str> {
6139            match self {
6140                Self::Unspecified => {
6141                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED")
6142                }
6143                Self::All => std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_ALL"),
6144                Self::InternalOnly => {
6145                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY")
6146                }
6147                Self::InternalAndLb => {
6148                    std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB")
6149                }
6150                Self::UnknownValue(u) => u.0.name(),
6151            }
6152        }
6153    }
6154
6155    impl std::default::Default for IngressTrafficAllowed {
6156        fn default() -> Self {
6157            use std::convert::From;
6158            Self::from(0)
6159        }
6160    }
6161
6162    impl std::fmt::Display for IngressTrafficAllowed {
6163        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6164            wkt::internal::display_enum(f, self.name(), self.value())
6165        }
6166    }
6167
6168    impl std::convert::From<i32> for IngressTrafficAllowed {
6169        fn from(value: i32) -> Self {
6170            match value {
6171                0 => Self::Unspecified,
6172                1 => Self::All,
6173                2 => Self::InternalOnly,
6174                3 => Self::InternalAndLb,
6175                _ => Self::UnknownValue(ingress_traffic_allowed::UnknownValue(
6176                    wkt::internal::UnknownEnumValue::Integer(value),
6177                )),
6178            }
6179        }
6180    }
6181
6182    impl std::convert::From<&str> for IngressTrafficAllowed {
6183        fn from(value: &str) -> Self {
6184            use std::string::ToString;
6185            match value {
6186                "INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED" => Self::Unspecified,
6187                "INGRESS_TRAFFIC_ALLOWED_ALL" => Self::All,
6188                "INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY" => Self::InternalOnly,
6189                "INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB" => Self::InternalAndLb,
6190                _ => Self::UnknownValue(ingress_traffic_allowed::UnknownValue(
6191                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6192                )),
6193            }
6194        }
6195    }
6196
6197    impl serde::ser::Serialize for IngressTrafficAllowed {
6198        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6199        where
6200            S: serde::Serializer,
6201        {
6202            match self {
6203                Self::Unspecified => serializer.serialize_i32(0),
6204                Self::All => serializer.serialize_i32(1),
6205                Self::InternalOnly => serializer.serialize_i32(2),
6206                Self::InternalAndLb => serializer.serialize_i32(3),
6207                Self::UnknownValue(u) => u.0.serialize(serializer),
6208            }
6209        }
6210    }
6211
6212    impl<'de> serde::de::Deserialize<'de> for IngressTrafficAllowed {
6213        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6214        where
6215            D: serde::Deserializer<'de>,
6216        {
6217            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IngressTrafficAllowed>::new(
6218                ".google.appengine.v1.NetworkSettings.IngressTrafficAllowed",
6219            ))
6220        }
6221    }
6222}
6223
6224/// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation].
6225///
6226/// [google.longrunning.Operation]: longrunning::model::Operation
6227#[derive(Clone, Default, PartialEq)]
6228#[non_exhaustive]
6229pub struct OperationMetadataV1 {
6230    /// API method that initiated this operation. Example:
6231    /// `google.appengine.v1.Versions.CreateVersion`.
6232    ///
6233    /// @OutputOnly
6234    pub method: std::string::String,
6235
6236    /// Time that this operation was created.
6237    ///
6238    /// @OutputOnly
6239    pub insert_time: std::option::Option<wkt::Timestamp>,
6240
6241    /// Time that this operation completed.
6242    ///
6243    /// @OutputOnly
6244    pub end_time: std::option::Option<wkt::Timestamp>,
6245
6246    /// User who requested this operation.
6247    ///
6248    /// @OutputOnly
6249    pub user: std::string::String,
6250
6251    /// Name of the resource that this operation is acting on. Example:
6252    /// `apps/myapp/services/default`.
6253    ///
6254    /// @OutputOnly
6255    pub target: std::string::String,
6256
6257    /// Ephemeral message that may change every time the operation is polled.
6258    /// @OutputOnly
6259    pub ephemeral_message: std::string::String,
6260
6261    /// Durable messages that persist on every operation poll.
6262    /// @OutputOnly
6263    pub warning: std::vec::Vec<std::string::String>,
6264
6265    /// Metadata specific to the type of operation in progress.
6266    /// @OutputOnly
6267    pub method_metadata: std::option::Option<crate::model::operation_metadata_v_1::MethodMetadata>,
6268
6269    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6270}
6271
6272impl OperationMetadataV1 {
6273    pub fn new() -> Self {
6274        std::default::Default::default()
6275    }
6276
6277    /// Sets the value of [method][crate::model::OperationMetadataV1::method].
6278    pub fn set_method<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6279        self.method = v.into();
6280        self
6281    }
6282
6283    /// Sets the value of [insert_time][crate::model::OperationMetadataV1::insert_time].
6284    pub fn set_insert_time<T>(mut self, v: T) -> Self
6285    where
6286        T: std::convert::Into<wkt::Timestamp>,
6287    {
6288        self.insert_time = std::option::Option::Some(v.into());
6289        self
6290    }
6291
6292    /// Sets or clears the value of [insert_time][crate::model::OperationMetadataV1::insert_time].
6293    pub fn set_or_clear_insert_time<T>(mut self, v: std::option::Option<T>) -> Self
6294    where
6295        T: std::convert::Into<wkt::Timestamp>,
6296    {
6297        self.insert_time = v.map(|x| x.into());
6298        self
6299    }
6300
6301    /// Sets the value of [end_time][crate::model::OperationMetadataV1::end_time].
6302    pub fn set_end_time<T>(mut self, v: T) -> Self
6303    where
6304        T: std::convert::Into<wkt::Timestamp>,
6305    {
6306        self.end_time = std::option::Option::Some(v.into());
6307        self
6308    }
6309
6310    /// Sets or clears the value of [end_time][crate::model::OperationMetadataV1::end_time].
6311    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6312    where
6313        T: std::convert::Into<wkt::Timestamp>,
6314    {
6315        self.end_time = v.map(|x| x.into());
6316        self
6317    }
6318
6319    /// Sets the value of [user][crate::model::OperationMetadataV1::user].
6320    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6321        self.user = v.into();
6322        self
6323    }
6324
6325    /// Sets the value of [target][crate::model::OperationMetadataV1::target].
6326    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6327        self.target = v.into();
6328        self
6329    }
6330
6331    /// Sets the value of [ephemeral_message][crate::model::OperationMetadataV1::ephemeral_message].
6332    pub fn set_ephemeral_message<T: std::convert::Into<std::string::String>>(
6333        mut self,
6334        v: T,
6335    ) -> Self {
6336        self.ephemeral_message = v.into();
6337        self
6338    }
6339
6340    /// Sets the value of [warning][crate::model::OperationMetadataV1::warning].
6341    pub fn set_warning<T, V>(mut self, v: T) -> Self
6342    where
6343        T: std::iter::IntoIterator<Item = V>,
6344        V: std::convert::Into<std::string::String>,
6345    {
6346        use std::iter::Iterator;
6347        self.warning = v.into_iter().map(|i| i.into()).collect();
6348        self
6349    }
6350
6351    /// Sets the value of [method_metadata][crate::model::OperationMetadataV1::method_metadata].
6352    ///
6353    /// Note that all the setters affecting `method_metadata` are mutually
6354    /// exclusive.
6355    pub fn set_method_metadata<
6356        T: std::convert::Into<
6357                std::option::Option<crate::model::operation_metadata_v_1::MethodMetadata>,
6358            >,
6359    >(
6360        mut self,
6361        v: T,
6362    ) -> Self {
6363        self.method_metadata = v.into();
6364        self
6365    }
6366
6367    /// The value of [method_metadata][crate::model::OperationMetadataV1::method_metadata]
6368    /// if it holds a `CreateVersionMetadata`, `None` if the field is not set or
6369    /// holds a different branch.
6370    pub fn create_version_metadata(
6371        &self,
6372    ) -> std::option::Option<&std::boxed::Box<crate::model::CreateVersionMetadataV1>> {
6373        #[allow(unreachable_patterns)]
6374        self.method_metadata.as_ref().and_then(|v| match v {
6375            crate::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(v) => {
6376                std::option::Option::Some(v)
6377            }
6378            _ => std::option::Option::None,
6379        })
6380    }
6381
6382    /// Sets the value of [method_metadata][crate::model::OperationMetadataV1::method_metadata]
6383    /// to hold a `CreateVersionMetadata`.
6384    ///
6385    /// Note that all the setters affecting `method_metadata` are
6386    /// mutually exclusive.
6387    pub fn set_create_version_metadata<
6388        T: std::convert::Into<std::boxed::Box<crate::model::CreateVersionMetadataV1>>,
6389    >(
6390        mut self,
6391        v: T,
6392    ) -> Self {
6393        self.method_metadata = std::option::Option::Some(
6394            crate::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(v.into()),
6395        );
6396        self
6397    }
6398}
6399
6400impl wkt::message::Message for OperationMetadataV1 {
6401    fn typename() -> &'static str {
6402        "type.googleapis.com/google.appengine.v1.OperationMetadataV1"
6403    }
6404}
6405
6406/// Defines additional types related to [OperationMetadataV1].
6407pub mod operation_metadata_v_1 {
6408    #[allow(unused_imports)]
6409    use super::*;
6410
6411    /// Metadata specific to the type of operation in progress.
6412    /// @OutputOnly
6413    #[derive(Clone, Debug, PartialEq)]
6414    #[non_exhaustive]
6415    pub enum MethodMetadata {
6416        CreateVersionMetadata(std::boxed::Box<crate::model::CreateVersionMetadataV1>),
6417    }
6418}
6419
6420/// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation] during a
6421/// [google.appengine.v1.CreateVersionRequest][google.appengine.v1.CreateVersionRequest].
6422///
6423/// [google.appengine.v1.CreateVersionRequest]: crate::model::CreateVersionRequest
6424/// [google.longrunning.Operation]: longrunning::model::Operation
6425#[derive(Clone, Default, PartialEq)]
6426#[non_exhaustive]
6427pub struct CreateVersionMetadataV1 {
6428    /// The Cloud Build ID if one was created as part of the version create.
6429    /// @OutputOnly
6430    pub cloud_build_id: std::string::String,
6431
6432    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6433}
6434
6435impl CreateVersionMetadataV1 {
6436    pub fn new() -> Self {
6437        std::default::Default::default()
6438    }
6439
6440    /// Sets the value of [cloud_build_id][crate::model::CreateVersionMetadataV1::cloud_build_id].
6441    pub fn set_cloud_build_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6442        self.cloud_build_id = v.into();
6443        self
6444    }
6445}
6446
6447impl wkt::message::Message for CreateVersionMetadataV1 {
6448    fn typename() -> &'static str {
6449        "type.googleapis.com/google.appengine.v1.CreateVersionMetadataV1"
6450    }
6451}
6452
6453/// A Service resource is a logical component of an application that can share
6454/// state and communicate in a secure fashion with other services.
6455/// For example, an application that handles customer requests might
6456/// include separate services to handle tasks such as backend data
6457/// analysis or API requests from mobile devices. Each service has a
6458/// collection of versions that define a specific set of code used to
6459/// implement the functionality of that service.
6460#[derive(Clone, Default, PartialEq)]
6461#[non_exhaustive]
6462pub struct Service {
6463    /// Full path to the Service resource in the API.
6464    /// Example: `apps/myapp/services/default`.
6465    ///
6466    /// @OutputOnly
6467    pub name: std::string::String,
6468
6469    /// Relative name of the service within the application.
6470    /// Example: `default`.
6471    ///
6472    /// @OutputOnly
6473    pub id: std::string::String,
6474
6475    /// Mapping that defines fractional HTTP traffic diversion to
6476    /// different versions within the service.
6477    pub split: std::option::Option<crate::model::TrafficSplit>,
6478
6479    /// A set of labels to apply to this service. Labels are key/value pairs that
6480    /// describe the service and all resources that belong to it (e.g.,
6481    /// versions). The labels can be used to search and group resources, and are
6482    /// propagated to the usage and billing reports, enabling fine-grain analysis
6483    /// of costs. An example of using labels is to tag resources belonging to
6484    /// different environments (e.g., "env=prod", "env=qa").
6485    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6486
6487    /// Ingress settings for this service. Will apply to all versions.
6488    pub network_settings: std::option::Option<crate::model::NetworkSettings>,
6489
6490    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6491}
6492
6493impl Service {
6494    pub fn new() -> Self {
6495        std::default::Default::default()
6496    }
6497
6498    /// Sets the value of [name][crate::model::Service::name].
6499    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6500        self.name = v.into();
6501        self
6502    }
6503
6504    /// Sets the value of [id][crate::model::Service::id].
6505    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6506        self.id = v.into();
6507        self
6508    }
6509
6510    /// Sets the value of [split][crate::model::Service::split].
6511    pub fn set_split<T>(mut self, v: T) -> Self
6512    where
6513        T: std::convert::Into<crate::model::TrafficSplit>,
6514    {
6515        self.split = std::option::Option::Some(v.into());
6516        self
6517    }
6518
6519    /// Sets or clears the value of [split][crate::model::Service::split].
6520    pub fn set_or_clear_split<T>(mut self, v: std::option::Option<T>) -> Self
6521    where
6522        T: std::convert::Into<crate::model::TrafficSplit>,
6523    {
6524        self.split = v.map(|x| x.into());
6525        self
6526    }
6527
6528    /// Sets the value of [labels][crate::model::Service::labels].
6529    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6530    where
6531        T: std::iter::IntoIterator<Item = (K, V)>,
6532        K: std::convert::Into<std::string::String>,
6533        V: std::convert::Into<std::string::String>,
6534    {
6535        use std::iter::Iterator;
6536        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6537        self
6538    }
6539
6540    /// Sets the value of [network_settings][crate::model::Service::network_settings].
6541    pub fn set_network_settings<T>(mut self, v: T) -> Self
6542    where
6543        T: std::convert::Into<crate::model::NetworkSettings>,
6544    {
6545        self.network_settings = std::option::Option::Some(v.into());
6546        self
6547    }
6548
6549    /// Sets or clears the value of [network_settings][crate::model::Service::network_settings].
6550    pub fn set_or_clear_network_settings<T>(mut self, v: std::option::Option<T>) -> Self
6551    where
6552        T: std::convert::Into<crate::model::NetworkSettings>,
6553    {
6554        self.network_settings = v.map(|x| x.into());
6555        self
6556    }
6557}
6558
6559impl wkt::message::Message for Service {
6560    fn typename() -> &'static str {
6561        "type.googleapis.com/google.appengine.v1.Service"
6562    }
6563}
6564
6565/// Traffic routing configuration for versions within a single service. Traffic
6566/// splits define how traffic directed to the service is assigned to versions.
6567#[derive(Clone, Default, PartialEq)]
6568#[non_exhaustive]
6569pub struct TrafficSplit {
6570    /// Mechanism used to determine which version a request is sent to.
6571    /// The traffic selection algorithm will
6572    /// be stable for either type until allocations are changed.
6573    pub shard_by: crate::model::traffic_split::ShardBy,
6574
6575    /// Mapping from version IDs within the service to fractional
6576    /// (0.000, 1] allocations of traffic for that version. Each version can
6577    /// be specified only once, but some versions in the service may not
6578    /// have any traffic allocation. Services that have traffic allocated
6579    /// cannot be deleted until either the service is deleted or
6580    /// their traffic allocation is removed. Allocations must sum to 1.
6581    /// Up to two decimal place precision is supported for IP-based splits and
6582    /// up to three decimal places is supported for cookie-based splits.
6583    pub allocations: std::collections::HashMap<std::string::String, f64>,
6584
6585    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6586}
6587
6588impl TrafficSplit {
6589    pub fn new() -> Self {
6590        std::default::Default::default()
6591    }
6592
6593    /// Sets the value of [shard_by][crate::model::TrafficSplit::shard_by].
6594    pub fn set_shard_by<T: std::convert::Into<crate::model::traffic_split::ShardBy>>(
6595        mut self,
6596        v: T,
6597    ) -> Self {
6598        self.shard_by = v.into();
6599        self
6600    }
6601
6602    /// Sets the value of [allocations][crate::model::TrafficSplit::allocations].
6603    pub fn set_allocations<T, K, V>(mut self, v: T) -> Self
6604    where
6605        T: std::iter::IntoIterator<Item = (K, V)>,
6606        K: std::convert::Into<std::string::String>,
6607        V: std::convert::Into<f64>,
6608    {
6609        use std::iter::Iterator;
6610        self.allocations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6611        self
6612    }
6613}
6614
6615impl wkt::message::Message for TrafficSplit {
6616    fn typename() -> &'static str {
6617        "type.googleapis.com/google.appengine.v1.TrafficSplit"
6618    }
6619}
6620
6621/// Defines additional types related to [TrafficSplit].
6622pub mod traffic_split {
6623    #[allow(unused_imports)]
6624    use super::*;
6625
6626    /// Available sharding mechanisms.
6627    ///
6628    /// # Working with unknown values
6629    ///
6630    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6631    /// additional enum variants at any time. Adding new variants is not considered
6632    /// a breaking change. Applications should write their code in anticipation of:
6633    ///
6634    /// - New values appearing in future releases of the client library, **and**
6635    /// - New values received dynamically, without application changes.
6636    ///
6637    /// Please consult the [Working with enums] section in the user guide for some
6638    /// guidelines.
6639    ///
6640    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6641    #[derive(Clone, Debug, PartialEq)]
6642    #[non_exhaustive]
6643    pub enum ShardBy {
6644        /// Diversion method unspecified.
6645        Unspecified,
6646        /// Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
6647        /// must be set by the application itself or no diversion will occur.
6648        Cookie,
6649        /// Diversion based on applying the modulus operation to a fingerprint
6650        /// of the IP address.
6651        Ip,
6652        /// Diversion based on weighted random assignment. An incoming request is
6653        /// randomly routed to a version in the traffic split, with probability
6654        /// proportional to the version's traffic share.
6655        Random,
6656        /// If set, the enum was initialized with an unknown value.
6657        ///
6658        /// Applications can examine the value using [ShardBy::value] or
6659        /// [ShardBy::name].
6660        UnknownValue(shard_by::UnknownValue),
6661    }
6662
6663    #[doc(hidden)]
6664    pub mod shard_by {
6665        #[allow(unused_imports)]
6666        use super::*;
6667        #[derive(Clone, Debug, PartialEq)]
6668        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6669    }
6670
6671    impl ShardBy {
6672        /// Gets the enum value.
6673        ///
6674        /// Returns `None` if the enum contains an unknown value deserialized from
6675        /// the string representation of enums.
6676        pub fn value(&self) -> std::option::Option<i32> {
6677            match self {
6678                Self::Unspecified => std::option::Option::Some(0),
6679                Self::Cookie => std::option::Option::Some(1),
6680                Self::Ip => std::option::Option::Some(2),
6681                Self::Random => std::option::Option::Some(3),
6682                Self::UnknownValue(u) => u.0.value(),
6683            }
6684        }
6685
6686        /// Gets the enum value as a string.
6687        ///
6688        /// Returns `None` if the enum contains an unknown value deserialized from
6689        /// the integer representation of enums.
6690        pub fn name(&self) -> std::option::Option<&str> {
6691            match self {
6692                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
6693                Self::Cookie => std::option::Option::Some("COOKIE"),
6694                Self::Ip => std::option::Option::Some("IP"),
6695                Self::Random => std::option::Option::Some("RANDOM"),
6696                Self::UnknownValue(u) => u.0.name(),
6697            }
6698        }
6699    }
6700
6701    impl std::default::Default for ShardBy {
6702        fn default() -> Self {
6703            use std::convert::From;
6704            Self::from(0)
6705        }
6706    }
6707
6708    impl std::fmt::Display for ShardBy {
6709        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6710            wkt::internal::display_enum(f, self.name(), self.value())
6711        }
6712    }
6713
6714    impl std::convert::From<i32> for ShardBy {
6715        fn from(value: i32) -> Self {
6716            match value {
6717                0 => Self::Unspecified,
6718                1 => Self::Cookie,
6719                2 => Self::Ip,
6720                3 => Self::Random,
6721                _ => Self::UnknownValue(shard_by::UnknownValue(
6722                    wkt::internal::UnknownEnumValue::Integer(value),
6723                )),
6724            }
6725        }
6726    }
6727
6728    impl std::convert::From<&str> for ShardBy {
6729        fn from(value: &str) -> Self {
6730            use std::string::ToString;
6731            match value {
6732                "UNSPECIFIED" => Self::Unspecified,
6733                "COOKIE" => Self::Cookie,
6734                "IP" => Self::Ip,
6735                "RANDOM" => Self::Random,
6736                _ => Self::UnknownValue(shard_by::UnknownValue(
6737                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6738                )),
6739            }
6740        }
6741    }
6742
6743    impl serde::ser::Serialize for ShardBy {
6744        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6745        where
6746            S: serde::Serializer,
6747        {
6748            match self {
6749                Self::Unspecified => serializer.serialize_i32(0),
6750                Self::Cookie => serializer.serialize_i32(1),
6751                Self::Ip => serializer.serialize_i32(2),
6752                Self::Random => serializer.serialize_i32(3),
6753                Self::UnknownValue(u) => u.0.serialize(serializer),
6754            }
6755        }
6756    }
6757
6758    impl<'de> serde::de::Deserialize<'de> for ShardBy {
6759        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6760        where
6761            D: serde::Deserializer<'de>,
6762        {
6763            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ShardBy>::new(
6764                ".google.appengine.v1.TrafficSplit.ShardBy",
6765            ))
6766        }
6767    }
6768}
6769
6770/// A Version resource is a specific set of source code and configuration files
6771/// that are deployed into a service.
6772#[derive(Clone, Default, PartialEq)]
6773#[non_exhaustive]
6774pub struct Version {
6775    /// Full path to the Version resource in the API.  Example:
6776    /// `apps/myapp/services/default/versions/v1`.
6777    ///
6778    /// @OutputOnly
6779    pub name: std::string::String,
6780
6781    /// Relative name of the version within the service.  Example: `v1`.
6782    /// Version names can contain only lowercase letters, numbers, or hyphens.
6783    /// Reserved names: "default", "latest", and any name with the prefix "ah-".
6784    pub id: std::string::String,
6785
6786    /// Before an application can receive email or XMPP messages, the application
6787    /// must be configured to enable the service.
6788    pub inbound_services: std::vec::Vec<crate::model::InboundServiceType>,
6789
6790    /// Instance class that is used to run this version. Valid values are:
6791    ///
6792    /// * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
6793    /// * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
6794    ///
6795    /// Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
6796    /// BasicScaling.
6797    pub instance_class: std::string::String,
6798
6799    /// Extra network settings.
6800    /// Only applicable in the App Engine flexible environment.
6801    pub network: std::option::Option<crate::model::Network>,
6802
6803    /// The Google Compute Engine zones that are supported by this version in the
6804    /// App Engine flexible environment. Deprecated.
6805    pub zones: std::vec::Vec<std::string::String>,
6806
6807    /// Machine resources for this version.
6808    /// Only applicable in the App Engine flexible environment.
6809    pub resources: std::option::Option<crate::model::Resources>,
6810
6811    /// Desired runtime. Example: `python27`.
6812    pub runtime: std::string::String,
6813
6814    /// The channel of the runtime to use. Only available for some
6815    /// runtimes. Defaults to the `default` channel.
6816    pub runtime_channel: std::string::String,
6817
6818    /// Whether multiple requests can be dispatched to this version at once.
6819    pub threadsafe: bool,
6820
6821    /// Whether to deploy this version in a container on a virtual machine.
6822    pub vm: bool,
6823
6824    /// Allows App Engine second generation runtimes to access the legacy bundled
6825    /// services.
6826    pub app_engine_apis: bool,
6827
6828    /// Metadata settings that are supplied to this version to enable
6829    /// beta runtime features.
6830    pub beta_settings: std::collections::HashMap<std::string::String, std::string::String>,
6831
6832    /// App Engine execution environment for this version.
6833    ///
6834    /// Defaults to `standard`.
6835    pub env: std::string::String,
6836
6837    /// Current serving status of this version. Only the versions with a
6838    /// `SERVING` status create instances and can be billed.
6839    ///
6840    /// `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
6841    pub serving_status: crate::model::ServingStatus,
6842
6843    /// Email address of the user who created this version.
6844    ///
6845    /// @OutputOnly
6846    pub created_by: std::string::String,
6847
6848    /// Time that this version was created.
6849    ///
6850    /// @OutputOnly
6851    pub create_time: std::option::Option<wkt::Timestamp>,
6852
6853    /// Total size in bytes of all the files that are included in this version
6854    /// and currently hosted on the App Engine disk.
6855    ///
6856    /// @OutputOnly
6857    pub disk_usage_bytes: i64,
6858
6859    /// The version of the API in the given runtime environment. Please see the
6860    /// app.yaml reference for valid values at
6861    /// <https://cloud.google.com/appengine/docs/standard/>\<language\>/config/appref
6862    pub runtime_api_version: std::string::String,
6863
6864    /// The path or name of the app's main executable.
6865    pub runtime_main_executable_path: std::string::String,
6866
6867    /// The identity that the deployed version will run as.
6868    /// Admin API will use the App Engine Appspot service account as default if
6869    /// this field is neither provided in app.yaml file nor through CLI flag.
6870    pub service_account: std::string::String,
6871
6872    /// An ordered list of URL-matching patterns that should be applied to incoming
6873    /// requests. The first matching URL handles the request and other request
6874    /// handlers are not attempted.
6875    ///
6876    /// Only returned in `GET` requests if `view=FULL` is set.
6877    pub handlers: std::vec::Vec<crate::model::UrlMap>,
6878
6879    /// Custom static error pages. Limited to 10KB per page.
6880    ///
6881    /// Only returned in `GET` requests if `view=FULL` is set.
6882    pub error_handlers: std::vec::Vec<crate::model::ErrorHandler>,
6883
6884    /// Configuration for third-party Python runtime libraries that are required
6885    /// by the application.
6886    ///
6887    /// Only returned in `GET` requests if `view=FULL` is set.
6888    pub libraries: std::vec::Vec<crate::model::Library>,
6889
6890    /// Serving configuration for
6891    /// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
6892    ///
6893    /// Only returned in `GET` requests if `view=FULL` is set.
6894    pub api_config: std::option::Option<crate::model::ApiConfigHandler>,
6895
6896    /// Environment variables available to the application.
6897    ///
6898    /// Only returned in `GET` requests if `view=FULL` is set.
6899    pub env_variables: std::collections::HashMap<std::string::String, std::string::String>,
6900
6901    /// Environment variables available to the build environment.
6902    ///
6903    /// Only returned in `GET` requests if `view=FULL` is set.
6904    pub build_env_variables: std::collections::HashMap<std::string::String, std::string::String>,
6905
6906    /// Duration that static files should be cached by web proxies and browsers.
6907    /// Only applicable if the corresponding
6908    /// [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
6909    /// does not specify its own expiration time.
6910    ///
6911    /// Only returned in `GET` requests if `view=FULL` is set.
6912    pub default_expiration: std::option::Option<wkt::Duration>,
6913
6914    /// Configures health checking for instances. Unhealthy instances are
6915    /// stopped and replaced with new instances.
6916    /// Only applicable in the App Engine flexible environment.
6917    ///
6918    /// Only returned in `GET` requests if `view=FULL` is set.
6919    pub health_check: std::option::Option<crate::model::HealthCheck>,
6920
6921    /// Configures readiness health checking for instances.
6922    /// Unhealthy instances are not put into the backend traffic rotation.
6923    ///
6924    /// Only returned in `GET` requests if `view=FULL` is set.
6925    pub readiness_check: std::option::Option<crate::model::ReadinessCheck>,
6926
6927    /// Configures liveness health checking for instances.
6928    /// Unhealthy instances are stopped and replaced with new instances
6929    ///
6930    /// Only returned in `GET` requests if `view=FULL` is set.
6931    pub liveness_check: std::option::Option<crate::model::LivenessCheck>,
6932
6933    /// Files that match this pattern will not be built into this version.
6934    /// Only applicable for Go runtimes.
6935    ///
6936    /// Only returned in `GET` requests if `view=FULL` is set.
6937    pub nobuild_files_regex: std::string::String,
6938
6939    /// Code and application artifacts that make up this version.
6940    ///
6941    /// Only returned in `GET` requests if `view=FULL` is set.
6942    pub deployment: std::option::Option<crate::model::Deployment>,
6943
6944    /// Serving URL for this version. Example:
6945    /// `https://myversion-dot-myservice-dot-myapp.appspot.com`
6946    ///
6947    /// @OutputOnly
6948    pub version_url: std::string::String,
6949
6950    /// Cloud Endpoints configuration.
6951    ///
6952    /// If endpoints_api_service is set, the Cloud Endpoints Extensible Service
6953    /// Proxy will be provided to serve the API implemented by the app.
6954    pub endpoints_api_service: std::option::Option<crate::model::EndpointsApiService>,
6955
6956    /// The entrypoint for the application.
6957    pub entrypoint: std::option::Option<crate::model::Entrypoint>,
6958
6959    /// Enables VPC connectivity for standard apps.
6960    pub vpc_access_connector: std::option::Option<crate::model::VpcAccessConnector>,
6961
6962    /// Controls how instances are created, scaled, and reaped.
6963    ///
6964    /// Defaults to `AutomaticScaling`.
6965    pub scaling: std::option::Option<crate::model::version::Scaling>,
6966
6967    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6968}
6969
6970impl Version {
6971    pub fn new() -> Self {
6972        std::default::Default::default()
6973    }
6974
6975    /// Sets the value of [name][crate::model::Version::name].
6976    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6977        self.name = v.into();
6978        self
6979    }
6980
6981    /// Sets the value of [id][crate::model::Version::id].
6982    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6983        self.id = v.into();
6984        self
6985    }
6986
6987    /// Sets the value of [inbound_services][crate::model::Version::inbound_services].
6988    pub fn set_inbound_services<T, V>(mut self, v: T) -> Self
6989    where
6990        T: std::iter::IntoIterator<Item = V>,
6991        V: std::convert::Into<crate::model::InboundServiceType>,
6992    {
6993        use std::iter::Iterator;
6994        self.inbound_services = v.into_iter().map(|i| i.into()).collect();
6995        self
6996    }
6997
6998    /// Sets the value of [instance_class][crate::model::Version::instance_class].
6999    pub fn set_instance_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7000        self.instance_class = v.into();
7001        self
7002    }
7003
7004    /// Sets the value of [network][crate::model::Version::network].
7005    pub fn set_network<T>(mut self, v: T) -> Self
7006    where
7007        T: std::convert::Into<crate::model::Network>,
7008    {
7009        self.network = std::option::Option::Some(v.into());
7010        self
7011    }
7012
7013    /// Sets or clears the value of [network][crate::model::Version::network].
7014    pub fn set_or_clear_network<T>(mut self, v: std::option::Option<T>) -> Self
7015    where
7016        T: std::convert::Into<crate::model::Network>,
7017    {
7018        self.network = v.map(|x| x.into());
7019        self
7020    }
7021
7022    /// Sets the value of [zones][crate::model::Version::zones].
7023    pub fn set_zones<T, V>(mut self, v: T) -> Self
7024    where
7025        T: std::iter::IntoIterator<Item = V>,
7026        V: std::convert::Into<std::string::String>,
7027    {
7028        use std::iter::Iterator;
7029        self.zones = v.into_iter().map(|i| i.into()).collect();
7030        self
7031    }
7032
7033    /// Sets the value of [resources][crate::model::Version::resources].
7034    pub fn set_resources<T>(mut self, v: T) -> Self
7035    where
7036        T: std::convert::Into<crate::model::Resources>,
7037    {
7038        self.resources = std::option::Option::Some(v.into());
7039        self
7040    }
7041
7042    /// Sets or clears the value of [resources][crate::model::Version::resources].
7043    pub fn set_or_clear_resources<T>(mut self, v: std::option::Option<T>) -> Self
7044    where
7045        T: std::convert::Into<crate::model::Resources>,
7046    {
7047        self.resources = v.map(|x| x.into());
7048        self
7049    }
7050
7051    /// Sets the value of [runtime][crate::model::Version::runtime].
7052    pub fn set_runtime<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7053        self.runtime = v.into();
7054        self
7055    }
7056
7057    /// Sets the value of [runtime_channel][crate::model::Version::runtime_channel].
7058    pub fn set_runtime_channel<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7059        self.runtime_channel = v.into();
7060        self
7061    }
7062
7063    /// Sets the value of [threadsafe][crate::model::Version::threadsafe].
7064    pub fn set_threadsafe<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7065        self.threadsafe = v.into();
7066        self
7067    }
7068
7069    /// Sets the value of [vm][crate::model::Version::vm].
7070    pub fn set_vm<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7071        self.vm = v.into();
7072        self
7073    }
7074
7075    /// Sets the value of [app_engine_apis][crate::model::Version::app_engine_apis].
7076    pub fn set_app_engine_apis<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7077        self.app_engine_apis = v.into();
7078        self
7079    }
7080
7081    /// Sets the value of [beta_settings][crate::model::Version::beta_settings].
7082    pub fn set_beta_settings<T, K, V>(mut self, v: T) -> Self
7083    where
7084        T: std::iter::IntoIterator<Item = (K, V)>,
7085        K: std::convert::Into<std::string::String>,
7086        V: std::convert::Into<std::string::String>,
7087    {
7088        use std::iter::Iterator;
7089        self.beta_settings = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7090        self
7091    }
7092
7093    /// Sets the value of [env][crate::model::Version::env].
7094    pub fn set_env<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7095        self.env = v.into();
7096        self
7097    }
7098
7099    /// Sets the value of [serving_status][crate::model::Version::serving_status].
7100    pub fn set_serving_status<T: std::convert::Into<crate::model::ServingStatus>>(
7101        mut self,
7102        v: T,
7103    ) -> Self {
7104        self.serving_status = v.into();
7105        self
7106    }
7107
7108    /// Sets the value of [created_by][crate::model::Version::created_by].
7109    pub fn set_created_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7110        self.created_by = v.into();
7111        self
7112    }
7113
7114    /// Sets the value of [create_time][crate::model::Version::create_time].
7115    pub fn set_create_time<T>(mut self, v: T) -> Self
7116    where
7117        T: std::convert::Into<wkt::Timestamp>,
7118    {
7119        self.create_time = std::option::Option::Some(v.into());
7120        self
7121    }
7122
7123    /// Sets or clears the value of [create_time][crate::model::Version::create_time].
7124    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7125    where
7126        T: std::convert::Into<wkt::Timestamp>,
7127    {
7128        self.create_time = v.map(|x| x.into());
7129        self
7130    }
7131
7132    /// Sets the value of [disk_usage_bytes][crate::model::Version::disk_usage_bytes].
7133    pub fn set_disk_usage_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7134        self.disk_usage_bytes = v.into();
7135        self
7136    }
7137
7138    /// Sets the value of [runtime_api_version][crate::model::Version::runtime_api_version].
7139    pub fn set_runtime_api_version<T: std::convert::Into<std::string::String>>(
7140        mut self,
7141        v: T,
7142    ) -> Self {
7143        self.runtime_api_version = v.into();
7144        self
7145    }
7146
7147    /// Sets the value of [runtime_main_executable_path][crate::model::Version::runtime_main_executable_path].
7148    pub fn set_runtime_main_executable_path<T: std::convert::Into<std::string::String>>(
7149        mut self,
7150        v: T,
7151    ) -> Self {
7152        self.runtime_main_executable_path = v.into();
7153        self
7154    }
7155
7156    /// Sets the value of [service_account][crate::model::Version::service_account].
7157    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7158        self.service_account = v.into();
7159        self
7160    }
7161
7162    /// Sets the value of [handlers][crate::model::Version::handlers].
7163    pub fn set_handlers<T, V>(mut self, v: T) -> Self
7164    where
7165        T: std::iter::IntoIterator<Item = V>,
7166        V: std::convert::Into<crate::model::UrlMap>,
7167    {
7168        use std::iter::Iterator;
7169        self.handlers = v.into_iter().map(|i| i.into()).collect();
7170        self
7171    }
7172
7173    /// Sets the value of [error_handlers][crate::model::Version::error_handlers].
7174    pub fn set_error_handlers<T, V>(mut self, v: T) -> Self
7175    where
7176        T: std::iter::IntoIterator<Item = V>,
7177        V: std::convert::Into<crate::model::ErrorHandler>,
7178    {
7179        use std::iter::Iterator;
7180        self.error_handlers = v.into_iter().map(|i| i.into()).collect();
7181        self
7182    }
7183
7184    /// Sets the value of [libraries][crate::model::Version::libraries].
7185    pub fn set_libraries<T, V>(mut self, v: T) -> Self
7186    where
7187        T: std::iter::IntoIterator<Item = V>,
7188        V: std::convert::Into<crate::model::Library>,
7189    {
7190        use std::iter::Iterator;
7191        self.libraries = v.into_iter().map(|i| i.into()).collect();
7192        self
7193    }
7194
7195    /// Sets the value of [api_config][crate::model::Version::api_config].
7196    pub fn set_api_config<T>(mut self, v: T) -> Self
7197    where
7198        T: std::convert::Into<crate::model::ApiConfigHandler>,
7199    {
7200        self.api_config = std::option::Option::Some(v.into());
7201        self
7202    }
7203
7204    /// Sets or clears the value of [api_config][crate::model::Version::api_config].
7205    pub fn set_or_clear_api_config<T>(mut self, v: std::option::Option<T>) -> Self
7206    where
7207        T: std::convert::Into<crate::model::ApiConfigHandler>,
7208    {
7209        self.api_config = v.map(|x| x.into());
7210        self
7211    }
7212
7213    /// Sets the value of [env_variables][crate::model::Version::env_variables].
7214    pub fn set_env_variables<T, K, V>(mut self, v: T) -> Self
7215    where
7216        T: std::iter::IntoIterator<Item = (K, V)>,
7217        K: std::convert::Into<std::string::String>,
7218        V: std::convert::Into<std::string::String>,
7219    {
7220        use std::iter::Iterator;
7221        self.env_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7222        self
7223    }
7224
7225    /// Sets the value of [build_env_variables][crate::model::Version::build_env_variables].
7226    pub fn set_build_env_variables<T, K, V>(mut self, v: T) -> Self
7227    where
7228        T: std::iter::IntoIterator<Item = (K, V)>,
7229        K: std::convert::Into<std::string::String>,
7230        V: std::convert::Into<std::string::String>,
7231    {
7232        use std::iter::Iterator;
7233        self.build_env_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7234        self
7235    }
7236
7237    /// Sets the value of [default_expiration][crate::model::Version::default_expiration].
7238    pub fn set_default_expiration<T>(mut self, v: T) -> Self
7239    where
7240        T: std::convert::Into<wkt::Duration>,
7241    {
7242        self.default_expiration = std::option::Option::Some(v.into());
7243        self
7244    }
7245
7246    /// Sets or clears the value of [default_expiration][crate::model::Version::default_expiration].
7247    pub fn set_or_clear_default_expiration<T>(mut self, v: std::option::Option<T>) -> Self
7248    where
7249        T: std::convert::Into<wkt::Duration>,
7250    {
7251        self.default_expiration = v.map(|x| x.into());
7252        self
7253    }
7254
7255    /// Sets the value of [health_check][crate::model::Version::health_check].
7256    pub fn set_health_check<T>(mut self, v: T) -> Self
7257    where
7258        T: std::convert::Into<crate::model::HealthCheck>,
7259    {
7260        self.health_check = std::option::Option::Some(v.into());
7261        self
7262    }
7263
7264    /// Sets or clears the value of [health_check][crate::model::Version::health_check].
7265    pub fn set_or_clear_health_check<T>(mut self, v: std::option::Option<T>) -> Self
7266    where
7267        T: std::convert::Into<crate::model::HealthCheck>,
7268    {
7269        self.health_check = v.map(|x| x.into());
7270        self
7271    }
7272
7273    /// Sets the value of [readiness_check][crate::model::Version::readiness_check].
7274    pub fn set_readiness_check<T>(mut self, v: T) -> Self
7275    where
7276        T: std::convert::Into<crate::model::ReadinessCheck>,
7277    {
7278        self.readiness_check = std::option::Option::Some(v.into());
7279        self
7280    }
7281
7282    /// Sets or clears the value of [readiness_check][crate::model::Version::readiness_check].
7283    pub fn set_or_clear_readiness_check<T>(mut self, v: std::option::Option<T>) -> Self
7284    where
7285        T: std::convert::Into<crate::model::ReadinessCheck>,
7286    {
7287        self.readiness_check = v.map(|x| x.into());
7288        self
7289    }
7290
7291    /// Sets the value of [liveness_check][crate::model::Version::liveness_check].
7292    pub fn set_liveness_check<T>(mut self, v: T) -> Self
7293    where
7294        T: std::convert::Into<crate::model::LivenessCheck>,
7295    {
7296        self.liveness_check = std::option::Option::Some(v.into());
7297        self
7298    }
7299
7300    /// Sets or clears the value of [liveness_check][crate::model::Version::liveness_check].
7301    pub fn set_or_clear_liveness_check<T>(mut self, v: std::option::Option<T>) -> Self
7302    where
7303        T: std::convert::Into<crate::model::LivenessCheck>,
7304    {
7305        self.liveness_check = v.map(|x| x.into());
7306        self
7307    }
7308
7309    /// Sets the value of [nobuild_files_regex][crate::model::Version::nobuild_files_regex].
7310    pub fn set_nobuild_files_regex<T: std::convert::Into<std::string::String>>(
7311        mut self,
7312        v: T,
7313    ) -> Self {
7314        self.nobuild_files_regex = v.into();
7315        self
7316    }
7317
7318    /// Sets the value of [deployment][crate::model::Version::deployment].
7319    pub fn set_deployment<T>(mut self, v: T) -> Self
7320    where
7321        T: std::convert::Into<crate::model::Deployment>,
7322    {
7323        self.deployment = std::option::Option::Some(v.into());
7324        self
7325    }
7326
7327    /// Sets or clears the value of [deployment][crate::model::Version::deployment].
7328    pub fn set_or_clear_deployment<T>(mut self, v: std::option::Option<T>) -> Self
7329    where
7330        T: std::convert::Into<crate::model::Deployment>,
7331    {
7332        self.deployment = v.map(|x| x.into());
7333        self
7334    }
7335
7336    /// Sets the value of [version_url][crate::model::Version::version_url].
7337    pub fn set_version_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7338        self.version_url = v.into();
7339        self
7340    }
7341
7342    /// Sets the value of [endpoints_api_service][crate::model::Version::endpoints_api_service].
7343    pub fn set_endpoints_api_service<T>(mut self, v: T) -> Self
7344    where
7345        T: std::convert::Into<crate::model::EndpointsApiService>,
7346    {
7347        self.endpoints_api_service = std::option::Option::Some(v.into());
7348        self
7349    }
7350
7351    /// Sets or clears the value of [endpoints_api_service][crate::model::Version::endpoints_api_service].
7352    pub fn set_or_clear_endpoints_api_service<T>(mut self, v: std::option::Option<T>) -> Self
7353    where
7354        T: std::convert::Into<crate::model::EndpointsApiService>,
7355    {
7356        self.endpoints_api_service = v.map(|x| x.into());
7357        self
7358    }
7359
7360    /// Sets the value of [entrypoint][crate::model::Version::entrypoint].
7361    pub fn set_entrypoint<T>(mut self, v: T) -> Self
7362    where
7363        T: std::convert::Into<crate::model::Entrypoint>,
7364    {
7365        self.entrypoint = std::option::Option::Some(v.into());
7366        self
7367    }
7368
7369    /// Sets or clears the value of [entrypoint][crate::model::Version::entrypoint].
7370    pub fn set_or_clear_entrypoint<T>(mut self, v: std::option::Option<T>) -> Self
7371    where
7372        T: std::convert::Into<crate::model::Entrypoint>,
7373    {
7374        self.entrypoint = v.map(|x| x.into());
7375        self
7376    }
7377
7378    /// Sets the value of [vpc_access_connector][crate::model::Version::vpc_access_connector].
7379    pub fn set_vpc_access_connector<T>(mut self, v: T) -> Self
7380    where
7381        T: std::convert::Into<crate::model::VpcAccessConnector>,
7382    {
7383        self.vpc_access_connector = std::option::Option::Some(v.into());
7384        self
7385    }
7386
7387    /// Sets or clears the value of [vpc_access_connector][crate::model::Version::vpc_access_connector].
7388    pub fn set_or_clear_vpc_access_connector<T>(mut self, v: std::option::Option<T>) -> Self
7389    where
7390        T: std::convert::Into<crate::model::VpcAccessConnector>,
7391    {
7392        self.vpc_access_connector = v.map(|x| x.into());
7393        self
7394    }
7395
7396    /// Sets the value of [scaling][crate::model::Version::scaling].
7397    ///
7398    /// Note that all the setters affecting `scaling` are mutually
7399    /// exclusive.
7400    pub fn set_scaling<
7401        T: std::convert::Into<std::option::Option<crate::model::version::Scaling>>,
7402    >(
7403        mut self,
7404        v: T,
7405    ) -> Self {
7406        self.scaling = v.into();
7407        self
7408    }
7409
7410    /// The value of [scaling][crate::model::Version::scaling]
7411    /// if it holds a `AutomaticScaling`, `None` if the field is not set or
7412    /// holds a different branch.
7413    pub fn automatic_scaling(
7414        &self,
7415    ) -> std::option::Option<&std::boxed::Box<crate::model::AutomaticScaling>> {
7416        #[allow(unreachable_patterns)]
7417        self.scaling.as_ref().and_then(|v| match v {
7418            crate::model::version::Scaling::AutomaticScaling(v) => std::option::Option::Some(v),
7419            _ => std::option::Option::None,
7420        })
7421    }
7422
7423    /// Sets the value of [scaling][crate::model::Version::scaling]
7424    /// to hold a `AutomaticScaling`.
7425    ///
7426    /// Note that all the setters affecting `scaling` are
7427    /// mutually exclusive.
7428    pub fn set_automatic_scaling<
7429        T: std::convert::Into<std::boxed::Box<crate::model::AutomaticScaling>>,
7430    >(
7431        mut self,
7432        v: T,
7433    ) -> Self {
7434        self.scaling =
7435            std::option::Option::Some(crate::model::version::Scaling::AutomaticScaling(v.into()));
7436        self
7437    }
7438
7439    /// The value of [scaling][crate::model::Version::scaling]
7440    /// if it holds a `BasicScaling`, `None` if the field is not set or
7441    /// holds a different branch.
7442    pub fn basic_scaling(
7443        &self,
7444    ) -> std::option::Option<&std::boxed::Box<crate::model::BasicScaling>> {
7445        #[allow(unreachable_patterns)]
7446        self.scaling.as_ref().and_then(|v| match v {
7447            crate::model::version::Scaling::BasicScaling(v) => std::option::Option::Some(v),
7448            _ => std::option::Option::None,
7449        })
7450    }
7451
7452    /// Sets the value of [scaling][crate::model::Version::scaling]
7453    /// to hold a `BasicScaling`.
7454    ///
7455    /// Note that all the setters affecting `scaling` are
7456    /// mutually exclusive.
7457    pub fn set_basic_scaling<T: std::convert::Into<std::boxed::Box<crate::model::BasicScaling>>>(
7458        mut self,
7459        v: T,
7460    ) -> Self {
7461        self.scaling =
7462            std::option::Option::Some(crate::model::version::Scaling::BasicScaling(v.into()));
7463        self
7464    }
7465
7466    /// The value of [scaling][crate::model::Version::scaling]
7467    /// if it holds a `ManualScaling`, `None` if the field is not set or
7468    /// holds a different branch.
7469    pub fn manual_scaling(
7470        &self,
7471    ) -> std::option::Option<&std::boxed::Box<crate::model::ManualScaling>> {
7472        #[allow(unreachable_patterns)]
7473        self.scaling.as_ref().and_then(|v| match v {
7474            crate::model::version::Scaling::ManualScaling(v) => std::option::Option::Some(v),
7475            _ => std::option::Option::None,
7476        })
7477    }
7478
7479    /// Sets the value of [scaling][crate::model::Version::scaling]
7480    /// to hold a `ManualScaling`.
7481    ///
7482    /// Note that all the setters affecting `scaling` are
7483    /// mutually exclusive.
7484    pub fn set_manual_scaling<
7485        T: std::convert::Into<std::boxed::Box<crate::model::ManualScaling>>,
7486    >(
7487        mut self,
7488        v: T,
7489    ) -> Self {
7490        self.scaling =
7491            std::option::Option::Some(crate::model::version::Scaling::ManualScaling(v.into()));
7492        self
7493    }
7494}
7495
7496impl wkt::message::Message for Version {
7497    fn typename() -> &'static str {
7498        "type.googleapis.com/google.appengine.v1.Version"
7499    }
7500}
7501
7502/// Defines additional types related to [Version].
7503pub mod version {
7504    #[allow(unused_imports)]
7505    use super::*;
7506
7507    /// Controls how instances are created, scaled, and reaped.
7508    ///
7509    /// Defaults to `AutomaticScaling`.
7510    #[derive(Clone, Debug, PartialEq)]
7511    #[non_exhaustive]
7512    pub enum Scaling {
7513        /// Automatic scaling is based on request rate, response latencies, and other
7514        /// application metrics. Instances are dynamically created and destroyed as
7515        /// needed in order to handle traffic.
7516        AutomaticScaling(std::boxed::Box<crate::model::AutomaticScaling>),
7517        /// A service with basic scaling will create an instance when the application
7518        /// receives a request. The instance will be turned down when the app becomes
7519        /// idle. Basic scaling is ideal for work that is intermittent or driven by
7520        /// user activity.
7521        BasicScaling(std::boxed::Box<crate::model::BasicScaling>),
7522        /// A service with manual scaling runs continuously, allowing you to perform
7523        /// complex initialization and rely on the state of its memory over time.
7524        /// Manually scaled versions are sometimes referred to as "backends".
7525        ManualScaling(std::boxed::Box<crate::model::ManualScaling>),
7526    }
7527}
7528
7529/// [Cloud Endpoints](https://cloud.google.com/endpoints) configuration.
7530/// The Endpoints API Service provides tooling for serving Open API and gRPC
7531/// endpoints via an NGINX proxy. Only valid for App Engine Flexible environment
7532/// deployments.
7533///
7534/// The fields here refer to the name and configuration ID of a "service"
7535/// resource in the [Service Management API](https://cloud.google.com/service-management/overview).
7536#[derive(Clone, Default, PartialEq)]
7537#[non_exhaustive]
7538pub struct EndpointsApiService {
7539    /// Endpoints service name which is the name of the "service" resource in the
7540    /// Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
7541    pub name: std::string::String,
7542
7543    /// Endpoints service configuration ID as specified by the Service Management
7544    /// API. For example "2016-09-19r1".
7545    ///
7546    /// By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
7547    /// This means that Endpoints starts up with a particular configuration ID.
7548    /// When a new configuration is rolled out, Endpoints must be given the new
7549    /// configuration ID. The `config_id` field is used to give the configuration
7550    /// ID and is required in this case.
7551    ///
7552    /// Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
7553    /// When using this, Endpoints fetches the latest configuration and does not
7554    /// need the configuration ID. In this case, `config_id` must be omitted.
7555    pub config_id: std::string::String,
7556
7557    /// Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
7558    /// `MANAGED`, `config_id` must be omitted.
7559    pub rollout_strategy: crate::model::endpoints_api_service::RolloutStrategy,
7560
7561    /// Enable or disable trace sampling. By default, this is set to false for
7562    /// enabled.
7563    pub disable_trace_sampling: bool,
7564
7565    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7566}
7567
7568impl EndpointsApiService {
7569    pub fn new() -> Self {
7570        std::default::Default::default()
7571    }
7572
7573    /// Sets the value of [name][crate::model::EndpointsApiService::name].
7574    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7575        self.name = v.into();
7576        self
7577    }
7578
7579    /// Sets the value of [config_id][crate::model::EndpointsApiService::config_id].
7580    pub fn set_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7581        self.config_id = v.into();
7582        self
7583    }
7584
7585    /// Sets the value of [rollout_strategy][crate::model::EndpointsApiService::rollout_strategy].
7586    pub fn set_rollout_strategy<
7587        T: std::convert::Into<crate::model::endpoints_api_service::RolloutStrategy>,
7588    >(
7589        mut self,
7590        v: T,
7591    ) -> Self {
7592        self.rollout_strategy = v.into();
7593        self
7594    }
7595
7596    /// Sets the value of [disable_trace_sampling][crate::model::EndpointsApiService::disable_trace_sampling].
7597    pub fn set_disable_trace_sampling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7598        self.disable_trace_sampling = v.into();
7599        self
7600    }
7601}
7602
7603impl wkt::message::Message for EndpointsApiService {
7604    fn typename() -> &'static str {
7605        "type.googleapis.com/google.appengine.v1.EndpointsApiService"
7606    }
7607}
7608
7609/// Defines additional types related to [EndpointsApiService].
7610pub mod endpoints_api_service {
7611    #[allow(unused_imports)]
7612    use super::*;
7613
7614    /// Available rollout strategies.
7615    ///
7616    /// # Working with unknown values
7617    ///
7618    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7619    /// additional enum variants at any time. Adding new variants is not considered
7620    /// a breaking change. Applications should write their code in anticipation of:
7621    ///
7622    /// - New values appearing in future releases of the client library, **and**
7623    /// - New values received dynamically, without application changes.
7624    ///
7625    /// Please consult the [Working with enums] section in the user guide for some
7626    /// guidelines.
7627    ///
7628    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7629    #[derive(Clone, Debug, PartialEq)]
7630    #[non_exhaustive]
7631    pub enum RolloutStrategy {
7632        /// Not specified. Defaults to `FIXED`.
7633        UnspecifiedRolloutStrategy,
7634        /// Endpoints service configuration ID will be fixed to the configuration ID
7635        /// specified by `config_id`.
7636        Fixed,
7637        /// Endpoints service configuration ID will be updated with each rollout.
7638        Managed,
7639        /// If set, the enum was initialized with an unknown value.
7640        ///
7641        /// Applications can examine the value using [RolloutStrategy::value] or
7642        /// [RolloutStrategy::name].
7643        UnknownValue(rollout_strategy::UnknownValue),
7644    }
7645
7646    #[doc(hidden)]
7647    pub mod rollout_strategy {
7648        #[allow(unused_imports)]
7649        use super::*;
7650        #[derive(Clone, Debug, PartialEq)]
7651        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7652    }
7653
7654    impl RolloutStrategy {
7655        /// Gets the enum value.
7656        ///
7657        /// Returns `None` if the enum contains an unknown value deserialized from
7658        /// the string representation of enums.
7659        pub fn value(&self) -> std::option::Option<i32> {
7660            match self {
7661                Self::UnspecifiedRolloutStrategy => std::option::Option::Some(0),
7662                Self::Fixed => std::option::Option::Some(1),
7663                Self::Managed => std::option::Option::Some(2),
7664                Self::UnknownValue(u) => u.0.value(),
7665            }
7666        }
7667
7668        /// Gets the enum value as a string.
7669        ///
7670        /// Returns `None` if the enum contains an unknown value deserialized from
7671        /// the integer representation of enums.
7672        pub fn name(&self) -> std::option::Option<&str> {
7673            match self {
7674                Self::UnspecifiedRolloutStrategy => {
7675                    std::option::Option::Some("UNSPECIFIED_ROLLOUT_STRATEGY")
7676                }
7677                Self::Fixed => std::option::Option::Some("FIXED"),
7678                Self::Managed => std::option::Option::Some("MANAGED"),
7679                Self::UnknownValue(u) => u.0.name(),
7680            }
7681        }
7682    }
7683
7684    impl std::default::Default for RolloutStrategy {
7685        fn default() -> Self {
7686            use std::convert::From;
7687            Self::from(0)
7688        }
7689    }
7690
7691    impl std::fmt::Display for RolloutStrategy {
7692        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7693            wkt::internal::display_enum(f, self.name(), self.value())
7694        }
7695    }
7696
7697    impl std::convert::From<i32> for RolloutStrategy {
7698        fn from(value: i32) -> Self {
7699            match value {
7700                0 => Self::UnspecifiedRolloutStrategy,
7701                1 => Self::Fixed,
7702                2 => Self::Managed,
7703                _ => Self::UnknownValue(rollout_strategy::UnknownValue(
7704                    wkt::internal::UnknownEnumValue::Integer(value),
7705                )),
7706            }
7707        }
7708    }
7709
7710    impl std::convert::From<&str> for RolloutStrategy {
7711        fn from(value: &str) -> Self {
7712            use std::string::ToString;
7713            match value {
7714                "UNSPECIFIED_ROLLOUT_STRATEGY" => Self::UnspecifiedRolloutStrategy,
7715                "FIXED" => Self::Fixed,
7716                "MANAGED" => Self::Managed,
7717                _ => Self::UnknownValue(rollout_strategy::UnknownValue(
7718                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7719                )),
7720            }
7721        }
7722    }
7723
7724    impl serde::ser::Serialize for RolloutStrategy {
7725        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7726        where
7727            S: serde::Serializer,
7728        {
7729            match self {
7730                Self::UnspecifiedRolloutStrategy => serializer.serialize_i32(0),
7731                Self::Fixed => serializer.serialize_i32(1),
7732                Self::Managed => serializer.serialize_i32(2),
7733                Self::UnknownValue(u) => u.0.serialize(serializer),
7734            }
7735        }
7736    }
7737
7738    impl<'de> serde::de::Deserialize<'de> for RolloutStrategy {
7739        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7740        where
7741            D: serde::Deserializer<'de>,
7742        {
7743            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RolloutStrategy>::new(
7744                ".google.appengine.v1.EndpointsApiService.RolloutStrategy",
7745            ))
7746        }
7747    }
7748}
7749
7750/// Automatic scaling is based on request rate, response latencies, and other
7751/// application metrics.
7752#[derive(Clone, Default, PartialEq)]
7753#[non_exhaustive]
7754pub struct AutomaticScaling {
7755    /// The time period that the
7756    /// [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
7757    /// should wait before it starts collecting information from a new instance.
7758    /// This prevents the autoscaler from collecting information when the instance
7759    /// is initializing, during which the collected usage would not be reliable.
7760    /// Only applicable in the App Engine flexible environment.
7761    pub cool_down_period: std::option::Option<wkt::Duration>,
7762
7763    /// Target scaling by CPU usage.
7764    pub cpu_utilization: std::option::Option<crate::model::CpuUtilization>,
7765
7766    /// Number of concurrent requests an automatic scaling instance can accept
7767    /// before the scheduler spawns a new instance.
7768    ///
7769    /// Defaults to a runtime-specific value.
7770    pub max_concurrent_requests: i32,
7771
7772    /// Maximum number of idle instances that should be maintained for this
7773    /// version.
7774    pub max_idle_instances: i32,
7775
7776    /// Maximum number of instances that should be started to handle requests for
7777    /// this version.
7778    pub max_total_instances: i32,
7779
7780    /// Maximum amount of time that a request should wait in the pending queue
7781    /// before starting a new instance to handle it.
7782    pub max_pending_latency: std::option::Option<wkt::Duration>,
7783
7784    /// Minimum number of idle instances that should be maintained for
7785    /// this version. Only applicable for the default version of a service.
7786    pub min_idle_instances: i32,
7787
7788    /// Minimum number of running instances that should be maintained for this
7789    /// version.
7790    pub min_total_instances: i32,
7791
7792    /// Minimum amount of time a request should wait in the pending queue before
7793    /// starting a new instance to handle it.
7794    pub min_pending_latency: std::option::Option<wkt::Duration>,
7795
7796    /// Target scaling by request utilization.
7797    pub request_utilization: std::option::Option<crate::model::RequestUtilization>,
7798
7799    /// Target scaling by disk usage.
7800    pub disk_utilization: std::option::Option<crate::model::DiskUtilization>,
7801
7802    /// Target scaling by network usage.
7803    pub network_utilization: std::option::Option<crate::model::NetworkUtilization>,
7804
7805    /// Scheduler settings for standard environment.
7806    pub standard_scheduler_settings: std::option::Option<crate::model::StandardSchedulerSettings>,
7807
7808    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7809}
7810
7811impl AutomaticScaling {
7812    pub fn new() -> Self {
7813        std::default::Default::default()
7814    }
7815
7816    /// Sets the value of [cool_down_period][crate::model::AutomaticScaling::cool_down_period].
7817    pub fn set_cool_down_period<T>(mut self, v: T) -> Self
7818    where
7819        T: std::convert::Into<wkt::Duration>,
7820    {
7821        self.cool_down_period = std::option::Option::Some(v.into());
7822        self
7823    }
7824
7825    /// Sets or clears the value of [cool_down_period][crate::model::AutomaticScaling::cool_down_period].
7826    pub fn set_or_clear_cool_down_period<T>(mut self, v: std::option::Option<T>) -> Self
7827    where
7828        T: std::convert::Into<wkt::Duration>,
7829    {
7830        self.cool_down_period = v.map(|x| x.into());
7831        self
7832    }
7833
7834    /// Sets the value of [cpu_utilization][crate::model::AutomaticScaling::cpu_utilization].
7835    pub fn set_cpu_utilization<T>(mut self, v: T) -> Self
7836    where
7837        T: std::convert::Into<crate::model::CpuUtilization>,
7838    {
7839        self.cpu_utilization = std::option::Option::Some(v.into());
7840        self
7841    }
7842
7843    /// Sets or clears the value of [cpu_utilization][crate::model::AutomaticScaling::cpu_utilization].
7844    pub fn set_or_clear_cpu_utilization<T>(mut self, v: std::option::Option<T>) -> Self
7845    where
7846        T: std::convert::Into<crate::model::CpuUtilization>,
7847    {
7848        self.cpu_utilization = v.map(|x| x.into());
7849        self
7850    }
7851
7852    /// Sets the value of [max_concurrent_requests][crate::model::AutomaticScaling::max_concurrent_requests].
7853    pub fn set_max_concurrent_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7854        self.max_concurrent_requests = v.into();
7855        self
7856    }
7857
7858    /// Sets the value of [max_idle_instances][crate::model::AutomaticScaling::max_idle_instances].
7859    pub fn set_max_idle_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7860        self.max_idle_instances = v.into();
7861        self
7862    }
7863
7864    /// Sets the value of [max_total_instances][crate::model::AutomaticScaling::max_total_instances].
7865    pub fn set_max_total_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7866        self.max_total_instances = v.into();
7867        self
7868    }
7869
7870    /// Sets the value of [max_pending_latency][crate::model::AutomaticScaling::max_pending_latency].
7871    pub fn set_max_pending_latency<T>(mut self, v: T) -> Self
7872    where
7873        T: std::convert::Into<wkt::Duration>,
7874    {
7875        self.max_pending_latency = std::option::Option::Some(v.into());
7876        self
7877    }
7878
7879    /// Sets or clears the value of [max_pending_latency][crate::model::AutomaticScaling::max_pending_latency].
7880    pub fn set_or_clear_max_pending_latency<T>(mut self, v: std::option::Option<T>) -> Self
7881    where
7882        T: std::convert::Into<wkt::Duration>,
7883    {
7884        self.max_pending_latency = v.map(|x| x.into());
7885        self
7886    }
7887
7888    /// Sets the value of [min_idle_instances][crate::model::AutomaticScaling::min_idle_instances].
7889    pub fn set_min_idle_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7890        self.min_idle_instances = v.into();
7891        self
7892    }
7893
7894    /// Sets the value of [min_total_instances][crate::model::AutomaticScaling::min_total_instances].
7895    pub fn set_min_total_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7896        self.min_total_instances = v.into();
7897        self
7898    }
7899
7900    /// Sets the value of [min_pending_latency][crate::model::AutomaticScaling::min_pending_latency].
7901    pub fn set_min_pending_latency<T>(mut self, v: T) -> Self
7902    where
7903        T: std::convert::Into<wkt::Duration>,
7904    {
7905        self.min_pending_latency = std::option::Option::Some(v.into());
7906        self
7907    }
7908
7909    /// Sets or clears the value of [min_pending_latency][crate::model::AutomaticScaling::min_pending_latency].
7910    pub fn set_or_clear_min_pending_latency<T>(mut self, v: std::option::Option<T>) -> Self
7911    where
7912        T: std::convert::Into<wkt::Duration>,
7913    {
7914        self.min_pending_latency = v.map(|x| x.into());
7915        self
7916    }
7917
7918    /// Sets the value of [request_utilization][crate::model::AutomaticScaling::request_utilization].
7919    pub fn set_request_utilization<T>(mut self, v: T) -> Self
7920    where
7921        T: std::convert::Into<crate::model::RequestUtilization>,
7922    {
7923        self.request_utilization = std::option::Option::Some(v.into());
7924        self
7925    }
7926
7927    /// Sets or clears the value of [request_utilization][crate::model::AutomaticScaling::request_utilization].
7928    pub fn set_or_clear_request_utilization<T>(mut self, v: std::option::Option<T>) -> Self
7929    where
7930        T: std::convert::Into<crate::model::RequestUtilization>,
7931    {
7932        self.request_utilization = v.map(|x| x.into());
7933        self
7934    }
7935
7936    /// Sets the value of [disk_utilization][crate::model::AutomaticScaling::disk_utilization].
7937    pub fn set_disk_utilization<T>(mut self, v: T) -> Self
7938    where
7939        T: std::convert::Into<crate::model::DiskUtilization>,
7940    {
7941        self.disk_utilization = std::option::Option::Some(v.into());
7942        self
7943    }
7944
7945    /// Sets or clears the value of [disk_utilization][crate::model::AutomaticScaling::disk_utilization].
7946    pub fn set_or_clear_disk_utilization<T>(mut self, v: std::option::Option<T>) -> Self
7947    where
7948        T: std::convert::Into<crate::model::DiskUtilization>,
7949    {
7950        self.disk_utilization = v.map(|x| x.into());
7951        self
7952    }
7953
7954    /// Sets the value of [network_utilization][crate::model::AutomaticScaling::network_utilization].
7955    pub fn set_network_utilization<T>(mut self, v: T) -> Self
7956    where
7957        T: std::convert::Into<crate::model::NetworkUtilization>,
7958    {
7959        self.network_utilization = std::option::Option::Some(v.into());
7960        self
7961    }
7962
7963    /// Sets or clears the value of [network_utilization][crate::model::AutomaticScaling::network_utilization].
7964    pub fn set_or_clear_network_utilization<T>(mut self, v: std::option::Option<T>) -> Self
7965    where
7966        T: std::convert::Into<crate::model::NetworkUtilization>,
7967    {
7968        self.network_utilization = v.map(|x| x.into());
7969        self
7970    }
7971
7972    /// Sets the value of [standard_scheduler_settings][crate::model::AutomaticScaling::standard_scheduler_settings].
7973    pub fn set_standard_scheduler_settings<T>(mut self, v: T) -> Self
7974    where
7975        T: std::convert::Into<crate::model::StandardSchedulerSettings>,
7976    {
7977        self.standard_scheduler_settings = std::option::Option::Some(v.into());
7978        self
7979    }
7980
7981    /// Sets or clears the value of [standard_scheduler_settings][crate::model::AutomaticScaling::standard_scheduler_settings].
7982    pub fn set_or_clear_standard_scheduler_settings<T>(mut self, v: std::option::Option<T>) -> Self
7983    where
7984        T: std::convert::Into<crate::model::StandardSchedulerSettings>,
7985    {
7986        self.standard_scheduler_settings = v.map(|x| x.into());
7987        self
7988    }
7989}
7990
7991impl wkt::message::Message for AutomaticScaling {
7992    fn typename() -> &'static str {
7993        "type.googleapis.com/google.appengine.v1.AutomaticScaling"
7994    }
7995}
7996
7997/// A service with basic scaling will create an instance when the application
7998/// receives a request. The instance will be turned down when the app becomes
7999/// idle. Basic scaling is ideal for work that is intermittent or driven by
8000/// user activity.
8001#[derive(Clone, Default, PartialEq)]
8002#[non_exhaustive]
8003pub struct BasicScaling {
8004    /// Duration of time after the last request that an instance must wait before
8005    /// the instance is shut down.
8006    pub idle_timeout: std::option::Option<wkt::Duration>,
8007
8008    /// Maximum number of instances to create for this version.
8009    pub max_instances: i32,
8010
8011    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8012}
8013
8014impl BasicScaling {
8015    pub fn new() -> Self {
8016        std::default::Default::default()
8017    }
8018
8019    /// Sets the value of [idle_timeout][crate::model::BasicScaling::idle_timeout].
8020    pub fn set_idle_timeout<T>(mut self, v: T) -> Self
8021    where
8022        T: std::convert::Into<wkt::Duration>,
8023    {
8024        self.idle_timeout = std::option::Option::Some(v.into());
8025        self
8026    }
8027
8028    /// Sets or clears the value of [idle_timeout][crate::model::BasicScaling::idle_timeout].
8029    pub fn set_or_clear_idle_timeout<T>(mut self, v: std::option::Option<T>) -> Self
8030    where
8031        T: std::convert::Into<wkt::Duration>,
8032    {
8033        self.idle_timeout = v.map(|x| x.into());
8034        self
8035    }
8036
8037    /// Sets the value of [max_instances][crate::model::BasicScaling::max_instances].
8038    pub fn set_max_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8039        self.max_instances = v.into();
8040        self
8041    }
8042}
8043
8044impl wkt::message::Message for BasicScaling {
8045    fn typename() -> &'static str {
8046        "type.googleapis.com/google.appengine.v1.BasicScaling"
8047    }
8048}
8049
8050/// A service with manual scaling runs continuously, allowing you to perform
8051/// complex initialization and rely on the state of its memory over time.
8052#[derive(Clone, Default, PartialEq)]
8053#[non_exhaustive]
8054pub struct ManualScaling {
8055    /// Number of instances to assign to the service at the start. This number
8056    /// can later be altered by using the
8057    /// [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
8058    /// `set_num_instances()` function.
8059    pub instances: i32,
8060
8061    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8062}
8063
8064impl ManualScaling {
8065    pub fn new() -> Self {
8066        std::default::Default::default()
8067    }
8068
8069    /// Sets the value of [instances][crate::model::ManualScaling::instances].
8070    pub fn set_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8071        self.instances = v.into();
8072        self
8073    }
8074}
8075
8076impl wkt::message::Message for ManualScaling {
8077    fn typename() -> &'static str {
8078        "type.googleapis.com/google.appengine.v1.ManualScaling"
8079    }
8080}
8081
8082/// Target scaling by CPU usage.
8083#[derive(Clone, Default, PartialEq)]
8084#[non_exhaustive]
8085pub struct CpuUtilization {
8086    /// Period of time over which CPU utilization is calculated.
8087    pub aggregation_window_length: std::option::Option<wkt::Duration>,
8088
8089    /// Target CPU utilization ratio to maintain when scaling. Must be between 0
8090    /// and 1.
8091    pub target_utilization: f64,
8092
8093    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8094}
8095
8096impl CpuUtilization {
8097    pub fn new() -> Self {
8098        std::default::Default::default()
8099    }
8100
8101    /// Sets the value of [aggregation_window_length][crate::model::CpuUtilization::aggregation_window_length].
8102    pub fn set_aggregation_window_length<T>(mut self, v: T) -> Self
8103    where
8104        T: std::convert::Into<wkt::Duration>,
8105    {
8106        self.aggregation_window_length = std::option::Option::Some(v.into());
8107        self
8108    }
8109
8110    /// Sets or clears the value of [aggregation_window_length][crate::model::CpuUtilization::aggregation_window_length].
8111    pub fn set_or_clear_aggregation_window_length<T>(mut self, v: std::option::Option<T>) -> Self
8112    where
8113        T: std::convert::Into<wkt::Duration>,
8114    {
8115        self.aggregation_window_length = v.map(|x| x.into());
8116        self
8117    }
8118
8119    /// Sets the value of [target_utilization][crate::model::CpuUtilization::target_utilization].
8120    pub fn set_target_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
8121        self.target_utilization = v.into();
8122        self
8123    }
8124}
8125
8126impl wkt::message::Message for CpuUtilization {
8127    fn typename() -> &'static str {
8128        "type.googleapis.com/google.appengine.v1.CpuUtilization"
8129    }
8130}
8131
8132/// Target scaling by request utilization.
8133/// Only applicable in the App Engine flexible environment.
8134#[derive(Clone, Default, PartialEq)]
8135#[non_exhaustive]
8136pub struct RequestUtilization {
8137    /// Target requests per second.
8138    pub target_request_count_per_second: i32,
8139
8140    /// Target number of concurrent requests.
8141    pub target_concurrent_requests: i32,
8142
8143    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8144}
8145
8146impl RequestUtilization {
8147    pub fn new() -> Self {
8148        std::default::Default::default()
8149    }
8150
8151    /// Sets the value of [target_request_count_per_second][crate::model::RequestUtilization::target_request_count_per_second].
8152    pub fn set_target_request_count_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8153        self.target_request_count_per_second = v.into();
8154        self
8155    }
8156
8157    /// Sets the value of [target_concurrent_requests][crate::model::RequestUtilization::target_concurrent_requests].
8158    pub fn set_target_concurrent_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8159        self.target_concurrent_requests = v.into();
8160        self
8161    }
8162}
8163
8164impl wkt::message::Message for RequestUtilization {
8165    fn typename() -> &'static str {
8166        "type.googleapis.com/google.appengine.v1.RequestUtilization"
8167    }
8168}
8169
8170/// Target scaling by disk usage.
8171/// Only applicable in the App Engine flexible environment.
8172#[derive(Clone, Default, PartialEq)]
8173#[non_exhaustive]
8174pub struct DiskUtilization {
8175    /// Target bytes written per second.
8176    pub target_write_bytes_per_second: i32,
8177
8178    /// Target ops written per second.
8179    pub target_write_ops_per_second: i32,
8180
8181    /// Target bytes read per second.
8182    pub target_read_bytes_per_second: i32,
8183
8184    /// Target ops read per seconds.
8185    pub target_read_ops_per_second: i32,
8186
8187    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8188}
8189
8190impl DiskUtilization {
8191    pub fn new() -> Self {
8192        std::default::Default::default()
8193    }
8194
8195    /// Sets the value of [target_write_bytes_per_second][crate::model::DiskUtilization::target_write_bytes_per_second].
8196    pub fn set_target_write_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8197        self.target_write_bytes_per_second = v.into();
8198        self
8199    }
8200
8201    /// Sets the value of [target_write_ops_per_second][crate::model::DiskUtilization::target_write_ops_per_second].
8202    pub fn set_target_write_ops_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8203        self.target_write_ops_per_second = v.into();
8204        self
8205    }
8206
8207    /// Sets the value of [target_read_bytes_per_second][crate::model::DiskUtilization::target_read_bytes_per_second].
8208    pub fn set_target_read_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8209        self.target_read_bytes_per_second = v.into();
8210        self
8211    }
8212
8213    /// Sets the value of [target_read_ops_per_second][crate::model::DiskUtilization::target_read_ops_per_second].
8214    pub fn set_target_read_ops_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8215        self.target_read_ops_per_second = v.into();
8216        self
8217    }
8218}
8219
8220impl wkt::message::Message for DiskUtilization {
8221    fn typename() -> &'static str {
8222        "type.googleapis.com/google.appengine.v1.DiskUtilization"
8223    }
8224}
8225
8226/// Target scaling by network usage.
8227/// Only applicable in the App Engine flexible environment.
8228#[derive(Clone, Default, PartialEq)]
8229#[non_exhaustive]
8230pub struct NetworkUtilization {
8231    /// Target bytes sent per second.
8232    pub target_sent_bytes_per_second: i32,
8233
8234    /// Target packets sent per second.
8235    pub target_sent_packets_per_second: i32,
8236
8237    /// Target bytes received per second.
8238    pub target_received_bytes_per_second: i32,
8239
8240    /// Target packets received per second.
8241    pub target_received_packets_per_second: i32,
8242
8243    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8244}
8245
8246impl NetworkUtilization {
8247    pub fn new() -> Self {
8248        std::default::Default::default()
8249    }
8250
8251    /// Sets the value of [target_sent_bytes_per_second][crate::model::NetworkUtilization::target_sent_bytes_per_second].
8252    pub fn set_target_sent_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8253        self.target_sent_bytes_per_second = v.into();
8254        self
8255    }
8256
8257    /// Sets the value of [target_sent_packets_per_second][crate::model::NetworkUtilization::target_sent_packets_per_second].
8258    pub fn set_target_sent_packets_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8259        self.target_sent_packets_per_second = v.into();
8260        self
8261    }
8262
8263    /// Sets the value of [target_received_bytes_per_second][crate::model::NetworkUtilization::target_received_bytes_per_second].
8264    pub fn set_target_received_bytes_per_second<T: std::convert::Into<i32>>(
8265        mut self,
8266        v: T,
8267    ) -> Self {
8268        self.target_received_bytes_per_second = v.into();
8269        self
8270    }
8271
8272    /// Sets the value of [target_received_packets_per_second][crate::model::NetworkUtilization::target_received_packets_per_second].
8273    pub fn set_target_received_packets_per_second<T: std::convert::Into<i32>>(
8274        mut self,
8275        v: T,
8276    ) -> Self {
8277        self.target_received_packets_per_second = v.into();
8278        self
8279    }
8280}
8281
8282impl wkt::message::Message for NetworkUtilization {
8283    fn typename() -> &'static str {
8284        "type.googleapis.com/google.appengine.v1.NetworkUtilization"
8285    }
8286}
8287
8288/// Scheduler settings for standard environment.
8289#[derive(Clone, Default, PartialEq)]
8290#[non_exhaustive]
8291pub struct StandardSchedulerSettings {
8292    /// Target CPU utilization ratio to maintain when scaling.
8293    pub target_cpu_utilization: f64,
8294
8295    /// Target throughput utilization ratio to maintain when scaling
8296    pub target_throughput_utilization: f64,
8297
8298    /// Minimum number of instances to run for this version. Set to zero to disable
8299    /// `min_instances` configuration.
8300    pub min_instances: i32,
8301
8302    /// Maximum number of instances to run for this version. Set to zero to disable
8303    /// `max_instances` configuration.
8304    pub max_instances: i32,
8305
8306    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8307}
8308
8309impl StandardSchedulerSettings {
8310    pub fn new() -> Self {
8311        std::default::Default::default()
8312    }
8313
8314    /// Sets the value of [target_cpu_utilization][crate::model::StandardSchedulerSettings::target_cpu_utilization].
8315    pub fn set_target_cpu_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
8316        self.target_cpu_utilization = v.into();
8317        self
8318    }
8319
8320    /// Sets the value of [target_throughput_utilization][crate::model::StandardSchedulerSettings::target_throughput_utilization].
8321    pub fn set_target_throughput_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
8322        self.target_throughput_utilization = v.into();
8323        self
8324    }
8325
8326    /// Sets the value of [min_instances][crate::model::StandardSchedulerSettings::min_instances].
8327    pub fn set_min_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8328        self.min_instances = v.into();
8329        self
8330    }
8331
8332    /// Sets the value of [max_instances][crate::model::StandardSchedulerSettings::max_instances].
8333    pub fn set_max_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8334        self.max_instances = v.into();
8335        self
8336    }
8337}
8338
8339impl wkt::message::Message for StandardSchedulerSettings {
8340    fn typename() -> &'static str {
8341        "type.googleapis.com/google.appengine.v1.StandardSchedulerSettings"
8342    }
8343}
8344
8345/// Extra network settings.
8346/// Only applicable in the App Engine flexible environment.
8347#[derive(Clone, Default, PartialEq)]
8348#[non_exhaustive]
8349pub struct Network {
8350    /// List of ports, or port pairs, to forward from the virtual machine to the
8351    /// application container.
8352    /// Only applicable in the App Engine flexible environment.
8353    pub forwarded_ports: std::vec::Vec<std::string::String>,
8354
8355    /// Tag to apply to the instance during creation.
8356    /// Only applicable in the App Engine flexible environment.
8357    pub instance_tag: std::string::String,
8358
8359    /// Google Compute Engine network where the virtual machines are created.
8360    /// Specify the short name, not the resource path.
8361    ///
8362    /// Defaults to `default`.
8363    pub name: std::string::String,
8364
8365    /// Google Cloud Platform sub-network where the virtual machines are created.
8366    /// Specify the short name, not the resource path.
8367    ///
8368    /// If a subnetwork name is specified, a network name will also be required
8369    /// unless it is for the default network.
8370    ///
8371    /// * If the network that the instance is being created in is a Legacy network,
8372    ///   then the IP address is allocated from the IPv4Range.
8373    /// * If the network that the instance is being created in is an auto Subnet
8374    ///   Mode Network, then only network name should be specified (not the
8375    ///   subnetwork_name) and the IP address is created from the IPCidrRange of the
8376    ///   subnetwork that exists in that zone for that network.
8377    /// * If the network that the instance is being created in is a custom Subnet
8378    ///   Mode Network, then the subnetwork_name must be specified and the
8379    ///   IP address is created from the IPCidrRange of the subnetwork.
8380    ///
8381    /// If specified, the subnetwork must exist in the same region as the
8382    /// App Engine flexible environment application.
8383    pub subnetwork_name: std::string::String,
8384
8385    /// Enable session affinity.
8386    /// Only applicable in the App Engine flexible environment.
8387    pub session_affinity: bool,
8388
8389    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8390}
8391
8392impl Network {
8393    pub fn new() -> Self {
8394        std::default::Default::default()
8395    }
8396
8397    /// Sets the value of [forwarded_ports][crate::model::Network::forwarded_ports].
8398    pub fn set_forwarded_ports<T, V>(mut self, v: T) -> Self
8399    where
8400        T: std::iter::IntoIterator<Item = V>,
8401        V: std::convert::Into<std::string::String>,
8402    {
8403        use std::iter::Iterator;
8404        self.forwarded_ports = v.into_iter().map(|i| i.into()).collect();
8405        self
8406    }
8407
8408    /// Sets the value of [instance_tag][crate::model::Network::instance_tag].
8409    pub fn set_instance_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8410        self.instance_tag = v.into();
8411        self
8412    }
8413
8414    /// Sets the value of [name][crate::model::Network::name].
8415    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8416        self.name = v.into();
8417        self
8418    }
8419
8420    /// Sets the value of [subnetwork_name][crate::model::Network::subnetwork_name].
8421    pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8422        self.subnetwork_name = v.into();
8423        self
8424    }
8425
8426    /// Sets the value of [session_affinity][crate::model::Network::session_affinity].
8427    pub fn set_session_affinity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8428        self.session_affinity = v.into();
8429        self
8430    }
8431}
8432
8433impl wkt::message::Message for Network {
8434    fn typename() -> &'static str {
8435        "type.googleapis.com/google.appengine.v1.Network"
8436    }
8437}
8438
8439/// Volumes mounted within the app container.
8440/// Only applicable in the App Engine flexible environment.
8441#[derive(Clone, Default, PartialEq)]
8442#[non_exhaustive]
8443pub struct Volume {
8444    /// Unique name for the volume.
8445    pub name: std::string::String,
8446
8447    /// Underlying volume type, e.g. 'tmpfs'.
8448    pub volume_type: std::string::String,
8449
8450    /// Volume size in gigabytes.
8451    pub size_gb: f64,
8452
8453    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8454}
8455
8456impl Volume {
8457    pub fn new() -> Self {
8458        std::default::Default::default()
8459    }
8460
8461    /// Sets the value of [name][crate::model::Volume::name].
8462    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8463        self.name = v.into();
8464        self
8465    }
8466
8467    /// Sets the value of [volume_type][crate::model::Volume::volume_type].
8468    pub fn set_volume_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8469        self.volume_type = v.into();
8470        self
8471    }
8472
8473    /// Sets the value of [size_gb][crate::model::Volume::size_gb].
8474    pub fn set_size_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
8475        self.size_gb = v.into();
8476        self
8477    }
8478}
8479
8480impl wkt::message::Message for Volume {
8481    fn typename() -> &'static str {
8482        "type.googleapis.com/google.appengine.v1.Volume"
8483    }
8484}
8485
8486/// Machine resources for a version.
8487#[derive(Clone, Default, PartialEq)]
8488#[non_exhaustive]
8489pub struct Resources {
8490    /// Number of CPU cores needed.
8491    pub cpu: f64,
8492
8493    /// Disk size (GB) needed.
8494    pub disk_gb: f64,
8495
8496    /// Memory (GB) needed.
8497    pub memory_gb: f64,
8498
8499    /// User specified volumes.
8500    pub volumes: std::vec::Vec<crate::model::Volume>,
8501
8502    /// The name of the encryption key that is stored in Google Cloud KMS.
8503    /// Only should be used by Cloud Composer to encrypt the vm disk
8504    pub kms_key_reference: std::string::String,
8505
8506    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8507}
8508
8509impl Resources {
8510    pub fn new() -> Self {
8511        std::default::Default::default()
8512    }
8513
8514    /// Sets the value of [cpu][crate::model::Resources::cpu].
8515    pub fn set_cpu<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
8516        self.cpu = v.into();
8517        self
8518    }
8519
8520    /// Sets the value of [disk_gb][crate::model::Resources::disk_gb].
8521    pub fn set_disk_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
8522        self.disk_gb = v.into();
8523        self
8524    }
8525
8526    /// Sets the value of [memory_gb][crate::model::Resources::memory_gb].
8527    pub fn set_memory_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
8528        self.memory_gb = v.into();
8529        self
8530    }
8531
8532    /// Sets the value of [volumes][crate::model::Resources::volumes].
8533    pub fn set_volumes<T, V>(mut self, v: T) -> Self
8534    where
8535        T: std::iter::IntoIterator<Item = V>,
8536        V: std::convert::Into<crate::model::Volume>,
8537    {
8538        use std::iter::Iterator;
8539        self.volumes = v.into_iter().map(|i| i.into()).collect();
8540        self
8541    }
8542
8543    /// Sets the value of [kms_key_reference][crate::model::Resources::kms_key_reference].
8544    pub fn set_kms_key_reference<T: std::convert::Into<std::string::String>>(
8545        mut self,
8546        v: T,
8547    ) -> Self {
8548        self.kms_key_reference = v.into();
8549        self
8550    }
8551}
8552
8553impl wkt::message::Message for Resources {
8554    fn typename() -> &'static str {
8555        "type.googleapis.com/google.appengine.v1.Resources"
8556    }
8557}
8558
8559/// VPC access connector specification.
8560#[derive(Clone, Default, PartialEq)]
8561#[non_exhaustive]
8562pub struct VpcAccessConnector {
8563    /// Full Serverless VPC Access Connector name e.g.
8564    /// /projects/my-project/locations/us-central1/connectors/c1.
8565    pub name: std::string::String,
8566
8567    /// The egress setting for the connector, controlling what traffic is diverted
8568    /// through it.
8569    pub egress_setting: crate::model::vpc_access_connector::EgressSetting,
8570
8571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8572}
8573
8574impl VpcAccessConnector {
8575    pub fn new() -> Self {
8576        std::default::Default::default()
8577    }
8578
8579    /// Sets the value of [name][crate::model::VpcAccessConnector::name].
8580    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8581        self.name = v.into();
8582        self
8583    }
8584
8585    /// Sets the value of [egress_setting][crate::model::VpcAccessConnector::egress_setting].
8586    pub fn set_egress_setting<
8587        T: std::convert::Into<crate::model::vpc_access_connector::EgressSetting>,
8588    >(
8589        mut self,
8590        v: T,
8591    ) -> Self {
8592        self.egress_setting = v.into();
8593        self
8594    }
8595}
8596
8597impl wkt::message::Message for VpcAccessConnector {
8598    fn typename() -> &'static str {
8599        "type.googleapis.com/google.appengine.v1.VpcAccessConnector"
8600    }
8601}
8602
8603/// Defines additional types related to [VpcAccessConnector].
8604pub mod vpc_access_connector {
8605    #[allow(unused_imports)]
8606    use super::*;
8607
8608    /// Available egress settings.
8609    ///
8610    /// This controls what traffic is diverted through the VPC Access Connector
8611    /// resource. By default PRIVATE_IP_RANGES will be used.
8612    ///
8613    /// # Working with unknown values
8614    ///
8615    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8616    /// additional enum variants at any time. Adding new variants is not considered
8617    /// a breaking change. Applications should write their code in anticipation of:
8618    ///
8619    /// - New values appearing in future releases of the client library, **and**
8620    /// - New values received dynamically, without application changes.
8621    ///
8622    /// Please consult the [Working with enums] section in the user guide for some
8623    /// guidelines.
8624    ///
8625    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8626    #[derive(Clone, Debug, PartialEq)]
8627    #[non_exhaustive]
8628    pub enum EgressSetting {
8629        Unspecified,
8630        /// Force the use of VPC Access for all egress traffic from the function.
8631        AllTraffic,
8632        /// Use the VPC Access Connector for private IP space from RFC1918.
8633        PrivateIpRanges,
8634        /// If set, the enum was initialized with an unknown value.
8635        ///
8636        /// Applications can examine the value using [EgressSetting::value] or
8637        /// [EgressSetting::name].
8638        UnknownValue(egress_setting::UnknownValue),
8639    }
8640
8641    #[doc(hidden)]
8642    pub mod egress_setting {
8643        #[allow(unused_imports)]
8644        use super::*;
8645        #[derive(Clone, Debug, PartialEq)]
8646        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8647    }
8648
8649    impl EgressSetting {
8650        /// Gets the enum value.
8651        ///
8652        /// Returns `None` if the enum contains an unknown value deserialized from
8653        /// the string representation of enums.
8654        pub fn value(&self) -> std::option::Option<i32> {
8655            match self {
8656                Self::Unspecified => std::option::Option::Some(0),
8657                Self::AllTraffic => std::option::Option::Some(1),
8658                Self::PrivateIpRanges => std::option::Option::Some(2),
8659                Self::UnknownValue(u) => u.0.value(),
8660            }
8661        }
8662
8663        /// Gets the enum value as a string.
8664        ///
8665        /// Returns `None` if the enum contains an unknown value deserialized from
8666        /// the integer representation of enums.
8667        pub fn name(&self) -> std::option::Option<&str> {
8668            match self {
8669                Self::Unspecified => std::option::Option::Some("EGRESS_SETTING_UNSPECIFIED"),
8670                Self::AllTraffic => std::option::Option::Some("ALL_TRAFFIC"),
8671                Self::PrivateIpRanges => std::option::Option::Some("PRIVATE_IP_RANGES"),
8672                Self::UnknownValue(u) => u.0.name(),
8673            }
8674        }
8675    }
8676
8677    impl std::default::Default for EgressSetting {
8678        fn default() -> Self {
8679            use std::convert::From;
8680            Self::from(0)
8681        }
8682    }
8683
8684    impl std::fmt::Display for EgressSetting {
8685        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8686            wkt::internal::display_enum(f, self.name(), self.value())
8687        }
8688    }
8689
8690    impl std::convert::From<i32> for EgressSetting {
8691        fn from(value: i32) -> Self {
8692            match value {
8693                0 => Self::Unspecified,
8694                1 => Self::AllTraffic,
8695                2 => Self::PrivateIpRanges,
8696                _ => Self::UnknownValue(egress_setting::UnknownValue(
8697                    wkt::internal::UnknownEnumValue::Integer(value),
8698                )),
8699            }
8700        }
8701    }
8702
8703    impl std::convert::From<&str> for EgressSetting {
8704        fn from(value: &str) -> Self {
8705            use std::string::ToString;
8706            match value {
8707                "EGRESS_SETTING_UNSPECIFIED" => Self::Unspecified,
8708                "ALL_TRAFFIC" => Self::AllTraffic,
8709                "PRIVATE_IP_RANGES" => Self::PrivateIpRanges,
8710                _ => Self::UnknownValue(egress_setting::UnknownValue(
8711                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8712                )),
8713            }
8714        }
8715    }
8716
8717    impl serde::ser::Serialize for EgressSetting {
8718        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8719        where
8720            S: serde::Serializer,
8721        {
8722            match self {
8723                Self::Unspecified => serializer.serialize_i32(0),
8724                Self::AllTraffic => serializer.serialize_i32(1),
8725                Self::PrivateIpRanges => serializer.serialize_i32(2),
8726                Self::UnknownValue(u) => u.0.serialize(serializer),
8727            }
8728        }
8729    }
8730
8731    impl<'de> serde::de::Deserialize<'de> for EgressSetting {
8732        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8733        where
8734            D: serde::Deserializer<'de>,
8735        {
8736            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EgressSetting>::new(
8737                ".google.appengine.v1.VpcAccessConnector.EgressSetting",
8738            ))
8739        }
8740    }
8741}
8742
8743/// The entrypoint for the application.
8744#[derive(Clone, Default, PartialEq)]
8745#[non_exhaustive]
8746pub struct Entrypoint {
8747    /// The command to run.
8748    pub command: std::option::Option<crate::model::entrypoint::Command>,
8749
8750    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8751}
8752
8753impl Entrypoint {
8754    pub fn new() -> Self {
8755        std::default::Default::default()
8756    }
8757
8758    /// Sets the value of [command][crate::model::Entrypoint::command].
8759    ///
8760    /// Note that all the setters affecting `command` are mutually
8761    /// exclusive.
8762    pub fn set_command<
8763        T: std::convert::Into<std::option::Option<crate::model::entrypoint::Command>>,
8764    >(
8765        mut self,
8766        v: T,
8767    ) -> Self {
8768        self.command = v.into();
8769        self
8770    }
8771
8772    /// The value of [command][crate::model::Entrypoint::command]
8773    /// if it holds a `Shell`, `None` if the field is not set or
8774    /// holds a different branch.
8775    pub fn shell(&self) -> std::option::Option<&std::string::String> {
8776        #[allow(unreachable_patterns)]
8777        self.command.as_ref().and_then(|v| match v {
8778            crate::model::entrypoint::Command::Shell(v) => std::option::Option::Some(v),
8779            _ => std::option::Option::None,
8780        })
8781    }
8782
8783    /// Sets the value of [command][crate::model::Entrypoint::command]
8784    /// to hold a `Shell`.
8785    ///
8786    /// Note that all the setters affecting `command` are
8787    /// mutually exclusive.
8788    pub fn set_shell<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8789        self.command =
8790            std::option::Option::Some(crate::model::entrypoint::Command::Shell(v.into()));
8791        self
8792    }
8793}
8794
8795impl wkt::message::Message for Entrypoint {
8796    fn typename() -> &'static str {
8797        "type.googleapis.com/google.appengine.v1.Entrypoint"
8798    }
8799}
8800
8801/// Defines additional types related to [Entrypoint].
8802pub mod entrypoint {
8803    #[allow(unused_imports)]
8804    use super::*;
8805
8806    /// The command to run.
8807    #[derive(Clone, Debug, PartialEq)]
8808    #[non_exhaustive]
8809    pub enum Command {
8810        /// The format should be a shell command that can be fed to `bash -c`.
8811        Shell(std::string::String),
8812    }
8813}
8814
8815/// Actions to take when the user is not logged in.
8816///
8817/// # Working with unknown values
8818///
8819/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8820/// additional enum variants at any time. Adding new variants is not considered
8821/// a breaking change. Applications should write their code in anticipation of:
8822///
8823/// - New values appearing in future releases of the client library, **and**
8824/// - New values received dynamically, without application changes.
8825///
8826/// Please consult the [Working with enums] section in the user guide for some
8827/// guidelines.
8828///
8829/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8830#[derive(Clone, Debug, PartialEq)]
8831#[non_exhaustive]
8832pub enum AuthFailAction {
8833    /// Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed.
8834    Unspecified,
8835    /// Redirects user to "accounts.google.com". The user is redirected back to the
8836    /// application URL after signing in or creating an account.
8837    Redirect,
8838    /// Rejects request with a `401` HTTP status code and an error
8839    /// message.
8840    Unauthorized,
8841    /// If set, the enum was initialized with an unknown value.
8842    ///
8843    /// Applications can examine the value using [AuthFailAction::value] or
8844    /// [AuthFailAction::name].
8845    UnknownValue(auth_fail_action::UnknownValue),
8846}
8847
8848#[doc(hidden)]
8849pub mod auth_fail_action {
8850    #[allow(unused_imports)]
8851    use super::*;
8852    #[derive(Clone, Debug, PartialEq)]
8853    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8854}
8855
8856impl AuthFailAction {
8857    /// Gets the enum value.
8858    ///
8859    /// Returns `None` if the enum contains an unknown value deserialized from
8860    /// the string representation of enums.
8861    pub fn value(&self) -> std::option::Option<i32> {
8862        match self {
8863            Self::Unspecified => std::option::Option::Some(0),
8864            Self::Redirect => std::option::Option::Some(1),
8865            Self::Unauthorized => std::option::Option::Some(2),
8866            Self::UnknownValue(u) => u.0.value(),
8867        }
8868    }
8869
8870    /// Gets the enum value as a string.
8871    ///
8872    /// Returns `None` if the enum contains an unknown value deserialized from
8873    /// the integer representation of enums.
8874    pub fn name(&self) -> std::option::Option<&str> {
8875        match self {
8876            Self::Unspecified => std::option::Option::Some("AUTH_FAIL_ACTION_UNSPECIFIED"),
8877            Self::Redirect => std::option::Option::Some("AUTH_FAIL_ACTION_REDIRECT"),
8878            Self::Unauthorized => std::option::Option::Some("AUTH_FAIL_ACTION_UNAUTHORIZED"),
8879            Self::UnknownValue(u) => u.0.name(),
8880        }
8881    }
8882}
8883
8884impl std::default::Default for AuthFailAction {
8885    fn default() -> Self {
8886        use std::convert::From;
8887        Self::from(0)
8888    }
8889}
8890
8891impl std::fmt::Display for AuthFailAction {
8892    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8893        wkt::internal::display_enum(f, self.name(), self.value())
8894    }
8895}
8896
8897impl std::convert::From<i32> for AuthFailAction {
8898    fn from(value: i32) -> Self {
8899        match value {
8900            0 => Self::Unspecified,
8901            1 => Self::Redirect,
8902            2 => Self::Unauthorized,
8903            _ => Self::UnknownValue(auth_fail_action::UnknownValue(
8904                wkt::internal::UnknownEnumValue::Integer(value),
8905            )),
8906        }
8907    }
8908}
8909
8910impl std::convert::From<&str> for AuthFailAction {
8911    fn from(value: &str) -> Self {
8912        use std::string::ToString;
8913        match value {
8914            "AUTH_FAIL_ACTION_UNSPECIFIED" => Self::Unspecified,
8915            "AUTH_FAIL_ACTION_REDIRECT" => Self::Redirect,
8916            "AUTH_FAIL_ACTION_UNAUTHORIZED" => Self::Unauthorized,
8917            _ => Self::UnknownValue(auth_fail_action::UnknownValue(
8918                wkt::internal::UnknownEnumValue::String(value.to_string()),
8919            )),
8920        }
8921    }
8922}
8923
8924impl serde::ser::Serialize for AuthFailAction {
8925    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8926    where
8927        S: serde::Serializer,
8928    {
8929        match self {
8930            Self::Unspecified => serializer.serialize_i32(0),
8931            Self::Redirect => serializer.serialize_i32(1),
8932            Self::Unauthorized => serializer.serialize_i32(2),
8933            Self::UnknownValue(u) => u.0.serialize(serializer),
8934        }
8935    }
8936}
8937
8938impl<'de> serde::de::Deserialize<'de> for AuthFailAction {
8939    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8940    where
8941        D: serde::Deserializer<'de>,
8942    {
8943        deserializer.deserialize_any(wkt::internal::EnumVisitor::<AuthFailAction>::new(
8944            ".google.appengine.v1.AuthFailAction",
8945        ))
8946    }
8947}
8948
8949/// Methods to restrict access to a URL based on login status.
8950///
8951/// # Working with unknown values
8952///
8953/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8954/// additional enum variants at any time. Adding new variants is not considered
8955/// a breaking change. Applications should write their code in anticipation of:
8956///
8957/// - New values appearing in future releases of the client library, **and**
8958/// - New values received dynamically, without application changes.
8959///
8960/// Please consult the [Working with enums] section in the user guide for some
8961/// guidelines.
8962///
8963/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8964#[derive(Clone, Debug, PartialEq)]
8965#[non_exhaustive]
8966pub enum LoginRequirement {
8967    /// Not specified. `LOGIN_OPTIONAL` is assumed.
8968    LoginUnspecified,
8969    /// Does not require that the user is signed in.
8970    LoginOptional,
8971    /// If the user is not signed in, the `auth_fail_action` is taken.
8972    /// In addition, if the user is not an administrator for the
8973    /// application, they are given an error message regardless of
8974    /// `auth_fail_action`. If the user is an administrator, the handler
8975    /// proceeds.
8976    LoginAdmin,
8977    /// If the user has signed in, the handler proceeds normally. Otherwise, the
8978    /// auth_fail_action is taken.
8979    LoginRequired,
8980    /// If set, the enum was initialized with an unknown value.
8981    ///
8982    /// Applications can examine the value using [LoginRequirement::value] or
8983    /// [LoginRequirement::name].
8984    UnknownValue(login_requirement::UnknownValue),
8985}
8986
8987#[doc(hidden)]
8988pub mod login_requirement {
8989    #[allow(unused_imports)]
8990    use super::*;
8991    #[derive(Clone, Debug, PartialEq)]
8992    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8993}
8994
8995impl LoginRequirement {
8996    /// Gets the enum value.
8997    ///
8998    /// Returns `None` if the enum contains an unknown value deserialized from
8999    /// the string representation of enums.
9000    pub fn value(&self) -> std::option::Option<i32> {
9001        match self {
9002            Self::LoginUnspecified => std::option::Option::Some(0),
9003            Self::LoginOptional => std::option::Option::Some(1),
9004            Self::LoginAdmin => std::option::Option::Some(2),
9005            Self::LoginRequired => std::option::Option::Some(3),
9006            Self::UnknownValue(u) => u.0.value(),
9007        }
9008    }
9009
9010    /// Gets the enum value as a string.
9011    ///
9012    /// Returns `None` if the enum contains an unknown value deserialized from
9013    /// the integer representation of enums.
9014    pub fn name(&self) -> std::option::Option<&str> {
9015        match self {
9016            Self::LoginUnspecified => std::option::Option::Some("LOGIN_UNSPECIFIED"),
9017            Self::LoginOptional => std::option::Option::Some("LOGIN_OPTIONAL"),
9018            Self::LoginAdmin => std::option::Option::Some("LOGIN_ADMIN"),
9019            Self::LoginRequired => std::option::Option::Some("LOGIN_REQUIRED"),
9020            Self::UnknownValue(u) => u.0.name(),
9021        }
9022    }
9023}
9024
9025impl std::default::Default for LoginRequirement {
9026    fn default() -> Self {
9027        use std::convert::From;
9028        Self::from(0)
9029    }
9030}
9031
9032impl std::fmt::Display for LoginRequirement {
9033    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9034        wkt::internal::display_enum(f, self.name(), self.value())
9035    }
9036}
9037
9038impl std::convert::From<i32> for LoginRequirement {
9039    fn from(value: i32) -> Self {
9040        match value {
9041            0 => Self::LoginUnspecified,
9042            1 => Self::LoginOptional,
9043            2 => Self::LoginAdmin,
9044            3 => Self::LoginRequired,
9045            _ => Self::UnknownValue(login_requirement::UnknownValue(
9046                wkt::internal::UnknownEnumValue::Integer(value),
9047            )),
9048        }
9049    }
9050}
9051
9052impl std::convert::From<&str> for LoginRequirement {
9053    fn from(value: &str) -> Self {
9054        use std::string::ToString;
9055        match value {
9056            "LOGIN_UNSPECIFIED" => Self::LoginUnspecified,
9057            "LOGIN_OPTIONAL" => Self::LoginOptional,
9058            "LOGIN_ADMIN" => Self::LoginAdmin,
9059            "LOGIN_REQUIRED" => Self::LoginRequired,
9060            _ => Self::UnknownValue(login_requirement::UnknownValue(
9061                wkt::internal::UnknownEnumValue::String(value.to_string()),
9062            )),
9063        }
9064    }
9065}
9066
9067impl serde::ser::Serialize for LoginRequirement {
9068    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9069    where
9070        S: serde::Serializer,
9071    {
9072        match self {
9073            Self::LoginUnspecified => serializer.serialize_i32(0),
9074            Self::LoginOptional => serializer.serialize_i32(1),
9075            Self::LoginAdmin => serializer.serialize_i32(2),
9076            Self::LoginRequired => serializer.serialize_i32(3),
9077            Self::UnknownValue(u) => u.0.serialize(serializer),
9078        }
9079    }
9080}
9081
9082impl<'de> serde::de::Deserialize<'de> for LoginRequirement {
9083    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9084    where
9085        D: serde::Deserializer<'de>,
9086    {
9087        deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoginRequirement>::new(
9088            ".google.appengine.v1.LoginRequirement",
9089        ))
9090    }
9091}
9092
9093/// Methods to enforce security (HTTPS) on a URL.
9094///
9095/// # Working with unknown values
9096///
9097/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9098/// additional enum variants at any time. Adding new variants is not considered
9099/// a breaking change. Applications should write their code in anticipation of:
9100///
9101/// - New values appearing in future releases of the client library, **and**
9102/// - New values received dynamically, without application changes.
9103///
9104/// Please consult the [Working with enums] section in the user guide for some
9105/// guidelines.
9106///
9107/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9108#[derive(Clone, Debug, PartialEq)]
9109#[non_exhaustive]
9110pub enum SecurityLevel {
9111    /// Not specified.
9112    SecureUnspecified,
9113    /// Both HTTP and HTTPS requests with URLs that match the handler succeed
9114    /// without redirects. The application can examine the request to determine
9115    /// which protocol was used, and respond accordingly.
9116    SecureDefault,
9117    /// Requests for a URL that match this handler that use HTTPS are automatically
9118    /// redirected to the HTTP equivalent URL.
9119    SecureNever,
9120    /// Both HTTP and HTTPS requests with URLs that match the handler succeed
9121    /// without redirects. The application can examine the request to determine
9122    /// which protocol was used and respond accordingly.
9123    SecureOptional,
9124    /// Requests for a URL that match this handler that do not use HTTPS are
9125    /// automatically redirected to the HTTPS URL with the same path. Query
9126    /// parameters are reserved for the redirect.
9127    SecureAlways,
9128    /// If set, the enum was initialized with an unknown value.
9129    ///
9130    /// Applications can examine the value using [SecurityLevel::value] or
9131    /// [SecurityLevel::name].
9132    UnknownValue(security_level::UnknownValue),
9133}
9134
9135#[doc(hidden)]
9136pub mod security_level {
9137    #[allow(unused_imports)]
9138    use super::*;
9139    #[derive(Clone, Debug, PartialEq)]
9140    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9141}
9142
9143impl SecurityLevel {
9144    /// Gets the enum value.
9145    ///
9146    /// Returns `None` if the enum contains an unknown value deserialized from
9147    /// the string representation of enums.
9148    pub fn value(&self) -> std::option::Option<i32> {
9149        match self {
9150            Self::SecureUnspecified => std::option::Option::Some(0),
9151            Self::SecureDefault => std::option::Option::Some(0),
9152            Self::SecureNever => std::option::Option::Some(1),
9153            Self::SecureOptional => std::option::Option::Some(2),
9154            Self::SecureAlways => std::option::Option::Some(3),
9155            Self::UnknownValue(u) => u.0.value(),
9156        }
9157    }
9158
9159    /// Gets the enum value as a string.
9160    ///
9161    /// Returns `None` if the enum contains an unknown value deserialized from
9162    /// the integer representation of enums.
9163    pub fn name(&self) -> std::option::Option<&str> {
9164        match self {
9165            Self::SecureUnspecified => std::option::Option::Some("SECURE_UNSPECIFIED"),
9166            Self::SecureDefault => std::option::Option::Some("SECURE_DEFAULT"),
9167            Self::SecureNever => std::option::Option::Some("SECURE_NEVER"),
9168            Self::SecureOptional => std::option::Option::Some("SECURE_OPTIONAL"),
9169            Self::SecureAlways => std::option::Option::Some("SECURE_ALWAYS"),
9170            Self::UnknownValue(u) => u.0.name(),
9171        }
9172    }
9173}
9174
9175impl std::default::Default for SecurityLevel {
9176    fn default() -> Self {
9177        use std::convert::From;
9178        Self::from(0)
9179    }
9180}
9181
9182impl std::fmt::Display for SecurityLevel {
9183    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9184        wkt::internal::display_enum(f, self.name(), self.value())
9185    }
9186}
9187
9188impl std::convert::From<i32> for SecurityLevel {
9189    fn from(value: i32) -> Self {
9190        match value {
9191            0 => Self::SecureDefault,
9192            1 => Self::SecureNever,
9193            2 => Self::SecureOptional,
9194            3 => Self::SecureAlways,
9195            _ => Self::UnknownValue(security_level::UnknownValue(
9196                wkt::internal::UnknownEnumValue::Integer(value),
9197            )),
9198        }
9199    }
9200}
9201
9202impl std::convert::From<&str> for SecurityLevel {
9203    fn from(value: &str) -> Self {
9204        use std::string::ToString;
9205        match value {
9206            "SECURE_UNSPECIFIED" => Self::SecureUnspecified,
9207            "SECURE_DEFAULT" => Self::SecureDefault,
9208            "SECURE_NEVER" => Self::SecureNever,
9209            "SECURE_OPTIONAL" => Self::SecureOptional,
9210            "SECURE_ALWAYS" => Self::SecureAlways,
9211            _ => Self::UnknownValue(security_level::UnknownValue(
9212                wkt::internal::UnknownEnumValue::String(value.to_string()),
9213            )),
9214        }
9215    }
9216}
9217
9218impl serde::ser::Serialize for SecurityLevel {
9219    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9220    where
9221        S: serde::Serializer,
9222    {
9223        match self {
9224            Self::SecureUnspecified => serializer.serialize_i32(0),
9225            Self::SecureDefault => serializer.serialize_i32(0),
9226            Self::SecureNever => serializer.serialize_i32(1),
9227            Self::SecureOptional => serializer.serialize_i32(2),
9228            Self::SecureAlways => serializer.serialize_i32(3),
9229            Self::UnknownValue(u) => u.0.serialize(serializer),
9230        }
9231    }
9232}
9233
9234impl<'de> serde::de::Deserialize<'de> for SecurityLevel {
9235    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9236    where
9237        D: serde::Deserializer<'de>,
9238    {
9239        deserializer.deserialize_any(wkt::internal::EnumVisitor::<SecurityLevel>::new(
9240            ".google.appengine.v1.SecurityLevel",
9241        ))
9242    }
9243}
9244
9245/// Fields that should be returned when [Version][google.appengine.v1.Version] resources
9246/// are retrieved.
9247///
9248/// [google.appengine.v1.Version]: crate::model::Version
9249///
9250/// # Working with unknown values
9251///
9252/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9253/// additional enum variants at any time. Adding new variants is not considered
9254/// a breaking change. Applications should write their code in anticipation of:
9255///
9256/// - New values appearing in future releases of the client library, **and**
9257/// - New values received dynamically, without application changes.
9258///
9259/// Please consult the [Working with enums] section in the user guide for some
9260/// guidelines.
9261///
9262/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9263#[derive(Clone, Debug, PartialEq)]
9264#[non_exhaustive]
9265pub enum VersionView {
9266    /// Basic version information including scaling and inbound services,
9267    /// but not detailed deployment information.
9268    Basic,
9269    /// The information from `BASIC`, plus detailed information about the
9270    /// deployment. This format is required when creating resources, but
9271    /// is not returned in `Get` or `List` by default.
9272    Full,
9273    /// If set, the enum was initialized with an unknown value.
9274    ///
9275    /// Applications can examine the value using [VersionView::value] or
9276    /// [VersionView::name].
9277    UnknownValue(version_view::UnknownValue),
9278}
9279
9280#[doc(hidden)]
9281pub mod version_view {
9282    #[allow(unused_imports)]
9283    use super::*;
9284    #[derive(Clone, Debug, PartialEq)]
9285    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9286}
9287
9288impl VersionView {
9289    /// Gets the enum value.
9290    ///
9291    /// Returns `None` if the enum contains an unknown value deserialized from
9292    /// the string representation of enums.
9293    pub fn value(&self) -> std::option::Option<i32> {
9294        match self {
9295            Self::Basic => std::option::Option::Some(0),
9296            Self::Full => std::option::Option::Some(1),
9297            Self::UnknownValue(u) => u.0.value(),
9298        }
9299    }
9300
9301    /// Gets the enum value as a string.
9302    ///
9303    /// Returns `None` if the enum contains an unknown value deserialized from
9304    /// the integer representation of enums.
9305    pub fn name(&self) -> std::option::Option<&str> {
9306        match self {
9307            Self::Basic => std::option::Option::Some("BASIC"),
9308            Self::Full => std::option::Option::Some("FULL"),
9309            Self::UnknownValue(u) => u.0.name(),
9310        }
9311    }
9312}
9313
9314impl std::default::Default for VersionView {
9315    fn default() -> Self {
9316        use std::convert::From;
9317        Self::from(0)
9318    }
9319}
9320
9321impl std::fmt::Display for VersionView {
9322    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9323        wkt::internal::display_enum(f, self.name(), self.value())
9324    }
9325}
9326
9327impl std::convert::From<i32> for VersionView {
9328    fn from(value: i32) -> Self {
9329        match value {
9330            0 => Self::Basic,
9331            1 => Self::Full,
9332            _ => Self::UnknownValue(version_view::UnknownValue(
9333                wkt::internal::UnknownEnumValue::Integer(value),
9334            )),
9335        }
9336    }
9337}
9338
9339impl std::convert::From<&str> for VersionView {
9340    fn from(value: &str) -> Self {
9341        use std::string::ToString;
9342        match value {
9343            "BASIC" => Self::Basic,
9344            "FULL" => Self::Full,
9345            _ => Self::UnknownValue(version_view::UnknownValue(
9346                wkt::internal::UnknownEnumValue::String(value.to_string()),
9347            )),
9348        }
9349    }
9350}
9351
9352impl serde::ser::Serialize for VersionView {
9353    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9354    where
9355        S: serde::Serializer,
9356    {
9357        match self {
9358            Self::Basic => serializer.serialize_i32(0),
9359            Self::Full => serializer.serialize_i32(1),
9360            Self::UnknownValue(u) => u.0.serialize(serializer),
9361        }
9362    }
9363}
9364
9365impl<'de> serde::de::Deserialize<'de> for VersionView {
9366    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9367    where
9368        D: serde::Deserializer<'de>,
9369    {
9370        deserializer.deserialize_any(wkt::internal::EnumVisitor::<VersionView>::new(
9371            ".google.appengine.v1.VersionView",
9372        ))
9373    }
9374}
9375
9376/// Fields that should be returned when an AuthorizedCertificate resource is
9377/// retrieved.
9378///
9379/// # Working with unknown values
9380///
9381/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9382/// additional enum variants at any time. Adding new variants is not considered
9383/// a breaking change. Applications should write their code in anticipation of:
9384///
9385/// - New values appearing in future releases of the client library, **and**
9386/// - New values received dynamically, without application changes.
9387///
9388/// Please consult the [Working with enums] section in the user guide for some
9389/// guidelines.
9390///
9391/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9392#[derive(Clone, Debug, PartialEq)]
9393#[non_exhaustive]
9394pub enum AuthorizedCertificateView {
9395    /// Basic certificate information, including applicable domains and expiration
9396    /// date.
9397    BasicCertificate,
9398    /// The information from `BASIC_CERTIFICATE`, plus detailed information on the
9399    /// domain mappings that have this certificate mapped.
9400    FullCertificate,
9401    /// If set, the enum was initialized with an unknown value.
9402    ///
9403    /// Applications can examine the value using [AuthorizedCertificateView::value] or
9404    /// [AuthorizedCertificateView::name].
9405    UnknownValue(authorized_certificate_view::UnknownValue),
9406}
9407
9408#[doc(hidden)]
9409pub mod authorized_certificate_view {
9410    #[allow(unused_imports)]
9411    use super::*;
9412    #[derive(Clone, Debug, PartialEq)]
9413    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9414}
9415
9416impl AuthorizedCertificateView {
9417    /// Gets the enum value.
9418    ///
9419    /// Returns `None` if the enum contains an unknown value deserialized from
9420    /// the string representation of enums.
9421    pub fn value(&self) -> std::option::Option<i32> {
9422        match self {
9423            Self::BasicCertificate => std::option::Option::Some(0),
9424            Self::FullCertificate => std::option::Option::Some(1),
9425            Self::UnknownValue(u) => u.0.value(),
9426        }
9427    }
9428
9429    /// Gets the enum value as a string.
9430    ///
9431    /// Returns `None` if the enum contains an unknown value deserialized from
9432    /// the integer representation of enums.
9433    pub fn name(&self) -> std::option::Option<&str> {
9434        match self {
9435            Self::BasicCertificate => std::option::Option::Some("BASIC_CERTIFICATE"),
9436            Self::FullCertificate => std::option::Option::Some("FULL_CERTIFICATE"),
9437            Self::UnknownValue(u) => u.0.name(),
9438        }
9439    }
9440}
9441
9442impl std::default::Default for AuthorizedCertificateView {
9443    fn default() -> Self {
9444        use std::convert::From;
9445        Self::from(0)
9446    }
9447}
9448
9449impl std::fmt::Display for AuthorizedCertificateView {
9450    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9451        wkt::internal::display_enum(f, self.name(), self.value())
9452    }
9453}
9454
9455impl std::convert::From<i32> for AuthorizedCertificateView {
9456    fn from(value: i32) -> Self {
9457        match value {
9458            0 => Self::BasicCertificate,
9459            1 => Self::FullCertificate,
9460            _ => Self::UnknownValue(authorized_certificate_view::UnknownValue(
9461                wkt::internal::UnknownEnumValue::Integer(value),
9462            )),
9463        }
9464    }
9465}
9466
9467impl std::convert::From<&str> for AuthorizedCertificateView {
9468    fn from(value: &str) -> Self {
9469        use std::string::ToString;
9470        match value {
9471            "BASIC_CERTIFICATE" => Self::BasicCertificate,
9472            "FULL_CERTIFICATE" => Self::FullCertificate,
9473            _ => Self::UnknownValue(authorized_certificate_view::UnknownValue(
9474                wkt::internal::UnknownEnumValue::String(value.to_string()),
9475            )),
9476        }
9477    }
9478}
9479
9480impl serde::ser::Serialize for AuthorizedCertificateView {
9481    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9482    where
9483        S: serde::Serializer,
9484    {
9485        match self {
9486            Self::BasicCertificate => serializer.serialize_i32(0),
9487            Self::FullCertificate => serializer.serialize_i32(1),
9488            Self::UnknownValue(u) => u.0.serialize(serializer),
9489        }
9490    }
9491}
9492
9493impl<'de> serde::de::Deserialize<'de> for AuthorizedCertificateView {
9494    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9495    where
9496        D: serde::Deserializer<'de>,
9497    {
9498        deserializer.deserialize_any(
9499            wkt::internal::EnumVisitor::<AuthorizedCertificateView>::new(
9500                ".google.appengine.v1.AuthorizedCertificateView",
9501            ),
9502        )
9503    }
9504}
9505
9506/// Override strategy for mutating an existing mapping.
9507///
9508/// # Working with unknown values
9509///
9510/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9511/// additional enum variants at any time. Adding new variants is not considered
9512/// a breaking change. Applications should write their code in anticipation of:
9513///
9514/// - New values appearing in future releases of the client library, **and**
9515/// - New values received dynamically, without application changes.
9516///
9517/// Please consult the [Working with enums] section in the user guide for some
9518/// guidelines.
9519///
9520/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9521#[derive(Clone, Debug, PartialEq)]
9522#[non_exhaustive]
9523pub enum DomainOverrideStrategy {
9524    /// Strategy unspecified. Defaults to `STRICT`.
9525    UnspecifiedDomainOverrideStrategy,
9526    /// Overrides not allowed. If a mapping already exists for the
9527    /// specified domain, the request will return an ALREADY_EXISTS (409).
9528    Strict,
9529    /// Overrides allowed. If a mapping already exists for the specified domain,
9530    /// the request will overwrite it. Note that this might stop another
9531    /// Google product from serving. For example, if the domain is
9532    /// mapped to another App Engine application, that app will no
9533    /// longer serve from that domain.
9534    Override,
9535    /// If set, the enum was initialized with an unknown value.
9536    ///
9537    /// Applications can examine the value using [DomainOverrideStrategy::value] or
9538    /// [DomainOverrideStrategy::name].
9539    UnknownValue(domain_override_strategy::UnknownValue),
9540}
9541
9542#[doc(hidden)]
9543pub mod domain_override_strategy {
9544    #[allow(unused_imports)]
9545    use super::*;
9546    #[derive(Clone, Debug, PartialEq)]
9547    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9548}
9549
9550impl DomainOverrideStrategy {
9551    /// Gets the enum value.
9552    ///
9553    /// Returns `None` if the enum contains an unknown value deserialized from
9554    /// the string representation of enums.
9555    pub fn value(&self) -> std::option::Option<i32> {
9556        match self {
9557            Self::UnspecifiedDomainOverrideStrategy => std::option::Option::Some(0),
9558            Self::Strict => std::option::Option::Some(1),
9559            Self::Override => std::option::Option::Some(2),
9560            Self::UnknownValue(u) => u.0.value(),
9561        }
9562    }
9563
9564    /// Gets the enum value as a string.
9565    ///
9566    /// Returns `None` if the enum contains an unknown value deserialized from
9567    /// the integer representation of enums.
9568    pub fn name(&self) -> std::option::Option<&str> {
9569        match self {
9570            Self::UnspecifiedDomainOverrideStrategy => {
9571                std::option::Option::Some("UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY")
9572            }
9573            Self::Strict => std::option::Option::Some("STRICT"),
9574            Self::Override => std::option::Option::Some("OVERRIDE"),
9575            Self::UnknownValue(u) => u.0.name(),
9576        }
9577    }
9578}
9579
9580impl std::default::Default for DomainOverrideStrategy {
9581    fn default() -> Self {
9582        use std::convert::From;
9583        Self::from(0)
9584    }
9585}
9586
9587impl std::fmt::Display for DomainOverrideStrategy {
9588    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9589        wkt::internal::display_enum(f, self.name(), self.value())
9590    }
9591}
9592
9593impl std::convert::From<i32> for DomainOverrideStrategy {
9594    fn from(value: i32) -> Self {
9595        match value {
9596            0 => Self::UnspecifiedDomainOverrideStrategy,
9597            1 => Self::Strict,
9598            2 => Self::Override,
9599            _ => Self::UnknownValue(domain_override_strategy::UnknownValue(
9600                wkt::internal::UnknownEnumValue::Integer(value),
9601            )),
9602        }
9603    }
9604}
9605
9606impl std::convert::From<&str> for DomainOverrideStrategy {
9607    fn from(value: &str) -> Self {
9608        use std::string::ToString;
9609        match value {
9610            "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY" => Self::UnspecifiedDomainOverrideStrategy,
9611            "STRICT" => Self::Strict,
9612            "OVERRIDE" => Self::Override,
9613            _ => Self::UnknownValue(domain_override_strategy::UnknownValue(
9614                wkt::internal::UnknownEnumValue::String(value.to_string()),
9615            )),
9616        }
9617    }
9618}
9619
9620impl serde::ser::Serialize for DomainOverrideStrategy {
9621    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9622    where
9623        S: serde::Serializer,
9624    {
9625        match self {
9626            Self::UnspecifiedDomainOverrideStrategy => serializer.serialize_i32(0),
9627            Self::Strict => serializer.serialize_i32(1),
9628            Self::Override => serializer.serialize_i32(2),
9629            Self::UnknownValue(u) => u.0.serialize(serializer),
9630        }
9631    }
9632}
9633
9634impl<'de> serde::de::Deserialize<'de> for DomainOverrideStrategy {
9635    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9636    where
9637        D: serde::Deserializer<'de>,
9638    {
9639        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DomainOverrideStrategy>::new(
9640            ".google.appengine.v1.DomainOverrideStrategy",
9641        ))
9642    }
9643}
9644
9645/// State of certificate management. Refers to the most recent certificate
9646/// acquisition or renewal attempt.
9647///
9648/// # Working with unknown values
9649///
9650/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9651/// additional enum variants at any time. Adding new variants is not considered
9652/// a breaking change. Applications should write their code in anticipation of:
9653///
9654/// - New values appearing in future releases of the client library, **and**
9655/// - New values received dynamically, without application changes.
9656///
9657/// Please consult the [Working with enums] section in the user guide for some
9658/// guidelines.
9659///
9660/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9661#[derive(Clone, Debug, PartialEq)]
9662#[non_exhaustive]
9663pub enum ManagementStatus {
9664    Unspecified,
9665    /// Certificate was successfully obtained and inserted into the serving
9666    /// system.
9667    Ok,
9668    /// Certificate is under active attempts to acquire or renew.
9669    Pending,
9670    /// Most recent renewal failed due to an invalid DNS setup and will be
9671    /// retried. Renewal attempts will continue to fail until the certificate
9672    /// domain's DNS configuration is fixed. The last successfully provisioned
9673    /// certificate may still be serving.
9674    FailedRetryingNotVisible,
9675    /// All renewal attempts have been exhausted, likely due to an invalid DNS
9676    /// setup.
9677    FailedPermanent,
9678    /// Most recent renewal failed due to an explicit CAA record that does not
9679    /// include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will
9680    /// continue to fail until the CAA is reconfigured. The last successfully
9681    /// provisioned certificate may still be serving.
9682    FailedRetryingCaaForbidden,
9683    /// Most recent renewal failed due to a CAA retrieval failure. This means that
9684    /// the domain's DNS provider does not properly handle CAA records, failing
9685    /// requests for CAA records when no CAA records are defined. Renewals will
9686    /// continue to fail until the DNS provider is changed or a CAA record is
9687    /// added for the given domain. The last successfully provisioned certificate
9688    /// may still be serving.
9689    FailedRetryingCaaChecking,
9690    /// If set, the enum was initialized with an unknown value.
9691    ///
9692    /// Applications can examine the value using [ManagementStatus::value] or
9693    /// [ManagementStatus::name].
9694    UnknownValue(management_status::UnknownValue),
9695}
9696
9697#[doc(hidden)]
9698pub mod management_status {
9699    #[allow(unused_imports)]
9700    use super::*;
9701    #[derive(Clone, Debug, PartialEq)]
9702    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9703}
9704
9705impl ManagementStatus {
9706    /// Gets the enum value.
9707    ///
9708    /// Returns `None` if the enum contains an unknown value deserialized from
9709    /// the string representation of enums.
9710    pub fn value(&self) -> std::option::Option<i32> {
9711        match self {
9712            Self::Unspecified => std::option::Option::Some(0),
9713            Self::Ok => std::option::Option::Some(1),
9714            Self::Pending => std::option::Option::Some(2),
9715            Self::FailedRetryingNotVisible => std::option::Option::Some(4),
9716            Self::FailedPermanent => std::option::Option::Some(6),
9717            Self::FailedRetryingCaaForbidden => std::option::Option::Some(7),
9718            Self::FailedRetryingCaaChecking => std::option::Option::Some(8),
9719            Self::UnknownValue(u) => u.0.value(),
9720        }
9721    }
9722
9723    /// Gets the enum value as a string.
9724    ///
9725    /// Returns `None` if the enum contains an unknown value deserialized from
9726    /// the integer representation of enums.
9727    pub fn name(&self) -> std::option::Option<&str> {
9728        match self {
9729            Self::Unspecified => std::option::Option::Some("MANAGEMENT_STATUS_UNSPECIFIED"),
9730            Self::Ok => std::option::Option::Some("OK"),
9731            Self::Pending => std::option::Option::Some("PENDING"),
9732            Self::FailedRetryingNotVisible => {
9733                std::option::Option::Some("FAILED_RETRYING_NOT_VISIBLE")
9734            }
9735            Self::FailedPermanent => std::option::Option::Some("FAILED_PERMANENT"),
9736            Self::FailedRetryingCaaForbidden => {
9737                std::option::Option::Some("FAILED_RETRYING_CAA_FORBIDDEN")
9738            }
9739            Self::FailedRetryingCaaChecking => {
9740                std::option::Option::Some("FAILED_RETRYING_CAA_CHECKING")
9741            }
9742            Self::UnknownValue(u) => u.0.name(),
9743        }
9744    }
9745}
9746
9747impl std::default::Default for ManagementStatus {
9748    fn default() -> Self {
9749        use std::convert::From;
9750        Self::from(0)
9751    }
9752}
9753
9754impl std::fmt::Display for ManagementStatus {
9755    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9756        wkt::internal::display_enum(f, self.name(), self.value())
9757    }
9758}
9759
9760impl std::convert::From<i32> for ManagementStatus {
9761    fn from(value: i32) -> Self {
9762        match value {
9763            0 => Self::Unspecified,
9764            1 => Self::Ok,
9765            2 => Self::Pending,
9766            4 => Self::FailedRetryingNotVisible,
9767            6 => Self::FailedPermanent,
9768            7 => Self::FailedRetryingCaaForbidden,
9769            8 => Self::FailedRetryingCaaChecking,
9770            _ => Self::UnknownValue(management_status::UnknownValue(
9771                wkt::internal::UnknownEnumValue::Integer(value),
9772            )),
9773        }
9774    }
9775}
9776
9777impl std::convert::From<&str> for ManagementStatus {
9778    fn from(value: &str) -> Self {
9779        use std::string::ToString;
9780        match value {
9781            "MANAGEMENT_STATUS_UNSPECIFIED" => Self::Unspecified,
9782            "OK" => Self::Ok,
9783            "PENDING" => Self::Pending,
9784            "FAILED_RETRYING_NOT_VISIBLE" => Self::FailedRetryingNotVisible,
9785            "FAILED_PERMANENT" => Self::FailedPermanent,
9786            "FAILED_RETRYING_CAA_FORBIDDEN" => Self::FailedRetryingCaaForbidden,
9787            "FAILED_RETRYING_CAA_CHECKING" => Self::FailedRetryingCaaChecking,
9788            _ => Self::UnknownValue(management_status::UnknownValue(
9789                wkt::internal::UnknownEnumValue::String(value.to_string()),
9790            )),
9791        }
9792    }
9793}
9794
9795impl serde::ser::Serialize for ManagementStatus {
9796    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9797    where
9798        S: serde::Serializer,
9799    {
9800        match self {
9801            Self::Unspecified => serializer.serialize_i32(0),
9802            Self::Ok => serializer.serialize_i32(1),
9803            Self::Pending => serializer.serialize_i32(2),
9804            Self::FailedRetryingNotVisible => serializer.serialize_i32(4),
9805            Self::FailedPermanent => serializer.serialize_i32(6),
9806            Self::FailedRetryingCaaForbidden => serializer.serialize_i32(7),
9807            Self::FailedRetryingCaaChecking => serializer.serialize_i32(8),
9808            Self::UnknownValue(u) => u.0.serialize(serializer),
9809        }
9810    }
9811}
9812
9813impl<'de> serde::de::Deserialize<'de> for ManagementStatus {
9814    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9815    where
9816        D: serde::Deserializer<'de>,
9817    {
9818        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ManagementStatus>::new(
9819            ".google.appengine.v1.ManagementStatus",
9820        ))
9821    }
9822}
9823
9824/// Available inbound services.
9825///
9826/// # Working with unknown values
9827///
9828/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9829/// additional enum variants at any time. Adding new variants is not considered
9830/// a breaking change. Applications should write their code in anticipation of:
9831///
9832/// - New values appearing in future releases of the client library, **and**
9833/// - New values received dynamically, without application changes.
9834///
9835/// Please consult the [Working with enums] section in the user guide for some
9836/// guidelines.
9837///
9838/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9839#[derive(Clone, Debug, PartialEq)]
9840#[non_exhaustive]
9841pub enum InboundServiceType {
9842    /// Not specified.
9843    InboundServiceUnspecified,
9844    /// Allows an application to receive mail.
9845    InboundServiceMail,
9846    /// Allows an application to receive email-bound notifications.
9847    InboundServiceMailBounce,
9848    /// Allows an application to receive error stanzas.
9849    InboundServiceXmppError,
9850    /// Allows an application to receive instant messages.
9851    InboundServiceXmppMessage,
9852    /// Allows an application to receive user subscription POSTs.
9853    InboundServiceXmppSubscribe,
9854    /// Allows an application to receive a user's chat presence.
9855    InboundServiceXmppPresence,
9856    /// Registers an application for notifications when a client connects or
9857    /// disconnects from a channel.
9858    InboundServiceChannelPresence,
9859    /// Enables warmup requests.
9860    InboundServiceWarmup,
9861    /// If set, the enum was initialized with an unknown value.
9862    ///
9863    /// Applications can examine the value using [InboundServiceType::value] or
9864    /// [InboundServiceType::name].
9865    UnknownValue(inbound_service_type::UnknownValue),
9866}
9867
9868#[doc(hidden)]
9869pub mod inbound_service_type {
9870    #[allow(unused_imports)]
9871    use super::*;
9872    #[derive(Clone, Debug, PartialEq)]
9873    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9874}
9875
9876impl InboundServiceType {
9877    /// Gets the enum value.
9878    ///
9879    /// Returns `None` if the enum contains an unknown value deserialized from
9880    /// the string representation of enums.
9881    pub fn value(&self) -> std::option::Option<i32> {
9882        match self {
9883            Self::InboundServiceUnspecified => std::option::Option::Some(0),
9884            Self::InboundServiceMail => std::option::Option::Some(1),
9885            Self::InboundServiceMailBounce => std::option::Option::Some(2),
9886            Self::InboundServiceXmppError => std::option::Option::Some(3),
9887            Self::InboundServiceXmppMessage => std::option::Option::Some(4),
9888            Self::InboundServiceXmppSubscribe => std::option::Option::Some(5),
9889            Self::InboundServiceXmppPresence => std::option::Option::Some(6),
9890            Self::InboundServiceChannelPresence => std::option::Option::Some(7),
9891            Self::InboundServiceWarmup => std::option::Option::Some(9),
9892            Self::UnknownValue(u) => u.0.value(),
9893        }
9894    }
9895
9896    /// Gets the enum value as a string.
9897    ///
9898    /// Returns `None` if the enum contains an unknown value deserialized from
9899    /// the integer representation of enums.
9900    pub fn name(&self) -> std::option::Option<&str> {
9901        match self {
9902            Self::InboundServiceUnspecified => {
9903                std::option::Option::Some("INBOUND_SERVICE_UNSPECIFIED")
9904            }
9905            Self::InboundServiceMail => std::option::Option::Some("INBOUND_SERVICE_MAIL"),
9906            Self::InboundServiceMailBounce => {
9907                std::option::Option::Some("INBOUND_SERVICE_MAIL_BOUNCE")
9908            }
9909            Self::InboundServiceXmppError => {
9910                std::option::Option::Some("INBOUND_SERVICE_XMPP_ERROR")
9911            }
9912            Self::InboundServiceXmppMessage => {
9913                std::option::Option::Some("INBOUND_SERVICE_XMPP_MESSAGE")
9914            }
9915            Self::InboundServiceXmppSubscribe => {
9916                std::option::Option::Some("INBOUND_SERVICE_XMPP_SUBSCRIBE")
9917            }
9918            Self::InboundServiceXmppPresence => {
9919                std::option::Option::Some("INBOUND_SERVICE_XMPP_PRESENCE")
9920            }
9921            Self::InboundServiceChannelPresence => {
9922                std::option::Option::Some("INBOUND_SERVICE_CHANNEL_PRESENCE")
9923            }
9924            Self::InboundServiceWarmup => std::option::Option::Some("INBOUND_SERVICE_WARMUP"),
9925            Self::UnknownValue(u) => u.0.name(),
9926        }
9927    }
9928}
9929
9930impl std::default::Default for InboundServiceType {
9931    fn default() -> Self {
9932        use std::convert::From;
9933        Self::from(0)
9934    }
9935}
9936
9937impl std::fmt::Display for InboundServiceType {
9938    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9939        wkt::internal::display_enum(f, self.name(), self.value())
9940    }
9941}
9942
9943impl std::convert::From<i32> for InboundServiceType {
9944    fn from(value: i32) -> Self {
9945        match value {
9946            0 => Self::InboundServiceUnspecified,
9947            1 => Self::InboundServiceMail,
9948            2 => Self::InboundServiceMailBounce,
9949            3 => Self::InboundServiceXmppError,
9950            4 => Self::InboundServiceXmppMessage,
9951            5 => Self::InboundServiceXmppSubscribe,
9952            6 => Self::InboundServiceXmppPresence,
9953            7 => Self::InboundServiceChannelPresence,
9954            9 => Self::InboundServiceWarmup,
9955            _ => Self::UnknownValue(inbound_service_type::UnknownValue(
9956                wkt::internal::UnknownEnumValue::Integer(value),
9957            )),
9958        }
9959    }
9960}
9961
9962impl std::convert::From<&str> for InboundServiceType {
9963    fn from(value: &str) -> Self {
9964        use std::string::ToString;
9965        match value {
9966            "INBOUND_SERVICE_UNSPECIFIED" => Self::InboundServiceUnspecified,
9967            "INBOUND_SERVICE_MAIL" => Self::InboundServiceMail,
9968            "INBOUND_SERVICE_MAIL_BOUNCE" => Self::InboundServiceMailBounce,
9969            "INBOUND_SERVICE_XMPP_ERROR" => Self::InboundServiceXmppError,
9970            "INBOUND_SERVICE_XMPP_MESSAGE" => Self::InboundServiceXmppMessage,
9971            "INBOUND_SERVICE_XMPP_SUBSCRIBE" => Self::InboundServiceXmppSubscribe,
9972            "INBOUND_SERVICE_XMPP_PRESENCE" => Self::InboundServiceXmppPresence,
9973            "INBOUND_SERVICE_CHANNEL_PRESENCE" => Self::InboundServiceChannelPresence,
9974            "INBOUND_SERVICE_WARMUP" => Self::InboundServiceWarmup,
9975            _ => Self::UnknownValue(inbound_service_type::UnknownValue(
9976                wkt::internal::UnknownEnumValue::String(value.to_string()),
9977            )),
9978        }
9979    }
9980}
9981
9982impl serde::ser::Serialize for InboundServiceType {
9983    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9984    where
9985        S: serde::Serializer,
9986    {
9987        match self {
9988            Self::InboundServiceUnspecified => serializer.serialize_i32(0),
9989            Self::InboundServiceMail => serializer.serialize_i32(1),
9990            Self::InboundServiceMailBounce => serializer.serialize_i32(2),
9991            Self::InboundServiceXmppError => serializer.serialize_i32(3),
9992            Self::InboundServiceXmppMessage => serializer.serialize_i32(4),
9993            Self::InboundServiceXmppSubscribe => serializer.serialize_i32(5),
9994            Self::InboundServiceXmppPresence => serializer.serialize_i32(6),
9995            Self::InboundServiceChannelPresence => serializer.serialize_i32(7),
9996            Self::InboundServiceWarmup => serializer.serialize_i32(9),
9997            Self::UnknownValue(u) => u.0.serialize(serializer),
9998        }
9999    }
10000}
10001
10002impl<'de> serde::de::Deserialize<'de> for InboundServiceType {
10003    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10004    where
10005        D: serde::Deserializer<'de>,
10006    {
10007        deserializer.deserialize_any(wkt::internal::EnumVisitor::<InboundServiceType>::new(
10008            ".google.appengine.v1.InboundServiceType",
10009        ))
10010    }
10011}
10012
10013/// Run states of a version.
10014///
10015/// # Working with unknown values
10016///
10017/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10018/// additional enum variants at any time. Adding new variants is not considered
10019/// a breaking change. Applications should write their code in anticipation of:
10020///
10021/// - New values appearing in future releases of the client library, **and**
10022/// - New values received dynamically, without application changes.
10023///
10024/// Please consult the [Working with enums] section in the user guide for some
10025/// guidelines.
10026///
10027/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10028#[derive(Clone, Debug, PartialEq)]
10029#[non_exhaustive]
10030pub enum ServingStatus {
10031    /// Not specified.
10032    Unspecified,
10033    /// Currently serving. Instances are created according to the
10034    /// scaling settings of the version.
10035    Serving,
10036    /// Disabled. No instances will be created and the scaling
10037    /// settings are ignored until the state of the version changes
10038    /// to `SERVING`.
10039    Stopped,
10040    /// If set, the enum was initialized with an unknown value.
10041    ///
10042    /// Applications can examine the value using [ServingStatus::value] or
10043    /// [ServingStatus::name].
10044    UnknownValue(serving_status::UnknownValue),
10045}
10046
10047#[doc(hidden)]
10048pub mod serving_status {
10049    #[allow(unused_imports)]
10050    use super::*;
10051    #[derive(Clone, Debug, PartialEq)]
10052    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10053}
10054
10055impl ServingStatus {
10056    /// Gets the enum value.
10057    ///
10058    /// Returns `None` if the enum contains an unknown value deserialized from
10059    /// the string representation of enums.
10060    pub fn value(&self) -> std::option::Option<i32> {
10061        match self {
10062            Self::Unspecified => std::option::Option::Some(0),
10063            Self::Serving => std::option::Option::Some(1),
10064            Self::Stopped => std::option::Option::Some(2),
10065            Self::UnknownValue(u) => u.0.value(),
10066        }
10067    }
10068
10069    /// Gets the enum value as a string.
10070    ///
10071    /// Returns `None` if the enum contains an unknown value deserialized from
10072    /// the integer representation of enums.
10073    pub fn name(&self) -> std::option::Option<&str> {
10074        match self {
10075            Self::Unspecified => std::option::Option::Some("SERVING_STATUS_UNSPECIFIED"),
10076            Self::Serving => std::option::Option::Some("SERVING"),
10077            Self::Stopped => std::option::Option::Some("STOPPED"),
10078            Self::UnknownValue(u) => u.0.name(),
10079        }
10080    }
10081}
10082
10083impl std::default::Default for ServingStatus {
10084    fn default() -> Self {
10085        use std::convert::From;
10086        Self::from(0)
10087    }
10088}
10089
10090impl std::fmt::Display for ServingStatus {
10091    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10092        wkt::internal::display_enum(f, self.name(), self.value())
10093    }
10094}
10095
10096impl std::convert::From<i32> for ServingStatus {
10097    fn from(value: i32) -> Self {
10098        match value {
10099            0 => Self::Unspecified,
10100            1 => Self::Serving,
10101            2 => Self::Stopped,
10102            _ => Self::UnknownValue(serving_status::UnknownValue(
10103                wkt::internal::UnknownEnumValue::Integer(value),
10104            )),
10105        }
10106    }
10107}
10108
10109impl std::convert::From<&str> for ServingStatus {
10110    fn from(value: &str) -> Self {
10111        use std::string::ToString;
10112        match value {
10113            "SERVING_STATUS_UNSPECIFIED" => Self::Unspecified,
10114            "SERVING" => Self::Serving,
10115            "STOPPED" => Self::Stopped,
10116            _ => Self::UnknownValue(serving_status::UnknownValue(
10117                wkt::internal::UnknownEnumValue::String(value.to_string()),
10118            )),
10119        }
10120    }
10121}
10122
10123impl serde::ser::Serialize for ServingStatus {
10124    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10125    where
10126        S: serde::Serializer,
10127    {
10128        match self {
10129            Self::Unspecified => serializer.serialize_i32(0),
10130            Self::Serving => serializer.serialize_i32(1),
10131            Self::Stopped => serializer.serialize_i32(2),
10132            Self::UnknownValue(u) => u.0.serialize(serializer),
10133        }
10134    }
10135}
10136
10137impl<'de> serde::de::Deserialize<'de> for ServingStatus {
10138    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10139    where
10140        D: serde::Deserializer<'de>,
10141    {
10142        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServingStatus>::new(
10143            ".google.appengine.v1.ServingStatus",
10144        ))
10145    }
10146}