google_cloud_container_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 reqwest;
26extern crate rpc;
27extern crate serde;
28extern crate serde_json;
29extern crate serde_with;
30extern crate std;
31extern crate tracing;
32extern crate wkt;
33
34/// Parameters that can be configured on Linux nodes.
35#[serde_with::serde_as]
36#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
37#[serde(default, rename_all = "camelCase")]
38#[non_exhaustive]
39pub struct LinuxNodeConfig {
40    /// The Linux kernel parameters to be applied to the nodes and all pods running
41    /// on the nodes.
42    ///
43    /// The following parameters are supported.
44    ///
45    /// net.core.busy_poll
46    /// net.core.busy_read
47    /// net.core.netdev_max_backlog
48    /// net.core.rmem_max
49    /// net.core.wmem_default
50    /// net.core.wmem_max
51    /// net.core.optmem_max
52    /// net.core.somaxconn
53    /// net.ipv4.tcp_rmem
54    /// net.ipv4.tcp_wmem
55    /// net.ipv4.tcp_tw_reuse
56    /// kernel.shmmni
57    /// kernel.shmmax
58    /// kernel.shmall
59    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
60    pub sysctls: std::collections::HashMap<std::string::String, std::string::String>,
61
62    /// cgroup_mode specifies the cgroup mode to be used on the node.
63    pub cgroup_mode: crate::model::linux_node_config::CgroupMode,
64
65    /// Optional. Amounts for 2M and 1G hugepages
66    #[serde(skip_serializing_if = "std::option::Option::is_none")]
67    pub hugepages: std::option::Option<crate::model::linux_node_config::HugepagesConfig>,
68
69    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
70    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71}
72
73impl LinuxNodeConfig {
74    pub fn new() -> Self {
75        std::default::Default::default()
76    }
77
78    /// Sets the value of [sysctls][crate::model::LinuxNodeConfig::sysctls].
79    pub fn set_sysctls<T, K, V>(mut self, v: T) -> Self
80    where
81        T: std::iter::IntoIterator<Item = (K, V)>,
82        K: std::convert::Into<std::string::String>,
83        V: std::convert::Into<std::string::String>,
84    {
85        use std::iter::Iterator;
86        self.sysctls = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
87        self
88    }
89
90    /// Sets the value of [cgroup_mode][crate::model::LinuxNodeConfig::cgroup_mode].
91    pub fn set_cgroup_mode<T: std::convert::Into<crate::model::linux_node_config::CgroupMode>>(
92        mut self,
93        v: T,
94    ) -> Self {
95        self.cgroup_mode = v.into();
96        self
97    }
98
99    /// Sets the value of [hugepages][crate::model::LinuxNodeConfig::hugepages].
100    pub fn set_hugepages<
101        T: std::convert::Into<std::option::Option<crate::model::linux_node_config::HugepagesConfig>>,
102    >(
103        mut self,
104        v: T,
105    ) -> Self {
106        self.hugepages = v.into();
107        self
108    }
109}
110
111impl wkt::message::Message for LinuxNodeConfig {
112    fn typename() -> &'static str {
113        "type.googleapis.com/google.container.v1.LinuxNodeConfig"
114    }
115}
116
117/// Defines additional types related to [LinuxNodeConfig].
118pub mod linux_node_config {
119    #[allow(unused_imports)]
120    use super::*;
121
122    /// Hugepages amount in both 2m and 1g size
123    #[serde_with::serde_as]
124    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
125    #[serde(default, rename_all = "camelCase")]
126    #[non_exhaustive]
127    pub struct HugepagesConfig {
128        /// Optional. Amount of 2M hugepages
129        #[serde(rename = "hugepageSize2m")]
130        #[serde(skip_serializing_if = "std::option::Option::is_none")]
131        pub hugepage_size2m: std::option::Option<i32>,
132
133        /// Optional. Amount of 1G hugepages
134        #[serde(rename = "hugepageSize1g")]
135        #[serde(skip_serializing_if = "std::option::Option::is_none")]
136        pub hugepage_size1g: std::option::Option<i32>,
137
138        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
139        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
140    }
141
142    impl HugepagesConfig {
143        pub fn new() -> Self {
144            std::default::Default::default()
145        }
146
147        /// Sets the value of [hugepage_size2m][crate::model::linux_node_config::HugepagesConfig::hugepage_size2m].
148        pub fn set_hugepage_size2m<T: std::convert::Into<std::option::Option<i32>>>(
149            mut self,
150            v: T,
151        ) -> Self {
152            self.hugepage_size2m = v.into();
153            self
154        }
155
156        /// Sets the value of [hugepage_size1g][crate::model::linux_node_config::HugepagesConfig::hugepage_size1g].
157        pub fn set_hugepage_size1g<T: std::convert::Into<std::option::Option<i32>>>(
158            mut self,
159            v: T,
160        ) -> Self {
161            self.hugepage_size1g = v.into();
162            self
163        }
164    }
165
166    impl wkt::message::Message for HugepagesConfig {
167        fn typename() -> &'static str {
168            "type.googleapis.com/google.container.v1.LinuxNodeConfig.HugepagesConfig"
169        }
170    }
171
172    /// Possible cgroup modes that can be used.
173    ///
174    /// # Working with unknown values
175    ///
176    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
177    /// additional enum variants at any time. Adding new variants is not considered
178    /// a breaking change. Applications should write their code in anticipation of:
179    ///
180    /// - New values appearing in future releases of the client library, **and**
181    /// - New values received dynamically, without application changes.
182    ///
183    /// Please consult the [Working with enums] section in the user guide for some
184    /// guidelines.
185    ///
186    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
187    #[derive(Clone, Debug, PartialEq)]
188    #[non_exhaustive]
189    pub enum CgroupMode {
190        /// CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used.
191        /// The default for the GKE node OS image will be used.
192        Unspecified,
193        /// CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on
194        /// the node image.
195        V1,
196        /// CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on
197        /// the node image.
198        V2,
199        /// If set, the enum was initialized with an unknown value.
200        ///
201        /// Applications can examine the value using [CgroupMode::value] or
202        /// [CgroupMode::name].
203        UnknownValue(cgroup_mode::UnknownValue),
204    }
205
206    #[doc(hidden)]
207    pub mod cgroup_mode {
208        #[allow(unused_imports)]
209        use super::*;
210        #[derive(Clone, Debug, PartialEq)]
211        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
212    }
213
214    impl CgroupMode {
215        /// Gets the enum value.
216        ///
217        /// Returns `None` if the enum contains an unknown value deserialized from
218        /// the string representation of enums.
219        pub fn value(&self) -> std::option::Option<i32> {
220            match self {
221                Self::Unspecified => std::option::Option::Some(0),
222                Self::V1 => std::option::Option::Some(1),
223                Self::V2 => std::option::Option::Some(2),
224                Self::UnknownValue(u) => u.0.value(),
225            }
226        }
227
228        /// Gets the enum value as a string.
229        ///
230        /// Returns `None` if the enum contains an unknown value deserialized from
231        /// the integer representation of enums.
232        pub fn name(&self) -> std::option::Option<&str> {
233            match self {
234                Self::Unspecified => std::option::Option::Some("CGROUP_MODE_UNSPECIFIED"),
235                Self::V1 => std::option::Option::Some("CGROUP_MODE_V1"),
236                Self::V2 => std::option::Option::Some("CGROUP_MODE_V2"),
237                Self::UnknownValue(u) => u.0.name(),
238            }
239        }
240    }
241
242    impl std::default::Default for CgroupMode {
243        fn default() -> Self {
244            use std::convert::From;
245            Self::from(0)
246        }
247    }
248
249    impl std::fmt::Display for CgroupMode {
250        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
251            wkt::internal::display_enum(f, self.name(), self.value())
252        }
253    }
254
255    impl std::convert::From<i32> for CgroupMode {
256        fn from(value: i32) -> Self {
257            match value {
258                0 => Self::Unspecified,
259                1 => Self::V1,
260                2 => Self::V2,
261                _ => Self::UnknownValue(cgroup_mode::UnknownValue(
262                    wkt::internal::UnknownEnumValue::Integer(value),
263                )),
264            }
265        }
266    }
267
268    impl std::convert::From<&str> for CgroupMode {
269        fn from(value: &str) -> Self {
270            use std::string::ToString;
271            match value {
272                "CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
273                "CGROUP_MODE_V1" => Self::V1,
274                "CGROUP_MODE_V2" => Self::V2,
275                _ => Self::UnknownValue(cgroup_mode::UnknownValue(
276                    wkt::internal::UnknownEnumValue::String(value.to_string()),
277                )),
278            }
279        }
280    }
281
282    impl serde::ser::Serialize for CgroupMode {
283        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
284        where
285            S: serde::Serializer,
286        {
287            match self {
288                Self::Unspecified => serializer.serialize_i32(0),
289                Self::V1 => serializer.serialize_i32(1),
290                Self::V2 => serializer.serialize_i32(2),
291                Self::UnknownValue(u) => u.0.serialize(serializer),
292            }
293        }
294    }
295
296    impl<'de> serde::de::Deserialize<'de> for CgroupMode {
297        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
298        where
299            D: serde::Deserializer<'de>,
300        {
301            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CgroupMode>::new(
302                ".google.container.v1.LinuxNodeConfig.CgroupMode",
303            ))
304        }
305    }
306}
307
308/// Parameters that can be configured on Windows nodes.
309/// Windows Node Config that define the parameters that will be used to
310/// configure the Windows node pool settings
311#[serde_with::serde_as]
312#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
313#[serde(default, rename_all = "camelCase")]
314#[non_exhaustive]
315pub struct WindowsNodeConfig {
316    /// OSVersion specifies the Windows node config to be used on the node
317    pub os_version: crate::model::windows_node_config::OSVersion,
318
319    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
320    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
321}
322
323impl WindowsNodeConfig {
324    pub fn new() -> Self {
325        std::default::Default::default()
326    }
327
328    /// Sets the value of [os_version][crate::model::WindowsNodeConfig::os_version].
329    pub fn set_os_version<T: std::convert::Into<crate::model::windows_node_config::OSVersion>>(
330        mut self,
331        v: T,
332    ) -> Self {
333        self.os_version = v.into();
334        self
335    }
336}
337
338impl wkt::message::Message for WindowsNodeConfig {
339    fn typename() -> &'static str {
340        "type.googleapis.com/google.container.v1.WindowsNodeConfig"
341    }
342}
343
344/// Defines additional types related to [WindowsNodeConfig].
345pub mod windows_node_config {
346    #[allow(unused_imports)]
347    use super::*;
348
349    /// Possible OS version that can be used.
350    ///
351    /// # Working with unknown values
352    ///
353    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
354    /// additional enum variants at any time. Adding new variants is not considered
355    /// a breaking change. Applications should write their code in anticipation of:
356    ///
357    /// - New values appearing in future releases of the client library, **and**
358    /// - New values received dynamically, without application changes.
359    ///
360    /// Please consult the [Working with enums] section in the user guide for some
361    /// guidelines.
362    ///
363    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
364    #[derive(Clone, Debug, PartialEq)]
365    #[non_exhaustive]
366    pub enum OSVersion {
367        /// When OSVersion is not specified
368        Unspecified,
369        /// LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image
370        Ltsc2019,
371        /// LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image
372        Ltsc2022,
373        /// If set, the enum was initialized with an unknown value.
374        ///
375        /// Applications can examine the value using [OSVersion::value] or
376        /// [OSVersion::name].
377        UnknownValue(os_version::UnknownValue),
378    }
379
380    #[doc(hidden)]
381    pub mod os_version {
382        #[allow(unused_imports)]
383        use super::*;
384        #[derive(Clone, Debug, PartialEq)]
385        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
386    }
387
388    impl OSVersion {
389        /// Gets the enum value.
390        ///
391        /// Returns `None` if the enum contains an unknown value deserialized from
392        /// the string representation of enums.
393        pub fn value(&self) -> std::option::Option<i32> {
394            match self {
395                Self::Unspecified => std::option::Option::Some(0),
396                Self::Ltsc2019 => std::option::Option::Some(1),
397                Self::Ltsc2022 => std::option::Option::Some(2),
398                Self::UnknownValue(u) => u.0.value(),
399            }
400        }
401
402        /// Gets the enum value as a string.
403        ///
404        /// Returns `None` if the enum contains an unknown value deserialized from
405        /// the integer representation of enums.
406        pub fn name(&self) -> std::option::Option<&str> {
407            match self {
408                Self::Unspecified => std::option::Option::Some("OS_VERSION_UNSPECIFIED"),
409                Self::Ltsc2019 => std::option::Option::Some("OS_VERSION_LTSC2019"),
410                Self::Ltsc2022 => std::option::Option::Some("OS_VERSION_LTSC2022"),
411                Self::UnknownValue(u) => u.0.name(),
412            }
413        }
414    }
415
416    impl std::default::Default for OSVersion {
417        fn default() -> Self {
418            use std::convert::From;
419            Self::from(0)
420        }
421    }
422
423    impl std::fmt::Display for OSVersion {
424        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
425            wkt::internal::display_enum(f, self.name(), self.value())
426        }
427    }
428
429    impl std::convert::From<i32> for OSVersion {
430        fn from(value: i32) -> Self {
431            match value {
432                0 => Self::Unspecified,
433                1 => Self::Ltsc2019,
434                2 => Self::Ltsc2022,
435                _ => Self::UnknownValue(os_version::UnknownValue(
436                    wkt::internal::UnknownEnumValue::Integer(value),
437                )),
438            }
439        }
440    }
441
442    impl std::convert::From<&str> for OSVersion {
443        fn from(value: &str) -> Self {
444            use std::string::ToString;
445            match value {
446                "OS_VERSION_UNSPECIFIED" => Self::Unspecified,
447                "OS_VERSION_LTSC2019" => Self::Ltsc2019,
448                "OS_VERSION_LTSC2022" => Self::Ltsc2022,
449                _ => Self::UnknownValue(os_version::UnknownValue(
450                    wkt::internal::UnknownEnumValue::String(value.to_string()),
451                )),
452            }
453        }
454    }
455
456    impl serde::ser::Serialize for OSVersion {
457        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
458        where
459            S: serde::Serializer,
460        {
461            match self {
462                Self::Unspecified => serializer.serialize_i32(0),
463                Self::Ltsc2019 => serializer.serialize_i32(1),
464                Self::Ltsc2022 => serializer.serialize_i32(2),
465                Self::UnknownValue(u) => u.0.serialize(serializer),
466            }
467        }
468    }
469
470    impl<'de> serde::de::Deserialize<'de> for OSVersion {
471        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
472        where
473            D: serde::Deserializer<'de>,
474        {
475            deserializer.deserialize_any(wkt::internal::EnumVisitor::<OSVersion>::new(
476                ".google.container.v1.WindowsNodeConfig.OSVersion",
477            ))
478        }
479    }
480}
481
482/// Node kubelet configs.
483#[serde_with::serde_as]
484#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
485#[serde(default, rename_all = "camelCase")]
486#[non_exhaustive]
487pub struct NodeKubeletConfig {
488    /// Control the CPU management policy on the node.
489    /// See
490    /// <https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/>
491    ///
492    /// The following values are allowed.
493    ///
494    /// * "none": the default, which represents the existing scheduling behavior.
495    /// * "static": allows pods with certain resource characteristics to be granted
496    ///   increased CPU affinity and exclusivity on the node.
497    ///   The default value is 'none' if unspecified.
498    #[serde(skip_serializing_if = "std::string::String::is_empty")]
499    pub cpu_manager_policy: std::string::String,
500
501    /// Enable CPU CFS quota enforcement for containers that specify CPU limits.
502    ///
503    /// This option is enabled by default which makes kubelet use CFS quota
504    /// (<https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt>) to
505    /// enforce container CPU limits. Otherwise, CPU limits will not be enforced at
506    /// all.
507    ///
508    /// Disable this option to mitigate CPU throttling problems while still having
509    /// your pods to be in Guaranteed QoS class by specifying the CPU limits.
510    ///
511    /// The default value is 'true' if unspecified.
512    #[serde(skip_serializing_if = "std::option::Option::is_none")]
513    pub cpu_cfs_quota: std::option::Option<wkt::BoolValue>,
514
515    /// Set the CPU CFS quota period value 'cpu.cfs_period_us'.
516    ///
517    /// The string must be a sequence of decimal numbers, each with optional
518    /// fraction and a unit suffix, such as "300ms".
519    /// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
520    /// The value must be a positive duration.
521    #[serde(skip_serializing_if = "std::string::String::is_empty")]
522    pub cpu_cfs_quota_period: std::string::String,
523
524    /// Set the Pod PID limits. See
525    /// <https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits>
526    ///
527    /// Controls the maximum number of processes allowed to run in a pod. The value
528    /// must be greater than or equal to 1024 and less than 4194304.
529    #[serde(skip_serializing_if = "wkt::internal::is_default")]
530    #[serde_as(as = "serde_with::DisplayFromStr")]
531    pub pod_pids_limit: i64,
532
533    /// Enable or disable Kubelet read only port.
534    #[serde(skip_serializing_if = "std::option::Option::is_none")]
535    pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
536
537    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
538    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
539}
540
541impl NodeKubeletConfig {
542    pub fn new() -> Self {
543        std::default::Default::default()
544    }
545
546    /// Sets the value of [cpu_manager_policy][crate::model::NodeKubeletConfig::cpu_manager_policy].
547    pub fn set_cpu_manager_policy<T: std::convert::Into<std::string::String>>(
548        mut self,
549        v: T,
550    ) -> Self {
551        self.cpu_manager_policy = v.into();
552        self
553    }
554
555    /// Sets the value of [cpu_cfs_quota][crate::model::NodeKubeletConfig::cpu_cfs_quota].
556    pub fn set_cpu_cfs_quota<T: std::convert::Into<std::option::Option<wkt::BoolValue>>>(
557        mut self,
558        v: T,
559    ) -> Self {
560        self.cpu_cfs_quota = v.into();
561        self
562    }
563
564    /// Sets the value of [cpu_cfs_quota_period][crate::model::NodeKubeletConfig::cpu_cfs_quota_period].
565    pub fn set_cpu_cfs_quota_period<T: std::convert::Into<std::string::String>>(
566        mut self,
567        v: T,
568    ) -> Self {
569        self.cpu_cfs_quota_period = v.into();
570        self
571    }
572
573    /// Sets the value of [pod_pids_limit][crate::model::NodeKubeletConfig::pod_pids_limit].
574    pub fn set_pod_pids_limit<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
575        self.pod_pids_limit = v.into();
576        self
577    }
578
579    /// Sets the value of [insecure_kubelet_readonly_port_enabled][crate::model::NodeKubeletConfig::insecure_kubelet_readonly_port_enabled].
580    pub fn set_insecure_kubelet_readonly_port_enabled<
581        T: std::convert::Into<std::option::Option<bool>>,
582    >(
583        mut self,
584        v: T,
585    ) -> Self {
586        self.insecure_kubelet_readonly_port_enabled = v.into();
587        self
588    }
589}
590
591impl wkt::message::Message for NodeKubeletConfig {
592    fn typename() -> &'static str {
593        "type.googleapis.com/google.container.v1.NodeKubeletConfig"
594    }
595}
596
597/// Parameters that describe the nodes in a cluster.
598///
599/// GKE Autopilot clusters do not
600/// recognize parameters in `NodeConfig`. Use
601/// [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults]
602/// instead.
603///
604/// [google.container.v1.AutoprovisioningNodePoolDefaults]: crate::model::AutoprovisioningNodePoolDefaults
605#[serde_with::serde_as]
606#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
607#[serde(default, rename_all = "camelCase")]
608#[non_exhaustive]
609pub struct NodeConfig {
610    /// The name of a Google Compute Engine [machine
611    /// type](https://cloud.google.com/compute/docs/machine-types)
612    ///
613    /// If unspecified, the default machine type is `e2-medium`.
614    #[serde(skip_serializing_if = "std::string::String::is_empty")]
615    pub machine_type: std::string::String,
616
617    /// Size of the disk attached to each node, specified in GB.
618    /// The smallest allowed disk size is 10GB.
619    ///
620    /// If unspecified, the default disk size is 100GB.
621    #[serde(skip_serializing_if = "wkt::internal::is_default")]
622    pub disk_size_gb: i32,
623
624    /// The set of Google API scopes to be made available on all of the
625    /// node VMs under the "default" service account.
626    ///
627    /// The following scopes are recommended, but not required, and by default are
628    /// not included:
629    ///
630    /// * `<https://www.googleapis.com/auth/compute>` is required for mounting
631    ///   persistent storage on your nodes.
632    /// * `<https://www.googleapis.com/auth/devstorage.read_only>` is required for
633    ///   communicating with **gcr.io**
634    ///   (the [Google Container
635    ///   Registry](https://cloud.google.com/container-registry/)).
636    ///
637    /// If unspecified, no scopes are added, unless Cloud Logging or Cloud
638    /// Monitoring are enabled, in which case their required scopes will be added.
639    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
640    pub oauth_scopes: std::vec::Vec<std::string::String>,
641
642    /// The Google Cloud Platform Service Account to be used by the node VMs.
643    /// Specify the email address of the Service Account; otherwise, if no Service
644    /// Account is specified, the "default" service account is used.
645    #[serde(skip_serializing_if = "std::string::String::is_empty")]
646    pub service_account: std::string::String,
647
648    /// The metadata key/value pairs assigned to instances in the cluster.
649    ///
650    /// Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes
651    /// in length. These are reflected as part of a URL in the metadata server.
652    /// Additionally, to avoid ambiguity, keys must not conflict with any other
653    /// metadata keys for the project or be one of the reserved keys:
654    ///
655    /// - "cluster-location"
656    /// - "cluster-name"
657    /// - "cluster-uid"
658    /// - "configure-sh"
659    /// - "containerd-configure-sh"
660    /// - "enable-os-login"
661    /// - "gci-ensure-gke-docker"
662    /// - "gci-metrics-enabled"
663    /// - "gci-update-strategy"
664    /// - "instance-template"
665    /// - "kube-env"
666    /// - "startup-script"
667    /// - "user-data"
668    /// - "disable-address-manager"
669    /// - "windows-startup-script-ps1"
670    /// - "common-psm1"
671    /// - "k8s-node-setup-psm1"
672    /// - "install-ssh-psm1"
673    /// - "user-profile-psm1"
674    ///
675    /// Values are free-form strings, and only have meaning as interpreted by
676    /// the image running in the instance. The only restriction placed on them is
677    /// that each value's size must be less than or equal to 32 KB.
678    ///
679    /// The total size of all keys and values must be less than 512 KB.
680    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
681    pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
682
683    /// The image type to use for this node. Note that for a given image type,
684    /// the latest version of it will be used. Please see
685    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images> for
686    /// available image types.
687    #[serde(skip_serializing_if = "std::string::String::is_empty")]
688    pub image_type: std::string::String,
689
690    /// The map of Kubernetes labels (key/value pairs) to be applied to each node.
691    /// These will added in addition to any default label(s) that
692    /// Kubernetes may apply to the node.
693    /// In case of conflict in label keys, the applied set may differ depending on
694    /// the Kubernetes version -- it's best to assume the behavior is undefined
695    /// and conflicts should be avoided.
696    /// For more information, including usage and the valid values, see:
697    /// <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/>
698    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
699    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
700
701    /// The number of local SSD disks to be attached to the node.
702    ///
703    /// The limit for this value is dependent upon the maximum number of
704    /// disks available on a machine per zone. See:
705    /// <https://cloud.google.com/compute/docs/disks/local-ssd>
706    /// for more information.
707    #[serde(skip_serializing_if = "wkt::internal::is_default")]
708    pub local_ssd_count: i32,
709
710    /// The list of instance tags applied to all nodes. Tags are used to identify
711    /// valid sources or targets for network firewalls and are specified by
712    /// the client during cluster or node pool creation. Each tag within the list
713    /// must comply with RFC1035.
714    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
715    pub tags: std::vec::Vec<std::string::String>,
716
717    /// Whether the nodes are created as preemptible VM instances. See:
718    /// <https://cloud.google.com/compute/docs/instances/preemptible> for more
719    /// information about preemptible VM instances.
720    #[serde(skip_serializing_if = "wkt::internal::is_default")]
721    pub preemptible: bool,
722
723    /// A list of hardware accelerators to be attached to each node.
724    /// See <https://cloud.google.com/compute/docs/gpus> for more information about
725    /// support for GPUs.
726    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
727    pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
728
729    /// Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or
730    /// 'pd-balanced')
731    ///
732    /// If unspecified, the default disk type is 'pd-standard'
733    #[serde(skip_serializing_if = "std::string::String::is_empty")]
734    pub disk_type: std::string::String,
735
736    /// Minimum CPU platform to be used by this instance. The instance may be
737    /// scheduled on the specified or newer CPU platform. Applicable values are the
738    /// friendly names of CPU platforms, such as
739    /// `minCpuPlatform: "Intel Haswell"` or
740    /// `minCpuPlatform: "Intel Sandy Bridge"`. For more
741    /// information, read [how to specify min CPU
742    /// platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
743    #[serde(skip_serializing_if = "std::string::String::is_empty")]
744    pub min_cpu_platform: std::string::String,
745
746    /// The workload metadata configuration for this node.
747    #[serde(skip_serializing_if = "std::option::Option::is_none")]
748    pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
749
750    /// List of kubernetes taints to be applied to each node.
751    ///
752    /// For more information, including usage and the valid values, see:
753    /// <https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/>
754    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
755    pub taints: std::vec::Vec<crate::model::NodeTaint>,
756
757    /// Sandbox configuration for this node.
758    #[serde(skip_serializing_if = "std::option::Option::is_none")]
759    pub sandbox_config: std::option::Option<crate::model::SandboxConfig>,
760
761    /// Setting this field will assign instances of this
762    /// pool to run on the specified node group. This is useful for running
763    /// workloads on [sole tenant
764    /// nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes).
765    #[serde(skip_serializing_if = "std::string::String::is_empty")]
766    pub node_group: std::string::String,
767
768    /// The optional reservation affinity. Setting this field will apply
769    /// the specified [Zonal Compute
770    /// Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
771    /// to this node pool.
772    #[serde(skip_serializing_if = "std::option::Option::is_none")]
773    pub reservation_affinity: std::option::Option<crate::model::ReservationAffinity>,
774
775    /// Shielded Instance options.
776    #[serde(skip_serializing_if = "std::option::Option::is_none")]
777    pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
778
779    /// Parameters that can be configured on Linux nodes.
780    #[serde(skip_serializing_if = "std::option::Option::is_none")]
781    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
782
783    /// Node kubelet configs.
784    #[serde(skip_serializing_if = "std::option::Option::is_none")]
785    pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
786
787    /// The Customer Managed Encryption Key used to encrypt the boot disk attached
788    /// to each node in the node pool. This should be of the form
789    /// projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME].
790    /// For more information about protecting resources with Cloud KMS Keys please
791    /// see:
792    /// <https://cloud.google.com/compute/docs/disks/customer-managed-encryption>
793    #[serde(skip_serializing_if = "std::string::String::is_empty")]
794    pub boot_disk_kms_key: std::string::String,
795
796    /// Google Container File System (image streaming) configs.
797    #[serde(skip_serializing_if = "std::option::Option::is_none")]
798    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
799
800    /// Advanced features for the Compute Engine VM.
801    #[serde(skip_serializing_if = "std::option::Option::is_none")]
802    pub advanced_machine_features: std::option::Option<crate::model::AdvancedMachineFeatures>,
803
804    /// Enable or disable gvnic in the node pool.
805    #[serde(skip_serializing_if = "std::option::Option::is_none")]
806    pub gvnic: std::option::Option<crate::model::VirtualNIC>,
807
808    /// Spot flag for enabling Spot VM, which is a rebrand of
809    /// the existing preemptible flag.
810    #[serde(skip_serializing_if = "wkt::internal::is_default")]
811    pub spot: bool,
812
813    /// Confidential nodes config.
814    /// All the nodes in the node pool will be Confidential VM once enabled.
815    #[serde(skip_serializing_if = "std::option::Option::is_none")]
816    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
817
818    /// Enable or disable NCCL fast socket for the node pool.
819    #[serde(skip_serializing_if = "std::option::Option::is_none")]
820    pub fast_socket: std::option::Option<crate::model::FastSocket>,
821
822    /// The resource labels for the node pool to use to annotate any related
823    /// Google Compute Engine resources.
824    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
825    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
826
827    /// Logging configuration.
828    #[serde(skip_serializing_if = "std::option::Option::is_none")]
829    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
830
831    /// Parameters that can be configured on Windows nodes.
832    #[serde(skip_serializing_if = "std::option::Option::is_none")]
833    pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
834
835    /// Parameters for using raw-block Local NVMe SSDs.
836    #[serde(skip_serializing_if = "std::option::Option::is_none")]
837    pub local_nvme_ssd_block_config: std::option::Option<crate::model::LocalNvmeSsdBlockConfig>,
838
839    /// Parameters for the node ephemeral storage using Local SSDs.
840    /// If unspecified, ephemeral storage is backed by the boot disk.
841    #[serde(skip_serializing_if = "std::option::Option::is_none")]
842    pub ephemeral_storage_local_ssd_config:
843        std::option::Option<crate::model::EphemeralStorageLocalSsdConfig>,
844
845    /// Parameters for node pools to be backed by shared sole tenant node groups.
846    #[serde(skip_serializing_if = "std::option::Option::is_none")]
847    pub sole_tenant_config: std::option::Option<crate::model::SoleTenantConfig>,
848
849    /// Parameters for containerd customization.
850    #[serde(skip_serializing_if = "std::option::Option::is_none")]
851    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
852
853    /// A map of resource manager tag keys and values to be attached to the nodes.
854    #[serde(skip_serializing_if = "std::option::Option::is_none")]
855    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
856
857    /// Optional. Reserved for future use.
858    #[serde(skip_serializing_if = "wkt::internal::is_default")]
859    pub enable_confidential_storage: bool,
860
861    /// List of secondary boot disks attached to the nodes.
862    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
863    pub secondary_boot_disks: std::vec::Vec<crate::model::SecondaryBootDisk>,
864
865    /// List of Storage Pools where boot disks are provisioned.
866    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
867    pub storage_pools: std::vec::Vec<std::string::String>,
868
869    /// Secondary boot disk update strategy.
870    #[serde(skip_serializing_if = "std::option::Option::is_none")]
871    pub secondary_boot_disk_update_strategy:
872        std::option::Option<crate::model::SecondaryBootDiskUpdateStrategy>,
873
874    /// Specifies which method should be used for encrypting the
875    /// Local SSDs attahced to the node.
876    #[serde(skip_serializing_if = "std::option::Option::is_none")]
877    pub local_ssd_encryption_mode:
878        std::option::Option<crate::model::node_config::LocalSsdEncryptionMode>,
879
880    /// Output only. effective_cgroup_mode is the cgroup mode actually used by the
881    /// node pool. It is determined by the cgroup mode specified in the
882    /// LinuxNodeConfig or the default cgroup mode based on the cluster creation
883    /// version.
884    pub effective_cgroup_mode: crate::model::node_config::EffectiveCgroupMode,
885
886    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
887    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
888}
889
890impl NodeConfig {
891    pub fn new() -> Self {
892        std::default::Default::default()
893    }
894
895    /// Sets the value of [machine_type][crate::model::NodeConfig::machine_type].
896    pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
897        self.machine_type = v.into();
898        self
899    }
900
901    /// Sets the value of [disk_size_gb][crate::model::NodeConfig::disk_size_gb].
902    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
903        self.disk_size_gb = v.into();
904        self
905    }
906
907    /// Sets the value of [oauth_scopes][crate::model::NodeConfig::oauth_scopes].
908    pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
909    where
910        T: std::iter::IntoIterator<Item = V>,
911        V: std::convert::Into<std::string::String>,
912    {
913        use std::iter::Iterator;
914        self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
915        self
916    }
917
918    /// Sets the value of [service_account][crate::model::NodeConfig::service_account].
919    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
920        self.service_account = v.into();
921        self
922    }
923
924    /// Sets the value of [metadata][crate::model::NodeConfig::metadata].
925    pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
926    where
927        T: std::iter::IntoIterator<Item = (K, V)>,
928        K: std::convert::Into<std::string::String>,
929        V: std::convert::Into<std::string::String>,
930    {
931        use std::iter::Iterator;
932        self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
933        self
934    }
935
936    /// Sets the value of [image_type][crate::model::NodeConfig::image_type].
937    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
938        self.image_type = v.into();
939        self
940    }
941
942    /// Sets the value of [labels][crate::model::NodeConfig::labels].
943    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
944    where
945        T: std::iter::IntoIterator<Item = (K, V)>,
946        K: std::convert::Into<std::string::String>,
947        V: std::convert::Into<std::string::String>,
948    {
949        use std::iter::Iterator;
950        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
951        self
952    }
953
954    /// Sets the value of [local_ssd_count][crate::model::NodeConfig::local_ssd_count].
955    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
956        self.local_ssd_count = v.into();
957        self
958    }
959
960    /// Sets the value of [tags][crate::model::NodeConfig::tags].
961    pub fn set_tags<T, V>(mut self, v: T) -> Self
962    where
963        T: std::iter::IntoIterator<Item = V>,
964        V: std::convert::Into<std::string::String>,
965    {
966        use std::iter::Iterator;
967        self.tags = v.into_iter().map(|i| i.into()).collect();
968        self
969    }
970
971    /// Sets the value of [preemptible][crate::model::NodeConfig::preemptible].
972    pub fn set_preemptible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
973        self.preemptible = v.into();
974        self
975    }
976
977    /// Sets the value of [accelerators][crate::model::NodeConfig::accelerators].
978    pub fn set_accelerators<T, V>(mut self, v: T) -> Self
979    where
980        T: std::iter::IntoIterator<Item = V>,
981        V: std::convert::Into<crate::model::AcceleratorConfig>,
982    {
983        use std::iter::Iterator;
984        self.accelerators = v.into_iter().map(|i| i.into()).collect();
985        self
986    }
987
988    /// Sets the value of [disk_type][crate::model::NodeConfig::disk_type].
989    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
990        self.disk_type = v.into();
991        self
992    }
993
994    /// Sets the value of [min_cpu_platform][crate::model::NodeConfig::min_cpu_platform].
995    pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
996        mut self,
997        v: T,
998    ) -> Self {
999        self.min_cpu_platform = v.into();
1000        self
1001    }
1002
1003    /// Sets the value of [workload_metadata_config][crate::model::NodeConfig::workload_metadata_config].
1004    pub fn set_workload_metadata_config<
1005        T: std::convert::Into<std::option::Option<crate::model::WorkloadMetadataConfig>>,
1006    >(
1007        mut self,
1008        v: T,
1009    ) -> Self {
1010        self.workload_metadata_config = v.into();
1011        self
1012    }
1013
1014    /// Sets the value of [taints][crate::model::NodeConfig::taints].
1015    pub fn set_taints<T, V>(mut self, v: T) -> Self
1016    where
1017        T: std::iter::IntoIterator<Item = V>,
1018        V: std::convert::Into<crate::model::NodeTaint>,
1019    {
1020        use std::iter::Iterator;
1021        self.taints = v.into_iter().map(|i| i.into()).collect();
1022        self
1023    }
1024
1025    /// Sets the value of [sandbox_config][crate::model::NodeConfig::sandbox_config].
1026    pub fn set_sandbox_config<
1027        T: std::convert::Into<std::option::Option<crate::model::SandboxConfig>>,
1028    >(
1029        mut self,
1030        v: T,
1031    ) -> Self {
1032        self.sandbox_config = v.into();
1033        self
1034    }
1035
1036    /// Sets the value of [node_group][crate::model::NodeConfig::node_group].
1037    pub fn set_node_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1038        self.node_group = v.into();
1039        self
1040    }
1041
1042    /// Sets the value of [reservation_affinity][crate::model::NodeConfig::reservation_affinity].
1043    pub fn set_reservation_affinity<
1044        T: std::convert::Into<std::option::Option<crate::model::ReservationAffinity>>,
1045    >(
1046        mut self,
1047        v: T,
1048    ) -> Self {
1049        self.reservation_affinity = v.into();
1050        self
1051    }
1052
1053    /// Sets the value of [shielded_instance_config][crate::model::NodeConfig::shielded_instance_config].
1054    pub fn set_shielded_instance_config<
1055        T: std::convert::Into<std::option::Option<crate::model::ShieldedInstanceConfig>>,
1056    >(
1057        mut self,
1058        v: T,
1059    ) -> Self {
1060        self.shielded_instance_config = v.into();
1061        self
1062    }
1063
1064    /// Sets the value of [linux_node_config][crate::model::NodeConfig::linux_node_config].
1065    pub fn set_linux_node_config<
1066        T: std::convert::Into<std::option::Option<crate::model::LinuxNodeConfig>>,
1067    >(
1068        mut self,
1069        v: T,
1070    ) -> Self {
1071        self.linux_node_config = v.into();
1072        self
1073    }
1074
1075    /// Sets the value of [kubelet_config][crate::model::NodeConfig::kubelet_config].
1076    pub fn set_kubelet_config<
1077        T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
1078    >(
1079        mut self,
1080        v: T,
1081    ) -> Self {
1082        self.kubelet_config = v.into();
1083        self
1084    }
1085
1086    /// Sets the value of [boot_disk_kms_key][crate::model::NodeConfig::boot_disk_kms_key].
1087    pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
1088        mut self,
1089        v: T,
1090    ) -> Self {
1091        self.boot_disk_kms_key = v.into();
1092        self
1093    }
1094
1095    /// Sets the value of [gcfs_config][crate::model::NodeConfig::gcfs_config].
1096    pub fn set_gcfs_config<T: std::convert::Into<std::option::Option<crate::model::GcfsConfig>>>(
1097        mut self,
1098        v: T,
1099    ) -> Self {
1100        self.gcfs_config = v.into();
1101        self
1102    }
1103
1104    /// Sets the value of [advanced_machine_features][crate::model::NodeConfig::advanced_machine_features].
1105    pub fn set_advanced_machine_features<
1106        T: std::convert::Into<std::option::Option<crate::model::AdvancedMachineFeatures>>,
1107    >(
1108        mut self,
1109        v: T,
1110    ) -> Self {
1111        self.advanced_machine_features = v.into();
1112        self
1113    }
1114
1115    /// Sets the value of [gvnic][crate::model::NodeConfig::gvnic].
1116    pub fn set_gvnic<T: std::convert::Into<std::option::Option<crate::model::VirtualNIC>>>(
1117        mut self,
1118        v: T,
1119    ) -> Self {
1120        self.gvnic = v.into();
1121        self
1122    }
1123
1124    /// Sets the value of [spot][crate::model::NodeConfig::spot].
1125    pub fn set_spot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1126        self.spot = v.into();
1127        self
1128    }
1129
1130    /// Sets the value of [confidential_nodes][crate::model::NodeConfig::confidential_nodes].
1131    pub fn set_confidential_nodes<
1132        T: std::convert::Into<std::option::Option<crate::model::ConfidentialNodes>>,
1133    >(
1134        mut self,
1135        v: T,
1136    ) -> Self {
1137        self.confidential_nodes = v.into();
1138        self
1139    }
1140
1141    /// Sets the value of [fast_socket][crate::model::NodeConfig::fast_socket].
1142    pub fn set_fast_socket<T: std::convert::Into<std::option::Option<crate::model::FastSocket>>>(
1143        mut self,
1144        v: T,
1145    ) -> Self {
1146        self.fast_socket = v.into();
1147        self
1148    }
1149
1150    /// Sets the value of [resource_labels][crate::model::NodeConfig::resource_labels].
1151    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
1152    where
1153        T: std::iter::IntoIterator<Item = (K, V)>,
1154        K: std::convert::Into<std::string::String>,
1155        V: std::convert::Into<std::string::String>,
1156    {
1157        use std::iter::Iterator;
1158        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1159        self
1160    }
1161
1162    /// Sets the value of [logging_config][crate::model::NodeConfig::logging_config].
1163    pub fn set_logging_config<
1164        T: std::convert::Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
1165    >(
1166        mut self,
1167        v: T,
1168    ) -> Self {
1169        self.logging_config = v.into();
1170        self
1171    }
1172
1173    /// Sets the value of [windows_node_config][crate::model::NodeConfig::windows_node_config].
1174    pub fn set_windows_node_config<
1175        T: std::convert::Into<std::option::Option<crate::model::WindowsNodeConfig>>,
1176    >(
1177        mut self,
1178        v: T,
1179    ) -> Self {
1180        self.windows_node_config = v.into();
1181        self
1182    }
1183
1184    /// Sets the value of [local_nvme_ssd_block_config][crate::model::NodeConfig::local_nvme_ssd_block_config].
1185    pub fn set_local_nvme_ssd_block_config<
1186        T: std::convert::Into<std::option::Option<crate::model::LocalNvmeSsdBlockConfig>>,
1187    >(
1188        mut self,
1189        v: T,
1190    ) -> Self {
1191        self.local_nvme_ssd_block_config = v.into();
1192        self
1193    }
1194
1195    /// Sets the value of [ephemeral_storage_local_ssd_config][crate::model::NodeConfig::ephemeral_storage_local_ssd_config].
1196    pub fn set_ephemeral_storage_local_ssd_config<
1197        T: std::convert::Into<std::option::Option<crate::model::EphemeralStorageLocalSsdConfig>>,
1198    >(
1199        mut self,
1200        v: T,
1201    ) -> Self {
1202        self.ephemeral_storage_local_ssd_config = v.into();
1203        self
1204    }
1205
1206    /// Sets the value of [sole_tenant_config][crate::model::NodeConfig::sole_tenant_config].
1207    pub fn set_sole_tenant_config<
1208        T: std::convert::Into<std::option::Option<crate::model::SoleTenantConfig>>,
1209    >(
1210        mut self,
1211        v: T,
1212    ) -> Self {
1213        self.sole_tenant_config = v.into();
1214        self
1215    }
1216
1217    /// Sets the value of [containerd_config][crate::model::NodeConfig::containerd_config].
1218    pub fn set_containerd_config<
1219        T: std::convert::Into<std::option::Option<crate::model::ContainerdConfig>>,
1220    >(
1221        mut self,
1222        v: T,
1223    ) -> Self {
1224        self.containerd_config = v.into();
1225        self
1226    }
1227
1228    /// Sets the value of [resource_manager_tags][crate::model::NodeConfig::resource_manager_tags].
1229    pub fn set_resource_manager_tags<
1230        T: std::convert::Into<std::option::Option<crate::model::ResourceManagerTags>>,
1231    >(
1232        mut self,
1233        v: T,
1234    ) -> Self {
1235        self.resource_manager_tags = v.into();
1236        self
1237    }
1238
1239    /// Sets the value of [enable_confidential_storage][crate::model::NodeConfig::enable_confidential_storage].
1240    pub fn set_enable_confidential_storage<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1241        self.enable_confidential_storage = v.into();
1242        self
1243    }
1244
1245    /// Sets the value of [secondary_boot_disks][crate::model::NodeConfig::secondary_boot_disks].
1246    pub fn set_secondary_boot_disks<T, V>(mut self, v: T) -> Self
1247    where
1248        T: std::iter::IntoIterator<Item = V>,
1249        V: std::convert::Into<crate::model::SecondaryBootDisk>,
1250    {
1251        use std::iter::Iterator;
1252        self.secondary_boot_disks = v.into_iter().map(|i| i.into()).collect();
1253        self
1254    }
1255
1256    /// Sets the value of [storage_pools][crate::model::NodeConfig::storage_pools].
1257    pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
1258    where
1259        T: std::iter::IntoIterator<Item = V>,
1260        V: std::convert::Into<std::string::String>,
1261    {
1262        use std::iter::Iterator;
1263        self.storage_pools = v.into_iter().map(|i| i.into()).collect();
1264        self
1265    }
1266
1267    /// Sets the value of [secondary_boot_disk_update_strategy][crate::model::NodeConfig::secondary_boot_disk_update_strategy].
1268    pub fn set_secondary_boot_disk_update_strategy<
1269        T: std::convert::Into<std::option::Option<crate::model::SecondaryBootDiskUpdateStrategy>>,
1270    >(
1271        mut self,
1272        v: T,
1273    ) -> Self {
1274        self.secondary_boot_disk_update_strategy = v.into();
1275        self
1276    }
1277
1278    /// Sets the value of [local_ssd_encryption_mode][crate::model::NodeConfig::local_ssd_encryption_mode].
1279    pub fn set_local_ssd_encryption_mode<
1280        T: std::convert::Into<std::option::Option<crate::model::node_config::LocalSsdEncryptionMode>>,
1281    >(
1282        mut self,
1283        v: T,
1284    ) -> Self {
1285        self.local_ssd_encryption_mode = v.into();
1286        self
1287    }
1288
1289    /// Sets the value of [effective_cgroup_mode][crate::model::NodeConfig::effective_cgroup_mode].
1290    pub fn set_effective_cgroup_mode<
1291        T: std::convert::Into<crate::model::node_config::EffectiveCgroupMode>,
1292    >(
1293        mut self,
1294        v: T,
1295    ) -> Self {
1296        self.effective_cgroup_mode = v.into();
1297        self
1298    }
1299}
1300
1301impl wkt::message::Message for NodeConfig {
1302    fn typename() -> &'static str {
1303        "type.googleapis.com/google.container.v1.NodeConfig"
1304    }
1305}
1306
1307/// Defines additional types related to [NodeConfig].
1308pub mod node_config {
1309    #[allow(unused_imports)]
1310    use super::*;
1311
1312    /// LocalSsdEncryptionMode specifies the method used for encrypting the Local
1313    /// SSDs attached to the node.
1314    ///
1315    /// # Working with unknown values
1316    ///
1317    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1318    /// additional enum variants at any time. Adding new variants is not considered
1319    /// a breaking change. Applications should write their code in anticipation of:
1320    ///
1321    /// - New values appearing in future releases of the client library, **and**
1322    /// - New values received dynamically, without application changes.
1323    ///
1324    /// Please consult the [Working with enums] section in the user guide for some
1325    /// guidelines.
1326    ///
1327    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1328    #[derive(Clone, Debug, PartialEq)]
1329    #[non_exhaustive]
1330    pub enum LocalSsdEncryptionMode {
1331        /// The given node will be encrypted using keys managed by Google
1332        /// infrastructure and the keys will be deleted when the node is
1333        /// deleted.
1334        Unspecified,
1335        /// The given node will be encrypted using keys managed by Google
1336        /// infrastructure and the keys will be deleted when the node is
1337        /// deleted.
1338        StandardEncryption,
1339        /// The given node will opt-in for using ephemeral key for
1340        /// encryption of Local SSDs.
1341        /// The Local SSDs will not be able to recover data in case of node
1342        /// crash.
1343        EphemeralKeyEncryption,
1344        /// If set, the enum was initialized with an unknown value.
1345        ///
1346        /// Applications can examine the value using [LocalSsdEncryptionMode::value] or
1347        /// [LocalSsdEncryptionMode::name].
1348        UnknownValue(local_ssd_encryption_mode::UnknownValue),
1349    }
1350
1351    #[doc(hidden)]
1352    pub mod local_ssd_encryption_mode {
1353        #[allow(unused_imports)]
1354        use super::*;
1355        #[derive(Clone, Debug, PartialEq)]
1356        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1357    }
1358
1359    impl LocalSsdEncryptionMode {
1360        /// Gets the enum value.
1361        ///
1362        /// Returns `None` if the enum contains an unknown value deserialized from
1363        /// the string representation of enums.
1364        pub fn value(&self) -> std::option::Option<i32> {
1365            match self {
1366                Self::Unspecified => std::option::Option::Some(0),
1367                Self::StandardEncryption => std::option::Option::Some(1),
1368                Self::EphemeralKeyEncryption => std::option::Option::Some(2),
1369                Self::UnknownValue(u) => u.0.value(),
1370            }
1371        }
1372
1373        /// Gets the enum value as a string.
1374        ///
1375        /// Returns `None` if the enum contains an unknown value deserialized from
1376        /// the integer representation of enums.
1377        pub fn name(&self) -> std::option::Option<&str> {
1378            match self {
1379                Self::Unspecified => {
1380                    std::option::Option::Some("LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED")
1381                }
1382                Self::StandardEncryption => std::option::Option::Some("STANDARD_ENCRYPTION"),
1383                Self::EphemeralKeyEncryption => {
1384                    std::option::Option::Some("EPHEMERAL_KEY_ENCRYPTION")
1385                }
1386                Self::UnknownValue(u) => u.0.name(),
1387            }
1388        }
1389    }
1390
1391    impl std::default::Default for LocalSsdEncryptionMode {
1392        fn default() -> Self {
1393            use std::convert::From;
1394            Self::from(0)
1395        }
1396    }
1397
1398    impl std::fmt::Display for LocalSsdEncryptionMode {
1399        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1400            wkt::internal::display_enum(f, self.name(), self.value())
1401        }
1402    }
1403
1404    impl std::convert::From<i32> for LocalSsdEncryptionMode {
1405        fn from(value: i32) -> Self {
1406            match value {
1407                0 => Self::Unspecified,
1408                1 => Self::StandardEncryption,
1409                2 => Self::EphemeralKeyEncryption,
1410                _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
1411                    wkt::internal::UnknownEnumValue::Integer(value),
1412                )),
1413            }
1414        }
1415    }
1416
1417    impl std::convert::From<&str> for LocalSsdEncryptionMode {
1418        fn from(value: &str) -> Self {
1419            use std::string::ToString;
1420            match value {
1421                "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED" => Self::Unspecified,
1422                "STANDARD_ENCRYPTION" => Self::StandardEncryption,
1423                "EPHEMERAL_KEY_ENCRYPTION" => Self::EphemeralKeyEncryption,
1424                _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
1425                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1426                )),
1427            }
1428        }
1429    }
1430
1431    impl serde::ser::Serialize for LocalSsdEncryptionMode {
1432        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1433        where
1434            S: serde::Serializer,
1435        {
1436            match self {
1437                Self::Unspecified => serializer.serialize_i32(0),
1438                Self::StandardEncryption => serializer.serialize_i32(1),
1439                Self::EphemeralKeyEncryption => serializer.serialize_i32(2),
1440                Self::UnknownValue(u) => u.0.serialize(serializer),
1441            }
1442        }
1443    }
1444
1445    impl<'de> serde::de::Deserialize<'de> for LocalSsdEncryptionMode {
1446        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1447        where
1448            D: serde::Deserializer<'de>,
1449        {
1450            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocalSsdEncryptionMode>::new(
1451                ".google.container.v1.NodeConfig.LocalSsdEncryptionMode",
1452            ))
1453        }
1454    }
1455
1456    /// Possible effective cgroup modes for the node.
1457    ///
1458    /// # Working with unknown values
1459    ///
1460    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1461    /// additional enum variants at any time. Adding new variants is not considered
1462    /// a breaking change. Applications should write their code in anticipation of:
1463    ///
1464    /// - New values appearing in future releases of the client library, **and**
1465    /// - New values received dynamically, without application changes.
1466    ///
1467    /// Please consult the [Working with enums] section in the user guide for some
1468    /// guidelines.
1469    ///
1470    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1471    #[derive(Clone, Debug, PartialEq)]
1472    #[non_exhaustive]
1473    pub enum EffectiveCgroupMode {
1474        /// EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the
1475        /// node pool is unspecified, i.e. the node pool is a Windows node pool.
1476        Unspecified,
1477        /// CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the
1478        /// cgroup configuration.
1479        V1,
1480        /// CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the
1481        /// cgroup configuration.
1482        V2,
1483        /// If set, the enum was initialized with an unknown value.
1484        ///
1485        /// Applications can examine the value using [EffectiveCgroupMode::value] or
1486        /// [EffectiveCgroupMode::name].
1487        UnknownValue(effective_cgroup_mode::UnknownValue),
1488    }
1489
1490    #[doc(hidden)]
1491    pub mod effective_cgroup_mode {
1492        #[allow(unused_imports)]
1493        use super::*;
1494        #[derive(Clone, Debug, PartialEq)]
1495        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1496    }
1497
1498    impl EffectiveCgroupMode {
1499        /// Gets the enum value.
1500        ///
1501        /// Returns `None` if the enum contains an unknown value deserialized from
1502        /// the string representation of enums.
1503        pub fn value(&self) -> std::option::Option<i32> {
1504            match self {
1505                Self::Unspecified => std::option::Option::Some(0),
1506                Self::V1 => std::option::Option::Some(1),
1507                Self::V2 => std::option::Option::Some(2),
1508                Self::UnknownValue(u) => u.0.value(),
1509            }
1510        }
1511
1512        /// Gets the enum value as a string.
1513        ///
1514        /// Returns `None` if the enum contains an unknown value deserialized from
1515        /// the integer representation of enums.
1516        pub fn name(&self) -> std::option::Option<&str> {
1517            match self {
1518                Self::Unspecified => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_UNSPECIFIED"),
1519                Self::V1 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V1"),
1520                Self::V2 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V2"),
1521                Self::UnknownValue(u) => u.0.name(),
1522            }
1523        }
1524    }
1525
1526    impl std::default::Default for EffectiveCgroupMode {
1527        fn default() -> Self {
1528            use std::convert::From;
1529            Self::from(0)
1530        }
1531    }
1532
1533    impl std::fmt::Display for EffectiveCgroupMode {
1534        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1535            wkt::internal::display_enum(f, self.name(), self.value())
1536        }
1537    }
1538
1539    impl std::convert::From<i32> for EffectiveCgroupMode {
1540        fn from(value: i32) -> Self {
1541            match value {
1542                0 => Self::Unspecified,
1543                1 => Self::V1,
1544                2 => Self::V2,
1545                _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
1546                    wkt::internal::UnknownEnumValue::Integer(value),
1547                )),
1548            }
1549        }
1550    }
1551
1552    impl std::convert::From<&str> for EffectiveCgroupMode {
1553        fn from(value: &str) -> Self {
1554            use std::string::ToString;
1555            match value {
1556                "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
1557                "EFFECTIVE_CGROUP_MODE_V1" => Self::V1,
1558                "EFFECTIVE_CGROUP_MODE_V2" => Self::V2,
1559                _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
1560                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1561                )),
1562            }
1563        }
1564    }
1565
1566    impl serde::ser::Serialize for EffectiveCgroupMode {
1567        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1568        where
1569            S: serde::Serializer,
1570        {
1571            match self {
1572                Self::Unspecified => serializer.serialize_i32(0),
1573                Self::V1 => serializer.serialize_i32(1),
1574                Self::V2 => serializer.serialize_i32(2),
1575                Self::UnknownValue(u) => u.0.serialize(serializer),
1576            }
1577        }
1578    }
1579
1580    impl<'de> serde::de::Deserialize<'de> for EffectiveCgroupMode {
1581        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1582        where
1583            D: serde::Deserializer<'de>,
1584        {
1585            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EffectiveCgroupMode>::new(
1586                ".google.container.v1.NodeConfig.EffectiveCgroupMode",
1587            ))
1588        }
1589    }
1590}
1591
1592/// Specifies options for controlling advanced machine features.
1593#[serde_with::serde_as]
1594#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1595#[serde(default, rename_all = "camelCase")]
1596#[non_exhaustive]
1597pub struct AdvancedMachineFeatures {
1598    /// The number of threads per physical core. To disable simultaneous
1599    /// multithreading (SMT) set this to 1. If unset, the maximum number of threads
1600    /// supported per core by the underlying processor is assumed.
1601    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1602    #[serde_as(as = "std::option::Option<serde_with::DisplayFromStr>")]
1603    pub threads_per_core: std::option::Option<i64>,
1604
1605    /// Whether or not to enable nested virtualization (defaults to false).
1606    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1607    pub enable_nested_virtualization: std::option::Option<bool>,
1608
1609    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1610    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1611}
1612
1613impl AdvancedMachineFeatures {
1614    pub fn new() -> Self {
1615        std::default::Default::default()
1616    }
1617
1618    /// Sets the value of [threads_per_core][crate::model::AdvancedMachineFeatures::threads_per_core].
1619    pub fn set_threads_per_core<T: std::convert::Into<std::option::Option<i64>>>(
1620        mut self,
1621        v: T,
1622    ) -> Self {
1623        self.threads_per_core = v.into();
1624        self
1625    }
1626
1627    /// Sets the value of [enable_nested_virtualization][crate::model::AdvancedMachineFeatures::enable_nested_virtualization].
1628    pub fn set_enable_nested_virtualization<T: std::convert::Into<std::option::Option<bool>>>(
1629        mut self,
1630        v: T,
1631    ) -> Self {
1632        self.enable_nested_virtualization = v.into();
1633        self
1634    }
1635}
1636
1637impl wkt::message::Message for AdvancedMachineFeatures {
1638    fn typename() -> &'static str {
1639        "type.googleapis.com/google.container.v1.AdvancedMachineFeatures"
1640    }
1641}
1642
1643/// Parameters for node pool-level network config.
1644#[serde_with::serde_as]
1645#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1646#[serde(default, rename_all = "camelCase")]
1647#[non_exhaustive]
1648pub struct NodeNetworkConfig {
1649    /// Input only. Whether to create a new range for pod IPs in this node pool.
1650    /// Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they
1651    /// are not specified.
1652    ///
1653    /// If neither `create_pod_range` or `pod_range` are specified, the
1654    /// cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is
1655    /// used.
1656    ///
1657    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
1658    ///
1659    /// This field cannot be changed after the node pool has been created.
1660    #[serde(skip_serializing_if = "wkt::internal::is_default")]
1661    pub create_pod_range: bool,
1662
1663    /// The ID of the secondary range for pod IPs.
1664    /// If `create_pod_range` is true, this ID is used for the new range.
1665    /// If `create_pod_range` is false, uses an existing secondary range with this
1666    /// ID.
1667    ///
1668    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
1669    ///
1670    /// This field cannot be changed after the node pool has been created.
1671    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1672    pub pod_range: std::string::String,
1673
1674    /// The IP address range for pod IPs in this node pool.
1675    ///
1676    /// Only applicable if `create_pod_range` is true.
1677    ///
1678    /// Set to blank to have a range chosen with the default size.
1679    ///
1680    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
1681    /// netmask.
1682    ///
1683    /// Set to a
1684    /// [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
1685    /// notation (e.g. `10.96.0.0/14`) to pick a specific range to use.
1686    ///
1687    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
1688    ///
1689    /// This field cannot be changed after the node pool has been created.
1690    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1691    pub pod_ipv4_cidr_block: std::string::String,
1692
1693    /// Whether nodes have internal IP addresses only.
1694    /// If enable_private_nodes is not specified, then the value is derived from
1695    /// [Cluster.NetworkConfig.default_enable_private_nodes][]
1696    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1697    pub enable_private_nodes: std::option::Option<bool>,
1698
1699    /// Network bandwidth tier configuration.
1700    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1701    pub network_performance_config:
1702        std::option::Option<crate::model::node_network_config::NetworkPerformanceConfig>,
1703
1704    /// [PRIVATE FIELD]
1705    /// Pod CIDR size overprovisioning config for the nodepool.
1706    ///
1707    /// Pod CIDR size per node depends on max_pods_per_node. By default, the value
1708    /// of max_pods_per_node is rounded off to next power of 2 and we then double
1709    /// that to get the size of pod CIDR block per node.
1710    /// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
1711    ///
1712    /// This config can disable the doubling of IPs (we still round off to next
1713    /// power of 2)
1714    /// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
1715    /// overprovisioning is disabled.
1716    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1717    pub pod_cidr_overprovision_config:
1718        std::option::Option<crate::model::PodCIDROverprovisionConfig>,
1719
1720    /// We specify the additional node networks for this node pool using this list.
1721    /// Each node network corresponds to an additional interface
1722    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1723    pub additional_node_network_configs: std::vec::Vec<crate::model::AdditionalNodeNetworkConfig>,
1724
1725    /// We specify the additional pod networks for this node pool using this list.
1726    /// Each pod network corresponds to an additional alias IP range for the node
1727    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1728    pub additional_pod_network_configs: std::vec::Vec<crate::model::AdditionalPodNetworkConfig>,
1729
1730    /// Output only. The utilization of the IPv4 range for the pod.
1731    /// The ratio is Usage/[Total number of IPs in the secondary range],
1732    /// Usage=numNodes*numZones*podIPsPerNode.
1733    #[serde(skip_serializing_if = "wkt::internal::is_default")]
1734    #[serde_as(as = "wkt::internal::F64")]
1735    pub pod_ipv4_range_utilization: f64,
1736
1737    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1738    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1739}
1740
1741impl NodeNetworkConfig {
1742    pub fn new() -> Self {
1743        std::default::Default::default()
1744    }
1745
1746    /// Sets the value of [create_pod_range][crate::model::NodeNetworkConfig::create_pod_range].
1747    pub fn set_create_pod_range<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1748        self.create_pod_range = v.into();
1749        self
1750    }
1751
1752    /// Sets the value of [pod_range][crate::model::NodeNetworkConfig::pod_range].
1753    pub fn set_pod_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1754        self.pod_range = v.into();
1755        self
1756    }
1757
1758    /// Sets the value of [pod_ipv4_cidr_block][crate::model::NodeNetworkConfig::pod_ipv4_cidr_block].
1759    pub fn set_pod_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
1760        mut self,
1761        v: T,
1762    ) -> Self {
1763        self.pod_ipv4_cidr_block = v.into();
1764        self
1765    }
1766
1767    /// Sets the value of [enable_private_nodes][crate::model::NodeNetworkConfig::enable_private_nodes].
1768    pub fn set_enable_private_nodes<T: std::convert::Into<std::option::Option<bool>>>(
1769        mut self,
1770        v: T,
1771    ) -> Self {
1772        self.enable_private_nodes = v.into();
1773        self
1774    }
1775
1776    /// Sets the value of [network_performance_config][crate::model::NodeNetworkConfig::network_performance_config].
1777    pub fn set_network_performance_config<
1778        T: std::convert::Into<
1779                std::option::Option<crate::model::node_network_config::NetworkPerformanceConfig>,
1780            >,
1781    >(
1782        mut self,
1783        v: T,
1784    ) -> Self {
1785        self.network_performance_config = v.into();
1786        self
1787    }
1788
1789    /// Sets the value of [pod_cidr_overprovision_config][crate::model::NodeNetworkConfig::pod_cidr_overprovision_config].
1790    pub fn set_pod_cidr_overprovision_config<
1791        T: std::convert::Into<std::option::Option<crate::model::PodCIDROverprovisionConfig>>,
1792    >(
1793        mut self,
1794        v: T,
1795    ) -> Self {
1796        self.pod_cidr_overprovision_config = v.into();
1797        self
1798    }
1799
1800    /// Sets the value of [additional_node_network_configs][crate::model::NodeNetworkConfig::additional_node_network_configs].
1801    pub fn set_additional_node_network_configs<T, V>(mut self, v: T) -> Self
1802    where
1803        T: std::iter::IntoIterator<Item = V>,
1804        V: std::convert::Into<crate::model::AdditionalNodeNetworkConfig>,
1805    {
1806        use std::iter::Iterator;
1807        self.additional_node_network_configs = v.into_iter().map(|i| i.into()).collect();
1808        self
1809    }
1810
1811    /// Sets the value of [additional_pod_network_configs][crate::model::NodeNetworkConfig::additional_pod_network_configs].
1812    pub fn set_additional_pod_network_configs<T, V>(mut self, v: T) -> Self
1813    where
1814        T: std::iter::IntoIterator<Item = V>,
1815        V: std::convert::Into<crate::model::AdditionalPodNetworkConfig>,
1816    {
1817        use std::iter::Iterator;
1818        self.additional_pod_network_configs = v.into_iter().map(|i| i.into()).collect();
1819        self
1820    }
1821
1822    /// Sets the value of [pod_ipv4_range_utilization][crate::model::NodeNetworkConfig::pod_ipv4_range_utilization].
1823    pub fn set_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
1824        self.pod_ipv4_range_utilization = v.into();
1825        self
1826    }
1827}
1828
1829impl wkt::message::Message for NodeNetworkConfig {
1830    fn typename() -> &'static str {
1831        "type.googleapis.com/google.container.v1.NodeNetworkConfig"
1832    }
1833}
1834
1835/// Defines additional types related to [NodeNetworkConfig].
1836pub mod node_network_config {
1837    #[allow(unused_imports)]
1838    use super::*;
1839
1840    /// Configuration of all network bandwidth tiers
1841    #[serde_with::serde_as]
1842    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1843    #[serde(default, rename_all = "camelCase")]
1844    #[non_exhaustive]
1845    pub struct NetworkPerformanceConfig {
1846        /// Specifies the total network bandwidth tier for the NodePool.
1847        #[serde(skip_serializing_if = "std::option::Option::is_none")]
1848        pub total_egress_bandwidth_tier: std::option::Option<
1849            crate::model::node_network_config::network_performance_config::Tier,
1850        >,
1851
1852        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1853        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1854    }
1855
1856    impl NetworkPerformanceConfig {
1857        pub fn new() -> Self {
1858            std::default::Default::default()
1859        }
1860
1861        /// Sets the value of [total_egress_bandwidth_tier][crate::model::node_network_config::NetworkPerformanceConfig::total_egress_bandwidth_tier].
1862        pub fn set_total_egress_bandwidth_tier<
1863            T: std::convert::Into<
1864                    std::option::Option<
1865                        crate::model::node_network_config::network_performance_config::Tier,
1866                    >,
1867                >,
1868        >(
1869            mut self,
1870            v: T,
1871        ) -> Self {
1872            self.total_egress_bandwidth_tier = v.into();
1873            self
1874        }
1875    }
1876
1877    impl wkt::message::Message for NetworkPerformanceConfig {
1878        fn typename() -> &'static str {
1879            "type.googleapis.com/google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig"
1880        }
1881    }
1882
1883    /// Defines additional types related to [NetworkPerformanceConfig].
1884    pub mod network_performance_config {
1885        #[allow(unused_imports)]
1886        use super::*;
1887
1888        /// Node network tier
1889        ///
1890        /// # Working with unknown values
1891        ///
1892        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1893        /// additional enum variants at any time. Adding new variants is not considered
1894        /// a breaking change. Applications should write their code in anticipation of:
1895        ///
1896        /// - New values appearing in future releases of the client library, **and**
1897        /// - New values received dynamically, without application changes.
1898        ///
1899        /// Please consult the [Working with enums] section in the user guide for some
1900        /// guidelines.
1901        ///
1902        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1903        #[derive(Clone, Debug, PartialEq)]
1904        #[non_exhaustive]
1905        pub enum Tier {
1906            /// Default value
1907            Unspecified,
1908            /// Higher bandwidth, actual values based on VM size.
1909            _1,
1910            /// If set, the enum was initialized with an unknown value.
1911            ///
1912            /// Applications can examine the value using [Tier::value] or
1913            /// [Tier::name].
1914            UnknownValue(tier::UnknownValue),
1915        }
1916
1917        #[doc(hidden)]
1918        pub mod tier {
1919            #[allow(unused_imports)]
1920            use super::*;
1921            #[derive(Clone, Debug, PartialEq)]
1922            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1923        }
1924
1925        impl Tier {
1926            /// Gets the enum value.
1927            ///
1928            /// Returns `None` if the enum contains an unknown value deserialized from
1929            /// the string representation of enums.
1930            pub fn value(&self) -> std::option::Option<i32> {
1931                match self {
1932                    Self::Unspecified => std::option::Option::Some(0),
1933                    Self::_1 => std::option::Option::Some(1),
1934                    Self::UnknownValue(u) => u.0.value(),
1935                }
1936            }
1937
1938            /// Gets the enum value as a string.
1939            ///
1940            /// Returns `None` if the enum contains an unknown value deserialized from
1941            /// the integer representation of enums.
1942            pub fn name(&self) -> std::option::Option<&str> {
1943                match self {
1944                    Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
1945                    Self::_1 => std::option::Option::Some("TIER_1"),
1946                    Self::UnknownValue(u) => u.0.name(),
1947                }
1948            }
1949        }
1950
1951        impl std::default::Default for Tier {
1952            fn default() -> Self {
1953                use std::convert::From;
1954                Self::from(0)
1955            }
1956        }
1957
1958        impl std::fmt::Display for Tier {
1959            fn fmt(
1960                &self,
1961                f: &mut std::fmt::Formatter<'_>,
1962            ) -> std::result::Result<(), std::fmt::Error> {
1963                wkt::internal::display_enum(f, self.name(), self.value())
1964            }
1965        }
1966
1967        impl std::convert::From<i32> for Tier {
1968            fn from(value: i32) -> Self {
1969                match value {
1970                    0 => Self::Unspecified,
1971                    1 => Self::_1,
1972                    _ => Self::UnknownValue(tier::UnknownValue(
1973                        wkt::internal::UnknownEnumValue::Integer(value),
1974                    )),
1975                }
1976            }
1977        }
1978
1979        impl std::convert::From<&str> for Tier {
1980            fn from(value: &str) -> Self {
1981                use std::string::ToString;
1982                match value {
1983                    "TIER_UNSPECIFIED" => Self::Unspecified,
1984                    "TIER_1" => Self::_1,
1985                    _ => Self::UnknownValue(tier::UnknownValue(
1986                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1987                    )),
1988                }
1989            }
1990        }
1991
1992        impl serde::ser::Serialize for Tier {
1993            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1994            where
1995                S: serde::Serializer,
1996            {
1997                match self {
1998                    Self::Unspecified => serializer.serialize_i32(0),
1999                    Self::_1 => serializer.serialize_i32(1),
2000                    Self::UnknownValue(u) => u.0.serialize(serializer),
2001                }
2002            }
2003        }
2004
2005        impl<'de> serde::de::Deserialize<'de> for Tier {
2006            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2007            where
2008                D: serde::Deserializer<'de>,
2009            {
2010                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
2011                    ".google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier",
2012                ))
2013            }
2014        }
2015    }
2016}
2017
2018/// AdditionalNodeNetworkConfig is the configuration for additional node networks
2019/// within the NodeNetworkConfig message
2020#[serde_with::serde_as]
2021#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2022#[serde(default, rename_all = "camelCase")]
2023#[non_exhaustive]
2024pub struct AdditionalNodeNetworkConfig {
2025    /// Name of the VPC where the additional interface belongs
2026    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2027    pub network: std::string::String,
2028
2029    /// Name of the subnetwork where the additional interface belongs
2030    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2031    pub subnetwork: std::string::String,
2032
2033    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2034    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2035}
2036
2037impl AdditionalNodeNetworkConfig {
2038    pub fn new() -> Self {
2039        std::default::Default::default()
2040    }
2041
2042    /// Sets the value of [network][crate::model::AdditionalNodeNetworkConfig::network].
2043    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2044        self.network = v.into();
2045        self
2046    }
2047
2048    /// Sets the value of [subnetwork][crate::model::AdditionalNodeNetworkConfig::subnetwork].
2049    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2050        self.subnetwork = v.into();
2051        self
2052    }
2053}
2054
2055impl wkt::message::Message for AdditionalNodeNetworkConfig {
2056    fn typename() -> &'static str {
2057        "type.googleapis.com/google.container.v1.AdditionalNodeNetworkConfig"
2058    }
2059}
2060
2061/// AdditionalPodNetworkConfig is the configuration for additional pod networks
2062/// within the NodeNetworkConfig message
2063#[serde_with::serde_as]
2064#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2065#[serde(default, rename_all = "camelCase")]
2066#[non_exhaustive]
2067pub struct AdditionalPodNetworkConfig {
2068    /// Name of the subnetwork where the additional pod network belongs.
2069    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2070    pub subnetwork: std::string::String,
2071
2072    /// The name of the secondary range on the subnet which provides IP address for
2073    /// this pod range.
2074    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2075    pub secondary_pod_range: std::string::String,
2076
2077    /// The maximum number of pods per node which use this pod network.
2078    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2079    pub max_pods_per_node: std::option::Option<crate::model::MaxPodsConstraint>,
2080
2081    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2082    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2083}
2084
2085impl AdditionalPodNetworkConfig {
2086    pub fn new() -> Self {
2087        std::default::Default::default()
2088    }
2089
2090    /// Sets the value of [subnetwork][crate::model::AdditionalPodNetworkConfig::subnetwork].
2091    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2092        self.subnetwork = v.into();
2093        self
2094    }
2095
2096    /// Sets the value of [secondary_pod_range][crate::model::AdditionalPodNetworkConfig::secondary_pod_range].
2097    pub fn set_secondary_pod_range<T: std::convert::Into<std::string::String>>(
2098        mut self,
2099        v: T,
2100    ) -> Self {
2101        self.secondary_pod_range = v.into();
2102        self
2103    }
2104
2105    /// Sets the value of [max_pods_per_node][crate::model::AdditionalPodNetworkConfig::max_pods_per_node].
2106    pub fn set_max_pods_per_node<
2107        T: std::convert::Into<std::option::Option<crate::model::MaxPodsConstraint>>,
2108    >(
2109        mut self,
2110        v: T,
2111    ) -> Self {
2112        self.max_pods_per_node = v.into();
2113        self
2114    }
2115}
2116
2117impl wkt::message::Message for AdditionalPodNetworkConfig {
2118    fn typename() -> &'static str {
2119        "type.googleapis.com/google.container.v1.AdditionalPodNetworkConfig"
2120    }
2121}
2122
2123/// A set of Shielded Instance options.
2124#[serde_with::serde_as]
2125#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2126#[serde(default, rename_all = "camelCase")]
2127#[non_exhaustive]
2128pub struct ShieldedInstanceConfig {
2129    /// Defines whether the instance has Secure Boot enabled.
2130    ///
2131    /// Secure Boot helps ensure that the system only runs authentic software by
2132    /// verifying the digital signature of all boot components, and halting the
2133    /// boot process if signature verification fails.
2134    #[serde(skip_serializing_if = "wkt::internal::is_default")]
2135    pub enable_secure_boot: bool,
2136
2137    /// Defines whether the instance has integrity monitoring enabled.
2138    ///
2139    /// Enables monitoring and attestation of the boot integrity of the instance.
2140    /// The attestation is performed against the integrity policy baseline. This
2141    /// baseline is initially derived from the implicitly trusted boot image when
2142    /// the instance is created.
2143    #[serde(skip_serializing_if = "wkt::internal::is_default")]
2144    pub enable_integrity_monitoring: bool,
2145
2146    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2147    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2148}
2149
2150impl ShieldedInstanceConfig {
2151    pub fn new() -> Self {
2152        std::default::Default::default()
2153    }
2154
2155    /// Sets the value of [enable_secure_boot][crate::model::ShieldedInstanceConfig::enable_secure_boot].
2156    pub fn set_enable_secure_boot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2157        self.enable_secure_boot = v.into();
2158        self
2159    }
2160
2161    /// Sets the value of [enable_integrity_monitoring][crate::model::ShieldedInstanceConfig::enable_integrity_monitoring].
2162    pub fn set_enable_integrity_monitoring<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2163        self.enable_integrity_monitoring = v.into();
2164        self
2165    }
2166}
2167
2168impl wkt::message::Message for ShieldedInstanceConfig {
2169    fn typename() -> &'static str {
2170        "type.googleapis.com/google.container.v1.ShieldedInstanceConfig"
2171    }
2172}
2173
2174/// SandboxConfig contains configurations of the sandbox to use for the node.
2175#[serde_with::serde_as]
2176#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2177#[serde(default, rename_all = "camelCase")]
2178#[non_exhaustive]
2179pub struct SandboxConfig {
2180    /// Type of the sandbox to use for the node.
2181    #[serde(rename = "type")]
2182    pub r#type: crate::model::sandbox_config::Type,
2183
2184    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2185    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2186}
2187
2188impl SandboxConfig {
2189    pub fn new() -> Self {
2190        std::default::Default::default()
2191    }
2192
2193    /// Sets the value of [r#type][crate::model::SandboxConfig::type].
2194    pub fn set_type<T: std::convert::Into<crate::model::sandbox_config::Type>>(
2195        mut self,
2196        v: T,
2197    ) -> Self {
2198        self.r#type = v.into();
2199        self
2200    }
2201}
2202
2203impl wkt::message::Message for SandboxConfig {
2204    fn typename() -> &'static str {
2205        "type.googleapis.com/google.container.v1.SandboxConfig"
2206    }
2207}
2208
2209/// Defines additional types related to [SandboxConfig].
2210pub mod sandbox_config {
2211    #[allow(unused_imports)]
2212    use super::*;
2213
2214    /// Possible types of sandboxes.
2215    ///
2216    /// # Working with unknown values
2217    ///
2218    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2219    /// additional enum variants at any time. Adding new variants is not considered
2220    /// a breaking change. Applications should write their code in anticipation of:
2221    ///
2222    /// - New values appearing in future releases of the client library, **and**
2223    /// - New values received dynamically, without application changes.
2224    ///
2225    /// Please consult the [Working with enums] section in the user guide for some
2226    /// guidelines.
2227    ///
2228    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2229    #[derive(Clone, Debug, PartialEq)]
2230    #[non_exhaustive]
2231    pub enum Type {
2232        /// Default value. This should not be used.
2233        Unspecified,
2234        /// Run sandbox using gvisor.
2235        Gvisor,
2236        /// If set, the enum was initialized with an unknown value.
2237        ///
2238        /// Applications can examine the value using [Type::value] or
2239        /// [Type::name].
2240        UnknownValue(r#type::UnknownValue),
2241    }
2242
2243    #[doc(hidden)]
2244    pub mod r#type {
2245        #[allow(unused_imports)]
2246        use super::*;
2247        #[derive(Clone, Debug, PartialEq)]
2248        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2249    }
2250
2251    impl Type {
2252        /// Gets the enum value.
2253        ///
2254        /// Returns `None` if the enum contains an unknown value deserialized from
2255        /// the string representation of enums.
2256        pub fn value(&self) -> std::option::Option<i32> {
2257            match self {
2258                Self::Unspecified => std::option::Option::Some(0),
2259                Self::Gvisor => std::option::Option::Some(1),
2260                Self::UnknownValue(u) => u.0.value(),
2261            }
2262        }
2263
2264        /// Gets the enum value as a string.
2265        ///
2266        /// Returns `None` if the enum contains an unknown value deserialized from
2267        /// the integer representation of enums.
2268        pub fn name(&self) -> std::option::Option<&str> {
2269            match self {
2270                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
2271                Self::Gvisor => std::option::Option::Some("GVISOR"),
2272                Self::UnknownValue(u) => u.0.name(),
2273            }
2274        }
2275    }
2276
2277    impl std::default::Default for Type {
2278        fn default() -> Self {
2279            use std::convert::From;
2280            Self::from(0)
2281        }
2282    }
2283
2284    impl std::fmt::Display for Type {
2285        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2286            wkt::internal::display_enum(f, self.name(), self.value())
2287        }
2288    }
2289
2290    impl std::convert::From<i32> for Type {
2291        fn from(value: i32) -> Self {
2292            match value {
2293                0 => Self::Unspecified,
2294                1 => Self::Gvisor,
2295                _ => Self::UnknownValue(r#type::UnknownValue(
2296                    wkt::internal::UnknownEnumValue::Integer(value),
2297                )),
2298            }
2299        }
2300    }
2301
2302    impl std::convert::From<&str> for Type {
2303        fn from(value: &str) -> Self {
2304            use std::string::ToString;
2305            match value {
2306                "UNSPECIFIED" => Self::Unspecified,
2307                "GVISOR" => Self::Gvisor,
2308                _ => Self::UnknownValue(r#type::UnknownValue(
2309                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2310                )),
2311            }
2312        }
2313    }
2314
2315    impl serde::ser::Serialize for Type {
2316        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2317        where
2318            S: serde::Serializer,
2319        {
2320            match self {
2321                Self::Unspecified => serializer.serialize_i32(0),
2322                Self::Gvisor => serializer.serialize_i32(1),
2323                Self::UnknownValue(u) => u.0.serialize(serializer),
2324            }
2325        }
2326    }
2327
2328    impl<'de> serde::de::Deserialize<'de> for Type {
2329        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2330        where
2331            D: serde::Deserializer<'de>,
2332        {
2333            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
2334                ".google.container.v1.SandboxConfig.Type",
2335            ))
2336        }
2337    }
2338}
2339
2340/// GcfsConfig contains configurations of Google Container File System
2341/// (image streaming).
2342#[serde_with::serde_as]
2343#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2344#[serde(default, rename_all = "camelCase")]
2345#[non_exhaustive]
2346pub struct GcfsConfig {
2347    /// Whether to use GCFS.
2348    #[serde(skip_serializing_if = "wkt::internal::is_default")]
2349    pub enabled: bool,
2350
2351    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2352    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2353}
2354
2355impl GcfsConfig {
2356    pub fn new() -> Self {
2357        std::default::Default::default()
2358    }
2359
2360    /// Sets the value of [enabled][crate::model::GcfsConfig::enabled].
2361    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2362        self.enabled = v.into();
2363        self
2364    }
2365}
2366
2367impl wkt::message::Message for GcfsConfig {
2368    fn typename() -> &'static str {
2369        "type.googleapis.com/google.container.v1.GcfsConfig"
2370    }
2371}
2372
2373/// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
2374/// is the configuration of desired reservation which instances could take
2375/// capacity from.
2376#[serde_with::serde_as]
2377#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2378#[serde(default, rename_all = "camelCase")]
2379#[non_exhaustive]
2380pub struct ReservationAffinity {
2381    /// Corresponds to the type of reservation consumption.
2382    pub consume_reservation_type: crate::model::reservation_affinity::Type,
2383
2384    /// Corresponds to the label key of a reservation resource. To target a
2385    /// SPECIFIC_RESERVATION by name, specify
2386    /// "compute.googleapis.com/reservation-name" as the key and specify the name
2387    /// of your reservation as its value.
2388    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2389    pub key: std::string::String,
2390
2391    /// Corresponds to the label value(s) of reservation resource(s).
2392    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2393    pub values: std::vec::Vec<std::string::String>,
2394
2395    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2396    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2397}
2398
2399impl ReservationAffinity {
2400    pub fn new() -> Self {
2401        std::default::Default::default()
2402    }
2403
2404    /// Sets the value of [consume_reservation_type][crate::model::ReservationAffinity::consume_reservation_type].
2405    pub fn set_consume_reservation_type<
2406        T: std::convert::Into<crate::model::reservation_affinity::Type>,
2407    >(
2408        mut self,
2409        v: T,
2410    ) -> Self {
2411        self.consume_reservation_type = v.into();
2412        self
2413    }
2414
2415    /// Sets the value of [key][crate::model::ReservationAffinity::key].
2416    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2417        self.key = v.into();
2418        self
2419    }
2420
2421    /// Sets the value of [values][crate::model::ReservationAffinity::values].
2422    pub fn set_values<T, V>(mut self, v: T) -> Self
2423    where
2424        T: std::iter::IntoIterator<Item = V>,
2425        V: std::convert::Into<std::string::String>,
2426    {
2427        use std::iter::Iterator;
2428        self.values = v.into_iter().map(|i| i.into()).collect();
2429        self
2430    }
2431}
2432
2433impl wkt::message::Message for ReservationAffinity {
2434    fn typename() -> &'static str {
2435        "type.googleapis.com/google.container.v1.ReservationAffinity"
2436    }
2437}
2438
2439/// Defines additional types related to [ReservationAffinity].
2440pub mod reservation_affinity {
2441    #[allow(unused_imports)]
2442    use super::*;
2443
2444    /// Indicates whether to consume capacity from a reservation or not.
2445    ///
2446    /// # Working with unknown values
2447    ///
2448    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2449    /// additional enum variants at any time. Adding new variants is not considered
2450    /// a breaking change. Applications should write their code in anticipation of:
2451    ///
2452    /// - New values appearing in future releases of the client library, **and**
2453    /// - New values received dynamically, without application changes.
2454    ///
2455    /// Please consult the [Working with enums] section in the user guide for some
2456    /// guidelines.
2457    ///
2458    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2459    #[derive(Clone, Debug, PartialEq)]
2460    #[non_exhaustive]
2461    pub enum Type {
2462        /// Default value. This should not be used.
2463        Unspecified,
2464        /// Do not consume from any reserved capacity.
2465        NoReservation,
2466        /// Consume any reservation available.
2467        AnyReservation,
2468        /// Must consume from a specific reservation. Must specify key value fields
2469        /// for specifying the reservations.
2470        SpecificReservation,
2471        /// If set, the enum was initialized with an unknown value.
2472        ///
2473        /// Applications can examine the value using [Type::value] or
2474        /// [Type::name].
2475        UnknownValue(r#type::UnknownValue),
2476    }
2477
2478    #[doc(hidden)]
2479    pub mod r#type {
2480        #[allow(unused_imports)]
2481        use super::*;
2482        #[derive(Clone, Debug, PartialEq)]
2483        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2484    }
2485
2486    impl Type {
2487        /// Gets the enum value.
2488        ///
2489        /// Returns `None` if the enum contains an unknown value deserialized from
2490        /// the string representation of enums.
2491        pub fn value(&self) -> std::option::Option<i32> {
2492            match self {
2493                Self::Unspecified => std::option::Option::Some(0),
2494                Self::NoReservation => std::option::Option::Some(1),
2495                Self::AnyReservation => std::option::Option::Some(2),
2496                Self::SpecificReservation => std::option::Option::Some(3),
2497                Self::UnknownValue(u) => u.0.value(),
2498            }
2499        }
2500
2501        /// Gets the enum value as a string.
2502        ///
2503        /// Returns `None` if the enum contains an unknown value deserialized from
2504        /// the integer representation of enums.
2505        pub fn name(&self) -> std::option::Option<&str> {
2506            match self {
2507                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
2508                Self::NoReservation => std::option::Option::Some("NO_RESERVATION"),
2509                Self::AnyReservation => std::option::Option::Some("ANY_RESERVATION"),
2510                Self::SpecificReservation => std::option::Option::Some("SPECIFIC_RESERVATION"),
2511                Self::UnknownValue(u) => u.0.name(),
2512            }
2513        }
2514    }
2515
2516    impl std::default::Default for Type {
2517        fn default() -> Self {
2518            use std::convert::From;
2519            Self::from(0)
2520        }
2521    }
2522
2523    impl std::fmt::Display for Type {
2524        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2525            wkt::internal::display_enum(f, self.name(), self.value())
2526        }
2527    }
2528
2529    impl std::convert::From<i32> for Type {
2530        fn from(value: i32) -> Self {
2531            match value {
2532                0 => Self::Unspecified,
2533                1 => Self::NoReservation,
2534                2 => Self::AnyReservation,
2535                3 => Self::SpecificReservation,
2536                _ => Self::UnknownValue(r#type::UnknownValue(
2537                    wkt::internal::UnknownEnumValue::Integer(value),
2538                )),
2539            }
2540        }
2541    }
2542
2543    impl std::convert::From<&str> for Type {
2544        fn from(value: &str) -> Self {
2545            use std::string::ToString;
2546            match value {
2547                "UNSPECIFIED" => Self::Unspecified,
2548                "NO_RESERVATION" => Self::NoReservation,
2549                "ANY_RESERVATION" => Self::AnyReservation,
2550                "SPECIFIC_RESERVATION" => Self::SpecificReservation,
2551                _ => Self::UnknownValue(r#type::UnknownValue(
2552                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2553                )),
2554            }
2555        }
2556    }
2557
2558    impl serde::ser::Serialize for Type {
2559        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2560        where
2561            S: serde::Serializer,
2562        {
2563            match self {
2564                Self::Unspecified => serializer.serialize_i32(0),
2565                Self::NoReservation => serializer.serialize_i32(1),
2566                Self::AnyReservation => serializer.serialize_i32(2),
2567                Self::SpecificReservation => serializer.serialize_i32(3),
2568                Self::UnknownValue(u) => u.0.serialize(serializer),
2569            }
2570        }
2571    }
2572
2573    impl<'de> serde::de::Deserialize<'de> for Type {
2574        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2575        where
2576            D: serde::Deserializer<'de>,
2577        {
2578            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
2579                ".google.container.v1.ReservationAffinity.Type",
2580            ))
2581        }
2582    }
2583}
2584
2585/// SoleTenantConfig contains the NodeAffinities to specify what shared sole
2586/// tenant node groups should back the node pool.
2587#[serde_with::serde_as]
2588#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2589#[serde(default, rename_all = "camelCase")]
2590#[non_exhaustive]
2591pub struct SoleTenantConfig {
2592    /// NodeAffinities used to match to a shared sole tenant node group.
2593    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2594    pub node_affinities: std::vec::Vec<crate::model::sole_tenant_config::NodeAffinity>,
2595
2596    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2597    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2598}
2599
2600impl SoleTenantConfig {
2601    pub fn new() -> Self {
2602        std::default::Default::default()
2603    }
2604
2605    /// Sets the value of [node_affinities][crate::model::SoleTenantConfig::node_affinities].
2606    pub fn set_node_affinities<T, V>(mut self, v: T) -> Self
2607    where
2608        T: std::iter::IntoIterator<Item = V>,
2609        V: std::convert::Into<crate::model::sole_tenant_config::NodeAffinity>,
2610    {
2611        use std::iter::Iterator;
2612        self.node_affinities = v.into_iter().map(|i| i.into()).collect();
2613        self
2614    }
2615}
2616
2617impl wkt::message::Message for SoleTenantConfig {
2618    fn typename() -> &'static str {
2619        "type.googleapis.com/google.container.v1.SoleTenantConfig"
2620    }
2621}
2622
2623/// Defines additional types related to [SoleTenantConfig].
2624pub mod sole_tenant_config {
2625    #[allow(unused_imports)]
2626    use super::*;
2627
2628    /// Specifies the NodeAffinity key, values, and affinity operator according to
2629    /// [shared sole tenant node group
2630    /// affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity).
2631    #[serde_with::serde_as]
2632    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2633    #[serde(default, rename_all = "camelCase")]
2634    #[non_exhaustive]
2635    pub struct NodeAffinity {
2636        /// Key for NodeAffinity.
2637        #[serde(skip_serializing_if = "std::string::String::is_empty")]
2638        pub key: std::string::String,
2639
2640        /// Operator for NodeAffinity.
2641        pub operator: crate::model::sole_tenant_config::node_affinity::Operator,
2642
2643        /// Values for NodeAffinity.
2644        #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2645        pub values: std::vec::Vec<std::string::String>,
2646
2647        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2648        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2649    }
2650
2651    impl NodeAffinity {
2652        pub fn new() -> Self {
2653            std::default::Default::default()
2654        }
2655
2656        /// Sets the value of [key][crate::model::sole_tenant_config::NodeAffinity::key].
2657        pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2658            self.key = v.into();
2659            self
2660        }
2661
2662        /// Sets the value of [operator][crate::model::sole_tenant_config::NodeAffinity::operator].
2663        pub fn set_operator<
2664            T: std::convert::Into<crate::model::sole_tenant_config::node_affinity::Operator>,
2665        >(
2666            mut self,
2667            v: T,
2668        ) -> Self {
2669            self.operator = v.into();
2670            self
2671        }
2672
2673        /// Sets the value of [values][crate::model::sole_tenant_config::NodeAffinity::values].
2674        pub fn set_values<T, V>(mut self, v: T) -> Self
2675        where
2676            T: std::iter::IntoIterator<Item = V>,
2677            V: std::convert::Into<std::string::String>,
2678        {
2679            use std::iter::Iterator;
2680            self.values = v.into_iter().map(|i| i.into()).collect();
2681            self
2682        }
2683    }
2684
2685    impl wkt::message::Message for NodeAffinity {
2686        fn typename() -> &'static str {
2687            "type.googleapis.com/google.container.v1.SoleTenantConfig.NodeAffinity"
2688        }
2689    }
2690
2691    /// Defines additional types related to [NodeAffinity].
2692    pub mod node_affinity {
2693        #[allow(unused_imports)]
2694        use super::*;
2695
2696        /// Operator allows user to specify affinity or anti-affinity for the
2697        /// given key values.
2698        ///
2699        /// # Working with unknown values
2700        ///
2701        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2702        /// additional enum variants at any time. Adding new variants is not considered
2703        /// a breaking change. Applications should write their code in anticipation of:
2704        ///
2705        /// - New values appearing in future releases of the client library, **and**
2706        /// - New values received dynamically, without application changes.
2707        ///
2708        /// Please consult the [Working with enums] section in the user guide for some
2709        /// guidelines.
2710        ///
2711        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2712        #[derive(Clone, Debug, PartialEq)]
2713        #[non_exhaustive]
2714        pub enum Operator {
2715            /// Invalid or unspecified affinity operator.
2716            Unspecified,
2717            /// Affinity operator.
2718            In,
2719            /// Anti-affinity operator.
2720            NotIn,
2721            /// If set, the enum was initialized with an unknown value.
2722            ///
2723            /// Applications can examine the value using [Operator::value] or
2724            /// [Operator::name].
2725            UnknownValue(operator::UnknownValue),
2726        }
2727
2728        #[doc(hidden)]
2729        pub mod operator {
2730            #[allow(unused_imports)]
2731            use super::*;
2732            #[derive(Clone, Debug, PartialEq)]
2733            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2734        }
2735
2736        impl Operator {
2737            /// Gets the enum value.
2738            ///
2739            /// Returns `None` if the enum contains an unknown value deserialized from
2740            /// the string representation of enums.
2741            pub fn value(&self) -> std::option::Option<i32> {
2742                match self {
2743                    Self::Unspecified => std::option::Option::Some(0),
2744                    Self::In => std::option::Option::Some(1),
2745                    Self::NotIn => std::option::Option::Some(2),
2746                    Self::UnknownValue(u) => u.0.value(),
2747                }
2748            }
2749
2750            /// Gets the enum value as a string.
2751            ///
2752            /// Returns `None` if the enum contains an unknown value deserialized from
2753            /// the integer representation of enums.
2754            pub fn name(&self) -> std::option::Option<&str> {
2755                match self {
2756                    Self::Unspecified => std::option::Option::Some("OPERATOR_UNSPECIFIED"),
2757                    Self::In => std::option::Option::Some("IN"),
2758                    Self::NotIn => std::option::Option::Some("NOT_IN"),
2759                    Self::UnknownValue(u) => u.0.name(),
2760                }
2761            }
2762        }
2763
2764        impl std::default::Default for Operator {
2765            fn default() -> Self {
2766                use std::convert::From;
2767                Self::from(0)
2768            }
2769        }
2770
2771        impl std::fmt::Display for Operator {
2772            fn fmt(
2773                &self,
2774                f: &mut std::fmt::Formatter<'_>,
2775            ) -> std::result::Result<(), std::fmt::Error> {
2776                wkt::internal::display_enum(f, self.name(), self.value())
2777            }
2778        }
2779
2780        impl std::convert::From<i32> for Operator {
2781            fn from(value: i32) -> Self {
2782                match value {
2783                    0 => Self::Unspecified,
2784                    1 => Self::In,
2785                    2 => Self::NotIn,
2786                    _ => Self::UnknownValue(operator::UnknownValue(
2787                        wkt::internal::UnknownEnumValue::Integer(value),
2788                    )),
2789                }
2790            }
2791        }
2792
2793        impl std::convert::From<&str> for Operator {
2794            fn from(value: &str) -> Self {
2795                use std::string::ToString;
2796                match value {
2797                    "OPERATOR_UNSPECIFIED" => Self::Unspecified,
2798                    "IN" => Self::In,
2799                    "NOT_IN" => Self::NotIn,
2800                    _ => Self::UnknownValue(operator::UnknownValue(
2801                        wkt::internal::UnknownEnumValue::String(value.to_string()),
2802                    )),
2803                }
2804            }
2805        }
2806
2807        impl serde::ser::Serialize for Operator {
2808            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2809            where
2810                S: serde::Serializer,
2811            {
2812                match self {
2813                    Self::Unspecified => serializer.serialize_i32(0),
2814                    Self::In => serializer.serialize_i32(1),
2815                    Self::NotIn => serializer.serialize_i32(2),
2816                    Self::UnknownValue(u) => u.0.serialize(serializer),
2817                }
2818            }
2819        }
2820
2821        impl<'de> serde::de::Deserialize<'de> for Operator {
2822            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2823            where
2824                D: serde::Deserializer<'de>,
2825            {
2826                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operator>::new(
2827                    ".google.container.v1.SoleTenantConfig.NodeAffinity.Operator",
2828                ))
2829            }
2830        }
2831    }
2832}
2833
2834/// ContainerdConfig contains configuration to customize containerd.
2835#[serde_with::serde_as]
2836#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2837#[serde(default, rename_all = "camelCase")]
2838#[non_exhaustive]
2839pub struct ContainerdConfig {
2840    /// PrivateRegistryAccessConfig is used to configure access configuration
2841    /// for private container registries.
2842    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2843    pub private_registry_access_config:
2844        std::option::Option<crate::model::containerd_config::PrivateRegistryAccessConfig>,
2845
2846    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2847    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2848}
2849
2850impl ContainerdConfig {
2851    pub fn new() -> Self {
2852        std::default::Default::default()
2853    }
2854
2855    /// Sets the value of [private_registry_access_config][crate::model::ContainerdConfig::private_registry_access_config].
2856    pub fn set_private_registry_access_config<
2857        T: std::convert::Into<
2858                std::option::Option<crate::model::containerd_config::PrivateRegistryAccessConfig>,
2859            >,
2860    >(
2861        mut self,
2862        v: T,
2863    ) -> Self {
2864        self.private_registry_access_config = v.into();
2865        self
2866    }
2867}
2868
2869impl wkt::message::Message for ContainerdConfig {
2870    fn typename() -> &'static str {
2871        "type.googleapis.com/google.container.v1.ContainerdConfig"
2872    }
2873}
2874
2875/// Defines additional types related to [ContainerdConfig].
2876pub mod containerd_config {
2877    #[allow(unused_imports)]
2878    use super::*;
2879
2880    /// PrivateRegistryAccessConfig contains access configuration for
2881    /// private container registries.
2882    #[serde_with::serde_as]
2883    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2884    #[serde(default, rename_all = "camelCase")]
2885    #[non_exhaustive]
2886    pub struct PrivateRegistryAccessConfig {
2887
2888        /// Private registry access is enabled.
2889        #[serde(skip_serializing_if = "wkt::internal::is_default")]
2890        pub enabled: bool,
2891
2892        /// Private registry access configuration.
2893        #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2894        pub certificate_authority_domain_config: std::vec::Vec<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>,
2895
2896        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2897        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2898    }
2899
2900    impl PrivateRegistryAccessConfig {
2901        pub fn new() -> Self {
2902            std::default::Default::default()
2903        }
2904
2905        /// Sets the value of [enabled][crate::model::containerd_config::PrivateRegistryAccessConfig::enabled].
2906        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2907            self.enabled = v.into();
2908            self
2909        }
2910
2911        /// Sets the value of [certificate_authority_domain_config][crate::model::containerd_config::PrivateRegistryAccessConfig::certificate_authority_domain_config].
2912        pub fn set_certificate_authority_domain_config<T, V>(mut self, v: T) -> Self
2913        where
2914            T: std::iter::IntoIterator<Item = V>,
2915            V: std::convert::Into<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>
2916        {
2917            use std::iter::Iterator;
2918            self.certificate_authority_domain_config = v.into_iter().map(|i| i.into()).collect();
2919            self
2920        }
2921    }
2922
2923    impl wkt::message::Message for PrivateRegistryAccessConfig {
2924        fn typename() -> &'static str {
2925            "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig"
2926        }
2927    }
2928
2929    /// Defines additional types related to [PrivateRegistryAccessConfig].
2930    pub mod private_registry_access_config {
2931        #[allow(unused_imports)]
2932        use super::*;
2933
2934        /// CertificateAuthorityDomainConfig configures one or more fully qualified
2935        /// domain names (FQDN) to a specific certificate.
2936        #[serde_with::serde_as]
2937        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2938        #[serde(default, rename_all = "camelCase")]
2939        #[non_exhaustive]
2940        pub struct CertificateAuthorityDomainConfig {
2941
2942            /// List of fully qualified domain names (FQDN).
2943            /// Specifying port is supported.
2944            /// Wilcards are NOT supported.
2945            /// Examples:
2946            ///
2947            /// - my.customdomain.com
2948            /// - 10.0.1.2:5000
2949            #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2950            pub fqdns: std::vec::Vec<std::string::String>,
2951
2952            /// Certificate access config. The following are supported:
2953            ///
2954            /// - GCPSecretManagerCertificateConfig
2955            #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
2956            pub certificate_config: std::option::Option<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig>,
2957
2958            #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2959            _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2960        }
2961
2962        impl CertificateAuthorityDomainConfig {
2963            pub fn new() -> Self {
2964                std::default::Default::default()
2965            }
2966
2967            /// Sets the value of [fqdns][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::fqdns].
2968            pub fn set_fqdns<T, V>(mut self, v: T) -> Self
2969            where
2970                T: std::iter::IntoIterator<Item = V>,
2971                V: std::convert::Into<std::string::String>,
2972            {
2973                use std::iter::Iterator;
2974                self.fqdns = v.into_iter().map(|i| i.into()).collect();
2975                self
2976            }
2977
2978            /// Sets the value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config].
2979            ///
2980            /// Note that all the setters affecting `certificate_config` are mutually
2981            /// exclusive.
2982            pub fn set_certificate_config<T: std::convert::Into<std::option::Option<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig>>>(mut self, v: T) -> Self
2983            {
2984                self.certificate_config = v.into();
2985                self
2986            }
2987
2988            /// The value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config]
2989            /// if it holds a `GcpSecretManagerCertificateConfig`, `None` if the field is not set or
2990            /// holds a different branch.
2991            pub fn gcp_secret_manager_certificate_config(&self) -> std::option::Option<&std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>>{
2992                #[allow(unreachable_patterns)]
2993                self.certificate_config.as_ref().and_then(|v| match v {
2994                    crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(v) => std::option::Option::Some(v),
2995                    _ => std::option::Option::None,
2996                })
2997            }
2998
2999            /// Sets the value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config]
3000            /// to hold a `GcpSecretManagerCertificateConfig`.
3001            ///
3002            /// Note that all the setters affecting `certificate_config` are
3003            /// mutually exclusive.
3004            pub fn set_gcp_secret_manager_certificate_config<T: std::convert::Into<std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>>>(mut self, v: T) -> Self{
3005                self.certificate_config = std::option::Option::Some(
3006                    crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(
3007                        v.into()
3008                    )
3009                );
3010                self
3011            }
3012        }
3013
3014        impl wkt::message::Message for CertificateAuthorityDomainConfig {
3015            fn typename() -> &'static str {
3016                "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"
3017            }
3018        }
3019
3020        /// Defines additional types related to [CertificateAuthorityDomainConfig].
3021        pub mod certificate_authority_domain_config {
3022            #[allow(unused_imports)]
3023            use super::*;
3024
3025            /// GCPSecretManagerCertificateConfig configures a secret from
3026            /// [Google Secret Manager](https://cloud.google.com/secret-manager).
3027            #[serde_with::serde_as]
3028            #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3029            #[serde(default, rename_all = "camelCase")]
3030            #[non_exhaustive]
3031            pub struct GCPSecretManagerCertificateConfig {
3032                /// Secret URI, in the form
3033                /// "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
3034                /// Version can be fixed (e.g. "2") or "latest"
3035                #[serde(skip_serializing_if = "std::string::String::is_empty")]
3036                pub secret_uri: std::string::String,
3037
3038                #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3039                _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3040            }
3041
3042            impl GCPSecretManagerCertificateConfig {
3043                pub fn new() -> Self {
3044                    std::default::Default::default()
3045                }
3046
3047                /// Sets the value of [secret_uri][crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig::secret_uri].
3048                pub fn set_secret_uri<T: std::convert::Into<std::string::String>>(
3049                    mut self,
3050                    v: T,
3051                ) -> Self {
3052                    self.secret_uri = v.into();
3053                    self
3054                }
3055            }
3056
3057            impl wkt::message::Message for GCPSecretManagerCertificateConfig {
3058                fn typename() -> &'static str {
3059                    "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"
3060                }
3061            }
3062
3063            /// Certificate access config. The following are supported:
3064            ///
3065            /// - GCPSecretManagerCertificateConfig
3066            #[serde_with::serde_as]
3067            #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3068            #[serde(rename_all = "camelCase")]
3069            #[non_exhaustive]
3070            pub enum CertificateConfig {
3071                /// Google Secret Manager (GCP) certificate configuration.
3072                GcpSecretManagerCertificateConfig(std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>),
3073            }
3074        }
3075    }
3076}
3077
3078/// Kubernetes taint is composed of three fields: key, value, and effect. Effect
3079/// can only be one of three types:  NoSchedule, PreferNoSchedule or NoExecute.
3080///
3081/// See
3082/// [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration)
3083/// for more information, including usage and the valid values.
3084#[serde_with::serde_as]
3085#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3086#[serde(default, rename_all = "camelCase")]
3087#[non_exhaustive]
3088pub struct NodeTaint {
3089    /// Key for taint.
3090    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3091    pub key: std::string::String,
3092
3093    /// Value for taint.
3094    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3095    pub value: std::string::String,
3096
3097    /// Effect for taint.
3098    pub effect: crate::model::node_taint::Effect,
3099
3100    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3101    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3102}
3103
3104impl NodeTaint {
3105    pub fn new() -> Self {
3106        std::default::Default::default()
3107    }
3108
3109    /// Sets the value of [key][crate::model::NodeTaint::key].
3110    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3111        self.key = v.into();
3112        self
3113    }
3114
3115    /// Sets the value of [value][crate::model::NodeTaint::value].
3116    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3117        self.value = v.into();
3118        self
3119    }
3120
3121    /// Sets the value of [effect][crate::model::NodeTaint::effect].
3122    pub fn set_effect<T: std::convert::Into<crate::model::node_taint::Effect>>(
3123        mut self,
3124        v: T,
3125    ) -> Self {
3126        self.effect = v.into();
3127        self
3128    }
3129}
3130
3131impl wkt::message::Message for NodeTaint {
3132    fn typename() -> &'static str {
3133        "type.googleapis.com/google.container.v1.NodeTaint"
3134    }
3135}
3136
3137/// Defines additional types related to [NodeTaint].
3138pub mod node_taint {
3139    #[allow(unused_imports)]
3140    use super::*;
3141
3142    /// Possible values for Effect in taint.
3143    ///
3144    /// # Working with unknown values
3145    ///
3146    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3147    /// additional enum variants at any time. Adding new variants is not considered
3148    /// a breaking change. Applications should write their code in anticipation of:
3149    ///
3150    /// - New values appearing in future releases of the client library, **and**
3151    /// - New values received dynamically, without application changes.
3152    ///
3153    /// Please consult the [Working with enums] section in the user guide for some
3154    /// guidelines.
3155    ///
3156    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3157    #[derive(Clone, Debug, PartialEq)]
3158    #[non_exhaustive]
3159    pub enum Effect {
3160        /// Not set
3161        Unspecified,
3162        /// NoSchedule
3163        NoSchedule,
3164        /// PreferNoSchedule
3165        PreferNoSchedule,
3166        /// NoExecute
3167        NoExecute,
3168        /// If set, the enum was initialized with an unknown value.
3169        ///
3170        /// Applications can examine the value using [Effect::value] or
3171        /// [Effect::name].
3172        UnknownValue(effect::UnknownValue),
3173    }
3174
3175    #[doc(hidden)]
3176    pub mod effect {
3177        #[allow(unused_imports)]
3178        use super::*;
3179        #[derive(Clone, Debug, PartialEq)]
3180        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3181    }
3182
3183    impl Effect {
3184        /// Gets the enum value.
3185        ///
3186        /// Returns `None` if the enum contains an unknown value deserialized from
3187        /// the string representation of enums.
3188        pub fn value(&self) -> std::option::Option<i32> {
3189            match self {
3190                Self::Unspecified => std::option::Option::Some(0),
3191                Self::NoSchedule => std::option::Option::Some(1),
3192                Self::PreferNoSchedule => std::option::Option::Some(2),
3193                Self::NoExecute => std::option::Option::Some(3),
3194                Self::UnknownValue(u) => u.0.value(),
3195            }
3196        }
3197
3198        /// Gets the enum value as a string.
3199        ///
3200        /// Returns `None` if the enum contains an unknown value deserialized from
3201        /// the integer representation of enums.
3202        pub fn name(&self) -> std::option::Option<&str> {
3203            match self {
3204                Self::Unspecified => std::option::Option::Some("EFFECT_UNSPECIFIED"),
3205                Self::NoSchedule => std::option::Option::Some("NO_SCHEDULE"),
3206                Self::PreferNoSchedule => std::option::Option::Some("PREFER_NO_SCHEDULE"),
3207                Self::NoExecute => std::option::Option::Some("NO_EXECUTE"),
3208                Self::UnknownValue(u) => u.0.name(),
3209            }
3210        }
3211    }
3212
3213    impl std::default::Default for Effect {
3214        fn default() -> Self {
3215            use std::convert::From;
3216            Self::from(0)
3217        }
3218    }
3219
3220    impl std::fmt::Display for Effect {
3221        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3222            wkt::internal::display_enum(f, self.name(), self.value())
3223        }
3224    }
3225
3226    impl std::convert::From<i32> for Effect {
3227        fn from(value: i32) -> Self {
3228            match value {
3229                0 => Self::Unspecified,
3230                1 => Self::NoSchedule,
3231                2 => Self::PreferNoSchedule,
3232                3 => Self::NoExecute,
3233                _ => Self::UnknownValue(effect::UnknownValue(
3234                    wkt::internal::UnknownEnumValue::Integer(value),
3235                )),
3236            }
3237        }
3238    }
3239
3240    impl std::convert::From<&str> for Effect {
3241        fn from(value: &str) -> Self {
3242            use std::string::ToString;
3243            match value {
3244                "EFFECT_UNSPECIFIED" => Self::Unspecified,
3245                "NO_SCHEDULE" => Self::NoSchedule,
3246                "PREFER_NO_SCHEDULE" => Self::PreferNoSchedule,
3247                "NO_EXECUTE" => Self::NoExecute,
3248                _ => Self::UnknownValue(effect::UnknownValue(
3249                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3250                )),
3251            }
3252        }
3253    }
3254
3255    impl serde::ser::Serialize for Effect {
3256        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3257        where
3258            S: serde::Serializer,
3259        {
3260            match self {
3261                Self::Unspecified => serializer.serialize_i32(0),
3262                Self::NoSchedule => serializer.serialize_i32(1),
3263                Self::PreferNoSchedule => serializer.serialize_i32(2),
3264                Self::NoExecute => serializer.serialize_i32(3),
3265                Self::UnknownValue(u) => u.0.serialize(serializer),
3266            }
3267        }
3268    }
3269
3270    impl<'de> serde::de::Deserialize<'de> for Effect {
3271        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3272        where
3273            D: serde::Deserializer<'de>,
3274        {
3275            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Effect>::new(
3276                ".google.container.v1.NodeTaint.Effect",
3277            ))
3278        }
3279    }
3280}
3281
3282/// Collection of Kubernetes [node
3283/// taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration).
3284#[serde_with::serde_as]
3285#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3286#[serde(default, rename_all = "camelCase")]
3287#[non_exhaustive]
3288pub struct NodeTaints {
3289    /// List of node taints.
3290    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3291    pub taints: std::vec::Vec<crate::model::NodeTaint>,
3292
3293    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3294    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3295}
3296
3297impl NodeTaints {
3298    pub fn new() -> Self {
3299        std::default::Default::default()
3300    }
3301
3302    /// Sets the value of [taints][crate::model::NodeTaints::taints].
3303    pub fn set_taints<T, V>(mut self, v: T) -> Self
3304    where
3305        T: std::iter::IntoIterator<Item = V>,
3306        V: std::convert::Into<crate::model::NodeTaint>,
3307    {
3308        use std::iter::Iterator;
3309        self.taints = v.into_iter().map(|i| i.into()).collect();
3310        self
3311    }
3312}
3313
3314impl wkt::message::Message for NodeTaints {
3315    fn typename() -> &'static str {
3316        "type.googleapis.com/google.container.v1.NodeTaints"
3317    }
3318}
3319
3320/// Collection of node-level [Kubernetes
3321/// labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels).
3322#[serde_with::serde_as]
3323#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3324#[serde(default, rename_all = "camelCase")]
3325#[non_exhaustive]
3326pub struct NodeLabels {
3327    /// Map of node label keys and node label values.
3328    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3329    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3330
3331    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3332    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3333}
3334
3335impl NodeLabels {
3336    pub fn new() -> Self {
3337        std::default::Default::default()
3338    }
3339
3340    /// Sets the value of [labels][crate::model::NodeLabels::labels].
3341    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3342    where
3343        T: std::iter::IntoIterator<Item = (K, V)>,
3344        K: std::convert::Into<std::string::String>,
3345        V: std::convert::Into<std::string::String>,
3346    {
3347        use std::iter::Iterator;
3348        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3349        self
3350    }
3351}
3352
3353impl wkt::message::Message for NodeLabels {
3354    fn typename() -> &'static str {
3355        "type.googleapis.com/google.container.v1.NodeLabels"
3356    }
3357}
3358
3359/// Collection of [GCP
3360/// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
3361#[serde_with::serde_as]
3362#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3363#[serde(default, rename_all = "camelCase")]
3364#[non_exhaustive]
3365pub struct ResourceLabels {
3366    /// Map of node label keys and node label values.
3367    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3368    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3369
3370    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3371    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3372}
3373
3374impl ResourceLabels {
3375    pub fn new() -> Self {
3376        std::default::Default::default()
3377    }
3378
3379    /// Sets the value of [labels][crate::model::ResourceLabels::labels].
3380    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3381    where
3382        T: std::iter::IntoIterator<Item = (K, V)>,
3383        K: std::convert::Into<std::string::String>,
3384        V: std::convert::Into<std::string::String>,
3385    {
3386        use std::iter::Iterator;
3387        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3388        self
3389    }
3390}
3391
3392impl wkt::message::Message for ResourceLabels {
3393    fn typename() -> &'static str {
3394        "type.googleapis.com/google.container.v1.ResourceLabels"
3395    }
3396}
3397
3398/// Collection of Compute Engine network tags that can be applied to a node's
3399/// underlying VM instance.
3400#[serde_with::serde_as]
3401#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3402#[serde(default, rename_all = "camelCase")]
3403#[non_exhaustive]
3404pub struct NetworkTags {
3405    /// List of network tags.
3406    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3407    pub tags: std::vec::Vec<std::string::String>,
3408
3409    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3410    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3411}
3412
3413impl NetworkTags {
3414    pub fn new() -> Self {
3415        std::default::Default::default()
3416    }
3417
3418    /// Sets the value of [tags][crate::model::NetworkTags::tags].
3419    pub fn set_tags<T, V>(mut self, v: T) -> Self
3420    where
3421        T: std::iter::IntoIterator<Item = V>,
3422        V: std::convert::Into<std::string::String>,
3423    {
3424        use std::iter::Iterator;
3425        self.tags = v.into_iter().map(|i| i.into()).collect();
3426        self
3427    }
3428}
3429
3430impl wkt::message::Message for NetworkTags {
3431    fn typename() -> &'static str {
3432        "type.googleapis.com/google.container.v1.NetworkTags"
3433    }
3434}
3435
3436/// The authentication information for accessing the master endpoint.
3437/// Authentication can be done using HTTP basic auth or using client
3438/// certificates.
3439#[serde_with::serde_as]
3440#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3441#[serde(default, rename_all = "camelCase")]
3442#[non_exhaustive]
3443pub struct MasterAuth {
3444    /// The username to use for HTTP basic authentication to the master endpoint.
3445    /// For clusters v1.6.0 and later, basic authentication can be disabled by
3446    /// leaving username unspecified (or setting it to the empty string).
3447    ///
3448    /// Warning: basic authentication is deprecated, and will be removed in GKE
3449    /// control plane versions 1.19 and newer. For a list of recommended
3450    /// authentication methods, see:
3451    /// <https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication>
3452    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3453    #[deprecated]
3454    pub username: std::string::String,
3455
3456    /// The password to use for HTTP basic authentication to the master endpoint.
3457    /// Because the master endpoint is open to the Internet, you should create a
3458    /// strong password.  If a password is provided for cluster creation, username
3459    /// must be non-empty.
3460    ///
3461    /// Warning: basic authentication is deprecated, and will be removed in GKE
3462    /// control plane versions 1.19 and newer. For a list of recommended
3463    /// authentication methods, see:
3464    /// <https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication>
3465    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3466    #[deprecated]
3467    pub password: std::string::String,
3468
3469    /// Configuration for client certificate authentication on the cluster. For
3470    /// clusters before v1.12, if no configuration is specified, a client
3471    /// certificate is issued.
3472    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3473    pub client_certificate_config: std::option::Option<crate::model::ClientCertificateConfig>,
3474
3475    /// Output only. Base64-encoded public certificate that is the root of
3476    /// trust for the cluster.
3477    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3478    pub cluster_ca_certificate: std::string::String,
3479
3480    /// Output only. Base64-encoded public certificate used by clients to
3481    /// authenticate to the cluster endpoint. Issued only if
3482    /// client_certificate_config is set.
3483    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3484    pub client_certificate: std::string::String,
3485
3486    /// Output only. Base64-encoded private key used by clients to authenticate
3487    /// to the cluster endpoint.
3488    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3489    pub client_key: std::string::String,
3490
3491    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3492    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3493}
3494
3495impl MasterAuth {
3496    pub fn new() -> Self {
3497        std::default::Default::default()
3498    }
3499
3500    /// Sets the value of [username][crate::model::MasterAuth::username].
3501    #[deprecated]
3502    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3503        self.username = v.into();
3504        self
3505    }
3506
3507    /// Sets the value of [password][crate::model::MasterAuth::password].
3508    #[deprecated]
3509    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3510        self.password = v.into();
3511        self
3512    }
3513
3514    /// Sets the value of [client_certificate_config][crate::model::MasterAuth::client_certificate_config].
3515    pub fn set_client_certificate_config<
3516        T: std::convert::Into<std::option::Option<crate::model::ClientCertificateConfig>>,
3517    >(
3518        mut self,
3519        v: T,
3520    ) -> Self {
3521        self.client_certificate_config = v.into();
3522        self
3523    }
3524
3525    /// Sets the value of [cluster_ca_certificate][crate::model::MasterAuth::cluster_ca_certificate].
3526    pub fn set_cluster_ca_certificate<T: std::convert::Into<std::string::String>>(
3527        mut self,
3528        v: T,
3529    ) -> Self {
3530        self.cluster_ca_certificate = v.into();
3531        self
3532    }
3533
3534    /// Sets the value of [client_certificate][crate::model::MasterAuth::client_certificate].
3535    pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
3536        mut self,
3537        v: T,
3538    ) -> Self {
3539        self.client_certificate = v.into();
3540        self
3541    }
3542
3543    /// Sets the value of [client_key][crate::model::MasterAuth::client_key].
3544    pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3545        self.client_key = v.into();
3546        self
3547    }
3548}
3549
3550impl wkt::message::Message for MasterAuth {
3551    fn typename() -> &'static str {
3552        "type.googleapis.com/google.container.v1.MasterAuth"
3553    }
3554}
3555
3556/// Configuration for client certificates on the cluster.
3557#[serde_with::serde_as]
3558#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3559#[serde(default, rename_all = "camelCase")]
3560#[non_exhaustive]
3561pub struct ClientCertificateConfig {
3562    /// Issue a client certificate.
3563    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3564    pub issue_client_certificate: bool,
3565
3566    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3567    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3568}
3569
3570impl ClientCertificateConfig {
3571    pub fn new() -> Self {
3572        std::default::Default::default()
3573    }
3574
3575    /// Sets the value of [issue_client_certificate][crate::model::ClientCertificateConfig::issue_client_certificate].
3576    pub fn set_issue_client_certificate<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3577        self.issue_client_certificate = v.into();
3578        self
3579    }
3580}
3581
3582impl wkt::message::Message for ClientCertificateConfig {
3583    fn typename() -> &'static str {
3584        "type.googleapis.com/google.container.v1.ClientCertificateConfig"
3585    }
3586}
3587
3588/// Configuration for the addons that can be automatically spun up in the
3589/// cluster, enabling additional functionality.
3590#[serde_with::serde_as]
3591#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3592#[serde(default, rename_all = "camelCase")]
3593#[non_exhaustive]
3594pub struct AddonsConfig {
3595    /// Configuration for the HTTP (L7) load balancing controller addon, which
3596    /// makes it easy to set up HTTP load balancers for services in a cluster.
3597    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3598    pub http_load_balancing: std::option::Option<crate::model::HttpLoadBalancing>,
3599
3600    /// Configuration for the horizontal pod autoscaling feature, which
3601    /// increases or decreases the number of replica pods a replication controller
3602    /// has based on the resource usage of the existing pods.
3603    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3604    pub horizontal_pod_autoscaling: std::option::Option<crate::model::HorizontalPodAutoscaling>,
3605
3606    /// Configuration for the Kubernetes Dashboard.
3607    /// This addon is deprecated, and will be disabled in 1.15. It is recommended
3608    /// to use the Cloud Console to manage and monitor your Kubernetes clusters,
3609    /// workloads and applications. For more information, see:
3610    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards>
3611    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3612    #[deprecated]
3613    pub kubernetes_dashboard: std::option::Option<crate::model::KubernetesDashboard>,
3614
3615    /// Configuration for NetworkPolicy. This only tracks whether the addon
3616    /// is enabled or not on the Master, it does not track whether network policy
3617    /// is enabled for the nodes.
3618    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3619    pub network_policy_config: std::option::Option<crate::model::NetworkPolicyConfig>,
3620
3621    /// Configuration for the Cloud Run addon, which allows the user to use a
3622    /// managed Knative service.
3623    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3624    pub cloud_run_config: std::option::Option<crate::model::CloudRunConfig>,
3625
3626    /// Configuration for NodeLocalDNS, a dns cache running on cluster nodes
3627    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3628    pub dns_cache_config: std::option::Option<crate::model::DnsCacheConfig>,
3629
3630    /// Configuration for the ConfigConnector add-on, a Kubernetes
3631    /// extension to manage hosted GCP services through the Kubernetes API
3632    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3633    pub config_connector_config: std::option::Option<crate::model::ConfigConnectorConfig>,
3634
3635    /// Configuration for the Compute Engine Persistent Disk CSI driver.
3636    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3637    pub gce_persistent_disk_csi_driver_config:
3638        std::option::Option<crate::model::GcePersistentDiskCsiDriverConfig>,
3639
3640    /// Configuration for the GCP Filestore CSI driver.
3641    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3642    pub gcp_filestore_csi_driver_config:
3643        std::option::Option<crate::model::GcpFilestoreCsiDriverConfig>,
3644
3645    /// Configuration for the Backup for GKE agent addon.
3646    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3647    pub gke_backup_agent_config: std::option::Option<crate::model::GkeBackupAgentConfig>,
3648
3649    /// Configuration for the Cloud Storage Fuse CSI driver.
3650    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3651    pub gcs_fuse_csi_driver_config: std::option::Option<crate::model::GcsFuseCsiDriverConfig>,
3652
3653    /// Optional. Configuration for the StatefulHA add-on.
3654    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3655    pub stateful_ha_config: std::option::Option<crate::model::StatefulHAConfig>,
3656
3657    /// Configuration for the Cloud Storage Parallelstore CSI driver.
3658    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3659    pub parallelstore_csi_driver_config:
3660        std::option::Option<crate::model::ParallelstoreCsiDriverConfig>,
3661
3662    /// Optional. Configuration for Ray Operator addon.
3663    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3664    pub ray_operator_config: std::option::Option<crate::model::RayOperatorConfig>,
3665
3666    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3667    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3668}
3669
3670impl AddonsConfig {
3671    pub fn new() -> Self {
3672        std::default::Default::default()
3673    }
3674
3675    /// Sets the value of [http_load_balancing][crate::model::AddonsConfig::http_load_balancing].
3676    pub fn set_http_load_balancing<
3677        T: std::convert::Into<std::option::Option<crate::model::HttpLoadBalancing>>,
3678    >(
3679        mut self,
3680        v: T,
3681    ) -> Self {
3682        self.http_load_balancing = v.into();
3683        self
3684    }
3685
3686    /// Sets the value of [horizontal_pod_autoscaling][crate::model::AddonsConfig::horizontal_pod_autoscaling].
3687    pub fn set_horizontal_pod_autoscaling<
3688        T: std::convert::Into<std::option::Option<crate::model::HorizontalPodAutoscaling>>,
3689    >(
3690        mut self,
3691        v: T,
3692    ) -> Self {
3693        self.horizontal_pod_autoscaling = v.into();
3694        self
3695    }
3696
3697    /// Sets the value of [kubernetes_dashboard][crate::model::AddonsConfig::kubernetes_dashboard].
3698    #[deprecated]
3699    pub fn set_kubernetes_dashboard<
3700        T: std::convert::Into<std::option::Option<crate::model::KubernetesDashboard>>,
3701    >(
3702        mut self,
3703        v: T,
3704    ) -> Self {
3705        self.kubernetes_dashboard = v.into();
3706        self
3707    }
3708
3709    /// Sets the value of [network_policy_config][crate::model::AddonsConfig::network_policy_config].
3710    pub fn set_network_policy_config<
3711        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicyConfig>>,
3712    >(
3713        mut self,
3714        v: T,
3715    ) -> Self {
3716        self.network_policy_config = v.into();
3717        self
3718    }
3719
3720    /// Sets the value of [cloud_run_config][crate::model::AddonsConfig::cloud_run_config].
3721    pub fn set_cloud_run_config<
3722        T: std::convert::Into<std::option::Option<crate::model::CloudRunConfig>>,
3723    >(
3724        mut self,
3725        v: T,
3726    ) -> Self {
3727        self.cloud_run_config = v.into();
3728        self
3729    }
3730
3731    /// Sets the value of [dns_cache_config][crate::model::AddonsConfig::dns_cache_config].
3732    pub fn set_dns_cache_config<
3733        T: std::convert::Into<std::option::Option<crate::model::DnsCacheConfig>>,
3734    >(
3735        mut self,
3736        v: T,
3737    ) -> Self {
3738        self.dns_cache_config = v.into();
3739        self
3740    }
3741
3742    /// Sets the value of [config_connector_config][crate::model::AddonsConfig::config_connector_config].
3743    pub fn set_config_connector_config<
3744        T: std::convert::Into<std::option::Option<crate::model::ConfigConnectorConfig>>,
3745    >(
3746        mut self,
3747        v: T,
3748    ) -> Self {
3749        self.config_connector_config = v.into();
3750        self
3751    }
3752
3753    /// Sets the value of [gce_persistent_disk_csi_driver_config][crate::model::AddonsConfig::gce_persistent_disk_csi_driver_config].
3754    pub fn set_gce_persistent_disk_csi_driver_config<
3755        T: std::convert::Into<std::option::Option<crate::model::GcePersistentDiskCsiDriverConfig>>,
3756    >(
3757        mut self,
3758        v: T,
3759    ) -> Self {
3760        self.gce_persistent_disk_csi_driver_config = v.into();
3761        self
3762    }
3763
3764    /// Sets the value of [gcp_filestore_csi_driver_config][crate::model::AddonsConfig::gcp_filestore_csi_driver_config].
3765    pub fn set_gcp_filestore_csi_driver_config<
3766        T: std::convert::Into<std::option::Option<crate::model::GcpFilestoreCsiDriverConfig>>,
3767    >(
3768        mut self,
3769        v: T,
3770    ) -> Self {
3771        self.gcp_filestore_csi_driver_config = v.into();
3772        self
3773    }
3774
3775    /// Sets the value of [gke_backup_agent_config][crate::model::AddonsConfig::gke_backup_agent_config].
3776    pub fn set_gke_backup_agent_config<
3777        T: std::convert::Into<std::option::Option<crate::model::GkeBackupAgentConfig>>,
3778    >(
3779        mut self,
3780        v: T,
3781    ) -> Self {
3782        self.gke_backup_agent_config = v.into();
3783        self
3784    }
3785
3786    /// Sets the value of [gcs_fuse_csi_driver_config][crate::model::AddonsConfig::gcs_fuse_csi_driver_config].
3787    pub fn set_gcs_fuse_csi_driver_config<
3788        T: std::convert::Into<std::option::Option<crate::model::GcsFuseCsiDriverConfig>>,
3789    >(
3790        mut self,
3791        v: T,
3792    ) -> Self {
3793        self.gcs_fuse_csi_driver_config = v.into();
3794        self
3795    }
3796
3797    /// Sets the value of [stateful_ha_config][crate::model::AddonsConfig::stateful_ha_config].
3798    pub fn set_stateful_ha_config<
3799        T: std::convert::Into<std::option::Option<crate::model::StatefulHAConfig>>,
3800    >(
3801        mut self,
3802        v: T,
3803    ) -> Self {
3804        self.stateful_ha_config = v.into();
3805        self
3806    }
3807
3808    /// Sets the value of [parallelstore_csi_driver_config][crate::model::AddonsConfig::parallelstore_csi_driver_config].
3809    pub fn set_parallelstore_csi_driver_config<
3810        T: std::convert::Into<std::option::Option<crate::model::ParallelstoreCsiDriverConfig>>,
3811    >(
3812        mut self,
3813        v: T,
3814    ) -> Self {
3815        self.parallelstore_csi_driver_config = v.into();
3816        self
3817    }
3818
3819    /// Sets the value of [ray_operator_config][crate::model::AddonsConfig::ray_operator_config].
3820    pub fn set_ray_operator_config<
3821        T: std::convert::Into<std::option::Option<crate::model::RayOperatorConfig>>,
3822    >(
3823        mut self,
3824        v: T,
3825    ) -> Self {
3826        self.ray_operator_config = v.into();
3827        self
3828    }
3829}
3830
3831impl wkt::message::Message for AddonsConfig {
3832    fn typename() -> &'static str {
3833        "type.googleapis.com/google.container.v1.AddonsConfig"
3834    }
3835}
3836
3837/// Configuration options for the HTTP (L7) load balancing controller addon,
3838/// which makes it easy to set up HTTP load balancers for services in a cluster.
3839#[serde_with::serde_as]
3840#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3841#[serde(default, rename_all = "camelCase")]
3842#[non_exhaustive]
3843pub struct HttpLoadBalancing {
3844    /// Whether the HTTP Load Balancing controller is enabled in the cluster.
3845    /// When enabled, it runs a small pod in the cluster that manages the load
3846    /// balancers.
3847    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3848    pub disabled: bool,
3849
3850    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3851    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3852}
3853
3854impl HttpLoadBalancing {
3855    pub fn new() -> Self {
3856        std::default::Default::default()
3857    }
3858
3859    /// Sets the value of [disabled][crate::model::HttpLoadBalancing::disabled].
3860    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3861        self.disabled = v.into();
3862        self
3863    }
3864}
3865
3866impl wkt::message::Message for HttpLoadBalancing {
3867    fn typename() -> &'static str {
3868        "type.googleapis.com/google.container.v1.HttpLoadBalancing"
3869    }
3870}
3871
3872/// Configuration options for the horizontal pod autoscaling feature, which
3873/// increases or decreases the number of replica pods a replication controller
3874/// has based on the resource usage of the existing pods.
3875#[serde_with::serde_as]
3876#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3877#[serde(default, rename_all = "camelCase")]
3878#[non_exhaustive]
3879pub struct HorizontalPodAutoscaling {
3880    /// Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
3881    /// When enabled, it ensures that metrics are collected into Stackdriver
3882    /// Monitoring.
3883    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3884    pub disabled: bool,
3885
3886    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3887    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3888}
3889
3890impl HorizontalPodAutoscaling {
3891    pub fn new() -> Self {
3892        std::default::Default::default()
3893    }
3894
3895    /// Sets the value of [disabled][crate::model::HorizontalPodAutoscaling::disabled].
3896    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3897        self.disabled = v.into();
3898        self
3899    }
3900}
3901
3902impl wkt::message::Message for HorizontalPodAutoscaling {
3903    fn typename() -> &'static str {
3904        "type.googleapis.com/google.container.v1.HorizontalPodAutoscaling"
3905    }
3906}
3907
3908/// Configuration for the Kubernetes Dashboard.
3909#[serde_with::serde_as]
3910#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3911#[serde(default, rename_all = "camelCase")]
3912#[non_exhaustive]
3913pub struct KubernetesDashboard {
3914    /// Whether the Kubernetes Dashboard is enabled for this cluster.
3915    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3916    pub disabled: bool,
3917
3918    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3919    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3920}
3921
3922impl KubernetesDashboard {
3923    pub fn new() -> Self {
3924        std::default::Default::default()
3925    }
3926
3927    /// Sets the value of [disabled][crate::model::KubernetesDashboard::disabled].
3928    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3929        self.disabled = v.into();
3930        self
3931    }
3932}
3933
3934impl wkt::message::Message for KubernetesDashboard {
3935    fn typename() -> &'static str {
3936        "type.googleapis.com/google.container.v1.KubernetesDashboard"
3937    }
3938}
3939
3940/// Configuration for NetworkPolicy. This only tracks whether the addon
3941/// is enabled or not on the Master, it does not track whether network policy
3942/// is enabled for the nodes.
3943#[serde_with::serde_as]
3944#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3945#[serde(default, rename_all = "camelCase")]
3946#[non_exhaustive]
3947pub struct NetworkPolicyConfig {
3948    /// Whether NetworkPolicy is enabled for this cluster.
3949    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3950    pub disabled: bool,
3951
3952    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3953    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3954}
3955
3956impl NetworkPolicyConfig {
3957    pub fn new() -> Self {
3958        std::default::Default::default()
3959    }
3960
3961    /// Sets the value of [disabled][crate::model::NetworkPolicyConfig::disabled].
3962    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3963        self.disabled = v.into();
3964        self
3965    }
3966}
3967
3968impl wkt::message::Message for NetworkPolicyConfig {
3969    fn typename() -> &'static str {
3970        "type.googleapis.com/google.container.v1.NetworkPolicyConfig"
3971    }
3972}
3973
3974/// Configuration for NodeLocal DNSCache
3975#[serde_with::serde_as]
3976#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3977#[serde(default, rename_all = "camelCase")]
3978#[non_exhaustive]
3979pub struct DnsCacheConfig {
3980    /// Whether NodeLocal DNSCache is enabled for this cluster.
3981    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3982    pub enabled: bool,
3983
3984    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3985    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3986}
3987
3988impl DnsCacheConfig {
3989    pub fn new() -> Self {
3990        std::default::Default::default()
3991    }
3992
3993    /// Sets the value of [enabled][crate::model::DnsCacheConfig::enabled].
3994    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3995        self.enabled = v.into();
3996        self
3997    }
3998}
3999
4000impl wkt::message::Message for DnsCacheConfig {
4001    fn typename() -> &'static str {
4002        "type.googleapis.com/google.container.v1.DnsCacheConfig"
4003    }
4004}
4005
4006/// Configuration for controlling master global access settings.
4007#[serde_with::serde_as]
4008#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4009#[serde(default, rename_all = "camelCase")]
4010#[non_exhaustive]
4011pub struct PrivateClusterMasterGlobalAccessConfig {
4012    /// Whenever master is accessible globally or not.
4013    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4014    pub enabled: bool,
4015
4016    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4017    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4018}
4019
4020impl PrivateClusterMasterGlobalAccessConfig {
4021    pub fn new() -> Self {
4022        std::default::Default::default()
4023    }
4024
4025    /// Sets the value of [enabled][crate::model::PrivateClusterMasterGlobalAccessConfig::enabled].
4026    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4027        self.enabled = v.into();
4028        self
4029    }
4030}
4031
4032impl wkt::message::Message for PrivateClusterMasterGlobalAccessConfig {
4033    fn typename() -> &'static str {
4034        "type.googleapis.com/google.container.v1.PrivateClusterMasterGlobalAccessConfig"
4035    }
4036}
4037
4038/// Configuration options for private clusters.
4039#[serde_with::serde_as]
4040#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4041#[serde(default, rename_all = "camelCase")]
4042#[non_exhaustive]
4043pub struct PrivateClusterConfig {
4044    /// Whether nodes have internal IP addresses only. If enabled, all nodes are
4045    /// given only RFC 1918 private addresses and communicate with the master via
4046    /// private networking.
4047    ///
4048    /// Deprecated: Use
4049    /// [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes]
4050    /// instead.
4051    ///
4052    /// [google.container.v1.NetworkConfig.default_enable_private_nodes]: crate::model::NetworkConfig::default_enable_private_nodes
4053    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4054    #[deprecated]
4055    pub enable_private_nodes: bool,
4056
4057    /// Whether the master's internal IP address is used as the cluster endpoint.
4058    ///
4059    /// Deprecated: Use
4060    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint]
4061    /// instead. Note that the value of enable_public_endpoint is reversed: if
4062    /// enable_private_endpoint is false, then enable_public_endpoint will be true.
4063    ///
4064    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::enable_public_endpoint
4065    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4066    #[deprecated]
4067    pub enable_private_endpoint: bool,
4068
4069    /// The IP range in CIDR notation to use for the hosted master network. This
4070    /// range will be used for assigning internal IP addresses to the master or
4071    /// set of masters, as well as the ILB VIP. This range must not overlap with
4072    /// any other ranges in use within the cluster's network.
4073    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4074    pub master_ipv4_cidr_block: std::string::String,
4075
4076    /// Output only. The internal IP address of this cluster's master endpoint.
4077    ///
4078    /// Deprecated: Use
4079    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint]
4080    /// instead.
4081    ///
4082    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint
4083    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4084    #[deprecated]
4085    pub private_endpoint: std::string::String,
4086
4087    /// Output only. The external IP address of this cluster's master endpoint.
4088    ///
4089    /// Deprecated:Use
4090    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint]
4091    /// instead.
4092    ///
4093    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::public_endpoint
4094    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4095    #[deprecated]
4096    pub public_endpoint: std::string::String,
4097
4098    /// Output only. The peering name in the customer VPC used by this cluster.
4099    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4100    pub peering_name: std::string::String,
4101
4102    /// Controls master global access settings.
4103    ///
4104    /// Deprecated: Use
4105    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][]
4106    /// instead.
4107    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4108    #[deprecated]
4109    pub master_global_access_config:
4110        std::option::Option<crate::model::PrivateClusterMasterGlobalAccessConfig>,
4111
4112    /// Subnet to provision the master's private endpoint during cluster creation.
4113    /// Specified in projects/*/regions/*/subnetworks/* format.
4114    ///
4115    /// Deprecated: Use
4116    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork]
4117    /// instead.
4118    ///
4119    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint_subnetwork
4120    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4121    #[deprecated]
4122    pub private_endpoint_subnetwork: std::string::String,
4123
4124    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4125    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4126}
4127
4128impl PrivateClusterConfig {
4129    pub fn new() -> Self {
4130        std::default::Default::default()
4131    }
4132
4133    /// Sets the value of [enable_private_nodes][crate::model::PrivateClusterConfig::enable_private_nodes].
4134    #[deprecated]
4135    pub fn set_enable_private_nodes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4136        self.enable_private_nodes = v.into();
4137        self
4138    }
4139
4140    /// Sets the value of [enable_private_endpoint][crate::model::PrivateClusterConfig::enable_private_endpoint].
4141    #[deprecated]
4142    pub fn set_enable_private_endpoint<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4143        self.enable_private_endpoint = v.into();
4144        self
4145    }
4146
4147    /// Sets the value of [master_ipv4_cidr_block][crate::model::PrivateClusterConfig::master_ipv4_cidr_block].
4148    pub fn set_master_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
4149        mut self,
4150        v: T,
4151    ) -> Self {
4152        self.master_ipv4_cidr_block = v.into();
4153        self
4154    }
4155
4156    /// Sets the value of [private_endpoint][crate::model::PrivateClusterConfig::private_endpoint].
4157    #[deprecated]
4158    pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
4159        mut self,
4160        v: T,
4161    ) -> Self {
4162        self.private_endpoint = v.into();
4163        self
4164    }
4165
4166    /// Sets the value of [public_endpoint][crate::model::PrivateClusterConfig::public_endpoint].
4167    #[deprecated]
4168    pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4169        self.public_endpoint = v.into();
4170        self
4171    }
4172
4173    /// Sets the value of [peering_name][crate::model::PrivateClusterConfig::peering_name].
4174    pub fn set_peering_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4175        self.peering_name = v.into();
4176        self
4177    }
4178
4179    /// Sets the value of [master_global_access_config][crate::model::PrivateClusterConfig::master_global_access_config].
4180    #[deprecated]
4181    pub fn set_master_global_access_config<
4182        T: std::convert::Into<
4183                std::option::Option<crate::model::PrivateClusterMasterGlobalAccessConfig>,
4184            >,
4185    >(
4186        mut self,
4187        v: T,
4188    ) -> Self {
4189        self.master_global_access_config = v.into();
4190        self
4191    }
4192
4193    /// Sets the value of [private_endpoint_subnetwork][crate::model::PrivateClusterConfig::private_endpoint_subnetwork].
4194    #[deprecated]
4195    pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
4196        mut self,
4197        v: T,
4198    ) -> Self {
4199        self.private_endpoint_subnetwork = v.into();
4200        self
4201    }
4202}
4203
4204impl wkt::message::Message for PrivateClusterConfig {
4205    fn typename() -> &'static str {
4206        "type.googleapis.com/google.container.v1.PrivateClusterConfig"
4207    }
4208}
4209
4210/// Configuration for returning group information from authenticators.
4211#[serde_with::serde_as]
4212#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4213#[serde(default, rename_all = "camelCase")]
4214#[non_exhaustive]
4215pub struct AuthenticatorGroupsConfig {
4216    /// Whether this cluster should return group membership lookups
4217    /// during authentication using a group of security groups.
4218    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4219    pub enabled: bool,
4220
4221    /// The name of the security group-of-groups to be used. Only relevant
4222    /// if enabled = true.
4223    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4224    pub security_group: std::string::String,
4225
4226    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4227    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4228}
4229
4230impl AuthenticatorGroupsConfig {
4231    pub fn new() -> Self {
4232        std::default::Default::default()
4233    }
4234
4235    /// Sets the value of [enabled][crate::model::AuthenticatorGroupsConfig::enabled].
4236    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4237        self.enabled = v.into();
4238        self
4239    }
4240
4241    /// Sets the value of [security_group][crate::model::AuthenticatorGroupsConfig::security_group].
4242    pub fn set_security_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4243        self.security_group = v.into();
4244        self
4245    }
4246}
4247
4248impl wkt::message::Message for AuthenticatorGroupsConfig {
4249    fn typename() -> &'static str {
4250        "type.googleapis.com/google.container.v1.AuthenticatorGroupsConfig"
4251    }
4252}
4253
4254/// Configuration options for the Cloud Run feature.
4255#[serde_with::serde_as]
4256#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4257#[serde(default, rename_all = "camelCase")]
4258#[non_exhaustive]
4259pub struct CloudRunConfig {
4260    /// Whether Cloud Run addon is enabled for this cluster.
4261    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4262    pub disabled: bool,
4263
4264    /// Which load balancer type is installed for Cloud Run.
4265    pub load_balancer_type: crate::model::cloud_run_config::LoadBalancerType,
4266
4267    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4268    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4269}
4270
4271impl CloudRunConfig {
4272    pub fn new() -> Self {
4273        std::default::Default::default()
4274    }
4275
4276    /// Sets the value of [disabled][crate::model::CloudRunConfig::disabled].
4277    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4278        self.disabled = v.into();
4279        self
4280    }
4281
4282    /// Sets the value of [load_balancer_type][crate::model::CloudRunConfig::load_balancer_type].
4283    pub fn set_load_balancer_type<
4284        T: std::convert::Into<crate::model::cloud_run_config::LoadBalancerType>,
4285    >(
4286        mut self,
4287        v: T,
4288    ) -> Self {
4289        self.load_balancer_type = v.into();
4290        self
4291    }
4292}
4293
4294impl wkt::message::Message for CloudRunConfig {
4295    fn typename() -> &'static str {
4296        "type.googleapis.com/google.container.v1.CloudRunConfig"
4297    }
4298}
4299
4300/// Defines additional types related to [CloudRunConfig].
4301pub mod cloud_run_config {
4302    #[allow(unused_imports)]
4303    use super::*;
4304
4305    /// Load balancer type of ingress service of Cloud Run.
4306    ///
4307    /// # Working with unknown values
4308    ///
4309    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4310    /// additional enum variants at any time. Adding new variants is not considered
4311    /// a breaking change. Applications should write their code in anticipation of:
4312    ///
4313    /// - New values appearing in future releases of the client library, **and**
4314    /// - New values received dynamically, without application changes.
4315    ///
4316    /// Please consult the [Working with enums] section in the user guide for some
4317    /// guidelines.
4318    ///
4319    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4320    #[derive(Clone, Debug, PartialEq)]
4321    #[non_exhaustive]
4322    pub enum LoadBalancerType {
4323        /// Load balancer type for Cloud Run is unspecified.
4324        Unspecified,
4325        /// Install external load balancer for Cloud Run.
4326        External,
4327        /// Install internal load balancer for Cloud Run.
4328        Internal,
4329        /// If set, the enum was initialized with an unknown value.
4330        ///
4331        /// Applications can examine the value using [LoadBalancerType::value] or
4332        /// [LoadBalancerType::name].
4333        UnknownValue(load_balancer_type::UnknownValue),
4334    }
4335
4336    #[doc(hidden)]
4337    pub mod load_balancer_type {
4338        #[allow(unused_imports)]
4339        use super::*;
4340        #[derive(Clone, Debug, PartialEq)]
4341        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4342    }
4343
4344    impl LoadBalancerType {
4345        /// Gets the enum value.
4346        ///
4347        /// Returns `None` if the enum contains an unknown value deserialized from
4348        /// the string representation of enums.
4349        pub fn value(&self) -> std::option::Option<i32> {
4350            match self {
4351                Self::Unspecified => std::option::Option::Some(0),
4352                Self::External => std::option::Option::Some(1),
4353                Self::Internal => std::option::Option::Some(2),
4354                Self::UnknownValue(u) => u.0.value(),
4355            }
4356        }
4357
4358        /// Gets the enum value as a string.
4359        ///
4360        /// Returns `None` if the enum contains an unknown value deserialized from
4361        /// the integer representation of enums.
4362        pub fn name(&self) -> std::option::Option<&str> {
4363            match self {
4364                Self::Unspecified => std::option::Option::Some("LOAD_BALANCER_TYPE_UNSPECIFIED"),
4365                Self::External => std::option::Option::Some("LOAD_BALANCER_TYPE_EXTERNAL"),
4366                Self::Internal => std::option::Option::Some("LOAD_BALANCER_TYPE_INTERNAL"),
4367                Self::UnknownValue(u) => u.0.name(),
4368            }
4369        }
4370    }
4371
4372    impl std::default::Default for LoadBalancerType {
4373        fn default() -> Self {
4374            use std::convert::From;
4375            Self::from(0)
4376        }
4377    }
4378
4379    impl std::fmt::Display for LoadBalancerType {
4380        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4381            wkt::internal::display_enum(f, self.name(), self.value())
4382        }
4383    }
4384
4385    impl std::convert::From<i32> for LoadBalancerType {
4386        fn from(value: i32) -> Self {
4387            match value {
4388                0 => Self::Unspecified,
4389                1 => Self::External,
4390                2 => Self::Internal,
4391                _ => Self::UnknownValue(load_balancer_type::UnknownValue(
4392                    wkt::internal::UnknownEnumValue::Integer(value),
4393                )),
4394            }
4395        }
4396    }
4397
4398    impl std::convert::From<&str> for LoadBalancerType {
4399        fn from(value: &str) -> Self {
4400            use std::string::ToString;
4401            match value {
4402                "LOAD_BALANCER_TYPE_UNSPECIFIED" => Self::Unspecified,
4403                "LOAD_BALANCER_TYPE_EXTERNAL" => Self::External,
4404                "LOAD_BALANCER_TYPE_INTERNAL" => Self::Internal,
4405                _ => Self::UnknownValue(load_balancer_type::UnknownValue(
4406                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4407                )),
4408            }
4409        }
4410    }
4411
4412    impl serde::ser::Serialize for LoadBalancerType {
4413        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4414        where
4415            S: serde::Serializer,
4416        {
4417            match self {
4418                Self::Unspecified => serializer.serialize_i32(0),
4419                Self::External => serializer.serialize_i32(1),
4420                Self::Internal => serializer.serialize_i32(2),
4421                Self::UnknownValue(u) => u.0.serialize(serializer),
4422            }
4423        }
4424    }
4425
4426    impl<'de> serde::de::Deserialize<'de> for LoadBalancerType {
4427        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4428        where
4429            D: serde::Deserializer<'de>,
4430        {
4431            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoadBalancerType>::new(
4432                ".google.container.v1.CloudRunConfig.LoadBalancerType",
4433            ))
4434        }
4435    }
4436}
4437
4438/// Configuration options for the Config Connector add-on.
4439#[serde_with::serde_as]
4440#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4441#[serde(default, rename_all = "camelCase")]
4442#[non_exhaustive]
4443pub struct ConfigConnectorConfig {
4444    /// Whether Cloud Connector is enabled for this cluster.
4445    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4446    pub enabled: bool,
4447
4448    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4449    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4450}
4451
4452impl ConfigConnectorConfig {
4453    pub fn new() -> Self {
4454        std::default::Default::default()
4455    }
4456
4457    /// Sets the value of [enabled][crate::model::ConfigConnectorConfig::enabled].
4458    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4459        self.enabled = v.into();
4460        self
4461    }
4462}
4463
4464impl wkt::message::Message for ConfigConnectorConfig {
4465    fn typename() -> &'static str {
4466        "type.googleapis.com/google.container.v1.ConfigConnectorConfig"
4467    }
4468}
4469
4470/// Configuration for the Compute Engine PD CSI driver.
4471#[serde_with::serde_as]
4472#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4473#[serde(default, rename_all = "camelCase")]
4474#[non_exhaustive]
4475pub struct GcePersistentDiskCsiDriverConfig {
4476    /// Whether the Compute Engine PD CSI driver is enabled for this cluster.
4477    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4478    pub enabled: bool,
4479
4480    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4481    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4482}
4483
4484impl GcePersistentDiskCsiDriverConfig {
4485    pub fn new() -> Self {
4486        std::default::Default::default()
4487    }
4488
4489    /// Sets the value of [enabled][crate::model::GcePersistentDiskCsiDriverConfig::enabled].
4490    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4491        self.enabled = v.into();
4492        self
4493    }
4494}
4495
4496impl wkt::message::Message for GcePersistentDiskCsiDriverConfig {
4497    fn typename() -> &'static str {
4498        "type.googleapis.com/google.container.v1.GcePersistentDiskCsiDriverConfig"
4499    }
4500}
4501
4502/// Configuration for the GCP Filestore CSI driver.
4503#[serde_with::serde_as]
4504#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4505#[serde(default, rename_all = "camelCase")]
4506#[non_exhaustive]
4507pub struct GcpFilestoreCsiDriverConfig {
4508    /// Whether the GCP Filestore CSI driver is enabled for this cluster.
4509    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4510    pub enabled: bool,
4511
4512    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4513    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4514}
4515
4516impl GcpFilestoreCsiDriverConfig {
4517    pub fn new() -> Self {
4518        std::default::Default::default()
4519    }
4520
4521    /// Sets the value of [enabled][crate::model::GcpFilestoreCsiDriverConfig::enabled].
4522    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4523        self.enabled = v.into();
4524        self
4525    }
4526}
4527
4528impl wkt::message::Message for GcpFilestoreCsiDriverConfig {
4529    fn typename() -> &'static str {
4530        "type.googleapis.com/google.container.v1.GcpFilestoreCsiDriverConfig"
4531    }
4532}
4533
4534/// Configuration for the Cloud Storage Fuse CSI driver.
4535#[serde_with::serde_as]
4536#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4537#[serde(default, rename_all = "camelCase")]
4538#[non_exhaustive]
4539pub struct GcsFuseCsiDriverConfig {
4540    /// Whether the Cloud Storage Fuse CSI driver is enabled for this cluster.
4541    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4542    pub enabled: bool,
4543
4544    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4545    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4546}
4547
4548impl GcsFuseCsiDriverConfig {
4549    pub fn new() -> Self {
4550        std::default::Default::default()
4551    }
4552
4553    /// Sets the value of [enabled][crate::model::GcsFuseCsiDriverConfig::enabled].
4554    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4555        self.enabled = v.into();
4556        self
4557    }
4558}
4559
4560impl wkt::message::Message for GcsFuseCsiDriverConfig {
4561    fn typename() -> &'static str {
4562        "type.googleapis.com/google.container.v1.GcsFuseCsiDriverConfig"
4563    }
4564}
4565
4566/// Configuration for the Cloud Storage Parallelstore CSI driver.
4567#[serde_with::serde_as]
4568#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4569#[serde(default, rename_all = "camelCase")]
4570#[non_exhaustive]
4571pub struct ParallelstoreCsiDriverConfig {
4572    /// Whether the Cloud Storage Parallelstore CSI driver is enabled for this
4573    /// cluster.
4574    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4575    pub enabled: bool,
4576
4577    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4578    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4579}
4580
4581impl ParallelstoreCsiDriverConfig {
4582    pub fn new() -> Self {
4583        std::default::Default::default()
4584    }
4585
4586    /// Sets the value of [enabled][crate::model::ParallelstoreCsiDriverConfig::enabled].
4587    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4588        self.enabled = v.into();
4589        self
4590    }
4591}
4592
4593impl wkt::message::Message for ParallelstoreCsiDriverConfig {
4594    fn typename() -> &'static str {
4595        "type.googleapis.com/google.container.v1.ParallelstoreCsiDriverConfig"
4596    }
4597}
4598
4599/// Configuration options for the Ray Operator add-on.
4600#[serde_with::serde_as]
4601#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4602#[serde(default, rename_all = "camelCase")]
4603#[non_exhaustive]
4604pub struct RayOperatorConfig {
4605    /// Whether the Ray Operator addon is enabled for this cluster.
4606    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4607    pub enabled: bool,
4608
4609    /// Optional. Logging configuration for Ray clusters.
4610    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4611    pub ray_cluster_logging_config: std::option::Option<crate::model::RayClusterLoggingConfig>,
4612
4613    /// Optional. Monitoring configuration for Ray clusters.
4614    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4615    pub ray_cluster_monitoring_config:
4616        std::option::Option<crate::model::RayClusterMonitoringConfig>,
4617
4618    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4619    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4620}
4621
4622impl RayOperatorConfig {
4623    pub fn new() -> Self {
4624        std::default::Default::default()
4625    }
4626
4627    /// Sets the value of [enabled][crate::model::RayOperatorConfig::enabled].
4628    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4629        self.enabled = v.into();
4630        self
4631    }
4632
4633    /// Sets the value of [ray_cluster_logging_config][crate::model::RayOperatorConfig::ray_cluster_logging_config].
4634    pub fn set_ray_cluster_logging_config<
4635        T: std::convert::Into<std::option::Option<crate::model::RayClusterLoggingConfig>>,
4636    >(
4637        mut self,
4638        v: T,
4639    ) -> Self {
4640        self.ray_cluster_logging_config = v.into();
4641        self
4642    }
4643
4644    /// Sets the value of [ray_cluster_monitoring_config][crate::model::RayOperatorConfig::ray_cluster_monitoring_config].
4645    pub fn set_ray_cluster_monitoring_config<
4646        T: std::convert::Into<std::option::Option<crate::model::RayClusterMonitoringConfig>>,
4647    >(
4648        mut self,
4649        v: T,
4650    ) -> Self {
4651        self.ray_cluster_monitoring_config = v.into();
4652        self
4653    }
4654}
4655
4656impl wkt::message::Message for RayOperatorConfig {
4657    fn typename() -> &'static str {
4658        "type.googleapis.com/google.container.v1.RayOperatorConfig"
4659    }
4660}
4661
4662/// Configuration for the Backup for GKE Agent.
4663#[serde_with::serde_as]
4664#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4665#[serde(default, rename_all = "camelCase")]
4666#[non_exhaustive]
4667pub struct GkeBackupAgentConfig {
4668    /// Whether the Backup for GKE agent is enabled for this cluster.
4669    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4670    pub enabled: bool,
4671
4672    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4673    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4674}
4675
4676impl GkeBackupAgentConfig {
4677    pub fn new() -> Self {
4678        std::default::Default::default()
4679    }
4680
4681    /// Sets the value of [enabled][crate::model::GkeBackupAgentConfig::enabled].
4682    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4683        self.enabled = v.into();
4684        self
4685    }
4686}
4687
4688impl wkt::message::Message for GkeBackupAgentConfig {
4689    fn typename() -> &'static str {
4690        "type.googleapis.com/google.container.v1.GkeBackupAgentConfig"
4691    }
4692}
4693
4694/// Configuration for the Stateful HA add-on.
4695#[serde_with::serde_as]
4696#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4697#[serde(default, rename_all = "camelCase")]
4698#[non_exhaustive]
4699pub struct StatefulHAConfig {
4700    /// Whether the Stateful HA add-on is enabled for this cluster.
4701    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4702    pub enabled: bool,
4703
4704    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4705    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4706}
4707
4708impl StatefulHAConfig {
4709    pub fn new() -> Self {
4710        std::default::Default::default()
4711    }
4712
4713    /// Sets the value of [enabled][crate::model::StatefulHAConfig::enabled].
4714    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4715        self.enabled = v.into();
4716        self
4717    }
4718}
4719
4720impl wkt::message::Message for StatefulHAConfig {
4721    fn typename() -> &'static str {
4722        "type.googleapis.com/google.container.v1.StatefulHAConfig"
4723    }
4724}
4725
4726/// Configuration options for the master authorized networks feature. Enabled
4727/// master authorized networks will disallow all external traffic to access
4728/// Kubernetes master through HTTPS except traffic from the given CIDR blocks,
4729/// Google Compute Engine Public IPs and Google Prod IPs.
4730#[serde_with::serde_as]
4731#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4732#[serde(default, rename_all = "camelCase")]
4733#[non_exhaustive]
4734pub struct MasterAuthorizedNetworksConfig {
4735    /// Whether or not master authorized networks is enabled.
4736    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4737    pub enabled: bool,
4738
4739    /// cidr_blocks define up to 50 external networks that could access
4740    /// Kubernetes master through HTTPS.
4741    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4742    pub cidr_blocks: std::vec::Vec<crate::model::master_authorized_networks_config::CidrBlock>,
4743
4744    /// Whether master is accessbile via Google Compute Engine Public IP addresses.
4745    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4746    pub gcp_public_cidrs_access_enabled: std::option::Option<bool>,
4747
4748    /// Whether master authorized networks is enforced on private endpoint or not.
4749    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4750    pub private_endpoint_enforcement_enabled: std::option::Option<bool>,
4751
4752    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4753    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4754}
4755
4756impl MasterAuthorizedNetworksConfig {
4757    pub fn new() -> Self {
4758        std::default::Default::default()
4759    }
4760
4761    /// Sets the value of [enabled][crate::model::MasterAuthorizedNetworksConfig::enabled].
4762    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4763        self.enabled = v.into();
4764        self
4765    }
4766
4767    /// Sets the value of [cidr_blocks][crate::model::MasterAuthorizedNetworksConfig::cidr_blocks].
4768    pub fn set_cidr_blocks<T, V>(mut self, v: T) -> Self
4769    where
4770        T: std::iter::IntoIterator<Item = V>,
4771        V: std::convert::Into<crate::model::master_authorized_networks_config::CidrBlock>,
4772    {
4773        use std::iter::Iterator;
4774        self.cidr_blocks = v.into_iter().map(|i| i.into()).collect();
4775        self
4776    }
4777
4778    /// Sets the value of [gcp_public_cidrs_access_enabled][crate::model::MasterAuthorizedNetworksConfig::gcp_public_cidrs_access_enabled].
4779    pub fn set_gcp_public_cidrs_access_enabled<T: std::convert::Into<std::option::Option<bool>>>(
4780        mut self,
4781        v: T,
4782    ) -> Self {
4783        self.gcp_public_cidrs_access_enabled = v.into();
4784        self
4785    }
4786
4787    /// Sets the value of [private_endpoint_enforcement_enabled][crate::model::MasterAuthorizedNetworksConfig::private_endpoint_enforcement_enabled].
4788    pub fn set_private_endpoint_enforcement_enabled<
4789        T: std::convert::Into<std::option::Option<bool>>,
4790    >(
4791        mut self,
4792        v: T,
4793    ) -> Self {
4794        self.private_endpoint_enforcement_enabled = v.into();
4795        self
4796    }
4797}
4798
4799impl wkt::message::Message for MasterAuthorizedNetworksConfig {
4800    fn typename() -> &'static str {
4801        "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig"
4802    }
4803}
4804
4805/// Defines additional types related to [MasterAuthorizedNetworksConfig].
4806pub mod master_authorized_networks_config {
4807    #[allow(unused_imports)]
4808    use super::*;
4809
4810    /// CidrBlock contains an optional name and one CIDR block.
4811    #[serde_with::serde_as]
4812    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4813    #[serde(default, rename_all = "camelCase")]
4814    #[non_exhaustive]
4815    pub struct CidrBlock {
4816        /// display_name is an optional field for users to identify CIDR blocks.
4817        #[serde(skip_serializing_if = "std::string::String::is_empty")]
4818        pub display_name: std::string::String,
4819
4820        /// cidr_block must be specified in CIDR notation.
4821        #[serde(skip_serializing_if = "std::string::String::is_empty")]
4822        pub cidr_block: std::string::String,
4823
4824        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4825        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4826    }
4827
4828    impl CidrBlock {
4829        pub fn new() -> Self {
4830            std::default::Default::default()
4831        }
4832
4833        /// Sets the value of [display_name][crate::model::master_authorized_networks_config::CidrBlock::display_name].
4834        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
4835            mut self,
4836            v: T,
4837        ) -> Self {
4838            self.display_name = v.into();
4839            self
4840        }
4841
4842        /// Sets the value of [cidr_block][crate::model::master_authorized_networks_config::CidrBlock::cidr_block].
4843        pub fn set_cidr_block<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4844            self.cidr_block = v.into();
4845            self
4846        }
4847    }
4848
4849    impl wkt::message::Message for CidrBlock {
4850        fn typename() -> &'static str {
4851            "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock"
4852        }
4853    }
4854}
4855
4856/// Configuration for the legacy Attribute Based Access Control authorization
4857/// mode.
4858#[serde_with::serde_as]
4859#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4860#[serde(default, rename_all = "camelCase")]
4861#[non_exhaustive]
4862pub struct LegacyAbac {
4863    /// Whether the ABAC authorizer is enabled for this cluster. When enabled,
4864    /// identities in the system, including service accounts, nodes, and
4865    /// controllers, will have statically granted permissions beyond those
4866    /// provided by the RBAC configuration or IAM.
4867    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4868    pub enabled: bool,
4869
4870    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4871    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4872}
4873
4874impl LegacyAbac {
4875    pub fn new() -> Self {
4876        std::default::Default::default()
4877    }
4878
4879    /// Sets the value of [enabled][crate::model::LegacyAbac::enabled].
4880    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4881        self.enabled = v.into();
4882        self
4883    }
4884}
4885
4886impl wkt::message::Message for LegacyAbac {
4887    fn typename() -> &'static str {
4888        "type.googleapis.com/google.container.v1.LegacyAbac"
4889    }
4890}
4891
4892/// Configuration options for the NetworkPolicy feature.
4893/// <https://kubernetes.io/docs/concepts/services-networking/networkpolicies/>
4894#[serde_with::serde_as]
4895#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4896#[serde(default, rename_all = "camelCase")]
4897#[non_exhaustive]
4898pub struct NetworkPolicy {
4899    /// The selected network policy provider.
4900    pub provider: crate::model::network_policy::Provider,
4901
4902    /// Whether network policy is enabled on the cluster.
4903    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4904    pub enabled: bool,
4905
4906    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4907    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4908}
4909
4910impl NetworkPolicy {
4911    pub fn new() -> Self {
4912        std::default::Default::default()
4913    }
4914
4915    /// Sets the value of [provider][crate::model::NetworkPolicy::provider].
4916    pub fn set_provider<T: std::convert::Into<crate::model::network_policy::Provider>>(
4917        mut self,
4918        v: T,
4919    ) -> Self {
4920        self.provider = v.into();
4921        self
4922    }
4923
4924    /// Sets the value of [enabled][crate::model::NetworkPolicy::enabled].
4925    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4926        self.enabled = v.into();
4927        self
4928    }
4929}
4930
4931impl wkt::message::Message for NetworkPolicy {
4932    fn typename() -> &'static str {
4933        "type.googleapis.com/google.container.v1.NetworkPolicy"
4934    }
4935}
4936
4937/// Defines additional types related to [NetworkPolicy].
4938pub mod network_policy {
4939    #[allow(unused_imports)]
4940    use super::*;
4941
4942    /// Allowed Network Policy providers.
4943    ///
4944    /// # Working with unknown values
4945    ///
4946    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4947    /// additional enum variants at any time. Adding new variants is not considered
4948    /// a breaking change. Applications should write their code in anticipation of:
4949    ///
4950    /// - New values appearing in future releases of the client library, **and**
4951    /// - New values received dynamically, without application changes.
4952    ///
4953    /// Please consult the [Working with enums] section in the user guide for some
4954    /// guidelines.
4955    ///
4956    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4957    #[derive(Clone, Debug, PartialEq)]
4958    #[non_exhaustive]
4959    pub enum Provider {
4960        /// Not set
4961        Unspecified,
4962        /// Tigera (Calico Felix).
4963        Calico,
4964        /// If set, the enum was initialized with an unknown value.
4965        ///
4966        /// Applications can examine the value using [Provider::value] or
4967        /// [Provider::name].
4968        UnknownValue(provider::UnknownValue),
4969    }
4970
4971    #[doc(hidden)]
4972    pub mod provider {
4973        #[allow(unused_imports)]
4974        use super::*;
4975        #[derive(Clone, Debug, PartialEq)]
4976        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4977    }
4978
4979    impl Provider {
4980        /// Gets the enum value.
4981        ///
4982        /// Returns `None` if the enum contains an unknown value deserialized from
4983        /// the string representation of enums.
4984        pub fn value(&self) -> std::option::Option<i32> {
4985            match self {
4986                Self::Unspecified => std::option::Option::Some(0),
4987                Self::Calico => std::option::Option::Some(1),
4988                Self::UnknownValue(u) => u.0.value(),
4989            }
4990        }
4991
4992        /// Gets the enum value as a string.
4993        ///
4994        /// Returns `None` if the enum contains an unknown value deserialized from
4995        /// the integer representation of enums.
4996        pub fn name(&self) -> std::option::Option<&str> {
4997            match self {
4998                Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
4999                Self::Calico => std::option::Option::Some("CALICO"),
5000                Self::UnknownValue(u) => u.0.name(),
5001            }
5002        }
5003    }
5004
5005    impl std::default::Default for Provider {
5006        fn default() -> Self {
5007            use std::convert::From;
5008            Self::from(0)
5009        }
5010    }
5011
5012    impl std::fmt::Display for Provider {
5013        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5014            wkt::internal::display_enum(f, self.name(), self.value())
5015        }
5016    }
5017
5018    impl std::convert::From<i32> for Provider {
5019        fn from(value: i32) -> Self {
5020            match value {
5021                0 => Self::Unspecified,
5022                1 => Self::Calico,
5023                _ => Self::UnknownValue(provider::UnknownValue(
5024                    wkt::internal::UnknownEnumValue::Integer(value),
5025                )),
5026            }
5027        }
5028    }
5029
5030    impl std::convert::From<&str> for Provider {
5031        fn from(value: &str) -> Self {
5032            use std::string::ToString;
5033            match value {
5034                "PROVIDER_UNSPECIFIED" => Self::Unspecified,
5035                "CALICO" => Self::Calico,
5036                _ => Self::UnknownValue(provider::UnknownValue(
5037                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5038                )),
5039            }
5040        }
5041    }
5042
5043    impl serde::ser::Serialize for Provider {
5044        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5045        where
5046            S: serde::Serializer,
5047        {
5048            match self {
5049                Self::Unspecified => serializer.serialize_i32(0),
5050                Self::Calico => serializer.serialize_i32(1),
5051                Self::UnknownValue(u) => u.0.serialize(serializer),
5052            }
5053        }
5054    }
5055
5056    impl<'de> serde::de::Deserialize<'de> for Provider {
5057        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5058        where
5059            D: serde::Deserializer<'de>,
5060        {
5061            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
5062                ".google.container.v1.NetworkPolicy.Provider",
5063            ))
5064        }
5065    }
5066}
5067
5068/// Configuration for Binary Authorization.
5069#[serde_with::serde_as]
5070#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5071#[serde(default, rename_all = "camelCase")]
5072#[non_exhaustive]
5073pub struct BinaryAuthorization {
5074    /// This field is deprecated. Leave this unset and instead configure
5075    /// BinaryAuthorization using evaluation_mode. If evaluation_mode is set to
5076    /// anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.
5077    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5078    #[deprecated]
5079    pub enabled: bool,
5080
5081    /// Mode of operation for binauthz policy evaluation. If unspecified, defaults
5082    /// to DISABLED.
5083    pub evaluation_mode: crate::model::binary_authorization::EvaluationMode,
5084
5085    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5086    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5087}
5088
5089impl BinaryAuthorization {
5090    pub fn new() -> Self {
5091        std::default::Default::default()
5092    }
5093
5094    /// Sets the value of [enabled][crate::model::BinaryAuthorization::enabled].
5095    #[deprecated]
5096    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5097        self.enabled = v.into();
5098        self
5099    }
5100
5101    /// Sets the value of [evaluation_mode][crate::model::BinaryAuthorization::evaluation_mode].
5102    pub fn set_evaluation_mode<
5103        T: std::convert::Into<crate::model::binary_authorization::EvaluationMode>,
5104    >(
5105        mut self,
5106        v: T,
5107    ) -> Self {
5108        self.evaluation_mode = v.into();
5109        self
5110    }
5111}
5112
5113impl wkt::message::Message for BinaryAuthorization {
5114    fn typename() -> &'static str {
5115        "type.googleapis.com/google.container.v1.BinaryAuthorization"
5116    }
5117}
5118
5119/// Defines additional types related to [BinaryAuthorization].
5120pub mod binary_authorization {
5121    #[allow(unused_imports)]
5122    use super::*;
5123
5124    /// Binary Authorization mode of operation.
5125    ///
5126    /// # Working with unknown values
5127    ///
5128    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5129    /// additional enum variants at any time. Adding new variants is not considered
5130    /// a breaking change. Applications should write their code in anticipation of:
5131    ///
5132    /// - New values appearing in future releases of the client library, **and**
5133    /// - New values received dynamically, without application changes.
5134    ///
5135    /// Please consult the [Working with enums] section in the user guide for some
5136    /// guidelines.
5137    ///
5138    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5139    #[derive(Clone, Debug, PartialEq)]
5140    #[non_exhaustive]
5141    pub enum EvaluationMode {
5142        /// Default value
5143        Unspecified,
5144        /// Disable BinaryAuthorization
5145        Disabled,
5146        /// Enforce Kubernetes admission requests with BinaryAuthorization using the
5147        /// project's singleton policy. This is equivalent to setting the
5148        /// enabled boolean to true.
5149        ProjectSingletonPolicyEnforce,
5150        /// If set, the enum was initialized with an unknown value.
5151        ///
5152        /// Applications can examine the value using [EvaluationMode::value] or
5153        /// [EvaluationMode::name].
5154        UnknownValue(evaluation_mode::UnknownValue),
5155    }
5156
5157    #[doc(hidden)]
5158    pub mod evaluation_mode {
5159        #[allow(unused_imports)]
5160        use super::*;
5161        #[derive(Clone, Debug, PartialEq)]
5162        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5163    }
5164
5165    impl EvaluationMode {
5166        /// Gets the enum value.
5167        ///
5168        /// Returns `None` if the enum contains an unknown value deserialized from
5169        /// the string representation of enums.
5170        pub fn value(&self) -> std::option::Option<i32> {
5171            match self {
5172                Self::Unspecified => std::option::Option::Some(0),
5173                Self::Disabled => std::option::Option::Some(1),
5174                Self::ProjectSingletonPolicyEnforce => std::option::Option::Some(2),
5175                Self::UnknownValue(u) => u.0.value(),
5176            }
5177        }
5178
5179        /// Gets the enum value as a string.
5180        ///
5181        /// Returns `None` if the enum contains an unknown value deserialized from
5182        /// the integer representation of enums.
5183        pub fn name(&self) -> std::option::Option<&str> {
5184            match self {
5185                Self::Unspecified => std::option::Option::Some("EVALUATION_MODE_UNSPECIFIED"),
5186                Self::Disabled => std::option::Option::Some("DISABLED"),
5187                Self::ProjectSingletonPolicyEnforce => {
5188                    std::option::Option::Some("PROJECT_SINGLETON_POLICY_ENFORCE")
5189                }
5190                Self::UnknownValue(u) => u.0.name(),
5191            }
5192        }
5193    }
5194
5195    impl std::default::Default for EvaluationMode {
5196        fn default() -> Self {
5197            use std::convert::From;
5198            Self::from(0)
5199        }
5200    }
5201
5202    impl std::fmt::Display for EvaluationMode {
5203        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5204            wkt::internal::display_enum(f, self.name(), self.value())
5205        }
5206    }
5207
5208    impl std::convert::From<i32> for EvaluationMode {
5209        fn from(value: i32) -> Self {
5210            match value {
5211                0 => Self::Unspecified,
5212                1 => Self::Disabled,
5213                2 => Self::ProjectSingletonPolicyEnforce,
5214                _ => Self::UnknownValue(evaluation_mode::UnknownValue(
5215                    wkt::internal::UnknownEnumValue::Integer(value),
5216                )),
5217            }
5218        }
5219    }
5220
5221    impl std::convert::From<&str> for EvaluationMode {
5222        fn from(value: &str) -> Self {
5223            use std::string::ToString;
5224            match value {
5225                "EVALUATION_MODE_UNSPECIFIED" => Self::Unspecified,
5226                "DISABLED" => Self::Disabled,
5227                "PROJECT_SINGLETON_POLICY_ENFORCE" => Self::ProjectSingletonPolicyEnforce,
5228                _ => Self::UnknownValue(evaluation_mode::UnknownValue(
5229                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5230                )),
5231            }
5232        }
5233    }
5234
5235    impl serde::ser::Serialize for EvaluationMode {
5236        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5237        where
5238            S: serde::Serializer,
5239        {
5240            match self {
5241                Self::Unspecified => serializer.serialize_i32(0),
5242                Self::Disabled => serializer.serialize_i32(1),
5243                Self::ProjectSingletonPolicyEnforce => serializer.serialize_i32(2),
5244                Self::UnknownValue(u) => u.0.serialize(serializer),
5245            }
5246        }
5247    }
5248
5249    impl<'de> serde::de::Deserialize<'de> for EvaluationMode {
5250        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5251        where
5252            D: serde::Deserializer<'de>,
5253        {
5254            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationMode>::new(
5255                ".google.container.v1.BinaryAuthorization.EvaluationMode",
5256            ))
5257        }
5258    }
5259}
5260
5261/// [PRIVATE FIELD]
5262/// Config for pod CIDR size overprovisioning.
5263#[serde_with::serde_as]
5264#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5265#[serde(default, rename_all = "camelCase")]
5266#[non_exhaustive]
5267pub struct PodCIDROverprovisionConfig {
5268    /// Whether Pod CIDR overprovisioning is disabled.
5269    /// Note: Pod CIDR overprovisioning is enabled by default.
5270    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5271    pub disable: bool,
5272
5273    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5274    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5275}
5276
5277impl PodCIDROverprovisionConfig {
5278    pub fn new() -> Self {
5279        std::default::Default::default()
5280    }
5281
5282    /// Sets the value of [disable][crate::model::PodCIDROverprovisionConfig::disable].
5283    pub fn set_disable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5284        self.disable = v.into();
5285        self
5286    }
5287}
5288
5289impl wkt::message::Message for PodCIDROverprovisionConfig {
5290    fn typename() -> &'static str {
5291        "type.googleapis.com/google.container.v1.PodCIDROverprovisionConfig"
5292    }
5293}
5294
5295/// Configuration for controlling how IPs are allocated in the cluster.
5296#[serde_with::serde_as]
5297#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5298#[serde(default, rename_all = "camelCase")]
5299#[non_exhaustive]
5300pub struct IPAllocationPolicy {
5301    /// Whether alias IPs will be used for pod IPs in the cluster.
5302    /// This is used in conjunction with use_routes. It cannot
5303    /// be true if use_routes is true. If both use_ip_aliases and use_routes are
5304    /// false, then the server picks the default IP allocation mode
5305    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5306    pub use_ip_aliases: bool,
5307
5308    /// Whether a new subnetwork will be created automatically for the cluster.
5309    ///
5310    /// This field is only applicable when `use_ip_aliases` is true.
5311    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5312    pub create_subnetwork: bool,
5313
5314    /// A custom subnetwork name to be used if `create_subnetwork` is true.  If
5315    /// this field is empty, then an automatic name will be chosen for the new
5316    /// subnetwork.
5317    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5318    pub subnetwork_name: std::string::String,
5319
5320    /// This field is deprecated, use cluster_ipv4_cidr_block.
5321    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5322    #[deprecated]
5323    pub cluster_ipv4_cidr: std::string::String,
5324
5325    /// This field is deprecated, use node_ipv4_cidr_block.
5326    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5327    #[deprecated]
5328    pub node_ipv4_cidr: std::string::String,
5329
5330    /// This field is deprecated, use services_ipv4_cidr_block.
5331    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5332    #[deprecated]
5333    pub services_ipv4_cidr: std::string::String,
5334
5335    /// The name of the secondary range to be used for the cluster CIDR
5336    /// block.  The secondary range will be used for pod IP
5337    /// addresses. This must be an existing secondary range associated
5338    /// with the cluster subnetwork.
5339    ///
5340    /// This field is only applicable with use_ip_aliases is true and
5341    /// create_subnetwork is false.
5342    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5343    pub cluster_secondary_range_name: std::string::String,
5344
5345    /// The name of the secondary range to be used as for the services
5346    /// CIDR block.  The secondary range will be used for service
5347    /// ClusterIPs. This must be an existing secondary range associated
5348    /// with the cluster subnetwork.
5349    ///
5350    /// This field is only applicable with use_ip_aliases is true and
5351    /// create_subnetwork is false.
5352    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5353    pub services_secondary_range_name: std::string::String,
5354
5355    /// The IP address range for the cluster pod IPs. If this field is set, then
5356    /// `cluster.cluster_ipv4_cidr` must be left blank.
5357    ///
5358    /// This field is only applicable when `use_ip_aliases` is true.
5359    ///
5360    /// Set to blank to have a range chosen with the default size.
5361    ///
5362    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
5363    /// netmask.
5364    ///
5365    /// Set to a
5366    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
5367    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
5368    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
5369    /// to use.
5370    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5371    pub cluster_ipv4_cidr_block: std::string::String,
5372
5373    /// The IP address range of the instance IPs in this cluster.
5374    ///
5375    /// This is applicable only if `create_subnetwork` is true.
5376    ///
5377    /// Set to blank to have a range chosen with the default size.
5378    ///
5379    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
5380    /// netmask.
5381    ///
5382    /// Set to a
5383    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
5384    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
5385    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
5386    /// to use.
5387    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5388    pub node_ipv4_cidr_block: std::string::String,
5389
5390    /// The IP address range of the services IPs in this cluster. If blank, a range
5391    /// will be automatically chosen with the default size.
5392    ///
5393    /// This field is only applicable when `use_ip_aliases` is true.
5394    ///
5395    /// Set to blank to have a range chosen with the default size.
5396    ///
5397    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
5398    /// netmask.
5399    ///
5400    /// Set to a
5401    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
5402    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
5403    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
5404    /// to use.
5405    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5406    pub services_ipv4_cidr_block: std::string::String,
5407
5408    /// The IP address range of the Cloud TPUs in this cluster. If unspecified, a
5409    /// range will be automatically chosen with the default size.
5410    ///
5411    /// This field is only applicable when `use_ip_aliases` is true.
5412    ///
5413    /// If unspecified, the range will use the default size.
5414    ///
5415    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
5416    /// netmask.
5417    ///
5418    /// Set to a
5419    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
5420    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
5421    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
5422    /// to use.
5423    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5424    pub tpu_ipv4_cidr_block: std::string::String,
5425
5426    /// Whether routes will be used for pod IPs in the cluster.
5427    /// This is used in conjunction with use_ip_aliases. It cannot be true if
5428    /// use_ip_aliases is true. If both use_ip_aliases and use_routes are false,
5429    /// then the server picks the default IP allocation mode
5430    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5431    pub use_routes: bool,
5432
5433    /// The IP stack type of the cluster
5434    pub stack_type: crate::model::StackType,
5435
5436    /// The ipv6 access type (internal or external) when create_subnetwork is true
5437    pub ipv6_access_type: crate::model::IPv6AccessType,
5438
5439    /// [PRIVATE FIELD]
5440    /// Pod CIDR size overprovisioning config for the cluster.
5441    ///
5442    /// Pod CIDR size per node depends on max_pods_per_node. By default, the value
5443    /// of max_pods_per_node is doubled and then rounded off to next power of 2 to
5444    /// get the size of pod CIDR block per node.
5445    /// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
5446    ///
5447    /// This config can disable the doubling of IPs (we still round off to next
5448    /// power of 2)
5449    /// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
5450    /// overprovisioning is disabled.
5451    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5452    pub pod_cidr_overprovision_config:
5453        std::option::Option<crate::model::PodCIDROverprovisionConfig>,
5454
5455    /// Output only. The subnet's IPv6 CIDR block used by nodes and pods.
5456    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5457    pub subnet_ipv6_cidr_block: std::string::String,
5458
5459    /// Output only. The services IPv6 CIDR block for the cluster.
5460    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5461    pub services_ipv6_cidr_block: std::string::String,
5462
5463    /// Output only. The additional pod ranges that are added to the cluster.
5464    /// These pod ranges can be used by new node pools to allocate pod IPs
5465    /// automatically. Once the range is removed it will not show up in
5466    /// IPAllocationPolicy.
5467    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5468    pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
5469
5470    /// Output only. The utilization of the cluster default IPv4 range for the
5471    /// pod. The ratio is Usage/[Total number of IPs in the secondary range],
5472    /// Usage=numNodes*numZones*podIPsPerNode.
5473    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5474    #[serde_as(as = "wkt::internal::F64")]
5475    pub default_pod_ipv4_range_utilization: f64,
5476
5477    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5478    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5479}
5480
5481impl IPAllocationPolicy {
5482    pub fn new() -> Self {
5483        std::default::Default::default()
5484    }
5485
5486    /// Sets the value of [use_ip_aliases][crate::model::IPAllocationPolicy::use_ip_aliases].
5487    pub fn set_use_ip_aliases<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5488        self.use_ip_aliases = v.into();
5489        self
5490    }
5491
5492    /// Sets the value of [create_subnetwork][crate::model::IPAllocationPolicy::create_subnetwork].
5493    pub fn set_create_subnetwork<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5494        self.create_subnetwork = v.into();
5495        self
5496    }
5497
5498    /// Sets the value of [subnetwork_name][crate::model::IPAllocationPolicy::subnetwork_name].
5499    pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5500        self.subnetwork_name = v.into();
5501        self
5502    }
5503
5504    /// Sets the value of [cluster_ipv4_cidr][crate::model::IPAllocationPolicy::cluster_ipv4_cidr].
5505    #[deprecated]
5506    pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
5507        mut self,
5508        v: T,
5509    ) -> Self {
5510        self.cluster_ipv4_cidr = v.into();
5511        self
5512    }
5513
5514    /// Sets the value of [node_ipv4_cidr][crate::model::IPAllocationPolicy::node_ipv4_cidr].
5515    #[deprecated]
5516    pub fn set_node_ipv4_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5517        self.node_ipv4_cidr = v.into();
5518        self
5519    }
5520
5521    /// Sets the value of [services_ipv4_cidr][crate::model::IPAllocationPolicy::services_ipv4_cidr].
5522    #[deprecated]
5523    pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
5524        mut self,
5525        v: T,
5526    ) -> Self {
5527        self.services_ipv4_cidr = v.into();
5528        self
5529    }
5530
5531    /// Sets the value of [cluster_secondary_range_name][crate::model::IPAllocationPolicy::cluster_secondary_range_name].
5532    pub fn set_cluster_secondary_range_name<T: std::convert::Into<std::string::String>>(
5533        mut self,
5534        v: T,
5535    ) -> Self {
5536        self.cluster_secondary_range_name = v.into();
5537        self
5538    }
5539
5540    /// Sets the value of [services_secondary_range_name][crate::model::IPAllocationPolicy::services_secondary_range_name].
5541    pub fn set_services_secondary_range_name<T: std::convert::Into<std::string::String>>(
5542        mut self,
5543        v: T,
5544    ) -> Self {
5545        self.services_secondary_range_name = v.into();
5546        self
5547    }
5548
5549    /// Sets the value of [cluster_ipv4_cidr_block][crate::model::IPAllocationPolicy::cluster_ipv4_cidr_block].
5550    pub fn set_cluster_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5551        mut self,
5552        v: T,
5553    ) -> Self {
5554        self.cluster_ipv4_cidr_block = v.into();
5555        self
5556    }
5557
5558    /// Sets the value of [node_ipv4_cidr_block][crate::model::IPAllocationPolicy::node_ipv4_cidr_block].
5559    pub fn set_node_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5560        mut self,
5561        v: T,
5562    ) -> Self {
5563        self.node_ipv4_cidr_block = v.into();
5564        self
5565    }
5566
5567    /// Sets the value of [services_ipv4_cidr_block][crate::model::IPAllocationPolicy::services_ipv4_cidr_block].
5568    pub fn set_services_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5569        mut self,
5570        v: T,
5571    ) -> Self {
5572        self.services_ipv4_cidr_block = v.into();
5573        self
5574    }
5575
5576    /// Sets the value of [tpu_ipv4_cidr_block][crate::model::IPAllocationPolicy::tpu_ipv4_cidr_block].
5577    pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5578        mut self,
5579        v: T,
5580    ) -> Self {
5581        self.tpu_ipv4_cidr_block = v.into();
5582        self
5583    }
5584
5585    /// Sets the value of [use_routes][crate::model::IPAllocationPolicy::use_routes].
5586    pub fn set_use_routes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5587        self.use_routes = v.into();
5588        self
5589    }
5590
5591    /// Sets the value of [stack_type][crate::model::IPAllocationPolicy::stack_type].
5592    pub fn set_stack_type<T: std::convert::Into<crate::model::StackType>>(mut self, v: T) -> Self {
5593        self.stack_type = v.into();
5594        self
5595    }
5596
5597    /// Sets the value of [ipv6_access_type][crate::model::IPAllocationPolicy::ipv6_access_type].
5598    pub fn set_ipv6_access_type<T: std::convert::Into<crate::model::IPv6AccessType>>(
5599        mut self,
5600        v: T,
5601    ) -> Self {
5602        self.ipv6_access_type = v.into();
5603        self
5604    }
5605
5606    /// Sets the value of [pod_cidr_overprovision_config][crate::model::IPAllocationPolicy::pod_cidr_overprovision_config].
5607    pub fn set_pod_cidr_overprovision_config<
5608        T: std::convert::Into<std::option::Option<crate::model::PodCIDROverprovisionConfig>>,
5609    >(
5610        mut self,
5611        v: T,
5612    ) -> Self {
5613        self.pod_cidr_overprovision_config = v.into();
5614        self
5615    }
5616
5617    /// Sets the value of [subnet_ipv6_cidr_block][crate::model::IPAllocationPolicy::subnet_ipv6_cidr_block].
5618    pub fn set_subnet_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
5619        mut self,
5620        v: T,
5621    ) -> Self {
5622        self.subnet_ipv6_cidr_block = v.into();
5623        self
5624    }
5625
5626    /// Sets the value of [services_ipv6_cidr_block][crate::model::IPAllocationPolicy::services_ipv6_cidr_block].
5627    pub fn set_services_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
5628        mut self,
5629        v: T,
5630    ) -> Self {
5631        self.services_ipv6_cidr_block = v.into();
5632        self
5633    }
5634
5635    /// Sets the value of [additional_pod_ranges_config][crate::model::IPAllocationPolicy::additional_pod_ranges_config].
5636    pub fn set_additional_pod_ranges_config<
5637        T: std::convert::Into<std::option::Option<crate::model::AdditionalPodRangesConfig>>,
5638    >(
5639        mut self,
5640        v: T,
5641    ) -> Self {
5642        self.additional_pod_ranges_config = v.into();
5643        self
5644    }
5645
5646    /// Sets the value of [default_pod_ipv4_range_utilization][crate::model::IPAllocationPolicy::default_pod_ipv4_range_utilization].
5647    pub fn set_default_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(
5648        mut self,
5649        v: T,
5650    ) -> Self {
5651        self.default_pod_ipv4_range_utilization = v.into();
5652        self
5653    }
5654}
5655
5656impl wkt::message::Message for IPAllocationPolicy {
5657    fn typename() -> &'static str {
5658        "type.googleapis.com/google.container.v1.IPAllocationPolicy"
5659    }
5660}
5661
5662/// A Google Kubernetes Engine cluster.
5663#[serde_with::serde_as]
5664#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5665#[serde(default, rename_all = "camelCase")]
5666#[non_exhaustive]
5667pub struct Cluster {
5668    /// The name of this cluster. The name must be unique within this project
5669    /// and location (e.g. zone or region), and can be up to 40 characters with
5670    /// the following restrictions:
5671    ///
5672    /// * Lowercase letters, numbers, and hyphens only.
5673    /// * Must start with a letter.
5674    /// * Must end with a number or a letter.
5675    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5676    pub name: std::string::String,
5677
5678    /// An optional description of this cluster.
5679    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5680    pub description: std::string::String,
5681
5682    /// The number of nodes to create in this cluster. You must ensure that your
5683    /// Compute Engine [resource quota](https://cloud.google.com/compute/quotas)
5684    /// is sufficient for this number of instances. You must also have available
5685    /// firewall and routes quota.
5686    /// For requests, this field should only be used in lieu of a
5687    /// "node_pool" object, since this configuration (along with the
5688    /// "node_config") will be used to create a "NodePool" object with an
5689    /// auto-generated name. Do not use this and a node_pool at the same time.
5690    ///
5691    /// This field is deprecated, use node_pool.initial_node_count instead.
5692    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5693    #[deprecated]
5694    pub initial_node_count: i32,
5695
5696    /// Parameters used in creating the cluster's nodes.
5697    /// For requests, this field should only be used in lieu of a
5698    /// "node_pool" object, since this configuration (along with the
5699    /// "initial_node_count") will be used to create a "NodePool" object with an
5700    /// auto-generated name. Do not use this and a node_pool at the same time.
5701    /// For responses, this field will be populated with the node configuration of
5702    /// the first node pool. (For configuration of each node pool, see
5703    /// `node_pool.config`)
5704    ///
5705    /// If unspecified, the defaults are used.
5706    /// This field is deprecated, use node_pool.config instead.
5707    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5708    #[deprecated]
5709    pub node_config: std::option::Option<crate::model::NodeConfig>,
5710
5711    /// The authentication information for accessing the master endpoint.
5712    /// If unspecified, the defaults are used:
5713    /// For clusters before v1.12, if master_auth is unspecified, `username` will
5714    /// be set to "admin", a random password will be generated, and a client
5715    /// certificate will be issued.
5716    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5717    pub master_auth: std::option::Option<crate::model::MasterAuth>,
5718
5719    /// The logging service the cluster should use to write logs.
5720    /// Currently available options:
5721    ///
5722    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
5723    ///   service with a Kubernetes-native resource model
5724    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
5725    ///   available as of GKE 1.15).
5726    /// * `none` - no logs will be exported from the cluster.
5727    ///
5728    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
5729    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
5730    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5731    pub logging_service: std::string::String,
5732
5733    /// The monitoring service the cluster should use to write metrics.
5734    /// Currently available options:
5735    ///
5736    /// * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
5737    ///   service with a Kubernetes-native resource model
5738    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
5739    ///   longer available as of GKE 1.15).
5740    /// * `none` - No metrics will be exported from the cluster.
5741    ///
5742    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
5743    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
5744    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5745    pub monitoring_service: std::string::String,
5746
5747    /// The name of the Google Compute Engine
5748    /// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
5749    /// to which the cluster is connected. If left unspecified, the `default`
5750    /// network will be used.
5751    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5752    pub network: std::string::String,
5753
5754    /// The IP address range of the container pods in this cluster, in
5755    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
5756    /// notation (e.g. `10.96.0.0/14`). Leave blank to have
5757    /// one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
5758    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5759    pub cluster_ipv4_cidr: std::string::String,
5760
5761    /// Configurations for the various addons available to run in the cluster.
5762    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5763    pub addons_config: std::option::Option<crate::model::AddonsConfig>,
5764
5765    /// The name of the Google Compute Engine
5766    /// [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which
5767    /// the cluster is connected.
5768    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5769    pub subnetwork: std::string::String,
5770
5771    /// The node pools associated with this cluster.
5772    /// This field should not be set if "node_config" or "initial_node_count" are
5773    /// specified.
5774    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5775    pub node_pools: std::vec::Vec<crate::model::NodePool>,
5776
5777    /// The list of Google Compute Engine
5778    /// [zones](https://cloud.google.com/compute/docs/zones#available) in which the
5779    /// cluster's nodes should be located.
5780    ///
5781    /// This field provides a default value if
5782    /// [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
5783    /// are not specified during node pool creation.
5784    ///
5785    /// Warning: changing cluster locations will update the
5786    /// [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
5787    /// of all node pools and will result in nodes being added and/or removed.
5788    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5789    pub locations: std::vec::Vec<std::string::String>,
5790
5791    /// Kubernetes alpha features are enabled on this cluster. This includes alpha
5792    /// API groups (e.g. v1alpha1) and features that may not be production ready in
5793    /// the kubernetes version of the master and nodes.
5794    /// The cluster has no SLA for uptime and master/node upgrades are disabled.
5795    /// Alpha enabled clusters are automatically deleted thirty days after
5796    /// creation.
5797    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5798    pub enable_kubernetes_alpha: bool,
5799
5800    /// The resource labels for the cluster to use to annotate any related
5801    /// Google Compute Engine resources.
5802    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
5803    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
5804
5805    /// The fingerprint of the set of labels for this cluster.
5806    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5807    pub label_fingerprint: std::string::String,
5808
5809    /// Configuration for the legacy ABAC authorization mode.
5810    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5811    pub legacy_abac: std::option::Option<crate::model::LegacyAbac>,
5812
5813    /// Configuration options for the NetworkPolicy feature.
5814    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5815    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
5816
5817    /// Configuration for cluster IP allocation.
5818    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5819    pub ip_allocation_policy: std::option::Option<crate::model::IPAllocationPolicy>,
5820
5821    /// The configuration options for master authorized networks feature.
5822    ///
5823    /// Deprecated: Use
5824    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config]
5825    /// instead.
5826    ///
5827    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::authorized_networks_config
5828    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5829    #[deprecated]
5830    pub master_authorized_networks_config:
5831        std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
5832
5833    /// Configure the maintenance policy for this cluster.
5834    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5835    pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
5836
5837    /// Configuration for Binary Authorization.
5838    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5839    pub binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
5840
5841    /// Cluster-level autoscaling configuration.
5842    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5843    pub autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
5844
5845    /// Configuration for cluster networking.
5846    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5847    pub network_config: std::option::Option<crate::model::NetworkConfig>,
5848
5849    /// The default constraint on the maximum number of pods that can be run
5850    /// simultaneously on a node in the node pool of this cluster. Only honored
5851    /// if cluster created with IP Alias support.
5852    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5853    pub default_max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
5854
5855    /// Configuration for exporting resource usages. Resource usage export is
5856    /// disabled when this config is unspecified.
5857    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5858    pub resource_usage_export_config: std::option::Option<crate::model::ResourceUsageExportConfig>,
5859
5860    /// Configuration controlling RBAC group membership information.
5861    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5862    pub authenticator_groups_config: std::option::Option<crate::model::AuthenticatorGroupsConfig>,
5863
5864    /// Configuration for private cluster.
5865    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5866    pub private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
5867
5868    /// Configuration of etcd encryption.
5869    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5870    pub database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
5871
5872    /// Cluster-level Vertical Pod Autoscaling configuration.
5873    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5874    pub vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
5875
5876    /// Shielded Nodes configuration.
5877    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5878    pub shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
5879
5880    /// Release channel configuration. If left unspecified on cluster creation and
5881    /// a version is specified, the cluster is enrolled in the most mature release
5882    /// channel where the version is available (first checking STABLE, then
5883    /// REGULAR, and finally RAPID). Otherwise, if no release channel
5884    /// configuration and no version is specified, the cluster is enrolled in the
5885    /// REGULAR channel with its default version.
5886    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5887    pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
5888
5889    /// Configuration for the use of Kubernetes Service Accounts in GCP IAM
5890    /// policies.
5891    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5892    pub workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
5893
5894    /// Configuration for issuance of mTLS keys and certificates to Kubernetes
5895    /// pods.
5896    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5897    pub mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
5898
5899    /// Configuration for the fine-grained cost management feature.
5900    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5901    pub cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
5902
5903    /// Notification configuration of the cluster.
5904    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5905    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
5906
5907    /// Configuration of Confidential Nodes.
5908    /// All the nodes in the cluster will be Confidential VM once enabled.
5909    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5910    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
5911
5912    /// Configuration for Identity Service component.
5913    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5914    pub identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
5915
5916    /// Output only. Server-defined URL for the resource.
5917    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5918    pub self_link: std::string::String,
5919
5920    /// Output only. The name of the Google Compute Engine
5921    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
5922    /// cluster resides. This field is deprecated, use location instead.
5923    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5924    #[deprecated]
5925    pub zone: std::string::String,
5926
5927    /// Output only. The IP address of this cluster's master endpoint.
5928    /// The endpoint can be accessed from the internet at
5929    /// `https://username:password@endpoint/`.
5930    ///
5931    /// See the `masterAuth` property of this resource for username and
5932    /// password information.
5933    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5934    pub endpoint: std::string::String,
5935
5936    /// The initial Kubernetes version for this cluster.  Valid versions are those
5937    /// found in validMasterVersions returned by getServerConfig.  The version can
5938    /// be upgraded over time; such upgrades are reflected in
5939    /// currentMasterVersion and currentNodeVersion.
5940    ///
5941    /// Users may specify either explicit versions offered by
5942    /// Kubernetes Engine or version aliases, which have the following behavior:
5943    ///
5944    /// - "latest": picks the highest valid Kubernetes version
5945    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
5946    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
5947    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
5948    /// - "","-": picks the default Kubernetes version
5949    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5950    pub initial_cluster_version: std::string::String,
5951
5952    /// Output only. The current software version of the master endpoint.
5953    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5954    pub current_master_version: std::string::String,
5955
5956    /// Output only. Deprecated, use
5957    /// [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools)
5958    /// instead. The current version of the node software components. If they are
5959    /// currently at multiple versions because they're in the process of being
5960    /// upgraded, this reflects the minimum version of all nodes.
5961    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5962    #[deprecated]
5963    pub current_node_version: std::string::String,
5964
5965    /// Output only. The time the cluster was created, in
5966    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
5967    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5968    pub create_time: std::string::String,
5969
5970    /// Output only. The current status of this cluster.
5971    pub status: crate::model::cluster::Status,
5972
5973    /// Output only. Deprecated. Use conditions instead.
5974    /// Additional information about the current status of this
5975    /// cluster, if available.
5976    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5977    #[deprecated]
5978    pub status_message: std::string::String,
5979
5980    /// Output only. The size of the address space on each node for hosting
5981    /// containers. This is provisioned from within the `container_ipv4_cidr`
5982    /// range. This field will only be set when cluster is in route-based network
5983    /// mode.
5984    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5985    pub node_ipv4_cidr_size: i32,
5986
5987    /// Output only. The IP address range of the Kubernetes services in
5988    /// this cluster, in
5989    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
5990    /// notation (e.g. `1.2.3.4/29`). Service addresses are
5991    /// typically put in the last `/16` from the container CIDR.
5992    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5993    pub services_ipv4_cidr: std::string::String,
5994
5995    /// Output only. Deprecated. Use node_pools.instance_group_urls.
5996    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5997    #[deprecated]
5998    pub instance_group_urls: std::vec::Vec<std::string::String>,
5999
6000    /// Output only. The number of nodes currently in the cluster. Deprecated.
6001    /// Call Kubernetes API directly to retrieve node information.
6002    #[serde(skip_serializing_if = "wkt::internal::is_default")]
6003    #[deprecated]
6004    pub current_node_count: i32,
6005
6006    /// Output only. The time the cluster will be automatically
6007    /// deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
6008    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6009    pub expire_time: std::string::String,
6010
6011    /// Output only. The name of the Google Compute Engine
6012    /// [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
6013    /// or
6014    /// [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
6015    /// in which the cluster resides.
6016    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6017    pub location: std::string::String,
6018
6019    /// Enable the ability to use Cloud TPUs in this cluster.
6020    #[serde(skip_serializing_if = "wkt::internal::is_default")]
6021    pub enable_tpu: bool,
6022
6023    /// Output only. The IP address range of the Cloud TPUs in this cluster, in
6024    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
6025    /// notation (e.g. `1.2.3.4/29`).
6026    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6027    pub tpu_ipv4_cidr_block: std::string::String,
6028
6029    /// Which conditions caused the current cluster state.
6030    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6031    pub conditions: std::vec::Vec<crate::model::StatusCondition>,
6032
6033    /// Autopilot configuration for the cluster.
6034    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6035    pub autopilot: std::option::Option<crate::model::Autopilot>,
6036
6037    /// Output only. Unique id for the cluster.
6038    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6039    pub id: std::string::String,
6040
6041    /// Default NodePool settings for the entire cluster. These settings are
6042    /// overridden if specified on the specific NodePool object.
6043    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6044    pub node_pool_defaults: std::option::Option<crate::model::NodePoolDefaults>,
6045
6046    /// Logging configuration for the cluster.
6047    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6048    pub logging_config: std::option::Option<crate::model::LoggingConfig>,
6049
6050    /// Monitoring configuration for the cluster.
6051    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6052    pub monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
6053
6054    /// Node pool configs that apply to all auto-provisioned node pools
6055    /// in autopilot clusters and node auto-provisioning enabled clusters.
6056    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6057    pub node_pool_auto_config: std::option::Option<crate::model::NodePoolAutoConfig>,
6058
6059    /// This checksum is computed by the server based on the value of cluster
6060    /// fields, and may be sent on update requests to ensure the client has an
6061    /// up-to-date value before proceeding.
6062    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6063    pub etag: std::string::String,
6064
6065    /// Fleet information for the cluster.
6066    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6067    pub fleet: std::option::Option<crate::model::Fleet>,
6068
6069    /// Enable/Disable Security Posture API features for the cluster.
6070    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6071    pub security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
6072
6073    /// Configuration for all cluster's control plane endpoints.
6074    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6075    pub control_plane_endpoints_config:
6076        std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
6077
6078    /// Beta APIs Config
6079    #[serde(rename = "enableK8sBetaApis")]
6080    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6081    pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
6082
6083    /// GKE Enterprise Configuration.
6084    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6085    pub enterprise_config: std::option::Option<crate::model::EnterpriseConfig>,
6086
6087    /// Secret CSI driver configuration.
6088    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6089    pub secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
6090
6091    /// Enable/Disable Compliance Posture features for the cluster.
6092    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6093    pub compliance_posture_config: std::option::Option<crate::model::CompliancePostureConfig>,
6094
6095    /// Output only. Reserved for future use.
6096    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6097    pub satisfies_pzs: std::option::Option<bool>,
6098
6099    /// Output only. Reserved for future use.
6100    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6101    pub satisfies_pzi: std::option::Option<bool>,
6102
6103    /// The Custom keys configuration for the cluster.
6104    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6105    pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
6106
6107    /// RBACBindingConfig allows user to restrict ClusterRoleBindings an
6108    /// RoleBindings that can be created.
6109    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6110    pub rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
6111
6112    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6113    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6114}
6115
6116impl Cluster {
6117    pub fn new() -> Self {
6118        std::default::Default::default()
6119    }
6120
6121    /// Sets the value of [name][crate::model::Cluster::name].
6122    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6123        self.name = v.into();
6124        self
6125    }
6126
6127    /// Sets the value of [description][crate::model::Cluster::description].
6128    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6129        self.description = v.into();
6130        self
6131    }
6132
6133    /// Sets the value of [initial_node_count][crate::model::Cluster::initial_node_count].
6134    #[deprecated]
6135    pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6136        self.initial_node_count = v.into();
6137        self
6138    }
6139
6140    /// Sets the value of [node_config][crate::model::Cluster::node_config].
6141    #[deprecated]
6142    pub fn set_node_config<T: std::convert::Into<std::option::Option<crate::model::NodeConfig>>>(
6143        mut self,
6144        v: T,
6145    ) -> Self {
6146        self.node_config = v.into();
6147        self
6148    }
6149
6150    /// Sets the value of [master_auth][crate::model::Cluster::master_auth].
6151    pub fn set_master_auth<T: std::convert::Into<std::option::Option<crate::model::MasterAuth>>>(
6152        mut self,
6153        v: T,
6154    ) -> Self {
6155        self.master_auth = v.into();
6156        self
6157    }
6158
6159    /// Sets the value of [logging_service][crate::model::Cluster::logging_service].
6160    pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6161        self.logging_service = v.into();
6162        self
6163    }
6164
6165    /// Sets the value of [monitoring_service][crate::model::Cluster::monitoring_service].
6166    pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
6167        mut self,
6168        v: T,
6169    ) -> Self {
6170        self.monitoring_service = v.into();
6171        self
6172    }
6173
6174    /// Sets the value of [network][crate::model::Cluster::network].
6175    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6176        self.network = v.into();
6177        self
6178    }
6179
6180    /// Sets the value of [cluster_ipv4_cidr][crate::model::Cluster::cluster_ipv4_cidr].
6181    pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
6182        mut self,
6183        v: T,
6184    ) -> Self {
6185        self.cluster_ipv4_cidr = v.into();
6186        self
6187    }
6188
6189    /// Sets the value of [addons_config][crate::model::Cluster::addons_config].
6190    pub fn set_addons_config<
6191        T: std::convert::Into<std::option::Option<crate::model::AddonsConfig>>,
6192    >(
6193        mut self,
6194        v: T,
6195    ) -> Self {
6196        self.addons_config = v.into();
6197        self
6198    }
6199
6200    /// Sets the value of [subnetwork][crate::model::Cluster::subnetwork].
6201    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6202        self.subnetwork = v.into();
6203        self
6204    }
6205
6206    /// Sets the value of [node_pools][crate::model::Cluster::node_pools].
6207    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
6208    where
6209        T: std::iter::IntoIterator<Item = V>,
6210        V: std::convert::Into<crate::model::NodePool>,
6211    {
6212        use std::iter::Iterator;
6213        self.node_pools = v.into_iter().map(|i| i.into()).collect();
6214        self
6215    }
6216
6217    /// Sets the value of [locations][crate::model::Cluster::locations].
6218    pub fn set_locations<T, V>(mut self, v: T) -> Self
6219    where
6220        T: std::iter::IntoIterator<Item = V>,
6221        V: std::convert::Into<std::string::String>,
6222    {
6223        use std::iter::Iterator;
6224        self.locations = v.into_iter().map(|i| i.into()).collect();
6225        self
6226    }
6227
6228    /// Sets the value of [enable_kubernetes_alpha][crate::model::Cluster::enable_kubernetes_alpha].
6229    pub fn set_enable_kubernetes_alpha<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6230        self.enable_kubernetes_alpha = v.into();
6231        self
6232    }
6233
6234    /// Sets the value of [resource_labels][crate::model::Cluster::resource_labels].
6235    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
6236    where
6237        T: std::iter::IntoIterator<Item = (K, V)>,
6238        K: std::convert::Into<std::string::String>,
6239        V: std::convert::Into<std::string::String>,
6240    {
6241        use std::iter::Iterator;
6242        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6243        self
6244    }
6245
6246    /// Sets the value of [label_fingerprint][crate::model::Cluster::label_fingerprint].
6247    pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
6248        mut self,
6249        v: T,
6250    ) -> Self {
6251        self.label_fingerprint = v.into();
6252        self
6253    }
6254
6255    /// Sets the value of [legacy_abac][crate::model::Cluster::legacy_abac].
6256    pub fn set_legacy_abac<T: std::convert::Into<std::option::Option<crate::model::LegacyAbac>>>(
6257        mut self,
6258        v: T,
6259    ) -> Self {
6260        self.legacy_abac = v.into();
6261        self
6262    }
6263
6264    /// Sets the value of [network_policy][crate::model::Cluster::network_policy].
6265    pub fn set_network_policy<
6266        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
6267    >(
6268        mut self,
6269        v: T,
6270    ) -> Self {
6271        self.network_policy = v.into();
6272        self
6273    }
6274
6275    /// Sets the value of [ip_allocation_policy][crate::model::Cluster::ip_allocation_policy].
6276    pub fn set_ip_allocation_policy<
6277        T: std::convert::Into<std::option::Option<crate::model::IPAllocationPolicy>>,
6278    >(
6279        mut self,
6280        v: T,
6281    ) -> Self {
6282        self.ip_allocation_policy = v.into();
6283        self
6284    }
6285
6286    /// Sets the value of [master_authorized_networks_config][crate::model::Cluster::master_authorized_networks_config].
6287    #[deprecated]
6288    pub fn set_master_authorized_networks_config<
6289        T: std::convert::Into<std::option::Option<crate::model::MasterAuthorizedNetworksConfig>>,
6290    >(
6291        mut self,
6292        v: T,
6293    ) -> Self {
6294        self.master_authorized_networks_config = v.into();
6295        self
6296    }
6297
6298    /// Sets the value of [maintenance_policy][crate::model::Cluster::maintenance_policy].
6299    pub fn set_maintenance_policy<
6300        T: std::convert::Into<std::option::Option<crate::model::MaintenancePolicy>>,
6301    >(
6302        mut self,
6303        v: T,
6304    ) -> Self {
6305        self.maintenance_policy = v.into();
6306        self
6307    }
6308
6309    /// Sets the value of [binary_authorization][crate::model::Cluster::binary_authorization].
6310    pub fn set_binary_authorization<
6311        T: std::convert::Into<std::option::Option<crate::model::BinaryAuthorization>>,
6312    >(
6313        mut self,
6314        v: T,
6315    ) -> Self {
6316        self.binary_authorization = v.into();
6317        self
6318    }
6319
6320    /// Sets the value of [autoscaling][crate::model::Cluster::autoscaling].
6321    pub fn set_autoscaling<
6322        T: std::convert::Into<std::option::Option<crate::model::ClusterAutoscaling>>,
6323    >(
6324        mut self,
6325        v: T,
6326    ) -> Self {
6327        self.autoscaling = v.into();
6328        self
6329    }
6330
6331    /// Sets the value of [network_config][crate::model::Cluster::network_config].
6332    pub fn set_network_config<
6333        T: std::convert::Into<std::option::Option<crate::model::NetworkConfig>>,
6334    >(
6335        mut self,
6336        v: T,
6337    ) -> Self {
6338        self.network_config = v.into();
6339        self
6340    }
6341
6342    /// Sets the value of [default_max_pods_constraint][crate::model::Cluster::default_max_pods_constraint].
6343    pub fn set_default_max_pods_constraint<
6344        T: std::convert::Into<std::option::Option<crate::model::MaxPodsConstraint>>,
6345    >(
6346        mut self,
6347        v: T,
6348    ) -> Self {
6349        self.default_max_pods_constraint = v.into();
6350        self
6351    }
6352
6353    /// Sets the value of [resource_usage_export_config][crate::model::Cluster::resource_usage_export_config].
6354    pub fn set_resource_usage_export_config<
6355        T: std::convert::Into<std::option::Option<crate::model::ResourceUsageExportConfig>>,
6356    >(
6357        mut self,
6358        v: T,
6359    ) -> Self {
6360        self.resource_usage_export_config = v.into();
6361        self
6362    }
6363
6364    /// Sets the value of [authenticator_groups_config][crate::model::Cluster::authenticator_groups_config].
6365    pub fn set_authenticator_groups_config<
6366        T: std::convert::Into<std::option::Option<crate::model::AuthenticatorGroupsConfig>>,
6367    >(
6368        mut self,
6369        v: T,
6370    ) -> Self {
6371        self.authenticator_groups_config = v.into();
6372        self
6373    }
6374
6375    /// Sets the value of [private_cluster_config][crate::model::Cluster::private_cluster_config].
6376    pub fn set_private_cluster_config<
6377        T: std::convert::Into<std::option::Option<crate::model::PrivateClusterConfig>>,
6378    >(
6379        mut self,
6380        v: T,
6381    ) -> Self {
6382        self.private_cluster_config = v.into();
6383        self
6384    }
6385
6386    /// Sets the value of [database_encryption][crate::model::Cluster::database_encryption].
6387    pub fn set_database_encryption<
6388        T: std::convert::Into<std::option::Option<crate::model::DatabaseEncryption>>,
6389    >(
6390        mut self,
6391        v: T,
6392    ) -> Self {
6393        self.database_encryption = v.into();
6394        self
6395    }
6396
6397    /// Sets the value of [vertical_pod_autoscaling][crate::model::Cluster::vertical_pod_autoscaling].
6398    pub fn set_vertical_pod_autoscaling<
6399        T: std::convert::Into<std::option::Option<crate::model::VerticalPodAutoscaling>>,
6400    >(
6401        mut self,
6402        v: T,
6403    ) -> Self {
6404        self.vertical_pod_autoscaling = v.into();
6405        self
6406    }
6407
6408    /// Sets the value of [shielded_nodes][crate::model::Cluster::shielded_nodes].
6409    pub fn set_shielded_nodes<
6410        T: std::convert::Into<std::option::Option<crate::model::ShieldedNodes>>,
6411    >(
6412        mut self,
6413        v: T,
6414    ) -> Self {
6415        self.shielded_nodes = v.into();
6416        self
6417    }
6418
6419    /// Sets the value of [release_channel][crate::model::Cluster::release_channel].
6420    pub fn set_release_channel<
6421        T: std::convert::Into<std::option::Option<crate::model::ReleaseChannel>>,
6422    >(
6423        mut self,
6424        v: T,
6425    ) -> Self {
6426        self.release_channel = v.into();
6427        self
6428    }
6429
6430    /// Sets the value of [workload_identity_config][crate::model::Cluster::workload_identity_config].
6431    pub fn set_workload_identity_config<
6432        T: std::convert::Into<std::option::Option<crate::model::WorkloadIdentityConfig>>,
6433    >(
6434        mut self,
6435        v: T,
6436    ) -> Self {
6437        self.workload_identity_config = v.into();
6438        self
6439    }
6440
6441    /// Sets the value of [mesh_certificates][crate::model::Cluster::mesh_certificates].
6442    pub fn set_mesh_certificates<
6443        T: std::convert::Into<std::option::Option<crate::model::MeshCertificates>>,
6444    >(
6445        mut self,
6446        v: T,
6447    ) -> Self {
6448        self.mesh_certificates = v.into();
6449        self
6450    }
6451
6452    /// Sets the value of [cost_management_config][crate::model::Cluster::cost_management_config].
6453    pub fn set_cost_management_config<
6454        T: std::convert::Into<std::option::Option<crate::model::CostManagementConfig>>,
6455    >(
6456        mut self,
6457        v: T,
6458    ) -> Self {
6459        self.cost_management_config = v.into();
6460        self
6461    }
6462
6463    /// Sets the value of [notification_config][crate::model::Cluster::notification_config].
6464    pub fn set_notification_config<
6465        T: std::convert::Into<std::option::Option<crate::model::NotificationConfig>>,
6466    >(
6467        mut self,
6468        v: T,
6469    ) -> Self {
6470        self.notification_config = v.into();
6471        self
6472    }
6473
6474    /// Sets the value of [confidential_nodes][crate::model::Cluster::confidential_nodes].
6475    pub fn set_confidential_nodes<
6476        T: std::convert::Into<std::option::Option<crate::model::ConfidentialNodes>>,
6477    >(
6478        mut self,
6479        v: T,
6480    ) -> Self {
6481        self.confidential_nodes = v.into();
6482        self
6483    }
6484
6485    /// Sets the value of [identity_service_config][crate::model::Cluster::identity_service_config].
6486    pub fn set_identity_service_config<
6487        T: std::convert::Into<std::option::Option<crate::model::IdentityServiceConfig>>,
6488    >(
6489        mut self,
6490        v: T,
6491    ) -> Self {
6492        self.identity_service_config = v.into();
6493        self
6494    }
6495
6496    /// Sets the value of [self_link][crate::model::Cluster::self_link].
6497    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6498        self.self_link = v.into();
6499        self
6500    }
6501
6502    /// Sets the value of [zone][crate::model::Cluster::zone].
6503    #[deprecated]
6504    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6505        self.zone = v.into();
6506        self
6507    }
6508
6509    /// Sets the value of [endpoint][crate::model::Cluster::endpoint].
6510    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6511        self.endpoint = v.into();
6512        self
6513    }
6514
6515    /// Sets the value of [initial_cluster_version][crate::model::Cluster::initial_cluster_version].
6516    pub fn set_initial_cluster_version<T: std::convert::Into<std::string::String>>(
6517        mut self,
6518        v: T,
6519    ) -> Self {
6520        self.initial_cluster_version = v.into();
6521        self
6522    }
6523
6524    /// Sets the value of [current_master_version][crate::model::Cluster::current_master_version].
6525    pub fn set_current_master_version<T: std::convert::Into<std::string::String>>(
6526        mut self,
6527        v: T,
6528    ) -> Self {
6529        self.current_master_version = v.into();
6530        self
6531    }
6532
6533    /// Sets the value of [current_node_version][crate::model::Cluster::current_node_version].
6534    #[deprecated]
6535    pub fn set_current_node_version<T: std::convert::Into<std::string::String>>(
6536        mut self,
6537        v: T,
6538    ) -> Self {
6539        self.current_node_version = v.into();
6540        self
6541    }
6542
6543    /// Sets the value of [create_time][crate::model::Cluster::create_time].
6544    pub fn set_create_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6545        self.create_time = v.into();
6546        self
6547    }
6548
6549    /// Sets the value of [status][crate::model::Cluster::status].
6550    pub fn set_status<T: std::convert::Into<crate::model::cluster::Status>>(
6551        mut self,
6552        v: T,
6553    ) -> Self {
6554        self.status = v.into();
6555        self
6556    }
6557
6558    /// Sets the value of [status_message][crate::model::Cluster::status_message].
6559    #[deprecated]
6560    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6561        self.status_message = v.into();
6562        self
6563    }
6564
6565    /// Sets the value of [node_ipv4_cidr_size][crate::model::Cluster::node_ipv4_cidr_size].
6566    pub fn set_node_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6567        self.node_ipv4_cidr_size = v.into();
6568        self
6569    }
6570
6571    /// Sets the value of [services_ipv4_cidr][crate::model::Cluster::services_ipv4_cidr].
6572    pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
6573        mut self,
6574        v: T,
6575    ) -> Self {
6576        self.services_ipv4_cidr = v.into();
6577        self
6578    }
6579
6580    /// Sets the value of [instance_group_urls][crate::model::Cluster::instance_group_urls].
6581    #[deprecated]
6582    pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
6583    where
6584        T: std::iter::IntoIterator<Item = V>,
6585        V: std::convert::Into<std::string::String>,
6586    {
6587        use std::iter::Iterator;
6588        self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
6589        self
6590    }
6591
6592    /// Sets the value of [current_node_count][crate::model::Cluster::current_node_count].
6593    #[deprecated]
6594    pub fn set_current_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6595        self.current_node_count = v.into();
6596        self
6597    }
6598
6599    /// Sets the value of [expire_time][crate::model::Cluster::expire_time].
6600    pub fn set_expire_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6601        self.expire_time = v.into();
6602        self
6603    }
6604
6605    /// Sets the value of [location][crate::model::Cluster::location].
6606    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6607        self.location = v.into();
6608        self
6609    }
6610
6611    /// Sets the value of [enable_tpu][crate::model::Cluster::enable_tpu].
6612    pub fn set_enable_tpu<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6613        self.enable_tpu = v.into();
6614        self
6615    }
6616
6617    /// Sets the value of [tpu_ipv4_cidr_block][crate::model::Cluster::tpu_ipv4_cidr_block].
6618    pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
6619        mut self,
6620        v: T,
6621    ) -> Self {
6622        self.tpu_ipv4_cidr_block = v.into();
6623        self
6624    }
6625
6626    /// Sets the value of [conditions][crate::model::Cluster::conditions].
6627    pub fn set_conditions<T, V>(mut self, v: T) -> Self
6628    where
6629        T: std::iter::IntoIterator<Item = V>,
6630        V: std::convert::Into<crate::model::StatusCondition>,
6631    {
6632        use std::iter::Iterator;
6633        self.conditions = v.into_iter().map(|i| i.into()).collect();
6634        self
6635    }
6636
6637    /// Sets the value of [autopilot][crate::model::Cluster::autopilot].
6638    pub fn set_autopilot<T: std::convert::Into<std::option::Option<crate::model::Autopilot>>>(
6639        mut self,
6640        v: T,
6641    ) -> Self {
6642        self.autopilot = v.into();
6643        self
6644    }
6645
6646    /// Sets the value of [id][crate::model::Cluster::id].
6647    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6648        self.id = v.into();
6649        self
6650    }
6651
6652    /// Sets the value of [node_pool_defaults][crate::model::Cluster::node_pool_defaults].
6653    pub fn set_node_pool_defaults<
6654        T: std::convert::Into<std::option::Option<crate::model::NodePoolDefaults>>,
6655    >(
6656        mut self,
6657        v: T,
6658    ) -> Self {
6659        self.node_pool_defaults = v.into();
6660        self
6661    }
6662
6663    /// Sets the value of [logging_config][crate::model::Cluster::logging_config].
6664    pub fn set_logging_config<
6665        T: std::convert::Into<std::option::Option<crate::model::LoggingConfig>>,
6666    >(
6667        mut self,
6668        v: T,
6669    ) -> Self {
6670        self.logging_config = v.into();
6671        self
6672    }
6673
6674    /// Sets the value of [monitoring_config][crate::model::Cluster::monitoring_config].
6675    pub fn set_monitoring_config<
6676        T: std::convert::Into<std::option::Option<crate::model::MonitoringConfig>>,
6677    >(
6678        mut self,
6679        v: T,
6680    ) -> Self {
6681        self.monitoring_config = v.into();
6682        self
6683    }
6684
6685    /// Sets the value of [node_pool_auto_config][crate::model::Cluster::node_pool_auto_config].
6686    pub fn set_node_pool_auto_config<
6687        T: std::convert::Into<std::option::Option<crate::model::NodePoolAutoConfig>>,
6688    >(
6689        mut self,
6690        v: T,
6691    ) -> Self {
6692        self.node_pool_auto_config = v.into();
6693        self
6694    }
6695
6696    /// Sets the value of [etag][crate::model::Cluster::etag].
6697    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6698        self.etag = v.into();
6699        self
6700    }
6701
6702    /// Sets the value of [fleet][crate::model::Cluster::fleet].
6703    pub fn set_fleet<T: std::convert::Into<std::option::Option<crate::model::Fleet>>>(
6704        mut self,
6705        v: T,
6706    ) -> Self {
6707        self.fleet = v.into();
6708        self
6709    }
6710
6711    /// Sets the value of [security_posture_config][crate::model::Cluster::security_posture_config].
6712    pub fn set_security_posture_config<
6713        T: std::convert::Into<std::option::Option<crate::model::SecurityPostureConfig>>,
6714    >(
6715        mut self,
6716        v: T,
6717    ) -> Self {
6718        self.security_posture_config = v.into();
6719        self
6720    }
6721
6722    /// Sets the value of [control_plane_endpoints_config][crate::model::Cluster::control_plane_endpoints_config].
6723    pub fn set_control_plane_endpoints_config<
6724        T: std::convert::Into<std::option::Option<crate::model::ControlPlaneEndpointsConfig>>,
6725    >(
6726        mut self,
6727        v: T,
6728    ) -> Self {
6729        self.control_plane_endpoints_config = v.into();
6730        self
6731    }
6732
6733    /// Sets the value of [enable_k8s_beta_apis][crate::model::Cluster::enable_k8s_beta_apis].
6734    pub fn set_enable_k8s_beta_apis<
6735        T: std::convert::Into<std::option::Option<crate::model::K8sBetaAPIConfig>>,
6736    >(
6737        mut self,
6738        v: T,
6739    ) -> Self {
6740        self.enable_k8s_beta_apis = v.into();
6741        self
6742    }
6743
6744    /// Sets the value of [enterprise_config][crate::model::Cluster::enterprise_config].
6745    pub fn set_enterprise_config<
6746        T: std::convert::Into<std::option::Option<crate::model::EnterpriseConfig>>,
6747    >(
6748        mut self,
6749        v: T,
6750    ) -> Self {
6751        self.enterprise_config = v.into();
6752        self
6753    }
6754
6755    /// Sets the value of [secret_manager_config][crate::model::Cluster::secret_manager_config].
6756    pub fn set_secret_manager_config<
6757        T: std::convert::Into<std::option::Option<crate::model::SecretManagerConfig>>,
6758    >(
6759        mut self,
6760        v: T,
6761    ) -> Self {
6762        self.secret_manager_config = v.into();
6763        self
6764    }
6765
6766    /// Sets the value of [compliance_posture_config][crate::model::Cluster::compliance_posture_config].
6767    pub fn set_compliance_posture_config<
6768        T: std::convert::Into<std::option::Option<crate::model::CompliancePostureConfig>>,
6769    >(
6770        mut self,
6771        v: T,
6772    ) -> Self {
6773        self.compliance_posture_config = v.into();
6774        self
6775    }
6776
6777    /// Sets the value of [satisfies_pzs][crate::model::Cluster::satisfies_pzs].
6778    pub fn set_satisfies_pzs<T: std::convert::Into<std::option::Option<bool>>>(
6779        mut self,
6780        v: T,
6781    ) -> Self {
6782        self.satisfies_pzs = v.into();
6783        self
6784    }
6785
6786    /// Sets the value of [satisfies_pzi][crate::model::Cluster::satisfies_pzi].
6787    pub fn set_satisfies_pzi<T: std::convert::Into<std::option::Option<bool>>>(
6788        mut self,
6789        v: T,
6790    ) -> Self {
6791        self.satisfies_pzi = v.into();
6792        self
6793    }
6794
6795    /// Sets the value of [user_managed_keys_config][crate::model::Cluster::user_managed_keys_config].
6796    pub fn set_user_managed_keys_config<
6797        T: std::convert::Into<std::option::Option<crate::model::UserManagedKeysConfig>>,
6798    >(
6799        mut self,
6800        v: T,
6801    ) -> Self {
6802        self.user_managed_keys_config = v.into();
6803        self
6804    }
6805
6806    /// Sets the value of [rbac_binding_config][crate::model::Cluster::rbac_binding_config].
6807    pub fn set_rbac_binding_config<
6808        T: std::convert::Into<std::option::Option<crate::model::RBACBindingConfig>>,
6809    >(
6810        mut self,
6811        v: T,
6812    ) -> Self {
6813        self.rbac_binding_config = v.into();
6814        self
6815    }
6816}
6817
6818impl wkt::message::Message for Cluster {
6819    fn typename() -> &'static str {
6820        "type.googleapis.com/google.container.v1.Cluster"
6821    }
6822}
6823
6824/// Defines additional types related to [Cluster].
6825pub mod cluster {
6826    #[allow(unused_imports)]
6827    use super::*;
6828
6829    /// The current status of the cluster.
6830    ///
6831    /// # Working with unknown values
6832    ///
6833    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6834    /// additional enum variants at any time. Adding new variants is not considered
6835    /// a breaking change. Applications should write their code in anticipation of:
6836    ///
6837    /// - New values appearing in future releases of the client library, **and**
6838    /// - New values received dynamically, without application changes.
6839    ///
6840    /// Please consult the [Working with enums] section in the user guide for some
6841    /// guidelines.
6842    ///
6843    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6844    #[derive(Clone, Debug, PartialEq)]
6845    #[non_exhaustive]
6846    pub enum Status {
6847        /// Not set.
6848        Unspecified,
6849        /// The PROVISIONING state indicates the cluster is being created.
6850        Provisioning,
6851        /// The RUNNING state indicates the cluster has been created and is fully
6852        /// usable.
6853        Running,
6854        /// The RECONCILING state indicates that some work is actively being done on
6855        /// the cluster, such as upgrading the master or node software. Details can
6856        /// be found in the `statusMessage` field.
6857        Reconciling,
6858        /// The STOPPING state indicates the cluster is being deleted.
6859        Stopping,
6860        /// The ERROR state indicates the cluster is unusable. It will be
6861        /// automatically deleted. Details can be found in the `statusMessage` field.
6862        Error,
6863        /// The DEGRADED state indicates the cluster requires user action to restore
6864        /// full functionality. Details can be found in the `statusMessage` field.
6865        Degraded,
6866        /// If set, the enum was initialized with an unknown value.
6867        ///
6868        /// Applications can examine the value using [Status::value] or
6869        /// [Status::name].
6870        UnknownValue(status::UnknownValue),
6871    }
6872
6873    #[doc(hidden)]
6874    pub mod status {
6875        #[allow(unused_imports)]
6876        use super::*;
6877        #[derive(Clone, Debug, PartialEq)]
6878        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6879    }
6880
6881    impl Status {
6882        /// Gets the enum value.
6883        ///
6884        /// Returns `None` if the enum contains an unknown value deserialized from
6885        /// the string representation of enums.
6886        pub fn value(&self) -> std::option::Option<i32> {
6887            match self {
6888                Self::Unspecified => std::option::Option::Some(0),
6889                Self::Provisioning => std::option::Option::Some(1),
6890                Self::Running => std::option::Option::Some(2),
6891                Self::Reconciling => std::option::Option::Some(3),
6892                Self::Stopping => std::option::Option::Some(4),
6893                Self::Error => std::option::Option::Some(5),
6894                Self::Degraded => std::option::Option::Some(6),
6895                Self::UnknownValue(u) => u.0.value(),
6896            }
6897        }
6898
6899        /// Gets the enum value as a string.
6900        ///
6901        /// Returns `None` if the enum contains an unknown value deserialized from
6902        /// the integer representation of enums.
6903        pub fn name(&self) -> std::option::Option<&str> {
6904            match self {
6905                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
6906                Self::Provisioning => std::option::Option::Some("PROVISIONING"),
6907                Self::Running => std::option::Option::Some("RUNNING"),
6908                Self::Reconciling => std::option::Option::Some("RECONCILING"),
6909                Self::Stopping => std::option::Option::Some("STOPPING"),
6910                Self::Error => std::option::Option::Some("ERROR"),
6911                Self::Degraded => std::option::Option::Some("DEGRADED"),
6912                Self::UnknownValue(u) => u.0.name(),
6913            }
6914        }
6915    }
6916
6917    impl std::default::Default for Status {
6918        fn default() -> Self {
6919            use std::convert::From;
6920            Self::from(0)
6921        }
6922    }
6923
6924    impl std::fmt::Display for Status {
6925        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6926            wkt::internal::display_enum(f, self.name(), self.value())
6927        }
6928    }
6929
6930    impl std::convert::From<i32> for Status {
6931        fn from(value: i32) -> Self {
6932            match value {
6933                0 => Self::Unspecified,
6934                1 => Self::Provisioning,
6935                2 => Self::Running,
6936                3 => Self::Reconciling,
6937                4 => Self::Stopping,
6938                5 => Self::Error,
6939                6 => Self::Degraded,
6940                _ => Self::UnknownValue(status::UnknownValue(
6941                    wkt::internal::UnknownEnumValue::Integer(value),
6942                )),
6943            }
6944        }
6945    }
6946
6947    impl std::convert::From<&str> for Status {
6948        fn from(value: &str) -> Self {
6949            use std::string::ToString;
6950            match value {
6951                "STATUS_UNSPECIFIED" => Self::Unspecified,
6952                "PROVISIONING" => Self::Provisioning,
6953                "RUNNING" => Self::Running,
6954                "RECONCILING" => Self::Reconciling,
6955                "STOPPING" => Self::Stopping,
6956                "ERROR" => Self::Error,
6957                "DEGRADED" => Self::Degraded,
6958                _ => Self::UnknownValue(status::UnknownValue(
6959                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6960                )),
6961            }
6962        }
6963    }
6964
6965    impl serde::ser::Serialize for Status {
6966        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6967        where
6968            S: serde::Serializer,
6969        {
6970            match self {
6971                Self::Unspecified => serializer.serialize_i32(0),
6972                Self::Provisioning => serializer.serialize_i32(1),
6973                Self::Running => serializer.serialize_i32(2),
6974                Self::Reconciling => serializer.serialize_i32(3),
6975                Self::Stopping => serializer.serialize_i32(4),
6976                Self::Error => serializer.serialize_i32(5),
6977                Self::Degraded => serializer.serialize_i32(6),
6978                Self::UnknownValue(u) => u.0.serialize(serializer),
6979            }
6980        }
6981    }
6982
6983    impl<'de> serde::de::Deserialize<'de> for Status {
6984        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6985        where
6986            D: serde::Deserializer<'de>,
6987        {
6988            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
6989                ".google.container.v1.Cluster.Status",
6990            ))
6991        }
6992    }
6993}
6994
6995/// RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings
6996/// that can be created.
6997#[serde_with::serde_as]
6998#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6999#[serde(default, rename_all = "camelCase")]
7000#[non_exhaustive]
7001pub struct RBACBindingConfig {
7002    /// Setting this to true will allow any ClusterRoleBinding and RoleBinding
7003    /// with subjets system:anonymous or system:unauthenticated.
7004    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7005    pub enable_insecure_binding_system_unauthenticated: std::option::Option<bool>,
7006
7007    /// Setting this to true will allow any ClusterRoleBinding and RoleBinding
7008    /// with subjects system:authenticated.
7009    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7010    pub enable_insecure_binding_system_authenticated: std::option::Option<bool>,
7011
7012    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7013    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7014}
7015
7016impl RBACBindingConfig {
7017    pub fn new() -> Self {
7018        std::default::Default::default()
7019    }
7020
7021    /// Sets the value of [enable_insecure_binding_system_unauthenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_unauthenticated].
7022    pub fn set_enable_insecure_binding_system_unauthenticated<
7023        T: std::convert::Into<std::option::Option<bool>>,
7024    >(
7025        mut self,
7026        v: T,
7027    ) -> Self {
7028        self.enable_insecure_binding_system_unauthenticated = v.into();
7029        self
7030    }
7031
7032    /// Sets the value of [enable_insecure_binding_system_authenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_authenticated].
7033    pub fn set_enable_insecure_binding_system_authenticated<
7034        T: std::convert::Into<std::option::Option<bool>>,
7035    >(
7036        mut self,
7037        v: T,
7038    ) -> Self {
7039        self.enable_insecure_binding_system_authenticated = v.into();
7040        self
7041    }
7042}
7043
7044impl wkt::message::Message for RBACBindingConfig {
7045    fn typename() -> &'static str {
7046        "type.googleapis.com/google.container.v1.RBACBindingConfig"
7047    }
7048}
7049
7050/// UserManagedKeysConfig holds the resource address to Keys which are used
7051/// for signing certs and token that are used for communication within cluster.
7052#[serde_with::serde_as]
7053#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7054#[serde(default, rename_all = "camelCase")]
7055#[non_exhaustive]
7056pub struct UserManagedKeysConfig {
7057    /// The Certificate Authority Service caPool to use for the cluster CA in this
7058    /// cluster.
7059    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7060    pub cluster_ca: std::string::String,
7061
7062    /// Resource path of the Certificate Authority Service caPool to use for the
7063    /// etcd API CA in this cluster.
7064    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7065    pub etcd_api_ca: std::string::String,
7066
7067    /// Resource path of the Certificate Authority Service caPool to use for the
7068    /// etcd peer CA in this cluster.
7069    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7070    pub etcd_peer_ca: std::string::String,
7071
7072    /// The Cloud KMS cryptoKeyVersions to use for signing service account JWTs
7073    /// issued by this cluster.
7074    ///
7075    /// Format:
7076    /// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}`
7077    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7078    pub service_account_signing_keys: std::vec::Vec<std::string::String>,
7079
7080    /// The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs
7081    /// issued by this cluster.
7082    ///
7083    /// Format:
7084    /// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}`
7085    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7086    pub service_account_verification_keys: std::vec::Vec<std::string::String>,
7087
7088    /// The Certificate Authority Service caPool to use for the aggregation CA in
7089    /// this cluster.
7090    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7091    pub aggregation_ca: std::string::String,
7092
7093    /// The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control
7094    /// plane nodes.
7095    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7096    pub control_plane_disk_encryption_key: std::string::String,
7097
7098    /// Resource path of the Cloud KMS cryptoKey to use for encryption of internal
7099    /// etcd backups.
7100    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7101    pub gkeops_etcd_backup_encryption_key: std::string::String,
7102
7103    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7104    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7105}
7106
7107impl UserManagedKeysConfig {
7108    pub fn new() -> Self {
7109        std::default::Default::default()
7110    }
7111
7112    /// Sets the value of [cluster_ca][crate::model::UserManagedKeysConfig::cluster_ca].
7113    pub fn set_cluster_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7114        self.cluster_ca = v.into();
7115        self
7116    }
7117
7118    /// Sets the value of [etcd_api_ca][crate::model::UserManagedKeysConfig::etcd_api_ca].
7119    pub fn set_etcd_api_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7120        self.etcd_api_ca = v.into();
7121        self
7122    }
7123
7124    /// Sets the value of [etcd_peer_ca][crate::model::UserManagedKeysConfig::etcd_peer_ca].
7125    pub fn set_etcd_peer_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7126        self.etcd_peer_ca = v.into();
7127        self
7128    }
7129
7130    /// Sets the value of [service_account_signing_keys][crate::model::UserManagedKeysConfig::service_account_signing_keys].
7131    pub fn set_service_account_signing_keys<T, V>(mut self, v: T) -> Self
7132    where
7133        T: std::iter::IntoIterator<Item = V>,
7134        V: std::convert::Into<std::string::String>,
7135    {
7136        use std::iter::Iterator;
7137        self.service_account_signing_keys = v.into_iter().map(|i| i.into()).collect();
7138        self
7139    }
7140
7141    /// Sets the value of [service_account_verification_keys][crate::model::UserManagedKeysConfig::service_account_verification_keys].
7142    pub fn set_service_account_verification_keys<T, V>(mut self, v: T) -> Self
7143    where
7144        T: std::iter::IntoIterator<Item = V>,
7145        V: std::convert::Into<std::string::String>,
7146    {
7147        use std::iter::Iterator;
7148        self.service_account_verification_keys = v.into_iter().map(|i| i.into()).collect();
7149        self
7150    }
7151
7152    /// Sets the value of [aggregation_ca][crate::model::UserManagedKeysConfig::aggregation_ca].
7153    pub fn set_aggregation_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7154        self.aggregation_ca = v.into();
7155        self
7156    }
7157
7158    /// Sets the value of [control_plane_disk_encryption_key][crate::model::UserManagedKeysConfig::control_plane_disk_encryption_key].
7159    pub fn set_control_plane_disk_encryption_key<T: std::convert::Into<std::string::String>>(
7160        mut self,
7161        v: T,
7162    ) -> Self {
7163        self.control_plane_disk_encryption_key = v.into();
7164        self
7165    }
7166
7167    /// Sets the value of [gkeops_etcd_backup_encryption_key][crate::model::UserManagedKeysConfig::gkeops_etcd_backup_encryption_key].
7168    pub fn set_gkeops_etcd_backup_encryption_key<T: std::convert::Into<std::string::String>>(
7169        mut self,
7170        v: T,
7171    ) -> Self {
7172        self.gkeops_etcd_backup_encryption_key = v.into();
7173        self
7174    }
7175}
7176
7177impl wkt::message::Message for UserManagedKeysConfig {
7178    fn typename() -> &'static str {
7179        "type.googleapis.com/google.container.v1.UserManagedKeysConfig"
7180    }
7181}
7182
7183/// CompliancePostureConfig defines the settings needed to enable/disable
7184/// features for the Compliance Posture.
7185#[serde_with::serde_as]
7186#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7187#[serde(default, rename_all = "camelCase")]
7188#[non_exhaustive]
7189pub struct CompliancePostureConfig {
7190    /// Defines the enablement mode for Compliance Posture.
7191    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7192    pub mode: std::option::Option<crate::model::compliance_posture_config::Mode>,
7193
7194    /// List of enabled compliance standards.
7195    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7196    pub compliance_standards:
7197        std::vec::Vec<crate::model::compliance_posture_config::ComplianceStandard>,
7198
7199    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7200    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7201}
7202
7203impl CompliancePostureConfig {
7204    pub fn new() -> Self {
7205        std::default::Default::default()
7206    }
7207
7208    /// Sets the value of [mode][crate::model::CompliancePostureConfig::mode].
7209    pub fn set_mode<
7210        T: std::convert::Into<std::option::Option<crate::model::compliance_posture_config::Mode>>,
7211    >(
7212        mut self,
7213        v: T,
7214    ) -> Self {
7215        self.mode = v.into();
7216        self
7217    }
7218
7219    /// Sets the value of [compliance_standards][crate::model::CompliancePostureConfig::compliance_standards].
7220    pub fn set_compliance_standards<T, V>(mut self, v: T) -> Self
7221    where
7222        T: std::iter::IntoIterator<Item = V>,
7223        V: std::convert::Into<crate::model::compliance_posture_config::ComplianceStandard>,
7224    {
7225        use std::iter::Iterator;
7226        self.compliance_standards = v.into_iter().map(|i| i.into()).collect();
7227        self
7228    }
7229}
7230
7231impl wkt::message::Message for CompliancePostureConfig {
7232    fn typename() -> &'static str {
7233        "type.googleapis.com/google.container.v1.CompliancePostureConfig"
7234    }
7235}
7236
7237/// Defines additional types related to [CompliancePostureConfig].
7238pub mod compliance_posture_config {
7239    #[allow(unused_imports)]
7240    use super::*;
7241
7242    /// Defines the details of a compliance standard.
7243    #[serde_with::serde_as]
7244    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7245    #[serde(default, rename_all = "camelCase")]
7246    #[non_exhaustive]
7247    pub struct ComplianceStandard {
7248        /// Name of the compliance standard.
7249        #[serde(skip_serializing_if = "std::option::Option::is_none")]
7250        pub standard: std::option::Option<std::string::String>,
7251
7252        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7253        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7254    }
7255
7256    impl ComplianceStandard {
7257        pub fn new() -> Self {
7258            std::default::Default::default()
7259        }
7260
7261        /// Sets the value of [standard][crate::model::compliance_posture_config::ComplianceStandard::standard].
7262        pub fn set_standard<T: std::convert::Into<std::option::Option<std::string::String>>>(
7263            mut self,
7264            v: T,
7265        ) -> Self {
7266            self.standard = v.into();
7267            self
7268        }
7269    }
7270
7271    impl wkt::message::Message for ComplianceStandard {
7272        fn typename() -> &'static str {
7273            "type.googleapis.com/google.container.v1.CompliancePostureConfig.ComplianceStandard"
7274        }
7275    }
7276
7277    /// Mode defines enablement mode for Compliance Posture.
7278    ///
7279    /// # Working with unknown values
7280    ///
7281    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7282    /// additional enum variants at any time. Adding new variants is not considered
7283    /// a breaking change. Applications should write their code in anticipation of:
7284    ///
7285    /// - New values appearing in future releases of the client library, **and**
7286    /// - New values received dynamically, without application changes.
7287    ///
7288    /// Please consult the [Working with enums] section in the user guide for some
7289    /// guidelines.
7290    ///
7291    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7292    #[derive(Clone, Debug, PartialEq)]
7293    #[non_exhaustive]
7294    pub enum Mode {
7295        /// Default value not specified.
7296        Unspecified,
7297        /// Disables Compliance Posture features on the cluster.
7298        Disabled,
7299        /// Enables Compliance Posture features on the cluster.
7300        Enabled,
7301        /// If set, the enum was initialized with an unknown value.
7302        ///
7303        /// Applications can examine the value using [Mode::value] or
7304        /// [Mode::name].
7305        UnknownValue(mode::UnknownValue),
7306    }
7307
7308    #[doc(hidden)]
7309    pub mod mode {
7310        #[allow(unused_imports)]
7311        use super::*;
7312        #[derive(Clone, Debug, PartialEq)]
7313        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7314    }
7315
7316    impl Mode {
7317        /// Gets the enum value.
7318        ///
7319        /// Returns `None` if the enum contains an unknown value deserialized from
7320        /// the string representation of enums.
7321        pub fn value(&self) -> std::option::Option<i32> {
7322            match self {
7323                Self::Unspecified => std::option::Option::Some(0),
7324                Self::Disabled => std::option::Option::Some(1),
7325                Self::Enabled => std::option::Option::Some(2),
7326                Self::UnknownValue(u) => u.0.value(),
7327            }
7328        }
7329
7330        /// Gets the enum value as a string.
7331        ///
7332        /// Returns `None` if the enum contains an unknown value deserialized from
7333        /// the integer representation of enums.
7334        pub fn name(&self) -> std::option::Option<&str> {
7335            match self {
7336                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
7337                Self::Disabled => std::option::Option::Some("DISABLED"),
7338                Self::Enabled => std::option::Option::Some("ENABLED"),
7339                Self::UnknownValue(u) => u.0.name(),
7340            }
7341        }
7342    }
7343
7344    impl std::default::Default for Mode {
7345        fn default() -> Self {
7346            use std::convert::From;
7347            Self::from(0)
7348        }
7349    }
7350
7351    impl std::fmt::Display for Mode {
7352        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7353            wkt::internal::display_enum(f, self.name(), self.value())
7354        }
7355    }
7356
7357    impl std::convert::From<i32> for Mode {
7358        fn from(value: i32) -> Self {
7359            match value {
7360                0 => Self::Unspecified,
7361                1 => Self::Disabled,
7362                2 => Self::Enabled,
7363                _ => Self::UnknownValue(mode::UnknownValue(
7364                    wkt::internal::UnknownEnumValue::Integer(value),
7365                )),
7366            }
7367        }
7368    }
7369
7370    impl std::convert::From<&str> for Mode {
7371        fn from(value: &str) -> Self {
7372            use std::string::ToString;
7373            match value {
7374                "MODE_UNSPECIFIED" => Self::Unspecified,
7375                "DISABLED" => Self::Disabled,
7376                "ENABLED" => Self::Enabled,
7377                _ => Self::UnknownValue(mode::UnknownValue(
7378                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7379                )),
7380            }
7381        }
7382    }
7383
7384    impl serde::ser::Serialize for Mode {
7385        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7386        where
7387            S: serde::Serializer,
7388        {
7389            match self {
7390                Self::Unspecified => serializer.serialize_i32(0),
7391                Self::Disabled => serializer.serialize_i32(1),
7392                Self::Enabled => serializer.serialize_i32(2),
7393                Self::UnknownValue(u) => u.0.serialize(serializer),
7394            }
7395        }
7396    }
7397
7398    impl<'de> serde::de::Deserialize<'de> for Mode {
7399        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7400        where
7401            D: serde::Deserializer<'de>,
7402        {
7403            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
7404                ".google.container.v1.CompliancePostureConfig.Mode",
7405            ))
7406        }
7407    }
7408}
7409
7410/// K8sBetaAPIConfig , configuration for beta APIs
7411#[serde_with::serde_as]
7412#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7413#[serde(default, rename_all = "camelCase")]
7414#[non_exhaustive]
7415pub struct K8sBetaAPIConfig {
7416    /// Enabled k8s beta APIs.
7417    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7418    pub enabled_apis: std::vec::Vec<std::string::String>,
7419
7420    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7421    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7422}
7423
7424impl K8sBetaAPIConfig {
7425    pub fn new() -> Self {
7426        std::default::Default::default()
7427    }
7428
7429    /// Sets the value of [enabled_apis][crate::model::K8sBetaAPIConfig::enabled_apis].
7430    pub fn set_enabled_apis<T, V>(mut self, v: T) -> Self
7431    where
7432        T: std::iter::IntoIterator<Item = V>,
7433        V: std::convert::Into<std::string::String>,
7434    {
7435        use std::iter::Iterator;
7436        self.enabled_apis = v.into_iter().map(|i| i.into()).collect();
7437        self
7438    }
7439}
7440
7441impl wkt::message::Message for K8sBetaAPIConfig {
7442    fn typename() -> &'static str {
7443        "type.googleapis.com/google.container.v1.K8sBetaAPIConfig"
7444    }
7445}
7446
7447/// SecurityPostureConfig defines the flags needed to enable/disable features for
7448/// the Security Posture API.
7449#[serde_with::serde_as]
7450#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7451#[serde(default, rename_all = "camelCase")]
7452#[non_exhaustive]
7453pub struct SecurityPostureConfig {
7454    /// Sets which mode to use for Security Posture features.
7455    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7456    pub mode: std::option::Option<crate::model::security_posture_config::Mode>,
7457
7458    /// Sets which mode to use for vulnerability scanning.
7459    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7460    pub vulnerability_mode:
7461        std::option::Option<crate::model::security_posture_config::VulnerabilityMode>,
7462
7463    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7464    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7465}
7466
7467impl SecurityPostureConfig {
7468    pub fn new() -> Self {
7469        std::default::Default::default()
7470    }
7471
7472    /// Sets the value of [mode][crate::model::SecurityPostureConfig::mode].
7473    pub fn set_mode<
7474        T: std::convert::Into<std::option::Option<crate::model::security_posture_config::Mode>>,
7475    >(
7476        mut self,
7477        v: T,
7478    ) -> Self {
7479        self.mode = v.into();
7480        self
7481    }
7482
7483    /// Sets the value of [vulnerability_mode][crate::model::SecurityPostureConfig::vulnerability_mode].
7484    pub fn set_vulnerability_mode<
7485        T: std::convert::Into<
7486                std::option::Option<crate::model::security_posture_config::VulnerabilityMode>,
7487            >,
7488    >(
7489        mut self,
7490        v: T,
7491    ) -> Self {
7492        self.vulnerability_mode = v.into();
7493        self
7494    }
7495}
7496
7497impl wkt::message::Message for SecurityPostureConfig {
7498    fn typename() -> &'static str {
7499        "type.googleapis.com/google.container.v1.SecurityPostureConfig"
7500    }
7501}
7502
7503/// Defines additional types related to [SecurityPostureConfig].
7504pub mod security_posture_config {
7505    #[allow(unused_imports)]
7506    use super::*;
7507
7508    /// Mode defines enablement mode for GKE Security posture features.
7509    ///
7510    /// # Working with unknown values
7511    ///
7512    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7513    /// additional enum variants at any time. Adding new variants is not considered
7514    /// a breaking change. Applications should write their code in anticipation of:
7515    ///
7516    /// - New values appearing in future releases of the client library, **and**
7517    /// - New values received dynamically, without application changes.
7518    ///
7519    /// Please consult the [Working with enums] section in the user guide for some
7520    /// guidelines.
7521    ///
7522    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7523    #[derive(Clone, Debug, PartialEq)]
7524    #[non_exhaustive]
7525    pub enum Mode {
7526        /// Default value not specified.
7527        Unspecified,
7528        /// Disables Security Posture features on the cluster.
7529        Disabled,
7530        /// Applies Security Posture features on the cluster.
7531        Basic,
7532        /// Applies the Security Posture off cluster Enterprise level features.
7533        Enterprise,
7534        /// If set, the enum was initialized with an unknown value.
7535        ///
7536        /// Applications can examine the value using [Mode::value] or
7537        /// [Mode::name].
7538        UnknownValue(mode::UnknownValue),
7539    }
7540
7541    #[doc(hidden)]
7542    pub mod mode {
7543        #[allow(unused_imports)]
7544        use super::*;
7545        #[derive(Clone, Debug, PartialEq)]
7546        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7547    }
7548
7549    impl Mode {
7550        /// Gets the enum value.
7551        ///
7552        /// Returns `None` if the enum contains an unknown value deserialized from
7553        /// the string representation of enums.
7554        pub fn value(&self) -> std::option::Option<i32> {
7555            match self {
7556                Self::Unspecified => std::option::Option::Some(0),
7557                Self::Disabled => std::option::Option::Some(1),
7558                Self::Basic => std::option::Option::Some(2),
7559                Self::Enterprise => std::option::Option::Some(3),
7560                Self::UnknownValue(u) => u.0.value(),
7561            }
7562        }
7563
7564        /// Gets the enum value as a string.
7565        ///
7566        /// Returns `None` if the enum contains an unknown value deserialized from
7567        /// the integer representation of enums.
7568        pub fn name(&self) -> std::option::Option<&str> {
7569            match self {
7570                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
7571                Self::Disabled => std::option::Option::Some("DISABLED"),
7572                Self::Basic => std::option::Option::Some("BASIC"),
7573                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
7574                Self::UnknownValue(u) => u.0.name(),
7575            }
7576        }
7577    }
7578
7579    impl std::default::Default for Mode {
7580        fn default() -> Self {
7581            use std::convert::From;
7582            Self::from(0)
7583        }
7584    }
7585
7586    impl std::fmt::Display for Mode {
7587        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7588            wkt::internal::display_enum(f, self.name(), self.value())
7589        }
7590    }
7591
7592    impl std::convert::From<i32> for Mode {
7593        fn from(value: i32) -> Self {
7594            match value {
7595                0 => Self::Unspecified,
7596                1 => Self::Disabled,
7597                2 => Self::Basic,
7598                3 => Self::Enterprise,
7599                _ => Self::UnknownValue(mode::UnknownValue(
7600                    wkt::internal::UnknownEnumValue::Integer(value),
7601                )),
7602            }
7603        }
7604    }
7605
7606    impl std::convert::From<&str> for Mode {
7607        fn from(value: &str) -> Self {
7608            use std::string::ToString;
7609            match value {
7610                "MODE_UNSPECIFIED" => Self::Unspecified,
7611                "DISABLED" => Self::Disabled,
7612                "BASIC" => Self::Basic,
7613                "ENTERPRISE" => Self::Enterprise,
7614                _ => Self::UnknownValue(mode::UnknownValue(
7615                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7616                )),
7617            }
7618        }
7619    }
7620
7621    impl serde::ser::Serialize for Mode {
7622        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7623        where
7624            S: serde::Serializer,
7625        {
7626            match self {
7627                Self::Unspecified => serializer.serialize_i32(0),
7628                Self::Disabled => serializer.serialize_i32(1),
7629                Self::Basic => serializer.serialize_i32(2),
7630                Self::Enterprise => serializer.serialize_i32(3),
7631                Self::UnknownValue(u) => u.0.serialize(serializer),
7632            }
7633        }
7634    }
7635
7636    impl<'de> serde::de::Deserialize<'de> for Mode {
7637        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7638        where
7639            D: serde::Deserializer<'de>,
7640        {
7641            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
7642                ".google.container.v1.SecurityPostureConfig.Mode",
7643            ))
7644        }
7645    }
7646
7647    /// VulnerabilityMode defines enablement mode for vulnerability scanning.
7648    ///
7649    /// # Working with unknown values
7650    ///
7651    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7652    /// additional enum variants at any time. Adding new variants is not considered
7653    /// a breaking change. Applications should write their code in anticipation of:
7654    ///
7655    /// - New values appearing in future releases of the client library, **and**
7656    /// - New values received dynamically, without application changes.
7657    ///
7658    /// Please consult the [Working with enums] section in the user guide for some
7659    /// guidelines.
7660    ///
7661    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7662    #[derive(Clone, Debug, PartialEq)]
7663    #[non_exhaustive]
7664    pub enum VulnerabilityMode {
7665        /// Default value not specified.
7666        Unspecified,
7667        /// Disables vulnerability scanning on the cluster.
7668        VulnerabilityDisabled,
7669        /// Applies basic vulnerability scanning on the cluster.
7670        VulnerabilityBasic,
7671        /// Applies the Security Posture's vulnerability on cluster Enterprise level
7672        /// features.
7673        VulnerabilityEnterprise,
7674        /// If set, the enum was initialized with an unknown value.
7675        ///
7676        /// Applications can examine the value using [VulnerabilityMode::value] or
7677        /// [VulnerabilityMode::name].
7678        UnknownValue(vulnerability_mode::UnknownValue),
7679    }
7680
7681    #[doc(hidden)]
7682    pub mod vulnerability_mode {
7683        #[allow(unused_imports)]
7684        use super::*;
7685        #[derive(Clone, Debug, PartialEq)]
7686        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7687    }
7688
7689    impl VulnerabilityMode {
7690        /// Gets the enum value.
7691        ///
7692        /// Returns `None` if the enum contains an unknown value deserialized from
7693        /// the string representation of enums.
7694        pub fn value(&self) -> std::option::Option<i32> {
7695            match self {
7696                Self::Unspecified => std::option::Option::Some(0),
7697                Self::VulnerabilityDisabled => std::option::Option::Some(1),
7698                Self::VulnerabilityBasic => std::option::Option::Some(2),
7699                Self::VulnerabilityEnterprise => std::option::Option::Some(3),
7700                Self::UnknownValue(u) => u.0.value(),
7701            }
7702        }
7703
7704        /// Gets the enum value as a string.
7705        ///
7706        /// Returns `None` if the enum contains an unknown value deserialized from
7707        /// the integer representation of enums.
7708        pub fn name(&self) -> std::option::Option<&str> {
7709            match self {
7710                Self::Unspecified => std::option::Option::Some("VULNERABILITY_MODE_UNSPECIFIED"),
7711                Self::VulnerabilityDisabled => std::option::Option::Some("VULNERABILITY_DISABLED"),
7712                Self::VulnerabilityBasic => std::option::Option::Some("VULNERABILITY_BASIC"),
7713                Self::VulnerabilityEnterprise => {
7714                    std::option::Option::Some("VULNERABILITY_ENTERPRISE")
7715                }
7716                Self::UnknownValue(u) => u.0.name(),
7717            }
7718        }
7719    }
7720
7721    impl std::default::Default for VulnerabilityMode {
7722        fn default() -> Self {
7723            use std::convert::From;
7724            Self::from(0)
7725        }
7726    }
7727
7728    impl std::fmt::Display for VulnerabilityMode {
7729        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7730            wkt::internal::display_enum(f, self.name(), self.value())
7731        }
7732    }
7733
7734    impl std::convert::From<i32> for VulnerabilityMode {
7735        fn from(value: i32) -> Self {
7736            match value {
7737                0 => Self::Unspecified,
7738                1 => Self::VulnerabilityDisabled,
7739                2 => Self::VulnerabilityBasic,
7740                3 => Self::VulnerabilityEnterprise,
7741                _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
7742                    wkt::internal::UnknownEnumValue::Integer(value),
7743                )),
7744            }
7745        }
7746    }
7747
7748    impl std::convert::From<&str> for VulnerabilityMode {
7749        fn from(value: &str) -> Self {
7750            use std::string::ToString;
7751            match value {
7752                "VULNERABILITY_MODE_UNSPECIFIED" => Self::Unspecified,
7753                "VULNERABILITY_DISABLED" => Self::VulnerabilityDisabled,
7754                "VULNERABILITY_BASIC" => Self::VulnerabilityBasic,
7755                "VULNERABILITY_ENTERPRISE" => Self::VulnerabilityEnterprise,
7756                _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
7757                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7758                )),
7759            }
7760        }
7761    }
7762
7763    impl serde::ser::Serialize for VulnerabilityMode {
7764        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7765        where
7766            S: serde::Serializer,
7767        {
7768            match self {
7769                Self::Unspecified => serializer.serialize_i32(0),
7770                Self::VulnerabilityDisabled => serializer.serialize_i32(1),
7771                Self::VulnerabilityBasic => serializer.serialize_i32(2),
7772                Self::VulnerabilityEnterprise => serializer.serialize_i32(3),
7773                Self::UnknownValue(u) => u.0.serialize(serializer),
7774            }
7775        }
7776    }
7777
7778    impl<'de> serde::de::Deserialize<'de> for VulnerabilityMode {
7779        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7780        where
7781            D: serde::Deserializer<'de>,
7782        {
7783            deserializer.deserialize_any(wkt::internal::EnumVisitor::<VulnerabilityMode>::new(
7784                ".google.container.v1.SecurityPostureConfig.VulnerabilityMode",
7785            ))
7786        }
7787    }
7788}
7789
7790/// Node pool configs that apply to all auto-provisioned node pools
7791/// in autopilot clusters and node auto-provisioning enabled clusters.
7792#[serde_with::serde_as]
7793#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7794#[serde(default, rename_all = "camelCase")]
7795#[non_exhaustive]
7796pub struct NodePoolAutoConfig {
7797    /// The list of instance tags applied to all nodes. Tags are used to identify
7798    /// valid sources or targets for network firewalls and are specified by
7799    /// the client during cluster creation. Each tag within the list
7800    /// must comply with RFC1035.
7801    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7802    pub network_tags: std::option::Option<crate::model::NetworkTags>,
7803
7804    /// Resource manager tag keys and values to be attached to the nodes
7805    /// for managing Compute Engine firewalls using Network Firewall Policies.
7806    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7807    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
7808
7809    /// NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
7810    ///
7811    /// Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
7812    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7813    pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
7814
7815    /// Output only. Configuration options for Linux nodes.
7816    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7817    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
7818
7819    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7820    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7821}
7822
7823impl NodePoolAutoConfig {
7824    pub fn new() -> Self {
7825        std::default::Default::default()
7826    }
7827
7828    /// Sets the value of [network_tags][crate::model::NodePoolAutoConfig::network_tags].
7829    pub fn set_network_tags<
7830        T: std::convert::Into<std::option::Option<crate::model::NetworkTags>>,
7831    >(
7832        mut self,
7833        v: T,
7834    ) -> Self {
7835        self.network_tags = v.into();
7836        self
7837    }
7838
7839    /// Sets the value of [resource_manager_tags][crate::model::NodePoolAutoConfig::resource_manager_tags].
7840    pub fn set_resource_manager_tags<
7841        T: std::convert::Into<std::option::Option<crate::model::ResourceManagerTags>>,
7842    >(
7843        mut self,
7844        v: T,
7845    ) -> Self {
7846        self.resource_manager_tags = v.into();
7847        self
7848    }
7849
7850    /// Sets the value of [node_kubelet_config][crate::model::NodePoolAutoConfig::node_kubelet_config].
7851    pub fn set_node_kubelet_config<
7852        T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
7853    >(
7854        mut self,
7855        v: T,
7856    ) -> Self {
7857        self.node_kubelet_config = v.into();
7858        self
7859    }
7860
7861    /// Sets the value of [linux_node_config][crate::model::NodePoolAutoConfig::linux_node_config].
7862    pub fn set_linux_node_config<
7863        T: std::convert::Into<std::option::Option<crate::model::LinuxNodeConfig>>,
7864    >(
7865        mut self,
7866        v: T,
7867    ) -> Self {
7868        self.linux_node_config = v.into();
7869        self
7870    }
7871}
7872
7873impl wkt::message::Message for NodePoolAutoConfig {
7874    fn typename() -> &'static str {
7875        "type.googleapis.com/google.container.v1.NodePoolAutoConfig"
7876    }
7877}
7878
7879/// Subset of Nodepool message that has defaults.
7880#[serde_with::serde_as]
7881#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7882#[serde(default, rename_all = "camelCase")]
7883#[non_exhaustive]
7884pub struct NodePoolDefaults {
7885    /// Subset of NodeConfig message that has defaults.
7886    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7887    pub node_config_defaults: std::option::Option<crate::model::NodeConfigDefaults>,
7888
7889    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7890    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7891}
7892
7893impl NodePoolDefaults {
7894    pub fn new() -> Self {
7895        std::default::Default::default()
7896    }
7897
7898    /// Sets the value of [node_config_defaults][crate::model::NodePoolDefaults::node_config_defaults].
7899    pub fn set_node_config_defaults<
7900        T: std::convert::Into<std::option::Option<crate::model::NodeConfigDefaults>>,
7901    >(
7902        mut self,
7903        v: T,
7904    ) -> Self {
7905        self.node_config_defaults = v.into();
7906        self
7907    }
7908}
7909
7910impl wkt::message::Message for NodePoolDefaults {
7911    fn typename() -> &'static str {
7912        "type.googleapis.com/google.container.v1.NodePoolDefaults"
7913    }
7914}
7915
7916/// Subset of NodeConfig message that has defaults.
7917#[serde_with::serde_as]
7918#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7919#[serde(default, rename_all = "camelCase")]
7920#[non_exhaustive]
7921pub struct NodeConfigDefaults {
7922    /// GCFS (Google Container File System, also known as Riptide) options.
7923    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7924    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
7925
7926    /// Logging configuration for node pools.
7927    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7928    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
7929
7930    /// Parameters for containerd customization.
7931    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7932    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
7933
7934    /// NodeKubeletConfig controls the defaults for new node-pools.
7935    ///
7936    /// Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
7937    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7938    pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
7939
7940    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7941    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7942}
7943
7944impl NodeConfigDefaults {
7945    pub fn new() -> Self {
7946        std::default::Default::default()
7947    }
7948
7949    /// Sets the value of [gcfs_config][crate::model::NodeConfigDefaults::gcfs_config].
7950    pub fn set_gcfs_config<T: std::convert::Into<std::option::Option<crate::model::GcfsConfig>>>(
7951        mut self,
7952        v: T,
7953    ) -> Self {
7954        self.gcfs_config = v.into();
7955        self
7956    }
7957
7958    /// Sets the value of [logging_config][crate::model::NodeConfigDefaults::logging_config].
7959    pub fn set_logging_config<
7960        T: std::convert::Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
7961    >(
7962        mut self,
7963        v: T,
7964    ) -> Self {
7965        self.logging_config = v.into();
7966        self
7967    }
7968
7969    /// Sets the value of [containerd_config][crate::model::NodeConfigDefaults::containerd_config].
7970    pub fn set_containerd_config<
7971        T: std::convert::Into<std::option::Option<crate::model::ContainerdConfig>>,
7972    >(
7973        mut self,
7974        v: T,
7975    ) -> Self {
7976        self.containerd_config = v.into();
7977        self
7978    }
7979
7980    /// Sets the value of [node_kubelet_config][crate::model::NodeConfigDefaults::node_kubelet_config].
7981    pub fn set_node_kubelet_config<
7982        T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
7983    >(
7984        mut self,
7985        v: T,
7986    ) -> Self {
7987        self.node_kubelet_config = v.into();
7988        self
7989    }
7990}
7991
7992impl wkt::message::Message for NodeConfigDefaults {
7993    fn typename() -> &'static str {
7994        "type.googleapis.com/google.container.v1.NodeConfigDefaults"
7995    }
7996}
7997
7998/// ClusterUpdate describes an update to the cluster. Exactly one update can
7999/// be applied to a cluster with each request, so at most one field can be
8000/// provided.
8001#[serde_with::serde_as]
8002#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8003#[serde(default, rename_all = "camelCase")]
8004#[non_exhaustive]
8005pub struct ClusterUpdate {
8006    /// The Kubernetes version to change the nodes to (typically an
8007    /// upgrade).
8008    ///
8009    /// Users may specify either explicit versions offered by
8010    /// Kubernetes Engine or version aliases, which have the following behavior:
8011    ///
8012    /// - "latest": picks the highest valid Kubernetes version
8013    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
8014    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
8015    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
8016    /// - "-": picks the Kubernetes master version
8017    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8018    pub desired_node_version: std::string::String,
8019
8020    /// The monitoring service the cluster should use to write metrics.
8021    /// Currently available options:
8022    ///
8023    /// * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
8024    ///   service with a Kubernetes-native resource model
8025    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
8026    ///   longer available as of GKE 1.15).
8027    /// * `none` - No metrics will be exported from the cluster.
8028    ///
8029    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
8030    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
8031    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8032    pub desired_monitoring_service: std::string::String,
8033
8034    /// Configurations for the various addons available to run in the cluster.
8035    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8036    pub desired_addons_config: std::option::Option<crate::model::AddonsConfig>,
8037
8038    /// The node pool to be upgraded. This field is mandatory if
8039    /// "desired_node_version", "desired_image_family" or
8040    /// "desired_node_pool_autoscaling" is specified and there is more than one
8041    /// node pool on the cluster.
8042    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8043    pub desired_node_pool_id: std::string::String,
8044
8045    /// The desired image type for the node pool.
8046    /// NOTE: Set the "desired_node_pool" field as well.
8047    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8048    pub desired_image_type: std::string::String,
8049
8050    /// Configuration of etcd encryption.
8051    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8052    pub desired_database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
8053
8054    /// Configuration for Workload Identity.
8055    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8056    pub desired_workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
8057
8058    /// Configuration for issuance of mTLS keys and certificates to Kubernetes
8059    /// pods.
8060    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8061    pub desired_mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
8062
8063    /// Configuration for Shielded Nodes.
8064    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8065    pub desired_shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
8066
8067    /// The desired configuration for the fine-grained cost management feature.
8068    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8069    pub desired_cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
8070
8071    /// DNSConfig contains clusterDNS config for this cluster.
8072    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8073    pub desired_dns_config: std::option::Option<crate::model::DNSConfig>,
8074
8075    /// Autoscaler configuration for the node pool specified in
8076    /// desired_node_pool_id. If there is only one pool in the
8077    /// cluster and desired_node_pool_id is not provided then
8078    /// the change applies to that single node pool.
8079    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8080    pub desired_node_pool_autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
8081
8082    /// The desired list of Google Compute Engine
8083    /// [zones](https://cloud.google.com/compute/docs/zones#available) in which the
8084    /// cluster's nodes should be located.
8085    ///
8086    /// This list must always include the cluster's primary zone.
8087    ///
8088    /// Warning: changing cluster locations will update the locations of all node
8089    /// pools and will result in nodes being added and/or removed.
8090    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8091    pub desired_locations: std::vec::Vec<std::string::String>,
8092
8093    /// The desired configuration options for master authorized networks feature.
8094    ///
8095    /// Deprecated: Use
8096    /// desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config
8097    /// instead.
8098    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8099    #[deprecated]
8100    pub desired_master_authorized_networks_config:
8101        std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
8102
8103    /// Cluster-level autoscaling configuration.
8104    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8105    pub desired_cluster_autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
8106
8107    /// The desired configuration options for the Binary Authorization feature.
8108    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8109    pub desired_binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
8110
8111    /// The logging service the cluster should use to write logs.
8112    /// Currently available options:
8113    ///
8114    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
8115    ///   service with a Kubernetes-native resource model
8116    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
8117    ///   available as of GKE 1.15).
8118    /// * `none` - no logs will be exported from the cluster.
8119    ///
8120    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
8121    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
8122    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8123    pub desired_logging_service: std::string::String,
8124
8125    /// The desired configuration for exporting resource usage.
8126    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8127    pub desired_resource_usage_export_config:
8128        std::option::Option<crate::model::ResourceUsageExportConfig>,
8129
8130    /// Cluster-level Vertical Pod Autoscaling configuration.
8131    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8132    pub desired_vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
8133
8134    /// The desired private cluster configuration. master_global_access_config is
8135    /// the only field that can be changed via this field.
8136    /// See also
8137    /// [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
8138    /// for modifying other fields within
8139    /// [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
8140    ///
8141    /// Deprecated: Use
8142    /// desired_control_plane_endpoints_config.ip_endpoints_config.global_access
8143    /// instead.
8144    ///
8145    /// [google.container.v1.ClusterUpdate.desired_enable_private_endpoint]: crate::model::ClusterUpdate::desired_enable_private_endpoint
8146    /// [google.container.v1.PrivateClusterConfig]: crate::model::PrivateClusterConfig
8147    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8148    #[deprecated]
8149    pub desired_private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
8150
8151    /// The desired config of Intra-node visibility.
8152    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8153    pub desired_intra_node_visibility_config:
8154        std::option::Option<crate::model::IntraNodeVisibilityConfig>,
8155
8156    /// The desired status of whether to disable default sNAT for this cluster.
8157    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8158    pub desired_default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
8159
8160    /// The desired release channel configuration.
8161    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8162    pub desired_release_channel: std::option::Option<crate::model::ReleaseChannel>,
8163
8164    /// The desired L4 Internal Load Balancer Subsetting configuration.
8165    #[serde(rename = "desiredL4ilbSubsettingConfig")]
8166    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8167    pub desired_l4ilb_subsetting_config: std::option::Option<crate::model::ILBSubsettingConfig>,
8168
8169    /// The desired datapath provider for the cluster.
8170    pub desired_datapath_provider: crate::model::DatapathProvider,
8171
8172    /// The desired state of IPv6 connectivity to Google Services.
8173    pub desired_private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
8174
8175    /// The desired notification configuration.
8176    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8177    pub desired_notification_config: std::option::Option<crate::model::NotificationConfig>,
8178
8179    /// The desired authenticator groups config for the cluster.
8180    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8181    pub desired_authenticator_groups_config:
8182        std::option::Option<crate::model::AuthenticatorGroupsConfig>,
8183
8184    /// The desired logging configuration.
8185    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8186    pub desired_logging_config: std::option::Option<crate::model::LoggingConfig>,
8187
8188    /// The desired monitoring configuration.
8189    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8190    pub desired_monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
8191
8192    /// The desired Identity Service component configuration.
8193    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8194    pub desired_identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
8195
8196    /// ServiceExternalIPsConfig specifies the config for the use of Services with
8197    /// ExternalIPs field.
8198    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8199    pub desired_service_external_ips_config:
8200        std::option::Option<crate::model::ServiceExternalIPsConfig>,
8201
8202    /// Enable/Disable private endpoint for the cluster's master.
8203    ///
8204    /// Deprecated: Use
8205    /// desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint
8206    /// instead. Note that the value of enable_public_endpoint is reversed: if
8207    /// enable_private_endpoint is false, then enable_public_endpoint will be true.
8208    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8209    #[deprecated]
8210    pub desired_enable_private_endpoint: std::option::Option<bool>,
8211
8212    /// Override the default setting of whether future created
8213    /// nodes have private IP addresses only, namely
8214    /// [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes]
8215    ///
8216    /// [google.container.v1.NetworkConfig.default_enable_private_nodes]: crate::model::NetworkConfig::default_enable_private_nodes
8217    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8218    pub desired_default_enable_private_nodes: std::option::Option<bool>,
8219
8220    /// [Control plane
8221    /// endpoints][google.container.v1.Cluster.control_plane_endpoints_config]
8222    /// configuration.
8223    ///
8224    /// [google.container.v1.Cluster.control_plane_endpoints_config]: crate::model::Cluster::control_plane_endpoints_config
8225    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8226    pub desired_control_plane_endpoints_config:
8227        std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
8228
8229    /// The Kubernetes version to change the master to.
8230    ///
8231    /// Users may specify either explicit versions offered by
8232    /// Kubernetes Engine or version aliases, which have the following behavior:
8233    ///
8234    /// - "latest": picks the highest valid Kubernetes version
8235    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
8236    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
8237    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
8238    /// - "-": picks the default Kubernetes version
8239    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8240    pub desired_master_version: std::string::String,
8241
8242    /// The desired GCFS config for the cluster
8243    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8244    pub desired_gcfs_config: std::option::Option<crate::model::GcfsConfig>,
8245
8246    /// The desired network tags that apply to all auto-provisioned node pools
8247    /// in autopilot clusters and node auto-provisioning enabled clusters.
8248    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8249    pub desired_node_pool_auto_config_network_tags: std::option::Option<crate::model::NetworkTags>,
8250
8251    /// The desired config of Gateway API on this cluster.
8252    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8253    pub desired_gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
8254
8255    /// The current etag of the cluster.
8256    /// If an etag is provided and does not match the current etag of the cluster,
8257    /// update will be blocked and an ABORTED error will be returned.
8258    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8259    pub etag: std::string::String,
8260
8261    /// The desired node pool logging configuration defaults for the cluster.
8262    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8263    pub desired_node_pool_logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
8264
8265    /// The desired fleet configuration for the cluster.
8266    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8267    pub desired_fleet: std::option::Option<crate::model::Fleet>,
8268
8269    /// The desired stack type of the cluster.
8270    /// If a stack type is provided and does not match the current stack type of
8271    /// the cluster, update will attempt to change the stack type to the new type.
8272    pub desired_stack_type: crate::model::StackType,
8273
8274    /// The additional pod ranges to be added to the cluster. These pod ranges
8275    /// can be used by node pools to allocate pod IPs.
8276    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8277    pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
8278
8279    /// The additional pod ranges that are to be removed from the cluster.
8280    /// The pod ranges specified here must have been specified earlier in the
8281    /// 'additional_pod_ranges_config' argument.
8282    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8283    pub removed_additional_pod_ranges_config:
8284        std::option::Option<crate::model::AdditionalPodRangesConfig>,
8285
8286    /// Kubernetes open source beta apis enabled on the cluster. Only beta apis
8287    #[serde(rename = "enableK8sBetaApis")]
8288    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8289    pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
8290
8291    /// Enable/Disable Security Posture API features for the cluster.
8292    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8293    pub desired_security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
8294
8295    /// The desired network performance config.
8296    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8297    pub desired_network_performance_config:
8298        std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
8299
8300    /// Enable/Disable FQDN Network Policy for the cluster.
8301    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8302    pub desired_enable_fqdn_network_policy: std::option::Option<bool>,
8303
8304    /// The desired workload policy configuration for the autopilot cluster.
8305    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8306    pub desired_autopilot_workload_policy_config:
8307        std::option::Option<crate::model::WorkloadPolicyConfig>,
8308
8309    /// Desired Beta APIs to be enabled for cluster.
8310    #[serde(rename = "desiredK8sBetaApis")]
8311    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8312    pub desired_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
8313
8314    /// The desired containerd config for the cluster.
8315    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8316    pub desired_containerd_config: std::option::Option<crate::model::ContainerdConfig>,
8317
8318    /// Enable/Disable Multi-Networking for the cluster
8319    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8320    pub desired_enable_multi_networking: std::option::Option<bool>,
8321
8322    /// The desired resource manager tags that apply to all auto-provisioned node
8323    /// pools in autopilot clusters and node auto-provisioning enabled clusters.
8324    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8325    pub desired_node_pool_auto_config_resource_manager_tags:
8326        std::option::Option<crate::model::ResourceManagerTags>,
8327
8328    /// Specify the details of in-transit encryption.
8329    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8330    pub desired_in_transit_encryption_config:
8331        std::option::Option<crate::model::InTransitEncryptionConfig>,
8332
8333    /// Enable/Disable Cilium Clusterwide Network Policy for the cluster.
8334    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8335    pub desired_enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
8336
8337    /// Enable/Disable Secret Manager Config.
8338    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8339    pub desired_secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
8340
8341    /// Enable/Disable Compliance Posture features for the cluster.
8342    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8343    pub desired_compliance_posture_config:
8344        std::option::Option<crate::model::CompliancePostureConfig>,
8345
8346    /// The desired node kubelet config for the cluster.
8347    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8348    pub desired_node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
8349
8350    /// The desired node kubelet config for all auto-provisioned node pools
8351    /// in autopilot clusters and node auto-provisioning enabled clusters.
8352    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8353    pub desired_node_pool_auto_config_kubelet_config:
8354        std::option::Option<crate::model::NodeKubeletConfig>,
8355
8356    /// The Custom keys configuration for the cluster.
8357    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8358    pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
8359
8360    /// RBACBindingConfig allows user to restrict ClusterRoleBindings an
8361    /// RoleBindings that can be created.
8362    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8363    pub desired_rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
8364
8365    /// The desired enterprise configuration for the cluster.
8366    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8367    pub desired_enterprise_config: std::option::Option<crate::model::DesiredEnterpriseConfig>,
8368
8369    /// The desired Linux node config for all auto-provisioned node pools
8370    /// in autopilot clusters and node auto-provisioning enabled clusters.
8371    ///
8372    /// Currently only `cgroup_mode` can be set here.
8373    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8374    pub desired_node_pool_auto_config_linux_node_config:
8375        std::option::Option<crate::model::LinuxNodeConfig>,
8376
8377    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8378    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8379}
8380
8381impl ClusterUpdate {
8382    pub fn new() -> Self {
8383        std::default::Default::default()
8384    }
8385
8386    /// Sets the value of [desired_node_version][crate::model::ClusterUpdate::desired_node_version].
8387    pub fn set_desired_node_version<T: std::convert::Into<std::string::String>>(
8388        mut self,
8389        v: T,
8390    ) -> Self {
8391        self.desired_node_version = v.into();
8392        self
8393    }
8394
8395    /// Sets the value of [desired_monitoring_service][crate::model::ClusterUpdate::desired_monitoring_service].
8396    pub fn set_desired_monitoring_service<T: std::convert::Into<std::string::String>>(
8397        mut self,
8398        v: T,
8399    ) -> Self {
8400        self.desired_monitoring_service = v.into();
8401        self
8402    }
8403
8404    /// Sets the value of [desired_addons_config][crate::model::ClusterUpdate::desired_addons_config].
8405    pub fn set_desired_addons_config<
8406        T: std::convert::Into<std::option::Option<crate::model::AddonsConfig>>,
8407    >(
8408        mut self,
8409        v: T,
8410    ) -> Self {
8411        self.desired_addons_config = v.into();
8412        self
8413    }
8414
8415    /// Sets the value of [desired_node_pool_id][crate::model::ClusterUpdate::desired_node_pool_id].
8416    pub fn set_desired_node_pool_id<T: std::convert::Into<std::string::String>>(
8417        mut self,
8418        v: T,
8419    ) -> Self {
8420        self.desired_node_pool_id = v.into();
8421        self
8422    }
8423
8424    /// Sets the value of [desired_image_type][crate::model::ClusterUpdate::desired_image_type].
8425    pub fn set_desired_image_type<T: std::convert::Into<std::string::String>>(
8426        mut self,
8427        v: T,
8428    ) -> Self {
8429        self.desired_image_type = v.into();
8430        self
8431    }
8432
8433    /// Sets the value of [desired_database_encryption][crate::model::ClusterUpdate::desired_database_encryption].
8434    pub fn set_desired_database_encryption<
8435        T: std::convert::Into<std::option::Option<crate::model::DatabaseEncryption>>,
8436    >(
8437        mut self,
8438        v: T,
8439    ) -> Self {
8440        self.desired_database_encryption = v.into();
8441        self
8442    }
8443
8444    /// Sets the value of [desired_workload_identity_config][crate::model::ClusterUpdate::desired_workload_identity_config].
8445    pub fn set_desired_workload_identity_config<
8446        T: std::convert::Into<std::option::Option<crate::model::WorkloadIdentityConfig>>,
8447    >(
8448        mut self,
8449        v: T,
8450    ) -> Self {
8451        self.desired_workload_identity_config = v.into();
8452        self
8453    }
8454
8455    /// Sets the value of [desired_mesh_certificates][crate::model::ClusterUpdate::desired_mesh_certificates].
8456    pub fn set_desired_mesh_certificates<
8457        T: std::convert::Into<std::option::Option<crate::model::MeshCertificates>>,
8458    >(
8459        mut self,
8460        v: T,
8461    ) -> Self {
8462        self.desired_mesh_certificates = v.into();
8463        self
8464    }
8465
8466    /// Sets the value of [desired_shielded_nodes][crate::model::ClusterUpdate::desired_shielded_nodes].
8467    pub fn set_desired_shielded_nodes<
8468        T: std::convert::Into<std::option::Option<crate::model::ShieldedNodes>>,
8469    >(
8470        mut self,
8471        v: T,
8472    ) -> Self {
8473        self.desired_shielded_nodes = v.into();
8474        self
8475    }
8476
8477    /// Sets the value of [desired_cost_management_config][crate::model::ClusterUpdate::desired_cost_management_config].
8478    pub fn set_desired_cost_management_config<
8479        T: std::convert::Into<std::option::Option<crate::model::CostManagementConfig>>,
8480    >(
8481        mut self,
8482        v: T,
8483    ) -> Self {
8484        self.desired_cost_management_config = v.into();
8485        self
8486    }
8487
8488    /// Sets the value of [desired_dns_config][crate::model::ClusterUpdate::desired_dns_config].
8489    pub fn set_desired_dns_config<
8490        T: std::convert::Into<std::option::Option<crate::model::DNSConfig>>,
8491    >(
8492        mut self,
8493        v: T,
8494    ) -> Self {
8495        self.desired_dns_config = v.into();
8496        self
8497    }
8498
8499    /// Sets the value of [desired_node_pool_autoscaling][crate::model::ClusterUpdate::desired_node_pool_autoscaling].
8500    pub fn set_desired_node_pool_autoscaling<
8501        T: std::convert::Into<std::option::Option<crate::model::NodePoolAutoscaling>>,
8502    >(
8503        mut self,
8504        v: T,
8505    ) -> Self {
8506        self.desired_node_pool_autoscaling = v.into();
8507        self
8508    }
8509
8510    /// Sets the value of [desired_locations][crate::model::ClusterUpdate::desired_locations].
8511    pub fn set_desired_locations<T, V>(mut self, v: T) -> Self
8512    where
8513        T: std::iter::IntoIterator<Item = V>,
8514        V: std::convert::Into<std::string::String>,
8515    {
8516        use std::iter::Iterator;
8517        self.desired_locations = v.into_iter().map(|i| i.into()).collect();
8518        self
8519    }
8520
8521    /// Sets the value of [desired_master_authorized_networks_config][crate::model::ClusterUpdate::desired_master_authorized_networks_config].
8522    #[deprecated]
8523    pub fn set_desired_master_authorized_networks_config<
8524        T: std::convert::Into<std::option::Option<crate::model::MasterAuthorizedNetworksConfig>>,
8525    >(
8526        mut self,
8527        v: T,
8528    ) -> Self {
8529        self.desired_master_authorized_networks_config = v.into();
8530        self
8531    }
8532
8533    /// Sets the value of [desired_cluster_autoscaling][crate::model::ClusterUpdate::desired_cluster_autoscaling].
8534    pub fn set_desired_cluster_autoscaling<
8535        T: std::convert::Into<std::option::Option<crate::model::ClusterAutoscaling>>,
8536    >(
8537        mut self,
8538        v: T,
8539    ) -> Self {
8540        self.desired_cluster_autoscaling = v.into();
8541        self
8542    }
8543
8544    /// Sets the value of [desired_binary_authorization][crate::model::ClusterUpdate::desired_binary_authorization].
8545    pub fn set_desired_binary_authorization<
8546        T: std::convert::Into<std::option::Option<crate::model::BinaryAuthorization>>,
8547    >(
8548        mut self,
8549        v: T,
8550    ) -> Self {
8551        self.desired_binary_authorization = v.into();
8552        self
8553    }
8554
8555    /// Sets the value of [desired_logging_service][crate::model::ClusterUpdate::desired_logging_service].
8556    pub fn set_desired_logging_service<T: std::convert::Into<std::string::String>>(
8557        mut self,
8558        v: T,
8559    ) -> Self {
8560        self.desired_logging_service = v.into();
8561        self
8562    }
8563
8564    /// Sets the value of [desired_resource_usage_export_config][crate::model::ClusterUpdate::desired_resource_usage_export_config].
8565    pub fn set_desired_resource_usage_export_config<
8566        T: std::convert::Into<std::option::Option<crate::model::ResourceUsageExportConfig>>,
8567    >(
8568        mut self,
8569        v: T,
8570    ) -> Self {
8571        self.desired_resource_usage_export_config = v.into();
8572        self
8573    }
8574
8575    /// Sets the value of [desired_vertical_pod_autoscaling][crate::model::ClusterUpdate::desired_vertical_pod_autoscaling].
8576    pub fn set_desired_vertical_pod_autoscaling<
8577        T: std::convert::Into<std::option::Option<crate::model::VerticalPodAutoscaling>>,
8578    >(
8579        mut self,
8580        v: T,
8581    ) -> Self {
8582        self.desired_vertical_pod_autoscaling = v.into();
8583        self
8584    }
8585
8586    /// Sets the value of [desired_private_cluster_config][crate::model::ClusterUpdate::desired_private_cluster_config].
8587    #[deprecated]
8588    pub fn set_desired_private_cluster_config<
8589        T: std::convert::Into<std::option::Option<crate::model::PrivateClusterConfig>>,
8590    >(
8591        mut self,
8592        v: T,
8593    ) -> Self {
8594        self.desired_private_cluster_config = v.into();
8595        self
8596    }
8597
8598    /// Sets the value of [desired_intra_node_visibility_config][crate::model::ClusterUpdate::desired_intra_node_visibility_config].
8599    pub fn set_desired_intra_node_visibility_config<
8600        T: std::convert::Into<std::option::Option<crate::model::IntraNodeVisibilityConfig>>,
8601    >(
8602        mut self,
8603        v: T,
8604    ) -> Self {
8605        self.desired_intra_node_visibility_config = v.into();
8606        self
8607    }
8608
8609    /// Sets the value of [desired_default_snat_status][crate::model::ClusterUpdate::desired_default_snat_status].
8610    pub fn set_desired_default_snat_status<
8611        T: std::convert::Into<std::option::Option<crate::model::DefaultSnatStatus>>,
8612    >(
8613        mut self,
8614        v: T,
8615    ) -> Self {
8616        self.desired_default_snat_status = v.into();
8617        self
8618    }
8619
8620    /// Sets the value of [desired_release_channel][crate::model::ClusterUpdate::desired_release_channel].
8621    pub fn set_desired_release_channel<
8622        T: std::convert::Into<std::option::Option<crate::model::ReleaseChannel>>,
8623    >(
8624        mut self,
8625        v: T,
8626    ) -> Self {
8627        self.desired_release_channel = v.into();
8628        self
8629    }
8630
8631    /// Sets the value of [desired_l4ilb_subsetting_config][crate::model::ClusterUpdate::desired_l4ilb_subsetting_config].
8632    pub fn set_desired_l4ilb_subsetting_config<
8633        T: std::convert::Into<std::option::Option<crate::model::ILBSubsettingConfig>>,
8634    >(
8635        mut self,
8636        v: T,
8637    ) -> Self {
8638        self.desired_l4ilb_subsetting_config = v.into();
8639        self
8640    }
8641
8642    /// Sets the value of [desired_datapath_provider][crate::model::ClusterUpdate::desired_datapath_provider].
8643    pub fn set_desired_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
8644        mut self,
8645        v: T,
8646    ) -> Self {
8647        self.desired_datapath_provider = v.into();
8648        self
8649    }
8650
8651    /// Sets the value of [desired_private_ipv6_google_access][crate::model::ClusterUpdate::desired_private_ipv6_google_access].
8652    pub fn set_desired_private_ipv6_google_access<
8653        T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
8654    >(
8655        mut self,
8656        v: T,
8657    ) -> Self {
8658        self.desired_private_ipv6_google_access = v.into();
8659        self
8660    }
8661
8662    /// Sets the value of [desired_notification_config][crate::model::ClusterUpdate::desired_notification_config].
8663    pub fn set_desired_notification_config<
8664        T: std::convert::Into<std::option::Option<crate::model::NotificationConfig>>,
8665    >(
8666        mut self,
8667        v: T,
8668    ) -> Self {
8669        self.desired_notification_config = v.into();
8670        self
8671    }
8672
8673    /// Sets the value of [desired_authenticator_groups_config][crate::model::ClusterUpdate::desired_authenticator_groups_config].
8674    pub fn set_desired_authenticator_groups_config<
8675        T: std::convert::Into<std::option::Option<crate::model::AuthenticatorGroupsConfig>>,
8676    >(
8677        mut self,
8678        v: T,
8679    ) -> Self {
8680        self.desired_authenticator_groups_config = v.into();
8681        self
8682    }
8683
8684    /// Sets the value of [desired_logging_config][crate::model::ClusterUpdate::desired_logging_config].
8685    pub fn set_desired_logging_config<
8686        T: std::convert::Into<std::option::Option<crate::model::LoggingConfig>>,
8687    >(
8688        mut self,
8689        v: T,
8690    ) -> Self {
8691        self.desired_logging_config = v.into();
8692        self
8693    }
8694
8695    /// Sets the value of [desired_monitoring_config][crate::model::ClusterUpdate::desired_monitoring_config].
8696    pub fn set_desired_monitoring_config<
8697        T: std::convert::Into<std::option::Option<crate::model::MonitoringConfig>>,
8698    >(
8699        mut self,
8700        v: T,
8701    ) -> Self {
8702        self.desired_monitoring_config = v.into();
8703        self
8704    }
8705
8706    /// Sets the value of [desired_identity_service_config][crate::model::ClusterUpdate::desired_identity_service_config].
8707    pub fn set_desired_identity_service_config<
8708        T: std::convert::Into<std::option::Option<crate::model::IdentityServiceConfig>>,
8709    >(
8710        mut self,
8711        v: T,
8712    ) -> Self {
8713        self.desired_identity_service_config = v.into();
8714        self
8715    }
8716
8717    /// Sets the value of [desired_service_external_ips_config][crate::model::ClusterUpdate::desired_service_external_ips_config].
8718    pub fn set_desired_service_external_ips_config<
8719        T: std::convert::Into<std::option::Option<crate::model::ServiceExternalIPsConfig>>,
8720    >(
8721        mut self,
8722        v: T,
8723    ) -> Self {
8724        self.desired_service_external_ips_config = v.into();
8725        self
8726    }
8727
8728    /// Sets the value of [desired_enable_private_endpoint][crate::model::ClusterUpdate::desired_enable_private_endpoint].
8729    #[deprecated]
8730    pub fn set_desired_enable_private_endpoint<T: std::convert::Into<std::option::Option<bool>>>(
8731        mut self,
8732        v: T,
8733    ) -> Self {
8734        self.desired_enable_private_endpoint = v.into();
8735        self
8736    }
8737
8738    /// Sets the value of [desired_default_enable_private_nodes][crate::model::ClusterUpdate::desired_default_enable_private_nodes].
8739    pub fn set_desired_default_enable_private_nodes<
8740        T: std::convert::Into<std::option::Option<bool>>,
8741    >(
8742        mut self,
8743        v: T,
8744    ) -> Self {
8745        self.desired_default_enable_private_nodes = v.into();
8746        self
8747    }
8748
8749    /// Sets the value of [desired_control_plane_endpoints_config][crate::model::ClusterUpdate::desired_control_plane_endpoints_config].
8750    pub fn set_desired_control_plane_endpoints_config<
8751        T: std::convert::Into<std::option::Option<crate::model::ControlPlaneEndpointsConfig>>,
8752    >(
8753        mut self,
8754        v: T,
8755    ) -> Self {
8756        self.desired_control_plane_endpoints_config = v.into();
8757        self
8758    }
8759
8760    /// Sets the value of [desired_master_version][crate::model::ClusterUpdate::desired_master_version].
8761    pub fn set_desired_master_version<T: std::convert::Into<std::string::String>>(
8762        mut self,
8763        v: T,
8764    ) -> Self {
8765        self.desired_master_version = v.into();
8766        self
8767    }
8768
8769    /// Sets the value of [desired_gcfs_config][crate::model::ClusterUpdate::desired_gcfs_config].
8770    pub fn set_desired_gcfs_config<
8771        T: std::convert::Into<std::option::Option<crate::model::GcfsConfig>>,
8772    >(
8773        mut self,
8774        v: T,
8775    ) -> Self {
8776        self.desired_gcfs_config = v.into();
8777        self
8778    }
8779
8780    /// Sets the value of [desired_node_pool_auto_config_network_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_network_tags].
8781    pub fn set_desired_node_pool_auto_config_network_tags<
8782        T: std::convert::Into<std::option::Option<crate::model::NetworkTags>>,
8783    >(
8784        mut self,
8785        v: T,
8786    ) -> Self {
8787        self.desired_node_pool_auto_config_network_tags = v.into();
8788        self
8789    }
8790
8791    /// Sets the value of [desired_gateway_api_config][crate::model::ClusterUpdate::desired_gateway_api_config].
8792    pub fn set_desired_gateway_api_config<
8793        T: std::convert::Into<std::option::Option<crate::model::GatewayAPIConfig>>,
8794    >(
8795        mut self,
8796        v: T,
8797    ) -> Self {
8798        self.desired_gateway_api_config = v.into();
8799        self
8800    }
8801
8802    /// Sets the value of [etag][crate::model::ClusterUpdate::etag].
8803    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8804        self.etag = v.into();
8805        self
8806    }
8807
8808    /// Sets the value of [desired_node_pool_logging_config][crate::model::ClusterUpdate::desired_node_pool_logging_config].
8809    pub fn set_desired_node_pool_logging_config<
8810        T: std::convert::Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
8811    >(
8812        mut self,
8813        v: T,
8814    ) -> Self {
8815        self.desired_node_pool_logging_config = v.into();
8816        self
8817    }
8818
8819    /// Sets the value of [desired_fleet][crate::model::ClusterUpdate::desired_fleet].
8820    pub fn set_desired_fleet<T: std::convert::Into<std::option::Option<crate::model::Fleet>>>(
8821        mut self,
8822        v: T,
8823    ) -> Self {
8824        self.desired_fleet = v.into();
8825        self
8826    }
8827
8828    /// Sets the value of [desired_stack_type][crate::model::ClusterUpdate::desired_stack_type].
8829    pub fn set_desired_stack_type<T: std::convert::Into<crate::model::StackType>>(
8830        mut self,
8831        v: T,
8832    ) -> Self {
8833        self.desired_stack_type = v.into();
8834        self
8835    }
8836
8837    /// Sets the value of [additional_pod_ranges_config][crate::model::ClusterUpdate::additional_pod_ranges_config].
8838    pub fn set_additional_pod_ranges_config<
8839        T: std::convert::Into<std::option::Option<crate::model::AdditionalPodRangesConfig>>,
8840    >(
8841        mut self,
8842        v: T,
8843    ) -> Self {
8844        self.additional_pod_ranges_config = v.into();
8845        self
8846    }
8847
8848    /// Sets the value of [removed_additional_pod_ranges_config][crate::model::ClusterUpdate::removed_additional_pod_ranges_config].
8849    pub fn set_removed_additional_pod_ranges_config<
8850        T: std::convert::Into<std::option::Option<crate::model::AdditionalPodRangesConfig>>,
8851    >(
8852        mut self,
8853        v: T,
8854    ) -> Self {
8855        self.removed_additional_pod_ranges_config = v.into();
8856        self
8857    }
8858
8859    /// Sets the value of [enable_k8s_beta_apis][crate::model::ClusterUpdate::enable_k8s_beta_apis].
8860    pub fn set_enable_k8s_beta_apis<
8861        T: std::convert::Into<std::option::Option<crate::model::K8sBetaAPIConfig>>,
8862    >(
8863        mut self,
8864        v: T,
8865    ) -> Self {
8866        self.enable_k8s_beta_apis = v.into();
8867        self
8868    }
8869
8870    /// Sets the value of [desired_security_posture_config][crate::model::ClusterUpdate::desired_security_posture_config].
8871    pub fn set_desired_security_posture_config<
8872        T: std::convert::Into<std::option::Option<crate::model::SecurityPostureConfig>>,
8873    >(
8874        mut self,
8875        v: T,
8876    ) -> Self {
8877        self.desired_security_posture_config = v.into();
8878        self
8879    }
8880
8881    /// Sets the value of [desired_network_performance_config][crate::model::ClusterUpdate::desired_network_performance_config].
8882    pub fn set_desired_network_performance_config<
8883        T: std::convert::Into<
8884                std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
8885            >,
8886    >(
8887        mut self,
8888        v: T,
8889    ) -> Self {
8890        self.desired_network_performance_config = v.into();
8891        self
8892    }
8893
8894    /// Sets the value of [desired_enable_fqdn_network_policy][crate::model::ClusterUpdate::desired_enable_fqdn_network_policy].
8895    pub fn set_desired_enable_fqdn_network_policy<
8896        T: std::convert::Into<std::option::Option<bool>>,
8897    >(
8898        mut self,
8899        v: T,
8900    ) -> Self {
8901        self.desired_enable_fqdn_network_policy = v.into();
8902        self
8903    }
8904
8905    /// Sets the value of [desired_autopilot_workload_policy_config][crate::model::ClusterUpdate::desired_autopilot_workload_policy_config].
8906    pub fn set_desired_autopilot_workload_policy_config<
8907        T: std::convert::Into<std::option::Option<crate::model::WorkloadPolicyConfig>>,
8908    >(
8909        mut self,
8910        v: T,
8911    ) -> Self {
8912        self.desired_autopilot_workload_policy_config = v.into();
8913        self
8914    }
8915
8916    /// Sets the value of [desired_k8s_beta_apis][crate::model::ClusterUpdate::desired_k8s_beta_apis].
8917    pub fn set_desired_k8s_beta_apis<
8918        T: std::convert::Into<std::option::Option<crate::model::K8sBetaAPIConfig>>,
8919    >(
8920        mut self,
8921        v: T,
8922    ) -> Self {
8923        self.desired_k8s_beta_apis = v.into();
8924        self
8925    }
8926
8927    /// Sets the value of [desired_containerd_config][crate::model::ClusterUpdate::desired_containerd_config].
8928    pub fn set_desired_containerd_config<
8929        T: std::convert::Into<std::option::Option<crate::model::ContainerdConfig>>,
8930    >(
8931        mut self,
8932        v: T,
8933    ) -> Self {
8934        self.desired_containerd_config = v.into();
8935        self
8936    }
8937
8938    /// Sets the value of [desired_enable_multi_networking][crate::model::ClusterUpdate::desired_enable_multi_networking].
8939    pub fn set_desired_enable_multi_networking<T: std::convert::Into<std::option::Option<bool>>>(
8940        mut self,
8941        v: T,
8942    ) -> Self {
8943        self.desired_enable_multi_networking = v.into();
8944        self
8945    }
8946
8947    /// Sets the value of [desired_node_pool_auto_config_resource_manager_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_resource_manager_tags].
8948    pub fn set_desired_node_pool_auto_config_resource_manager_tags<
8949        T: std::convert::Into<std::option::Option<crate::model::ResourceManagerTags>>,
8950    >(
8951        mut self,
8952        v: T,
8953    ) -> Self {
8954        self.desired_node_pool_auto_config_resource_manager_tags = v.into();
8955        self
8956    }
8957
8958    /// Sets the value of [desired_in_transit_encryption_config][crate::model::ClusterUpdate::desired_in_transit_encryption_config].
8959    pub fn set_desired_in_transit_encryption_config<
8960        T: std::convert::Into<std::option::Option<crate::model::InTransitEncryptionConfig>>,
8961    >(
8962        mut self,
8963        v: T,
8964    ) -> Self {
8965        self.desired_in_transit_encryption_config = v.into();
8966        self
8967    }
8968
8969    /// Sets the value of [desired_enable_cilium_clusterwide_network_policy][crate::model::ClusterUpdate::desired_enable_cilium_clusterwide_network_policy].
8970    pub fn set_desired_enable_cilium_clusterwide_network_policy<
8971        T: std::convert::Into<std::option::Option<bool>>,
8972    >(
8973        mut self,
8974        v: T,
8975    ) -> Self {
8976        self.desired_enable_cilium_clusterwide_network_policy = v.into();
8977        self
8978    }
8979
8980    /// Sets the value of [desired_secret_manager_config][crate::model::ClusterUpdate::desired_secret_manager_config].
8981    pub fn set_desired_secret_manager_config<
8982        T: std::convert::Into<std::option::Option<crate::model::SecretManagerConfig>>,
8983    >(
8984        mut self,
8985        v: T,
8986    ) -> Self {
8987        self.desired_secret_manager_config = v.into();
8988        self
8989    }
8990
8991    /// Sets the value of [desired_compliance_posture_config][crate::model::ClusterUpdate::desired_compliance_posture_config].
8992    pub fn set_desired_compliance_posture_config<
8993        T: std::convert::Into<std::option::Option<crate::model::CompliancePostureConfig>>,
8994    >(
8995        mut self,
8996        v: T,
8997    ) -> Self {
8998        self.desired_compliance_posture_config = v.into();
8999        self
9000    }
9001
9002    /// Sets the value of [desired_node_kubelet_config][crate::model::ClusterUpdate::desired_node_kubelet_config].
9003    pub fn set_desired_node_kubelet_config<
9004        T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
9005    >(
9006        mut self,
9007        v: T,
9008    ) -> Self {
9009        self.desired_node_kubelet_config = v.into();
9010        self
9011    }
9012
9013    /// Sets the value of [desired_node_pool_auto_config_kubelet_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_kubelet_config].
9014    pub fn set_desired_node_pool_auto_config_kubelet_config<
9015        T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
9016    >(
9017        mut self,
9018        v: T,
9019    ) -> Self {
9020        self.desired_node_pool_auto_config_kubelet_config = v.into();
9021        self
9022    }
9023
9024    /// Sets the value of [user_managed_keys_config][crate::model::ClusterUpdate::user_managed_keys_config].
9025    pub fn set_user_managed_keys_config<
9026        T: std::convert::Into<std::option::Option<crate::model::UserManagedKeysConfig>>,
9027    >(
9028        mut self,
9029        v: T,
9030    ) -> Self {
9031        self.user_managed_keys_config = v.into();
9032        self
9033    }
9034
9035    /// Sets the value of [desired_rbac_binding_config][crate::model::ClusterUpdate::desired_rbac_binding_config].
9036    pub fn set_desired_rbac_binding_config<
9037        T: std::convert::Into<std::option::Option<crate::model::RBACBindingConfig>>,
9038    >(
9039        mut self,
9040        v: T,
9041    ) -> Self {
9042        self.desired_rbac_binding_config = v.into();
9043        self
9044    }
9045
9046    /// Sets the value of [desired_enterprise_config][crate::model::ClusterUpdate::desired_enterprise_config].
9047    pub fn set_desired_enterprise_config<
9048        T: std::convert::Into<std::option::Option<crate::model::DesiredEnterpriseConfig>>,
9049    >(
9050        mut self,
9051        v: T,
9052    ) -> Self {
9053        self.desired_enterprise_config = v.into();
9054        self
9055    }
9056
9057    /// Sets the value of [desired_node_pool_auto_config_linux_node_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_linux_node_config].
9058    pub fn set_desired_node_pool_auto_config_linux_node_config<
9059        T: std::convert::Into<std::option::Option<crate::model::LinuxNodeConfig>>,
9060    >(
9061        mut self,
9062        v: T,
9063    ) -> Self {
9064        self.desired_node_pool_auto_config_linux_node_config = v.into();
9065        self
9066    }
9067}
9068
9069impl wkt::message::Message for ClusterUpdate {
9070    fn typename() -> &'static str {
9071        "type.googleapis.com/google.container.v1.ClusterUpdate"
9072    }
9073}
9074
9075/// AdditionalPodRangesConfig is the configuration for additional pod secondary
9076/// ranges supporting the ClusterUpdate message.
9077#[serde_with::serde_as]
9078#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9079#[serde(default, rename_all = "camelCase")]
9080#[non_exhaustive]
9081pub struct AdditionalPodRangesConfig {
9082    /// Name for pod secondary ipv4 range which has the actual range defined ahead.
9083    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9084    pub pod_range_names: std::vec::Vec<std::string::String>,
9085
9086    /// Output only. Information for additional pod range.
9087    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9088    pub pod_range_info: std::vec::Vec<crate::model::RangeInfo>,
9089
9090    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9091    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9092}
9093
9094impl AdditionalPodRangesConfig {
9095    pub fn new() -> Self {
9096        std::default::Default::default()
9097    }
9098
9099    /// Sets the value of [pod_range_names][crate::model::AdditionalPodRangesConfig::pod_range_names].
9100    pub fn set_pod_range_names<T, V>(mut self, v: T) -> Self
9101    where
9102        T: std::iter::IntoIterator<Item = V>,
9103        V: std::convert::Into<std::string::String>,
9104    {
9105        use std::iter::Iterator;
9106        self.pod_range_names = v.into_iter().map(|i| i.into()).collect();
9107        self
9108    }
9109
9110    /// Sets the value of [pod_range_info][crate::model::AdditionalPodRangesConfig::pod_range_info].
9111    pub fn set_pod_range_info<T, V>(mut self, v: T) -> Self
9112    where
9113        T: std::iter::IntoIterator<Item = V>,
9114        V: std::convert::Into<crate::model::RangeInfo>,
9115    {
9116        use std::iter::Iterator;
9117        self.pod_range_info = v.into_iter().map(|i| i.into()).collect();
9118        self
9119    }
9120}
9121
9122impl wkt::message::Message for AdditionalPodRangesConfig {
9123    fn typename() -> &'static str {
9124        "type.googleapis.com/google.container.v1.AdditionalPodRangesConfig"
9125    }
9126}
9127
9128/// RangeInfo contains the range name and the range utilization by this cluster.
9129#[serde_with::serde_as]
9130#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9131#[serde(default, rename_all = "camelCase")]
9132#[non_exhaustive]
9133pub struct RangeInfo {
9134    /// Output only. Name of a range.
9135    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9136    pub range_name: std::string::String,
9137
9138    /// Output only. The utilization of the range.
9139    #[serde(skip_serializing_if = "wkt::internal::is_default")]
9140    #[serde_as(as = "wkt::internal::F64")]
9141    pub utilization: f64,
9142
9143    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9144    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9145}
9146
9147impl RangeInfo {
9148    pub fn new() -> Self {
9149        std::default::Default::default()
9150    }
9151
9152    /// Sets the value of [range_name][crate::model::RangeInfo::range_name].
9153    pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9154        self.range_name = v.into();
9155        self
9156    }
9157
9158    /// Sets the value of [utilization][crate::model::RangeInfo::utilization].
9159    pub fn set_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
9160        self.utilization = v.into();
9161        self
9162    }
9163}
9164
9165impl wkt::message::Message for RangeInfo {
9166    fn typename() -> &'static str {
9167        "type.googleapis.com/google.container.v1.RangeInfo"
9168    }
9169}
9170
9171/// DesiredEnterpriseConfig is a wrapper used for updating enterprise_config.
9172#[serde_with::serde_as]
9173#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9174#[serde(default, rename_all = "camelCase")]
9175#[non_exhaustive]
9176pub struct DesiredEnterpriseConfig {
9177    /// desired_tier specifies the desired tier of the cluster.
9178    pub desired_tier: crate::model::enterprise_config::ClusterTier,
9179
9180    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9181    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9182}
9183
9184impl DesiredEnterpriseConfig {
9185    pub fn new() -> Self {
9186        std::default::Default::default()
9187    }
9188
9189    /// Sets the value of [desired_tier][crate::model::DesiredEnterpriseConfig::desired_tier].
9190    pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
9191        mut self,
9192        v: T,
9193    ) -> Self {
9194        self.desired_tier = v.into();
9195        self
9196    }
9197}
9198
9199impl wkt::message::Message for DesiredEnterpriseConfig {
9200    fn typename() -> &'static str {
9201        "type.googleapis.com/google.container.v1.DesiredEnterpriseConfig"
9202    }
9203}
9204
9205/// This operation resource represents operations that may have happened or are
9206/// happening on the cluster. All fields are output only.
9207#[serde_with::serde_as]
9208#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9209#[serde(default, rename_all = "camelCase")]
9210#[non_exhaustive]
9211pub struct Operation {
9212    /// Output only. The server-assigned ID for the operation.
9213    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9214    pub name: std::string::String,
9215
9216    /// Output only. The name of the Google Compute Engine
9217    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
9218    /// operation is taking place. This field is deprecated, use location instead.
9219    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9220    #[deprecated]
9221    pub zone: std::string::String,
9222
9223    /// Output only. The operation type.
9224    pub operation_type: crate::model::operation::Type,
9225
9226    /// Output only. The current status of the operation.
9227    pub status: crate::model::operation::Status,
9228
9229    /// Output only. Detailed operation progress, if available.
9230    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9231    pub detail: std::string::String,
9232
9233    /// Output only. If an error has occurred, a textual description of the error.
9234    /// Deprecated. Use the field error instead.
9235    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9236    #[deprecated]
9237    pub status_message: std::string::String,
9238
9239    /// Output only. Server-defined URI for the operation. Example:
9240    /// `<https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123>`.
9241    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9242    pub self_link: std::string::String,
9243
9244    /// Output only. Server-defined URI for the target of the operation. The format
9245    /// of this is a URI to the resource being modified (such as a cluster, node
9246    /// pool, or node). For node pool repairs, there may be multiple nodes being
9247    /// repaired, but only one will be the target.
9248    ///
9249    /// Examples:
9250    ///
9251    ///
9252    /// ##
9253    ///
9254    /// `<https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster>`
9255    ///
9256    /// ##
9257    ///
9258    /// `<https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np>`
9259    ///
9260    /// `<https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node>`
9261    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9262    pub target_link: std::string::String,
9263
9264    /// Output only. The name of the Google Compute Engine
9265    /// [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
9266    /// or
9267    /// [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
9268    /// in which the cluster resides.
9269    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9270    pub location: std::string::String,
9271
9272    /// Output only. The time the operation started, in
9273    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
9274    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9275    pub start_time: std::string::String,
9276
9277    /// Output only. The time the operation completed, in
9278    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
9279    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9280    pub end_time: std::string::String,
9281
9282    /// Output only. Progress information for an operation.
9283    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9284    pub progress: std::option::Option<crate::model::OperationProgress>,
9285
9286    /// Which conditions caused the current cluster state.
9287    /// Deprecated. Use field error instead.
9288    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9289    #[deprecated]
9290    pub cluster_conditions: std::vec::Vec<crate::model::StatusCondition>,
9291
9292    /// Which conditions caused the current node pool state.
9293    /// Deprecated. Use field error instead.
9294    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9295    #[deprecated]
9296    pub nodepool_conditions: std::vec::Vec<crate::model::StatusCondition>,
9297
9298    /// The error result of the operation in case of failure.
9299    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9300    pub error: std::option::Option<rpc::model::Status>,
9301
9302    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9303    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9304}
9305
9306impl Operation {
9307    pub fn new() -> Self {
9308        std::default::Default::default()
9309    }
9310
9311    /// Sets the value of [name][crate::model::Operation::name].
9312    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9313        self.name = v.into();
9314        self
9315    }
9316
9317    /// Sets the value of [zone][crate::model::Operation::zone].
9318    #[deprecated]
9319    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9320        self.zone = v.into();
9321        self
9322    }
9323
9324    /// Sets the value of [operation_type][crate::model::Operation::operation_type].
9325    pub fn set_operation_type<T: std::convert::Into<crate::model::operation::Type>>(
9326        mut self,
9327        v: T,
9328    ) -> Self {
9329        self.operation_type = v.into();
9330        self
9331    }
9332
9333    /// Sets the value of [status][crate::model::Operation::status].
9334    pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
9335        mut self,
9336        v: T,
9337    ) -> Self {
9338        self.status = v.into();
9339        self
9340    }
9341
9342    /// Sets the value of [detail][crate::model::Operation::detail].
9343    pub fn set_detail<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9344        self.detail = v.into();
9345        self
9346    }
9347
9348    /// Sets the value of [status_message][crate::model::Operation::status_message].
9349    #[deprecated]
9350    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9351        self.status_message = v.into();
9352        self
9353    }
9354
9355    /// Sets the value of [self_link][crate::model::Operation::self_link].
9356    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9357        self.self_link = v.into();
9358        self
9359    }
9360
9361    /// Sets the value of [target_link][crate::model::Operation::target_link].
9362    pub fn set_target_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9363        self.target_link = v.into();
9364        self
9365    }
9366
9367    /// Sets the value of [location][crate::model::Operation::location].
9368    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9369        self.location = v.into();
9370        self
9371    }
9372
9373    /// Sets the value of [start_time][crate::model::Operation::start_time].
9374    pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9375        self.start_time = v.into();
9376        self
9377    }
9378
9379    /// Sets the value of [end_time][crate::model::Operation::end_time].
9380    pub fn set_end_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9381        self.end_time = v.into();
9382        self
9383    }
9384
9385    /// Sets the value of [progress][crate::model::Operation::progress].
9386    pub fn set_progress<
9387        T: std::convert::Into<std::option::Option<crate::model::OperationProgress>>,
9388    >(
9389        mut self,
9390        v: T,
9391    ) -> Self {
9392        self.progress = v.into();
9393        self
9394    }
9395
9396    /// Sets the value of [cluster_conditions][crate::model::Operation::cluster_conditions].
9397    #[deprecated]
9398    pub fn set_cluster_conditions<T, V>(mut self, v: T) -> Self
9399    where
9400        T: std::iter::IntoIterator<Item = V>,
9401        V: std::convert::Into<crate::model::StatusCondition>,
9402    {
9403        use std::iter::Iterator;
9404        self.cluster_conditions = v.into_iter().map(|i| i.into()).collect();
9405        self
9406    }
9407
9408    /// Sets the value of [nodepool_conditions][crate::model::Operation::nodepool_conditions].
9409    #[deprecated]
9410    pub fn set_nodepool_conditions<T, V>(mut self, v: T) -> Self
9411    where
9412        T: std::iter::IntoIterator<Item = V>,
9413        V: std::convert::Into<crate::model::StatusCondition>,
9414    {
9415        use std::iter::Iterator;
9416        self.nodepool_conditions = v.into_iter().map(|i| i.into()).collect();
9417        self
9418    }
9419
9420    /// Sets the value of [error][crate::model::Operation::error].
9421    pub fn set_error<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
9422        mut self,
9423        v: T,
9424    ) -> Self {
9425        self.error = v.into();
9426        self
9427    }
9428}
9429
9430impl wkt::message::Message for Operation {
9431    fn typename() -> &'static str {
9432        "type.googleapis.com/google.container.v1.Operation"
9433    }
9434}
9435
9436/// Defines additional types related to [Operation].
9437pub mod operation {
9438    #[allow(unused_imports)]
9439    use super::*;
9440
9441    /// Current status of the operation.
9442    ///
9443    /// # Working with unknown values
9444    ///
9445    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9446    /// additional enum variants at any time. Adding new variants is not considered
9447    /// a breaking change. Applications should write their code in anticipation of:
9448    ///
9449    /// - New values appearing in future releases of the client library, **and**
9450    /// - New values received dynamically, without application changes.
9451    ///
9452    /// Please consult the [Working with enums] section in the user guide for some
9453    /// guidelines.
9454    ///
9455    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9456    #[derive(Clone, Debug, PartialEq)]
9457    #[non_exhaustive]
9458    pub enum Status {
9459        /// Not set.
9460        Unspecified,
9461        /// The operation has been created.
9462        Pending,
9463        /// The operation is currently running.
9464        Running,
9465        /// The operation is done, either cancelled or completed.
9466        Done,
9467        /// The operation is aborting.
9468        Aborting,
9469        /// If set, the enum was initialized with an unknown value.
9470        ///
9471        /// Applications can examine the value using [Status::value] or
9472        /// [Status::name].
9473        UnknownValue(status::UnknownValue),
9474    }
9475
9476    #[doc(hidden)]
9477    pub mod status {
9478        #[allow(unused_imports)]
9479        use super::*;
9480        #[derive(Clone, Debug, PartialEq)]
9481        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9482    }
9483
9484    impl Status {
9485        /// Gets the enum value.
9486        ///
9487        /// Returns `None` if the enum contains an unknown value deserialized from
9488        /// the string representation of enums.
9489        pub fn value(&self) -> std::option::Option<i32> {
9490            match self {
9491                Self::Unspecified => std::option::Option::Some(0),
9492                Self::Pending => std::option::Option::Some(1),
9493                Self::Running => std::option::Option::Some(2),
9494                Self::Done => std::option::Option::Some(3),
9495                Self::Aborting => std::option::Option::Some(4),
9496                Self::UnknownValue(u) => u.0.value(),
9497            }
9498        }
9499
9500        /// Gets the enum value as a string.
9501        ///
9502        /// Returns `None` if the enum contains an unknown value deserialized from
9503        /// the integer representation of enums.
9504        pub fn name(&self) -> std::option::Option<&str> {
9505            match self {
9506                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
9507                Self::Pending => std::option::Option::Some("PENDING"),
9508                Self::Running => std::option::Option::Some("RUNNING"),
9509                Self::Done => std::option::Option::Some("DONE"),
9510                Self::Aborting => std::option::Option::Some("ABORTING"),
9511                Self::UnknownValue(u) => u.0.name(),
9512            }
9513        }
9514    }
9515
9516    impl std::default::Default for Status {
9517        fn default() -> Self {
9518            use std::convert::From;
9519            Self::from(0)
9520        }
9521    }
9522
9523    impl std::fmt::Display for Status {
9524        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9525            wkt::internal::display_enum(f, self.name(), self.value())
9526        }
9527    }
9528
9529    impl std::convert::From<i32> for Status {
9530        fn from(value: i32) -> Self {
9531            match value {
9532                0 => Self::Unspecified,
9533                1 => Self::Pending,
9534                2 => Self::Running,
9535                3 => Self::Done,
9536                4 => Self::Aborting,
9537                _ => Self::UnknownValue(status::UnknownValue(
9538                    wkt::internal::UnknownEnumValue::Integer(value),
9539                )),
9540            }
9541        }
9542    }
9543
9544    impl std::convert::From<&str> for Status {
9545        fn from(value: &str) -> Self {
9546            use std::string::ToString;
9547            match value {
9548                "STATUS_UNSPECIFIED" => Self::Unspecified,
9549                "PENDING" => Self::Pending,
9550                "RUNNING" => Self::Running,
9551                "DONE" => Self::Done,
9552                "ABORTING" => Self::Aborting,
9553                _ => Self::UnknownValue(status::UnknownValue(
9554                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9555                )),
9556            }
9557        }
9558    }
9559
9560    impl serde::ser::Serialize for Status {
9561        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9562        where
9563            S: serde::Serializer,
9564        {
9565            match self {
9566                Self::Unspecified => serializer.serialize_i32(0),
9567                Self::Pending => serializer.serialize_i32(1),
9568                Self::Running => serializer.serialize_i32(2),
9569                Self::Done => serializer.serialize_i32(3),
9570                Self::Aborting => serializer.serialize_i32(4),
9571                Self::UnknownValue(u) => u.0.serialize(serializer),
9572            }
9573        }
9574    }
9575
9576    impl<'de> serde::de::Deserialize<'de> for Status {
9577        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9578        where
9579            D: serde::Deserializer<'de>,
9580        {
9581            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
9582                ".google.container.v1.Operation.Status",
9583            ))
9584        }
9585    }
9586
9587    /// Operation type categorizes the operation.
9588    ///
9589    /// # Working with unknown values
9590    ///
9591    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9592    /// additional enum variants at any time. Adding new variants is not considered
9593    /// a breaking change. Applications should write their code in anticipation of:
9594    ///
9595    /// - New values appearing in future releases of the client library, **and**
9596    /// - New values received dynamically, without application changes.
9597    ///
9598    /// Please consult the [Working with enums] section in the user guide for some
9599    /// guidelines.
9600    ///
9601    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9602    #[derive(Clone, Debug, PartialEq)]
9603    #[non_exhaustive]
9604    pub enum Type {
9605        /// Not set.
9606        Unspecified,
9607        /// The cluster is being created. The cluster should be assumed to be
9608        /// unusable until the operation finishes.
9609        ///
9610        /// In the event of the operation failing, the cluster will enter the [ERROR
9611        /// state][Cluster.Status.ERROR] and eventually be deleted.
9612        ///
9613        /// [Cluster.Status.ERROR]: crate::model::cluster::Status::Error
9614        CreateCluster,
9615        /// The cluster is being deleted. The cluster should be assumed to be
9616        /// unusable as soon as this operation starts.
9617        ///
9618        /// In the event of the operation failing, the cluster will enter the [ERROR
9619        /// state][Cluster.Status.ERROR] and the deletion will be automatically
9620        /// retried until completed.
9621        ///
9622        /// [Cluster.Status.ERROR]: crate::model::cluster::Status::Error
9623        DeleteCluster,
9624        /// The [cluster
9625        /// version][google.container.v1.ClusterUpdate.desired_master_version] is
9626        /// being updated. Note that this includes "upgrades" to the same version,
9627        /// which are simply a recreation. This also includes
9628        /// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically).
9629        /// For more details, see [documentation on cluster
9630        /// upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades).
9631        ///
9632        /// [google.container.v1.ClusterUpdate.desired_master_version]: crate::model::ClusterUpdate::desired_master_version
9633        UpgradeMaster,
9634        /// A node pool is being updated. Despite calling this an "upgrade", this
9635        /// includes most forms of updates to node pools. This also includes
9636        /// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades).
9637        ///
9638        /// This operation sets the
9639        /// [progress][google.container.v1.Operation.progress] field and may be
9640        /// [canceled][google.container.v1.ClusterManager.CancelOperation].
9641        ///
9642        /// The upgrade strategy depends on [node pool
9643        /// configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies).
9644        /// The nodes are generally still usable during this operation.
9645        ///
9646        /// [google.container.v1.ClusterManager.CancelOperation]: crate::client::ClusterManager::cancel_operation
9647        /// [google.container.v1.Operation.progress]: crate::model::Operation::progress
9648        UpgradeNodes,
9649        /// A problem has been detected with the control plane and is being repaired.
9650        /// This operation type is initiated by GKE. For more details, see
9651        /// [documentation on
9652        /// repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
9653        RepairCluster,
9654        /// The cluster is being updated. This is a broad category of operations and
9655        /// includes operations that only change metadata as well as those that must
9656        /// recreate the entire cluster. If the control plane must be recreated, this
9657        /// will cause temporary downtime for zonal clusters.
9658        ///
9659        /// Some features require recreating the nodes as well. Those will be
9660        /// recreated as separate operations and the update may not be completely
9661        /// functional until the node pools recreations finish. Node recreations will
9662        /// generally follow [maintenance
9663        /// policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions).
9664        ///
9665        /// Some GKE-initiated operations use this type. This includes certain types
9666        /// of auto-upgrades and incident mitigations.
9667        UpdateCluster,
9668        /// A node pool is being created. The node pool should be assumed to be
9669        /// unusable until this operation finishes. In the event of an error, the
9670        /// node pool may be partially created.
9671        ///
9672        /// If enabled, [node
9673        /// autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning)
9674        /// may have automatically initiated such operations.
9675        CreateNodePool,
9676        /// The node pool is being deleted. The node pool should be assumed to be
9677        /// unusable as soon as this operation starts.
9678        DeleteNodePool,
9679        /// The node pool's [manamagent][google.container.v1.NodePool.management]
9680        /// field is being updated. These operations only update metadata and may be
9681        /// concurrent with most other operations.
9682        ///
9683        /// [google.container.v1.NodePool.management]: crate::model::NodePool::management
9684        SetNodePoolManagement,
9685        /// A problem has been detected with nodes and [they are being
9686        /// repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair).
9687        /// This operation type is initiated by GKE, typically automatically. This
9688        /// operation may be concurrent with other operations and there may be
9689        /// multiple repairs occurring on the same node pool.
9690        AutoRepairNodes,
9691        /// Unused. Automatic node upgrade uses
9692        /// [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES].
9693        ///
9694        /// [google.container.v1.Operation.Type.UPGRADE_NODES]: crate::model::operation::Type::UpgradeNodes
9695        #[deprecated]
9696        AutoUpgradeNodes,
9697        /// Unused. Updating labels uses
9698        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
9699        ///
9700        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
9701        #[deprecated]
9702        SetLabels,
9703        /// Unused. Updating master auth uses
9704        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
9705        ///
9706        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
9707        #[deprecated]
9708        SetMasterAuth,
9709        /// The node pool is being resized. With the exception of resizing to or from
9710        /// size zero, the node pool is generally usable during this operation.
9711        SetNodePoolSize,
9712        /// Unused. Updating network policy uses
9713        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
9714        ///
9715        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
9716        #[deprecated]
9717        SetNetworkPolicy,
9718        /// Unused. Updating maintenance policy uses
9719        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
9720        ///
9721        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
9722        #[deprecated]
9723        SetMaintenancePolicy,
9724        /// The control plane is being resized. This operation type is initiated by
9725        /// GKE. These operations are often performed preemptively to ensure that the
9726        /// control plane has sufficient resources and is not typically an indication
9727        /// of issues. For more details, see
9728        /// [documentation on
9729        /// resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
9730        ResizeCluster,
9731        /// Fleet features of GKE Enterprise are being upgraded. The cluster should
9732        /// be assumed to be blocked for other upgrades until the operation finishes.
9733        FleetFeatureUpgrade,
9734        /// If set, the enum was initialized with an unknown value.
9735        ///
9736        /// Applications can examine the value using [Type::value] or
9737        /// [Type::name].
9738        UnknownValue(r#type::UnknownValue),
9739    }
9740
9741    #[doc(hidden)]
9742    pub mod r#type {
9743        #[allow(unused_imports)]
9744        use super::*;
9745        #[derive(Clone, Debug, PartialEq)]
9746        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9747    }
9748
9749    impl Type {
9750        /// Gets the enum value.
9751        ///
9752        /// Returns `None` if the enum contains an unknown value deserialized from
9753        /// the string representation of enums.
9754        pub fn value(&self) -> std::option::Option<i32> {
9755            match self {
9756                Self::Unspecified => std::option::Option::Some(0),
9757                Self::CreateCluster => std::option::Option::Some(1),
9758                Self::DeleteCluster => std::option::Option::Some(2),
9759                Self::UpgradeMaster => std::option::Option::Some(3),
9760                Self::UpgradeNodes => std::option::Option::Some(4),
9761                Self::RepairCluster => std::option::Option::Some(5),
9762                Self::UpdateCluster => std::option::Option::Some(6),
9763                Self::CreateNodePool => std::option::Option::Some(7),
9764                Self::DeleteNodePool => std::option::Option::Some(8),
9765                Self::SetNodePoolManagement => std::option::Option::Some(9),
9766                Self::AutoRepairNodes => std::option::Option::Some(10),
9767                Self::AutoUpgradeNodes => std::option::Option::Some(11),
9768                Self::SetLabels => std::option::Option::Some(12),
9769                Self::SetMasterAuth => std::option::Option::Some(13),
9770                Self::SetNodePoolSize => std::option::Option::Some(14),
9771                Self::SetNetworkPolicy => std::option::Option::Some(15),
9772                Self::SetMaintenancePolicy => std::option::Option::Some(16),
9773                Self::ResizeCluster => std::option::Option::Some(18),
9774                Self::FleetFeatureUpgrade => std::option::Option::Some(19),
9775                Self::UnknownValue(u) => u.0.value(),
9776            }
9777        }
9778
9779        /// Gets the enum value as a string.
9780        ///
9781        /// Returns `None` if the enum contains an unknown value deserialized from
9782        /// the integer representation of enums.
9783        pub fn name(&self) -> std::option::Option<&str> {
9784            match self {
9785                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
9786                Self::CreateCluster => std::option::Option::Some("CREATE_CLUSTER"),
9787                Self::DeleteCluster => std::option::Option::Some("DELETE_CLUSTER"),
9788                Self::UpgradeMaster => std::option::Option::Some("UPGRADE_MASTER"),
9789                Self::UpgradeNodes => std::option::Option::Some("UPGRADE_NODES"),
9790                Self::RepairCluster => std::option::Option::Some("REPAIR_CLUSTER"),
9791                Self::UpdateCluster => std::option::Option::Some("UPDATE_CLUSTER"),
9792                Self::CreateNodePool => std::option::Option::Some("CREATE_NODE_POOL"),
9793                Self::DeleteNodePool => std::option::Option::Some("DELETE_NODE_POOL"),
9794                Self::SetNodePoolManagement => {
9795                    std::option::Option::Some("SET_NODE_POOL_MANAGEMENT")
9796                }
9797                Self::AutoRepairNodes => std::option::Option::Some("AUTO_REPAIR_NODES"),
9798                Self::AutoUpgradeNodes => std::option::Option::Some("AUTO_UPGRADE_NODES"),
9799                Self::SetLabels => std::option::Option::Some("SET_LABELS"),
9800                Self::SetMasterAuth => std::option::Option::Some("SET_MASTER_AUTH"),
9801                Self::SetNodePoolSize => std::option::Option::Some("SET_NODE_POOL_SIZE"),
9802                Self::SetNetworkPolicy => std::option::Option::Some("SET_NETWORK_POLICY"),
9803                Self::SetMaintenancePolicy => std::option::Option::Some("SET_MAINTENANCE_POLICY"),
9804                Self::ResizeCluster => std::option::Option::Some("RESIZE_CLUSTER"),
9805                Self::FleetFeatureUpgrade => std::option::Option::Some("FLEET_FEATURE_UPGRADE"),
9806                Self::UnknownValue(u) => u.0.name(),
9807            }
9808        }
9809    }
9810
9811    impl std::default::Default for Type {
9812        fn default() -> Self {
9813            use std::convert::From;
9814            Self::from(0)
9815        }
9816    }
9817
9818    impl std::fmt::Display for Type {
9819        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9820            wkt::internal::display_enum(f, self.name(), self.value())
9821        }
9822    }
9823
9824    impl std::convert::From<i32> for Type {
9825        fn from(value: i32) -> Self {
9826            match value {
9827                0 => Self::Unspecified,
9828                1 => Self::CreateCluster,
9829                2 => Self::DeleteCluster,
9830                3 => Self::UpgradeMaster,
9831                4 => Self::UpgradeNodes,
9832                5 => Self::RepairCluster,
9833                6 => Self::UpdateCluster,
9834                7 => Self::CreateNodePool,
9835                8 => Self::DeleteNodePool,
9836                9 => Self::SetNodePoolManagement,
9837                10 => Self::AutoRepairNodes,
9838                11 => Self::AutoUpgradeNodes,
9839                12 => Self::SetLabels,
9840                13 => Self::SetMasterAuth,
9841                14 => Self::SetNodePoolSize,
9842                15 => Self::SetNetworkPolicy,
9843                16 => Self::SetMaintenancePolicy,
9844                18 => Self::ResizeCluster,
9845                19 => Self::FleetFeatureUpgrade,
9846                _ => Self::UnknownValue(r#type::UnknownValue(
9847                    wkt::internal::UnknownEnumValue::Integer(value),
9848                )),
9849            }
9850        }
9851    }
9852
9853    impl std::convert::From<&str> for Type {
9854        fn from(value: &str) -> Self {
9855            use std::string::ToString;
9856            match value {
9857                "TYPE_UNSPECIFIED" => Self::Unspecified,
9858                "CREATE_CLUSTER" => Self::CreateCluster,
9859                "DELETE_CLUSTER" => Self::DeleteCluster,
9860                "UPGRADE_MASTER" => Self::UpgradeMaster,
9861                "UPGRADE_NODES" => Self::UpgradeNodes,
9862                "REPAIR_CLUSTER" => Self::RepairCluster,
9863                "UPDATE_CLUSTER" => Self::UpdateCluster,
9864                "CREATE_NODE_POOL" => Self::CreateNodePool,
9865                "DELETE_NODE_POOL" => Self::DeleteNodePool,
9866                "SET_NODE_POOL_MANAGEMENT" => Self::SetNodePoolManagement,
9867                "AUTO_REPAIR_NODES" => Self::AutoRepairNodes,
9868                "AUTO_UPGRADE_NODES" => Self::AutoUpgradeNodes,
9869                "SET_LABELS" => Self::SetLabels,
9870                "SET_MASTER_AUTH" => Self::SetMasterAuth,
9871                "SET_NODE_POOL_SIZE" => Self::SetNodePoolSize,
9872                "SET_NETWORK_POLICY" => Self::SetNetworkPolicy,
9873                "SET_MAINTENANCE_POLICY" => Self::SetMaintenancePolicy,
9874                "RESIZE_CLUSTER" => Self::ResizeCluster,
9875                "FLEET_FEATURE_UPGRADE" => Self::FleetFeatureUpgrade,
9876                _ => Self::UnknownValue(r#type::UnknownValue(
9877                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9878                )),
9879            }
9880        }
9881    }
9882
9883    impl serde::ser::Serialize for Type {
9884        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9885        where
9886            S: serde::Serializer,
9887        {
9888            match self {
9889                Self::Unspecified => serializer.serialize_i32(0),
9890                Self::CreateCluster => serializer.serialize_i32(1),
9891                Self::DeleteCluster => serializer.serialize_i32(2),
9892                Self::UpgradeMaster => serializer.serialize_i32(3),
9893                Self::UpgradeNodes => serializer.serialize_i32(4),
9894                Self::RepairCluster => serializer.serialize_i32(5),
9895                Self::UpdateCluster => serializer.serialize_i32(6),
9896                Self::CreateNodePool => serializer.serialize_i32(7),
9897                Self::DeleteNodePool => serializer.serialize_i32(8),
9898                Self::SetNodePoolManagement => serializer.serialize_i32(9),
9899                Self::AutoRepairNodes => serializer.serialize_i32(10),
9900                Self::AutoUpgradeNodes => serializer.serialize_i32(11),
9901                Self::SetLabels => serializer.serialize_i32(12),
9902                Self::SetMasterAuth => serializer.serialize_i32(13),
9903                Self::SetNodePoolSize => serializer.serialize_i32(14),
9904                Self::SetNetworkPolicy => serializer.serialize_i32(15),
9905                Self::SetMaintenancePolicy => serializer.serialize_i32(16),
9906                Self::ResizeCluster => serializer.serialize_i32(18),
9907                Self::FleetFeatureUpgrade => serializer.serialize_i32(19),
9908                Self::UnknownValue(u) => u.0.serialize(serializer),
9909            }
9910        }
9911    }
9912
9913    impl<'de> serde::de::Deserialize<'de> for Type {
9914        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9915        where
9916            D: serde::Deserializer<'de>,
9917        {
9918            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
9919                ".google.container.v1.Operation.Type",
9920            ))
9921        }
9922    }
9923}
9924
9925/// Information about operation (or operation stage) progress.
9926#[serde_with::serde_as]
9927#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9928#[serde(default, rename_all = "camelCase")]
9929#[non_exhaustive]
9930pub struct OperationProgress {
9931    /// A non-parameterized string describing an operation stage.
9932    /// Unset for single-stage operations.
9933    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9934    pub name: std::string::String,
9935
9936    /// Status of an operation stage.
9937    /// Unset for single-stage operations.
9938    pub status: crate::model::operation::Status,
9939
9940    /// Progress metric bundle, for example:
9941    /// metrics: [{name: "nodes done",     int_value: 15},
9942    /// {name: "nodes total",    int_value: 32}]
9943    /// or
9944    /// metrics: [{name: "progress",       double_value: 0.56},
9945    /// {name: "progress scale", double_value: 1.0}]
9946    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9947    pub metrics: std::vec::Vec<crate::model::operation_progress::Metric>,
9948
9949    /// Substages of an operation or a stage.
9950    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9951    pub stages: std::vec::Vec<crate::model::OperationProgress>,
9952
9953    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9954    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9955}
9956
9957impl OperationProgress {
9958    pub fn new() -> Self {
9959        std::default::Default::default()
9960    }
9961
9962    /// Sets the value of [name][crate::model::OperationProgress::name].
9963    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9964        self.name = v.into();
9965        self
9966    }
9967
9968    /// Sets the value of [status][crate::model::OperationProgress::status].
9969    pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
9970        mut self,
9971        v: T,
9972    ) -> Self {
9973        self.status = v.into();
9974        self
9975    }
9976
9977    /// Sets the value of [metrics][crate::model::OperationProgress::metrics].
9978    pub fn set_metrics<T, V>(mut self, v: T) -> Self
9979    where
9980        T: std::iter::IntoIterator<Item = V>,
9981        V: std::convert::Into<crate::model::operation_progress::Metric>,
9982    {
9983        use std::iter::Iterator;
9984        self.metrics = v.into_iter().map(|i| i.into()).collect();
9985        self
9986    }
9987
9988    /// Sets the value of [stages][crate::model::OperationProgress::stages].
9989    pub fn set_stages<T, V>(mut self, v: T) -> Self
9990    where
9991        T: std::iter::IntoIterator<Item = V>,
9992        V: std::convert::Into<crate::model::OperationProgress>,
9993    {
9994        use std::iter::Iterator;
9995        self.stages = v.into_iter().map(|i| i.into()).collect();
9996        self
9997    }
9998}
9999
10000impl wkt::message::Message for OperationProgress {
10001    fn typename() -> &'static str {
10002        "type.googleapis.com/google.container.v1.OperationProgress"
10003    }
10004}
10005
10006/// Defines additional types related to [OperationProgress].
10007pub mod operation_progress {
10008    #[allow(unused_imports)]
10009    use super::*;
10010
10011    /// Progress metric is (string, int|float|string) pair.
10012    #[serde_with::serde_as]
10013    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10014    #[serde(default, rename_all = "camelCase")]
10015    #[non_exhaustive]
10016    pub struct Metric {
10017        /// Required. Metric name, e.g., "nodes total", "percent done".
10018        #[serde(skip_serializing_if = "std::string::String::is_empty")]
10019        pub name: std::string::String,
10020
10021        /// Strictly one of the values is required.
10022        #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
10023        pub value: std::option::Option<crate::model::operation_progress::metric::Value>,
10024
10025        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10026        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10027    }
10028
10029    impl Metric {
10030        pub fn new() -> Self {
10031            std::default::Default::default()
10032        }
10033
10034        /// Sets the value of [name][crate::model::operation_progress::Metric::name].
10035        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10036            self.name = v.into();
10037            self
10038        }
10039
10040        /// Sets the value of [value][crate::model::operation_progress::Metric::value].
10041        ///
10042        /// Note that all the setters affecting `value` are mutually
10043        /// exclusive.
10044        pub fn set_value<
10045            T: std::convert::Into<
10046                    std::option::Option<crate::model::operation_progress::metric::Value>,
10047                >,
10048        >(
10049            mut self,
10050            v: T,
10051        ) -> Self {
10052            self.value = v.into();
10053            self
10054        }
10055
10056        /// The value of [value][crate::model::operation_progress::Metric::value]
10057        /// if it holds a `IntValue`, `None` if the field is not set or
10058        /// holds a different branch.
10059        pub fn int_value(&self) -> std::option::Option<&i64> {
10060            #[allow(unreachable_patterns)]
10061            self.value.as_ref().and_then(|v| match v {
10062                crate::model::operation_progress::metric::Value::IntValue(v) => {
10063                    std::option::Option::Some(v)
10064                }
10065                _ => std::option::Option::None,
10066            })
10067        }
10068
10069        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
10070        /// to hold a `IntValue`.
10071        ///
10072        /// Note that all the setters affecting `value` are
10073        /// mutually exclusive.
10074        pub fn set_int_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10075            self.value = std::option::Option::Some(
10076                crate::model::operation_progress::metric::Value::IntValue(v.into()),
10077            );
10078            self
10079        }
10080
10081        /// The value of [value][crate::model::operation_progress::Metric::value]
10082        /// if it holds a `DoubleValue`, `None` if the field is not set or
10083        /// holds a different branch.
10084        pub fn double_value(&self) -> std::option::Option<&f64> {
10085            #[allow(unreachable_patterns)]
10086            self.value.as_ref().and_then(|v| match v {
10087                crate::model::operation_progress::metric::Value::DoubleValue(v) => {
10088                    std::option::Option::Some(v)
10089                }
10090                _ => std::option::Option::None,
10091            })
10092        }
10093
10094        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
10095        /// to hold a `DoubleValue`.
10096        ///
10097        /// Note that all the setters affecting `value` are
10098        /// mutually exclusive.
10099        pub fn set_double_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
10100            self.value = std::option::Option::Some(
10101                crate::model::operation_progress::metric::Value::DoubleValue(v.into()),
10102            );
10103            self
10104        }
10105
10106        /// The value of [value][crate::model::operation_progress::Metric::value]
10107        /// if it holds a `StringValue`, `None` if the field is not set or
10108        /// holds a different branch.
10109        pub fn string_value(&self) -> std::option::Option<&std::string::String> {
10110            #[allow(unreachable_patterns)]
10111            self.value.as_ref().and_then(|v| match v {
10112                crate::model::operation_progress::metric::Value::StringValue(v) => {
10113                    std::option::Option::Some(v)
10114                }
10115                _ => std::option::Option::None,
10116            })
10117        }
10118
10119        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
10120        /// to hold a `StringValue`.
10121        ///
10122        /// Note that all the setters affecting `value` are
10123        /// mutually exclusive.
10124        pub fn set_string_value<T: std::convert::Into<std::string::String>>(
10125            mut self,
10126            v: T,
10127        ) -> Self {
10128            self.value = std::option::Option::Some(
10129                crate::model::operation_progress::metric::Value::StringValue(v.into()),
10130            );
10131            self
10132        }
10133    }
10134
10135    impl wkt::message::Message for Metric {
10136        fn typename() -> &'static str {
10137            "type.googleapis.com/google.container.v1.OperationProgress.Metric"
10138        }
10139    }
10140
10141    /// Defines additional types related to [Metric].
10142    pub mod metric {
10143        #[allow(unused_imports)]
10144        use super::*;
10145
10146        /// Strictly one of the values is required.
10147        #[serde_with::serde_as]
10148        #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10149        #[serde(rename_all = "camelCase")]
10150        #[non_exhaustive]
10151        pub enum Value {
10152            /// For metrics with integer value.
10153            IntValue(#[serde_as(as = "serde_with::DisplayFromStr")] i64),
10154            /// For metrics with floating point value.
10155            DoubleValue(#[serde_as(as = "wkt::internal::F64")] f64),
10156            /// For metrics with custom values (ratios, visual progress, etc.).
10157            StringValue(std::string::String),
10158        }
10159    }
10160}
10161
10162/// CreateClusterRequest creates a cluster.
10163#[serde_with::serde_as]
10164#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10165#[serde(default, rename_all = "camelCase")]
10166#[non_exhaustive]
10167pub struct CreateClusterRequest {
10168    /// Deprecated. The Google Developers Console [project ID or project
10169    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
10170    /// This field has been deprecated and replaced by the parent field.
10171    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10172    #[deprecated]
10173    pub project_id: std::string::String,
10174
10175    /// Deprecated. The name of the Google Compute Engine
10176    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
10177    /// cluster resides. This field has been deprecated and replaced by the parent
10178    /// field.
10179    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10180    #[deprecated]
10181    pub zone: std::string::String,
10182
10183    /// Required. A [cluster
10184    /// resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
10185    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10186    pub cluster: std::option::Option<crate::model::Cluster>,
10187
10188    /// The parent (project and location) where the cluster will be created.
10189    /// Specified in the format `projects/*/locations/*`.
10190    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10191    pub parent: std::string::String,
10192
10193    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10194    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10195}
10196
10197impl CreateClusterRequest {
10198    pub fn new() -> Self {
10199        std::default::Default::default()
10200    }
10201
10202    /// Sets the value of [project_id][crate::model::CreateClusterRequest::project_id].
10203    #[deprecated]
10204    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10205        self.project_id = v.into();
10206        self
10207    }
10208
10209    /// Sets the value of [zone][crate::model::CreateClusterRequest::zone].
10210    #[deprecated]
10211    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10212        self.zone = v.into();
10213        self
10214    }
10215
10216    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
10217    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
10218        mut self,
10219        v: T,
10220    ) -> Self {
10221        self.cluster = v.into();
10222        self
10223    }
10224
10225    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
10226    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10227        self.parent = v.into();
10228        self
10229    }
10230}
10231
10232impl wkt::message::Message for CreateClusterRequest {
10233    fn typename() -> &'static str {
10234        "type.googleapis.com/google.container.v1.CreateClusterRequest"
10235    }
10236}
10237
10238/// GetClusterRequest gets the settings of a cluster.
10239#[serde_with::serde_as]
10240#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10241#[serde(default, rename_all = "camelCase")]
10242#[non_exhaustive]
10243pub struct GetClusterRequest {
10244    /// Deprecated. The Google Developers Console [project ID or project
10245    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
10246    /// This field has been deprecated and replaced by the name field.
10247    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10248    #[deprecated]
10249    pub project_id: std::string::String,
10250
10251    /// Deprecated. The name of the Google Compute Engine
10252    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
10253    /// cluster resides. This field has been deprecated and replaced by the name
10254    /// field.
10255    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10256    #[deprecated]
10257    pub zone: std::string::String,
10258
10259    /// Deprecated. The name of the cluster to retrieve.
10260    /// This field has been deprecated and replaced by the name field.
10261    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10262    #[deprecated]
10263    pub cluster_id: std::string::String,
10264
10265    /// The name (project, location, cluster) of the cluster to retrieve.
10266    /// Specified in the format `projects/*/locations/*/clusters/*`.
10267    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10268    pub name: std::string::String,
10269
10270    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10271    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10272}
10273
10274impl GetClusterRequest {
10275    pub fn new() -> Self {
10276        std::default::Default::default()
10277    }
10278
10279    /// Sets the value of [project_id][crate::model::GetClusterRequest::project_id].
10280    #[deprecated]
10281    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10282        self.project_id = v.into();
10283        self
10284    }
10285
10286    /// Sets the value of [zone][crate::model::GetClusterRequest::zone].
10287    #[deprecated]
10288    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10289        self.zone = v.into();
10290        self
10291    }
10292
10293    /// Sets the value of [cluster_id][crate::model::GetClusterRequest::cluster_id].
10294    #[deprecated]
10295    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10296        self.cluster_id = v.into();
10297        self
10298    }
10299
10300    /// Sets the value of [name][crate::model::GetClusterRequest::name].
10301    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10302        self.name = v.into();
10303        self
10304    }
10305}
10306
10307impl wkt::message::Message for GetClusterRequest {
10308    fn typename() -> &'static str {
10309        "type.googleapis.com/google.container.v1.GetClusterRequest"
10310    }
10311}
10312
10313/// UpdateClusterRequest updates the settings of a cluster.
10314#[serde_with::serde_as]
10315#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10316#[serde(default, rename_all = "camelCase")]
10317#[non_exhaustive]
10318pub struct UpdateClusterRequest {
10319    /// Deprecated. The Google Developers Console [project ID or project
10320    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
10321    /// This field has been deprecated and replaced by the name field.
10322    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10323    #[deprecated]
10324    pub project_id: std::string::String,
10325
10326    /// Deprecated. The name of the Google Compute Engine
10327    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
10328    /// cluster resides. This field has been deprecated and replaced by the name
10329    /// field.
10330    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10331    #[deprecated]
10332    pub zone: std::string::String,
10333
10334    /// Deprecated. The name of the cluster to upgrade.
10335    /// This field has been deprecated and replaced by the name field.
10336    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10337    #[deprecated]
10338    pub cluster_id: std::string::String,
10339
10340    /// Required. A description of the update.
10341    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10342    pub update: std::option::Option<crate::model::ClusterUpdate>,
10343
10344    /// The name (project, location, cluster) of the cluster to update.
10345    /// Specified in the format `projects/*/locations/*/clusters/*`.
10346    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10347    pub name: std::string::String,
10348
10349    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10350    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10351}
10352
10353impl UpdateClusterRequest {
10354    pub fn new() -> Self {
10355        std::default::Default::default()
10356    }
10357
10358    /// Sets the value of [project_id][crate::model::UpdateClusterRequest::project_id].
10359    #[deprecated]
10360    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10361        self.project_id = v.into();
10362        self
10363    }
10364
10365    /// Sets the value of [zone][crate::model::UpdateClusterRequest::zone].
10366    #[deprecated]
10367    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10368        self.zone = v.into();
10369        self
10370    }
10371
10372    /// Sets the value of [cluster_id][crate::model::UpdateClusterRequest::cluster_id].
10373    #[deprecated]
10374    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10375        self.cluster_id = v.into();
10376        self
10377    }
10378
10379    /// Sets the value of [update][crate::model::UpdateClusterRequest::update].
10380    pub fn set_update<T: std::convert::Into<std::option::Option<crate::model::ClusterUpdate>>>(
10381        mut self,
10382        v: T,
10383    ) -> Self {
10384        self.update = v.into();
10385        self
10386    }
10387
10388    /// Sets the value of [name][crate::model::UpdateClusterRequest::name].
10389    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10390        self.name = v.into();
10391        self
10392    }
10393}
10394
10395impl wkt::message::Message for UpdateClusterRequest {
10396    fn typename() -> &'static str {
10397        "type.googleapis.com/google.container.v1.UpdateClusterRequest"
10398    }
10399}
10400
10401/// UpdateNodePoolRequests update a node pool's image and/or version.
10402#[serde_with::serde_as]
10403#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10404#[serde(default, rename_all = "camelCase")]
10405#[non_exhaustive]
10406pub struct UpdateNodePoolRequest {
10407    /// Deprecated. The Google Developers Console [project ID or project
10408    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
10409    /// This field has been deprecated and replaced by the name field.
10410    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10411    #[deprecated]
10412    pub project_id: std::string::String,
10413
10414    /// Deprecated. The name of the Google Compute Engine
10415    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
10416    /// cluster resides. This field has been deprecated and replaced by the name
10417    /// field.
10418    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10419    #[deprecated]
10420    pub zone: std::string::String,
10421
10422    /// Deprecated. The name of the cluster to upgrade.
10423    /// This field has been deprecated and replaced by the name field.
10424    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10425    #[deprecated]
10426    pub cluster_id: std::string::String,
10427
10428    /// Deprecated. The name of the node pool to upgrade.
10429    /// This field has been deprecated and replaced by the name field.
10430    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10431    #[deprecated]
10432    pub node_pool_id: std::string::String,
10433
10434    /// Required. The Kubernetes version to change the nodes to (typically an
10435    /// upgrade).
10436    ///
10437    /// Users may specify either explicit versions offered by Kubernetes Engine or
10438    /// version aliases, which have the following behavior:
10439    ///
10440    /// - "latest": picks the highest valid Kubernetes version
10441    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
10442    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
10443    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
10444    /// - "-": picks the Kubernetes master version
10445    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10446    pub node_version: std::string::String,
10447
10448    /// Required. The desired image type for the node pool. Please see
10449    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images> for
10450    /// available image types.
10451    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10452    pub image_type: std::string::String,
10453
10454    /// The name (project, location, cluster, node pool) of the node pool to
10455    /// update. Specified in the format
10456    /// `projects/*/locations/*/clusters/*/nodePools/*`.
10457    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10458    pub name: std::string::String,
10459
10460    /// The desired list of Google Compute Engine
10461    /// [zones](https://cloud.google.com/compute/docs/zones#available) in which the
10462    /// node pool's nodes should be located. Changing the locations for a node pool
10463    /// will result in nodes being either created or removed from the node pool,
10464    /// depending on whether locations are being added or removed.
10465    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10466    pub locations: std::vec::Vec<std::string::String>,
10467
10468    /// The desired workload metadata config for the node pool.
10469    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10470    pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
10471
10472    /// Upgrade settings control disruption and speed of the upgrade.
10473    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10474    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
10475
10476    /// The desired network tags to be applied to all nodes in the node pool.
10477    /// If this field is not present, the tags will not be changed. Otherwise,
10478    /// the existing network tags will be *replaced* with the provided tags.
10479    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10480    pub tags: std::option::Option<crate::model::NetworkTags>,
10481
10482    /// The desired node taints to be applied to all nodes in the node pool.
10483    /// If this field is not present, the taints will not be changed. Otherwise,
10484    /// the existing node taints will be *replaced* with the provided taints.
10485    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10486    pub taints: std::option::Option<crate::model::NodeTaints>,
10487
10488    /// The desired node labels to be applied to all nodes in the node pool.
10489    /// If this field is not present, the labels will not be changed. Otherwise,
10490    /// the existing node labels will be *replaced* with the provided labels.
10491    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10492    pub labels: std::option::Option<crate::model::NodeLabels>,
10493
10494    /// Parameters that can be configured on Linux nodes.
10495    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10496    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
10497
10498    /// Node kubelet configs.
10499    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10500    pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10501
10502    /// Node network config.
10503    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10504    pub node_network_config: std::option::Option<crate::model::NodeNetworkConfig>,
10505
10506    /// GCFS config.
10507    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10508    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10509
10510    /// Confidential nodes config.
10511    /// All the nodes in the node pool will be Confidential VM once enabled.
10512    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10513    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
10514
10515    /// Enable or disable gvnic on the node pool.
10516    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10517    pub gvnic: std::option::Option<crate::model::VirtualNIC>,
10518
10519    /// The current etag of the node pool.
10520    /// If an etag is provided and does not match the current etag of the node
10521    /// pool, update will be blocked and an ABORTED error will be returned.
10522    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10523    pub etag: std::string::String,
10524
10525    /// Enable or disable NCCL fast socket for the node pool.
10526    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10527    pub fast_socket: std::option::Option<crate::model::FastSocket>,
10528
10529    /// Logging configuration.
10530    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10531    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10532
10533    /// The resource labels for the node pool to use to annotate any related
10534    /// Google Compute Engine resources.
10535    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10536    pub resource_labels: std::option::Option<crate::model::ResourceLabels>,
10537
10538    /// Parameters that can be configured on Windows nodes.
10539    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10540    pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
10541
10542    /// A list of hardware accelerators to be attached to each node.
10543    /// See <https://cloud.google.com/compute/docs/gpus> for more information about
10544    /// support for GPUs.
10545    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10546    pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
10547
10548    /// Optional. The desired [Google Compute Engine machine
10549    /// type](https://cloud.google.com/compute/docs/machine-types) for nodes in the
10550    /// node pool. Initiates an upgrade operation that migrates the nodes in the
10551    /// node pool to the specified machine type.
10552    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10553    pub machine_type: std::string::String,
10554
10555    /// Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or
10556    /// 'pd-balanced') for nodes in the node pool.
10557    /// Initiates an upgrade operation that migrates the nodes in the
10558    /// node pool to the specified disk type.
10559    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10560    pub disk_type: std::string::String,
10561
10562    /// Optional. The desired disk size for nodes in the node pool specified in GB.
10563    /// The smallest allowed disk size is 10GB.
10564    /// Initiates an upgrade operation that migrates the nodes in the
10565    /// node pool to the specified disk size.
10566    #[serde(skip_serializing_if = "wkt::internal::is_default")]
10567    #[serde_as(as = "serde_with::DisplayFromStr")]
10568    pub disk_size_gb: i64,
10569
10570    /// Desired resource manager tag keys and values to be attached to the nodes
10571    /// for managing Compute Engine firewalls using Network Firewall Policies.
10572    /// Existing tags will be replaced with new values.
10573    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10574    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
10575
10576    /// The desired containerd config for nodes in the node pool.
10577    /// Initiates an upgrade operation that recreates the nodes with the new
10578    /// config.
10579    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10580    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10581
10582    /// Specifies the configuration of queued provisioning.
10583    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10584    pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
10585
10586    /// List of Storage Pools where boot disks are provisioned.
10587    /// Existing Storage Pools will be replaced with storage-pools.
10588    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10589    pub storage_pools: std::vec::Vec<std::string::String>,
10590
10591    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10592    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10593}
10594
10595impl UpdateNodePoolRequest {
10596    pub fn new() -> Self {
10597        std::default::Default::default()
10598    }
10599
10600    /// Sets the value of [project_id][crate::model::UpdateNodePoolRequest::project_id].
10601    #[deprecated]
10602    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10603        self.project_id = v.into();
10604        self
10605    }
10606
10607    /// Sets the value of [zone][crate::model::UpdateNodePoolRequest::zone].
10608    #[deprecated]
10609    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10610        self.zone = v.into();
10611        self
10612    }
10613
10614    /// Sets the value of [cluster_id][crate::model::UpdateNodePoolRequest::cluster_id].
10615    #[deprecated]
10616    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10617        self.cluster_id = v.into();
10618        self
10619    }
10620
10621    /// Sets the value of [node_pool_id][crate::model::UpdateNodePoolRequest::node_pool_id].
10622    #[deprecated]
10623    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10624        self.node_pool_id = v.into();
10625        self
10626    }
10627
10628    /// Sets the value of [node_version][crate::model::UpdateNodePoolRequest::node_version].
10629    pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10630        self.node_version = v.into();
10631        self
10632    }
10633
10634    /// Sets the value of [image_type][crate::model::UpdateNodePoolRequest::image_type].
10635    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10636        self.image_type = v.into();
10637        self
10638    }
10639
10640    /// Sets the value of [name][crate::model::UpdateNodePoolRequest::name].
10641    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10642        self.name = v.into();
10643        self
10644    }
10645
10646    /// Sets the value of [locations][crate::model::UpdateNodePoolRequest::locations].
10647    pub fn set_locations<T, V>(mut self, v: T) -> Self
10648    where
10649        T: std::iter::IntoIterator<Item = V>,
10650        V: std::convert::Into<std::string::String>,
10651    {
10652        use std::iter::Iterator;
10653        self.locations = v.into_iter().map(|i| i.into()).collect();
10654        self
10655    }
10656
10657    /// Sets the value of [workload_metadata_config][crate::model::UpdateNodePoolRequest::workload_metadata_config].
10658    pub fn set_workload_metadata_config<
10659        T: std::convert::Into<std::option::Option<crate::model::WorkloadMetadataConfig>>,
10660    >(
10661        mut self,
10662        v: T,
10663    ) -> Self {
10664        self.workload_metadata_config = v.into();
10665        self
10666    }
10667
10668    /// Sets the value of [upgrade_settings][crate::model::UpdateNodePoolRequest::upgrade_settings].
10669    pub fn set_upgrade_settings<
10670        T: std::convert::Into<std::option::Option<crate::model::node_pool::UpgradeSettings>>,
10671    >(
10672        mut self,
10673        v: T,
10674    ) -> Self {
10675        self.upgrade_settings = v.into();
10676        self
10677    }
10678
10679    /// Sets the value of [tags][crate::model::UpdateNodePoolRequest::tags].
10680    pub fn set_tags<T: std::convert::Into<std::option::Option<crate::model::NetworkTags>>>(
10681        mut self,
10682        v: T,
10683    ) -> Self {
10684        self.tags = v.into();
10685        self
10686    }
10687
10688    /// Sets the value of [taints][crate::model::UpdateNodePoolRequest::taints].
10689    pub fn set_taints<T: std::convert::Into<std::option::Option<crate::model::NodeTaints>>>(
10690        mut self,
10691        v: T,
10692    ) -> Self {
10693        self.taints = v.into();
10694        self
10695    }
10696
10697    /// Sets the value of [labels][crate::model::UpdateNodePoolRequest::labels].
10698    pub fn set_labels<T: std::convert::Into<std::option::Option<crate::model::NodeLabels>>>(
10699        mut self,
10700        v: T,
10701    ) -> Self {
10702        self.labels = v.into();
10703        self
10704    }
10705
10706    /// Sets the value of [linux_node_config][crate::model::UpdateNodePoolRequest::linux_node_config].
10707    pub fn set_linux_node_config<
10708        T: std::convert::Into<std::option::Option<crate::model::LinuxNodeConfig>>,
10709    >(
10710        mut self,
10711        v: T,
10712    ) -> Self {
10713        self.linux_node_config = v.into();
10714        self
10715    }
10716
10717    /// Sets the value of [kubelet_config][crate::model::UpdateNodePoolRequest::kubelet_config].
10718    pub fn set_kubelet_config<
10719        T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
10720    >(
10721        mut self,
10722        v: T,
10723    ) -> Self {
10724        self.kubelet_config = v.into();
10725        self
10726    }
10727
10728    /// Sets the value of [node_network_config][crate::model::UpdateNodePoolRequest::node_network_config].
10729    pub fn set_node_network_config<
10730        T: std::convert::Into<std::option::Option<crate::model::NodeNetworkConfig>>,
10731    >(
10732        mut self,
10733        v: T,
10734    ) -> Self {
10735        self.node_network_config = v.into();
10736        self
10737    }
10738
10739    /// Sets the value of [gcfs_config][crate::model::UpdateNodePoolRequest::gcfs_config].
10740    pub fn set_gcfs_config<T: std::convert::Into<std::option::Option<crate::model::GcfsConfig>>>(
10741        mut self,
10742        v: T,
10743    ) -> Self {
10744        self.gcfs_config = v.into();
10745        self
10746    }
10747
10748    /// Sets the value of [confidential_nodes][crate::model::UpdateNodePoolRequest::confidential_nodes].
10749    pub fn set_confidential_nodes<
10750        T: std::convert::Into<std::option::Option<crate::model::ConfidentialNodes>>,
10751    >(
10752        mut self,
10753        v: T,
10754    ) -> Self {
10755        self.confidential_nodes = v.into();
10756        self
10757    }
10758
10759    /// Sets the value of [gvnic][crate::model::UpdateNodePoolRequest::gvnic].
10760    pub fn set_gvnic<T: std::convert::Into<std::option::Option<crate::model::VirtualNIC>>>(
10761        mut self,
10762        v: T,
10763    ) -> Self {
10764        self.gvnic = v.into();
10765        self
10766    }
10767
10768    /// Sets the value of [etag][crate::model::UpdateNodePoolRequest::etag].
10769    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10770        self.etag = v.into();
10771        self
10772    }
10773
10774    /// Sets the value of [fast_socket][crate::model::UpdateNodePoolRequest::fast_socket].
10775    pub fn set_fast_socket<T: std::convert::Into<std::option::Option<crate::model::FastSocket>>>(
10776        mut self,
10777        v: T,
10778    ) -> Self {
10779        self.fast_socket = v.into();
10780        self
10781    }
10782
10783    /// Sets the value of [logging_config][crate::model::UpdateNodePoolRequest::logging_config].
10784    pub fn set_logging_config<
10785        T: std::convert::Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
10786    >(
10787        mut self,
10788        v: T,
10789    ) -> Self {
10790        self.logging_config = v.into();
10791        self
10792    }
10793
10794    /// Sets the value of [resource_labels][crate::model::UpdateNodePoolRequest::resource_labels].
10795    pub fn set_resource_labels<
10796        T: std::convert::Into<std::option::Option<crate::model::ResourceLabels>>,
10797    >(
10798        mut self,
10799        v: T,
10800    ) -> Self {
10801        self.resource_labels = v.into();
10802        self
10803    }
10804
10805    /// Sets the value of [windows_node_config][crate::model::UpdateNodePoolRequest::windows_node_config].
10806    pub fn set_windows_node_config<
10807        T: std::convert::Into<std::option::Option<crate::model::WindowsNodeConfig>>,
10808    >(
10809        mut self,
10810        v: T,
10811    ) -> Self {
10812        self.windows_node_config = v.into();
10813        self
10814    }
10815
10816    /// Sets the value of [accelerators][crate::model::UpdateNodePoolRequest::accelerators].
10817    pub fn set_accelerators<T, V>(mut self, v: T) -> Self
10818    where
10819        T: std::iter::IntoIterator<Item = V>,
10820        V: std::convert::Into<crate::model::AcceleratorConfig>,
10821    {
10822        use std::iter::Iterator;
10823        self.accelerators = v.into_iter().map(|i| i.into()).collect();
10824        self
10825    }
10826
10827    /// Sets the value of [machine_type][crate::model::UpdateNodePoolRequest::machine_type].
10828    pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10829        self.machine_type = v.into();
10830        self
10831    }
10832
10833    /// Sets the value of [disk_type][crate::model::UpdateNodePoolRequest::disk_type].
10834    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10835        self.disk_type = v.into();
10836        self
10837    }
10838
10839    /// Sets the value of [disk_size_gb][crate::model::UpdateNodePoolRequest::disk_size_gb].
10840    pub fn set_disk_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10841        self.disk_size_gb = v.into();
10842        self
10843    }
10844
10845    /// Sets the value of [resource_manager_tags][crate::model::UpdateNodePoolRequest::resource_manager_tags].
10846    pub fn set_resource_manager_tags<
10847        T: std::convert::Into<std::option::Option<crate::model::ResourceManagerTags>>,
10848    >(
10849        mut self,
10850        v: T,
10851    ) -> Self {
10852        self.resource_manager_tags = v.into();
10853        self
10854    }
10855
10856    /// Sets the value of [containerd_config][crate::model::UpdateNodePoolRequest::containerd_config].
10857    pub fn set_containerd_config<
10858        T: std::convert::Into<std::option::Option<crate::model::ContainerdConfig>>,
10859    >(
10860        mut self,
10861        v: T,
10862    ) -> Self {
10863        self.containerd_config = v.into();
10864        self
10865    }
10866
10867    /// Sets the value of [queued_provisioning][crate::model::UpdateNodePoolRequest::queued_provisioning].
10868    pub fn set_queued_provisioning<
10869        T: std::convert::Into<std::option::Option<crate::model::node_pool::QueuedProvisioning>>,
10870    >(
10871        mut self,
10872        v: T,
10873    ) -> Self {
10874        self.queued_provisioning = v.into();
10875        self
10876    }
10877
10878    /// Sets the value of [storage_pools][crate::model::UpdateNodePoolRequest::storage_pools].
10879    pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
10880    where
10881        T: std::iter::IntoIterator<Item = V>,
10882        V: std::convert::Into<std::string::String>,
10883    {
10884        use std::iter::Iterator;
10885        self.storage_pools = v.into_iter().map(|i| i.into()).collect();
10886        self
10887    }
10888}
10889
10890impl wkt::message::Message for UpdateNodePoolRequest {
10891    fn typename() -> &'static str {
10892        "type.googleapis.com/google.container.v1.UpdateNodePoolRequest"
10893    }
10894}
10895
10896/// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.
10897#[serde_with::serde_as]
10898#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10899#[serde(default, rename_all = "camelCase")]
10900#[non_exhaustive]
10901pub struct SetNodePoolAutoscalingRequest {
10902    /// Deprecated. The Google Developers Console [project ID or project
10903    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
10904    /// This field has been deprecated and replaced by the name field.
10905    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10906    #[deprecated]
10907    pub project_id: std::string::String,
10908
10909    /// Deprecated. The name of the Google Compute Engine
10910    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
10911    /// cluster resides. This field has been deprecated and replaced by the name
10912    /// field.
10913    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10914    #[deprecated]
10915    pub zone: std::string::String,
10916
10917    /// Deprecated. The name of the cluster to upgrade.
10918    /// This field has been deprecated and replaced by the name field.
10919    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10920    #[deprecated]
10921    pub cluster_id: std::string::String,
10922
10923    /// Deprecated. The name of the node pool to upgrade.
10924    /// This field has been deprecated and replaced by the name field.
10925    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10926    #[deprecated]
10927    pub node_pool_id: std::string::String,
10928
10929    /// Required. Autoscaling configuration for the node pool.
10930    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10931    pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
10932
10933    /// The name (project, location, cluster, node pool) of the node pool to set
10934    /// autoscaler settings. Specified in the format
10935    /// `projects/*/locations/*/clusters/*/nodePools/*`.
10936    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10937    pub name: std::string::String,
10938
10939    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10940    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10941}
10942
10943impl SetNodePoolAutoscalingRequest {
10944    pub fn new() -> Self {
10945        std::default::Default::default()
10946    }
10947
10948    /// Sets the value of [project_id][crate::model::SetNodePoolAutoscalingRequest::project_id].
10949    #[deprecated]
10950    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10951        self.project_id = v.into();
10952        self
10953    }
10954
10955    /// Sets the value of [zone][crate::model::SetNodePoolAutoscalingRequest::zone].
10956    #[deprecated]
10957    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10958        self.zone = v.into();
10959        self
10960    }
10961
10962    /// Sets the value of [cluster_id][crate::model::SetNodePoolAutoscalingRequest::cluster_id].
10963    #[deprecated]
10964    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10965        self.cluster_id = v.into();
10966        self
10967    }
10968
10969    /// Sets the value of [node_pool_id][crate::model::SetNodePoolAutoscalingRequest::node_pool_id].
10970    #[deprecated]
10971    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10972        self.node_pool_id = v.into();
10973        self
10974    }
10975
10976    /// Sets the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
10977    pub fn set_autoscaling<
10978        T: std::convert::Into<std::option::Option<crate::model::NodePoolAutoscaling>>,
10979    >(
10980        mut self,
10981        v: T,
10982    ) -> Self {
10983        self.autoscaling = v.into();
10984        self
10985    }
10986
10987    /// Sets the value of [name][crate::model::SetNodePoolAutoscalingRequest::name].
10988    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10989        self.name = v.into();
10990        self
10991    }
10992}
10993
10994impl wkt::message::Message for SetNodePoolAutoscalingRequest {
10995    fn typename() -> &'static str {
10996        "type.googleapis.com/google.container.v1.SetNodePoolAutoscalingRequest"
10997    }
10998}
10999
11000/// SetLoggingServiceRequest sets the logging service of a cluster.
11001#[serde_with::serde_as]
11002#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11003#[serde(default, rename_all = "camelCase")]
11004#[non_exhaustive]
11005pub struct SetLoggingServiceRequest {
11006    /// Deprecated. The Google Developers Console [project ID or project
11007    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11008    /// This field has been deprecated and replaced by the name field.
11009    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11010    #[deprecated]
11011    pub project_id: std::string::String,
11012
11013    /// Deprecated. The name of the Google Compute Engine
11014    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11015    /// cluster resides. This field has been deprecated and replaced by the name
11016    /// field.
11017    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11018    #[deprecated]
11019    pub zone: std::string::String,
11020
11021    /// Deprecated. The name of the cluster to upgrade.
11022    /// This field has been deprecated and replaced by the name field.
11023    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11024    #[deprecated]
11025    pub cluster_id: std::string::String,
11026
11027    /// Required. The logging service the cluster should use to write logs.
11028    /// Currently available options:
11029    ///
11030    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
11031    ///   service with a Kubernetes-native resource model
11032    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
11033    ///   available as of GKE 1.15).
11034    /// * `none` - no logs will be exported from the cluster.
11035    ///
11036    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
11037    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
11038    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11039    pub logging_service: std::string::String,
11040
11041    /// The name (project, location, cluster) of the cluster to set logging.
11042    /// Specified in the format `projects/*/locations/*/clusters/*`.
11043    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11044    pub name: std::string::String,
11045
11046    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11047    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11048}
11049
11050impl SetLoggingServiceRequest {
11051    pub fn new() -> Self {
11052        std::default::Default::default()
11053    }
11054
11055    /// Sets the value of [project_id][crate::model::SetLoggingServiceRequest::project_id].
11056    #[deprecated]
11057    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11058        self.project_id = v.into();
11059        self
11060    }
11061
11062    /// Sets the value of [zone][crate::model::SetLoggingServiceRequest::zone].
11063    #[deprecated]
11064    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11065        self.zone = v.into();
11066        self
11067    }
11068
11069    /// Sets the value of [cluster_id][crate::model::SetLoggingServiceRequest::cluster_id].
11070    #[deprecated]
11071    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11072        self.cluster_id = v.into();
11073        self
11074    }
11075
11076    /// Sets the value of [logging_service][crate::model::SetLoggingServiceRequest::logging_service].
11077    pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11078        self.logging_service = v.into();
11079        self
11080    }
11081
11082    /// Sets the value of [name][crate::model::SetLoggingServiceRequest::name].
11083    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11084        self.name = v.into();
11085        self
11086    }
11087}
11088
11089impl wkt::message::Message for SetLoggingServiceRequest {
11090    fn typename() -> &'static str {
11091        "type.googleapis.com/google.container.v1.SetLoggingServiceRequest"
11092    }
11093}
11094
11095/// SetMonitoringServiceRequest sets the monitoring service of a cluster.
11096#[serde_with::serde_as]
11097#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11098#[serde(default, rename_all = "camelCase")]
11099#[non_exhaustive]
11100pub struct SetMonitoringServiceRequest {
11101    /// Deprecated. The Google Developers Console [project ID or project
11102    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11103    /// This field has been deprecated and replaced by the name field.
11104    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11105    #[deprecated]
11106    pub project_id: std::string::String,
11107
11108    /// Deprecated. The name of the Google Compute Engine
11109    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11110    /// cluster resides. This field has been deprecated and replaced by the name
11111    /// field.
11112    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11113    #[deprecated]
11114    pub zone: std::string::String,
11115
11116    /// Deprecated. The name of the cluster to upgrade.
11117    /// This field has been deprecated and replaced by the name field.
11118    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11119    #[deprecated]
11120    pub cluster_id: std::string::String,
11121
11122    /// Required. The monitoring service the cluster should use to write metrics.
11123    /// Currently available options:
11124    ///
11125    /// * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
11126    ///   service with a Kubernetes-native resource model
11127    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
11128    ///   longer available as of GKE 1.15).
11129    /// * `none` - No metrics will be exported from the cluster.
11130    ///
11131    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
11132    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
11133    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11134    pub monitoring_service: std::string::String,
11135
11136    /// The name (project, location, cluster) of the cluster to set monitoring.
11137    /// Specified in the format `projects/*/locations/*/clusters/*`.
11138    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11139    pub name: std::string::String,
11140
11141    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11142    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11143}
11144
11145impl SetMonitoringServiceRequest {
11146    pub fn new() -> Self {
11147        std::default::Default::default()
11148    }
11149
11150    /// Sets the value of [project_id][crate::model::SetMonitoringServiceRequest::project_id].
11151    #[deprecated]
11152    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11153        self.project_id = v.into();
11154        self
11155    }
11156
11157    /// Sets the value of [zone][crate::model::SetMonitoringServiceRequest::zone].
11158    #[deprecated]
11159    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11160        self.zone = v.into();
11161        self
11162    }
11163
11164    /// Sets the value of [cluster_id][crate::model::SetMonitoringServiceRequest::cluster_id].
11165    #[deprecated]
11166    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11167        self.cluster_id = v.into();
11168        self
11169    }
11170
11171    /// Sets the value of [monitoring_service][crate::model::SetMonitoringServiceRequest::monitoring_service].
11172    pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
11173        mut self,
11174        v: T,
11175    ) -> Self {
11176        self.monitoring_service = v.into();
11177        self
11178    }
11179
11180    /// Sets the value of [name][crate::model::SetMonitoringServiceRequest::name].
11181    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11182        self.name = v.into();
11183        self
11184    }
11185}
11186
11187impl wkt::message::Message for SetMonitoringServiceRequest {
11188    fn typename() -> &'static str {
11189        "type.googleapis.com/google.container.v1.SetMonitoringServiceRequest"
11190    }
11191}
11192
11193/// SetAddonsConfigRequest sets the addons associated with the cluster.
11194#[serde_with::serde_as]
11195#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11196#[serde(default, rename_all = "camelCase")]
11197#[non_exhaustive]
11198pub struct SetAddonsConfigRequest {
11199    /// Deprecated. The Google Developers Console [project ID or project
11200    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11201    /// This field has been deprecated and replaced by the name field.
11202    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11203    #[deprecated]
11204    pub project_id: std::string::String,
11205
11206    /// Deprecated. The name of the Google Compute Engine
11207    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11208    /// cluster resides. This field has been deprecated and replaced by the name
11209    /// field.
11210    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11211    #[deprecated]
11212    pub zone: std::string::String,
11213
11214    /// Deprecated. The name of the cluster to upgrade.
11215    /// This field has been deprecated and replaced by the name field.
11216    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11217    #[deprecated]
11218    pub cluster_id: std::string::String,
11219
11220    /// Required. The desired configurations for the various addons available to
11221    /// run in the cluster.
11222    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11223    pub addons_config: std::option::Option<crate::model::AddonsConfig>,
11224
11225    /// The name (project, location, cluster) of the cluster to set addons.
11226    /// Specified in the format `projects/*/locations/*/clusters/*`.
11227    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11228    pub name: std::string::String,
11229
11230    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11231    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11232}
11233
11234impl SetAddonsConfigRequest {
11235    pub fn new() -> Self {
11236        std::default::Default::default()
11237    }
11238
11239    /// Sets the value of [project_id][crate::model::SetAddonsConfigRequest::project_id].
11240    #[deprecated]
11241    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11242        self.project_id = v.into();
11243        self
11244    }
11245
11246    /// Sets the value of [zone][crate::model::SetAddonsConfigRequest::zone].
11247    #[deprecated]
11248    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11249        self.zone = v.into();
11250        self
11251    }
11252
11253    /// Sets the value of [cluster_id][crate::model::SetAddonsConfigRequest::cluster_id].
11254    #[deprecated]
11255    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11256        self.cluster_id = v.into();
11257        self
11258    }
11259
11260    /// Sets the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
11261    pub fn set_addons_config<
11262        T: std::convert::Into<std::option::Option<crate::model::AddonsConfig>>,
11263    >(
11264        mut self,
11265        v: T,
11266    ) -> Self {
11267        self.addons_config = v.into();
11268        self
11269    }
11270
11271    /// Sets the value of [name][crate::model::SetAddonsConfigRequest::name].
11272    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11273        self.name = v.into();
11274        self
11275    }
11276}
11277
11278impl wkt::message::Message for SetAddonsConfigRequest {
11279    fn typename() -> &'static str {
11280        "type.googleapis.com/google.container.v1.SetAddonsConfigRequest"
11281    }
11282}
11283
11284/// SetLocationsRequest sets the locations of the cluster.
11285#[serde_with::serde_as]
11286#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11287#[serde(default, rename_all = "camelCase")]
11288#[non_exhaustive]
11289pub struct SetLocationsRequest {
11290    /// Deprecated. The Google Developers Console [project ID or project
11291    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11292    /// This field has been deprecated and replaced by the name field.
11293    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11294    #[deprecated]
11295    pub project_id: std::string::String,
11296
11297    /// Deprecated. The name of the Google Compute Engine
11298    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11299    /// cluster resides. This field has been deprecated and replaced by the name
11300    /// field.
11301    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11302    #[deprecated]
11303    pub zone: std::string::String,
11304
11305    /// Deprecated. The name of the cluster to upgrade.
11306    /// This field has been deprecated and replaced by the name field.
11307    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11308    #[deprecated]
11309    pub cluster_id: std::string::String,
11310
11311    /// Required. The desired list of Google Compute Engine
11312    /// [zones](https://cloud.google.com/compute/docs/zones#available) in which the
11313    /// cluster's nodes should be located. Changing the locations a cluster is in
11314    /// will result in nodes being either created or removed from the cluster,
11315    /// depending on whether locations are being added or removed.
11316    ///
11317    /// This list must always include the cluster's primary zone.
11318    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11319    pub locations: std::vec::Vec<std::string::String>,
11320
11321    /// The name (project, location, cluster) of the cluster to set locations.
11322    /// Specified in the format `projects/*/locations/*/clusters/*`.
11323    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11324    pub name: std::string::String,
11325
11326    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11327    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11328}
11329
11330impl SetLocationsRequest {
11331    pub fn new() -> Self {
11332        std::default::Default::default()
11333    }
11334
11335    /// Sets the value of [project_id][crate::model::SetLocationsRequest::project_id].
11336    #[deprecated]
11337    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11338        self.project_id = v.into();
11339        self
11340    }
11341
11342    /// Sets the value of [zone][crate::model::SetLocationsRequest::zone].
11343    #[deprecated]
11344    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11345        self.zone = v.into();
11346        self
11347    }
11348
11349    /// Sets the value of [cluster_id][crate::model::SetLocationsRequest::cluster_id].
11350    #[deprecated]
11351    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11352        self.cluster_id = v.into();
11353        self
11354    }
11355
11356    /// Sets the value of [locations][crate::model::SetLocationsRequest::locations].
11357    pub fn set_locations<T, V>(mut self, v: T) -> Self
11358    where
11359        T: std::iter::IntoIterator<Item = V>,
11360        V: std::convert::Into<std::string::String>,
11361    {
11362        use std::iter::Iterator;
11363        self.locations = v.into_iter().map(|i| i.into()).collect();
11364        self
11365    }
11366
11367    /// Sets the value of [name][crate::model::SetLocationsRequest::name].
11368    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11369        self.name = v.into();
11370        self
11371    }
11372}
11373
11374impl wkt::message::Message for SetLocationsRequest {
11375    fn typename() -> &'static str {
11376        "type.googleapis.com/google.container.v1.SetLocationsRequest"
11377    }
11378}
11379
11380/// UpdateMasterRequest updates the master of the cluster.
11381#[serde_with::serde_as]
11382#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11383#[serde(default, rename_all = "camelCase")]
11384#[non_exhaustive]
11385pub struct UpdateMasterRequest {
11386    /// Deprecated. The Google Developers Console [project ID or project
11387    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11388    /// This field has been deprecated and replaced by the name field.
11389    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11390    #[deprecated]
11391    pub project_id: std::string::String,
11392
11393    /// Deprecated. The name of the Google Compute Engine
11394    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11395    /// cluster resides. This field has been deprecated and replaced by the name
11396    /// field.
11397    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11398    #[deprecated]
11399    pub zone: std::string::String,
11400
11401    /// Deprecated. The name of the cluster to upgrade.
11402    /// This field has been deprecated and replaced by the name field.
11403    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11404    #[deprecated]
11405    pub cluster_id: std::string::String,
11406
11407    /// Required. The Kubernetes version to change the master to.
11408    ///
11409    /// Users may specify either explicit versions offered by Kubernetes Engine or
11410    /// version aliases, which have the following behavior:
11411    ///
11412    /// - "latest": picks the highest valid Kubernetes version
11413    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
11414    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
11415    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
11416    /// - "-": picks the default Kubernetes version
11417    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11418    pub master_version: std::string::String,
11419
11420    /// The name (project, location, cluster) of the cluster to update.
11421    /// Specified in the format `projects/*/locations/*/clusters/*`.
11422    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11423    pub name: std::string::String,
11424
11425    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11426    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11427}
11428
11429impl UpdateMasterRequest {
11430    pub fn new() -> Self {
11431        std::default::Default::default()
11432    }
11433
11434    /// Sets the value of [project_id][crate::model::UpdateMasterRequest::project_id].
11435    #[deprecated]
11436    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11437        self.project_id = v.into();
11438        self
11439    }
11440
11441    /// Sets the value of [zone][crate::model::UpdateMasterRequest::zone].
11442    #[deprecated]
11443    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11444        self.zone = v.into();
11445        self
11446    }
11447
11448    /// Sets the value of [cluster_id][crate::model::UpdateMasterRequest::cluster_id].
11449    #[deprecated]
11450    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11451        self.cluster_id = v.into();
11452        self
11453    }
11454
11455    /// Sets the value of [master_version][crate::model::UpdateMasterRequest::master_version].
11456    pub fn set_master_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11457        self.master_version = v.into();
11458        self
11459    }
11460
11461    /// Sets the value of [name][crate::model::UpdateMasterRequest::name].
11462    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11463        self.name = v.into();
11464        self
11465    }
11466}
11467
11468impl wkt::message::Message for UpdateMasterRequest {
11469    fn typename() -> &'static str {
11470        "type.googleapis.com/google.container.v1.UpdateMasterRequest"
11471    }
11472}
11473
11474/// SetMasterAuthRequest updates the admin password of a cluster.
11475#[serde_with::serde_as]
11476#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11477#[serde(default, rename_all = "camelCase")]
11478#[non_exhaustive]
11479pub struct SetMasterAuthRequest {
11480    /// Deprecated. The Google Developers Console [project ID or project
11481    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11482    /// This field has been deprecated and replaced by the name field.
11483    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11484    #[deprecated]
11485    pub project_id: std::string::String,
11486
11487    /// Deprecated. The name of the Google Compute Engine
11488    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11489    /// cluster resides. This field has been deprecated and replaced by the name
11490    /// field.
11491    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11492    #[deprecated]
11493    pub zone: std::string::String,
11494
11495    /// Deprecated. The name of the cluster to upgrade.
11496    /// This field has been deprecated and replaced by the name field.
11497    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11498    #[deprecated]
11499    pub cluster_id: std::string::String,
11500
11501    /// Required. The exact form of action to be taken on the master auth.
11502    pub action: crate::model::set_master_auth_request::Action,
11503
11504    /// Required. A description of the update.
11505    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11506    pub update: std::option::Option<crate::model::MasterAuth>,
11507
11508    /// The name (project, location, cluster) of the cluster to set auth.
11509    /// Specified in the format `projects/*/locations/*/clusters/*`.
11510    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11511    pub name: std::string::String,
11512
11513    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11514    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11515}
11516
11517impl SetMasterAuthRequest {
11518    pub fn new() -> Self {
11519        std::default::Default::default()
11520    }
11521
11522    /// Sets the value of [project_id][crate::model::SetMasterAuthRequest::project_id].
11523    #[deprecated]
11524    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11525        self.project_id = v.into();
11526        self
11527    }
11528
11529    /// Sets the value of [zone][crate::model::SetMasterAuthRequest::zone].
11530    #[deprecated]
11531    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11532        self.zone = v.into();
11533        self
11534    }
11535
11536    /// Sets the value of [cluster_id][crate::model::SetMasterAuthRequest::cluster_id].
11537    #[deprecated]
11538    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11539        self.cluster_id = v.into();
11540        self
11541    }
11542
11543    /// Sets the value of [action][crate::model::SetMasterAuthRequest::action].
11544    pub fn set_action<T: std::convert::Into<crate::model::set_master_auth_request::Action>>(
11545        mut self,
11546        v: T,
11547    ) -> Self {
11548        self.action = v.into();
11549        self
11550    }
11551
11552    /// Sets the value of [update][crate::model::SetMasterAuthRequest::update].
11553    pub fn set_update<T: std::convert::Into<std::option::Option<crate::model::MasterAuth>>>(
11554        mut self,
11555        v: T,
11556    ) -> Self {
11557        self.update = v.into();
11558        self
11559    }
11560
11561    /// Sets the value of [name][crate::model::SetMasterAuthRequest::name].
11562    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11563        self.name = v.into();
11564        self
11565    }
11566}
11567
11568impl wkt::message::Message for SetMasterAuthRequest {
11569    fn typename() -> &'static str {
11570        "type.googleapis.com/google.container.v1.SetMasterAuthRequest"
11571    }
11572}
11573
11574/// Defines additional types related to [SetMasterAuthRequest].
11575pub mod set_master_auth_request {
11576    #[allow(unused_imports)]
11577    use super::*;
11578
11579    /// Operation type: what type update to perform.
11580    ///
11581    /// # Working with unknown values
11582    ///
11583    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11584    /// additional enum variants at any time. Adding new variants is not considered
11585    /// a breaking change. Applications should write their code in anticipation of:
11586    ///
11587    /// - New values appearing in future releases of the client library, **and**
11588    /// - New values received dynamically, without application changes.
11589    ///
11590    /// Please consult the [Working with enums] section in the user guide for some
11591    /// guidelines.
11592    ///
11593    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11594    #[derive(Clone, Debug, PartialEq)]
11595    #[non_exhaustive]
11596    pub enum Action {
11597        /// Operation is unknown and will error out.
11598        Unknown,
11599        /// Set the password to a user generated value.
11600        SetPassword,
11601        /// Generate a new password and set it to that.
11602        GeneratePassword,
11603        /// Set the username.  If an empty username is provided, basic authentication
11604        /// is disabled for the cluster.  If a non-empty username is provided, basic
11605        /// authentication is enabled, with either a provided password or a generated
11606        /// one.
11607        SetUsername,
11608        /// If set, the enum was initialized with an unknown value.
11609        ///
11610        /// Applications can examine the value using [Action::value] or
11611        /// [Action::name].
11612        UnknownValue(action::UnknownValue),
11613    }
11614
11615    #[doc(hidden)]
11616    pub mod action {
11617        #[allow(unused_imports)]
11618        use super::*;
11619        #[derive(Clone, Debug, PartialEq)]
11620        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11621    }
11622
11623    impl Action {
11624        /// Gets the enum value.
11625        ///
11626        /// Returns `None` if the enum contains an unknown value deserialized from
11627        /// the string representation of enums.
11628        pub fn value(&self) -> std::option::Option<i32> {
11629            match self {
11630                Self::Unknown => std::option::Option::Some(0),
11631                Self::SetPassword => std::option::Option::Some(1),
11632                Self::GeneratePassword => std::option::Option::Some(2),
11633                Self::SetUsername => std::option::Option::Some(3),
11634                Self::UnknownValue(u) => u.0.value(),
11635            }
11636        }
11637
11638        /// Gets the enum value as a string.
11639        ///
11640        /// Returns `None` if the enum contains an unknown value deserialized from
11641        /// the integer representation of enums.
11642        pub fn name(&self) -> std::option::Option<&str> {
11643            match self {
11644                Self::Unknown => std::option::Option::Some("UNKNOWN"),
11645                Self::SetPassword => std::option::Option::Some("SET_PASSWORD"),
11646                Self::GeneratePassword => std::option::Option::Some("GENERATE_PASSWORD"),
11647                Self::SetUsername => std::option::Option::Some("SET_USERNAME"),
11648                Self::UnknownValue(u) => u.0.name(),
11649            }
11650        }
11651    }
11652
11653    impl std::default::Default for Action {
11654        fn default() -> Self {
11655            use std::convert::From;
11656            Self::from(0)
11657        }
11658    }
11659
11660    impl std::fmt::Display for Action {
11661        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11662            wkt::internal::display_enum(f, self.name(), self.value())
11663        }
11664    }
11665
11666    impl std::convert::From<i32> for Action {
11667        fn from(value: i32) -> Self {
11668            match value {
11669                0 => Self::Unknown,
11670                1 => Self::SetPassword,
11671                2 => Self::GeneratePassword,
11672                3 => Self::SetUsername,
11673                _ => Self::UnknownValue(action::UnknownValue(
11674                    wkt::internal::UnknownEnumValue::Integer(value),
11675                )),
11676            }
11677        }
11678    }
11679
11680    impl std::convert::From<&str> for Action {
11681        fn from(value: &str) -> Self {
11682            use std::string::ToString;
11683            match value {
11684                "UNKNOWN" => Self::Unknown,
11685                "SET_PASSWORD" => Self::SetPassword,
11686                "GENERATE_PASSWORD" => Self::GeneratePassword,
11687                "SET_USERNAME" => Self::SetUsername,
11688                _ => Self::UnknownValue(action::UnknownValue(
11689                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11690                )),
11691            }
11692        }
11693    }
11694
11695    impl serde::ser::Serialize for Action {
11696        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11697        where
11698            S: serde::Serializer,
11699        {
11700            match self {
11701                Self::Unknown => serializer.serialize_i32(0),
11702                Self::SetPassword => serializer.serialize_i32(1),
11703                Self::GeneratePassword => serializer.serialize_i32(2),
11704                Self::SetUsername => serializer.serialize_i32(3),
11705                Self::UnknownValue(u) => u.0.serialize(serializer),
11706            }
11707        }
11708    }
11709
11710    impl<'de> serde::de::Deserialize<'de> for Action {
11711        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11712        where
11713            D: serde::Deserializer<'de>,
11714        {
11715            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
11716                ".google.container.v1.SetMasterAuthRequest.Action",
11717            ))
11718        }
11719    }
11720}
11721
11722/// DeleteClusterRequest deletes a cluster.
11723#[serde_with::serde_as]
11724#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11725#[serde(default, rename_all = "camelCase")]
11726#[non_exhaustive]
11727pub struct DeleteClusterRequest {
11728    /// Deprecated. The Google Developers Console [project ID or project
11729    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11730    /// This field has been deprecated and replaced by the name field.
11731    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11732    #[deprecated]
11733    pub project_id: std::string::String,
11734
11735    /// Deprecated. The name of the Google Compute Engine
11736    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11737    /// cluster resides. This field has been deprecated and replaced by the name
11738    /// field.
11739    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11740    #[deprecated]
11741    pub zone: std::string::String,
11742
11743    /// Deprecated. The name of the cluster to delete.
11744    /// This field has been deprecated and replaced by the name field.
11745    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11746    #[deprecated]
11747    pub cluster_id: std::string::String,
11748
11749    /// The name (project, location, cluster) of the cluster to delete.
11750    /// Specified in the format `projects/*/locations/*/clusters/*`.
11751    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11752    pub name: std::string::String,
11753
11754    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11755    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11756}
11757
11758impl DeleteClusterRequest {
11759    pub fn new() -> Self {
11760        std::default::Default::default()
11761    }
11762
11763    /// Sets the value of [project_id][crate::model::DeleteClusterRequest::project_id].
11764    #[deprecated]
11765    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11766        self.project_id = v.into();
11767        self
11768    }
11769
11770    /// Sets the value of [zone][crate::model::DeleteClusterRequest::zone].
11771    #[deprecated]
11772    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11773        self.zone = v.into();
11774        self
11775    }
11776
11777    /// Sets the value of [cluster_id][crate::model::DeleteClusterRequest::cluster_id].
11778    #[deprecated]
11779    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11780        self.cluster_id = v.into();
11781        self
11782    }
11783
11784    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
11785    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11786        self.name = v.into();
11787        self
11788    }
11789}
11790
11791impl wkt::message::Message for DeleteClusterRequest {
11792    fn typename() -> &'static str {
11793        "type.googleapis.com/google.container.v1.DeleteClusterRequest"
11794    }
11795}
11796
11797/// ListClustersRequest lists clusters.
11798#[serde_with::serde_as]
11799#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11800#[serde(default, rename_all = "camelCase")]
11801#[non_exhaustive]
11802pub struct ListClustersRequest {
11803    /// Deprecated. The Google Developers Console [project ID or project
11804    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11805    /// This field has been deprecated and replaced by the parent field.
11806    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11807    #[deprecated]
11808    pub project_id: std::string::String,
11809
11810    /// Deprecated. The name of the Google Compute Engine
11811    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11812    /// cluster resides, or "-" for all zones. This field has been deprecated and
11813    /// replaced by the parent field.
11814    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11815    #[deprecated]
11816    pub zone: std::string::String,
11817
11818    /// The parent (project and location) where the clusters will be listed.
11819    /// Specified in the format `projects/*/locations/*`.
11820    /// Location "-" matches all zones and all regions.
11821    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11822    pub parent: std::string::String,
11823
11824    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11825    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11826}
11827
11828impl ListClustersRequest {
11829    pub fn new() -> Self {
11830        std::default::Default::default()
11831    }
11832
11833    /// Sets the value of [project_id][crate::model::ListClustersRequest::project_id].
11834    #[deprecated]
11835    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11836        self.project_id = v.into();
11837        self
11838    }
11839
11840    /// Sets the value of [zone][crate::model::ListClustersRequest::zone].
11841    #[deprecated]
11842    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11843        self.zone = v.into();
11844        self
11845    }
11846
11847    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
11848    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11849        self.parent = v.into();
11850        self
11851    }
11852}
11853
11854impl wkt::message::Message for ListClustersRequest {
11855    fn typename() -> &'static str {
11856        "type.googleapis.com/google.container.v1.ListClustersRequest"
11857    }
11858}
11859
11860/// ListClustersResponse is the result of ListClustersRequest.
11861#[serde_with::serde_as]
11862#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11863#[serde(default, rename_all = "camelCase")]
11864#[non_exhaustive]
11865pub struct ListClustersResponse {
11866    /// A list of clusters in the project in the specified zone, or
11867    /// across all ones.
11868    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11869    pub clusters: std::vec::Vec<crate::model::Cluster>,
11870
11871    /// If any zones are listed here, the list of clusters returned
11872    /// may be missing those zones.
11873    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11874    pub missing_zones: std::vec::Vec<std::string::String>,
11875
11876    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11877    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11878}
11879
11880impl ListClustersResponse {
11881    pub fn new() -> Self {
11882        std::default::Default::default()
11883    }
11884
11885    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
11886    pub fn set_clusters<T, V>(mut self, v: T) -> Self
11887    where
11888        T: std::iter::IntoIterator<Item = V>,
11889        V: std::convert::Into<crate::model::Cluster>,
11890    {
11891        use std::iter::Iterator;
11892        self.clusters = v.into_iter().map(|i| i.into()).collect();
11893        self
11894    }
11895
11896    /// Sets the value of [missing_zones][crate::model::ListClustersResponse::missing_zones].
11897    pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
11898    where
11899        T: std::iter::IntoIterator<Item = V>,
11900        V: std::convert::Into<std::string::String>,
11901    {
11902        use std::iter::Iterator;
11903        self.missing_zones = v.into_iter().map(|i| i.into()).collect();
11904        self
11905    }
11906}
11907
11908impl wkt::message::Message for ListClustersResponse {
11909    fn typename() -> &'static str {
11910        "type.googleapis.com/google.container.v1.ListClustersResponse"
11911    }
11912}
11913
11914/// GetOperationRequest gets a single operation.
11915#[serde_with::serde_as]
11916#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11917#[serde(default, rename_all = "camelCase")]
11918#[non_exhaustive]
11919pub struct GetOperationRequest {
11920    /// Deprecated. The Google Developers Console [project ID or project
11921    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11922    /// This field has been deprecated and replaced by the name field.
11923    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11924    #[deprecated]
11925    pub project_id: std::string::String,
11926
11927    /// Deprecated. The name of the Google Compute Engine
11928    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
11929    /// cluster resides. This field has been deprecated and replaced by the name
11930    /// field.
11931    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11932    #[deprecated]
11933    pub zone: std::string::String,
11934
11935    /// Deprecated. The server-assigned `name` of the operation.
11936    /// This field has been deprecated and replaced by the name field.
11937    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11938    #[deprecated]
11939    pub operation_id: std::string::String,
11940
11941    /// The name (project, location, operation id) of the operation to get.
11942    /// Specified in the format `projects/*/locations/*/operations/*`.
11943    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11944    pub name: std::string::String,
11945
11946    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11947    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11948}
11949
11950impl GetOperationRequest {
11951    pub fn new() -> Self {
11952        std::default::Default::default()
11953    }
11954
11955    /// Sets the value of [project_id][crate::model::GetOperationRequest::project_id].
11956    #[deprecated]
11957    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11958        self.project_id = v.into();
11959        self
11960    }
11961
11962    /// Sets the value of [zone][crate::model::GetOperationRequest::zone].
11963    #[deprecated]
11964    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11965        self.zone = v.into();
11966        self
11967    }
11968
11969    /// Sets the value of [operation_id][crate::model::GetOperationRequest::operation_id].
11970    #[deprecated]
11971    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11972        self.operation_id = v.into();
11973        self
11974    }
11975
11976    /// Sets the value of [name][crate::model::GetOperationRequest::name].
11977    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11978        self.name = v.into();
11979        self
11980    }
11981}
11982
11983impl wkt::message::Message for GetOperationRequest {
11984    fn typename() -> &'static str {
11985        "type.googleapis.com/google.container.v1.GetOperationRequest"
11986    }
11987}
11988
11989/// ListOperationsRequest lists operations.
11990#[serde_with::serde_as]
11991#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11992#[serde(default, rename_all = "camelCase")]
11993#[non_exhaustive]
11994pub struct ListOperationsRequest {
11995    /// Deprecated. The Google Developers Console [project ID or project
11996    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
11997    /// This field has been deprecated and replaced by the parent field.
11998    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11999    #[deprecated]
12000    pub project_id: std::string::String,
12001
12002    /// Deprecated. The name of the Google Compute Engine
12003    /// [zone](https://cloud.google.com/compute/docs/zones#available) to return
12004    /// operations for, or `-` for all zones. This field has been deprecated and
12005    /// replaced by the parent field.
12006    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12007    #[deprecated]
12008    pub zone: std::string::String,
12009
12010    /// The parent (project and location) where the operations will be listed.
12011    /// Specified in the format `projects/*/locations/*`.
12012    /// Location "-" matches all zones and all regions.
12013    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12014    pub parent: std::string::String,
12015
12016    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12017    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12018}
12019
12020impl ListOperationsRequest {
12021    pub fn new() -> Self {
12022        std::default::Default::default()
12023    }
12024
12025    /// Sets the value of [project_id][crate::model::ListOperationsRequest::project_id].
12026    #[deprecated]
12027    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12028        self.project_id = v.into();
12029        self
12030    }
12031
12032    /// Sets the value of [zone][crate::model::ListOperationsRequest::zone].
12033    #[deprecated]
12034    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12035        self.zone = v.into();
12036        self
12037    }
12038
12039    /// Sets the value of [parent][crate::model::ListOperationsRequest::parent].
12040    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12041        self.parent = v.into();
12042        self
12043    }
12044}
12045
12046impl wkt::message::Message for ListOperationsRequest {
12047    fn typename() -> &'static str {
12048        "type.googleapis.com/google.container.v1.ListOperationsRequest"
12049    }
12050}
12051
12052/// CancelOperationRequest cancels a single operation.
12053#[serde_with::serde_as]
12054#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12055#[serde(default, rename_all = "camelCase")]
12056#[non_exhaustive]
12057pub struct CancelOperationRequest {
12058    /// Deprecated. The Google Developers Console [project ID or project
12059    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
12060    /// This field has been deprecated and replaced by the name field.
12061    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12062    #[deprecated]
12063    pub project_id: std::string::String,
12064
12065    /// Deprecated. The name of the Google Compute Engine
12066    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
12067    /// operation resides. This field has been deprecated and replaced by the name
12068    /// field.
12069    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12070    #[deprecated]
12071    pub zone: std::string::String,
12072
12073    /// Deprecated. The server-assigned `name` of the operation.
12074    /// This field has been deprecated and replaced by the name field.
12075    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12076    #[deprecated]
12077    pub operation_id: std::string::String,
12078
12079    /// The name (project, location, operation id) of the operation to cancel.
12080    /// Specified in the format `projects/*/locations/*/operations/*`.
12081    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12082    pub name: std::string::String,
12083
12084    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12085    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12086}
12087
12088impl CancelOperationRequest {
12089    pub fn new() -> Self {
12090        std::default::Default::default()
12091    }
12092
12093    /// Sets the value of [project_id][crate::model::CancelOperationRequest::project_id].
12094    #[deprecated]
12095    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12096        self.project_id = v.into();
12097        self
12098    }
12099
12100    /// Sets the value of [zone][crate::model::CancelOperationRequest::zone].
12101    #[deprecated]
12102    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12103        self.zone = v.into();
12104        self
12105    }
12106
12107    /// Sets the value of [operation_id][crate::model::CancelOperationRequest::operation_id].
12108    #[deprecated]
12109    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12110        self.operation_id = v.into();
12111        self
12112    }
12113
12114    /// Sets the value of [name][crate::model::CancelOperationRequest::name].
12115    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12116        self.name = v.into();
12117        self
12118    }
12119}
12120
12121impl wkt::message::Message for CancelOperationRequest {
12122    fn typename() -> &'static str {
12123        "type.googleapis.com/google.container.v1.CancelOperationRequest"
12124    }
12125}
12126
12127/// ListOperationsResponse is the result of ListOperationsRequest.
12128#[serde_with::serde_as]
12129#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12130#[serde(default, rename_all = "camelCase")]
12131#[non_exhaustive]
12132pub struct ListOperationsResponse {
12133    /// A list of operations in the project in the specified zone.
12134    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12135    pub operations: std::vec::Vec<crate::model::Operation>,
12136
12137    /// If any zones are listed here, the list of operations returned
12138    /// may be missing the operations from those zones.
12139    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12140    pub missing_zones: std::vec::Vec<std::string::String>,
12141
12142    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12143    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12144}
12145
12146impl ListOperationsResponse {
12147    pub fn new() -> Self {
12148        std::default::Default::default()
12149    }
12150
12151    /// Sets the value of [operations][crate::model::ListOperationsResponse::operations].
12152    pub fn set_operations<T, V>(mut self, v: T) -> Self
12153    where
12154        T: std::iter::IntoIterator<Item = V>,
12155        V: std::convert::Into<crate::model::Operation>,
12156    {
12157        use std::iter::Iterator;
12158        self.operations = v.into_iter().map(|i| i.into()).collect();
12159        self
12160    }
12161
12162    /// Sets the value of [missing_zones][crate::model::ListOperationsResponse::missing_zones].
12163    pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
12164    where
12165        T: std::iter::IntoIterator<Item = V>,
12166        V: std::convert::Into<std::string::String>,
12167    {
12168        use std::iter::Iterator;
12169        self.missing_zones = v.into_iter().map(|i| i.into()).collect();
12170        self
12171    }
12172}
12173
12174impl wkt::message::Message for ListOperationsResponse {
12175    fn typename() -> &'static str {
12176        "type.googleapis.com/google.container.v1.ListOperationsResponse"
12177    }
12178}
12179
12180/// Gets the current Kubernetes Engine service configuration.
12181#[serde_with::serde_as]
12182#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12183#[serde(default, rename_all = "camelCase")]
12184#[non_exhaustive]
12185pub struct GetServerConfigRequest {
12186    /// Deprecated. The Google Developers Console [project ID or project
12187    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
12188    /// This field has been deprecated and replaced by the name field.
12189    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12190    #[deprecated]
12191    pub project_id: std::string::String,
12192
12193    /// Deprecated. The name of the Google Compute Engine
12194    /// [zone](https://cloud.google.com/compute/docs/zones#available) to return
12195    /// operations for. This field has been deprecated and replaced by the name
12196    /// field.
12197    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12198    #[deprecated]
12199    pub zone: std::string::String,
12200
12201    /// The name (project and location) of the server config to get,
12202    /// specified in the format `projects/*/locations/*`.
12203    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12204    pub name: std::string::String,
12205
12206    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12207    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12208}
12209
12210impl GetServerConfigRequest {
12211    pub fn new() -> Self {
12212        std::default::Default::default()
12213    }
12214
12215    /// Sets the value of [project_id][crate::model::GetServerConfigRequest::project_id].
12216    #[deprecated]
12217    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12218        self.project_id = v.into();
12219        self
12220    }
12221
12222    /// Sets the value of [zone][crate::model::GetServerConfigRequest::zone].
12223    #[deprecated]
12224    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12225        self.zone = v.into();
12226        self
12227    }
12228
12229    /// Sets the value of [name][crate::model::GetServerConfigRequest::name].
12230    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12231        self.name = v.into();
12232        self
12233    }
12234}
12235
12236impl wkt::message::Message for GetServerConfigRequest {
12237    fn typename() -> &'static str {
12238        "type.googleapis.com/google.container.v1.GetServerConfigRequest"
12239    }
12240}
12241
12242/// Kubernetes Engine service configuration.
12243#[serde_with::serde_as]
12244#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12245#[serde(default, rename_all = "camelCase")]
12246#[non_exhaustive]
12247pub struct ServerConfig {
12248    /// Version of Kubernetes the service deploys by default.
12249    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12250    pub default_cluster_version: std::string::String,
12251
12252    /// List of valid node upgrade target versions, in descending order.
12253    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12254    pub valid_node_versions: std::vec::Vec<std::string::String>,
12255
12256    /// Default image type.
12257    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12258    pub default_image_type: std::string::String,
12259
12260    /// List of valid image types.
12261    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12262    pub valid_image_types: std::vec::Vec<std::string::String>,
12263
12264    /// List of valid master versions, in descending order.
12265    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12266    pub valid_master_versions: std::vec::Vec<std::string::String>,
12267
12268    /// List of release channel configurations.
12269    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12270    pub channels: std::vec::Vec<crate::model::server_config::ReleaseChannelConfig>,
12271
12272    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12273    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12274}
12275
12276impl ServerConfig {
12277    pub fn new() -> Self {
12278        std::default::Default::default()
12279    }
12280
12281    /// Sets the value of [default_cluster_version][crate::model::ServerConfig::default_cluster_version].
12282    pub fn set_default_cluster_version<T: std::convert::Into<std::string::String>>(
12283        mut self,
12284        v: T,
12285    ) -> Self {
12286        self.default_cluster_version = v.into();
12287        self
12288    }
12289
12290    /// Sets the value of [valid_node_versions][crate::model::ServerConfig::valid_node_versions].
12291    pub fn set_valid_node_versions<T, V>(mut self, v: T) -> Self
12292    where
12293        T: std::iter::IntoIterator<Item = V>,
12294        V: std::convert::Into<std::string::String>,
12295    {
12296        use std::iter::Iterator;
12297        self.valid_node_versions = v.into_iter().map(|i| i.into()).collect();
12298        self
12299    }
12300
12301    /// Sets the value of [default_image_type][crate::model::ServerConfig::default_image_type].
12302    pub fn set_default_image_type<T: std::convert::Into<std::string::String>>(
12303        mut self,
12304        v: T,
12305    ) -> Self {
12306        self.default_image_type = v.into();
12307        self
12308    }
12309
12310    /// Sets the value of [valid_image_types][crate::model::ServerConfig::valid_image_types].
12311    pub fn set_valid_image_types<T, V>(mut self, v: T) -> Self
12312    where
12313        T: std::iter::IntoIterator<Item = V>,
12314        V: std::convert::Into<std::string::String>,
12315    {
12316        use std::iter::Iterator;
12317        self.valid_image_types = v.into_iter().map(|i| i.into()).collect();
12318        self
12319    }
12320
12321    /// Sets the value of [valid_master_versions][crate::model::ServerConfig::valid_master_versions].
12322    pub fn set_valid_master_versions<T, V>(mut self, v: T) -> Self
12323    where
12324        T: std::iter::IntoIterator<Item = V>,
12325        V: std::convert::Into<std::string::String>,
12326    {
12327        use std::iter::Iterator;
12328        self.valid_master_versions = v.into_iter().map(|i| i.into()).collect();
12329        self
12330    }
12331
12332    /// Sets the value of [channels][crate::model::ServerConfig::channels].
12333    pub fn set_channels<T, V>(mut self, v: T) -> Self
12334    where
12335        T: std::iter::IntoIterator<Item = V>,
12336        V: std::convert::Into<crate::model::server_config::ReleaseChannelConfig>,
12337    {
12338        use std::iter::Iterator;
12339        self.channels = v.into_iter().map(|i| i.into()).collect();
12340        self
12341    }
12342}
12343
12344impl wkt::message::Message for ServerConfig {
12345    fn typename() -> &'static str {
12346        "type.googleapis.com/google.container.v1.ServerConfig"
12347    }
12348}
12349
12350/// Defines additional types related to [ServerConfig].
12351pub mod server_config {
12352    #[allow(unused_imports)]
12353    use super::*;
12354
12355    /// ReleaseChannelConfig exposes configuration for a release channel.
12356    #[serde_with::serde_as]
12357    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12358    #[serde(default, rename_all = "camelCase")]
12359    #[non_exhaustive]
12360    pub struct ReleaseChannelConfig {
12361        /// The release channel this configuration applies to.
12362        pub channel: crate::model::release_channel::Channel,
12363
12364        /// The default version for newly created clusters on the channel.
12365        #[serde(skip_serializing_if = "std::string::String::is_empty")]
12366        pub default_version: std::string::String,
12367
12368        /// List of valid versions for the channel.
12369        #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12370        pub valid_versions: std::vec::Vec<std::string::String>,
12371
12372        /// The auto upgrade target version for clusters on the channel.
12373        #[serde(skip_serializing_if = "std::string::String::is_empty")]
12374        pub upgrade_target_version: std::string::String,
12375
12376        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12377        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12378    }
12379
12380    impl ReleaseChannelConfig {
12381        pub fn new() -> Self {
12382            std::default::Default::default()
12383        }
12384
12385        /// Sets the value of [channel][crate::model::server_config::ReleaseChannelConfig::channel].
12386        pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
12387            mut self,
12388            v: T,
12389        ) -> Self {
12390            self.channel = v.into();
12391            self
12392        }
12393
12394        /// Sets the value of [default_version][crate::model::server_config::ReleaseChannelConfig::default_version].
12395        pub fn set_default_version<T: std::convert::Into<std::string::String>>(
12396            mut self,
12397            v: T,
12398        ) -> Self {
12399            self.default_version = v.into();
12400            self
12401        }
12402
12403        /// Sets the value of [valid_versions][crate::model::server_config::ReleaseChannelConfig::valid_versions].
12404        pub fn set_valid_versions<T, V>(mut self, v: T) -> Self
12405        where
12406            T: std::iter::IntoIterator<Item = V>,
12407            V: std::convert::Into<std::string::String>,
12408        {
12409            use std::iter::Iterator;
12410            self.valid_versions = v.into_iter().map(|i| i.into()).collect();
12411            self
12412        }
12413
12414        /// Sets the value of [upgrade_target_version][crate::model::server_config::ReleaseChannelConfig::upgrade_target_version].
12415        pub fn set_upgrade_target_version<T: std::convert::Into<std::string::String>>(
12416            mut self,
12417            v: T,
12418        ) -> Self {
12419            self.upgrade_target_version = v.into();
12420            self
12421        }
12422    }
12423
12424    impl wkt::message::Message for ReleaseChannelConfig {
12425        fn typename() -> &'static str {
12426            "type.googleapis.com/google.container.v1.ServerConfig.ReleaseChannelConfig"
12427        }
12428    }
12429}
12430
12431/// CreateNodePoolRequest creates a node pool for a cluster.
12432#[serde_with::serde_as]
12433#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12434#[serde(default, rename_all = "camelCase")]
12435#[non_exhaustive]
12436pub struct CreateNodePoolRequest {
12437    /// Deprecated. The Google Developers Console [project ID or project
12438    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
12439    /// This field has been deprecated and replaced by the parent field.
12440    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12441    #[deprecated]
12442    pub project_id: std::string::String,
12443
12444    /// Deprecated. The name of the Google Compute Engine
12445    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
12446    /// cluster resides. This field has been deprecated and replaced by the parent
12447    /// field.
12448    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12449    #[deprecated]
12450    pub zone: std::string::String,
12451
12452    /// Deprecated. The name of the cluster.
12453    /// This field has been deprecated and replaced by the parent field.
12454    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12455    #[deprecated]
12456    pub cluster_id: std::string::String,
12457
12458    /// Required. The node pool to create.
12459    #[serde(skip_serializing_if = "std::option::Option::is_none")]
12460    pub node_pool: std::option::Option<crate::model::NodePool>,
12461
12462    /// The parent (project, location, cluster name) where the node pool will be
12463    /// created. Specified in the format
12464    /// `projects/*/locations/*/clusters/*`.
12465    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12466    pub parent: std::string::String,
12467
12468    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12469    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12470}
12471
12472impl CreateNodePoolRequest {
12473    pub fn new() -> Self {
12474        std::default::Default::default()
12475    }
12476
12477    /// Sets the value of [project_id][crate::model::CreateNodePoolRequest::project_id].
12478    #[deprecated]
12479    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12480        self.project_id = v.into();
12481        self
12482    }
12483
12484    /// Sets the value of [zone][crate::model::CreateNodePoolRequest::zone].
12485    #[deprecated]
12486    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12487        self.zone = v.into();
12488        self
12489    }
12490
12491    /// Sets the value of [cluster_id][crate::model::CreateNodePoolRequest::cluster_id].
12492    #[deprecated]
12493    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12494        self.cluster_id = v.into();
12495        self
12496    }
12497
12498    /// Sets the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
12499    pub fn set_node_pool<T: std::convert::Into<std::option::Option<crate::model::NodePool>>>(
12500        mut self,
12501        v: T,
12502    ) -> Self {
12503        self.node_pool = v.into();
12504        self
12505    }
12506
12507    /// Sets the value of [parent][crate::model::CreateNodePoolRequest::parent].
12508    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12509        self.parent = v.into();
12510        self
12511    }
12512}
12513
12514impl wkt::message::Message for CreateNodePoolRequest {
12515    fn typename() -> &'static str {
12516        "type.googleapis.com/google.container.v1.CreateNodePoolRequest"
12517    }
12518}
12519
12520/// DeleteNodePoolRequest deletes a node pool for a cluster.
12521#[serde_with::serde_as]
12522#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12523#[serde(default, rename_all = "camelCase")]
12524#[non_exhaustive]
12525pub struct DeleteNodePoolRequest {
12526    /// Deprecated. The Google Developers Console [project ID or project
12527    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
12528    /// This field has been deprecated and replaced by the name field.
12529    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12530    #[deprecated]
12531    pub project_id: std::string::String,
12532
12533    /// Deprecated. The name of the Google Compute Engine
12534    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
12535    /// cluster resides. This field has been deprecated and replaced by the name
12536    /// field.
12537    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12538    #[deprecated]
12539    pub zone: std::string::String,
12540
12541    /// Deprecated. The name of the cluster.
12542    /// This field has been deprecated and replaced by the name field.
12543    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12544    #[deprecated]
12545    pub cluster_id: std::string::String,
12546
12547    /// Deprecated. The name of the node pool to delete.
12548    /// This field has been deprecated and replaced by the name field.
12549    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12550    #[deprecated]
12551    pub node_pool_id: std::string::String,
12552
12553    /// The name (project, location, cluster, node pool id) of the node pool to
12554    /// delete. Specified in the format
12555    /// `projects/*/locations/*/clusters/*/nodePools/*`.
12556    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12557    pub name: std::string::String,
12558
12559    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12560    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12561}
12562
12563impl DeleteNodePoolRequest {
12564    pub fn new() -> Self {
12565        std::default::Default::default()
12566    }
12567
12568    /// Sets the value of [project_id][crate::model::DeleteNodePoolRequest::project_id].
12569    #[deprecated]
12570    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12571        self.project_id = v.into();
12572        self
12573    }
12574
12575    /// Sets the value of [zone][crate::model::DeleteNodePoolRequest::zone].
12576    #[deprecated]
12577    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12578        self.zone = v.into();
12579        self
12580    }
12581
12582    /// Sets the value of [cluster_id][crate::model::DeleteNodePoolRequest::cluster_id].
12583    #[deprecated]
12584    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12585        self.cluster_id = v.into();
12586        self
12587    }
12588
12589    /// Sets the value of [node_pool_id][crate::model::DeleteNodePoolRequest::node_pool_id].
12590    #[deprecated]
12591    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12592        self.node_pool_id = v.into();
12593        self
12594    }
12595
12596    /// Sets the value of [name][crate::model::DeleteNodePoolRequest::name].
12597    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12598        self.name = v.into();
12599        self
12600    }
12601}
12602
12603impl wkt::message::Message for DeleteNodePoolRequest {
12604    fn typename() -> &'static str {
12605        "type.googleapis.com/google.container.v1.DeleteNodePoolRequest"
12606    }
12607}
12608
12609/// ListNodePoolsRequest lists the node pool(s) for a cluster.
12610#[serde_with::serde_as]
12611#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12612#[serde(default, rename_all = "camelCase")]
12613#[non_exhaustive]
12614pub struct ListNodePoolsRequest {
12615    /// Deprecated. The Google Developers Console [project ID or project
12616    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
12617    /// This field has been deprecated and replaced by the parent field.
12618    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12619    #[deprecated]
12620    pub project_id: std::string::String,
12621
12622    /// Deprecated. The name of the Google Compute Engine
12623    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
12624    /// cluster resides. This field has been deprecated and replaced by the parent
12625    /// field.
12626    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12627    #[deprecated]
12628    pub zone: std::string::String,
12629
12630    /// Deprecated. The name of the cluster.
12631    /// This field has been deprecated and replaced by the parent field.
12632    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12633    #[deprecated]
12634    pub cluster_id: std::string::String,
12635
12636    /// The parent (project, location, cluster name) where the node pools will be
12637    /// listed. Specified in the format `projects/*/locations/*/clusters/*`.
12638    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12639    pub parent: std::string::String,
12640
12641    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12642    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12643}
12644
12645impl ListNodePoolsRequest {
12646    pub fn new() -> Self {
12647        std::default::Default::default()
12648    }
12649
12650    /// Sets the value of [project_id][crate::model::ListNodePoolsRequest::project_id].
12651    #[deprecated]
12652    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12653        self.project_id = v.into();
12654        self
12655    }
12656
12657    /// Sets the value of [zone][crate::model::ListNodePoolsRequest::zone].
12658    #[deprecated]
12659    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12660        self.zone = v.into();
12661        self
12662    }
12663
12664    /// Sets the value of [cluster_id][crate::model::ListNodePoolsRequest::cluster_id].
12665    #[deprecated]
12666    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12667        self.cluster_id = v.into();
12668        self
12669    }
12670
12671    /// Sets the value of [parent][crate::model::ListNodePoolsRequest::parent].
12672    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12673        self.parent = v.into();
12674        self
12675    }
12676}
12677
12678impl wkt::message::Message for ListNodePoolsRequest {
12679    fn typename() -> &'static str {
12680        "type.googleapis.com/google.container.v1.ListNodePoolsRequest"
12681    }
12682}
12683
12684/// GetNodePoolRequest retrieves a node pool for a cluster.
12685#[serde_with::serde_as]
12686#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12687#[serde(default, rename_all = "camelCase")]
12688#[non_exhaustive]
12689pub struct GetNodePoolRequest {
12690    /// Deprecated. The Google Developers Console [project ID or project
12691    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
12692    /// This field has been deprecated and replaced by the name field.
12693    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12694    #[deprecated]
12695    pub project_id: std::string::String,
12696
12697    /// Deprecated. The name of the Google Compute Engine
12698    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
12699    /// cluster resides. This field has been deprecated and replaced by the name
12700    /// field.
12701    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12702    #[deprecated]
12703    pub zone: std::string::String,
12704
12705    /// Deprecated. The name of the cluster.
12706    /// This field has been deprecated and replaced by the name field.
12707    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12708    #[deprecated]
12709    pub cluster_id: std::string::String,
12710
12711    /// Deprecated. The name of the node pool.
12712    /// This field has been deprecated and replaced by the name field.
12713    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12714    #[deprecated]
12715    pub node_pool_id: std::string::String,
12716
12717    /// The name (project, location, cluster, node pool id) of the node pool to
12718    /// get. Specified in the format
12719    /// `projects/*/locations/*/clusters/*/nodePools/*`.
12720    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12721    pub name: std::string::String,
12722
12723    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12724    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12725}
12726
12727impl GetNodePoolRequest {
12728    pub fn new() -> Self {
12729        std::default::Default::default()
12730    }
12731
12732    /// Sets the value of [project_id][crate::model::GetNodePoolRequest::project_id].
12733    #[deprecated]
12734    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12735        self.project_id = v.into();
12736        self
12737    }
12738
12739    /// Sets the value of [zone][crate::model::GetNodePoolRequest::zone].
12740    #[deprecated]
12741    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12742        self.zone = v.into();
12743        self
12744    }
12745
12746    /// Sets the value of [cluster_id][crate::model::GetNodePoolRequest::cluster_id].
12747    #[deprecated]
12748    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12749        self.cluster_id = v.into();
12750        self
12751    }
12752
12753    /// Sets the value of [node_pool_id][crate::model::GetNodePoolRequest::node_pool_id].
12754    #[deprecated]
12755    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12756        self.node_pool_id = v.into();
12757        self
12758    }
12759
12760    /// Sets the value of [name][crate::model::GetNodePoolRequest::name].
12761    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12762        self.name = v.into();
12763        self
12764    }
12765}
12766
12767impl wkt::message::Message for GetNodePoolRequest {
12768    fn typename() -> &'static str {
12769        "type.googleapis.com/google.container.v1.GetNodePoolRequest"
12770    }
12771}
12772
12773/// Settings for blue-green upgrade.
12774#[serde_with::serde_as]
12775#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12776#[serde(default, rename_all = "camelCase")]
12777#[non_exhaustive]
12778pub struct BlueGreenSettings {
12779    /// Time needed after draining entire blue pool. After this period, blue pool
12780    /// will be cleaned up.
12781    #[serde(skip_serializing_if = "std::option::Option::is_none")]
12782    pub node_pool_soak_duration: std::option::Option<wkt::Duration>,
12783
12784    /// The rollout policy controls the general rollout progress of blue-green.
12785    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
12786    pub rollout_policy: std::option::Option<crate::model::blue_green_settings::RolloutPolicy>,
12787
12788    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12789    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12790}
12791
12792impl BlueGreenSettings {
12793    pub fn new() -> Self {
12794        std::default::Default::default()
12795    }
12796
12797    /// Sets the value of [node_pool_soak_duration][crate::model::BlueGreenSettings::node_pool_soak_duration].
12798    pub fn set_node_pool_soak_duration<
12799        T: std::convert::Into<std::option::Option<wkt::Duration>>,
12800    >(
12801        mut self,
12802        v: T,
12803    ) -> Self {
12804        self.node_pool_soak_duration = v.into();
12805        self
12806    }
12807
12808    /// Sets the value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy].
12809    ///
12810    /// Note that all the setters affecting `rollout_policy` are mutually
12811    /// exclusive.
12812    pub fn set_rollout_policy<
12813        T: std::convert::Into<std::option::Option<crate::model::blue_green_settings::RolloutPolicy>>,
12814    >(
12815        mut self,
12816        v: T,
12817    ) -> Self {
12818        self.rollout_policy = v.into();
12819        self
12820    }
12821
12822    /// The value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy]
12823    /// if it holds a `StandardRolloutPolicy`, `None` if the field is not set or
12824    /// holds a different branch.
12825    pub fn standard_rollout_policy(
12826        &self,
12827    ) -> std::option::Option<
12828        &std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
12829    > {
12830        #[allow(unreachable_patterns)]
12831        self.rollout_policy.as_ref().and_then(|v| match v {
12832            crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v) => {
12833                std::option::Option::Some(v)
12834            }
12835            _ => std::option::Option::None,
12836        })
12837    }
12838
12839    /// Sets the value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy]
12840    /// to hold a `StandardRolloutPolicy`.
12841    ///
12842    /// Note that all the setters affecting `rollout_policy` are
12843    /// mutually exclusive.
12844    pub fn set_standard_rollout_policy<
12845        T: std::convert::Into<
12846                std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
12847            >,
12848    >(
12849        mut self,
12850        v: T,
12851    ) -> Self {
12852        self.rollout_policy = std::option::Option::Some(
12853            crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v.into()),
12854        );
12855        self
12856    }
12857}
12858
12859impl wkt::message::Message for BlueGreenSettings {
12860    fn typename() -> &'static str {
12861        "type.googleapis.com/google.container.v1.BlueGreenSettings"
12862    }
12863}
12864
12865/// Defines additional types related to [BlueGreenSettings].
12866pub mod blue_green_settings {
12867    #[allow(unused_imports)]
12868    use super::*;
12869
12870    /// Standard rollout policy is the default policy for blue-green.
12871    #[serde_with::serde_as]
12872    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12873    #[serde(default, rename_all = "camelCase")]
12874    #[non_exhaustive]
12875    pub struct StandardRolloutPolicy {
12876        /// Soak time after each batch gets drained. Default to zero.
12877        #[serde(skip_serializing_if = "std::option::Option::is_none")]
12878        pub batch_soak_duration: std::option::Option<wkt::Duration>,
12879
12880        /// Blue pool size to drain in a batch.
12881        #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
12882        pub update_batch_size: std::option::Option<
12883            crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
12884        >,
12885
12886        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12887        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12888    }
12889
12890    impl StandardRolloutPolicy {
12891        pub fn new() -> Self {
12892            std::default::Default::default()
12893        }
12894
12895        /// Sets the value of [batch_soak_duration][crate::model::blue_green_settings::StandardRolloutPolicy::batch_soak_duration].
12896        pub fn set_batch_soak_duration<
12897            T: std::convert::Into<std::option::Option<wkt::Duration>>,
12898        >(
12899            mut self,
12900            v: T,
12901        ) -> Self {
12902            self.batch_soak_duration = v.into();
12903            self
12904        }
12905
12906        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size].
12907        ///
12908        /// Note that all the setters affecting `update_batch_size` are mutually
12909        /// exclusive.
12910        pub fn set_update_batch_size<
12911            T: std::convert::Into<
12912                    std::option::Option<
12913                        crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
12914                    >,
12915                >,
12916        >(
12917            mut self,
12918            v: T,
12919        ) -> Self {
12920            self.update_batch_size = v.into();
12921            self
12922        }
12923
12924        /// The value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
12925        /// if it holds a `BatchPercentage`, `None` if the field is not set or
12926        /// holds a different branch.
12927        pub fn batch_percentage(&self) -> std::option::Option<&f32> {
12928            #[allow(unreachable_patterns)]
12929            self.update_batch_size.as_ref().and_then(|v| match v {
12930                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(v) => std::option::Option::Some(v),
12931                _ => std::option::Option::None,
12932            })
12933        }
12934
12935        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
12936        /// to hold a `BatchPercentage`.
12937        ///
12938        /// Note that all the setters affecting `update_batch_size` are
12939        /// mutually exclusive.
12940        pub fn set_batch_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
12941            self.update_batch_size = std::option::Option::Some(
12942                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(
12943                    v.into()
12944                )
12945            );
12946            self
12947        }
12948
12949        /// The value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
12950        /// if it holds a `BatchNodeCount`, `None` if the field is not set or
12951        /// holds a different branch.
12952        pub fn batch_node_count(&self) -> std::option::Option<&i32> {
12953            #[allow(unreachable_patterns)]
12954            self.update_batch_size.as_ref().and_then(|v| match v {
12955                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(v) => std::option::Option::Some(v),
12956                _ => std::option::Option::None,
12957            })
12958        }
12959
12960        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
12961        /// to hold a `BatchNodeCount`.
12962        ///
12963        /// Note that all the setters affecting `update_batch_size` are
12964        /// mutually exclusive.
12965        pub fn set_batch_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12966            self.update_batch_size = std::option::Option::Some(
12967                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(
12968                    v.into()
12969                )
12970            );
12971            self
12972        }
12973    }
12974
12975    impl wkt::message::Message for StandardRolloutPolicy {
12976        fn typename() -> &'static str {
12977            "type.googleapis.com/google.container.v1.BlueGreenSettings.StandardRolloutPolicy"
12978        }
12979    }
12980
12981    /// Defines additional types related to [StandardRolloutPolicy].
12982    pub mod standard_rollout_policy {
12983        #[allow(unused_imports)]
12984        use super::*;
12985
12986        /// Blue pool size to drain in a batch.
12987        #[serde_with::serde_as]
12988        #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12989        #[serde(rename_all = "camelCase")]
12990        #[non_exhaustive]
12991        pub enum UpdateBatchSize {
12992            /// Percentage of the blue pool nodes to drain in a batch.
12993            /// The range of this field should be (0.0, 1.0].
12994            BatchPercentage(#[serde_as(as = "wkt::internal::F32")] f32),
12995            /// Number of blue nodes to drain in a batch.
12996            BatchNodeCount(i32),
12997        }
12998    }
12999
13000    /// The rollout policy controls the general rollout progress of blue-green.
13001    #[serde_with::serde_as]
13002    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
13003    #[serde(rename_all = "camelCase")]
13004    #[non_exhaustive]
13005    pub enum RolloutPolicy {
13006        /// Standard policy for the blue-green upgrade.
13007        StandardRolloutPolicy(
13008            std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
13009        ),
13010    }
13011}
13012
13013/// NodePool contains the name and configuration for a cluster's node pool.
13014/// Node pools are a set of nodes (i.e. VM's), with a common configuration and
13015/// specification, under the control of the cluster master. They may have a set
13016/// of Kubernetes labels applied to them, which may be used to reference them
13017/// during pod scheduling. They may also be resized up or down, to accommodate
13018/// the workload.
13019#[serde_with::serde_as]
13020#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13021#[serde(default, rename_all = "camelCase")]
13022#[non_exhaustive]
13023pub struct NodePool {
13024    /// The name of the node pool.
13025    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13026    pub name: std::string::String,
13027
13028    /// The node configuration of the pool.
13029    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13030    pub config: std::option::Option<crate::model::NodeConfig>,
13031
13032    /// The initial node count for the pool. You must ensure that your
13033    /// Compute Engine [resource quota](https://cloud.google.com/compute/quotas)
13034    /// is sufficient for this number of instances. You must also have available
13035    /// firewall and routes quota.
13036    #[serde(skip_serializing_if = "wkt::internal::is_default")]
13037    pub initial_node_count: i32,
13038
13039    /// The list of Google Compute Engine
13040    /// [zones](https://cloud.google.com/compute/docs/zones#available) in which the
13041    /// NodePool's nodes should be located.
13042    ///
13043    /// If this value is unspecified during node pool creation, the
13044    /// [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations)
13045    /// value will be used, instead.
13046    ///
13047    /// Warning: changing node pool locations will result in nodes being added
13048    /// and/or removed.
13049    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13050    pub locations: std::vec::Vec<std::string::String>,
13051
13052    /// Networking configuration for this NodePool. If specified, it overrides the
13053    /// cluster-level defaults.
13054    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13055    pub network_config: std::option::Option<crate::model::NodeNetworkConfig>,
13056
13057    /// Output only. Server-defined URL for the resource.
13058    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13059    pub self_link: std::string::String,
13060
13061    /// The version of Kubernetes running on this NodePool's nodes. If unspecified,
13062    /// it defaults as described
13063    /// [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version).
13064    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13065    pub version: std::string::String,
13066
13067    /// Output only. The resource URLs of the [managed instance
13068    /// groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances)
13069    /// associated with this node pool.
13070    /// During the node pool blue-green upgrade operation, the URLs contain both
13071    /// blue and green resources.
13072    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13073    pub instance_group_urls: std::vec::Vec<std::string::String>,
13074
13075    /// Output only. The status of the nodes in this pool instance.
13076    pub status: crate::model::node_pool::Status,
13077
13078    /// Output only. Deprecated. Use conditions instead.
13079    /// Additional information about the current status of this
13080    /// node pool instance, if available.
13081    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13082    #[deprecated]
13083    pub status_message: std::string::String,
13084
13085    /// Autoscaler configuration for this NodePool. Autoscaler is enabled
13086    /// only if a valid configuration is present.
13087    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13088    pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
13089
13090    /// NodeManagement configuration for this NodePool.
13091    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13092    pub management: std::option::Option<crate::model::NodeManagement>,
13093
13094    /// The constraint on the maximum number of pods that can be run
13095    /// simultaneously on a node in the node pool.
13096    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13097    pub max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
13098
13099    /// Which conditions caused the current node pool state.
13100    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13101    pub conditions: std::vec::Vec<crate::model::StatusCondition>,
13102
13103    /// Output only. The pod CIDR block size per node in this node pool.
13104    #[serde(skip_serializing_if = "wkt::internal::is_default")]
13105    pub pod_ipv4_cidr_size: i32,
13106
13107    /// Upgrade settings control disruption and speed of the upgrade.
13108    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13109    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
13110
13111    /// Specifies the node placement policy.
13112    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13113    pub placement_policy: std::option::Option<crate::model::node_pool::PlacementPolicy>,
13114
13115    /// Output only. Update info contains relevant information during a node
13116    /// pool update.
13117    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13118    pub update_info: std::option::Option<crate::model::node_pool::UpdateInfo>,
13119
13120    /// This checksum is computed by the server based on the value of node pool
13121    /// fields, and may be sent on update requests to ensure the client has an
13122    /// up-to-date value before proceeding.
13123    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13124    pub etag: std::string::String,
13125
13126    /// Specifies the configuration of queued provisioning.
13127    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13128    pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
13129
13130    /// Enable best effort provisioning for nodes
13131    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13132    pub best_effort_provisioning: std::option::Option<crate::model::BestEffortProvisioning>,
13133
13134    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13135    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13136}
13137
13138impl NodePool {
13139    pub fn new() -> Self {
13140        std::default::Default::default()
13141    }
13142
13143    /// Sets the value of [name][crate::model::NodePool::name].
13144    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13145        self.name = v.into();
13146        self
13147    }
13148
13149    /// Sets the value of [config][crate::model::NodePool::config].
13150    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::NodeConfig>>>(
13151        mut self,
13152        v: T,
13153    ) -> Self {
13154        self.config = v.into();
13155        self
13156    }
13157
13158    /// Sets the value of [initial_node_count][crate::model::NodePool::initial_node_count].
13159    pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13160        self.initial_node_count = v.into();
13161        self
13162    }
13163
13164    /// Sets the value of [locations][crate::model::NodePool::locations].
13165    pub fn set_locations<T, V>(mut self, v: T) -> Self
13166    where
13167        T: std::iter::IntoIterator<Item = V>,
13168        V: std::convert::Into<std::string::String>,
13169    {
13170        use std::iter::Iterator;
13171        self.locations = v.into_iter().map(|i| i.into()).collect();
13172        self
13173    }
13174
13175    /// Sets the value of [network_config][crate::model::NodePool::network_config].
13176    pub fn set_network_config<
13177        T: std::convert::Into<std::option::Option<crate::model::NodeNetworkConfig>>,
13178    >(
13179        mut self,
13180        v: T,
13181    ) -> Self {
13182        self.network_config = v.into();
13183        self
13184    }
13185
13186    /// Sets the value of [self_link][crate::model::NodePool::self_link].
13187    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13188        self.self_link = v.into();
13189        self
13190    }
13191
13192    /// Sets the value of [version][crate::model::NodePool::version].
13193    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13194        self.version = v.into();
13195        self
13196    }
13197
13198    /// Sets the value of [instance_group_urls][crate::model::NodePool::instance_group_urls].
13199    pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
13200    where
13201        T: std::iter::IntoIterator<Item = V>,
13202        V: std::convert::Into<std::string::String>,
13203    {
13204        use std::iter::Iterator;
13205        self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
13206        self
13207    }
13208
13209    /// Sets the value of [status][crate::model::NodePool::status].
13210    pub fn set_status<T: std::convert::Into<crate::model::node_pool::Status>>(
13211        mut self,
13212        v: T,
13213    ) -> Self {
13214        self.status = v.into();
13215        self
13216    }
13217
13218    /// Sets the value of [status_message][crate::model::NodePool::status_message].
13219    #[deprecated]
13220    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13221        self.status_message = v.into();
13222        self
13223    }
13224
13225    /// Sets the value of [autoscaling][crate::model::NodePool::autoscaling].
13226    pub fn set_autoscaling<
13227        T: std::convert::Into<std::option::Option<crate::model::NodePoolAutoscaling>>,
13228    >(
13229        mut self,
13230        v: T,
13231    ) -> Self {
13232        self.autoscaling = v.into();
13233        self
13234    }
13235
13236    /// Sets the value of [management][crate::model::NodePool::management].
13237    pub fn set_management<
13238        T: std::convert::Into<std::option::Option<crate::model::NodeManagement>>,
13239    >(
13240        mut self,
13241        v: T,
13242    ) -> Self {
13243        self.management = v.into();
13244        self
13245    }
13246
13247    /// Sets the value of [max_pods_constraint][crate::model::NodePool::max_pods_constraint].
13248    pub fn set_max_pods_constraint<
13249        T: std::convert::Into<std::option::Option<crate::model::MaxPodsConstraint>>,
13250    >(
13251        mut self,
13252        v: T,
13253    ) -> Self {
13254        self.max_pods_constraint = v.into();
13255        self
13256    }
13257
13258    /// Sets the value of [conditions][crate::model::NodePool::conditions].
13259    pub fn set_conditions<T, V>(mut self, v: T) -> Self
13260    where
13261        T: std::iter::IntoIterator<Item = V>,
13262        V: std::convert::Into<crate::model::StatusCondition>,
13263    {
13264        use std::iter::Iterator;
13265        self.conditions = v.into_iter().map(|i| i.into()).collect();
13266        self
13267    }
13268
13269    /// Sets the value of [pod_ipv4_cidr_size][crate::model::NodePool::pod_ipv4_cidr_size].
13270    pub fn set_pod_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13271        self.pod_ipv4_cidr_size = v.into();
13272        self
13273    }
13274
13275    /// Sets the value of [upgrade_settings][crate::model::NodePool::upgrade_settings].
13276    pub fn set_upgrade_settings<
13277        T: std::convert::Into<std::option::Option<crate::model::node_pool::UpgradeSettings>>,
13278    >(
13279        mut self,
13280        v: T,
13281    ) -> Self {
13282        self.upgrade_settings = v.into();
13283        self
13284    }
13285
13286    /// Sets the value of [placement_policy][crate::model::NodePool::placement_policy].
13287    pub fn set_placement_policy<
13288        T: std::convert::Into<std::option::Option<crate::model::node_pool::PlacementPolicy>>,
13289    >(
13290        mut self,
13291        v: T,
13292    ) -> Self {
13293        self.placement_policy = v.into();
13294        self
13295    }
13296
13297    /// Sets the value of [update_info][crate::model::NodePool::update_info].
13298    pub fn set_update_info<
13299        T: std::convert::Into<std::option::Option<crate::model::node_pool::UpdateInfo>>,
13300    >(
13301        mut self,
13302        v: T,
13303    ) -> Self {
13304        self.update_info = v.into();
13305        self
13306    }
13307
13308    /// Sets the value of [etag][crate::model::NodePool::etag].
13309    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13310        self.etag = v.into();
13311        self
13312    }
13313
13314    /// Sets the value of [queued_provisioning][crate::model::NodePool::queued_provisioning].
13315    pub fn set_queued_provisioning<
13316        T: std::convert::Into<std::option::Option<crate::model::node_pool::QueuedProvisioning>>,
13317    >(
13318        mut self,
13319        v: T,
13320    ) -> Self {
13321        self.queued_provisioning = v.into();
13322        self
13323    }
13324
13325    /// Sets the value of [best_effort_provisioning][crate::model::NodePool::best_effort_provisioning].
13326    pub fn set_best_effort_provisioning<
13327        T: std::convert::Into<std::option::Option<crate::model::BestEffortProvisioning>>,
13328    >(
13329        mut self,
13330        v: T,
13331    ) -> Self {
13332        self.best_effort_provisioning = v.into();
13333        self
13334    }
13335}
13336
13337impl wkt::message::Message for NodePool {
13338    fn typename() -> &'static str {
13339        "type.googleapis.com/google.container.v1.NodePool"
13340    }
13341}
13342
13343/// Defines additional types related to [NodePool].
13344pub mod node_pool {
13345    #[allow(unused_imports)]
13346    use super::*;
13347
13348    /// These upgrade settings control the level of parallelism and the level of
13349    /// disruption caused by an upgrade.
13350    ///
13351    /// maxUnavailable controls the number of nodes that can be simultaneously
13352    /// unavailable.
13353    ///
13354    /// maxSurge controls the number of additional nodes that can be added to the
13355    /// node pool temporarily for the time of the upgrade to increase the number of
13356    /// available nodes.
13357    ///
13358    /// (maxUnavailable + maxSurge) determines the level of parallelism (how many
13359    /// nodes are being upgraded at the same time).
13360    ///
13361    /// Note: upgrades inevitably introduce some disruption since workloads need to
13362    /// be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0,
13363    /// this holds true. (Disruption stays within the limits of
13364    /// PodDisruptionBudget, if it is configured.)
13365    ///
13366    /// Consider a hypothetical node pool with 5 nodes having maxSurge=2,
13367    /// maxUnavailable=1. This means the upgrade process upgrades 3 nodes
13368    /// simultaneously. It creates 2 additional (upgraded) nodes, then it brings
13369    /// down 3 old (not yet upgraded) nodes at the same time. This ensures that
13370    /// there are always at least 4 nodes available.
13371    ///
13372    /// These upgrade settings configure the upgrade strategy for the node pool.
13373    /// Use strategy to switch between the strategies applied to the node pool.
13374    ///
13375    /// If the strategy is ROLLING, use max_surge and max_unavailable to control
13376    /// the level of parallelism and the level of disruption caused by upgrade.
13377    ///
13378    /// . maxSurge controls the number of additional nodes that can be added to
13379    ///   the node pool temporarily for the time of the upgrade to increase the
13380    ///   number of available nodes.
13381    /// . maxUnavailable controls the number of nodes that can be simultaneously
13382    ///   unavailable.
13383    /// . (maxUnavailable + maxSurge) determines the level of parallelism (how
13384    ///   many nodes are being upgraded at the same time).
13385    ///
13386    /// If the strategy is BLUE_GREEN, use blue_green_settings to configure the
13387    /// blue-green upgrade related settings.
13388    ///
13389    /// . standard_rollout_policy is the default policy. The policy is used to
13390    ///   control the way blue pool gets drained. The draining is executed in the
13391    ///   batch mode. The batch size could be specified as either percentage of the
13392    ///   node pool size or the number of nodes. batch_soak_duration is the soak
13393    ///   time after each batch gets drained.
13394    /// . node_pool_soak_duration is the soak time after all blue nodes are
13395    ///   drained. After this period, the blue pool nodes will be deleted.
13396    #[serde_with::serde_as]
13397    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13398    #[serde(default, rename_all = "camelCase")]
13399    #[non_exhaustive]
13400    pub struct UpgradeSettings {
13401        /// The maximum number of nodes that can be created beyond the current size
13402        /// of the node pool during the upgrade process.
13403        #[serde(skip_serializing_if = "wkt::internal::is_default")]
13404        pub max_surge: i32,
13405
13406        /// The maximum number of nodes that can be simultaneously unavailable during
13407        /// the upgrade process. A node is considered available if its status is
13408        /// Ready.
13409        #[serde(skip_serializing_if = "wkt::internal::is_default")]
13410        pub max_unavailable: i32,
13411
13412        /// Update strategy of the node pool.
13413        #[serde(skip_serializing_if = "std::option::Option::is_none")]
13414        pub strategy: std::option::Option<crate::model::NodePoolUpdateStrategy>,
13415
13416        /// Settings for blue-green upgrade strategy.
13417        #[serde(skip_serializing_if = "std::option::Option::is_none")]
13418        pub blue_green_settings: std::option::Option<crate::model::BlueGreenSettings>,
13419
13420        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13421        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13422    }
13423
13424    impl UpgradeSettings {
13425        pub fn new() -> Self {
13426            std::default::Default::default()
13427        }
13428
13429        /// Sets the value of [max_surge][crate::model::node_pool::UpgradeSettings::max_surge].
13430        pub fn set_max_surge<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13431            self.max_surge = v.into();
13432            self
13433        }
13434
13435        /// Sets the value of [max_unavailable][crate::model::node_pool::UpgradeSettings::max_unavailable].
13436        pub fn set_max_unavailable<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13437            self.max_unavailable = v.into();
13438            self
13439        }
13440
13441        /// Sets the value of [strategy][crate::model::node_pool::UpgradeSettings::strategy].
13442        pub fn set_strategy<
13443            T: std::convert::Into<std::option::Option<crate::model::NodePoolUpdateStrategy>>,
13444        >(
13445            mut self,
13446            v: T,
13447        ) -> Self {
13448            self.strategy = v.into();
13449            self
13450        }
13451
13452        /// Sets the value of [blue_green_settings][crate::model::node_pool::UpgradeSettings::blue_green_settings].
13453        pub fn set_blue_green_settings<
13454            T: std::convert::Into<std::option::Option<crate::model::BlueGreenSettings>>,
13455        >(
13456            mut self,
13457            v: T,
13458        ) -> Self {
13459            self.blue_green_settings = v.into();
13460            self
13461        }
13462    }
13463
13464    impl wkt::message::Message for UpgradeSettings {
13465        fn typename() -> &'static str {
13466            "type.googleapis.com/google.container.v1.NodePool.UpgradeSettings"
13467        }
13468    }
13469
13470    /// UpdateInfo contains resource (instance groups, etc), status and other
13471    /// intermediate information relevant to a node pool upgrade.
13472    #[serde_with::serde_as]
13473    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13474    #[serde(default, rename_all = "camelCase")]
13475    #[non_exhaustive]
13476    pub struct UpdateInfo {
13477        /// Information of a blue-green upgrade.
13478        #[serde(skip_serializing_if = "std::option::Option::is_none")]
13479        pub blue_green_info:
13480            std::option::Option<crate::model::node_pool::update_info::BlueGreenInfo>,
13481
13482        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13483        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13484    }
13485
13486    impl UpdateInfo {
13487        pub fn new() -> Self {
13488            std::default::Default::default()
13489        }
13490
13491        /// Sets the value of [blue_green_info][crate::model::node_pool::UpdateInfo::blue_green_info].
13492        pub fn set_blue_green_info<
13493            T: std::convert::Into<
13494                    std::option::Option<crate::model::node_pool::update_info::BlueGreenInfo>,
13495                >,
13496        >(
13497            mut self,
13498            v: T,
13499        ) -> Self {
13500            self.blue_green_info = v.into();
13501            self
13502        }
13503    }
13504
13505    impl wkt::message::Message for UpdateInfo {
13506        fn typename() -> &'static str {
13507            "type.googleapis.com/google.container.v1.NodePool.UpdateInfo"
13508        }
13509    }
13510
13511    /// Defines additional types related to [UpdateInfo].
13512    pub mod update_info {
13513        #[allow(unused_imports)]
13514        use super::*;
13515
13516        /// Information relevant to blue-green upgrade.
13517        #[serde_with::serde_as]
13518        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13519        #[serde(default, rename_all = "camelCase")]
13520        #[non_exhaustive]
13521        pub struct BlueGreenInfo {
13522            /// Current blue-green upgrade phase.
13523            pub phase: crate::model::node_pool::update_info::blue_green_info::Phase,
13524
13525            /// The resource URLs of the [managed instance groups]
13526            /// (/compute/docs/instance-groups/creating-groups-of-managed-instances)
13527            /// associated with blue pool.
13528            #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13529            pub blue_instance_group_urls: std::vec::Vec<std::string::String>,
13530
13531            /// The resource URLs of the [managed instance groups]
13532            /// (/compute/docs/instance-groups/creating-groups-of-managed-instances)
13533            /// associated with green pool.
13534            #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13535            pub green_instance_group_urls: std::vec::Vec<std::string::String>,
13536
13537            /// Time to start deleting blue pool to complete blue-green upgrade,
13538            /// in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
13539            #[serde(skip_serializing_if = "std::string::String::is_empty")]
13540            pub blue_pool_deletion_start_time: std::string::String,
13541
13542            /// Version of green pool.
13543            #[serde(skip_serializing_if = "std::string::String::is_empty")]
13544            pub green_pool_version: std::string::String,
13545
13546            #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13547            _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13548        }
13549
13550        impl BlueGreenInfo {
13551            pub fn new() -> Self {
13552                std::default::Default::default()
13553            }
13554
13555            /// Sets the value of [phase][crate::model::node_pool::update_info::BlueGreenInfo::phase].
13556            pub fn set_phase<
13557                T: std::convert::Into<crate::model::node_pool::update_info::blue_green_info::Phase>,
13558            >(
13559                mut self,
13560                v: T,
13561            ) -> Self {
13562                self.phase = v.into();
13563                self
13564            }
13565
13566            /// Sets the value of [blue_instance_group_urls][crate::model::node_pool::update_info::BlueGreenInfo::blue_instance_group_urls].
13567            pub fn set_blue_instance_group_urls<T, V>(mut self, v: T) -> Self
13568            where
13569                T: std::iter::IntoIterator<Item = V>,
13570                V: std::convert::Into<std::string::String>,
13571            {
13572                use std::iter::Iterator;
13573                self.blue_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
13574                self
13575            }
13576
13577            /// Sets the value of [green_instance_group_urls][crate::model::node_pool::update_info::BlueGreenInfo::green_instance_group_urls].
13578            pub fn set_green_instance_group_urls<T, V>(mut self, v: T) -> Self
13579            where
13580                T: std::iter::IntoIterator<Item = V>,
13581                V: std::convert::Into<std::string::String>,
13582            {
13583                use std::iter::Iterator;
13584                self.green_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
13585                self
13586            }
13587
13588            /// Sets the value of [blue_pool_deletion_start_time][crate::model::node_pool::update_info::BlueGreenInfo::blue_pool_deletion_start_time].
13589            pub fn set_blue_pool_deletion_start_time<T: std::convert::Into<std::string::String>>(
13590                mut self,
13591                v: T,
13592            ) -> Self {
13593                self.blue_pool_deletion_start_time = v.into();
13594                self
13595            }
13596
13597            /// Sets the value of [green_pool_version][crate::model::node_pool::update_info::BlueGreenInfo::green_pool_version].
13598            pub fn set_green_pool_version<T: std::convert::Into<std::string::String>>(
13599                mut self,
13600                v: T,
13601            ) -> Self {
13602                self.green_pool_version = v.into();
13603                self
13604            }
13605        }
13606
13607        impl wkt::message::Message for BlueGreenInfo {
13608            fn typename() -> &'static str {
13609                "type.googleapis.com/google.container.v1.NodePool.UpdateInfo.BlueGreenInfo"
13610            }
13611        }
13612
13613        /// Defines additional types related to [BlueGreenInfo].
13614        pub mod blue_green_info {
13615            #[allow(unused_imports)]
13616            use super::*;
13617
13618            /// Phase represents the different stages blue-green upgrade is running in.
13619            ///
13620            /// # Working with unknown values
13621            ///
13622            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13623            /// additional enum variants at any time. Adding new variants is not considered
13624            /// a breaking change. Applications should write their code in anticipation of:
13625            ///
13626            /// - New values appearing in future releases of the client library, **and**
13627            /// - New values received dynamically, without application changes.
13628            ///
13629            /// Please consult the [Working with enums] section in the user guide for some
13630            /// guidelines.
13631            ///
13632            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13633            #[derive(Clone, Debug, PartialEq)]
13634            #[non_exhaustive]
13635            pub enum Phase {
13636                /// Unspecified phase.
13637                Unspecified,
13638                /// blue-green upgrade has been initiated.
13639                UpdateStarted,
13640                /// Start creating green pool nodes.
13641                CreatingGreenPool,
13642                /// Start cordoning blue pool nodes.
13643                CordoningBluePool,
13644                /// Start draining blue pool nodes.
13645                DrainingBluePool,
13646                /// Start soaking time after draining entire blue pool.
13647                NodePoolSoaking,
13648                /// Start deleting blue nodes.
13649                DeletingBluePool,
13650                /// Rollback has been initiated.
13651                RollbackStarted,
13652                /// If set, the enum was initialized with an unknown value.
13653                ///
13654                /// Applications can examine the value using [Phase::value] or
13655                /// [Phase::name].
13656                UnknownValue(phase::UnknownValue),
13657            }
13658
13659            #[doc(hidden)]
13660            pub mod phase {
13661                #[allow(unused_imports)]
13662                use super::*;
13663                #[derive(Clone, Debug, PartialEq)]
13664                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13665            }
13666
13667            impl Phase {
13668                /// Gets the enum value.
13669                ///
13670                /// Returns `None` if the enum contains an unknown value deserialized from
13671                /// the string representation of enums.
13672                pub fn value(&self) -> std::option::Option<i32> {
13673                    match self {
13674                        Self::Unspecified => std::option::Option::Some(0),
13675                        Self::UpdateStarted => std::option::Option::Some(1),
13676                        Self::CreatingGreenPool => std::option::Option::Some(2),
13677                        Self::CordoningBluePool => std::option::Option::Some(3),
13678                        Self::DrainingBluePool => std::option::Option::Some(4),
13679                        Self::NodePoolSoaking => std::option::Option::Some(5),
13680                        Self::DeletingBluePool => std::option::Option::Some(6),
13681                        Self::RollbackStarted => std::option::Option::Some(7),
13682                        Self::UnknownValue(u) => u.0.value(),
13683                    }
13684                }
13685
13686                /// Gets the enum value as a string.
13687                ///
13688                /// Returns `None` if the enum contains an unknown value deserialized from
13689                /// the integer representation of enums.
13690                pub fn name(&self) -> std::option::Option<&str> {
13691                    match self {
13692                        Self::Unspecified => std::option::Option::Some("PHASE_UNSPECIFIED"),
13693                        Self::UpdateStarted => std::option::Option::Some("UPDATE_STARTED"),
13694                        Self::CreatingGreenPool => std::option::Option::Some("CREATING_GREEN_POOL"),
13695                        Self::CordoningBluePool => std::option::Option::Some("CORDONING_BLUE_POOL"),
13696                        Self::DrainingBluePool => std::option::Option::Some("DRAINING_BLUE_POOL"),
13697                        Self::NodePoolSoaking => std::option::Option::Some("NODE_POOL_SOAKING"),
13698                        Self::DeletingBluePool => std::option::Option::Some("DELETING_BLUE_POOL"),
13699                        Self::RollbackStarted => std::option::Option::Some("ROLLBACK_STARTED"),
13700                        Self::UnknownValue(u) => u.0.name(),
13701                    }
13702                }
13703            }
13704
13705            impl std::default::Default for Phase {
13706                fn default() -> Self {
13707                    use std::convert::From;
13708                    Self::from(0)
13709                }
13710            }
13711
13712            impl std::fmt::Display for Phase {
13713                fn fmt(
13714                    &self,
13715                    f: &mut std::fmt::Formatter<'_>,
13716                ) -> std::result::Result<(), std::fmt::Error> {
13717                    wkt::internal::display_enum(f, self.name(), self.value())
13718                }
13719            }
13720
13721            impl std::convert::From<i32> for Phase {
13722                fn from(value: i32) -> Self {
13723                    match value {
13724                        0 => Self::Unspecified,
13725                        1 => Self::UpdateStarted,
13726                        2 => Self::CreatingGreenPool,
13727                        3 => Self::CordoningBluePool,
13728                        4 => Self::DrainingBluePool,
13729                        5 => Self::NodePoolSoaking,
13730                        6 => Self::DeletingBluePool,
13731                        7 => Self::RollbackStarted,
13732                        _ => Self::UnknownValue(phase::UnknownValue(
13733                            wkt::internal::UnknownEnumValue::Integer(value),
13734                        )),
13735                    }
13736                }
13737            }
13738
13739            impl std::convert::From<&str> for Phase {
13740                fn from(value: &str) -> Self {
13741                    use std::string::ToString;
13742                    match value {
13743                        "PHASE_UNSPECIFIED" => Self::Unspecified,
13744                        "UPDATE_STARTED" => Self::UpdateStarted,
13745                        "CREATING_GREEN_POOL" => Self::CreatingGreenPool,
13746                        "CORDONING_BLUE_POOL" => Self::CordoningBluePool,
13747                        "DRAINING_BLUE_POOL" => Self::DrainingBluePool,
13748                        "NODE_POOL_SOAKING" => Self::NodePoolSoaking,
13749                        "DELETING_BLUE_POOL" => Self::DeletingBluePool,
13750                        "ROLLBACK_STARTED" => Self::RollbackStarted,
13751                        _ => Self::UnknownValue(phase::UnknownValue(
13752                            wkt::internal::UnknownEnumValue::String(value.to_string()),
13753                        )),
13754                    }
13755                }
13756            }
13757
13758            impl serde::ser::Serialize for Phase {
13759                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13760                where
13761                    S: serde::Serializer,
13762                {
13763                    match self {
13764                        Self::Unspecified => serializer.serialize_i32(0),
13765                        Self::UpdateStarted => serializer.serialize_i32(1),
13766                        Self::CreatingGreenPool => serializer.serialize_i32(2),
13767                        Self::CordoningBluePool => serializer.serialize_i32(3),
13768                        Self::DrainingBluePool => serializer.serialize_i32(4),
13769                        Self::NodePoolSoaking => serializer.serialize_i32(5),
13770                        Self::DeletingBluePool => serializer.serialize_i32(6),
13771                        Self::RollbackStarted => serializer.serialize_i32(7),
13772                        Self::UnknownValue(u) => u.0.serialize(serializer),
13773                    }
13774                }
13775            }
13776
13777            impl<'de> serde::de::Deserialize<'de> for Phase {
13778                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13779                where
13780                    D: serde::Deserializer<'de>,
13781                {
13782                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<Phase>::new(
13783                        ".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase",
13784                    ))
13785                }
13786            }
13787        }
13788    }
13789
13790    /// PlacementPolicy defines the placement policy used by the node pool.
13791    #[serde_with::serde_as]
13792    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13793    #[serde(default, rename_all = "camelCase")]
13794    #[non_exhaustive]
13795    pub struct PlacementPolicy {
13796        /// The type of placement.
13797        #[serde(rename = "type")]
13798        pub r#type: crate::model::node_pool::placement_policy::Type,
13799
13800        /// Optional. TPU placement topology for pod slice node pool.
13801        /// <https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies>
13802        #[serde(skip_serializing_if = "std::string::String::is_empty")]
13803        pub tpu_topology: std::string::String,
13804
13805        /// If set, refers to the name of a custom resource policy supplied by the
13806        /// user. The resource policy must be in the same project and region as the
13807        /// node pool. If not found, InvalidArgument error is returned.
13808        #[serde(skip_serializing_if = "std::string::String::is_empty")]
13809        pub policy_name: std::string::String,
13810
13811        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13812        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13813    }
13814
13815    impl PlacementPolicy {
13816        pub fn new() -> Self {
13817            std::default::Default::default()
13818        }
13819
13820        /// Sets the value of [r#type][crate::model::node_pool::PlacementPolicy::type].
13821        pub fn set_type<T: std::convert::Into<crate::model::node_pool::placement_policy::Type>>(
13822            mut self,
13823            v: T,
13824        ) -> Self {
13825            self.r#type = v.into();
13826            self
13827        }
13828
13829        /// Sets the value of [tpu_topology][crate::model::node_pool::PlacementPolicy::tpu_topology].
13830        pub fn set_tpu_topology<T: std::convert::Into<std::string::String>>(
13831            mut self,
13832            v: T,
13833        ) -> Self {
13834            self.tpu_topology = v.into();
13835            self
13836        }
13837
13838        /// Sets the value of [policy_name][crate::model::node_pool::PlacementPolicy::policy_name].
13839        pub fn set_policy_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13840            self.policy_name = v.into();
13841            self
13842        }
13843    }
13844
13845    impl wkt::message::Message for PlacementPolicy {
13846        fn typename() -> &'static str {
13847            "type.googleapis.com/google.container.v1.NodePool.PlacementPolicy"
13848        }
13849    }
13850
13851    /// Defines additional types related to [PlacementPolicy].
13852    pub mod placement_policy {
13853        #[allow(unused_imports)]
13854        use super::*;
13855
13856        /// Type defines the type of placement policy.
13857        ///
13858        /// # Working with unknown values
13859        ///
13860        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13861        /// additional enum variants at any time. Adding new variants is not considered
13862        /// a breaking change. Applications should write their code in anticipation of:
13863        ///
13864        /// - New values appearing in future releases of the client library, **and**
13865        /// - New values received dynamically, without application changes.
13866        ///
13867        /// Please consult the [Working with enums] section in the user guide for some
13868        /// guidelines.
13869        ///
13870        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13871        #[derive(Clone, Debug, PartialEq)]
13872        #[non_exhaustive]
13873        pub enum Type {
13874            /// TYPE_UNSPECIFIED specifies no requirements on nodes
13875            /// placement.
13876            Unspecified,
13877            /// COMPACT specifies node placement in the same availability domain to
13878            /// ensure low communication latency.
13879            Compact,
13880            /// If set, the enum was initialized with an unknown value.
13881            ///
13882            /// Applications can examine the value using [Type::value] or
13883            /// [Type::name].
13884            UnknownValue(r#type::UnknownValue),
13885        }
13886
13887        #[doc(hidden)]
13888        pub mod r#type {
13889            #[allow(unused_imports)]
13890            use super::*;
13891            #[derive(Clone, Debug, PartialEq)]
13892            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13893        }
13894
13895        impl Type {
13896            /// Gets the enum value.
13897            ///
13898            /// Returns `None` if the enum contains an unknown value deserialized from
13899            /// the string representation of enums.
13900            pub fn value(&self) -> std::option::Option<i32> {
13901                match self {
13902                    Self::Unspecified => std::option::Option::Some(0),
13903                    Self::Compact => std::option::Option::Some(1),
13904                    Self::UnknownValue(u) => u.0.value(),
13905                }
13906            }
13907
13908            /// Gets the enum value as a string.
13909            ///
13910            /// Returns `None` if the enum contains an unknown value deserialized from
13911            /// the integer representation of enums.
13912            pub fn name(&self) -> std::option::Option<&str> {
13913                match self {
13914                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
13915                    Self::Compact => std::option::Option::Some("COMPACT"),
13916                    Self::UnknownValue(u) => u.0.name(),
13917                }
13918            }
13919        }
13920
13921        impl std::default::Default for Type {
13922            fn default() -> Self {
13923                use std::convert::From;
13924                Self::from(0)
13925            }
13926        }
13927
13928        impl std::fmt::Display for Type {
13929            fn fmt(
13930                &self,
13931                f: &mut std::fmt::Formatter<'_>,
13932            ) -> std::result::Result<(), std::fmt::Error> {
13933                wkt::internal::display_enum(f, self.name(), self.value())
13934            }
13935        }
13936
13937        impl std::convert::From<i32> for Type {
13938            fn from(value: i32) -> Self {
13939                match value {
13940                    0 => Self::Unspecified,
13941                    1 => Self::Compact,
13942                    _ => Self::UnknownValue(r#type::UnknownValue(
13943                        wkt::internal::UnknownEnumValue::Integer(value),
13944                    )),
13945                }
13946            }
13947        }
13948
13949        impl std::convert::From<&str> for Type {
13950            fn from(value: &str) -> Self {
13951                use std::string::ToString;
13952                match value {
13953                    "TYPE_UNSPECIFIED" => Self::Unspecified,
13954                    "COMPACT" => Self::Compact,
13955                    _ => Self::UnknownValue(r#type::UnknownValue(
13956                        wkt::internal::UnknownEnumValue::String(value.to_string()),
13957                    )),
13958                }
13959            }
13960        }
13961
13962        impl serde::ser::Serialize for Type {
13963            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13964            where
13965                S: serde::Serializer,
13966            {
13967                match self {
13968                    Self::Unspecified => serializer.serialize_i32(0),
13969                    Self::Compact => serializer.serialize_i32(1),
13970                    Self::UnknownValue(u) => u.0.serialize(serializer),
13971                }
13972            }
13973        }
13974
13975        impl<'de> serde::de::Deserialize<'de> for Type {
13976            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13977            where
13978                D: serde::Deserializer<'de>,
13979            {
13980                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
13981                    ".google.container.v1.NodePool.PlacementPolicy.Type",
13982                ))
13983            }
13984        }
13985    }
13986
13987    /// QueuedProvisioning defines the queued provisioning used by the node pool.
13988    #[serde_with::serde_as]
13989    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13990    #[serde(default, rename_all = "camelCase")]
13991    #[non_exhaustive]
13992    pub struct QueuedProvisioning {
13993        /// Denotes that this nodepool is QRM specific, meaning nodes can be only
13994        /// obtained through queuing via the Cluster Autoscaler ProvisioningRequest
13995        /// API.
13996        #[serde(skip_serializing_if = "wkt::internal::is_default")]
13997        pub enabled: bool,
13998
13999        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14000        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14001    }
14002
14003    impl QueuedProvisioning {
14004        pub fn new() -> Self {
14005            std::default::Default::default()
14006        }
14007
14008        /// Sets the value of [enabled][crate::model::node_pool::QueuedProvisioning::enabled].
14009        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14010            self.enabled = v.into();
14011            self
14012        }
14013    }
14014
14015    impl wkt::message::Message for QueuedProvisioning {
14016        fn typename() -> &'static str {
14017            "type.googleapis.com/google.container.v1.NodePool.QueuedProvisioning"
14018        }
14019    }
14020
14021    /// The current status of the node pool instance.
14022    ///
14023    /// # Working with unknown values
14024    ///
14025    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14026    /// additional enum variants at any time. Adding new variants is not considered
14027    /// a breaking change. Applications should write their code in anticipation of:
14028    ///
14029    /// - New values appearing in future releases of the client library, **and**
14030    /// - New values received dynamically, without application changes.
14031    ///
14032    /// Please consult the [Working with enums] section in the user guide for some
14033    /// guidelines.
14034    ///
14035    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14036    #[derive(Clone, Debug, PartialEq)]
14037    #[non_exhaustive]
14038    pub enum Status {
14039        /// Not set.
14040        Unspecified,
14041        /// The PROVISIONING state indicates the node pool is being created.
14042        Provisioning,
14043        /// The RUNNING state indicates the node pool has been created
14044        /// and is fully usable.
14045        Running,
14046        /// The RUNNING_WITH_ERROR state indicates the node pool has been created
14047        /// and is partially usable. Some error state has occurred and some
14048        /// functionality may be impaired. Customer may need to reissue a request
14049        /// or trigger a new update.
14050        RunningWithError,
14051        /// The RECONCILING state indicates that some work is actively being done on
14052        /// the node pool, such as upgrading node software. Details can
14053        /// be found in the `statusMessage` field.
14054        Reconciling,
14055        /// The STOPPING state indicates the node pool is being deleted.
14056        Stopping,
14057        /// The ERROR state indicates the node pool may be unusable. Details
14058        /// can be found in the `statusMessage` field.
14059        Error,
14060        /// If set, the enum was initialized with an unknown value.
14061        ///
14062        /// Applications can examine the value using [Status::value] or
14063        /// [Status::name].
14064        UnknownValue(status::UnknownValue),
14065    }
14066
14067    #[doc(hidden)]
14068    pub mod status {
14069        #[allow(unused_imports)]
14070        use super::*;
14071        #[derive(Clone, Debug, PartialEq)]
14072        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14073    }
14074
14075    impl Status {
14076        /// Gets the enum value.
14077        ///
14078        /// Returns `None` if the enum contains an unknown value deserialized from
14079        /// the string representation of enums.
14080        pub fn value(&self) -> std::option::Option<i32> {
14081            match self {
14082                Self::Unspecified => std::option::Option::Some(0),
14083                Self::Provisioning => std::option::Option::Some(1),
14084                Self::Running => std::option::Option::Some(2),
14085                Self::RunningWithError => std::option::Option::Some(3),
14086                Self::Reconciling => std::option::Option::Some(4),
14087                Self::Stopping => std::option::Option::Some(5),
14088                Self::Error => std::option::Option::Some(6),
14089                Self::UnknownValue(u) => u.0.value(),
14090            }
14091        }
14092
14093        /// Gets the enum value as a string.
14094        ///
14095        /// Returns `None` if the enum contains an unknown value deserialized from
14096        /// the integer representation of enums.
14097        pub fn name(&self) -> std::option::Option<&str> {
14098            match self {
14099                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
14100                Self::Provisioning => std::option::Option::Some("PROVISIONING"),
14101                Self::Running => std::option::Option::Some("RUNNING"),
14102                Self::RunningWithError => std::option::Option::Some("RUNNING_WITH_ERROR"),
14103                Self::Reconciling => std::option::Option::Some("RECONCILING"),
14104                Self::Stopping => std::option::Option::Some("STOPPING"),
14105                Self::Error => std::option::Option::Some("ERROR"),
14106                Self::UnknownValue(u) => u.0.name(),
14107            }
14108        }
14109    }
14110
14111    impl std::default::Default for Status {
14112        fn default() -> Self {
14113            use std::convert::From;
14114            Self::from(0)
14115        }
14116    }
14117
14118    impl std::fmt::Display for Status {
14119        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14120            wkt::internal::display_enum(f, self.name(), self.value())
14121        }
14122    }
14123
14124    impl std::convert::From<i32> for Status {
14125        fn from(value: i32) -> Self {
14126            match value {
14127                0 => Self::Unspecified,
14128                1 => Self::Provisioning,
14129                2 => Self::Running,
14130                3 => Self::RunningWithError,
14131                4 => Self::Reconciling,
14132                5 => Self::Stopping,
14133                6 => Self::Error,
14134                _ => Self::UnknownValue(status::UnknownValue(
14135                    wkt::internal::UnknownEnumValue::Integer(value),
14136                )),
14137            }
14138        }
14139    }
14140
14141    impl std::convert::From<&str> for Status {
14142        fn from(value: &str) -> Self {
14143            use std::string::ToString;
14144            match value {
14145                "STATUS_UNSPECIFIED" => Self::Unspecified,
14146                "PROVISIONING" => Self::Provisioning,
14147                "RUNNING" => Self::Running,
14148                "RUNNING_WITH_ERROR" => Self::RunningWithError,
14149                "RECONCILING" => Self::Reconciling,
14150                "STOPPING" => Self::Stopping,
14151                "ERROR" => Self::Error,
14152                _ => Self::UnknownValue(status::UnknownValue(
14153                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14154                )),
14155            }
14156        }
14157    }
14158
14159    impl serde::ser::Serialize for Status {
14160        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14161        where
14162            S: serde::Serializer,
14163        {
14164            match self {
14165                Self::Unspecified => serializer.serialize_i32(0),
14166                Self::Provisioning => serializer.serialize_i32(1),
14167                Self::Running => serializer.serialize_i32(2),
14168                Self::RunningWithError => serializer.serialize_i32(3),
14169                Self::Reconciling => serializer.serialize_i32(4),
14170                Self::Stopping => serializer.serialize_i32(5),
14171                Self::Error => serializer.serialize_i32(6),
14172                Self::UnknownValue(u) => u.0.serialize(serializer),
14173            }
14174        }
14175    }
14176
14177    impl<'de> serde::de::Deserialize<'de> for Status {
14178        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14179        where
14180            D: serde::Deserializer<'de>,
14181        {
14182            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
14183                ".google.container.v1.NodePool.Status",
14184            ))
14185        }
14186    }
14187}
14188
14189/// NodeManagement defines the set of node management services turned on for the
14190/// node pool.
14191#[serde_with::serde_as]
14192#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14193#[serde(default, rename_all = "camelCase")]
14194#[non_exhaustive]
14195pub struct NodeManagement {
14196    /// A flag that specifies whether node auto-upgrade is enabled for the node
14197    /// pool. If enabled, node auto-upgrade helps keep the nodes in your node pool
14198    /// up to date with the latest release version of Kubernetes.
14199    #[serde(skip_serializing_if = "wkt::internal::is_default")]
14200    pub auto_upgrade: bool,
14201
14202    /// A flag that specifies whether the node auto-repair is enabled for the node
14203    /// pool. If enabled, the nodes in this node pool will be monitored and, if
14204    /// they fail health checks too many times, an automatic repair action will be
14205    /// triggered.
14206    #[serde(skip_serializing_if = "wkt::internal::is_default")]
14207    pub auto_repair: bool,
14208
14209    /// Specifies the Auto Upgrade knobs for the node pool.
14210    #[serde(skip_serializing_if = "std::option::Option::is_none")]
14211    pub upgrade_options: std::option::Option<crate::model::AutoUpgradeOptions>,
14212
14213    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14214    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14215}
14216
14217impl NodeManagement {
14218    pub fn new() -> Self {
14219        std::default::Default::default()
14220    }
14221
14222    /// Sets the value of [auto_upgrade][crate::model::NodeManagement::auto_upgrade].
14223    pub fn set_auto_upgrade<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14224        self.auto_upgrade = v.into();
14225        self
14226    }
14227
14228    /// Sets the value of [auto_repair][crate::model::NodeManagement::auto_repair].
14229    pub fn set_auto_repair<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14230        self.auto_repair = v.into();
14231        self
14232    }
14233
14234    /// Sets the value of [upgrade_options][crate::model::NodeManagement::upgrade_options].
14235    pub fn set_upgrade_options<
14236        T: std::convert::Into<std::option::Option<crate::model::AutoUpgradeOptions>>,
14237    >(
14238        mut self,
14239        v: T,
14240    ) -> Self {
14241        self.upgrade_options = v.into();
14242        self
14243    }
14244}
14245
14246impl wkt::message::Message for NodeManagement {
14247    fn typename() -> &'static str {
14248        "type.googleapis.com/google.container.v1.NodeManagement"
14249    }
14250}
14251
14252/// Best effort provisioning.
14253#[serde_with::serde_as]
14254#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14255#[serde(default, rename_all = "camelCase")]
14256#[non_exhaustive]
14257pub struct BestEffortProvisioning {
14258    /// When this is enabled, cluster/node pool creations will ignore non-fatal
14259    /// errors like stockout to best provision as many nodes as possible right now
14260    /// and eventually bring up all target number of nodes
14261    #[serde(skip_serializing_if = "wkt::internal::is_default")]
14262    pub enabled: bool,
14263
14264    /// Minimum number of nodes to be provisioned to be considered as succeeded,
14265    /// and the rest of nodes will be provisioned gradually and eventually when
14266    /// stockout issue has been resolved.
14267    #[serde(skip_serializing_if = "wkt::internal::is_default")]
14268    pub min_provision_nodes: i32,
14269
14270    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14271    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14272}
14273
14274impl BestEffortProvisioning {
14275    pub fn new() -> Self {
14276        std::default::Default::default()
14277    }
14278
14279    /// Sets the value of [enabled][crate::model::BestEffortProvisioning::enabled].
14280    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14281        self.enabled = v.into();
14282        self
14283    }
14284
14285    /// Sets the value of [min_provision_nodes][crate::model::BestEffortProvisioning::min_provision_nodes].
14286    pub fn set_min_provision_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14287        self.min_provision_nodes = v.into();
14288        self
14289    }
14290}
14291
14292impl wkt::message::Message for BestEffortProvisioning {
14293    fn typename() -> &'static str {
14294        "type.googleapis.com/google.container.v1.BestEffortProvisioning"
14295    }
14296}
14297
14298/// AutoUpgradeOptions defines the set of options for the user to control how
14299/// the Auto Upgrades will proceed.
14300#[serde_with::serde_as]
14301#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14302#[serde(default, rename_all = "camelCase")]
14303#[non_exhaustive]
14304pub struct AutoUpgradeOptions {
14305    /// Output only. This field is set when upgrades are about to commence
14306    /// with the approximate start time for the upgrades, in
14307    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
14308    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14309    pub auto_upgrade_start_time: std::string::String,
14310
14311    /// Output only. This field is set when upgrades are about to commence
14312    /// with the description of the upgrade.
14313    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14314    pub description: std::string::String,
14315
14316    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14317    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14318}
14319
14320impl AutoUpgradeOptions {
14321    pub fn new() -> Self {
14322        std::default::Default::default()
14323    }
14324
14325    /// Sets the value of [auto_upgrade_start_time][crate::model::AutoUpgradeOptions::auto_upgrade_start_time].
14326    pub fn set_auto_upgrade_start_time<T: std::convert::Into<std::string::String>>(
14327        mut self,
14328        v: T,
14329    ) -> Self {
14330        self.auto_upgrade_start_time = v.into();
14331        self
14332    }
14333
14334    /// Sets the value of [description][crate::model::AutoUpgradeOptions::description].
14335    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14336        self.description = v.into();
14337        self
14338    }
14339}
14340
14341impl wkt::message::Message for AutoUpgradeOptions {
14342    fn typename() -> &'static str {
14343        "type.googleapis.com/google.container.v1.AutoUpgradeOptions"
14344    }
14345}
14346
14347/// MaintenancePolicy defines the maintenance policy to be used for the cluster.
14348#[serde_with::serde_as]
14349#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14350#[serde(default, rename_all = "camelCase")]
14351#[non_exhaustive]
14352pub struct MaintenancePolicy {
14353    /// Specifies the maintenance window in which maintenance may be performed.
14354    #[serde(skip_serializing_if = "std::option::Option::is_none")]
14355    pub window: std::option::Option<crate::model::MaintenanceWindow>,
14356
14357    /// A hash identifying the version of this policy, so that updates to fields of
14358    /// the policy won't accidentally undo intermediate changes (and so that users
14359    /// of the API unaware of some fields won't accidentally remove other fields).
14360    /// Make a `get()` request to the cluster to get the current
14361    /// resource version and include it with requests to set the policy.
14362    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14363    pub resource_version: std::string::String,
14364
14365    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14366    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14367}
14368
14369impl MaintenancePolicy {
14370    pub fn new() -> Self {
14371        std::default::Default::default()
14372    }
14373
14374    /// Sets the value of [window][crate::model::MaintenancePolicy::window].
14375    pub fn set_window<
14376        T: std::convert::Into<std::option::Option<crate::model::MaintenanceWindow>>,
14377    >(
14378        mut self,
14379        v: T,
14380    ) -> Self {
14381        self.window = v.into();
14382        self
14383    }
14384
14385    /// Sets the value of [resource_version][crate::model::MaintenancePolicy::resource_version].
14386    pub fn set_resource_version<T: std::convert::Into<std::string::String>>(
14387        mut self,
14388        v: T,
14389    ) -> Self {
14390        self.resource_version = v.into();
14391        self
14392    }
14393}
14394
14395impl wkt::message::Message for MaintenancePolicy {
14396    fn typename() -> &'static str {
14397        "type.googleapis.com/google.container.v1.MaintenancePolicy"
14398    }
14399}
14400
14401/// MaintenanceWindow defines the maintenance window to be used for the cluster.
14402#[serde_with::serde_as]
14403#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14404#[serde(default, rename_all = "camelCase")]
14405#[non_exhaustive]
14406pub struct MaintenanceWindow {
14407    /// Exceptions to maintenance window. Non-emergency maintenance should not
14408    /// occur in these windows.
14409    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
14410    pub maintenance_exclusions:
14411        std::collections::HashMap<std::string::String, crate::model::TimeWindow>,
14412
14413    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
14414    pub policy: std::option::Option<crate::model::maintenance_window::Policy>,
14415
14416    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14417    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14418}
14419
14420impl MaintenanceWindow {
14421    pub fn new() -> Self {
14422        std::default::Default::default()
14423    }
14424
14425    /// Sets the value of [maintenance_exclusions][crate::model::MaintenanceWindow::maintenance_exclusions].
14426    pub fn set_maintenance_exclusions<T, K, V>(mut self, v: T) -> Self
14427    where
14428        T: std::iter::IntoIterator<Item = (K, V)>,
14429        K: std::convert::Into<std::string::String>,
14430        V: std::convert::Into<crate::model::TimeWindow>,
14431    {
14432        use std::iter::Iterator;
14433        self.maintenance_exclusions = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14434        self
14435    }
14436
14437    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy].
14438    ///
14439    /// Note that all the setters affecting `policy` are mutually
14440    /// exclusive.
14441    pub fn set_policy<
14442        T: std::convert::Into<std::option::Option<crate::model::maintenance_window::Policy>>,
14443    >(
14444        mut self,
14445        v: T,
14446    ) -> Self {
14447        self.policy = v.into();
14448        self
14449    }
14450
14451    /// The value of [policy][crate::model::MaintenanceWindow::policy]
14452    /// if it holds a `DailyMaintenanceWindow`, `None` if the field is not set or
14453    /// holds a different branch.
14454    pub fn daily_maintenance_window(
14455        &self,
14456    ) -> std::option::Option<&std::boxed::Box<crate::model::DailyMaintenanceWindow>> {
14457        #[allow(unreachable_patterns)]
14458        self.policy.as_ref().and_then(|v| match v {
14459            crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v) => {
14460                std::option::Option::Some(v)
14461            }
14462            _ => std::option::Option::None,
14463        })
14464    }
14465
14466    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy]
14467    /// to hold a `DailyMaintenanceWindow`.
14468    ///
14469    /// Note that all the setters affecting `policy` are
14470    /// mutually exclusive.
14471    pub fn set_daily_maintenance_window<
14472        T: std::convert::Into<std::boxed::Box<crate::model::DailyMaintenanceWindow>>,
14473    >(
14474        mut self,
14475        v: T,
14476    ) -> Self {
14477        self.policy = std::option::Option::Some(
14478            crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v.into()),
14479        );
14480        self
14481    }
14482
14483    /// The value of [policy][crate::model::MaintenanceWindow::policy]
14484    /// if it holds a `RecurringWindow`, `None` if the field is not set or
14485    /// holds a different branch.
14486    pub fn recurring_window(
14487        &self,
14488    ) -> std::option::Option<&std::boxed::Box<crate::model::RecurringTimeWindow>> {
14489        #[allow(unreachable_patterns)]
14490        self.policy.as_ref().and_then(|v| match v {
14491            crate::model::maintenance_window::Policy::RecurringWindow(v) => {
14492                std::option::Option::Some(v)
14493            }
14494            _ => std::option::Option::None,
14495        })
14496    }
14497
14498    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy]
14499    /// to hold a `RecurringWindow`.
14500    ///
14501    /// Note that all the setters affecting `policy` are
14502    /// mutually exclusive.
14503    pub fn set_recurring_window<
14504        T: std::convert::Into<std::boxed::Box<crate::model::RecurringTimeWindow>>,
14505    >(
14506        mut self,
14507        v: T,
14508    ) -> Self {
14509        self.policy = std::option::Option::Some(
14510            crate::model::maintenance_window::Policy::RecurringWindow(v.into()),
14511        );
14512        self
14513    }
14514}
14515
14516impl wkt::message::Message for MaintenanceWindow {
14517    fn typename() -> &'static str {
14518        "type.googleapis.com/google.container.v1.MaintenanceWindow"
14519    }
14520}
14521
14522/// Defines additional types related to [MaintenanceWindow].
14523pub mod maintenance_window {
14524    #[allow(unused_imports)]
14525    use super::*;
14526
14527    #[serde_with::serde_as]
14528    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
14529    #[serde(rename_all = "camelCase")]
14530    #[non_exhaustive]
14531    pub enum Policy {
14532        /// DailyMaintenanceWindow specifies a daily maintenance operation window.
14533        DailyMaintenanceWindow(std::boxed::Box<crate::model::DailyMaintenanceWindow>),
14534        /// RecurringWindow specifies some number of recurring time periods for
14535        /// maintenance to occur. The time windows may be overlapping. If no
14536        /// maintenance windows are set, maintenance can occur at any time.
14537        RecurringWindow(std::boxed::Box<crate::model::RecurringTimeWindow>),
14538    }
14539}
14540
14541/// Represents an arbitrary window of time.
14542#[serde_with::serde_as]
14543#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14544#[serde(default, rename_all = "camelCase")]
14545#[non_exhaustive]
14546pub struct TimeWindow {
14547    /// The time that the window first starts.
14548    #[serde(skip_serializing_if = "std::option::Option::is_none")]
14549    pub start_time: std::option::Option<wkt::Timestamp>,
14550
14551    /// The time that the window ends. The end time should take place after the
14552    /// start time.
14553    #[serde(skip_serializing_if = "std::option::Option::is_none")]
14554    pub end_time: std::option::Option<wkt::Timestamp>,
14555
14556    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
14557    pub options: std::option::Option<crate::model::time_window::Options>,
14558
14559    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14560    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14561}
14562
14563impl TimeWindow {
14564    pub fn new() -> Self {
14565        std::default::Default::default()
14566    }
14567
14568    /// Sets the value of [start_time][crate::model::TimeWindow::start_time].
14569    pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
14570        mut self,
14571        v: T,
14572    ) -> Self {
14573        self.start_time = v.into();
14574        self
14575    }
14576
14577    /// Sets the value of [end_time][crate::model::TimeWindow::end_time].
14578    pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
14579        mut self,
14580        v: T,
14581    ) -> Self {
14582        self.end_time = v.into();
14583        self
14584    }
14585
14586    /// Sets the value of [options][crate::model::TimeWindow::options].
14587    ///
14588    /// Note that all the setters affecting `options` are mutually
14589    /// exclusive.
14590    pub fn set_options<
14591        T: std::convert::Into<std::option::Option<crate::model::time_window::Options>>,
14592    >(
14593        mut self,
14594        v: T,
14595    ) -> Self {
14596        self.options = v.into();
14597        self
14598    }
14599
14600    /// The value of [options][crate::model::TimeWindow::options]
14601    /// if it holds a `MaintenanceExclusionOptions`, `None` if the field is not set or
14602    /// holds a different branch.
14603    pub fn maintenance_exclusion_options(
14604        &self,
14605    ) -> std::option::Option<&std::boxed::Box<crate::model::MaintenanceExclusionOptions>> {
14606        #[allow(unreachable_patterns)]
14607        self.options.as_ref().and_then(|v| match v {
14608            crate::model::time_window::Options::MaintenanceExclusionOptions(v) => {
14609                std::option::Option::Some(v)
14610            }
14611            _ => std::option::Option::None,
14612        })
14613    }
14614
14615    /// Sets the value of [options][crate::model::TimeWindow::options]
14616    /// to hold a `MaintenanceExclusionOptions`.
14617    ///
14618    /// Note that all the setters affecting `options` are
14619    /// mutually exclusive.
14620    pub fn set_maintenance_exclusion_options<
14621        T: std::convert::Into<std::boxed::Box<crate::model::MaintenanceExclusionOptions>>,
14622    >(
14623        mut self,
14624        v: T,
14625    ) -> Self {
14626        self.options = std::option::Option::Some(
14627            crate::model::time_window::Options::MaintenanceExclusionOptions(v.into()),
14628        );
14629        self
14630    }
14631}
14632
14633impl wkt::message::Message for TimeWindow {
14634    fn typename() -> &'static str {
14635        "type.googleapis.com/google.container.v1.TimeWindow"
14636    }
14637}
14638
14639/// Defines additional types related to [TimeWindow].
14640pub mod time_window {
14641    #[allow(unused_imports)]
14642    use super::*;
14643
14644    #[serde_with::serde_as]
14645    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
14646    #[serde(rename_all = "camelCase")]
14647    #[non_exhaustive]
14648    pub enum Options {
14649        /// MaintenanceExclusionOptions provides maintenance exclusion related
14650        /// options.
14651        MaintenanceExclusionOptions(std::boxed::Box<crate::model::MaintenanceExclusionOptions>),
14652    }
14653}
14654
14655/// Represents the Maintenance exclusion option.
14656#[serde_with::serde_as]
14657#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14658#[serde(default, rename_all = "camelCase")]
14659#[non_exhaustive]
14660pub struct MaintenanceExclusionOptions {
14661    /// Scope specifies the upgrade scope which upgrades are blocked by the
14662    /// exclusion.
14663    pub scope: crate::model::maintenance_exclusion_options::Scope,
14664
14665    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14666    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14667}
14668
14669impl MaintenanceExclusionOptions {
14670    pub fn new() -> Self {
14671        std::default::Default::default()
14672    }
14673
14674    /// Sets the value of [scope][crate::model::MaintenanceExclusionOptions::scope].
14675    pub fn set_scope<T: std::convert::Into<crate::model::maintenance_exclusion_options::Scope>>(
14676        mut self,
14677        v: T,
14678    ) -> Self {
14679        self.scope = v.into();
14680        self
14681    }
14682}
14683
14684impl wkt::message::Message for MaintenanceExclusionOptions {
14685    fn typename() -> &'static str {
14686        "type.googleapis.com/google.container.v1.MaintenanceExclusionOptions"
14687    }
14688}
14689
14690/// Defines additional types related to [MaintenanceExclusionOptions].
14691pub mod maintenance_exclusion_options {
14692    #[allow(unused_imports)]
14693    use super::*;
14694
14695    /// Scope of exclusion.
14696    ///
14697    /// # Working with unknown values
14698    ///
14699    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14700    /// additional enum variants at any time. Adding new variants is not considered
14701    /// a breaking change. Applications should write their code in anticipation of:
14702    ///
14703    /// - New values appearing in future releases of the client library, **and**
14704    /// - New values received dynamically, without application changes.
14705    ///
14706    /// Please consult the [Working with enums] section in the user guide for some
14707    /// guidelines.
14708    ///
14709    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14710    #[derive(Clone, Debug, PartialEq)]
14711    #[non_exhaustive]
14712    pub enum Scope {
14713        /// NO_UPGRADES excludes all upgrades, including patch upgrades and minor
14714        /// upgrades across control planes and nodes. This is the default exclusion
14715        /// behavior.
14716        NoUpgrades,
14717        /// NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only
14718        /// patches are allowed.
14719        NoMinorUpgrades,
14720        /// NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster,
14721        /// and also exclude all node pool upgrades. Only control
14722        /// plane patches are allowed.
14723        NoMinorOrNodeUpgrades,
14724        /// If set, the enum was initialized with an unknown value.
14725        ///
14726        /// Applications can examine the value using [Scope::value] or
14727        /// [Scope::name].
14728        UnknownValue(scope::UnknownValue),
14729    }
14730
14731    #[doc(hidden)]
14732    pub mod scope {
14733        #[allow(unused_imports)]
14734        use super::*;
14735        #[derive(Clone, Debug, PartialEq)]
14736        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14737    }
14738
14739    impl Scope {
14740        /// Gets the enum value.
14741        ///
14742        /// Returns `None` if the enum contains an unknown value deserialized from
14743        /// the string representation of enums.
14744        pub fn value(&self) -> std::option::Option<i32> {
14745            match self {
14746                Self::NoUpgrades => std::option::Option::Some(0),
14747                Self::NoMinorUpgrades => std::option::Option::Some(1),
14748                Self::NoMinorOrNodeUpgrades => std::option::Option::Some(2),
14749                Self::UnknownValue(u) => u.0.value(),
14750            }
14751        }
14752
14753        /// Gets the enum value as a string.
14754        ///
14755        /// Returns `None` if the enum contains an unknown value deserialized from
14756        /// the integer representation of enums.
14757        pub fn name(&self) -> std::option::Option<&str> {
14758            match self {
14759                Self::NoUpgrades => std::option::Option::Some("NO_UPGRADES"),
14760                Self::NoMinorUpgrades => std::option::Option::Some("NO_MINOR_UPGRADES"),
14761                Self::NoMinorOrNodeUpgrades => {
14762                    std::option::Option::Some("NO_MINOR_OR_NODE_UPGRADES")
14763                }
14764                Self::UnknownValue(u) => u.0.name(),
14765            }
14766        }
14767    }
14768
14769    impl std::default::Default for Scope {
14770        fn default() -> Self {
14771            use std::convert::From;
14772            Self::from(0)
14773        }
14774    }
14775
14776    impl std::fmt::Display for Scope {
14777        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14778            wkt::internal::display_enum(f, self.name(), self.value())
14779        }
14780    }
14781
14782    impl std::convert::From<i32> for Scope {
14783        fn from(value: i32) -> Self {
14784            match value {
14785                0 => Self::NoUpgrades,
14786                1 => Self::NoMinorUpgrades,
14787                2 => Self::NoMinorOrNodeUpgrades,
14788                _ => Self::UnknownValue(scope::UnknownValue(
14789                    wkt::internal::UnknownEnumValue::Integer(value),
14790                )),
14791            }
14792        }
14793    }
14794
14795    impl std::convert::From<&str> for Scope {
14796        fn from(value: &str) -> Self {
14797            use std::string::ToString;
14798            match value {
14799                "NO_UPGRADES" => Self::NoUpgrades,
14800                "NO_MINOR_UPGRADES" => Self::NoMinorUpgrades,
14801                "NO_MINOR_OR_NODE_UPGRADES" => Self::NoMinorOrNodeUpgrades,
14802                _ => Self::UnknownValue(scope::UnknownValue(
14803                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14804                )),
14805            }
14806        }
14807    }
14808
14809    impl serde::ser::Serialize for Scope {
14810        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14811        where
14812            S: serde::Serializer,
14813        {
14814            match self {
14815                Self::NoUpgrades => serializer.serialize_i32(0),
14816                Self::NoMinorUpgrades => serializer.serialize_i32(1),
14817                Self::NoMinorOrNodeUpgrades => serializer.serialize_i32(2),
14818                Self::UnknownValue(u) => u.0.serialize(serializer),
14819            }
14820        }
14821    }
14822
14823    impl<'de> serde::de::Deserialize<'de> for Scope {
14824        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14825        where
14826            D: serde::Deserializer<'de>,
14827        {
14828            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
14829                ".google.container.v1.MaintenanceExclusionOptions.Scope",
14830            ))
14831        }
14832    }
14833}
14834
14835/// Represents an arbitrary window of time that recurs.
14836#[serde_with::serde_as]
14837#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14838#[serde(default, rename_all = "camelCase")]
14839#[non_exhaustive]
14840pub struct RecurringTimeWindow {
14841    /// The window of the first recurrence.
14842    #[serde(skip_serializing_if = "std::option::Option::is_none")]
14843    pub window: std::option::Option<crate::model::TimeWindow>,
14844
14845    /// An RRULE (<https://tools.ietf.org/html/rfc5545#section-3.8.5.3>) for how
14846    /// this window reccurs. They go on for the span of time between the start and
14847    /// end time.
14848    ///
14849    /// For example, to have something repeat every weekday, you'd use:
14850    /// `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR`
14851    ///
14852    /// To repeat some window daily (equivalent to the DailyMaintenanceWindow):
14853    /// `FREQ=DAILY`
14854    ///
14855    /// For the first weekend of every month:
14856    /// `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU`
14857    ///
14858    /// This specifies how frequently the window starts. Eg, if you wanted to have
14859    /// a 9-5 UTC-4 window every weekday, you'd use something like:
14860    ///
14861    /// ```norust
14862    /// start time = 2019-01-01T09:00:00-0400
14863    /// end time = 2019-01-01T17:00:00-0400
14864    /// recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
14865    /// ```
14866    ///
14867    /// Windows can span multiple days. Eg, to make the window encompass every
14868    /// weekend from midnight Saturday till the last minute of Sunday UTC:
14869    ///
14870    /// ```norust
14871    /// start time = 2019-01-05T00:00:00Z
14872    /// end time = 2019-01-07T23:59:00Z
14873    /// recurrence = FREQ=WEEKLY;BYDAY=SA
14874    /// ```
14875    ///
14876    /// Note the start and end time's specific dates are largely arbitrary except
14877    /// to specify duration of the window and when it first starts.
14878    /// The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported.
14879    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14880    pub recurrence: std::string::String,
14881
14882    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14883    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14884}
14885
14886impl RecurringTimeWindow {
14887    pub fn new() -> Self {
14888        std::default::Default::default()
14889    }
14890
14891    /// Sets the value of [window][crate::model::RecurringTimeWindow::window].
14892    pub fn set_window<T: std::convert::Into<std::option::Option<crate::model::TimeWindow>>>(
14893        mut self,
14894        v: T,
14895    ) -> Self {
14896        self.window = v.into();
14897        self
14898    }
14899
14900    /// Sets the value of [recurrence][crate::model::RecurringTimeWindow::recurrence].
14901    pub fn set_recurrence<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14902        self.recurrence = v.into();
14903        self
14904    }
14905}
14906
14907impl wkt::message::Message for RecurringTimeWindow {
14908    fn typename() -> &'static str {
14909        "type.googleapis.com/google.container.v1.RecurringTimeWindow"
14910    }
14911}
14912
14913/// Time window specified for daily maintenance operations.
14914#[serde_with::serde_as]
14915#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14916#[serde(default, rename_all = "camelCase")]
14917#[non_exhaustive]
14918pub struct DailyMaintenanceWindow {
14919    /// Time within the maintenance window to start the maintenance operations.
14920    /// Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
14921    /// format "HH:MM", where HH : [00-23] and MM : [00-59] GMT.
14922    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14923    pub start_time: std::string::String,
14924
14925    /// Output only. Duration of the time window, automatically chosen to be
14926    /// smallest possible in the given scenario.
14927    /// Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
14928    /// format "PTnHnMnS".
14929    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14930    pub duration: std::string::String,
14931
14932    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14933    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14934}
14935
14936impl DailyMaintenanceWindow {
14937    pub fn new() -> Self {
14938        std::default::Default::default()
14939    }
14940
14941    /// Sets the value of [start_time][crate::model::DailyMaintenanceWindow::start_time].
14942    pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14943        self.start_time = v.into();
14944        self
14945    }
14946
14947    /// Sets the value of [duration][crate::model::DailyMaintenanceWindow::duration].
14948    pub fn set_duration<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14949        self.duration = v.into();
14950        self
14951    }
14952}
14953
14954impl wkt::message::Message for DailyMaintenanceWindow {
14955    fn typename() -> &'static str {
14956        "type.googleapis.com/google.container.v1.DailyMaintenanceWindow"
14957    }
14958}
14959
14960/// SetNodePoolManagementRequest sets the node management properties of a node
14961/// pool.
14962#[serde_with::serde_as]
14963#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14964#[serde(default, rename_all = "camelCase")]
14965#[non_exhaustive]
14966pub struct SetNodePoolManagementRequest {
14967    /// Deprecated. The Google Developers Console [project ID or project
14968    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14969    /// This field has been deprecated and replaced by the name field.
14970    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14971    #[deprecated]
14972    pub project_id: std::string::String,
14973
14974    /// Deprecated. The name of the Google Compute Engine
14975    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
14976    /// cluster resides. This field has been deprecated and replaced by the name
14977    /// field.
14978    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14979    #[deprecated]
14980    pub zone: std::string::String,
14981
14982    /// Deprecated. The name of the cluster to update.
14983    /// This field has been deprecated and replaced by the name field.
14984    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14985    #[deprecated]
14986    pub cluster_id: std::string::String,
14987
14988    /// Deprecated. The name of the node pool to update.
14989    /// This field has been deprecated and replaced by the name field.
14990    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14991    #[deprecated]
14992    pub node_pool_id: std::string::String,
14993
14994    /// Required. NodeManagement configuration for the node pool.
14995    #[serde(skip_serializing_if = "std::option::Option::is_none")]
14996    pub management: std::option::Option<crate::model::NodeManagement>,
14997
14998    /// The name (project, location, cluster, node pool id) of the node pool to set
14999    /// management properties. Specified in the format
15000    /// `projects/*/locations/*/clusters/*/nodePools/*`.
15001    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15002    pub name: std::string::String,
15003
15004    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15005    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15006}
15007
15008impl SetNodePoolManagementRequest {
15009    pub fn new() -> Self {
15010        std::default::Default::default()
15011    }
15012
15013    /// Sets the value of [project_id][crate::model::SetNodePoolManagementRequest::project_id].
15014    #[deprecated]
15015    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15016        self.project_id = v.into();
15017        self
15018    }
15019
15020    /// Sets the value of [zone][crate::model::SetNodePoolManagementRequest::zone].
15021    #[deprecated]
15022    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15023        self.zone = v.into();
15024        self
15025    }
15026
15027    /// Sets the value of [cluster_id][crate::model::SetNodePoolManagementRequest::cluster_id].
15028    #[deprecated]
15029    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15030        self.cluster_id = v.into();
15031        self
15032    }
15033
15034    /// Sets the value of [node_pool_id][crate::model::SetNodePoolManagementRequest::node_pool_id].
15035    #[deprecated]
15036    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15037        self.node_pool_id = v.into();
15038        self
15039    }
15040
15041    /// Sets the value of [management][crate::model::SetNodePoolManagementRequest::management].
15042    pub fn set_management<
15043        T: std::convert::Into<std::option::Option<crate::model::NodeManagement>>,
15044    >(
15045        mut self,
15046        v: T,
15047    ) -> Self {
15048        self.management = v.into();
15049        self
15050    }
15051
15052    /// Sets the value of [name][crate::model::SetNodePoolManagementRequest::name].
15053    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15054        self.name = v.into();
15055        self
15056    }
15057}
15058
15059impl wkt::message::Message for SetNodePoolManagementRequest {
15060    fn typename() -> &'static str {
15061        "type.googleapis.com/google.container.v1.SetNodePoolManagementRequest"
15062    }
15063}
15064
15065/// SetNodePoolSizeRequest sets the size of a node pool.
15066#[serde_with::serde_as]
15067#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15068#[serde(default, rename_all = "camelCase")]
15069#[non_exhaustive]
15070pub struct SetNodePoolSizeRequest {
15071    /// Deprecated. The Google Developers Console [project ID or project
15072    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15073    /// This field has been deprecated and replaced by the name field.
15074    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15075    #[deprecated]
15076    pub project_id: std::string::String,
15077
15078    /// Deprecated. The name of the Google Compute Engine
15079    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
15080    /// cluster resides. This field has been deprecated and replaced by the name
15081    /// field.
15082    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15083    #[deprecated]
15084    pub zone: std::string::String,
15085
15086    /// Deprecated. The name of the cluster to update.
15087    /// This field has been deprecated and replaced by the name field.
15088    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15089    #[deprecated]
15090    pub cluster_id: std::string::String,
15091
15092    /// Deprecated. The name of the node pool to update.
15093    /// This field has been deprecated and replaced by the name field.
15094    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15095    #[deprecated]
15096    pub node_pool_id: std::string::String,
15097
15098    /// Required. The desired node count for the pool.
15099    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15100    pub node_count: i32,
15101
15102    /// The name (project, location, cluster, node pool id) of the node pool to set
15103    /// size.
15104    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
15105    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15106    pub name: std::string::String,
15107
15108    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15109    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15110}
15111
15112impl SetNodePoolSizeRequest {
15113    pub fn new() -> Self {
15114        std::default::Default::default()
15115    }
15116
15117    /// Sets the value of [project_id][crate::model::SetNodePoolSizeRequest::project_id].
15118    #[deprecated]
15119    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15120        self.project_id = v.into();
15121        self
15122    }
15123
15124    /// Sets the value of [zone][crate::model::SetNodePoolSizeRequest::zone].
15125    #[deprecated]
15126    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15127        self.zone = v.into();
15128        self
15129    }
15130
15131    /// Sets the value of [cluster_id][crate::model::SetNodePoolSizeRequest::cluster_id].
15132    #[deprecated]
15133    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15134        self.cluster_id = v.into();
15135        self
15136    }
15137
15138    /// Sets the value of [node_pool_id][crate::model::SetNodePoolSizeRequest::node_pool_id].
15139    #[deprecated]
15140    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15141        self.node_pool_id = v.into();
15142        self
15143    }
15144
15145    /// Sets the value of [node_count][crate::model::SetNodePoolSizeRequest::node_count].
15146    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15147        self.node_count = v.into();
15148        self
15149    }
15150
15151    /// Sets the value of [name][crate::model::SetNodePoolSizeRequest::name].
15152    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15153        self.name = v.into();
15154        self
15155    }
15156}
15157
15158impl wkt::message::Message for SetNodePoolSizeRequest {
15159    fn typename() -> &'static str {
15160        "type.googleapis.com/google.container.v1.SetNodePoolSizeRequest"
15161    }
15162}
15163
15164/// CompleteNodePoolUpgradeRequest sets the name of target node pool to complete
15165/// upgrade.
15166#[serde_with::serde_as]
15167#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15168#[serde(default, rename_all = "camelCase")]
15169#[non_exhaustive]
15170pub struct CompleteNodePoolUpgradeRequest {
15171    /// The name (project, location, cluster, node pool id) of the node pool to
15172    /// complete upgrade.
15173    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
15174    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15175    pub name: std::string::String,
15176
15177    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15178    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15179}
15180
15181impl CompleteNodePoolUpgradeRequest {
15182    pub fn new() -> Self {
15183        std::default::Default::default()
15184    }
15185
15186    /// Sets the value of [name][crate::model::CompleteNodePoolUpgradeRequest::name].
15187    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15188        self.name = v.into();
15189        self
15190    }
15191}
15192
15193impl wkt::message::Message for CompleteNodePoolUpgradeRequest {
15194    fn typename() -> &'static str {
15195        "type.googleapis.com/google.container.v1.CompleteNodePoolUpgradeRequest"
15196    }
15197}
15198
15199/// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed
15200/// NodePool upgrade. This will be an no-op if the last upgrade successfully
15201/// completed.
15202#[serde_with::serde_as]
15203#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15204#[serde(default, rename_all = "camelCase")]
15205#[non_exhaustive]
15206pub struct RollbackNodePoolUpgradeRequest {
15207    /// Deprecated. The Google Developers Console [project ID or project
15208    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15209    /// This field has been deprecated and replaced by the name field.
15210    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15211    #[deprecated]
15212    pub project_id: std::string::String,
15213
15214    /// Deprecated. The name of the Google Compute Engine
15215    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
15216    /// cluster resides. This field has been deprecated and replaced by the name
15217    /// field.
15218    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15219    #[deprecated]
15220    pub zone: std::string::String,
15221
15222    /// Deprecated. The name of the cluster to rollback.
15223    /// This field has been deprecated and replaced by the name field.
15224    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15225    #[deprecated]
15226    pub cluster_id: std::string::String,
15227
15228    /// Deprecated. The name of the node pool to rollback.
15229    /// This field has been deprecated and replaced by the name field.
15230    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15231    #[deprecated]
15232    pub node_pool_id: std::string::String,
15233
15234    /// The name (project, location, cluster, node pool id) of the node poll to
15235    /// rollback upgrade.
15236    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
15237    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15238    pub name: std::string::String,
15239
15240    /// Option for rollback to ignore the PodDisruptionBudget.
15241    /// Default value is false.
15242    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15243    pub respect_pdb: bool,
15244
15245    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15246    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15247}
15248
15249impl RollbackNodePoolUpgradeRequest {
15250    pub fn new() -> Self {
15251        std::default::Default::default()
15252    }
15253
15254    /// Sets the value of [project_id][crate::model::RollbackNodePoolUpgradeRequest::project_id].
15255    #[deprecated]
15256    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15257        self.project_id = v.into();
15258        self
15259    }
15260
15261    /// Sets the value of [zone][crate::model::RollbackNodePoolUpgradeRequest::zone].
15262    #[deprecated]
15263    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15264        self.zone = v.into();
15265        self
15266    }
15267
15268    /// Sets the value of [cluster_id][crate::model::RollbackNodePoolUpgradeRequest::cluster_id].
15269    #[deprecated]
15270    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15271        self.cluster_id = v.into();
15272        self
15273    }
15274
15275    /// Sets the value of [node_pool_id][crate::model::RollbackNodePoolUpgradeRequest::node_pool_id].
15276    #[deprecated]
15277    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15278        self.node_pool_id = v.into();
15279        self
15280    }
15281
15282    /// Sets the value of [name][crate::model::RollbackNodePoolUpgradeRequest::name].
15283    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15284        self.name = v.into();
15285        self
15286    }
15287
15288    /// Sets the value of [respect_pdb][crate::model::RollbackNodePoolUpgradeRequest::respect_pdb].
15289    pub fn set_respect_pdb<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15290        self.respect_pdb = v.into();
15291        self
15292    }
15293}
15294
15295impl wkt::message::Message for RollbackNodePoolUpgradeRequest {
15296    fn typename() -> &'static str {
15297        "type.googleapis.com/google.container.v1.RollbackNodePoolUpgradeRequest"
15298    }
15299}
15300
15301/// ListNodePoolsResponse is the result of ListNodePoolsRequest.
15302#[serde_with::serde_as]
15303#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15304#[serde(default, rename_all = "camelCase")]
15305#[non_exhaustive]
15306pub struct ListNodePoolsResponse {
15307    /// A list of node pools for a cluster.
15308    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
15309    pub node_pools: std::vec::Vec<crate::model::NodePool>,
15310
15311    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15312    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15313}
15314
15315impl ListNodePoolsResponse {
15316    pub fn new() -> Self {
15317        std::default::Default::default()
15318    }
15319
15320    /// Sets the value of [node_pools][crate::model::ListNodePoolsResponse::node_pools].
15321    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
15322    where
15323        T: std::iter::IntoIterator<Item = V>,
15324        V: std::convert::Into<crate::model::NodePool>,
15325    {
15326        use std::iter::Iterator;
15327        self.node_pools = v.into_iter().map(|i| i.into()).collect();
15328        self
15329    }
15330}
15331
15332impl wkt::message::Message for ListNodePoolsResponse {
15333    fn typename() -> &'static str {
15334        "type.googleapis.com/google.container.v1.ListNodePoolsResponse"
15335    }
15336}
15337
15338/// ClusterAutoscaling contains global, per-cluster information
15339/// required by Cluster Autoscaler to automatically adjust
15340/// the size of the cluster and create/delete
15341/// node pools based on the current needs.
15342#[serde_with::serde_as]
15343#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15344#[serde(default, rename_all = "camelCase")]
15345#[non_exhaustive]
15346pub struct ClusterAutoscaling {
15347    /// Enables automatic node pool creation and deletion.
15348    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15349    pub enable_node_autoprovisioning: bool,
15350
15351    /// Contains global constraints regarding minimum and maximum
15352    /// amount of resources in the cluster.
15353    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
15354    pub resource_limits: std::vec::Vec<crate::model::ResourceLimit>,
15355
15356    /// Defines autoscaling behaviour.
15357    pub autoscaling_profile: crate::model::cluster_autoscaling::AutoscalingProfile,
15358
15359    /// AutoprovisioningNodePoolDefaults contains defaults for a node pool
15360    /// created by NAP.
15361    #[serde(skip_serializing_if = "std::option::Option::is_none")]
15362    pub autoprovisioning_node_pool_defaults:
15363        std::option::Option<crate::model::AutoprovisioningNodePoolDefaults>,
15364
15365    /// The list of Google Compute Engine
15366    /// [zones](https://cloud.google.com/compute/docs/zones#available) in which the
15367    /// NodePool's nodes can be created by NAP.
15368    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
15369    pub autoprovisioning_locations: std::vec::Vec<std::string::String>,
15370
15371    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15372    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15373}
15374
15375impl ClusterAutoscaling {
15376    pub fn new() -> Self {
15377        std::default::Default::default()
15378    }
15379
15380    /// Sets the value of [enable_node_autoprovisioning][crate::model::ClusterAutoscaling::enable_node_autoprovisioning].
15381    pub fn set_enable_node_autoprovisioning<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15382        self.enable_node_autoprovisioning = v.into();
15383        self
15384    }
15385
15386    /// Sets the value of [resource_limits][crate::model::ClusterAutoscaling::resource_limits].
15387    pub fn set_resource_limits<T, V>(mut self, v: T) -> Self
15388    where
15389        T: std::iter::IntoIterator<Item = V>,
15390        V: std::convert::Into<crate::model::ResourceLimit>,
15391    {
15392        use std::iter::Iterator;
15393        self.resource_limits = v.into_iter().map(|i| i.into()).collect();
15394        self
15395    }
15396
15397    /// Sets the value of [autoscaling_profile][crate::model::ClusterAutoscaling::autoscaling_profile].
15398    pub fn set_autoscaling_profile<
15399        T: std::convert::Into<crate::model::cluster_autoscaling::AutoscalingProfile>,
15400    >(
15401        mut self,
15402        v: T,
15403    ) -> Self {
15404        self.autoscaling_profile = v.into();
15405        self
15406    }
15407
15408    /// Sets the value of [autoprovisioning_node_pool_defaults][crate::model::ClusterAutoscaling::autoprovisioning_node_pool_defaults].
15409    pub fn set_autoprovisioning_node_pool_defaults<
15410        T: std::convert::Into<std::option::Option<crate::model::AutoprovisioningNodePoolDefaults>>,
15411    >(
15412        mut self,
15413        v: T,
15414    ) -> Self {
15415        self.autoprovisioning_node_pool_defaults = v.into();
15416        self
15417    }
15418
15419    /// Sets the value of [autoprovisioning_locations][crate::model::ClusterAutoscaling::autoprovisioning_locations].
15420    pub fn set_autoprovisioning_locations<T, V>(mut self, v: T) -> Self
15421    where
15422        T: std::iter::IntoIterator<Item = V>,
15423        V: std::convert::Into<std::string::String>,
15424    {
15425        use std::iter::Iterator;
15426        self.autoprovisioning_locations = v.into_iter().map(|i| i.into()).collect();
15427        self
15428    }
15429}
15430
15431impl wkt::message::Message for ClusterAutoscaling {
15432    fn typename() -> &'static str {
15433        "type.googleapis.com/google.container.v1.ClusterAutoscaling"
15434    }
15435}
15436
15437/// Defines additional types related to [ClusterAutoscaling].
15438pub mod cluster_autoscaling {
15439    #[allow(unused_imports)]
15440    use super::*;
15441
15442    /// Defines possible options for autoscaling_profile field.
15443    ///
15444    /// # Working with unknown values
15445    ///
15446    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15447    /// additional enum variants at any time. Adding new variants is not considered
15448    /// a breaking change. Applications should write their code in anticipation of:
15449    ///
15450    /// - New values appearing in future releases of the client library, **and**
15451    /// - New values received dynamically, without application changes.
15452    ///
15453    /// Please consult the [Working with enums] section in the user guide for some
15454    /// guidelines.
15455    ///
15456    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
15457    #[derive(Clone, Debug, PartialEq)]
15458    #[non_exhaustive]
15459    pub enum AutoscalingProfile {
15460        /// No change to autoscaling configuration.
15461        ProfileUnspecified,
15462        /// Prioritize optimizing utilization of resources.
15463        OptimizeUtilization,
15464        /// Use default (balanced) autoscaling configuration.
15465        Balanced,
15466        /// If set, the enum was initialized with an unknown value.
15467        ///
15468        /// Applications can examine the value using [AutoscalingProfile::value] or
15469        /// [AutoscalingProfile::name].
15470        UnknownValue(autoscaling_profile::UnknownValue),
15471    }
15472
15473    #[doc(hidden)]
15474    pub mod autoscaling_profile {
15475        #[allow(unused_imports)]
15476        use super::*;
15477        #[derive(Clone, Debug, PartialEq)]
15478        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15479    }
15480
15481    impl AutoscalingProfile {
15482        /// Gets the enum value.
15483        ///
15484        /// Returns `None` if the enum contains an unknown value deserialized from
15485        /// the string representation of enums.
15486        pub fn value(&self) -> std::option::Option<i32> {
15487            match self {
15488                Self::ProfileUnspecified => std::option::Option::Some(0),
15489                Self::OptimizeUtilization => std::option::Option::Some(1),
15490                Self::Balanced => std::option::Option::Some(2),
15491                Self::UnknownValue(u) => u.0.value(),
15492            }
15493        }
15494
15495        /// Gets the enum value as a string.
15496        ///
15497        /// Returns `None` if the enum contains an unknown value deserialized from
15498        /// the integer representation of enums.
15499        pub fn name(&self) -> std::option::Option<&str> {
15500            match self {
15501                Self::ProfileUnspecified => std::option::Option::Some("PROFILE_UNSPECIFIED"),
15502                Self::OptimizeUtilization => std::option::Option::Some("OPTIMIZE_UTILIZATION"),
15503                Self::Balanced => std::option::Option::Some("BALANCED"),
15504                Self::UnknownValue(u) => u.0.name(),
15505            }
15506        }
15507    }
15508
15509    impl std::default::Default for AutoscalingProfile {
15510        fn default() -> Self {
15511            use std::convert::From;
15512            Self::from(0)
15513        }
15514    }
15515
15516    impl std::fmt::Display for AutoscalingProfile {
15517        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15518            wkt::internal::display_enum(f, self.name(), self.value())
15519        }
15520    }
15521
15522    impl std::convert::From<i32> for AutoscalingProfile {
15523        fn from(value: i32) -> Self {
15524            match value {
15525                0 => Self::ProfileUnspecified,
15526                1 => Self::OptimizeUtilization,
15527                2 => Self::Balanced,
15528                _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
15529                    wkt::internal::UnknownEnumValue::Integer(value),
15530                )),
15531            }
15532        }
15533    }
15534
15535    impl std::convert::From<&str> for AutoscalingProfile {
15536        fn from(value: &str) -> Self {
15537            use std::string::ToString;
15538            match value {
15539                "PROFILE_UNSPECIFIED" => Self::ProfileUnspecified,
15540                "OPTIMIZE_UTILIZATION" => Self::OptimizeUtilization,
15541                "BALANCED" => Self::Balanced,
15542                _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
15543                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15544                )),
15545            }
15546        }
15547    }
15548
15549    impl serde::ser::Serialize for AutoscalingProfile {
15550        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15551        where
15552            S: serde::Serializer,
15553        {
15554            match self {
15555                Self::ProfileUnspecified => serializer.serialize_i32(0),
15556                Self::OptimizeUtilization => serializer.serialize_i32(1),
15557                Self::Balanced => serializer.serialize_i32(2),
15558                Self::UnknownValue(u) => u.0.serialize(serializer),
15559            }
15560        }
15561    }
15562
15563    impl<'de> serde::de::Deserialize<'de> for AutoscalingProfile {
15564        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15565        where
15566            D: serde::Deserializer<'de>,
15567        {
15568            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoscalingProfile>::new(
15569                ".google.container.v1.ClusterAutoscaling.AutoscalingProfile",
15570            ))
15571        }
15572    }
15573}
15574
15575/// AutoprovisioningNodePoolDefaults contains defaults for a node pool created
15576/// by NAP.
15577#[serde_with::serde_as]
15578#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15579#[serde(default, rename_all = "camelCase")]
15580#[non_exhaustive]
15581pub struct AutoprovisioningNodePoolDefaults {
15582    /// Scopes that are used by NAP when creating node pools.
15583    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
15584    pub oauth_scopes: std::vec::Vec<std::string::String>,
15585
15586    /// The Google Cloud Platform Service Account to be used by the node VMs.
15587    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15588    pub service_account: std::string::String,
15589
15590    /// Specifies the upgrade settings for NAP created node pools
15591    #[serde(skip_serializing_if = "std::option::Option::is_none")]
15592    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
15593
15594    /// Specifies the node management options for NAP created node-pools.
15595    #[serde(skip_serializing_if = "std::option::Option::is_none")]
15596    pub management: std::option::Option<crate::model::NodeManagement>,
15597
15598    /// Deprecated. Minimum CPU platform to be used for NAP created node pools.
15599    /// The instance may be scheduled on the specified or newer CPU platform.
15600    /// Applicable values are the friendly names of CPU platforms, such as
15601    /// minCpuPlatform: Intel Haswell or
15602    /// minCpuPlatform: Intel Sandy Bridge. For more
15603    /// information, read [how to specify min CPU
15604    /// platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
15605    /// This field is deprecated, min_cpu_platform should be specified using
15606    /// `cloud.google.com/requested-min-cpu-platform` label selector on the pod.
15607    /// To unset the min cpu platform field pass "automatic"
15608    /// as field value.
15609    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15610    #[deprecated]
15611    pub min_cpu_platform: std::string::String,
15612
15613    /// Size of the disk attached to each node, specified in GB.
15614    /// The smallest allowed disk size is 10GB.
15615    ///
15616    /// If unspecified, the default disk size is 100GB.
15617    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15618    pub disk_size_gb: i32,
15619
15620    /// Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or
15621    /// 'pd-balanced')
15622    ///
15623    /// If unspecified, the default disk type is 'pd-standard'
15624    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15625    pub disk_type: std::string::String,
15626
15627    /// Shielded Instance options.
15628    #[serde(skip_serializing_if = "std::option::Option::is_none")]
15629    pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
15630
15631    /// The Customer Managed Encryption Key used to encrypt the boot disk attached
15632    /// to each node in the node pool. This should be of the form
15633    /// projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME].
15634    /// For more information about protecting resources with Cloud KMS Keys please
15635    /// see:
15636    /// <https://cloud.google.com/compute/docs/disks/customer-managed-encryption>
15637    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15638    pub boot_disk_kms_key: std::string::String,
15639
15640    /// The image type to use for NAP created node. Please see
15641    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images> for
15642    /// available image types.
15643    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15644    pub image_type: std::string::String,
15645
15646    /// Enable or disable Kubelet read only port.
15647    #[serde(skip_serializing_if = "std::option::Option::is_none")]
15648    pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
15649
15650    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15651    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15652}
15653
15654impl AutoprovisioningNodePoolDefaults {
15655    pub fn new() -> Self {
15656        std::default::Default::default()
15657    }
15658
15659    /// Sets the value of [oauth_scopes][crate::model::AutoprovisioningNodePoolDefaults::oauth_scopes].
15660    pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
15661    where
15662        T: std::iter::IntoIterator<Item = V>,
15663        V: std::convert::Into<std::string::String>,
15664    {
15665        use std::iter::Iterator;
15666        self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
15667        self
15668    }
15669
15670    /// Sets the value of [service_account][crate::model::AutoprovisioningNodePoolDefaults::service_account].
15671    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15672        self.service_account = v.into();
15673        self
15674    }
15675
15676    /// Sets the value of [upgrade_settings][crate::model::AutoprovisioningNodePoolDefaults::upgrade_settings].
15677    pub fn set_upgrade_settings<
15678        T: std::convert::Into<std::option::Option<crate::model::node_pool::UpgradeSettings>>,
15679    >(
15680        mut self,
15681        v: T,
15682    ) -> Self {
15683        self.upgrade_settings = v.into();
15684        self
15685    }
15686
15687    /// Sets the value of [management][crate::model::AutoprovisioningNodePoolDefaults::management].
15688    pub fn set_management<
15689        T: std::convert::Into<std::option::Option<crate::model::NodeManagement>>,
15690    >(
15691        mut self,
15692        v: T,
15693    ) -> Self {
15694        self.management = v.into();
15695        self
15696    }
15697
15698    /// Sets the value of [min_cpu_platform][crate::model::AutoprovisioningNodePoolDefaults::min_cpu_platform].
15699    #[deprecated]
15700    pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
15701        mut self,
15702        v: T,
15703    ) -> Self {
15704        self.min_cpu_platform = v.into();
15705        self
15706    }
15707
15708    /// Sets the value of [disk_size_gb][crate::model::AutoprovisioningNodePoolDefaults::disk_size_gb].
15709    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15710        self.disk_size_gb = v.into();
15711        self
15712    }
15713
15714    /// Sets the value of [disk_type][crate::model::AutoprovisioningNodePoolDefaults::disk_type].
15715    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15716        self.disk_type = v.into();
15717        self
15718    }
15719
15720    /// Sets the value of [shielded_instance_config][crate::model::AutoprovisioningNodePoolDefaults::shielded_instance_config].
15721    pub fn set_shielded_instance_config<
15722        T: std::convert::Into<std::option::Option<crate::model::ShieldedInstanceConfig>>,
15723    >(
15724        mut self,
15725        v: T,
15726    ) -> Self {
15727        self.shielded_instance_config = v.into();
15728        self
15729    }
15730
15731    /// Sets the value of [boot_disk_kms_key][crate::model::AutoprovisioningNodePoolDefaults::boot_disk_kms_key].
15732    pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
15733        mut self,
15734        v: T,
15735    ) -> Self {
15736        self.boot_disk_kms_key = v.into();
15737        self
15738    }
15739
15740    /// Sets the value of [image_type][crate::model::AutoprovisioningNodePoolDefaults::image_type].
15741    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15742        self.image_type = v.into();
15743        self
15744    }
15745
15746    /// Sets the value of [insecure_kubelet_readonly_port_enabled][crate::model::AutoprovisioningNodePoolDefaults::insecure_kubelet_readonly_port_enabled].
15747    pub fn set_insecure_kubelet_readonly_port_enabled<
15748        T: std::convert::Into<std::option::Option<bool>>,
15749    >(
15750        mut self,
15751        v: T,
15752    ) -> Self {
15753        self.insecure_kubelet_readonly_port_enabled = v.into();
15754        self
15755    }
15756}
15757
15758impl wkt::message::Message for AutoprovisioningNodePoolDefaults {
15759    fn typename() -> &'static str {
15760        "type.googleapis.com/google.container.v1.AutoprovisioningNodePoolDefaults"
15761    }
15762}
15763
15764/// Contains information about amount of some resource in the cluster.
15765/// For memory, value should be in GB.
15766#[serde_with::serde_as]
15767#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15768#[serde(default, rename_all = "camelCase")]
15769#[non_exhaustive]
15770pub struct ResourceLimit {
15771    /// Resource name "cpu", "memory" or gpu-specific string.
15772    #[serde(skip_serializing_if = "std::string::String::is_empty")]
15773    pub resource_type: std::string::String,
15774
15775    /// Minimum amount of the resource in the cluster.
15776    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15777    #[serde_as(as = "serde_with::DisplayFromStr")]
15778    pub minimum: i64,
15779
15780    /// Maximum amount of the resource in the cluster.
15781    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15782    #[serde_as(as = "serde_with::DisplayFromStr")]
15783    pub maximum: i64,
15784
15785    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15786    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15787}
15788
15789impl ResourceLimit {
15790    pub fn new() -> Self {
15791        std::default::Default::default()
15792    }
15793
15794    /// Sets the value of [resource_type][crate::model::ResourceLimit::resource_type].
15795    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15796        self.resource_type = v.into();
15797        self
15798    }
15799
15800    /// Sets the value of [minimum][crate::model::ResourceLimit::minimum].
15801    pub fn set_minimum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15802        self.minimum = v.into();
15803        self
15804    }
15805
15806    /// Sets the value of [maximum][crate::model::ResourceLimit::maximum].
15807    pub fn set_maximum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15808        self.maximum = v.into();
15809        self
15810    }
15811}
15812
15813impl wkt::message::Message for ResourceLimit {
15814    fn typename() -> &'static str {
15815        "type.googleapis.com/google.container.v1.ResourceLimit"
15816    }
15817}
15818
15819/// NodePoolAutoscaling contains information required by cluster autoscaler to
15820/// adjust the size of the node pool to the current cluster usage.
15821#[serde_with::serde_as]
15822#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15823#[serde(default, rename_all = "camelCase")]
15824#[non_exhaustive]
15825pub struct NodePoolAutoscaling {
15826    /// Is autoscaling enabled for this node pool.
15827    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15828    pub enabled: bool,
15829
15830    /// Minimum number of nodes for one location in the node pool. Must be greater
15831    /// than or equal to 0 and less than or equal to max_node_count.
15832    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15833    pub min_node_count: i32,
15834
15835    /// Maximum number of nodes for one location in the node pool. Must be >=
15836    /// min_node_count. There has to be enough quota to scale up the cluster.
15837    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15838    pub max_node_count: i32,
15839
15840    /// Can this node pool be deleted automatically.
15841    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15842    pub autoprovisioned: bool,
15843
15844    /// Location policy used when scaling up a nodepool.
15845    pub location_policy: crate::model::node_pool_autoscaling::LocationPolicy,
15846
15847    /// Minimum number of nodes in the node pool. Must be greater than or equal
15848    /// to 0 and less than or equal to total_max_node_count.
15849    /// The total_*_node_count fields are mutually exclusive with the *_node_count
15850    /// fields.
15851    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15852    pub total_min_node_count: i32,
15853
15854    /// Maximum number of nodes in the node pool. Must be greater than or equal to
15855    /// total_min_node_count. There has to be enough quota to scale up the cluster.
15856    /// The total_*_node_count fields are mutually exclusive with the *_node_count
15857    /// fields.
15858    #[serde(skip_serializing_if = "wkt::internal::is_default")]
15859    pub total_max_node_count: i32,
15860
15861    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15862    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15863}
15864
15865impl NodePoolAutoscaling {
15866    pub fn new() -> Self {
15867        std::default::Default::default()
15868    }
15869
15870    /// Sets the value of [enabled][crate::model::NodePoolAutoscaling::enabled].
15871    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15872        self.enabled = v.into();
15873        self
15874    }
15875
15876    /// Sets the value of [min_node_count][crate::model::NodePoolAutoscaling::min_node_count].
15877    pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15878        self.min_node_count = v.into();
15879        self
15880    }
15881
15882    /// Sets the value of [max_node_count][crate::model::NodePoolAutoscaling::max_node_count].
15883    pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15884        self.max_node_count = v.into();
15885        self
15886    }
15887
15888    /// Sets the value of [autoprovisioned][crate::model::NodePoolAutoscaling::autoprovisioned].
15889    pub fn set_autoprovisioned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15890        self.autoprovisioned = v.into();
15891        self
15892    }
15893
15894    /// Sets the value of [location_policy][crate::model::NodePoolAutoscaling::location_policy].
15895    pub fn set_location_policy<
15896        T: std::convert::Into<crate::model::node_pool_autoscaling::LocationPolicy>,
15897    >(
15898        mut self,
15899        v: T,
15900    ) -> Self {
15901        self.location_policy = v.into();
15902        self
15903    }
15904
15905    /// Sets the value of [total_min_node_count][crate::model::NodePoolAutoscaling::total_min_node_count].
15906    pub fn set_total_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15907        self.total_min_node_count = v.into();
15908        self
15909    }
15910
15911    /// Sets the value of [total_max_node_count][crate::model::NodePoolAutoscaling::total_max_node_count].
15912    pub fn set_total_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15913        self.total_max_node_count = v.into();
15914        self
15915    }
15916}
15917
15918impl wkt::message::Message for NodePoolAutoscaling {
15919    fn typename() -> &'static str {
15920        "type.googleapis.com/google.container.v1.NodePoolAutoscaling"
15921    }
15922}
15923
15924/// Defines additional types related to [NodePoolAutoscaling].
15925pub mod node_pool_autoscaling {
15926    #[allow(unused_imports)]
15927    use super::*;
15928
15929    /// Location policy specifies how zones are picked when scaling up the
15930    /// nodepool.
15931    ///
15932    /// # Working with unknown values
15933    ///
15934    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15935    /// additional enum variants at any time. Adding new variants is not considered
15936    /// a breaking change. Applications should write their code in anticipation of:
15937    ///
15938    /// - New values appearing in future releases of the client library, **and**
15939    /// - New values received dynamically, without application changes.
15940    ///
15941    /// Please consult the [Working with enums] section in the user guide for some
15942    /// guidelines.
15943    ///
15944    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
15945    #[derive(Clone, Debug, PartialEq)]
15946    #[non_exhaustive]
15947    pub enum LocationPolicy {
15948        /// Not set.
15949        Unspecified,
15950        /// BALANCED is a best effort policy that aims to balance the sizes of
15951        /// different zones.
15952        Balanced,
15953        /// ANY policy picks zones that have the highest capacity available.
15954        Any,
15955        /// If set, the enum was initialized with an unknown value.
15956        ///
15957        /// Applications can examine the value using [LocationPolicy::value] or
15958        /// [LocationPolicy::name].
15959        UnknownValue(location_policy::UnknownValue),
15960    }
15961
15962    #[doc(hidden)]
15963    pub mod location_policy {
15964        #[allow(unused_imports)]
15965        use super::*;
15966        #[derive(Clone, Debug, PartialEq)]
15967        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15968    }
15969
15970    impl LocationPolicy {
15971        /// Gets the enum value.
15972        ///
15973        /// Returns `None` if the enum contains an unknown value deserialized from
15974        /// the string representation of enums.
15975        pub fn value(&self) -> std::option::Option<i32> {
15976            match self {
15977                Self::Unspecified => std::option::Option::Some(0),
15978                Self::Balanced => std::option::Option::Some(1),
15979                Self::Any => std::option::Option::Some(2),
15980                Self::UnknownValue(u) => u.0.value(),
15981            }
15982        }
15983
15984        /// Gets the enum value as a string.
15985        ///
15986        /// Returns `None` if the enum contains an unknown value deserialized from
15987        /// the integer representation of enums.
15988        pub fn name(&self) -> std::option::Option<&str> {
15989            match self {
15990                Self::Unspecified => std::option::Option::Some("LOCATION_POLICY_UNSPECIFIED"),
15991                Self::Balanced => std::option::Option::Some("BALANCED"),
15992                Self::Any => std::option::Option::Some("ANY"),
15993                Self::UnknownValue(u) => u.0.name(),
15994            }
15995        }
15996    }
15997
15998    impl std::default::Default for LocationPolicy {
15999        fn default() -> Self {
16000            use std::convert::From;
16001            Self::from(0)
16002        }
16003    }
16004
16005    impl std::fmt::Display for LocationPolicy {
16006        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16007            wkt::internal::display_enum(f, self.name(), self.value())
16008        }
16009    }
16010
16011    impl std::convert::From<i32> for LocationPolicy {
16012        fn from(value: i32) -> Self {
16013            match value {
16014                0 => Self::Unspecified,
16015                1 => Self::Balanced,
16016                2 => Self::Any,
16017                _ => Self::UnknownValue(location_policy::UnknownValue(
16018                    wkt::internal::UnknownEnumValue::Integer(value),
16019                )),
16020            }
16021        }
16022    }
16023
16024    impl std::convert::From<&str> for LocationPolicy {
16025        fn from(value: &str) -> Self {
16026            use std::string::ToString;
16027            match value {
16028                "LOCATION_POLICY_UNSPECIFIED" => Self::Unspecified,
16029                "BALANCED" => Self::Balanced,
16030                "ANY" => Self::Any,
16031                _ => Self::UnknownValue(location_policy::UnknownValue(
16032                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16033                )),
16034            }
16035        }
16036    }
16037
16038    impl serde::ser::Serialize for LocationPolicy {
16039        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16040        where
16041            S: serde::Serializer,
16042        {
16043            match self {
16044                Self::Unspecified => serializer.serialize_i32(0),
16045                Self::Balanced => serializer.serialize_i32(1),
16046                Self::Any => serializer.serialize_i32(2),
16047                Self::UnknownValue(u) => u.0.serialize(serializer),
16048            }
16049        }
16050    }
16051
16052    impl<'de> serde::de::Deserialize<'de> for LocationPolicy {
16053        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16054        where
16055            D: serde::Deserializer<'de>,
16056        {
16057            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationPolicy>::new(
16058                ".google.container.v1.NodePoolAutoscaling.LocationPolicy",
16059            ))
16060        }
16061    }
16062}
16063
16064/// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container
16065/// Engine cluster, which will in turn set them for Google Compute Engine
16066/// resources used by that cluster
16067#[serde_with::serde_as]
16068#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16069#[serde(default, rename_all = "camelCase")]
16070#[non_exhaustive]
16071pub struct SetLabelsRequest {
16072    /// Deprecated. The Google Developers Console [project ID or project
16073    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
16074    /// This field has been deprecated and replaced by the name field.
16075    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16076    #[deprecated]
16077    pub project_id: std::string::String,
16078
16079    /// Deprecated. The name of the Google Compute Engine
16080    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
16081    /// cluster resides. This field has been deprecated and replaced by the name
16082    /// field.
16083    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16084    #[deprecated]
16085    pub zone: std::string::String,
16086
16087    /// Deprecated. The name of the cluster.
16088    /// This field has been deprecated and replaced by the name field.
16089    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16090    #[deprecated]
16091    pub cluster_id: std::string::String,
16092
16093    /// Required. The labels to set for that cluster.
16094    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
16095    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
16096
16097    /// Required. The fingerprint of the previous set of labels for this resource,
16098    /// used to detect conflicts. The fingerprint is initially generated by
16099    /// Kubernetes Engine and changes after every request to modify or update
16100    /// labels. You must always provide an up-to-date fingerprint hash when
16101    /// updating or changing labels. Make a `get()` request to the
16102    /// resource to get the latest fingerprint.
16103    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16104    pub label_fingerprint: std::string::String,
16105
16106    /// The name (project, location, cluster name) of the cluster to set labels.
16107    /// Specified in the format `projects/*/locations/*/clusters/*`.
16108    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16109    pub name: std::string::String,
16110
16111    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16112    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16113}
16114
16115impl SetLabelsRequest {
16116    pub fn new() -> Self {
16117        std::default::Default::default()
16118    }
16119
16120    /// Sets the value of [project_id][crate::model::SetLabelsRequest::project_id].
16121    #[deprecated]
16122    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16123        self.project_id = v.into();
16124        self
16125    }
16126
16127    /// Sets the value of [zone][crate::model::SetLabelsRequest::zone].
16128    #[deprecated]
16129    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16130        self.zone = v.into();
16131        self
16132    }
16133
16134    /// Sets the value of [cluster_id][crate::model::SetLabelsRequest::cluster_id].
16135    #[deprecated]
16136    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16137        self.cluster_id = v.into();
16138        self
16139    }
16140
16141    /// Sets the value of [resource_labels][crate::model::SetLabelsRequest::resource_labels].
16142    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
16143    where
16144        T: std::iter::IntoIterator<Item = (K, V)>,
16145        K: std::convert::Into<std::string::String>,
16146        V: std::convert::Into<std::string::String>,
16147    {
16148        use std::iter::Iterator;
16149        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16150        self
16151    }
16152
16153    /// Sets the value of [label_fingerprint][crate::model::SetLabelsRequest::label_fingerprint].
16154    pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
16155        mut self,
16156        v: T,
16157    ) -> Self {
16158        self.label_fingerprint = v.into();
16159        self
16160    }
16161
16162    /// Sets the value of [name][crate::model::SetLabelsRequest::name].
16163    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16164        self.name = v.into();
16165        self
16166    }
16167}
16168
16169impl wkt::message::Message for SetLabelsRequest {
16170    fn typename() -> &'static str {
16171        "type.googleapis.com/google.container.v1.SetLabelsRequest"
16172    }
16173}
16174
16175/// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for
16176/// a cluster.
16177#[serde_with::serde_as]
16178#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16179#[serde(default, rename_all = "camelCase")]
16180#[non_exhaustive]
16181pub struct SetLegacyAbacRequest {
16182    /// Deprecated. The Google Developers Console [project ID or project
16183    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
16184    /// This field has been deprecated and replaced by the name field.
16185    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16186    #[deprecated]
16187    pub project_id: std::string::String,
16188
16189    /// Deprecated. The name of the Google Compute Engine
16190    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
16191    /// cluster resides. This field has been deprecated and replaced by the name
16192    /// field.
16193    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16194    #[deprecated]
16195    pub zone: std::string::String,
16196
16197    /// Deprecated. The name of the cluster to update.
16198    /// This field has been deprecated and replaced by the name field.
16199    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16200    #[deprecated]
16201    pub cluster_id: std::string::String,
16202
16203    /// Required. Whether ABAC authorization will be enabled in the cluster.
16204    #[serde(skip_serializing_if = "wkt::internal::is_default")]
16205    pub enabled: bool,
16206
16207    /// The name (project, location, cluster name) of the cluster to set legacy
16208    /// abac. Specified in the format `projects/*/locations/*/clusters/*`.
16209    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16210    pub name: std::string::String,
16211
16212    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16213    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16214}
16215
16216impl SetLegacyAbacRequest {
16217    pub fn new() -> Self {
16218        std::default::Default::default()
16219    }
16220
16221    /// Sets the value of [project_id][crate::model::SetLegacyAbacRequest::project_id].
16222    #[deprecated]
16223    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16224        self.project_id = v.into();
16225        self
16226    }
16227
16228    /// Sets the value of [zone][crate::model::SetLegacyAbacRequest::zone].
16229    #[deprecated]
16230    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16231        self.zone = v.into();
16232        self
16233    }
16234
16235    /// Sets the value of [cluster_id][crate::model::SetLegacyAbacRequest::cluster_id].
16236    #[deprecated]
16237    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16238        self.cluster_id = v.into();
16239        self
16240    }
16241
16242    /// Sets the value of [enabled][crate::model::SetLegacyAbacRequest::enabled].
16243    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16244        self.enabled = v.into();
16245        self
16246    }
16247
16248    /// Sets the value of [name][crate::model::SetLegacyAbacRequest::name].
16249    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16250        self.name = v.into();
16251        self
16252    }
16253}
16254
16255impl wkt::message::Message for SetLegacyAbacRequest {
16256    fn typename() -> &'static str {
16257        "type.googleapis.com/google.container.v1.SetLegacyAbacRequest"
16258    }
16259}
16260
16261/// StartIPRotationRequest creates a new IP for the cluster and then performs
16262/// a node upgrade on each node pool to point to the new IP.
16263#[serde_with::serde_as]
16264#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16265#[serde(default, rename_all = "camelCase")]
16266#[non_exhaustive]
16267pub struct StartIPRotationRequest {
16268    /// Deprecated. The Google Developers Console [project ID or project
16269    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
16270    /// This field has been deprecated and replaced by the name field.
16271    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16272    #[deprecated]
16273    pub project_id: std::string::String,
16274
16275    /// Deprecated. The name of the Google Compute Engine
16276    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
16277    /// cluster resides. This field has been deprecated and replaced by the name
16278    /// field.
16279    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16280    #[deprecated]
16281    pub zone: std::string::String,
16282
16283    /// Deprecated. The name of the cluster.
16284    /// This field has been deprecated and replaced by the name field.
16285    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16286    #[deprecated]
16287    pub cluster_id: std::string::String,
16288
16289    /// The name (project, location, cluster name) of the cluster to start IP
16290    /// rotation. Specified in the format `projects/*/locations/*/clusters/*`.
16291    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16292    pub name: std::string::String,
16293
16294    /// Whether to rotate credentials during IP rotation.
16295    #[serde(skip_serializing_if = "wkt::internal::is_default")]
16296    pub rotate_credentials: bool,
16297
16298    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16299    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16300}
16301
16302impl StartIPRotationRequest {
16303    pub fn new() -> Self {
16304        std::default::Default::default()
16305    }
16306
16307    /// Sets the value of [project_id][crate::model::StartIPRotationRequest::project_id].
16308    #[deprecated]
16309    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16310        self.project_id = v.into();
16311        self
16312    }
16313
16314    /// Sets the value of [zone][crate::model::StartIPRotationRequest::zone].
16315    #[deprecated]
16316    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16317        self.zone = v.into();
16318        self
16319    }
16320
16321    /// Sets the value of [cluster_id][crate::model::StartIPRotationRequest::cluster_id].
16322    #[deprecated]
16323    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16324        self.cluster_id = v.into();
16325        self
16326    }
16327
16328    /// Sets the value of [name][crate::model::StartIPRotationRequest::name].
16329    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16330        self.name = v.into();
16331        self
16332    }
16333
16334    /// Sets the value of [rotate_credentials][crate::model::StartIPRotationRequest::rotate_credentials].
16335    pub fn set_rotate_credentials<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16336        self.rotate_credentials = v.into();
16337        self
16338    }
16339}
16340
16341impl wkt::message::Message for StartIPRotationRequest {
16342    fn typename() -> &'static str {
16343        "type.googleapis.com/google.container.v1.StartIPRotationRequest"
16344    }
16345}
16346
16347/// CompleteIPRotationRequest moves the cluster master back into single-IP mode.
16348#[serde_with::serde_as]
16349#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16350#[serde(default, rename_all = "camelCase")]
16351#[non_exhaustive]
16352pub struct CompleteIPRotationRequest {
16353    /// Deprecated. The Google Developers Console [project ID or project
16354    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
16355    /// This field has been deprecated and replaced by the name field.
16356    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16357    #[deprecated]
16358    pub project_id: std::string::String,
16359
16360    /// Deprecated. The name of the Google Compute Engine
16361    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
16362    /// cluster resides. This field has been deprecated and replaced by the name
16363    /// field.
16364    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16365    #[deprecated]
16366    pub zone: std::string::String,
16367
16368    /// Deprecated. The name of the cluster.
16369    /// This field has been deprecated and replaced by the name field.
16370    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16371    #[deprecated]
16372    pub cluster_id: std::string::String,
16373
16374    /// The name (project, location, cluster name) of the cluster to complete IP
16375    /// rotation. Specified in the format `projects/*/locations/*/clusters/*`.
16376    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16377    pub name: std::string::String,
16378
16379    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16380    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16381}
16382
16383impl CompleteIPRotationRequest {
16384    pub fn new() -> Self {
16385        std::default::Default::default()
16386    }
16387
16388    /// Sets the value of [project_id][crate::model::CompleteIPRotationRequest::project_id].
16389    #[deprecated]
16390    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16391        self.project_id = v.into();
16392        self
16393    }
16394
16395    /// Sets the value of [zone][crate::model::CompleteIPRotationRequest::zone].
16396    #[deprecated]
16397    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16398        self.zone = v.into();
16399        self
16400    }
16401
16402    /// Sets the value of [cluster_id][crate::model::CompleteIPRotationRequest::cluster_id].
16403    #[deprecated]
16404    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16405        self.cluster_id = v.into();
16406        self
16407    }
16408
16409    /// Sets the value of [name][crate::model::CompleteIPRotationRequest::name].
16410    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16411        self.name = v.into();
16412        self
16413    }
16414}
16415
16416impl wkt::message::Message for CompleteIPRotationRequest {
16417    fn typename() -> &'static str {
16418        "type.googleapis.com/google.container.v1.CompleteIPRotationRequest"
16419    }
16420}
16421
16422/// AcceleratorConfig represents a Hardware Accelerator request.
16423#[serde_with::serde_as]
16424#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16425#[serde(default, rename_all = "camelCase")]
16426#[non_exhaustive]
16427pub struct AcceleratorConfig {
16428    /// The number of the accelerator cards exposed to an instance.
16429    #[serde(skip_serializing_if = "wkt::internal::is_default")]
16430    #[serde_as(as = "serde_with::DisplayFromStr")]
16431    pub accelerator_count: i64,
16432
16433    /// The accelerator type resource name. List of supported accelerators
16434    /// [here](https://cloud.google.com/compute/docs/gpus)
16435    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16436    pub accelerator_type: std::string::String,
16437
16438    /// Size of partitions to create on the GPU. Valid values are described in the
16439    /// NVIDIA [mig user
16440    /// guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).
16441    #[serde(skip_serializing_if = "std::string::String::is_empty")]
16442    pub gpu_partition_size: std::string::String,
16443
16444    /// The configuration for GPU sharing options.
16445    #[serde(skip_serializing_if = "std::option::Option::is_none")]
16446    pub gpu_sharing_config: std::option::Option<crate::model::GPUSharingConfig>,
16447
16448    /// The configuration for auto installation of GPU driver.
16449    #[serde(skip_serializing_if = "std::option::Option::is_none")]
16450    pub gpu_driver_installation_config:
16451        std::option::Option<crate::model::GPUDriverInstallationConfig>,
16452
16453    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16454    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16455}
16456
16457impl AcceleratorConfig {
16458    pub fn new() -> Self {
16459        std::default::Default::default()
16460    }
16461
16462    /// Sets the value of [accelerator_count][crate::model::AcceleratorConfig::accelerator_count].
16463    pub fn set_accelerator_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16464        self.accelerator_count = v.into();
16465        self
16466    }
16467
16468    /// Sets the value of [accelerator_type][crate::model::AcceleratorConfig::accelerator_type].
16469    pub fn set_accelerator_type<T: std::convert::Into<std::string::String>>(
16470        mut self,
16471        v: T,
16472    ) -> Self {
16473        self.accelerator_type = v.into();
16474        self
16475    }
16476
16477    /// Sets the value of [gpu_partition_size][crate::model::AcceleratorConfig::gpu_partition_size].
16478    pub fn set_gpu_partition_size<T: std::convert::Into<std::string::String>>(
16479        mut self,
16480        v: T,
16481    ) -> Self {
16482        self.gpu_partition_size = v.into();
16483        self
16484    }
16485
16486    /// Sets the value of [gpu_sharing_config][crate::model::AcceleratorConfig::gpu_sharing_config].
16487    pub fn set_gpu_sharing_config<
16488        T: std::convert::Into<std::option::Option<crate::model::GPUSharingConfig>>,
16489    >(
16490        mut self,
16491        v: T,
16492    ) -> Self {
16493        self.gpu_sharing_config = v.into();
16494        self
16495    }
16496
16497    /// Sets the value of [gpu_driver_installation_config][crate::model::AcceleratorConfig::gpu_driver_installation_config].
16498    pub fn set_gpu_driver_installation_config<
16499        T: std::convert::Into<std::option::Option<crate::model::GPUDriverInstallationConfig>>,
16500    >(
16501        mut self,
16502        v: T,
16503    ) -> Self {
16504        self.gpu_driver_installation_config = v.into();
16505        self
16506    }
16507}
16508
16509impl wkt::message::Message for AcceleratorConfig {
16510    fn typename() -> &'static str {
16511        "type.googleapis.com/google.container.v1.AcceleratorConfig"
16512    }
16513}
16514
16515/// GPUSharingConfig represents the GPU sharing configuration for Hardware
16516/// Accelerators.
16517#[serde_with::serde_as]
16518#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16519#[serde(default, rename_all = "camelCase")]
16520#[non_exhaustive]
16521pub struct GPUSharingConfig {
16522    /// The max number of containers that can share a physical GPU.
16523    #[serde(skip_serializing_if = "wkt::internal::is_default")]
16524    #[serde_as(as = "serde_with::DisplayFromStr")]
16525    pub max_shared_clients_per_gpu: i64,
16526
16527    /// The type of GPU sharing strategy to enable on the GPU node.
16528    #[serde(skip_serializing_if = "std::option::Option::is_none")]
16529    pub gpu_sharing_strategy:
16530        std::option::Option<crate::model::gpu_sharing_config::GPUSharingStrategy>,
16531
16532    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16533    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16534}
16535
16536impl GPUSharingConfig {
16537    pub fn new() -> Self {
16538        std::default::Default::default()
16539    }
16540
16541    /// Sets the value of [max_shared_clients_per_gpu][crate::model::GPUSharingConfig::max_shared_clients_per_gpu].
16542    pub fn set_max_shared_clients_per_gpu<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16543        self.max_shared_clients_per_gpu = v.into();
16544        self
16545    }
16546
16547    /// Sets the value of [gpu_sharing_strategy][crate::model::GPUSharingConfig::gpu_sharing_strategy].
16548    pub fn set_gpu_sharing_strategy<
16549        T: std::convert::Into<
16550                std::option::Option<crate::model::gpu_sharing_config::GPUSharingStrategy>,
16551            >,
16552    >(
16553        mut self,
16554        v: T,
16555    ) -> Self {
16556        self.gpu_sharing_strategy = v.into();
16557        self
16558    }
16559}
16560
16561impl wkt::message::Message for GPUSharingConfig {
16562    fn typename() -> &'static str {
16563        "type.googleapis.com/google.container.v1.GPUSharingConfig"
16564    }
16565}
16566
16567/// Defines additional types related to [GPUSharingConfig].
16568pub mod gpu_sharing_config {
16569    #[allow(unused_imports)]
16570    use super::*;
16571
16572    /// The type of GPU sharing strategy currently provided.
16573    ///
16574    /// # Working with unknown values
16575    ///
16576    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16577    /// additional enum variants at any time. Adding new variants is not considered
16578    /// a breaking change. Applications should write their code in anticipation of:
16579    ///
16580    /// - New values appearing in future releases of the client library, **and**
16581    /// - New values received dynamically, without application changes.
16582    ///
16583    /// Please consult the [Working with enums] section in the user guide for some
16584    /// guidelines.
16585    ///
16586    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16587    #[derive(Clone, Debug, PartialEq)]
16588    #[non_exhaustive]
16589    pub enum GPUSharingStrategy {
16590        /// Default value.
16591        Unspecified,
16592        /// GPUs are time-shared between containers.
16593        TimeSharing,
16594        /// GPUs are shared between containers with NVIDIA MPS.
16595        Mps,
16596        /// If set, the enum was initialized with an unknown value.
16597        ///
16598        /// Applications can examine the value using [GPUSharingStrategy::value] or
16599        /// [GPUSharingStrategy::name].
16600        UnknownValue(gpu_sharing_strategy::UnknownValue),
16601    }
16602
16603    #[doc(hidden)]
16604    pub mod gpu_sharing_strategy {
16605        #[allow(unused_imports)]
16606        use super::*;
16607        #[derive(Clone, Debug, PartialEq)]
16608        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16609    }
16610
16611    impl GPUSharingStrategy {
16612        /// Gets the enum value.
16613        ///
16614        /// Returns `None` if the enum contains an unknown value deserialized from
16615        /// the string representation of enums.
16616        pub fn value(&self) -> std::option::Option<i32> {
16617            match self {
16618                Self::Unspecified => std::option::Option::Some(0),
16619                Self::TimeSharing => std::option::Option::Some(1),
16620                Self::Mps => std::option::Option::Some(2),
16621                Self::UnknownValue(u) => u.0.value(),
16622            }
16623        }
16624
16625        /// Gets the enum value as a string.
16626        ///
16627        /// Returns `None` if the enum contains an unknown value deserialized from
16628        /// the integer representation of enums.
16629        pub fn name(&self) -> std::option::Option<&str> {
16630            match self {
16631                Self::Unspecified => std::option::Option::Some("GPU_SHARING_STRATEGY_UNSPECIFIED"),
16632                Self::TimeSharing => std::option::Option::Some("TIME_SHARING"),
16633                Self::Mps => std::option::Option::Some("MPS"),
16634                Self::UnknownValue(u) => u.0.name(),
16635            }
16636        }
16637    }
16638
16639    impl std::default::Default for GPUSharingStrategy {
16640        fn default() -> Self {
16641            use std::convert::From;
16642            Self::from(0)
16643        }
16644    }
16645
16646    impl std::fmt::Display for GPUSharingStrategy {
16647        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16648            wkt::internal::display_enum(f, self.name(), self.value())
16649        }
16650    }
16651
16652    impl std::convert::From<i32> for GPUSharingStrategy {
16653        fn from(value: i32) -> Self {
16654            match value {
16655                0 => Self::Unspecified,
16656                1 => Self::TimeSharing,
16657                2 => Self::Mps,
16658                _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
16659                    wkt::internal::UnknownEnumValue::Integer(value),
16660                )),
16661            }
16662        }
16663    }
16664
16665    impl std::convert::From<&str> for GPUSharingStrategy {
16666        fn from(value: &str) -> Self {
16667            use std::string::ToString;
16668            match value {
16669                "GPU_SHARING_STRATEGY_UNSPECIFIED" => Self::Unspecified,
16670                "TIME_SHARING" => Self::TimeSharing,
16671                "MPS" => Self::Mps,
16672                _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
16673                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16674                )),
16675            }
16676        }
16677    }
16678
16679    impl serde::ser::Serialize for GPUSharingStrategy {
16680        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16681        where
16682            S: serde::Serializer,
16683        {
16684            match self {
16685                Self::Unspecified => serializer.serialize_i32(0),
16686                Self::TimeSharing => serializer.serialize_i32(1),
16687                Self::Mps => serializer.serialize_i32(2),
16688                Self::UnknownValue(u) => u.0.serialize(serializer),
16689            }
16690        }
16691    }
16692
16693    impl<'de> serde::de::Deserialize<'de> for GPUSharingStrategy {
16694        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16695        where
16696            D: serde::Deserializer<'de>,
16697        {
16698            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUSharingStrategy>::new(
16699                ".google.container.v1.GPUSharingConfig.GPUSharingStrategy",
16700            ))
16701        }
16702    }
16703}
16704
16705/// GPUDriverInstallationConfig specifies the version of GPU driver to be auto
16706/// installed.
16707#[serde_with::serde_as]
16708#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16709#[serde(default, rename_all = "camelCase")]
16710#[non_exhaustive]
16711pub struct GPUDriverInstallationConfig {
16712    /// Mode for how the GPU driver is installed.
16713    #[serde(skip_serializing_if = "std::option::Option::is_none")]
16714    pub gpu_driver_version:
16715        std::option::Option<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
16716
16717    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16718    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16719}
16720
16721impl GPUDriverInstallationConfig {
16722    pub fn new() -> Self {
16723        std::default::Default::default()
16724    }
16725
16726    /// Sets the value of [gpu_driver_version][crate::model::GPUDriverInstallationConfig::gpu_driver_version].
16727    pub fn set_gpu_driver_version<
16728        T: std::convert::Into<
16729                std::option::Option<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
16730            >,
16731    >(
16732        mut self,
16733        v: T,
16734    ) -> Self {
16735        self.gpu_driver_version = v.into();
16736        self
16737    }
16738}
16739
16740impl wkt::message::Message for GPUDriverInstallationConfig {
16741    fn typename() -> &'static str {
16742        "type.googleapis.com/google.container.v1.GPUDriverInstallationConfig"
16743    }
16744}
16745
16746/// Defines additional types related to [GPUDriverInstallationConfig].
16747pub mod gpu_driver_installation_config {
16748    #[allow(unused_imports)]
16749    use super::*;
16750
16751    /// The GPU driver version to install.
16752    ///
16753    /// # Working with unknown values
16754    ///
16755    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16756    /// additional enum variants at any time. Adding new variants is not considered
16757    /// a breaking change. Applications should write their code in anticipation of:
16758    ///
16759    /// - New values appearing in future releases of the client library, **and**
16760    /// - New values received dynamically, without application changes.
16761    ///
16762    /// Please consult the [Working with enums] section in the user guide for some
16763    /// guidelines.
16764    ///
16765    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16766    #[derive(Clone, Debug, PartialEq)]
16767    #[non_exhaustive]
16768    pub enum GPUDriverVersion {
16769        /// Default value is to not install any GPU driver.
16770        Unspecified,
16771        /// Disable GPU driver auto installation and needs manual installation
16772        InstallationDisabled,
16773        /// "Default" GPU driver in COS and Ubuntu.
16774        Default,
16775        /// "Latest" GPU driver in COS.
16776        Latest,
16777        /// If set, the enum was initialized with an unknown value.
16778        ///
16779        /// Applications can examine the value using [GPUDriverVersion::value] or
16780        /// [GPUDriverVersion::name].
16781        UnknownValue(gpu_driver_version::UnknownValue),
16782    }
16783
16784    #[doc(hidden)]
16785    pub mod gpu_driver_version {
16786        #[allow(unused_imports)]
16787        use super::*;
16788        #[derive(Clone, Debug, PartialEq)]
16789        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16790    }
16791
16792    impl GPUDriverVersion {
16793        /// Gets the enum value.
16794        ///
16795        /// Returns `None` if the enum contains an unknown value deserialized from
16796        /// the string representation of enums.
16797        pub fn value(&self) -> std::option::Option<i32> {
16798            match self {
16799                Self::Unspecified => std::option::Option::Some(0),
16800                Self::InstallationDisabled => std::option::Option::Some(1),
16801                Self::Default => std::option::Option::Some(2),
16802                Self::Latest => std::option::Option::Some(3),
16803                Self::UnknownValue(u) => u.0.value(),
16804            }
16805        }
16806
16807        /// Gets the enum value as a string.
16808        ///
16809        /// Returns `None` if the enum contains an unknown value deserialized from
16810        /// the integer representation of enums.
16811        pub fn name(&self) -> std::option::Option<&str> {
16812            match self {
16813                Self::Unspecified => std::option::Option::Some("GPU_DRIVER_VERSION_UNSPECIFIED"),
16814                Self::InstallationDisabled => std::option::Option::Some("INSTALLATION_DISABLED"),
16815                Self::Default => std::option::Option::Some("DEFAULT"),
16816                Self::Latest => std::option::Option::Some("LATEST"),
16817                Self::UnknownValue(u) => u.0.name(),
16818            }
16819        }
16820    }
16821
16822    impl std::default::Default for GPUDriverVersion {
16823        fn default() -> Self {
16824            use std::convert::From;
16825            Self::from(0)
16826        }
16827    }
16828
16829    impl std::fmt::Display for GPUDriverVersion {
16830        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16831            wkt::internal::display_enum(f, self.name(), self.value())
16832        }
16833    }
16834
16835    impl std::convert::From<i32> for GPUDriverVersion {
16836        fn from(value: i32) -> Self {
16837            match value {
16838                0 => Self::Unspecified,
16839                1 => Self::InstallationDisabled,
16840                2 => Self::Default,
16841                3 => Self::Latest,
16842                _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
16843                    wkt::internal::UnknownEnumValue::Integer(value),
16844                )),
16845            }
16846        }
16847    }
16848
16849    impl std::convert::From<&str> for GPUDriverVersion {
16850        fn from(value: &str) -> Self {
16851            use std::string::ToString;
16852            match value {
16853                "GPU_DRIVER_VERSION_UNSPECIFIED" => Self::Unspecified,
16854                "INSTALLATION_DISABLED" => Self::InstallationDisabled,
16855                "DEFAULT" => Self::Default,
16856                "LATEST" => Self::Latest,
16857                _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
16858                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16859                )),
16860            }
16861        }
16862    }
16863
16864    impl serde::ser::Serialize for GPUDriverVersion {
16865        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16866        where
16867            S: serde::Serializer,
16868        {
16869            match self {
16870                Self::Unspecified => serializer.serialize_i32(0),
16871                Self::InstallationDisabled => serializer.serialize_i32(1),
16872                Self::Default => serializer.serialize_i32(2),
16873                Self::Latest => serializer.serialize_i32(3),
16874                Self::UnknownValue(u) => u.0.serialize(serializer),
16875            }
16876        }
16877    }
16878
16879    impl<'de> serde::de::Deserialize<'de> for GPUDriverVersion {
16880        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16881        where
16882            D: serde::Deserializer<'de>,
16883        {
16884            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUDriverVersion>::new(
16885                ".google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion",
16886            ))
16887        }
16888    }
16889}
16890
16891/// WorkloadMetadataConfig defines the metadata configuration to expose to
16892/// workloads on the node pool.
16893#[serde_with::serde_as]
16894#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16895#[serde(default, rename_all = "camelCase")]
16896#[non_exhaustive]
16897pub struct WorkloadMetadataConfig {
16898    /// Mode is the configuration for how to expose metadata to workloads running
16899    /// on the node pool.
16900    pub mode: crate::model::workload_metadata_config::Mode,
16901
16902    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16903    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16904}
16905
16906impl WorkloadMetadataConfig {
16907    pub fn new() -> Self {
16908        std::default::Default::default()
16909    }
16910
16911    /// Sets the value of [mode][crate::model::WorkloadMetadataConfig::mode].
16912    pub fn set_mode<T: std::convert::Into<crate::model::workload_metadata_config::Mode>>(
16913        mut self,
16914        v: T,
16915    ) -> Self {
16916        self.mode = v.into();
16917        self
16918    }
16919}
16920
16921impl wkt::message::Message for WorkloadMetadataConfig {
16922    fn typename() -> &'static str {
16923        "type.googleapis.com/google.container.v1.WorkloadMetadataConfig"
16924    }
16925}
16926
16927/// Defines additional types related to [WorkloadMetadataConfig].
16928pub mod workload_metadata_config {
16929    #[allow(unused_imports)]
16930    use super::*;
16931
16932    /// Mode is the configuration for how to expose metadata to workloads running
16933    /// on the node.
16934    ///
16935    /// # Working with unknown values
16936    ///
16937    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16938    /// additional enum variants at any time. Adding new variants is not considered
16939    /// a breaking change. Applications should write their code in anticipation of:
16940    ///
16941    /// - New values appearing in future releases of the client library, **and**
16942    /// - New values received dynamically, without application changes.
16943    ///
16944    /// Please consult the [Working with enums] section in the user guide for some
16945    /// guidelines.
16946    ///
16947    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16948    #[derive(Clone, Debug, PartialEq)]
16949    #[non_exhaustive]
16950    pub enum Mode {
16951        /// Not set.
16952        Unspecified,
16953        /// Expose all Compute Engine metadata to pods.
16954        GceMetadata,
16955        /// Run the GKE Metadata Server on this node. The GKE Metadata Server exposes
16956        /// a metadata API to workloads that is compatible with the V1 Compute
16957        /// Metadata APIs exposed by the Compute Engine and App Engine Metadata
16958        /// Servers. This feature can only be enabled if Workload Identity is enabled
16959        /// at the cluster level.
16960        GkeMetadata,
16961        /// If set, the enum was initialized with an unknown value.
16962        ///
16963        /// Applications can examine the value using [Mode::value] or
16964        /// [Mode::name].
16965        UnknownValue(mode::UnknownValue),
16966    }
16967
16968    #[doc(hidden)]
16969    pub mod mode {
16970        #[allow(unused_imports)]
16971        use super::*;
16972        #[derive(Clone, Debug, PartialEq)]
16973        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16974    }
16975
16976    impl Mode {
16977        /// Gets the enum value.
16978        ///
16979        /// Returns `None` if the enum contains an unknown value deserialized from
16980        /// the string representation of enums.
16981        pub fn value(&self) -> std::option::Option<i32> {
16982            match self {
16983                Self::Unspecified => std::option::Option::Some(0),
16984                Self::GceMetadata => std::option::Option::Some(1),
16985                Self::GkeMetadata => std::option::Option::Some(2),
16986                Self::UnknownValue(u) => u.0.value(),
16987            }
16988        }
16989
16990        /// Gets the enum value as a string.
16991        ///
16992        /// Returns `None` if the enum contains an unknown value deserialized from
16993        /// the integer representation of enums.
16994        pub fn name(&self) -> std::option::Option<&str> {
16995            match self {
16996                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
16997                Self::GceMetadata => std::option::Option::Some("GCE_METADATA"),
16998                Self::GkeMetadata => std::option::Option::Some("GKE_METADATA"),
16999                Self::UnknownValue(u) => u.0.name(),
17000            }
17001        }
17002    }
17003
17004    impl std::default::Default for Mode {
17005        fn default() -> Self {
17006            use std::convert::From;
17007            Self::from(0)
17008        }
17009    }
17010
17011    impl std::fmt::Display for Mode {
17012        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17013            wkt::internal::display_enum(f, self.name(), self.value())
17014        }
17015    }
17016
17017    impl std::convert::From<i32> for Mode {
17018        fn from(value: i32) -> Self {
17019            match value {
17020                0 => Self::Unspecified,
17021                1 => Self::GceMetadata,
17022                2 => Self::GkeMetadata,
17023                _ => Self::UnknownValue(mode::UnknownValue(
17024                    wkt::internal::UnknownEnumValue::Integer(value),
17025                )),
17026            }
17027        }
17028    }
17029
17030    impl std::convert::From<&str> for Mode {
17031        fn from(value: &str) -> Self {
17032            use std::string::ToString;
17033            match value {
17034                "MODE_UNSPECIFIED" => Self::Unspecified,
17035                "GCE_METADATA" => Self::GceMetadata,
17036                "GKE_METADATA" => Self::GkeMetadata,
17037                _ => Self::UnknownValue(mode::UnknownValue(
17038                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17039                )),
17040            }
17041        }
17042    }
17043
17044    impl serde::ser::Serialize for Mode {
17045        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17046        where
17047            S: serde::Serializer,
17048        {
17049            match self {
17050                Self::Unspecified => serializer.serialize_i32(0),
17051                Self::GceMetadata => serializer.serialize_i32(1),
17052                Self::GkeMetadata => serializer.serialize_i32(2),
17053                Self::UnknownValue(u) => u.0.serialize(serializer),
17054            }
17055        }
17056    }
17057
17058    impl<'de> serde::de::Deserialize<'de> for Mode {
17059        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17060        where
17061            D: serde::Deserializer<'de>,
17062        {
17063            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
17064                ".google.container.v1.WorkloadMetadataConfig.Mode",
17065            ))
17066        }
17067    }
17068}
17069
17070/// SetNetworkPolicyRequest enables/disables network policy for a cluster.
17071#[serde_with::serde_as]
17072#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17073#[serde(default, rename_all = "camelCase")]
17074#[non_exhaustive]
17075pub struct SetNetworkPolicyRequest {
17076    /// Deprecated. The Google Developers Console [project ID or project
17077    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
17078    /// This field has been deprecated and replaced by the name field.
17079    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17080    #[deprecated]
17081    pub project_id: std::string::String,
17082
17083    /// Deprecated. The name of the Google Compute Engine
17084    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
17085    /// cluster resides. This field has been deprecated and replaced by the name
17086    /// field.
17087    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17088    #[deprecated]
17089    pub zone: std::string::String,
17090
17091    /// Deprecated. The name of the cluster.
17092    /// This field has been deprecated and replaced by the name field.
17093    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17094    #[deprecated]
17095    pub cluster_id: std::string::String,
17096
17097    /// Required. Configuration options for the NetworkPolicy feature.
17098    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17099    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
17100
17101    /// The name (project, location, cluster name) of the cluster to set networking
17102    /// policy. Specified in the format `projects/*/locations/*/clusters/*`.
17103    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17104    pub name: std::string::String,
17105
17106    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17107    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17108}
17109
17110impl SetNetworkPolicyRequest {
17111    pub fn new() -> Self {
17112        std::default::Default::default()
17113    }
17114
17115    /// Sets the value of [project_id][crate::model::SetNetworkPolicyRequest::project_id].
17116    #[deprecated]
17117    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17118        self.project_id = v.into();
17119        self
17120    }
17121
17122    /// Sets the value of [zone][crate::model::SetNetworkPolicyRequest::zone].
17123    #[deprecated]
17124    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17125        self.zone = v.into();
17126        self
17127    }
17128
17129    /// Sets the value of [cluster_id][crate::model::SetNetworkPolicyRequest::cluster_id].
17130    #[deprecated]
17131    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17132        self.cluster_id = v.into();
17133        self
17134    }
17135
17136    /// Sets the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
17137    pub fn set_network_policy<
17138        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
17139    >(
17140        mut self,
17141        v: T,
17142    ) -> Self {
17143        self.network_policy = v.into();
17144        self
17145    }
17146
17147    /// Sets the value of [name][crate::model::SetNetworkPolicyRequest::name].
17148    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17149        self.name = v.into();
17150        self
17151    }
17152}
17153
17154impl wkt::message::Message for SetNetworkPolicyRequest {
17155    fn typename() -> &'static str {
17156        "type.googleapis.com/google.container.v1.SetNetworkPolicyRequest"
17157    }
17158}
17159
17160/// SetMaintenancePolicyRequest sets the maintenance policy for a cluster.
17161#[serde_with::serde_as]
17162#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17163#[serde(default, rename_all = "camelCase")]
17164#[non_exhaustive]
17165pub struct SetMaintenancePolicyRequest {
17166    /// Required. The Google Developers Console [project ID or project
17167    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
17168    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17169    pub project_id: std::string::String,
17170
17171    /// Required. The name of the Google Compute Engine
17172    /// [zone](https://cloud.google.com/compute/docs/zones#available) in which the
17173    /// cluster resides.
17174    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17175    pub zone: std::string::String,
17176
17177    /// Required. The name of the cluster to update.
17178    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17179    pub cluster_id: std::string::String,
17180
17181    /// Required. The maintenance policy to be set for the cluster. An empty field
17182    /// clears the existing maintenance policy.
17183    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17184    pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
17185
17186    /// The name (project, location, cluster name) of the cluster to set
17187    /// maintenance policy.
17188    /// Specified in the format `projects/*/locations/*/clusters/*`.
17189    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17190    pub name: std::string::String,
17191
17192    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17193    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17194}
17195
17196impl SetMaintenancePolicyRequest {
17197    pub fn new() -> Self {
17198        std::default::Default::default()
17199    }
17200
17201    /// Sets the value of [project_id][crate::model::SetMaintenancePolicyRequest::project_id].
17202    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17203        self.project_id = v.into();
17204        self
17205    }
17206
17207    /// Sets the value of [zone][crate::model::SetMaintenancePolicyRequest::zone].
17208    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17209        self.zone = v.into();
17210        self
17211    }
17212
17213    /// Sets the value of [cluster_id][crate::model::SetMaintenancePolicyRequest::cluster_id].
17214    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17215        self.cluster_id = v.into();
17216        self
17217    }
17218
17219    /// Sets the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
17220    pub fn set_maintenance_policy<
17221        T: std::convert::Into<std::option::Option<crate::model::MaintenancePolicy>>,
17222    >(
17223        mut self,
17224        v: T,
17225    ) -> Self {
17226        self.maintenance_policy = v.into();
17227        self
17228    }
17229
17230    /// Sets the value of [name][crate::model::SetMaintenancePolicyRequest::name].
17231    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17232        self.name = v.into();
17233        self
17234    }
17235}
17236
17237impl wkt::message::Message for SetMaintenancePolicyRequest {
17238    fn typename() -> &'static str {
17239        "type.googleapis.com/google.container.v1.SetMaintenancePolicyRequest"
17240    }
17241}
17242
17243/// StatusCondition describes why a cluster or a node pool has a certain status
17244/// (e.g., ERROR or DEGRADED).
17245#[serde_with::serde_as]
17246#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17247#[serde(default, rename_all = "camelCase")]
17248#[non_exhaustive]
17249pub struct StatusCondition {
17250    /// Machine-friendly representation of the condition
17251    /// Deprecated. Use canonical_code instead.
17252    #[deprecated]
17253    pub code: crate::model::status_condition::Code,
17254
17255    /// Human-friendly representation of the condition
17256    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17257    pub message: std::string::String,
17258
17259    /// Canonical code of the condition.
17260    pub canonical_code: rpc::model::Code,
17261
17262    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17263    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17264}
17265
17266impl StatusCondition {
17267    pub fn new() -> Self {
17268        std::default::Default::default()
17269    }
17270
17271    /// Sets the value of [code][crate::model::StatusCondition::code].
17272    #[deprecated]
17273    pub fn set_code<T: std::convert::Into<crate::model::status_condition::Code>>(
17274        mut self,
17275        v: T,
17276    ) -> Self {
17277        self.code = v.into();
17278        self
17279    }
17280
17281    /// Sets the value of [message][crate::model::StatusCondition::message].
17282    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17283        self.message = v.into();
17284        self
17285    }
17286
17287    /// Sets the value of [canonical_code][crate::model::StatusCondition::canonical_code].
17288    pub fn set_canonical_code<T: std::convert::Into<rpc::model::Code>>(mut self, v: T) -> Self {
17289        self.canonical_code = v.into();
17290        self
17291    }
17292}
17293
17294impl wkt::message::Message for StatusCondition {
17295    fn typename() -> &'static str {
17296        "type.googleapis.com/google.container.v1.StatusCondition"
17297    }
17298}
17299
17300/// Defines additional types related to [StatusCondition].
17301pub mod status_condition {
17302    #[allow(unused_imports)]
17303    use super::*;
17304
17305    /// Code for each condition
17306    ///
17307    /// # Working with unknown values
17308    ///
17309    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17310    /// additional enum variants at any time. Adding new variants is not considered
17311    /// a breaking change. Applications should write their code in anticipation of:
17312    ///
17313    /// - New values appearing in future releases of the client library, **and**
17314    /// - New values received dynamically, without application changes.
17315    ///
17316    /// Please consult the [Working with enums] section in the user guide for some
17317    /// guidelines.
17318    ///
17319    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17320    #[derive(Clone, Debug, PartialEq)]
17321    #[non_exhaustive]
17322    pub enum Code {
17323        /// UNKNOWN indicates a generic condition.
17324        Unknown,
17325        /// GCE_STOCKOUT indicates that Google Compute Engine resources are
17326        /// temporarily unavailable.
17327        GceStockout,
17328        /// GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot
17329        /// service account.
17330        GkeServiceAccountDeleted,
17331        /// Google Compute Engine quota was exceeded.
17332        GceQuotaExceeded,
17333        /// Cluster state was manually changed by an SRE due to a system logic error.
17334        SetByOperator,
17335        /// Unable to perform an encrypt operation against the CloudKMS key used for
17336        /// etcd level encryption.
17337        CloudKmsKeyError,
17338        /// Cluster CA is expiring soon.
17339        CaExpiring,
17340        /// If set, the enum was initialized with an unknown value.
17341        ///
17342        /// Applications can examine the value using [Code::value] or
17343        /// [Code::name].
17344        UnknownValue(code::UnknownValue),
17345    }
17346
17347    #[doc(hidden)]
17348    pub mod code {
17349        #[allow(unused_imports)]
17350        use super::*;
17351        #[derive(Clone, Debug, PartialEq)]
17352        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17353    }
17354
17355    impl Code {
17356        /// Gets the enum value.
17357        ///
17358        /// Returns `None` if the enum contains an unknown value deserialized from
17359        /// the string representation of enums.
17360        pub fn value(&self) -> std::option::Option<i32> {
17361            match self {
17362                Self::Unknown => std::option::Option::Some(0),
17363                Self::GceStockout => std::option::Option::Some(1),
17364                Self::GkeServiceAccountDeleted => std::option::Option::Some(2),
17365                Self::GceQuotaExceeded => std::option::Option::Some(3),
17366                Self::SetByOperator => std::option::Option::Some(4),
17367                Self::CloudKmsKeyError => std::option::Option::Some(7),
17368                Self::CaExpiring => std::option::Option::Some(9),
17369                Self::UnknownValue(u) => u.0.value(),
17370            }
17371        }
17372
17373        /// Gets the enum value as a string.
17374        ///
17375        /// Returns `None` if the enum contains an unknown value deserialized from
17376        /// the integer representation of enums.
17377        pub fn name(&self) -> std::option::Option<&str> {
17378            match self {
17379                Self::Unknown => std::option::Option::Some("UNKNOWN"),
17380                Self::GceStockout => std::option::Option::Some("GCE_STOCKOUT"),
17381                Self::GkeServiceAccountDeleted => {
17382                    std::option::Option::Some("GKE_SERVICE_ACCOUNT_DELETED")
17383                }
17384                Self::GceQuotaExceeded => std::option::Option::Some("GCE_QUOTA_EXCEEDED"),
17385                Self::SetByOperator => std::option::Option::Some("SET_BY_OPERATOR"),
17386                Self::CloudKmsKeyError => std::option::Option::Some("CLOUD_KMS_KEY_ERROR"),
17387                Self::CaExpiring => std::option::Option::Some("CA_EXPIRING"),
17388                Self::UnknownValue(u) => u.0.name(),
17389            }
17390        }
17391    }
17392
17393    impl std::default::Default for Code {
17394        fn default() -> Self {
17395            use std::convert::From;
17396            Self::from(0)
17397        }
17398    }
17399
17400    impl std::fmt::Display for Code {
17401        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17402            wkt::internal::display_enum(f, self.name(), self.value())
17403        }
17404    }
17405
17406    impl std::convert::From<i32> for Code {
17407        fn from(value: i32) -> Self {
17408            match value {
17409                0 => Self::Unknown,
17410                1 => Self::GceStockout,
17411                2 => Self::GkeServiceAccountDeleted,
17412                3 => Self::GceQuotaExceeded,
17413                4 => Self::SetByOperator,
17414                7 => Self::CloudKmsKeyError,
17415                9 => Self::CaExpiring,
17416                _ => Self::UnknownValue(code::UnknownValue(
17417                    wkt::internal::UnknownEnumValue::Integer(value),
17418                )),
17419            }
17420        }
17421    }
17422
17423    impl std::convert::From<&str> for Code {
17424        fn from(value: &str) -> Self {
17425            use std::string::ToString;
17426            match value {
17427                "UNKNOWN" => Self::Unknown,
17428                "GCE_STOCKOUT" => Self::GceStockout,
17429                "GKE_SERVICE_ACCOUNT_DELETED" => Self::GkeServiceAccountDeleted,
17430                "GCE_QUOTA_EXCEEDED" => Self::GceQuotaExceeded,
17431                "SET_BY_OPERATOR" => Self::SetByOperator,
17432                "CLOUD_KMS_KEY_ERROR" => Self::CloudKmsKeyError,
17433                "CA_EXPIRING" => Self::CaExpiring,
17434                _ => Self::UnknownValue(code::UnknownValue(
17435                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17436                )),
17437            }
17438        }
17439    }
17440
17441    impl serde::ser::Serialize for Code {
17442        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17443        where
17444            S: serde::Serializer,
17445        {
17446            match self {
17447                Self::Unknown => serializer.serialize_i32(0),
17448                Self::GceStockout => serializer.serialize_i32(1),
17449                Self::GkeServiceAccountDeleted => serializer.serialize_i32(2),
17450                Self::GceQuotaExceeded => serializer.serialize_i32(3),
17451                Self::SetByOperator => serializer.serialize_i32(4),
17452                Self::CloudKmsKeyError => serializer.serialize_i32(7),
17453                Self::CaExpiring => serializer.serialize_i32(9),
17454                Self::UnknownValue(u) => u.0.serialize(serializer),
17455            }
17456        }
17457    }
17458
17459    impl<'de> serde::de::Deserialize<'de> for Code {
17460        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17461        where
17462            D: serde::Deserializer<'de>,
17463        {
17464            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Code>::new(
17465                ".google.container.v1.StatusCondition.Code",
17466            ))
17467        }
17468    }
17469}
17470
17471/// NetworkConfig reports the relative names of network & subnetwork.
17472#[serde_with::serde_as]
17473#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17474#[serde(default, rename_all = "camelCase")]
17475#[non_exhaustive]
17476pub struct NetworkConfig {
17477    /// Output only. The relative name of the Google Compute Engine
17478    /// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
17479    /// to which the cluster is connected. Example:
17480    /// projects/my-project/global/networks/my-network
17481    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17482    pub network: std::string::String,
17483
17484    /// Output only. The relative name of the Google Compute Engine
17485    /// [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the
17486    /// cluster is connected. Example:
17487    /// projects/my-project/regions/us-central1/subnetworks/my-subnet
17488    #[serde(skip_serializing_if = "std::string::String::is_empty")]
17489    pub subnetwork: std::string::String,
17490
17491    /// Whether Intra-node visibility is enabled for this cluster.
17492    /// This makes same node pod to pod traffic visible for VPC network.
17493    #[serde(skip_serializing_if = "wkt::internal::is_default")]
17494    pub enable_intra_node_visibility: bool,
17495
17496    /// Whether the cluster disables default in-node sNAT rules. In-node sNAT rules
17497    /// will be disabled when default_snat_status is disabled. When disabled is set
17498    /// to false, default IP masquerade rules will be applied to the nodes to
17499    /// prevent sNAT on cluster internal traffic.
17500    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17501    pub default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
17502
17503    /// Whether L4ILB Subsetting is enabled for this cluster.
17504    #[serde(rename = "enableL4ilbSubsetting")]
17505    #[serde(skip_serializing_if = "wkt::internal::is_default")]
17506    pub enable_l4ilb_subsetting: bool,
17507
17508    /// The desired datapath provider for this cluster. By default, uses the
17509    /// IPTables-based kube-proxy implementation.
17510    pub datapath_provider: crate::model::DatapathProvider,
17511
17512    /// The desired state of IPv6 connectivity to Google Services.
17513    /// By default, no private IPv6 access to or from Google Services (all access
17514    /// will be via IPv4)
17515    pub private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
17516
17517    /// DNSConfig contains clusterDNS config for this cluster.
17518    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17519    pub dns_config: std::option::Option<crate::model::DNSConfig>,
17520
17521    /// ServiceExternalIPsConfig specifies if services with externalIPs field are
17522    /// blocked or not.
17523    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17524    pub service_external_ips_config: std::option::Option<crate::model::ServiceExternalIPsConfig>,
17525
17526    /// GatewayAPIConfig contains the desired config of Gateway API on this
17527    /// cluster.
17528    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17529    pub gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
17530
17531    /// Whether multi-networking is enabled for this cluster.
17532    #[serde(skip_serializing_if = "wkt::internal::is_default")]
17533    pub enable_multi_networking: bool,
17534
17535    /// Network bandwidth tier configuration.
17536    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17537    pub network_performance_config:
17538        std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
17539
17540    /// Whether FQDN Network Policy is enabled on this cluster.
17541    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17542    pub enable_fqdn_network_policy: std::option::Option<bool>,
17543
17544    /// Specify the details of in-transit encryption.
17545    /// Now named inter-node transparent encryption.
17546    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17547    pub in_transit_encryption_config: std::option::Option<crate::model::InTransitEncryptionConfig>,
17548
17549    /// Whether CiliumClusterwideNetworkPolicy is enabled on this cluster.
17550    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17551    pub enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
17552
17553    /// Controls whether by default nodes have private IP addresses only.
17554    /// It is invalid to specify both [PrivateClusterConfig.enablePrivateNodes][]
17555    /// and this field at the same time.
17556    /// To update the default setting, use
17557    /// [ClusterUpdate.desired_default_enable_private_nodes][google.container.v1.ClusterUpdate.desired_default_enable_private_nodes]
17558    ///
17559    /// [google.container.v1.ClusterUpdate.desired_default_enable_private_nodes]: crate::model::ClusterUpdate::desired_default_enable_private_nodes
17560    #[serde(skip_serializing_if = "std::option::Option::is_none")]
17561    pub default_enable_private_nodes: std::option::Option<bool>,
17562
17563    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17564    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17565}
17566
17567impl NetworkConfig {
17568    pub fn new() -> Self {
17569        std::default::Default::default()
17570    }
17571
17572    /// Sets the value of [network][crate::model::NetworkConfig::network].
17573    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17574        self.network = v.into();
17575        self
17576    }
17577
17578    /// Sets the value of [subnetwork][crate::model::NetworkConfig::subnetwork].
17579    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17580        self.subnetwork = v.into();
17581        self
17582    }
17583
17584    /// Sets the value of [enable_intra_node_visibility][crate::model::NetworkConfig::enable_intra_node_visibility].
17585    pub fn set_enable_intra_node_visibility<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17586        self.enable_intra_node_visibility = v.into();
17587        self
17588    }
17589
17590    /// Sets the value of [default_snat_status][crate::model::NetworkConfig::default_snat_status].
17591    pub fn set_default_snat_status<
17592        T: std::convert::Into<std::option::Option<crate::model::DefaultSnatStatus>>,
17593    >(
17594        mut self,
17595        v: T,
17596    ) -> Self {
17597        self.default_snat_status = v.into();
17598        self
17599    }
17600
17601    /// Sets the value of [enable_l4ilb_subsetting][crate::model::NetworkConfig::enable_l4ilb_subsetting].
17602    pub fn set_enable_l4ilb_subsetting<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17603        self.enable_l4ilb_subsetting = v.into();
17604        self
17605    }
17606
17607    /// Sets the value of [datapath_provider][crate::model::NetworkConfig::datapath_provider].
17608    pub fn set_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
17609        mut self,
17610        v: T,
17611    ) -> Self {
17612        self.datapath_provider = v.into();
17613        self
17614    }
17615
17616    /// Sets the value of [private_ipv6_google_access][crate::model::NetworkConfig::private_ipv6_google_access].
17617    pub fn set_private_ipv6_google_access<
17618        T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
17619    >(
17620        mut self,
17621        v: T,
17622    ) -> Self {
17623        self.private_ipv6_google_access = v.into();
17624        self
17625    }
17626
17627    /// Sets the value of [dns_config][crate::model::NetworkConfig::dns_config].
17628    pub fn set_dns_config<T: std::convert::Into<std::option::Option<crate::model::DNSConfig>>>(
17629        mut self,
17630        v: T,
17631    ) -> Self {
17632        self.dns_config = v.into();
17633        self
17634    }
17635
17636    /// Sets the value of [service_external_ips_config][crate::model::NetworkConfig::service_external_ips_config].
17637    pub fn set_service_external_ips_config<
17638        T: std::convert::Into<std::option::Option<crate::model::ServiceExternalIPsConfig>>,
17639    >(
17640        mut self,
17641        v: T,
17642    ) -> Self {
17643        self.service_external_ips_config = v.into();
17644        self
17645    }
17646
17647    /// Sets the value of [gateway_api_config][crate::model::NetworkConfig::gateway_api_config].
17648    pub fn set_gateway_api_config<
17649        T: std::convert::Into<std::option::Option<crate::model::GatewayAPIConfig>>,
17650    >(
17651        mut self,
17652        v: T,
17653    ) -> Self {
17654        self.gateway_api_config = v.into();
17655        self
17656    }
17657
17658    /// Sets the value of [enable_multi_networking][crate::model::NetworkConfig::enable_multi_networking].
17659    pub fn set_enable_multi_networking<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17660        self.enable_multi_networking = v.into();
17661        self
17662    }
17663
17664    /// Sets the value of [network_performance_config][crate::model::NetworkConfig::network_performance_config].
17665    pub fn set_network_performance_config<
17666        T: std::convert::Into<
17667                std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
17668            >,
17669    >(
17670        mut self,
17671        v: T,
17672    ) -> Self {
17673        self.network_performance_config = v.into();
17674        self
17675    }
17676
17677    /// Sets the value of [enable_fqdn_network_policy][crate::model::NetworkConfig::enable_fqdn_network_policy].
17678    pub fn set_enable_fqdn_network_policy<T: std::convert::Into<std::option::Option<bool>>>(
17679        mut self,
17680        v: T,
17681    ) -> Self {
17682        self.enable_fqdn_network_policy = v.into();
17683        self
17684    }
17685
17686    /// Sets the value of [in_transit_encryption_config][crate::model::NetworkConfig::in_transit_encryption_config].
17687    pub fn set_in_transit_encryption_config<
17688        T: std::convert::Into<std::option::Option<crate::model::InTransitEncryptionConfig>>,
17689    >(
17690        mut self,
17691        v: T,
17692    ) -> Self {
17693        self.in_transit_encryption_config = v.into();
17694        self
17695    }
17696
17697    /// Sets the value of [enable_cilium_clusterwide_network_policy][crate::model::NetworkConfig::enable_cilium_clusterwide_network_policy].
17698    pub fn set_enable_cilium_clusterwide_network_policy<
17699        T: std::convert::Into<std::option::Option<bool>>,
17700    >(
17701        mut self,
17702        v: T,
17703    ) -> Self {
17704        self.enable_cilium_clusterwide_network_policy = v.into();
17705        self
17706    }
17707
17708    /// Sets the value of [default_enable_private_nodes][crate::model::NetworkConfig::default_enable_private_nodes].
17709    pub fn set_default_enable_private_nodes<T: std::convert::Into<std::option::Option<bool>>>(
17710        mut self,
17711        v: T,
17712    ) -> Self {
17713        self.default_enable_private_nodes = v.into();
17714        self
17715    }
17716}
17717
17718impl wkt::message::Message for NetworkConfig {
17719    fn typename() -> &'static str {
17720        "type.googleapis.com/google.container.v1.NetworkConfig"
17721    }
17722}
17723
17724/// Defines additional types related to [NetworkConfig].
17725pub mod network_config {
17726    #[allow(unused_imports)]
17727    use super::*;
17728
17729    /// Configuration of network bandwidth tiers
17730    #[serde_with::serde_as]
17731    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17732    #[serde(default, rename_all = "camelCase")]
17733    #[non_exhaustive]
17734    pub struct ClusterNetworkPerformanceConfig {
17735        /// Specifies the total network bandwidth tier for NodePools in the cluster.
17736        #[serde(skip_serializing_if = "std::option::Option::is_none")]
17737        pub total_egress_bandwidth_tier: std::option::Option<
17738            crate::model::network_config::cluster_network_performance_config::Tier,
17739        >,
17740
17741        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17742        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17743    }
17744
17745    impl ClusterNetworkPerformanceConfig {
17746        pub fn new() -> Self {
17747            std::default::Default::default()
17748        }
17749
17750        /// Sets the value of [total_egress_bandwidth_tier][crate::model::network_config::ClusterNetworkPerformanceConfig::total_egress_bandwidth_tier].
17751        pub fn set_total_egress_bandwidth_tier<
17752            T: std::convert::Into<
17753                    std::option::Option<
17754                        crate::model::network_config::cluster_network_performance_config::Tier,
17755                    >,
17756                >,
17757        >(
17758            mut self,
17759            v: T,
17760        ) -> Self {
17761            self.total_egress_bandwidth_tier = v.into();
17762            self
17763        }
17764    }
17765
17766    impl wkt::message::Message for ClusterNetworkPerformanceConfig {
17767        fn typename() -> &'static str {
17768            "type.googleapis.com/google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig"
17769        }
17770    }
17771
17772    /// Defines additional types related to [ClusterNetworkPerformanceConfig].
17773    pub mod cluster_network_performance_config {
17774        #[allow(unused_imports)]
17775        use super::*;
17776
17777        /// Node network tier
17778        ///
17779        /// # Working with unknown values
17780        ///
17781        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17782        /// additional enum variants at any time. Adding new variants is not considered
17783        /// a breaking change. Applications should write their code in anticipation of:
17784        ///
17785        /// - New values appearing in future releases of the client library, **and**
17786        /// - New values received dynamically, without application changes.
17787        ///
17788        /// Please consult the [Working with enums] section in the user guide for some
17789        /// guidelines.
17790        ///
17791        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17792        #[derive(Clone, Debug, PartialEq)]
17793        #[non_exhaustive]
17794        pub enum Tier {
17795            /// Default value
17796            Unspecified,
17797            /// Higher bandwidth, actual values based on VM size.
17798            _1,
17799            /// If set, the enum was initialized with an unknown value.
17800            ///
17801            /// Applications can examine the value using [Tier::value] or
17802            /// [Tier::name].
17803            UnknownValue(tier::UnknownValue),
17804        }
17805
17806        #[doc(hidden)]
17807        pub mod tier {
17808            #[allow(unused_imports)]
17809            use super::*;
17810            #[derive(Clone, Debug, PartialEq)]
17811            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17812        }
17813
17814        impl Tier {
17815            /// Gets the enum value.
17816            ///
17817            /// Returns `None` if the enum contains an unknown value deserialized from
17818            /// the string representation of enums.
17819            pub fn value(&self) -> std::option::Option<i32> {
17820                match self {
17821                    Self::Unspecified => std::option::Option::Some(0),
17822                    Self::_1 => std::option::Option::Some(1),
17823                    Self::UnknownValue(u) => u.0.value(),
17824                }
17825            }
17826
17827            /// Gets the enum value as a string.
17828            ///
17829            /// Returns `None` if the enum contains an unknown value deserialized from
17830            /// the integer representation of enums.
17831            pub fn name(&self) -> std::option::Option<&str> {
17832                match self {
17833                    Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
17834                    Self::_1 => std::option::Option::Some("TIER_1"),
17835                    Self::UnknownValue(u) => u.0.name(),
17836                }
17837            }
17838        }
17839
17840        impl std::default::Default for Tier {
17841            fn default() -> Self {
17842                use std::convert::From;
17843                Self::from(0)
17844            }
17845        }
17846
17847        impl std::fmt::Display for Tier {
17848            fn fmt(
17849                &self,
17850                f: &mut std::fmt::Formatter<'_>,
17851            ) -> std::result::Result<(), std::fmt::Error> {
17852                wkt::internal::display_enum(f, self.name(), self.value())
17853            }
17854        }
17855
17856        impl std::convert::From<i32> for Tier {
17857            fn from(value: i32) -> Self {
17858                match value {
17859                    0 => Self::Unspecified,
17860                    1 => Self::_1,
17861                    _ => Self::UnknownValue(tier::UnknownValue(
17862                        wkt::internal::UnknownEnumValue::Integer(value),
17863                    )),
17864                }
17865            }
17866        }
17867
17868        impl std::convert::From<&str> for Tier {
17869            fn from(value: &str) -> Self {
17870                use std::string::ToString;
17871                match value {
17872                    "TIER_UNSPECIFIED" => Self::Unspecified,
17873                    "TIER_1" => Self::_1,
17874                    _ => Self::UnknownValue(tier::UnknownValue(
17875                        wkt::internal::UnknownEnumValue::String(value.to_string()),
17876                    )),
17877                }
17878            }
17879        }
17880
17881        impl serde::ser::Serialize for Tier {
17882            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17883            where
17884                S: serde::Serializer,
17885            {
17886                match self {
17887                    Self::Unspecified => serializer.serialize_i32(0),
17888                    Self::_1 => serializer.serialize_i32(1),
17889                    Self::UnknownValue(u) => u.0.serialize(serializer),
17890                }
17891            }
17892        }
17893
17894        impl<'de> serde::de::Deserialize<'de> for Tier {
17895            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17896            where
17897                D: serde::Deserializer<'de>,
17898            {
17899                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
17900                    ".google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier",
17901                ))
17902            }
17903        }
17904    }
17905}
17906
17907/// GatewayAPIConfig contains the desired config of Gateway API on this cluster.
17908#[serde_with::serde_as]
17909#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17910#[serde(default, rename_all = "camelCase")]
17911#[non_exhaustive]
17912pub struct GatewayAPIConfig {
17913    /// The Gateway API release channel to use for Gateway API.
17914    pub channel: crate::model::gateway_api_config::Channel,
17915
17916    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17917    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17918}
17919
17920impl GatewayAPIConfig {
17921    pub fn new() -> Self {
17922        std::default::Default::default()
17923    }
17924
17925    /// Sets the value of [channel][crate::model::GatewayAPIConfig::channel].
17926    pub fn set_channel<T: std::convert::Into<crate::model::gateway_api_config::Channel>>(
17927        mut self,
17928        v: T,
17929    ) -> Self {
17930        self.channel = v.into();
17931        self
17932    }
17933}
17934
17935impl wkt::message::Message for GatewayAPIConfig {
17936    fn typename() -> &'static str {
17937        "type.googleapis.com/google.container.v1.GatewayAPIConfig"
17938    }
17939}
17940
17941/// Defines additional types related to [GatewayAPIConfig].
17942pub mod gateway_api_config {
17943    #[allow(unused_imports)]
17944    use super::*;
17945
17946    /// Channel describes if/how Gateway API should be installed and implemented in
17947    /// a cluster.
17948    ///
17949    /// # Working with unknown values
17950    ///
17951    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17952    /// additional enum variants at any time. Adding new variants is not considered
17953    /// a breaking change. Applications should write their code in anticipation of:
17954    ///
17955    /// - New values appearing in future releases of the client library, **and**
17956    /// - New values received dynamically, without application changes.
17957    ///
17958    /// Please consult the [Working with enums] section in the user guide for some
17959    /// guidelines.
17960    ///
17961    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17962    #[derive(Clone, Debug, PartialEq)]
17963    #[non_exhaustive]
17964    pub enum Channel {
17965        /// Default value.
17966        Unspecified,
17967        /// Gateway API support is disabled
17968        Disabled,
17969        /// Deprecated: use CHANNEL_STANDARD instead.
17970        /// Gateway API support is enabled, experimental CRDs are installed
17971        #[deprecated]
17972        Experimental,
17973        /// Gateway API support is enabled, standard CRDs are installed
17974        Standard,
17975        /// If set, the enum was initialized with an unknown value.
17976        ///
17977        /// Applications can examine the value using [Channel::value] or
17978        /// [Channel::name].
17979        UnknownValue(channel::UnknownValue),
17980    }
17981
17982    #[doc(hidden)]
17983    pub mod channel {
17984        #[allow(unused_imports)]
17985        use super::*;
17986        #[derive(Clone, Debug, PartialEq)]
17987        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17988    }
17989
17990    impl Channel {
17991        /// Gets the enum value.
17992        ///
17993        /// Returns `None` if the enum contains an unknown value deserialized from
17994        /// the string representation of enums.
17995        pub fn value(&self) -> std::option::Option<i32> {
17996            match self {
17997                Self::Unspecified => std::option::Option::Some(0),
17998                Self::Disabled => std::option::Option::Some(1),
17999                Self::Experimental => std::option::Option::Some(3),
18000                Self::Standard => std::option::Option::Some(4),
18001                Self::UnknownValue(u) => u.0.value(),
18002            }
18003        }
18004
18005        /// Gets the enum value as a string.
18006        ///
18007        /// Returns `None` if the enum contains an unknown value deserialized from
18008        /// the integer representation of enums.
18009        pub fn name(&self) -> std::option::Option<&str> {
18010            match self {
18011                Self::Unspecified => std::option::Option::Some("CHANNEL_UNSPECIFIED"),
18012                Self::Disabled => std::option::Option::Some("CHANNEL_DISABLED"),
18013                Self::Experimental => std::option::Option::Some("CHANNEL_EXPERIMENTAL"),
18014                Self::Standard => std::option::Option::Some("CHANNEL_STANDARD"),
18015                Self::UnknownValue(u) => u.0.name(),
18016            }
18017        }
18018    }
18019
18020    impl std::default::Default for Channel {
18021        fn default() -> Self {
18022            use std::convert::From;
18023            Self::from(0)
18024        }
18025    }
18026
18027    impl std::fmt::Display for Channel {
18028        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18029            wkt::internal::display_enum(f, self.name(), self.value())
18030        }
18031    }
18032
18033    impl std::convert::From<i32> for Channel {
18034        fn from(value: i32) -> Self {
18035            match value {
18036                0 => Self::Unspecified,
18037                1 => Self::Disabled,
18038                3 => Self::Experimental,
18039                4 => Self::Standard,
18040                _ => Self::UnknownValue(channel::UnknownValue(
18041                    wkt::internal::UnknownEnumValue::Integer(value),
18042                )),
18043            }
18044        }
18045    }
18046
18047    impl std::convert::From<&str> for Channel {
18048        fn from(value: &str) -> Self {
18049            use std::string::ToString;
18050            match value {
18051                "CHANNEL_UNSPECIFIED" => Self::Unspecified,
18052                "CHANNEL_DISABLED" => Self::Disabled,
18053                "CHANNEL_EXPERIMENTAL" => Self::Experimental,
18054                "CHANNEL_STANDARD" => Self::Standard,
18055                _ => Self::UnknownValue(channel::UnknownValue(
18056                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18057                )),
18058            }
18059        }
18060    }
18061
18062    impl serde::ser::Serialize for Channel {
18063        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18064        where
18065            S: serde::Serializer,
18066        {
18067            match self {
18068                Self::Unspecified => serializer.serialize_i32(0),
18069                Self::Disabled => serializer.serialize_i32(1),
18070                Self::Experimental => serializer.serialize_i32(3),
18071                Self::Standard => serializer.serialize_i32(4),
18072                Self::UnknownValue(u) => u.0.serialize(serializer),
18073            }
18074        }
18075    }
18076
18077    impl<'de> serde::de::Deserialize<'de> for Channel {
18078        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18079        where
18080            D: serde::Deserializer<'de>,
18081        {
18082            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
18083                ".google.container.v1.GatewayAPIConfig.Channel",
18084            ))
18085        }
18086    }
18087}
18088
18089/// Config to block services with externalIPs field.
18090#[serde_with::serde_as]
18091#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18092#[serde(default, rename_all = "camelCase")]
18093#[non_exhaustive]
18094pub struct ServiceExternalIPsConfig {
18095    /// Whether Services with ExternalIPs field are allowed or not.
18096    #[serde(skip_serializing_if = "wkt::internal::is_default")]
18097    pub enabled: bool,
18098
18099    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18100    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18101}
18102
18103impl ServiceExternalIPsConfig {
18104    pub fn new() -> Self {
18105        std::default::Default::default()
18106    }
18107
18108    /// Sets the value of [enabled][crate::model::ServiceExternalIPsConfig::enabled].
18109    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18110        self.enabled = v.into();
18111        self
18112    }
18113}
18114
18115impl wkt::message::Message for ServiceExternalIPsConfig {
18116    fn typename() -> &'static str {
18117        "type.googleapis.com/google.container.v1.ServiceExternalIPsConfig"
18118    }
18119}
18120
18121/// GetOpenIDConfigRequest gets the OIDC discovery document for the
18122/// cluster. See the OpenID Connect Discovery 1.0 specification for details.
18123#[serde_with::serde_as]
18124#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18125#[serde(default, rename_all = "camelCase")]
18126#[non_exhaustive]
18127pub struct GetOpenIDConfigRequest {
18128    /// The cluster (project, location, cluster name) to get the discovery document
18129    /// for. Specified in the format `projects/*/locations/*/clusters/*`.
18130    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18131    pub parent: std::string::String,
18132
18133    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18134    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18135}
18136
18137impl GetOpenIDConfigRequest {
18138    pub fn new() -> Self {
18139        std::default::Default::default()
18140    }
18141
18142    /// Sets the value of [parent][crate::model::GetOpenIDConfigRequest::parent].
18143    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18144        self.parent = v.into();
18145        self
18146    }
18147}
18148
18149impl wkt::message::Message for GetOpenIDConfigRequest {
18150    fn typename() -> &'static str {
18151        "type.googleapis.com/google.container.v1.GetOpenIDConfigRequest"
18152    }
18153}
18154
18155/// GetOpenIDConfigResponse is an OIDC discovery document for the cluster.
18156/// See the OpenID Connect Discovery 1.0 specification for details.
18157#[serde_with::serde_as]
18158#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18159#[serde(default, rename_all = "camelCase")]
18160#[non_exhaustive]
18161pub struct GetOpenIDConfigResponse {
18162    /// OIDC Issuer.
18163    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18164    pub issuer: std::string::String,
18165
18166    /// JSON Web Key uri.
18167    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18168    pub jwks_uri: std::string::String,
18169
18170    /// Supported response types.
18171    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18172    pub response_types_supported: std::vec::Vec<std::string::String>,
18173
18174    /// Supported subject types.
18175    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18176    pub subject_types_supported: std::vec::Vec<std::string::String>,
18177
18178    /// supported ID Token signing Algorithms.
18179    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18180    pub id_token_signing_alg_values_supported: std::vec::Vec<std::string::String>,
18181
18182    /// Supported claims.
18183    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18184    pub claims_supported: std::vec::Vec<std::string::String>,
18185
18186    /// Supported grant types.
18187    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18188    pub grant_types: std::vec::Vec<std::string::String>,
18189
18190    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18191    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18192}
18193
18194impl GetOpenIDConfigResponse {
18195    pub fn new() -> Self {
18196        std::default::Default::default()
18197    }
18198
18199    /// Sets the value of [issuer][crate::model::GetOpenIDConfigResponse::issuer].
18200    pub fn set_issuer<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18201        self.issuer = v.into();
18202        self
18203    }
18204
18205    /// Sets the value of [jwks_uri][crate::model::GetOpenIDConfigResponse::jwks_uri].
18206    pub fn set_jwks_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18207        self.jwks_uri = v.into();
18208        self
18209    }
18210
18211    /// Sets the value of [response_types_supported][crate::model::GetOpenIDConfigResponse::response_types_supported].
18212    pub fn set_response_types_supported<T, V>(mut self, v: T) -> Self
18213    where
18214        T: std::iter::IntoIterator<Item = V>,
18215        V: std::convert::Into<std::string::String>,
18216    {
18217        use std::iter::Iterator;
18218        self.response_types_supported = v.into_iter().map(|i| i.into()).collect();
18219        self
18220    }
18221
18222    /// Sets the value of [subject_types_supported][crate::model::GetOpenIDConfigResponse::subject_types_supported].
18223    pub fn set_subject_types_supported<T, V>(mut self, v: T) -> Self
18224    where
18225        T: std::iter::IntoIterator<Item = V>,
18226        V: std::convert::Into<std::string::String>,
18227    {
18228        use std::iter::Iterator;
18229        self.subject_types_supported = v.into_iter().map(|i| i.into()).collect();
18230        self
18231    }
18232
18233    /// Sets the value of [id_token_signing_alg_values_supported][crate::model::GetOpenIDConfigResponse::id_token_signing_alg_values_supported].
18234    pub fn set_id_token_signing_alg_values_supported<T, V>(mut self, v: T) -> Self
18235    where
18236        T: std::iter::IntoIterator<Item = V>,
18237        V: std::convert::Into<std::string::String>,
18238    {
18239        use std::iter::Iterator;
18240        self.id_token_signing_alg_values_supported = v.into_iter().map(|i| i.into()).collect();
18241        self
18242    }
18243
18244    /// Sets the value of [claims_supported][crate::model::GetOpenIDConfigResponse::claims_supported].
18245    pub fn set_claims_supported<T, V>(mut self, v: T) -> Self
18246    where
18247        T: std::iter::IntoIterator<Item = V>,
18248        V: std::convert::Into<std::string::String>,
18249    {
18250        use std::iter::Iterator;
18251        self.claims_supported = v.into_iter().map(|i| i.into()).collect();
18252        self
18253    }
18254
18255    /// Sets the value of [grant_types][crate::model::GetOpenIDConfigResponse::grant_types].
18256    pub fn set_grant_types<T, V>(mut self, v: T) -> Self
18257    where
18258        T: std::iter::IntoIterator<Item = V>,
18259        V: std::convert::Into<std::string::String>,
18260    {
18261        use std::iter::Iterator;
18262        self.grant_types = v.into_iter().map(|i| i.into()).collect();
18263        self
18264    }
18265}
18266
18267impl wkt::message::Message for GetOpenIDConfigResponse {
18268    fn typename() -> &'static str {
18269        "type.googleapis.com/google.container.v1.GetOpenIDConfigResponse"
18270    }
18271}
18272
18273/// GetJSONWebKeysRequest gets the public component of the keys used by the
18274/// cluster to sign token requests. This will be the jwks_uri for the discover
18275/// document returned by getOpenIDConfig. See the OpenID Connect
18276/// Discovery 1.0 specification for details.
18277#[serde_with::serde_as]
18278#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18279#[serde(default, rename_all = "camelCase")]
18280#[non_exhaustive]
18281pub struct GetJSONWebKeysRequest {
18282    /// The cluster (project, location, cluster name) to get keys for. Specified in
18283    /// the format `projects/*/locations/*/clusters/*`.
18284    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18285    pub parent: std::string::String,
18286
18287    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18288    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18289}
18290
18291impl GetJSONWebKeysRequest {
18292    pub fn new() -> Self {
18293        std::default::Default::default()
18294    }
18295
18296    /// Sets the value of [parent][crate::model::GetJSONWebKeysRequest::parent].
18297    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18298        self.parent = v.into();
18299        self
18300    }
18301}
18302
18303impl wkt::message::Message for GetJSONWebKeysRequest {
18304    fn typename() -> &'static str {
18305        "type.googleapis.com/google.container.v1.GetJSONWebKeysRequest"
18306    }
18307}
18308
18309/// Jwk is a JSON Web Key as specified in RFC 7517
18310#[serde_with::serde_as]
18311#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18312#[serde(default, rename_all = "camelCase")]
18313#[non_exhaustive]
18314pub struct Jwk {
18315    /// Key Type.
18316    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18317    pub kty: std::string::String,
18318
18319    /// Algorithm.
18320    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18321    pub alg: std::string::String,
18322
18323    /// Permitted uses for the public keys.
18324    #[serde(rename = "use")]
18325    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18326    pub r#use: std::string::String,
18327
18328    /// Key ID.
18329    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18330    pub kid: std::string::String,
18331
18332    /// Used for RSA keys.
18333    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18334    pub n: std::string::String,
18335
18336    /// Used for RSA keys.
18337    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18338    pub e: std::string::String,
18339
18340    /// Used for ECDSA keys.
18341    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18342    pub x: std::string::String,
18343
18344    /// Used for ECDSA keys.
18345    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18346    pub y: std::string::String,
18347
18348    /// Used for ECDSA keys.
18349    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18350    pub crv: std::string::String,
18351
18352    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18353    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18354}
18355
18356impl Jwk {
18357    pub fn new() -> Self {
18358        std::default::Default::default()
18359    }
18360
18361    /// Sets the value of [kty][crate::model::Jwk::kty].
18362    pub fn set_kty<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18363        self.kty = v.into();
18364        self
18365    }
18366
18367    /// Sets the value of [alg][crate::model::Jwk::alg].
18368    pub fn set_alg<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18369        self.alg = v.into();
18370        self
18371    }
18372
18373    /// Sets the value of [r#use][crate::model::Jwk::use].
18374    pub fn set_use<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18375        self.r#use = v.into();
18376        self
18377    }
18378
18379    /// Sets the value of [kid][crate::model::Jwk::kid].
18380    pub fn set_kid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18381        self.kid = v.into();
18382        self
18383    }
18384
18385    /// Sets the value of [n][crate::model::Jwk::n].
18386    pub fn set_n<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18387        self.n = v.into();
18388        self
18389    }
18390
18391    /// Sets the value of [e][crate::model::Jwk::e].
18392    pub fn set_e<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18393        self.e = v.into();
18394        self
18395    }
18396
18397    /// Sets the value of [x][crate::model::Jwk::x].
18398    pub fn set_x<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18399        self.x = v.into();
18400        self
18401    }
18402
18403    /// Sets the value of [y][crate::model::Jwk::y].
18404    pub fn set_y<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18405        self.y = v.into();
18406        self
18407    }
18408
18409    /// Sets the value of [crv][crate::model::Jwk::crv].
18410    pub fn set_crv<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18411        self.crv = v.into();
18412        self
18413    }
18414}
18415
18416impl wkt::message::Message for Jwk {
18417    fn typename() -> &'static str {
18418        "type.googleapis.com/google.container.v1.Jwk"
18419    }
18420}
18421
18422/// GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517
18423#[serde_with::serde_as]
18424#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18425#[serde(default, rename_all = "camelCase")]
18426#[non_exhaustive]
18427pub struct GetJSONWebKeysResponse {
18428    /// The public component of the keys used by the cluster to sign token
18429    /// requests.
18430    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18431    pub keys: std::vec::Vec<crate::model::Jwk>,
18432
18433    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18434    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18435}
18436
18437impl GetJSONWebKeysResponse {
18438    pub fn new() -> Self {
18439        std::default::Default::default()
18440    }
18441
18442    /// Sets the value of [keys][crate::model::GetJSONWebKeysResponse::keys].
18443    pub fn set_keys<T, V>(mut self, v: T) -> Self
18444    where
18445        T: std::iter::IntoIterator<Item = V>,
18446        V: std::convert::Into<crate::model::Jwk>,
18447    {
18448        use std::iter::Iterator;
18449        self.keys = v.into_iter().map(|i| i.into()).collect();
18450        self
18451    }
18452}
18453
18454impl wkt::message::Message for GetJSONWebKeysResponse {
18455    fn typename() -> &'static str {
18456        "type.googleapis.com/google.container.v1.GetJSONWebKeysResponse"
18457    }
18458}
18459
18460/// CheckAutopilotCompatibilityRequest requests getting the blockers for the
18461/// given operation in the cluster.
18462#[serde_with::serde_as]
18463#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18464#[serde(default, rename_all = "camelCase")]
18465#[non_exhaustive]
18466pub struct CheckAutopilotCompatibilityRequest {
18467    /// The name (project, location, cluster) of the cluster to retrieve.
18468    /// Specified in the format `projects/*/locations/*/clusters/*`.
18469    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18470    pub name: std::string::String,
18471
18472    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18473    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18474}
18475
18476impl CheckAutopilotCompatibilityRequest {
18477    pub fn new() -> Self {
18478        std::default::Default::default()
18479    }
18480
18481    /// Sets the value of [name][crate::model::CheckAutopilotCompatibilityRequest::name].
18482    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18483        self.name = v.into();
18484        self
18485    }
18486}
18487
18488impl wkt::message::Message for CheckAutopilotCompatibilityRequest {
18489    fn typename() -> &'static str {
18490        "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityRequest"
18491    }
18492}
18493
18494/// AutopilotCompatibilityIssue contains information about a specific
18495/// compatibility issue with Autopilot mode.
18496#[serde_with::serde_as]
18497#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18498#[serde(default, rename_all = "camelCase")]
18499#[non_exhaustive]
18500pub struct AutopilotCompatibilityIssue {
18501    /// The last time when this issue was observed.
18502    #[serde(skip_serializing_if = "std::option::Option::is_none")]
18503    pub last_observation: std::option::Option<wkt::Timestamp>,
18504
18505    /// The constraint type of the issue.
18506    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18507    pub constraint_type: std::string::String,
18508
18509    /// The incompatibility type of this issue.
18510    pub incompatibility_type: crate::model::autopilot_compatibility_issue::IssueType,
18511
18512    /// The name of the resources which are subject to this issue.
18513    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18514    pub subjects: std::vec::Vec<std::string::String>,
18515
18516    /// A URL to a public documnetation, which addresses resolving this issue.
18517    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18518    pub documentation_url: std::string::String,
18519
18520    /// The description of the issue.
18521    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18522    pub description: std::string::String,
18523
18524    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18525    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18526}
18527
18528impl AutopilotCompatibilityIssue {
18529    pub fn new() -> Self {
18530        std::default::Default::default()
18531    }
18532
18533    /// Sets the value of [last_observation][crate::model::AutopilotCompatibilityIssue::last_observation].
18534    pub fn set_last_observation<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
18535        mut self,
18536        v: T,
18537    ) -> Self {
18538        self.last_observation = v.into();
18539        self
18540    }
18541
18542    /// Sets the value of [constraint_type][crate::model::AutopilotCompatibilityIssue::constraint_type].
18543    pub fn set_constraint_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18544        self.constraint_type = v.into();
18545        self
18546    }
18547
18548    /// Sets the value of [incompatibility_type][crate::model::AutopilotCompatibilityIssue::incompatibility_type].
18549    pub fn set_incompatibility_type<
18550        T: std::convert::Into<crate::model::autopilot_compatibility_issue::IssueType>,
18551    >(
18552        mut self,
18553        v: T,
18554    ) -> Self {
18555        self.incompatibility_type = v.into();
18556        self
18557    }
18558
18559    /// Sets the value of [subjects][crate::model::AutopilotCompatibilityIssue::subjects].
18560    pub fn set_subjects<T, V>(mut self, v: T) -> Self
18561    where
18562        T: std::iter::IntoIterator<Item = V>,
18563        V: std::convert::Into<std::string::String>,
18564    {
18565        use std::iter::Iterator;
18566        self.subjects = v.into_iter().map(|i| i.into()).collect();
18567        self
18568    }
18569
18570    /// Sets the value of [documentation_url][crate::model::AutopilotCompatibilityIssue::documentation_url].
18571    pub fn set_documentation_url<T: std::convert::Into<std::string::String>>(
18572        mut self,
18573        v: T,
18574    ) -> Self {
18575        self.documentation_url = v.into();
18576        self
18577    }
18578
18579    /// Sets the value of [description][crate::model::AutopilotCompatibilityIssue::description].
18580    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18581        self.description = v.into();
18582        self
18583    }
18584}
18585
18586impl wkt::message::Message for AutopilotCompatibilityIssue {
18587    fn typename() -> &'static str {
18588        "type.googleapis.com/google.container.v1.AutopilotCompatibilityIssue"
18589    }
18590}
18591
18592/// Defines additional types related to [AutopilotCompatibilityIssue].
18593pub mod autopilot_compatibility_issue {
18594    #[allow(unused_imports)]
18595    use super::*;
18596
18597    /// The type of the reported issue.
18598    ///
18599    /// # Working with unknown values
18600    ///
18601    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18602    /// additional enum variants at any time. Adding new variants is not considered
18603    /// a breaking change. Applications should write their code in anticipation of:
18604    ///
18605    /// - New values appearing in future releases of the client library, **and**
18606    /// - New values received dynamically, without application changes.
18607    ///
18608    /// Please consult the [Working with enums] section in the user guide for some
18609    /// guidelines.
18610    ///
18611    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18612    #[derive(Clone, Debug, PartialEq)]
18613    #[non_exhaustive]
18614    pub enum IssueType {
18615        /// Default value, should not be used.
18616        Unspecified,
18617        /// Indicates that the issue is a known incompatibility between the
18618        /// cluster and Autopilot mode.
18619        Incompatibility,
18620        /// Indicates the issue is an incompatibility if customers take no further
18621        /// action to resolve.
18622        AdditionalConfigRequired,
18623        /// Indicates the issue is not an incompatibility, but depending on the
18624        /// workloads business logic, there is a potential that they won't work on
18625        /// Autopilot.
18626        PassedWithOptionalConfig,
18627        /// If set, the enum was initialized with an unknown value.
18628        ///
18629        /// Applications can examine the value using [IssueType::value] or
18630        /// [IssueType::name].
18631        UnknownValue(issue_type::UnknownValue),
18632    }
18633
18634    #[doc(hidden)]
18635    pub mod issue_type {
18636        #[allow(unused_imports)]
18637        use super::*;
18638        #[derive(Clone, Debug, PartialEq)]
18639        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18640    }
18641
18642    impl IssueType {
18643        /// Gets the enum value.
18644        ///
18645        /// Returns `None` if the enum contains an unknown value deserialized from
18646        /// the string representation of enums.
18647        pub fn value(&self) -> std::option::Option<i32> {
18648            match self {
18649                Self::Unspecified => std::option::Option::Some(0),
18650                Self::Incompatibility => std::option::Option::Some(1),
18651                Self::AdditionalConfigRequired => std::option::Option::Some(2),
18652                Self::PassedWithOptionalConfig => std::option::Option::Some(3),
18653                Self::UnknownValue(u) => u.0.value(),
18654            }
18655        }
18656
18657        /// Gets the enum value as a string.
18658        ///
18659        /// Returns `None` if the enum contains an unknown value deserialized from
18660        /// the integer representation of enums.
18661        pub fn name(&self) -> std::option::Option<&str> {
18662            match self {
18663                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
18664                Self::Incompatibility => std::option::Option::Some("INCOMPATIBILITY"),
18665                Self::AdditionalConfigRequired => {
18666                    std::option::Option::Some("ADDITIONAL_CONFIG_REQUIRED")
18667                }
18668                Self::PassedWithOptionalConfig => {
18669                    std::option::Option::Some("PASSED_WITH_OPTIONAL_CONFIG")
18670                }
18671                Self::UnknownValue(u) => u.0.name(),
18672            }
18673        }
18674    }
18675
18676    impl std::default::Default for IssueType {
18677        fn default() -> Self {
18678            use std::convert::From;
18679            Self::from(0)
18680        }
18681    }
18682
18683    impl std::fmt::Display for IssueType {
18684        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18685            wkt::internal::display_enum(f, self.name(), self.value())
18686        }
18687    }
18688
18689    impl std::convert::From<i32> for IssueType {
18690        fn from(value: i32) -> Self {
18691            match value {
18692                0 => Self::Unspecified,
18693                1 => Self::Incompatibility,
18694                2 => Self::AdditionalConfigRequired,
18695                3 => Self::PassedWithOptionalConfig,
18696                _ => Self::UnknownValue(issue_type::UnknownValue(
18697                    wkt::internal::UnknownEnumValue::Integer(value),
18698                )),
18699            }
18700        }
18701    }
18702
18703    impl std::convert::From<&str> for IssueType {
18704        fn from(value: &str) -> Self {
18705            use std::string::ToString;
18706            match value {
18707                "UNSPECIFIED" => Self::Unspecified,
18708                "INCOMPATIBILITY" => Self::Incompatibility,
18709                "ADDITIONAL_CONFIG_REQUIRED" => Self::AdditionalConfigRequired,
18710                "PASSED_WITH_OPTIONAL_CONFIG" => Self::PassedWithOptionalConfig,
18711                _ => Self::UnknownValue(issue_type::UnknownValue(
18712                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18713                )),
18714            }
18715        }
18716    }
18717
18718    impl serde::ser::Serialize for IssueType {
18719        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18720        where
18721            S: serde::Serializer,
18722        {
18723            match self {
18724                Self::Unspecified => serializer.serialize_i32(0),
18725                Self::Incompatibility => serializer.serialize_i32(1),
18726                Self::AdditionalConfigRequired => serializer.serialize_i32(2),
18727                Self::PassedWithOptionalConfig => serializer.serialize_i32(3),
18728                Self::UnknownValue(u) => u.0.serialize(serializer),
18729            }
18730        }
18731    }
18732
18733    impl<'de> serde::de::Deserialize<'de> for IssueType {
18734        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18735        where
18736            D: serde::Deserializer<'de>,
18737        {
18738            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IssueType>::new(
18739                ".google.container.v1.AutopilotCompatibilityIssue.IssueType",
18740            ))
18741        }
18742    }
18743}
18744
18745/// CheckAutopilotCompatibilityResponse has a list of compatibility issues.
18746#[serde_with::serde_as]
18747#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18748#[serde(default, rename_all = "camelCase")]
18749#[non_exhaustive]
18750pub struct CheckAutopilotCompatibilityResponse {
18751    /// The list of issues for the given operation.
18752    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18753    pub issues: std::vec::Vec<crate::model::AutopilotCompatibilityIssue>,
18754
18755    /// The summary of the autopilot compatibility response.
18756    #[serde(skip_serializing_if = "std::string::String::is_empty")]
18757    pub summary: std::string::String,
18758
18759    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18760    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18761}
18762
18763impl CheckAutopilotCompatibilityResponse {
18764    pub fn new() -> Self {
18765        std::default::Default::default()
18766    }
18767
18768    /// Sets the value of [issues][crate::model::CheckAutopilotCompatibilityResponse::issues].
18769    pub fn set_issues<T, V>(mut self, v: T) -> Self
18770    where
18771        T: std::iter::IntoIterator<Item = V>,
18772        V: std::convert::Into<crate::model::AutopilotCompatibilityIssue>,
18773    {
18774        use std::iter::Iterator;
18775        self.issues = v.into_iter().map(|i| i.into()).collect();
18776        self
18777    }
18778
18779    /// Sets the value of [summary][crate::model::CheckAutopilotCompatibilityResponse::summary].
18780    pub fn set_summary<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18781        self.summary = v.into();
18782        self
18783    }
18784}
18785
18786impl wkt::message::Message for CheckAutopilotCompatibilityResponse {
18787    fn typename() -> &'static str {
18788        "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityResponse"
18789    }
18790}
18791
18792/// ReleaseChannel indicates which release channel a cluster is
18793/// subscribed to. Release channels are arranged in order of risk.
18794///
18795/// When a cluster is subscribed to a release channel, Google maintains
18796/// both the master version and the node version. Node auto-upgrade
18797/// defaults to true and cannot be disabled.
18798#[serde_with::serde_as]
18799#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18800#[serde(default, rename_all = "camelCase")]
18801#[non_exhaustive]
18802pub struct ReleaseChannel {
18803    /// channel specifies which release channel the cluster is subscribed to.
18804    pub channel: crate::model::release_channel::Channel,
18805
18806    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18807    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18808}
18809
18810impl ReleaseChannel {
18811    pub fn new() -> Self {
18812        std::default::Default::default()
18813    }
18814
18815    /// Sets the value of [channel][crate::model::ReleaseChannel::channel].
18816    pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
18817        mut self,
18818        v: T,
18819    ) -> Self {
18820        self.channel = v.into();
18821        self
18822    }
18823}
18824
18825impl wkt::message::Message for ReleaseChannel {
18826    fn typename() -> &'static str {
18827        "type.googleapis.com/google.container.v1.ReleaseChannel"
18828    }
18829}
18830
18831/// Defines additional types related to [ReleaseChannel].
18832pub mod release_channel {
18833    #[allow(unused_imports)]
18834    use super::*;
18835
18836    /// Possible values for 'channel'.
18837    ///
18838    /// # Working with unknown values
18839    ///
18840    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18841    /// additional enum variants at any time. Adding new variants is not considered
18842    /// a breaking change. Applications should write their code in anticipation of:
18843    ///
18844    /// - New values appearing in future releases of the client library, **and**
18845    /// - New values received dynamically, without application changes.
18846    ///
18847    /// Please consult the [Working with enums] section in the user guide for some
18848    /// guidelines.
18849    ///
18850    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18851    #[derive(Clone, Debug, PartialEq)]
18852    #[non_exhaustive]
18853    pub enum Channel {
18854        /// No channel specified.
18855        Unspecified,
18856        /// RAPID channel is offered on an early access basis for customers who want
18857        /// to test new releases.
18858        ///
18859        /// WARNING: Versions available in the RAPID Channel may be subject to
18860        /// unresolved issues with no known workaround and are not subject to any
18861        /// SLAs.
18862        Rapid,
18863        /// Clusters subscribed to REGULAR receive versions that are considered GA
18864        /// quality. REGULAR is intended for production users who want to take
18865        /// advantage of new features.
18866        Regular,
18867        /// Clusters subscribed to STABLE receive versions that are known to be
18868        /// stable and reliable in production.
18869        Stable,
18870        /// Clusters subscribed to EXTENDED receive extended support and availability
18871        /// for versions which are known to be stable and reliable in production.
18872        Extended,
18873        /// If set, the enum was initialized with an unknown value.
18874        ///
18875        /// Applications can examine the value using [Channel::value] or
18876        /// [Channel::name].
18877        UnknownValue(channel::UnknownValue),
18878    }
18879
18880    #[doc(hidden)]
18881    pub mod channel {
18882        #[allow(unused_imports)]
18883        use super::*;
18884        #[derive(Clone, Debug, PartialEq)]
18885        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18886    }
18887
18888    impl Channel {
18889        /// Gets the enum value.
18890        ///
18891        /// Returns `None` if the enum contains an unknown value deserialized from
18892        /// the string representation of enums.
18893        pub fn value(&self) -> std::option::Option<i32> {
18894            match self {
18895                Self::Unspecified => std::option::Option::Some(0),
18896                Self::Rapid => std::option::Option::Some(1),
18897                Self::Regular => std::option::Option::Some(2),
18898                Self::Stable => std::option::Option::Some(3),
18899                Self::Extended => std::option::Option::Some(4),
18900                Self::UnknownValue(u) => u.0.value(),
18901            }
18902        }
18903
18904        /// Gets the enum value as a string.
18905        ///
18906        /// Returns `None` if the enum contains an unknown value deserialized from
18907        /// the integer representation of enums.
18908        pub fn name(&self) -> std::option::Option<&str> {
18909            match self {
18910                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
18911                Self::Rapid => std::option::Option::Some("RAPID"),
18912                Self::Regular => std::option::Option::Some("REGULAR"),
18913                Self::Stable => std::option::Option::Some("STABLE"),
18914                Self::Extended => std::option::Option::Some("EXTENDED"),
18915                Self::UnknownValue(u) => u.0.name(),
18916            }
18917        }
18918    }
18919
18920    impl std::default::Default for Channel {
18921        fn default() -> Self {
18922            use std::convert::From;
18923            Self::from(0)
18924        }
18925    }
18926
18927    impl std::fmt::Display for Channel {
18928        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18929            wkt::internal::display_enum(f, self.name(), self.value())
18930        }
18931    }
18932
18933    impl std::convert::From<i32> for Channel {
18934        fn from(value: i32) -> Self {
18935            match value {
18936                0 => Self::Unspecified,
18937                1 => Self::Rapid,
18938                2 => Self::Regular,
18939                3 => Self::Stable,
18940                4 => Self::Extended,
18941                _ => Self::UnknownValue(channel::UnknownValue(
18942                    wkt::internal::UnknownEnumValue::Integer(value),
18943                )),
18944            }
18945        }
18946    }
18947
18948    impl std::convert::From<&str> for Channel {
18949        fn from(value: &str) -> Self {
18950            use std::string::ToString;
18951            match value {
18952                "UNSPECIFIED" => Self::Unspecified,
18953                "RAPID" => Self::Rapid,
18954                "REGULAR" => Self::Regular,
18955                "STABLE" => Self::Stable,
18956                "EXTENDED" => Self::Extended,
18957                _ => Self::UnknownValue(channel::UnknownValue(
18958                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18959                )),
18960            }
18961        }
18962    }
18963
18964    impl serde::ser::Serialize for Channel {
18965        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18966        where
18967            S: serde::Serializer,
18968        {
18969            match self {
18970                Self::Unspecified => serializer.serialize_i32(0),
18971                Self::Rapid => serializer.serialize_i32(1),
18972                Self::Regular => serializer.serialize_i32(2),
18973                Self::Stable => serializer.serialize_i32(3),
18974                Self::Extended => serializer.serialize_i32(4),
18975                Self::UnknownValue(u) => u.0.serialize(serializer),
18976            }
18977        }
18978    }
18979
18980    impl<'de> serde::de::Deserialize<'de> for Channel {
18981        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18982        where
18983            D: serde::Deserializer<'de>,
18984        {
18985            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
18986                ".google.container.v1.ReleaseChannel.Channel",
18987            ))
18988        }
18989    }
18990}
18991
18992/// Configuration for fine-grained cost management feature.
18993#[serde_with::serde_as]
18994#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18995#[serde(default, rename_all = "camelCase")]
18996#[non_exhaustive]
18997pub struct CostManagementConfig {
18998    /// Whether the feature is enabled or not.
18999    #[serde(skip_serializing_if = "wkt::internal::is_default")]
19000    pub enabled: bool,
19001
19002    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19003    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19004}
19005
19006impl CostManagementConfig {
19007    pub fn new() -> Self {
19008        std::default::Default::default()
19009    }
19010
19011    /// Sets the value of [enabled][crate::model::CostManagementConfig::enabled].
19012    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19013        self.enabled = v.into();
19014        self
19015    }
19016}
19017
19018impl wkt::message::Message for CostManagementConfig {
19019    fn typename() -> &'static str {
19020        "type.googleapis.com/google.container.v1.CostManagementConfig"
19021    }
19022}
19023
19024/// IntraNodeVisibilityConfig contains the desired config of the intra-node
19025/// visibility on this cluster.
19026#[serde_with::serde_as]
19027#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19028#[serde(default, rename_all = "camelCase")]
19029#[non_exhaustive]
19030pub struct IntraNodeVisibilityConfig {
19031    /// Enables intra node visibility for this cluster.
19032    #[serde(skip_serializing_if = "wkt::internal::is_default")]
19033    pub enabled: bool,
19034
19035    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19036    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19037}
19038
19039impl IntraNodeVisibilityConfig {
19040    pub fn new() -> Self {
19041        std::default::Default::default()
19042    }
19043
19044    /// Sets the value of [enabled][crate::model::IntraNodeVisibilityConfig::enabled].
19045    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19046        self.enabled = v.into();
19047        self
19048    }
19049}
19050
19051impl wkt::message::Message for IntraNodeVisibilityConfig {
19052    fn typename() -> &'static str {
19053        "type.googleapis.com/google.container.v1.IntraNodeVisibilityConfig"
19054    }
19055}
19056
19057/// ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer
19058/// subsetting on this cluster.
19059#[serde_with::serde_as]
19060#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19061#[serde(default, rename_all = "camelCase")]
19062#[non_exhaustive]
19063pub struct ILBSubsettingConfig {
19064    /// Enables l4 ILB subsetting for this cluster.
19065    #[serde(skip_serializing_if = "wkt::internal::is_default")]
19066    pub enabled: bool,
19067
19068    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19069    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19070}
19071
19072impl ILBSubsettingConfig {
19073    pub fn new() -> Self {
19074        std::default::Default::default()
19075    }
19076
19077    /// Sets the value of [enabled][crate::model::ILBSubsettingConfig::enabled].
19078    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19079        self.enabled = v.into();
19080        self
19081    }
19082}
19083
19084impl wkt::message::Message for ILBSubsettingConfig {
19085    fn typename() -> &'static str {
19086        "type.googleapis.com/google.container.v1.ILBSubsettingConfig"
19087    }
19088}
19089
19090/// DNSConfig contains the desired set of options for configuring clusterDNS.
19091#[serde_with::serde_as]
19092#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19093#[serde(default, rename_all = "camelCase")]
19094#[non_exhaustive]
19095pub struct DNSConfig {
19096    /// cluster_dns indicates which in-cluster DNS provider should be used.
19097    pub cluster_dns: crate::model::dns_config::Provider,
19098
19099    /// cluster_dns_scope indicates the scope of access to cluster DNS records.
19100    pub cluster_dns_scope: crate::model::dns_config::DNSScope,
19101
19102    /// cluster_dns_domain is the suffix used for all cluster service records.
19103    #[serde(skip_serializing_if = "std::string::String::is_empty")]
19104    pub cluster_dns_domain: std::string::String,
19105
19106    /// Optional. The domain used in Additive VPC scope.
19107    #[serde(skip_serializing_if = "std::string::String::is_empty")]
19108    pub additive_vpc_scope_dns_domain: std::string::String,
19109
19110    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19111    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19112}
19113
19114impl DNSConfig {
19115    pub fn new() -> Self {
19116        std::default::Default::default()
19117    }
19118
19119    /// Sets the value of [cluster_dns][crate::model::DNSConfig::cluster_dns].
19120    pub fn set_cluster_dns<T: std::convert::Into<crate::model::dns_config::Provider>>(
19121        mut self,
19122        v: T,
19123    ) -> Self {
19124        self.cluster_dns = v.into();
19125        self
19126    }
19127
19128    /// Sets the value of [cluster_dns_scope][crate::model::DNSConfig::cluster_dns_scope].
19129    pub fn set_cluster_dns_scope<T: std::convert::Into<crate::model::dns_config::DNSScope>>(
19130        mut self,
19131        v: T,
19132    ) -> Self {
19133        self.cluster_dns_scope = v.into();
19134        self
19135    }
19136
19137    /// Sets the value of [cluster_dns_domain][crate::model::DNSConfig::cluster_dns_domain].
19138    pub fn set_cluster_dns_domain<T: std::convert::Into<std::string::String>>(
19139        mut self,
19140        v: T,
19141    ) -> Self {
19142        self.cluster_dns_domain = v.into();
19143        self
19144    }
19145
19146    /// Sets the value of [additive_vpc_scope_dns_domain][crate::model::DNSConfig::additive_vpc_scope_dns_domain].
19147    pub fn set_additive_vpc_scope_dns_domain<T: std::convert::Into<std::string::String>>(
19148        mut self,
19149        v: T,
19150    ) -> Self {
19151        self.additive_vpc_scope_dns_domain = v.into();
19152        self
19153    }
19154}
19155
19156impl wkt::message::Message for DNSConfig {
19157    fn typename() -> &'static str {
19158        "type.googleapis.com/google.container.v1.DNSConfig"
19159    }
19160}
19161
19162/// Defines additional types related to [DNSConfig].
19163pub mod dns_config {
19164    #[allow(unused_imports)]
19165    use super::*;
19166
19167    /// Provider lists the various in-cluster DNS providers.
19168    ///
19169    /// # Working with unknown values
19170    ///
19171    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19172    /// additional enum variants at any time. Adding new variants is not considered
19173    /// a breaking change. Applications should write their code in anticipation of:
19174    ///
19175    /// - New values appearing in future releases of the client library, **and**
19176    /// - New values received dynamically, without application changes.
19177    ///
19178    /// Please consult the [Working with enums] section in the user guide for some
19179    /// guidelines.
19180    ///
19181    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19182    #[derive(Clone, Debug, PartialEq)]
19183    #[non_exhaustive]
19184    pub enum Provider {
19185        /// Default value
19186        Unspecified,
19187        /// Use GKE default DNS provider(kube-dns) for DNS resolution.
19188        PlatformDefault,
19189        /// Use CloudDNS for DNS resolution.
19190        CloudDns,
19191        /// Use KubeDNS for DNS resolution.
19192        KubeDns,
19193        /// If set, the enum was initialized with an unknown value.
19194        ///
19195        /// Applications can examine the value using [Provider::value] or
19196        /// [Provider::name].
19197        UnknownValue(provider::UnknownValue),
19198    }
19199
19200    #[doc(hidden)]
19201    pub mod provider {
19202        #[allow(unused_imports)]
19203        use super::*;
19204        #[derive(Clone, Debug, PartialEq)]
19205        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19206    }
19207
19208    impl Provider {
19209        /// Gets the enum value.
19210        ///
19211        /// Returns `None` if the enum contains an unknown value deserialized from
19212        /// the string representation of enums.
19213        pub fn value(&self) -> std::option::Option<i32> {
19214            match self {
19215                Self::Unspecified => std::option::Option::Some(0),
19216                Self::PlatformDefault => std::option::Option::Some(1),
19217                Self::CloudDns => std::option::Option::Some(2),
19218                Self::KubeDns => std::option::Option::Some(3),
19219                Self::UnknownValue(u) => u.0.value(),
19220            }
19221        }
19222
19223        /// Gets the enum value as a string.
19224        ///
19225        /// Returns `None` if the enum contains an unknown value deserialized from
19226        /// the integer representation of enums.
19227        pub fn name(&self) -> std::option::Option<&str> {
19228            match self {
19229                Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
19230                Self::PlatformDefault => std::option::Option::Some("PLATFORM_DEFAULT"),
19231                Self::CloudDns => std::option::Option::Some("CLOUD_DNS"),
19232                Self::KubeDns => std::option::Option::Some("KUBE_DNS"),
19233                Self::UnknownValue(u) => u.0.name(),
19234            }
19235        }
19236    }
19237
19238    impl std::default::Default for Provider {
19239        fn default() -> Self {
19240            use std::convert::From;
19241            Self::from(0)
19242        }
19243    }
19244
19245    impl std::fmt::Display for Provider {
19246        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19247            wkt::internal::display_enum(f, self.name(), self.value())
19248        }
19249    }
19250
19251    impl std::convert::From<i32> for Provider {
19252        fn from(value: i32) -> Self {
19253            match value {
19254                0 => Self::Unspecified,
19255                1 => Self::PlatformDefault,
19256                2 => Self::CloudDns,
19257                3 => Self::KubeDns,
19258                _ => Self::UnknownValue(provider::UnknownValue(
19259                    wkt::internal::UnknownEnumValue::Integer(value),
19260                )),
19261            }
19262        }
19263    }
19264
19265    impl std::convert::From<&str> for Provider {
19266        fn from(value: &str) -> Self {
19267            use std::string::ToString;
19268            match value {
19269                "PROVIDER_UNSPECIFIED" => Self::Unspecified,
19270                "PLATFORM_DEFAULT" => Self::PlatformDefault,
19271                "CLOUD_DNS" => Self::CloudDns,
19272                "KUBE_DNS" => Self::KubeDns,
19273                _ => Self::UnknownValue(provider::UnknownValue(
19274                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19275                )),
19276            }
19277        }
19278    }
19279
19280    impl serde::ser::Serialize for Provider {
19281        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19282        where
19283            S: serde::Serializer,
19284        {
19285            match self {
19286                Self::Unspecified => serializer.serialize_i32(0),
19287                Self::PlatformDefault => serializer.serialize_i32(1),
19288                Self::CloudDns => serializer.serialize_i32(2),
19289                Self::KubeDns => serializer.serialize_i32(3),
19290                Self::UnknownValue(u) => u.0.serialize(serializer),
19291            }
19292        }
19293    }
19294
19295    impl<'de> serde::de::Deserialize<'de> for Provider {
19296        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19297        where
19298            D: serde::Deserializer<'de>,
19299        {
19300            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
19301                ".google.container.v1.DNSConfig.Provider",
19302            ))
19303        }
19304    }
19305
19306    /// DNSScope lists the various scopes of access to cluster DNS records.
19307    ///
19308    /// # Working with unknown values
19309    ///
19310    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19311    /// additional enum variants at any time. Adding new variants is not considered
19312    /// a breaking change. Applications should write their code in anticipation of:
19313    ///
19314    /// - New values appearing in future releases of the client library, **and**
19315    /// - New values received dynamically, without application changes.
19316    ///
19317    /// Please consult the [Working with enums] section in the user guide for some
19318    /// guidelines.
19319    ///
19320    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19321    #[derive(Clone, Debug, PartialEq)]
19322    #[non_exhaustive]
19323    pub enum DNSScope {
19324        /// Default value, will be inferred as cluster scope.
19325        Unspecified,
19326        /// DNS records are accessible from within the cluster.
19327        ClusterScope,
19328        /// DNS records are accessible from within the VPC.
19329        VpcScope,
19330        /// If set, the enum was initialized with an unknown value.
19331        ///
19332        /// Applications can examine the value using [DNSScope::value] or
19333        /// [DNSScope::name].
19334        UnknownValue(dns_scope::UnknownValue),
19335    }
19336
19337    #[doc(hidden)]
19338    pub mod dns_scope {
19339        #[allow(unused_imports)]
19340        use super::*;
19341        #[derive(Clone, Debug, PartialEq)]
19342        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19343    }
19344
19345    impl DNSScope {
19346        /// Gets the enum value.
19347        ///
19348        /// Returns `None` if the enum contains an unknown value deserialized from
19349        /// the string representation of enums.
19350        pub fn value(&self) -> std::option::Option<i32> {
19351            match self {
19352                Self::Unspecified => std::option::Option::Some(0),
19353                Self::ClusterScope => std::option::Option::Some(1),
19354                Self::VpcScope => std::option::Option::Some(2),
19355                Self::UnknownValue(u) => u.0.value(),
19356            }
19357        }
19358
19359        /// Gets the enum value as a string.
19360        ///
19361        /// Returns `None` if the enum contains an unknown value deserialized from
19362        /// the integer representation of enums.
19363        pub fn name(&self) -> std::option::Option<&str> {
19364            match self {
19365                Self::Unspecified => std::option::Option::Some("DNS_SCOPE_UNSPECIFIED"),
19366                Self::ClusterScope => std::option::Option::Some("CLUSTER_SCOPE"),
19367                Self::VpcScope => std::option::Option::Some("VPC_SCOPE"),
19368                Self::UnknownValue(u) => u.0.name(),
19369            }
19370        }
19371    }
19372
19373    impl std::default::Default for DNSScope {
19374        fn default() -> Self {
19375            use std::convert::From;
19376            Self::from(0)
19377        }
19378    }
19379
19380    impl std::fmt::Display for DNSScope {
19381        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19382            wkt::internal::display_enum(f, self.name(), self.value())
19383        }
19384    }
19385
19386    impl std::convert::From<i32> for DNSScope {
19387        fn from(value: i32) -> Self {
19388            match value {
19389                0 => Self::Unspecified,
19390                1 => Self::ClusterScope,
19391                2 => Self::VpcScope,
19392                _ => Self::UnknownValue(dns_scope::UnknownValue(
19393                    wkt::internal::UnknownEnumValue::Integer(value),
19394                )),
19395            }
19396        }
19397    }
19398
19399    impl std::convert::From<&str> for DNSScope {
19400        fn from(value: &str) -> Self {
19401            use std::string::ToString;
19402            match value {
19403                "DNS_SCOPE_UNSPECIFIED" => Self::Unspecified,
19404                "CLUSTER_SCOPE" => Self::ClusterScope,
19405                "VPC_SCOPE" => Self::VpcScope,
19406                _ => Self::UnknownValue(dns_scope::UnknownValue(
19407                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19408                )),
19409            }
19410        }
19411    }
19412
19413    impl serde::ser::Serialize for DNSScope {
19414        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19415        where
19416            S: serde::Serializer,
19417        {
19418            match self {
19419                Self::Unspecified => serializer.serialize_i32(0),
19420                Self::ClusterScope => serializer.serialize_i32(1),
19421                Self::VpcScope => serializer.serialize_i32(2),
19422                Self::UnknownValue(u) => u.0.serialize(serializer),
19423            }
19424        }
19425    }
19426
19427    impl<'de> serde::de::Deserialize<'de> for DNSScope {
19428        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19429        where
19430            D: serde::Deserializer<'de>,
19431        {
19432            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DNSScope>::new(
19433                ".google.container.v1.DNSConfig.DNSScope",
19434            ))
19435        }
19436    }
19437}
19438
19439/// Constraints applied to pods.
19440#[serde_with::serde_as]
19441#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19442#[serde(default, rename_all = "camelCase")]
19443#[non_exhaustive]
19444pub struct MaxPodsConstraint {
19445    /// Constraint enforced on the max num of pods per node.
19446    #[serde(skip_serializing_if = "wkt::internal::is_default")]
19447    #[serde_as(as = "serde_with::DisplayFromStr")]
19448    pub max_pods_per_node: i64,
19449
19450    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19451    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19452}
19453
19454impl MaxPodsConstraint {
19455    pub fn new() -> Self {
19456        std::default::Default::default()
19457    }
19458
19459    /// Sets the value of [max_pods_per_node][crate::model::MaxPodsConstraint::max_pods_per_node].
19460    pub fn set_max_pods_per_node<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19461        self.max_pods_per_node = v.into();
19462        self
19463    }
19464}
19465
19466impl wkt::message::Message for MaxPodsConstraint {
19467    fn typename() -> &'static str {
19468        "type.googleapis.com/google.container.v1.MaxPodsConstraint"
19469    }
19470}
19471
19472/// Configuration for the use of Kubernetes Service Accounts in GCP IAM
19473/// policies.
19474#[serde_with::serde_as]
19475#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19476#[serde(default, rename_all = "camelCase")]
19477#[non_exhaustive]
19478pub struct WorkloadIdentityConfig {
19479    /// The workload pool to attach all Kubernetes service accounts to.
19480    #[serde(skip_serializing_if = "std::string::String::is_empty")]
19481    pub workload_pool: std::string::String,
19482
19483    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19484    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19485}
19486
19487impl WorkloadIdentityConfig {
19488    pub fn new() -> Self {
19489        std::default::Default::default()
19490    }
19491
19492    /// Sets the value of [workload_pool][crate::model::WorkloadIdentityConfig::workload_pool].
19493    pub fn set_workload_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19494        self.workload_pool = v.into();
19495        self
19496    }
19497}
19498
19499impl wkt::message::Message for WorkloadIdentityConfig {
19500    fn typename() -> &'static str {
19501        "type.googleapis.com/google.container.v1.WorkloadIdentityConfig"
19502    }
19503}
19504
19505/// IdentityServiceConfig is configuration for Identity Service which allows
19506/// customers to use external identity providers with the K8S API
19507#[serde_with::serde_as]
19508#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19509#[serde(default, rename_all = "camelCase")]
19510#[non_exhaustive]
19511pub struct IdentityServiceConfig {
19512    /// Whether to enable the Identity Service component
19513    #[serde(skip_serializing_if = "wkt::internal::is_default")]
19514    pub enabled: bool,
19515
19516    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19517    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19518}
19519
19520impl IdentityServiceConfig {
19521    pub fn new() -> Self {
19522        std::default::Default::default()
19523    }
19524
19525    /// Sets the value of [enabled][crate::model::IdentityServiceConfig::enabled].
19526    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19527        self.enabled = v.into();
19528        self
19529    }
19530}
19531
19532impl wkt::message::Message for IdentityServiceConfig {
19533    fn typename() -> &'static str {
19534        "type.googleapis.com/google.container.v1.IdentityServiceConfig"
19535    }
19536}
19537
19538/// Configuration for issuance of mTLS keys and certificates to Kubernetes pods.
19539#[serde_with::serde_as]
19540#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19541#[serde(default, rename_all = "camelCase")]
19542#[non_exhaustive]
19543pub struct MeshCertificates {
19544    /// enable_certificates controls issuance of workload mTLS certificates.
19545    ///
19546    /// If set, the GKE Workload Identity Certificates controller and node agent
19547    /// will be deployed in the cluster, which can then be configured by creating a
19548    /// WorkloadCertificateConfig Custom Resource.
19549    ///
19550    /// Requires Workload Identity
19551    /// ([workload_pool][google.container.v1.WorkloadIdentityConfig.workload_pool]
19552    /// must be non-empty).
19553    ///
19554    /// [google.container.v1.WorkloadIdentityConfig.workload_pool]: crate::model::WorkloadIdentityConfig::workload_pool
19555    #[serde(skip_serializing_if = "std::option::Option::is_none")]
19556    pub enable_certificates: std::option::Option<wkt::BoolValue>,
19557
19558    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19559    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19560}
19561
19562impl MeshCertificates {
19563    pub fn new() -> Self {
19564        std::default::Default::default()
19565    }
19566
19567    /// Sets the value of [enable_certificates][crate::model::MeshCertificates::enable_certificates].
19568    pub fn set_enable_certificates<T: std::convert::Into<std::option::Option<wkt::BoolValue>>>(
19569        mut self,
19570        v: T,
19571    ) -> Self {
19572        self.enable_certificates = v.into();
19573        self
19574    }
19575}
19576
19577impl wkt::message::Message for MeshCertificates {
19578    fn typename() -> &'static str {
19579        "type.googleapis.com/google.container.v1.MeshCertificates"
19580    }
19581}
19582
19583/// Configuration of etcd encryption.
19584#[serde_with::serde_as]
19585#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19586#[serde(default, rename_all = "camelCase")]
19587#[non_exhaustive]
19588pub struct DatabaseEncryption {
19589    /// Name of CloudKMS key to use for the encryption of secrets in etcd.
19590    /// Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key
19591    #[serde(skip_serializing_if = "std::string::String::is_empty")]
19592    pub key_name: std::string::String,
19593
19594    /// The desired state of etcd encryption.
19595    pub state: crate::model::database_encryption::State,
19596
19597    /// Output only. The current state of etcd encryption.
19598    #[serde(skip_serializing_if = "std::option::Option::is_none")]
19599    pub current_state: std::option::Option<crate::model::database_encryption::CurrentState>,
19600
19601    /// Output only. Keys in use by the cluster for decrypting
19602    /// existing objects, in addition to the key in `key_name`.
19603    ///
19604    /// Each item is a CloudKMS key resource.
19605    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
19606    pub decryption_keys: std::vec::Vec<std::string::String>,
19607
19608    /// Output only. Records errors seen during DatabaseEncryption update
19609    /// operations.
19610    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
19611    pub last_operation_errors: std::vec::Vec<crate::model::database_encryption::OperationError>,
19612
19613    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19614    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19615}
19616
19617impl DatabaseEncryption {
19618    pub fn new() -> Self {
19619        std::default::Default::default()
19620    }
19621
19622    /// Sets the value of [key_name][crate::model::DatabaseEncryption::key_name].
19623    pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19624        self.key_name = v.into();
19625        self
19626    }
19627
19628    /// Sets the value of [state][crate::model::DatabaseEncryption::state].
19629    pub fn set_state<T: std::convert::Into<crate::model::database_encryption::State>>(
19630        mut self,
19631        v: T,
19632    ) -> Self {
19633        self.state = v.into();
19634        self
19635    }
19636
19637    /// Sets the value of [current_state][crate::model::DatabaseEncryption::current_state].
19638    pub fn set_current_state<
19639        T: std::convert::Into<std::option::Option<crate::model::database_encryption::CurrentState>>,
19640    >(
19641        mut self,
19642        v: T,
19643    ) -> Self {
19644        self.current_state = v.into();
19645        self
19646    }
19647
19648    /// Sets the value of [decryption_keys][crate::model::DatabaseEncryption::decryption_keys].
19649    pub fn set_decryption_keys<T, V>(mut self, v: T) -> Self
19650    where
19651        T: std::iter::IntoIterator<Item = V>,
19652        V: std::convert::Into<std::string::String>,
19653    {
19654        use std::iter::Iterator;
19655        self.decryption_keys = v.into_iter().map(|i| i.into()).collect();
19656        self
19657    }
19658
19659    /// Sets the value of [last_operation_errors][crate::model::DatabaseEncryption::last_operation_errors].
19660    pub fn set_last_operation_errors<T, V>(mut self, v: T) -> Self
19661    where
19662        T: std::iter::IntoIterator<Item = V>,
19663        V: std::convert::Into<crate::model::database_encryption::OperationError>,
19664    {
19665        use std::iter::Iterator;
19666        self.last_operation_errors = v.into_iter().map(|i| i.into()).collect();
19667        self
19668    }
19669}
19670
19671impl wkt::message::Message for DatabaseEncryption {
19672    fn typename() -> &'static str {
19673        "type.googleapis.com/google.container.v1.DatabaseEncryption"
19674    }
19675}
19676
19677/// Defines additional types related to [DatabaseEncryption].
19678pub mod database_encryption {
19679    #[allow(unused_imports)]
19680    use super::*;
19681
19682    /// OperationError records errors seen from CloudKMS keys
19683    /// encountered during updates to DatabaseEncryption configuration.
19684    #[serde_with::serde_as]
19685    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19686    #[serde(default, rename_all = "camelCase")]
19687    #[non_exhaustive]
19688    pub struct OperationError {
19689        /// CloudKMS key resource that had the error.
19690        #[serde(skip_serializing_if = "std::string::String::is_empty")]
19691        pub key_name: std::string::String,
19692
19693        /// Description of the error seen during the operation.
19694        #[serde(skip_serializing_if = "std::string::String::is_empty")]
19695        pub error_message: std::string::String,
19696
19697        /// Time when the CloudKMS error was seen.
19698        #[serde(skip_serializing_if = "std::option::Option::is_none")]
19699        pub timestamp: std::option::Option<wkt::Timestamp>,
19700
19701        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19702        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19703    }
19704
19705    impl OperationError {
19706        pub fn new() -> Self {
19707            std::default::Default::default()
19708        }
19709
19710        /// Sets the value of [key_name][crate::model::database_encryption::OperationError::key_name].
19711        pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19712            self.key_name = v.into();
19713            self
19714        }
19715
19716        /// Sets the value of [error_message][crate::model::database_encryption::OperationError::error_message].
19717        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
19718            mut self,
19719            v: T,
19720        ) -> Self {
19721            self.error_message = v.into();
19722            self
19723        }
19724
19725        /// Sets the value of [timestamp][crate::model::database_encryption::OperationError::timestamp].
19726        pub fn set_timestamp<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
19727            mut self,
19728            v: T,
19729        ) -> Self {
19730            self.timestamp = v.into();
19731            self
19732        }
19733    }
19734
19735    impl wkt::message::Message for OperationError {
19736        fn typename() -> &'static str {
19737            "type.googleapis.com/google.container.v1.DatabaseEncryption.OperationError"
19738        }
19739    }
19740
19741    /// State of etcd encryption.
19742    ///
19743    /// # Working with unknown values
19744    ///
19745    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19746    /// additional enum variants at any time. Adding new variants is not considered
19747    /// a breaking change. Applications should write their code in anticipation of:
19748    ///
19749    /// - New values appearing in future releases of the client library, **and**
19750    /// - New values received dynamically, without application changes.
19751    ///
19752    /// Please consult the [Working with enums] section in the user guide for some
19753    /// guidelines.
19754    ///
19755    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19756    #[derive(Clone, Debug, PartialEq)]
19757    #[non_exhaustive]
19758    pub enum State {
19759        /// Should never be set
19760        Unknown,
19761        /// Secrets in etcd are encrypted.
19762        Encrypted,
19763        /// Secrets in etcd are stored in plain text (at etcd level) - this is
19764        /// unrelated to Compute Engine level full disk encryption.
19765        Decrypted,
19766        /// If set, the enum was initialized with an unknown value.
19767        ///
19768        /// Applications can examine the value using [State::value] or
19769        /// [State::name].
19770        UnknownValue(state::UnknownValue),
19771    }
19772
19773    #[doc(hidden)]
19774    pub mod state {
19775        #[allow(unused_imports)]
19776        use super::*;
19777        #[derive(Clone, Debug, PartialEq)]
19778        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19779    }
19780
19781    impl State {
19782        /// Gets the enum value.
19783        ///
19784        /// Returns `None` if the enum contains an unknown value deserialized from
19785        /// the string representation of enums.
19786        pub fn value(&self) -> std::option::Option<i32> {
19787            match self {
19788                Self::Unknown => std::option::Option::Some(0),
19789                Self::Encrypted => std::option::Option::Some(1),
19790                Self::Decrypted => std::option::Option::Some(2),
19791                Self::UnknownValue(u) => u.0.value(),
19792            }
19793        }
19794
19795        /// Gets the enum value as a string.
19796        ///
19797        /// Returns `None` if the enum contains an unknown value deserialized from
19798        /// the integer representation of enums.
19799        pub fn name(&self) -> std::option::Option<&str> {
19800            match self {
19801                Self::Unknown => std::option::Option::Some("UNKNOWN"),
19802                Self::Encrypted => std::option::Option::Some("ENCRYPTED"),
19803                Self::Decrypted => std::option::Option::Some("DECRYPTED"),
19804                Self::UnknownValue(u) => u.0.name(),
19805            }
19806        }
19807    }
19808
19809    impl std::default::Default for State {
19810        fn default() -> Self {
19811            use std::convert::From;
19812            Self::from(0)
19813        }
19814    }
19815
19816    impl std::fmt::Display for State {
19817        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19818            wkt::internal::display_enum(f, self.name(), self.value())
19819        }
19820    }
19821
19822    impl std::convert::From<i32> for State {
19823        fn from(value: i32) -> Self {
19824            match value {
19825                0 => Self::Unknown,
19826                1 => Self::Encrypted,
19827                2 => Self::Decrypted,
19828                _ => Self::UnknownValue(state::UnknownValue(
19829                    wkt::internal::UnknownEnumValue::Integer(value),
19830                )),
19831            }
19832        }
19833    }
19834
19835    impl std::convert::From<&str> for State {
19836        fn from(value: &str) -> Self {
19837            use std::string::ToString;
19838            match value {
19839                "UNKNOWN" => Self::Unknown,
19840                "ENCRYPTED" => Self::Encrypted,
19841                "DECRYPTED" => Self::Decrypted,
19842                _ => Self::UnknownValue(state::UnknownValue(
19843                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19844                )),
19845            }
19846        }
19847    }
19848
19849    impl serde::ser::Serialize for State {
19850        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19851        where
19852            S: serde::Serializer,
19853        {
19854            match self {
19855                Self::Unknown => serializer.serialize_i32(0),
19856                Self::Encrypted => serializer.serialize_i32(1),
19857                Self::Decrypted => serializer.serialize_i32(2),
19858                Self::UnknownValue(u) => u.0.serialize(serializer),
19859            }
19860        }
19861    }
19862
19863    impl<'de> serde::de::Deserialize<'de> for State {
19864        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19865        where
19866            D: serde::Deserializer<'de>,
19867        {
19868            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
19869                ".google.container.v1.DatabaseEncryption.State",
19870            ))
19871        }
19872    }
19873
19874    /// Current State of etcd encryption.
19875    ///
19876    /// # Working with unknown values
19877    ///
19878    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19879    /// additional enum variants at any time. Adding new variants is not considered
19880    /// a breaking change. Applications should write their code in anticipation of:
19881    ///
19882    /// - New values appearing in future releases of the client library, **and**
19883    /// - New values received dynamically, without application changes.
19884    ///
19885    /// Please consult the [Working with enums] section in the user guide for some
19886    /// guidelines.
19887    ///
19888    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19889    #[derive(Clone, Debug, PartialEq)]
19890    #[non_exhaustive]
19891    pub enum CurrentState {
19892        /// Should never be set
19893        Unspecified,
19894        /// Secrets in etcd are encrypted.
19895        Encrypted,
19896        /// Secrets in etcd are stored in plain text (at etcd level) - this is
19897        /// unrelated to Compute Engine level full disk encryption.
19898        Decrypted,
19899        /// Encryption (or re-encryption with a different CloudKMS key)
19900        /// of Secrets is in progress.
19901        EncryptionPending,
19902        /// Encryption (or re-encryption with a different CloudKMS key) of Secrets in
19903        /// etcd encountered an error.
19904        EncryptionError,
19905        /// De-crypting Secrets to plain text in etcd is in progress.
19906        DecryptionPending,
19907        /// De-crypting Secrets to plain text in etcd encountered an error.
19908        DecryptionError,
19909        /// If set, the enum was initialized with an unknown value.
19910        ///
19911        /// Applications can examine the value using [CurrentState::value] or
19912        /// [CurrentState::name].
19913        UnknownValue(current_state::UnknownValue),
19914    }
19915
19916    #[doc(hidden)]
19917    pub mod current_state {
19918        #[allow(unused_imports)]
19919        use super::*;
19920        #[derive(Clone, Debug, PartialEq)]
19921        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19922    }
19923
19924    impl CurrentState {
19925        /// Gets the enum value.
19926        ///
19927        /// Returns `None` if the enum contains an unknown value deserialized from
19928        /// the string representation of enums.
19929        pub fn value(&self) -> std::option::Option<i32> {
19930            match self {
19931                Self::Unspecified => std::option::Option::Some(0),
19932                Self::Encrypted => std::option::Option::Some(7),
19933                Self::Decrypted => std::option::Option::Some(2),
19934                Self::EncryptionPending => std::option::Option::Some(3),
19935                Self::EncryptionError => std::option::Option::Some(4),
19936                Self::DecryptionPending => std::option::Option::Some(5),
19937                Self::DecryptionError => std::option::Option::Some(6),
19938                Self::UnknownValue(u) => u.0.value(),
19939            }
19940        }
19941
19942        /// Gets the enum value as a string.
19943        ///
19944        /// Returns `None` if the enum contains an unknown value deserialized from
19945        /// the integer representation of enums.
19946        pub fn name(&self) -> std::option::Option<&str> {
19947            match self {
19948                Self::Unspecified => std::option::Option::Some("CURRENT_STATE_UNSPECIFIED"),
19949                Self::Encrypted => std::option::Option::Some("CURRENT_STATE_ENCRYPTED"),
19950                Self::Decrypted => std::option::Option::Some("CURRENT_STATE_DECRYPTED"),
19951                Self::EncryptionPending => {
19952                    std::option::Option::Some("CURRENT_STATE_ENCRYPTION_PENDING")
19953                }
19954                Self::EncryptionError => {
19955                    std::option::Option::Some("CURRENT_STATE_ENCRYPTION_ERROR")
19956                }
19957                Self::DecryptionPending => {
19958                    std::option::Option::Some("CURRENT_STATE_DECRYPTION_PENDING")
19959                }
19960                Self::DecryptionError => {
19961                    std::option::Option::Some("CURRENT_STATE_DECRYPTION_ERROR")
19962                }
19963                Self::UnknownValue(u) => u.0.name(),
19964            }
19965        }
19966    }
19967
19968    impl std::default::Default for CurrentState {
19969        fn default() -> Self {
19970            use std::convert::From;
19971            Self::from(0)
19972        }
19973    }
19974
19975    impl std::fmt::Display for CurrentState {
19976        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19977            wkt::internal::display_enum(f, self.name(), self.value())
19978        }
19979    }
19980
19981    impl std::convert::From<i32> for CurrentState {
19982        fn from(value: i32) -> Self {
19983            match value {
19984                0 => Self::Unspecified,
19985                2 => Self::Decrypted,
19986                3 => Self::EncryptionPending,
19987                4 => Self::EncryptionError,
19988                5 => Self::DecryptionPending,
19989                6 => Self::DecryptionError,
19990                7 => Self::Encrypted,
19991                _ => Self::UnknownValue(current_state::UnknownValue(
19992                    wkt::internal::UnknownEnumValue::Integer(value),
19993                )),
19994            }
19995        }
19996    }
19997
19998    impl std::convert::From<&str> for CurrentState {
19999        fn from(value: &str) -> Self {
20000            use std::string::ToString;
20001            match value {
20002                "CURRENT_STATE_UNSPECIFIED" => Self::Unspecified,
20003                "CURRENT_STATE_ENCRYPTED" => Self::Encrypted,
20004                "CURRENT_STATE_DECRYPTED" => Self::Decrypted,
20005                "CURRENT_STATE_ENCRYPTION_PENDING" => Self::EncryptionPending,
20006                "CURRENT_STATE_ENCRYPTION_ERROR" => Self::EncryptionError,
20007                "CURRENT_STATE_DECRYPTION_PENDING" => Self::DecryptionPending,
20008                "CURRENT_STATE_DECRYPTION_ERROR" => Self::DecryptionError,
20009                _ => Self::UnknownValue(current_state::UnknownValue(
20010                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20011                )),
20012            }
20013        }
20014    }
20015
20016    impl serde::ser::Serialize for CurrentState {
20017        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20018        where
20019            S: serde::Serializer,
20020        {
20021            match self {
20022                Self::Unspecified => serializer.serialize_i32(0),
20023                Self::Encrypted => serializer.serialize_i32(7),
20024                Self::Decrypted => serializer.serialize_i32(2),
20025                Self::EncryptionPending => serializer.serialize_i32(3),
20026                Self::EncryptionError => serializer.serialize_i32(4),
20027                Self::DecryptionPending => serializer.serialize_i32(5),
20028                Self::DecryptionError => serializer.serialize_i32(6),
20029                Self::UnknownValue(u) => u.0.serialize(serializer),
20030            }
20031        }
20032    }
20033
20034    impl<'de> serde::de::Deserialize<'de> for CurrentState {
20035        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20036        where
20037            D: serde::Deserializer<'de>,
20038        {
20039            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CurrentState>::new(
20040                ".google.container.v1.DatabaseEncryption.CurrentState",
20041            ))
20042        }
20043    }
20044}
20045
20046/// ListUsableSubnetworksRequest requests the list of usable subnetworks
20047/// available to a user for creating clusters.
20048#[serde_with::serde_as]
20049#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20050#[serde(default, rename_all = "camelCase")]
20051#[non_exhaustive]
20052pub struct ListUsableSubnetworksRequest {
20053    /// The parent project where subnetworks are usable.
20054    /// Specified in the format `projects/*`.
20055    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20056    pub parent: std::string::String,
20057
20058    /// Filtering currently only supports equality on the networkProjectId and must
20059    /// be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
20060    /// is the project which owns the listed subnetworks. This defaults to the
20061    /// parent project ID.
20062    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20063    pub filter: std::string::String,
20064
20065    /// The max number of results per page that should be returned. If the number
20066    /// of available results is larger than `page_size`, a `next_page_token` is
20067    /// returned which can be used to get the next page of results in subsequent
20068    /// requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
20069    #[serde(skip_serializing_if = "wkt::internal::is_default")]
20070    pub page_size: i32,
20071
20072    /// Specifies a page token to use. Set this to the nextPageToken returned by
20073    /// previous list requests to get the next page of results.
20074    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20075    pub page_token: std::string::String,
20076
20077    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20078    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20079}
20080
20081impl ListUsableSubnetworksRequest {
20082    pub fn new() -> Self {
20083        std::default::Default::default()
20084    }
20085
20086    /// Sets the value of [parent][crate::model::ListUsableSubnetworksRequest::parent].
20087    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20088        self.parent = v.into();
20089        self
20090    }
20091
20092    /// Sets the value of [filter][crate::model::ListUsableSubnetworksRequest::filter].
20093    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20094        self.filter = v.into();
20095        self
20096    }
20097
20098    /// Sets the value of [page_size][crate::model::ListUsableSubnetworksRequest::page_size].
20099    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20100        self.page_size = v.into();
20101        self
20102    }
20103
20104    /// Sets the value of [page_token][crate::model::ListUsableSubnetworksRequest::page_token].
20105    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20106        self.page_token = v.into();
20107        self
20108    }
20109}
20110
20111impl wkt::message::Message for ListUsableSubnetworksRequest {
20112    fn typename() -> &'static str {
20113        "type.googleapis.com/google.container.v1.ListUsableSubnetworksRequest"
20114    }
20115}
20116
20117/// ListUsableSubnetworksResponse is the response of
20118/// ListUsableSubnetworksRequest.
20119#[serde_with::serde_as]
20120#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20121#[serde(default, rename_all = "camelCase")]
20122#[non_exhaustive]
20123pub struct ListUsableSubnetworksResponse {
20124    /// A list of usable subnetworks in the specified network project.
20125    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
20126    pub subnetworks: std::vec::Vec<crate::model::UsableSubnetwork>,
20127
20128    /// This token allows you to get the next page of results for list requests.
20129    /// If the number of results is larger than `page_size`, use the
20130    /// `next_page_token` as a value for the query parameter `page_token` in the
20131    /// next request. The value will become empty when there are no more pages.
20132    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20133    pub next_page_token: std::string::String,
20134
20135    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20136    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20137}
20138
20139impl ListUsableSubnetworksResponse {
20140    pub fn new() -> Self {
20141        std::default::Default::default()
20142    }
20143
20144    /// Sets the value of [subnetworks][crate::model::ListUsableSubnetworksResponse::subnetworks].
20145    pub fn set_subnetworks<T, V>(mut self, v: T) -> Self
20146    where
20147        T: std::iter::IntoIterator<Item = V>,
20148        V: std::convert::Into<crate::model::UsableSubnetwork>,
20149    {
20150        use std::iter::Iterator;
20151        self.subnetworks = v.into_iter().map(|i| i.into()).collect();
20152        self
20153    }
20154
20155    /// Sets the value of [next_page_token][crate::model::ListUsableSubnetworksResponse::next_page_token].
20156    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20157        self.next_page_token = v.into();
20158        self
20159    }
20160}
20161
20162impl wkt::message::Message for ListUsableSubnetworksResponse {
20163    fn typename() -> &'static str {
20164        "type.googleapis.com/google.container.v1.ListUsableSubnetworksResponse"
20165    }
20166}
20167
20168#[doc(hidden)]
20169impl gax::paginator::internal::PageableResponse for ListUsableSubnetworksResponse {
20170    type PageItem = crate::model::UsableSubnetwork;
20171
20172    fn items(self) -> std::vec::Vec<Self::PageItem> {
20173        self.subnetworks
20174    }
20175
20176    fn next_page_token(&self) -> std::string::String {
20177        use std::clone::Clone;
20178        self.next_page_token.clone()
20179    }
20180}
20181
20182/// Secondary IP range of a usable subnetwork.
20183#[serde_with::serde_as]
20184#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20185#[serde(default, rename_all = "camelCase")]
20186#[non_exhaustive]
20187pub struct UsableSubnetworkSecondaryRange {
20188    /// The name associated with this subnetwork secondary range, used when adding
20189    /// an alias IP range to a VM instance.
20190    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20191    pub range_name: std::string::String,
20192
20193    /// The range of IP addresses belonging to this subnetwork secondary range.
20194    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20195    pub ip_cidr_range: std::string::String,
20196
20197    /// This field is to determine the status of the secondary range programmably.
20198    pub status: crate::model::usable_subnetwork_secondary_range::Status,
20199
20200    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20201    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20202}
20203
20204impl UsableSubnetworkSecondaryRange {
20205    pub fn new() -> Self {
20206        std::default::Default::default()
20207    }
20208
20209    /// Sets the value of [range_name][crate::model::UsableSubnetworkSecondaryRange::range_name].
20210    pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20211        self.range_name = v.into();
20212        self
20213    }
20214
20215    /// Sets the value of [ip_cidr_range][crate::model::UsableSubnetworkSecondaryRange::ip_cidr_range].
20216    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20217        self.ip_cidr_range = v.into();
20218        self
20219    }
20220
20221    /// Sets the value of [status][crate::model::UsableSubnetworkSecondaryRange::status].
20222    pub fn set_status<
20223        T: std::convert::Into<crate::model::usable_subnetwork_secondary_range::Status>,
20224    >(
20225        mut self,
20226        v: T,
20227    ) -> Self {
20228        self.status = v.into();
20229        self
20230    }
20231}
20232
20233impl wkt::message::Message for UsableSubnetworkSecondaryRange {
20234    fn typename() -> &'static str {
20235        "type.googleapis.com/google.container.v1.UsableSubnetworkSecondaryRange"
20236    }
20237}
20238
20239/// Defines additional types related to [UsableSubnetworkSecondaryRange].
20240pub mod usable_subnetwork_secondary_range {
20241    #[allow(unused_imports)]
20242    use super::*;
20243
20244    /// Status shows the current usage of a secondary IP range.
20245    ///
20246    /// # Working with unknown values
20247    ///
20248    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20249    /// additional enum variants at any time. Adding new variants is not considered
20250    /// a breaking change. Applications should write their code in anticipation of:
20251    ///
20252    /// - New values appearing in future releases of the client library, **and**
20253    /// - New values received dynamically, without application changes.
20254    ///
20255    /// Please consult the [Working with enums] section in the user guide for some
20256    /// guidelines.
20257    ///
20258    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20259    #[derive(Clone, Debug, PartialEq)]
20260    #[non_exhaustive]
20261    pub enum Status {
20262        /// UNKNOWN is the zero value of the Status enum. It's not a valid status.
20263        Unknown,
20264        /// UNUSED denotes that this range is unclaimed by any cluster.
20265        Unused,
20266        /// IN_USE_SERVICE denotes that this range is claimed by cluster(s) for
20267        /// services. User-managed services range can be shared between clusters
20268        /// within the same subnetwork.
20269        InUseService,
20270        /// IN_USE_SHAREABLE_POD denotes this range was created by the network admin
20271        /// and is currently claimed by a cluster for pods. It can only be used by
20272        /// other clusters as a pod range.
20273        InUseShareablePod,
20274        /// IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed
20275        /// for pods. It cannot be used for other clusters.
20276        InUseManagedPod,
20277        /// If set, the enum was initialized with an unknown value.
20278        ///
20279        /// Applications can examine the value using [Status::value] or
20280        /// [Status::name].
20281        UnknownValue(status::UnknownValue),
20282    }
20283
20284    #[doc(hidden)]
20285    pub mod status {
20286        #[allow(unused_imports)]
20287        use super::*;
20288        #[derive(Clone, Debug, PartialEq)]
20289        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20290    }
20291
20292    impl Status {
20293        /// Gets the enum value.
20294        ///
20295        /// Returns `None` if the enum contains an unknown value deserialized from
20296        /// the string representation of enums.
20297        pub fn value(&self) -> std::option::Option<i32> {
20298            match self {
20299                Self::Unknown => std::option::Option::Some(0),
20300                Self::Unused => std::option::Option::Some(1),
20301                Self::InUseService => std::option::Option::Some(2),
20302                Self::InUseShareablePod => std::option::Option::Some(3),
20303                Self::InUseManagedPod => std::option::Option::Some(4),
20304                Self::UnknownValue(u) => u.0.value(),
20305            }
20306        }
20307
20308        /// Gets the enum value as a string.
20309        ///
20310        /// Returns `None` if the enum contains an unknown value deserialized from
20311        /// the integer representation of enums.
20312        pub fn name(&self) -> std::option::Option<&str> {
20313            match self {
20314                Self::Unknown => std::option::Option::Some("UNKNOWN"),
20315                Self::Unused => std::option::Option::Some("UNUSED"),
20316                Self::InUseService => std::option::Option::Some("IN_USE_SERVICE"),
20317                Self::InUseShareablePod => std::option::Option::Some("IN_USE_SHAREABLE_POD"),
20318                Self::InUseManagedPod => std::option::Option::Some("IN_USE_MANAGED_POD"),
20319                Self::UnknownValue(u) => u.0.name(),
20320            }
20321        }
20322    }
20323
20324    impl std::default::Default for Status {
20325        fn default() -> Self {
20326            use std::convert::From;
20327            Self::from(0)
20328        }
20329    }
20330
20331    impl std::fmt::Display for Status {
20332        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20333            wkt::internal::display_enum(f, self.name(), self.value())
20334        }
20335    }
20336
20337    impl std::convert::From<i32> for Status {
20338        fn from(value: i32) -> Self {
20339            match value {
20340                0 => Self::Unknown,
20341                1 => Self::Unused,
20342                2 => Self::InUseService,
20343                3 => Self::InUseShareablePod,
20344                4 => Self::InUseManagedPod,
20345                _ => Self::UnknownValue(status::UnknownValue(
20346                    wkt::internal::UnknownEnumValue::Integer(value),
20347                )),
20348            }
20349        }
20350    }
20351
20352    impl std::convert::From<&str> for Status {
20353        fn from(value: &str) -> Self {
20354            use std::string::ToString;
20355            match value {
20356                "UNKNOWN" => Self::Unknown,
20357                "UNUSED" => Self::Unused,
20358                "IN_USE_SERVICE" => Self::InUseService,
20359                "IN_USE_SHAREABLE_POD" => Self::InUseShareablePod,
20360                "IN_USE_MANAGED_POD" => Self::InUseManagedPod,
20361                _ => Self::UnknownValue(status::UnknownValue(
20362                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20363                )),
20364            }
20365        }
20366    }
20367
20368    impl serde::ser::Serialize for Status {
20369        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20370        where
20371            S: serde::Serializer,
20372        {
20373            match self {
20374                Self::Unknown => serializer.serialize_i32(0),
20375                Self::Unused => serializer.serialize_i32(1),
20376                Self::InUseService => serializer.serialize_i32(2),
20377                Self::InUseShareablePod => serializer.serialize_i32(3),
20378                Self::InUseManagedPod => serializer.serialize_i32(4),
20379                Self::UnknownValue(u) => u.0.serialize(serializer),
20380            }
20381        }
20382    }
20383
20384    impl<'de> serde::de::Deserialize<'de> for Status {
20385        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20386        where
20387            D: serde::Deserializer<'de>,
20388        {
20389            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
20390                ".google.container.v1.UsableSubnetworkSecondaryRange.Status",
20391            ))
20392        }
20393    }
20394}
20395
20396/// UsableSubnetwork resource returns the subnetwork name, its associated network
20397/// and the primary CIDR range.
20398#[serde_with::serde_as]
20399#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20400#[serde(default, rename_all = "camelCase")]
20401#[non_exhaustive]
20402pub struct UsableSubnetwork {
20403    /// Subnetwork Name.
20404    /// Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
20405    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20406    pub subnetwork: std::string::String,
20407
20408    /// Network Name.
20409    /// Example: projects/my-project/global/networks/my-network
20410    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20411    pub network: std::string::String,
20412
20413    /// The range of internal addresses that are owned by this subnetwork.
20414    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20415    pub ip_cidr_range: std::string::String,
20416
20417    /// Secondary IP ranges.
20418    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
20419    pub secondary_ip_ranges: std::vec::Vec<crate::model::UsableSubnetworkSecondaryRange>,
20420
20421    /// A human readable status message representing the reasons for cases where
20422    /// the caller cannot use the secondary ranges under the subnet. For example if
20423    /// the secondary_ip_ranges is empty due to a permission issue, an insufficient
20424    /// permission message will be given by status_message.
20425    #[serde(skip_serializing_if = "std::string::String::is_empty")]
20426    pub status_message: std::string::String,
20427
20428    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20429    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20430}
20431
20432impl UsableSubnetwork {
20433    pub fn new() -> Self {
20434        std::default::Default::default()
20435    }
20436
20437    /// Sets the value of [subnetwork][crate::model::UsableSubnetwork::subnetwork].
20438    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20439        self.subnetwork = v.into();
20440        self
20441    }
20442
20443    /// Sets the value of [network][crate::model::UsableSubnetwork::network].
20444    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20445        self.network = v.into();
20446        self
20447    }
20448
20449    /// Sets the value of [ip_cidr_range][crate::model::UsableSubnetwork::ip_cidr_range].
20450    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20451        self.ip_cidr_range = v.into();
20452        self
20453    }
20454
20455    /// Sets the value of [secondary_ip_ranges][crate::model::UsableSubnetwork::secondary_ip_ranges].
20456    pub fn set_secondary_ip_ranges<T, V>(mut self, v: T) -> Self
20457    where
20458        T: std::iter::IntoIterator<Item = V>,
20459        V: std::convert::Into<crate::model::UsableSubnetworkSecondaryRange>,
20460    {
20461        use std::iter::Iterator;
20462        self.secondary_ip_ranges = v.into_iter().map(|i| i.into()).collect();
20463        self
20464    }
20465
20466    /// Sets the value of [status_message][crate::model::UsableSubnetwork::status_message].
20467    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20468        self.status_message = v.into();
20469        self
20470    }
20471}
20472
20473impl wkt::message::Message for UsableSubnetwork {
20474    fn typename() -> &'static str {
20475        "type.googleapis.com/google.container.v1.UsableSubnetwork"
20476    }
20477}
20478
20479/// Configuration for exporting cluster resource usages.
20480#[serde_with::serde_as]
20481#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20482#[serde(default, rename_all = "camelCase")]
20483#[non_exhaustive]
20484pub struct ResourceUsageExportConfig {
20485    /// Configuration to use BigQuery as usage export destination.
20486    #[serde(skip_serializing_if = "std::option::Option::is_none")]
20487    pub bigquery_destination:
20488        std::option::Option<crate::model::resource_usage_export_config::BigQueryDestination>,
20489
20490    /// Whether to enable network egress metering for this cluster. If enabled, a
20491    /// daemonset will be created in the cluster to meter network egress traffic.
20492    #[serde(skip_serializing_if = "wkt::internal::is_default")]
20493    pub enable_network_egress_metering: bool,
20494
20495    /// Configuration to enable resource consumption metering.
20496    #[serde(skip_serializing_if = "std::option::Option::is_none")]
20497    pub consumption_metering_config:
20498        std::option::Option<crate::model::resource_usage_export_config::ConsumptionMeteringConfig>,
20499
20500    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20501    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20502}
20503
20504impl ResourceUsageExportConfig {
20505    pub fn new() -> Self {
20506        std::default::Default::default()
20507    }
20508
20509    /// Sets the value of [bigquery_destination][crate::model::ResourceUsageExportConfig::bigquery_destination].
20510    pub fn set_bigquery_destination<
20511        T: std::convert::Into<
20512                std::option::Option<
20513                    crate::model::resource_usage_export_config::BigQueryDestination,
20514                >,
20515            >,
20516    >(
20517        mut self,
20518        v: T,
20519    ) -> Self {
20520        self.bigquery_destination = v.into();
20521        self
20522    }
20523
20524    /// Sets the value of [enable_network_egress_metering][crate::model::ResourceUsageExportConfig::enable_network_egress_metering].
20525    pub fn set_enable_network_egress_metering<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20526        self.enable_network_egress_metering = v.into();
20527        self
20528    }
20529
20530    /// Sets the value of [consumption_metering_config][crate::model::ResourceUsageExportConfig::consumption_metering_config].
20531    pub fn set_consumption_metering_config<
20532        T: std::convert::Into<
20533                std::option::Option<
20534                    crate::model::resource_usage_export_config::ConsumptionMeteringConfig,
20535                >,
20536            >,
20537    >(
20538        mut self,
20539        v: T,
20540    ) -> Self {
20541        self.consumption_metering_config = v.into();
20542        self
20543    }
20544}
20545
20546impl wkt::message::Message for ResourceUsageExportConfig {
20547    fn typename() -> &'static str {
20548        "type.googleapis.com/google.container.v1.ResourceUsageExportConfig"
20549    }
20550}
20551
20552/// Defines additional types related to [ResourceUsageExportConfig].
20553pub mod resource_usage_export_config {
20554    #[allow(unused_imports)]
20555    use super::*;
20556
20557    /// Parameters for using BigQuery as the destination of resource usage export.
20558    #[serde_with::serde_as]
20559    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20560    #[serde(default, rename_all = "camelCase")]
20561    #[non_exhaustive]
20562    pub struct BigQueryDestination {
20563        /// The ID of a BigQuery Dataset.
20564        #[serde(skip_serializing_if = "std::string::String::is_empty")]
20565        pub dataset_id: std::string::String,
20566
20567        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20568        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20569    }
20570
20571    impl BigQueryDestination {
20572        pub fn new() -> Self {
20573            std::default::Default::default()
20574        }
20575
20576        /// Sets the value of [dataset_id][crate::model::resource_usage_export_config::BigQueryDestination::dataset_id].
20577        pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20578            self.dataset_id = v.into();
20579            self
20580        }
20581    }
20582
20583    impl wkt::message::Message for BigQueryDestination {
20584        fn typename() -> &'static str {
20585            "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.BigQueryDestination"
20586        }
20587    }
20588
20589    /// Parameters for controlling consumption metering.
20590    #[serde_with::serde_as]
20591    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20592    #[serde(default, rename_all = "camelCase")]
20593    #[non_exhaustive]
20594    pub struct ConsumptionMeteringConfig {
20595        /// Whether to enable consumption metering for this cluster. If enabled, a
20596        /// second BigQuery table will be created to hold resource consumption
20597        /// records.
20598        #[serde(skip_serializing_if = "wkt::internal::is_default")]
20599        pub enabled: bool,
20600
20601        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20602        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20603    }
20604
20605    impl ConsumptionMeteringConfig {
20606        pub fn new() -> Self {
20607            std::default::Default::default()
20608        }
20609
20610        /// Sets the value of [enabled][crate::model::resource_usage_export_config::ConsumptionMeteringConfig::enabled].
20611        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20612            self.enabled = v.into();
20613            self
20614        }
20615    }
20616
20617    impl wkt::message::Message for ConsumptionMeteringConfig {
20618        fn typename() -> &'static str {
20619            "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig"
20620        }
20621    }
20622}
20623
20624/// VerticalPodAutoscaling contains global, per-cluster information
20625/// required by Vertical Pod Autoscaler to automatically adjust
20626/// the resources of pods controlled by it.
20627#[serde_with::serde_as]
20628#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20629#[serde(default, rename_all = "camelCase")]
20630#[non_exhaustive]
20631pub struct VerticalPodAutoscaling {
20632    /// Enables vertical pod autoscaling.
20633    #[serde(skip_serializing_if = "wkt::internal::is_default")]
20634    pub enabled: bool,
20635
20636    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20637    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20638}
20639
20640impl VerticalPodAutoscaling {
20641    pub fn new() -> Self {
20642        std::default::Default::default()
20643    }
20644
20645    /// Sets the value of [enabled][crate::model::VerticalPodAutoscaling::enabled].
20646    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20647        self.enabled = v.into();
20648        self
20649    }
20650}
20651
20652impl wkt::message::Message for VerticalPodAutoscaling {
20653    fn typename() -> &'static str {
20654        "type.googleapis.com/google.container.v1.VerticalPodAutoscaling"
20655    }
20656}
20657
20658/// DefaultSnatStatus contains the desired state of whether default sNAT should
20659/// be disabled on the cluster.
20660#[serde_with::serde_as]
20661#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20662#[serde(default, rename_all = "camelCase")]
20663#[non_exhaustive]
20664pub struct DefaultSnatStatus {
20665    /// Disables cluster default sNAT rules.
20666    #[serde(skip_serializing_if = "wkt::internal::is_default")]
20667    pub disabled: bool,
20668
20669    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20670    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20671}
20672
20673impl DefaultSnatStatus {
20674    pub fn new() -> Self {
20675        std::default::Default::default()
20676    }
20677
20678    /// Sets the value of [disabled][crate::model::DefaultSnatStatus::disabled].
20679    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20680        self.disabled = v.into();
20681        self
20682    }
20683}
20684
20685impl wkt::message::Message for DefaultSnatStatus {
20686    fn typename() -> &'static str {
20687        "type.googleapis.com/google.container.v1.DefaultSnatStatus"
20688    }
20689}
20690
20691/// Configuration of Shielded Nodes feature.
20692#[serde_with::serde_as]
20693#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20694#[serde(default, rename_all = "camelCase")]
20695#[non_exhaustive]
20696pub struct ShieldedNodes {
20697    /// Whether Shielded Nodes features are enabled on all nodes in this cluster.
20698    #[serde(skip_serializing_if = "wkt::internal::is_default")]
20699    pub enabled: bool,
20700
20701    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20702    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20703}
20704
20705impl ShieldedNodes {
20706    pub fn new() -> Self {
20707        std::default::Default::default()
20708    }
20709
20710    /// Sets the value of [enabled][crate::model::ShieldedNodes::enabled].
20711    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20712        self.enabled = v.into();
20713        self
20714    }
20715}
20716
20717impl wkt::message::Message for ShieldedNodes {
20718    fn typename() -> &'static str {
20719        "type.googleapis.com/google.container.v1.ShieldedNodes"
20720    }
20721}
20722
20723/// Configuration of gVNIC feature.
20724#[serde_with::serde_as]
20725#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20726#[serde(default, rename_all = "camelCase")]
20727#[non_exhaustive]
20728pub struct VirtualNIC {
20729    /// Whether gVNIC features are enabled in the node pool.
20730    #[serde(skip_serializing_if = "wkt::internal::is_default")]
20731    pub enabled: bool,
20732
20733    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20734    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20735}
20736
20737impl VirtualNIC {
20738    pub fn new() -> Self {
20739        std::default::Default::default()
20740    }
20741
20742    /// Sets the value of [enabled][crate::model::VirtualNIC::enabled].
20743    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20744        self.enabled = v.into();
20745        self
20746    }
20747}
20748
20749impl wkt::message::Message for VirtualNIC {
20750    fn typename() -> &'static str {
20751        "type.googleapis.com/google.container.v1.VirtualNIC"
20752    }
20753}
20754
20755/// Configuration of Fast Socket feature.
20756#[serde_with::serde_as]
20757#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20758#[serde(default, rename_all = "camelCase")]
20759#[non_exhaustive]
20760pub struct FastSocket {
20761    /// Whether Fast Socket features are enabled in the node pool.
20762    #[serde(skip_serializing_if = "wkt::internal::is_default")]
20763    pub enabled: bool,
20764
20765    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20766    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20767}
20768
20769impl FastSocket {
20770    pub fn new() -> Self {
20771        std::default::Default::default()
20772    }
20773
20774    /// Sets the value of [enabled][crate::model::FastSocket::enabled].
20775    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20776        self.enabled = v.into();
20777        self
20778    }
20779}
20780
20781impl wkt::message::Message for FastSocket {
20782    fn typename() -> &'static str {
20783        "type.googleapis.com/google.container.v1.FastSocket"
20784    }
20785}
20786
20787/// NotificationConfig is the configuration of notifications.
20788#[serde_with::serde_as]
20789#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20790#[serde(default, rename_all = "camelCase")]
20791#[non_exhaustive]
20792pub struct NotificationConfig {
20793    /// Notification config for Pub/Sub.
20794    #[serde(skip_serializing_if = "std::option::Option::is_none")]
20795    pub pubsub: std::option::Option<crate::model::notification_config::PubSub>,
20796
20797    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20798    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20799}
20800
20801impl NotificationConfig {
20802    pub fn new() -> Self {
20803        std::default::Default::default()
20804    }
20805
20806    /// Sets the value of [pubsub][crate::model::NotificationConfig::pubsub].
20807    pub fn set_pubsub<
20808        T: std::convert::Into<std::option::Option<crate::model::notification_config::PubSub>>,
20809    >(
20810        mut self,
20811        v: T,
20812    ) -> Self {
20813        self.pubsub = v.into();
20814        self
20815    }
20816}
20817
20818impl wkt::message::Message for NotificationConfig {
20819    fn typename() -> &'static str {
20820        "type.googleapis.com/google.container.v1.NotificationConfig"
20821    }
20822}
20823
20824/// Defines additional types related to [NotificationConfig].
20825pub mod notification_config {
20826    #[allow(unused_imports)]
20827    use super::*;
20828
20829    /// Pub/Sub specific notification config.
20830    #[serde_with::serde_as]
20831    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20832    #[serde(default, rename_all = "camelCase")]
20833    #[non_exhaustive]
20834    pub struct PubSub {
20835        /// Enable notifications for Pub/Sub.
20836        #[serde(skip_serializing_if = "wkt::internal::is_default")]
20837        pub enabled: bool,
20838
20839        /// The desired Pub/Sub topic to which notifications will be
20840        /// sent by GKE. Format is `projects/{project}/topics/{topic}`.
20841        #[serde(skip_serializing_if = "std::string::String::is_empty")]
20842        pub topic: std::string::String,
20843
20844        /// Allows filtering to one or more specific event types. If no filter is
20845        /// specified, or if a filter is specified with no event types, all event
20846        /// types will be sent
20847        #[serde(skip_serializing_if = "std::option::Option::is_none")]
20848        pub filter: std::option::Option<crate::model::notification_config::Filter>,
20849
20850        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20851        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20852    }
20853
20854    impl PubSub {
20855        pub fn new() -> Self {
20856            std::default::Default::default()
20857        }
20858
20859        /// Sets the value of [enabled][crate::model::notification_config::PubSub::enabled].
20860        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20861            self.enabled = v.into();
20862            self
20863        }
20864
20865        /// Sets the value of [topic][crate::model::notification_config::PubSub::topic].
20866        pub fn set_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20867            self.topic = v.into();
20868            self
20869        }
20870
20871        /// Sets the value of [filter][crate::model::notification_config::PubSub::filter].
20872        pub fn set_filter<
20873            T: std::convert::Into<std::option::Option<crate::model::notification_config::Filter>>,
20874        >(
20875            mut self,
20876            v: T,
20877        ) -> Self {
20878            self.filter = v.into();
20879            self
20880        }
20881    }
20882
20883    impl wkt::message::Message for PubSub {
20884        fn typename() -> &'static str {
20885            "type.googleapis.com/google.container.v1.NotificationConfig.PubSub"
20886        }
20887    }
20888
20889    /// Allows filtering to one or more specific event types. If event types are
20890    /// present, those and only those event types will be transmitted to the
20891    /// cluster. Other types will be skipped. If no filter is specified, or no
20892    /// event types are present, all event types will be sent
20893    #[serde_with::serde_as]
20894    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20895    #[serde(default, rename_all = "camelCase")]
20896    #[non_exhaustive]
20897    pub struct Filter {
20898        /// Event types to allowlist.
20899        #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
20900        pub event_type: std::vec::Vec<crate::model::notification_config::EventType>,
20901
20902        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20903        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20904    }
20905
20906    impl Filter {
20907        pub fn new() -> Self {
20908            std::default::Default::default()
20909        }
20910
20911        /// Sets the value of [event_type][crate::model::notification_config::Filter::event_type].
20912        pub fn set_event_type<T, V>(mut self, v: T) -> Self
20913        where
20914            T: std::iter::IntoIterator<Item = V>,
20915            V: std::convert::Into<crate::model::notification_config::EventType>,
20916        {
20917            use std::iter::Iterator;
20918            self.event_type = v.into_iter().map(|i| i.into()).collect();
20919            self
20920        }
20921    }
20922
20923    impl wkt::message::Message for Filter {
20924        fn typename() -> &'static str {
20925            "type.googleapis.com/google.container.v1.NotificationConfig.Filter"
20926        }
20927    }
20928
20929    /// Types of notifications currently supported. Can be used to filter what
20930    /// notifications are sent.
20931    ///
20932    /// # Working with unknown values
20933    ///
20934    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20935    /// additional enum variants at any time. Adding new variants is not considered
20936    /// a breaking change. Applications should write their code in anticipation of:
20937    ///
20938    /// - New values appearing in future releases of the client library, **and**
20939    /// - New values received dynamically, without application changes.
20940    ///
20941    /// Please consult the [Working with enums] section in the user guide for some
20942    /// guidelines.
20943    ///
20944    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20945    #[derive(Clone, Debug, PartialEq)]
20946    #[non_exhaustive]
20947    pub enum EventType {
20948        /// Not set, will be ignored.
20949        Unspecified,
20950        /// Corresponds with UpgradeAvailableEvent.
20951        UpgradeAvailableEvent,
20952        /// Corresponds with UpgradeEvent.
20953        UpgradeEvent,
20954        /// Corresponds with SecurityBulletinEvent.
20955        SecurityBulletinEvent,
20956        /// If set, the enum was initialized with an unknown value.
20957        ///
20958        /// Applications can examine the value using [EventType::value] or
20959        /// [EventType::name].
20960        UnknownValue(event_type::UnknownValue),
20961    }
20962
20963    #[doc(hidden)]
20964    pub mod event_type {
20965        #[allow(unused_imports)]
20966        use super::*;
20967        #[derive(Clone, Debug, PartialEq)]
20968        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20969    }
20970
20971    impl EventType {
20972        /// Gets the enum value.
20973        ///
20974        /// Returns `None` if the enum contains an unknown value deserialized from
20975        /// the string representation of enums.
20976        pub fn value(&self) -> std::option::Option<i32> {
20977            match self {
20978                Self::Unspecified => std::option::Option::Some(0),
20979                Self::UpgradeAvailableEvent => std::option::Option::Some(1),
20980                Self::UpgradeEvent => std::option::Option::Some(2),
20981                Self::SecurityBulletinEvent => std::option::Option::Some(3),
20982                Self::UnknownValue(u) => u.0.value(),
20983            }
20984        }
20985
20986        /// Gets the enum value as a string.
20987        ///
20988        /// Returns `None` if the enum contains an unknown value deserialized from
20989        /// the integer representation of enums.
20990        pub fn name(&self) -> std::option::Option<&str> {
20991            match self {
20992                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
20993                Self::UpgradeAvailableEvent => std::option::Option::Some("UPGRADE_AVAILABLE_EVENT"),
20994                Self::UpgradeEvent => std::option::Option::Some("UPGRADE_EVENT"),
20995                Self::SecurityBulletinEvent => std::option::Option::Some("SECURITY_BULLETIN_EVENT"),
20996                Self::UnknownValue(u) => u.0.name(),
20997            }
20998        }
20999    }
21000
21001    impl std::default::Default for EventType {
21002        fn default() -> Self {
21003            use std::convert::From;
21004            Self::from(0)
21005        }
21006    }
21007
21008    impl std::fmt::Display for EventType {
21009        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21010            wkt::internal::display_enum(f, self.name(), self.value())
21011        }
21012    }
21013
21014    impl std::convert::From<i32> for EventType {
21015        fn from(value: i32) -> Self {
21016            match value {
21017                0 => Self::Unspecified,
21018                1 => Self::UpgradeAvailableEvent,
21019                2 => Self::UpgradeEvent,
21020                3 => Self::SecurityBulletinEvent,
21021                _ => Self::UnknownValue(event_type::UnknownValue(
21022                    wkt::internal::UnknownEnumValue::Integer(value),
21023                )),
21024            }
21025        }
21026    }
21027
21028    impl std::convert::From<&str> for EventType {
21029        fn from(value: &str) -> Self {
21030            use std::string::ToString;
21031            match value {
21032                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
21033                "UPGRADE_AVAILABLE_EVENT" => Self::UpgradeAvailableEvent,
21034                "UPGRADE_EVENT" => Self::UpgradeEvent,
21035                "SECURITY_BULLETIN_EVENT" => Self::SecurityBulletinEvent,
21036                _ => Self::UnknownValue(event_type::UnknownValue(
21037                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21038                )),
21039            }
21040        }
21041    }
21042
21043    impl serde::ser::Serialize for EventType {
21044        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21045        where
21046            S: serde::Serializer,
21047        {
21048            match self {
21049                Self::Unspecified => serializer.serialize_i32(0),
21050                Self::UpgradeAvailableEvent => serializer.serialize_i32(1),
21051                Self::UpgradeEvent => serializer.serialize_i32(2),
21052                Self::SecurityBulletinEvent => serializer.serialize_i32(3),
21053                Self::UnknownValue(u) => u.0.serialize(serializer),
21054            }
21055        }
21056    }
21057
21058    impl<'de> serde::de::Deserialize<'de> for EventType {
21059        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21060        where
21061            D: serde::Deserializer<'de>,
21062        {
21063            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
21064                ".google.container.v1.NotificationConfig.EventType",
21065            ))
21066        }
21067    }
21068}
21069
21070/// ConfidentialNodes is configuration for the confidential nodes feature, which
21071/// makes nodes run on confidential VMs.
21072#[serde_with::serde_as]
21073#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21074#[serde(default, rename_all = "camelCase")]
21075#[non_exhaustive]
21076pub struct ConfidentialNodes {
21077    /// Whether Confidential Nodes feature is enabled.
21078    #[serde(skip_serializing_if = "wkt::internal::is_default")]
21079    pub enabled: bool,
21080
21081    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21082    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21083}
21084
21085impl ConfidentialNodes {
21086    pub fn new() -> Self {
21087        std::default::Default::default()
21088    }
21089
21090    /// Sets the value of [enabled][crate::model::ConfidentialNodes::enabled].
21091    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21092        self.enabled = v.into();
21093        self
21094    }
21095}
21096
21097impl wkt::message::Message for ConfidentialNodes {
21098    fn typename() -> &'static str {
21099        "type.googleapis.com/google.container.v1.ConfidentialNodes"
21100    }
21101}
21102
21103/// UpgradeEvent is a notification sent to customers by the cluster server when
21104/// a resource is upgrading.
21105#[serde_with::serde_as]
21106#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21107#[serde(default, rename_all = "camelCase")]
21108#[non_exhaustive]
21109pub struct UpgradeEvent {
21110    /// The resource type that is upgrading.
21111    pub resource_type: crate::model::UpgradeResourceType,
21112
21113    /// The operation associated with this upgrade.
21114    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21115    pub operation: std::string::String,
21116
21117    /// The time when the operation was started.
21118    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21119    pub operation_start_time: std::option::Option<wkt::Timestamp>,
21120
21121    /// The current version before the upgrade.
21122    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21123    pub current_version: std::string::String,
21124
21125    /// The target version for the upgrade.
21126    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21127    pub target_version: std::string::String,
21128
21129    /// Optional relative path to the resource. For example in node pool upgrades,
21130    /// the relative path of the node pool.
21131    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21132    pub resource: std::string::String,
21133
21134    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21135    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21136}
21137
21138impl UpgradeEvent {
21139    pub fn new() -> Self {
21140        std::default::Default::default()
21141    }
21142
21143    /// Sets the value of [resource_type][crate::model::UpgradeEvent::resource_type].
21144    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
21145        mut self,
21146        v: T,
21147    ) -> Self {
21148        self.resource_type = v.into();
21149        self
21150    }
21151
21152    /// Sets the value of [operation][crate::model::UpgradeEvent::operation].
21153    pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21154        self.operation = v.into();
21155        self
21156    }
21157
21158    /// Sets the value of [operation_start_time][crate::model::UpgradeEvent::operation_start_time].
21159    pub fn set_operation_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
21160        mut self,
21161        v: T,
21162    ) -> Self {
21163        self.operation_start_time = v.into();
21164        self
21165    }
21166
21167    /// Sets the value of [current_version][crate::model::UpgradeEvent::current_version].
21168    pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21169        self.current_version = v.into();
21170        self
21171    }
21172
21173    /// Sets the value of [target_version][crate::model::UpgradeEvent::target_version].
21174    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21175        self.target_version = v.into();
21176        self
21177    }
21178
21179    /// Sets the value of [resource][crate::model::UpgradeEvent::resource].
21180    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21181        self.resource = v.into();
21182        self
21183    }
21184}
21185
21186impl wkt::message::Message for UpgradeEvent {
21187    fn typename() -> &'static str {
21188        "type.googleapis.com/google.container.v1.UpgradeEvent"
21189    }
21190}
21191
21192/// UpgradeInfoEvent is a notification sent to customers about the upgrade
21193/// information of a resource.
21194#[serde_with::serde_as]
21195#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21196#[serde(default, rename_all = "camelCase")]
21197#[non_exhaustive]
21198pub struct UpgradeInfoEvent {
21199    /// The resource type associated with the upgrade.
21200    pub resource_type: crate::model::UpgradeResourceType,
21201
21202    /// The operation associated with this upgrade.
21203    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21204    pub operation: std::string::String,
21205
21206    /// The time when the operation was started.
21207    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21208    pub start_time: std::option::Option<wkt::Timestamp>,
21209
21210    /// The time when the operation ended.
21211    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21212    pub end_time: std::option::Option<wkt::Timestamp>,
21213
21214    /// The current version before the upgrade.
21215    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21216    pub current_version: std::string::String,
21217
21218    /// The target version for the upgrade.
21219    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21220    pub target_version: std::string::String,
21221
21222    /// Optional relative path to the resource. For example in node pool upgrades,
21223    /// the relative path of the node pool.
21224    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21225    pub resource: std::string::String,
21226
21227    /// Output only. The state of the upgrade.
21228    pub state: crate::model::upgrade_info_event::State,
21229
21230    /// A brief description of the event.
21231    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21232    pub description: std::string::String,
21233
21234    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21235    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21236}
21237
21238impl UpgradeInfoEvent {
21239    pub fn new() -> Self {
21240        std::default::Default::default()
21241    }
21242
21243    /// Sets the value of [resource_type][crate::model::UpgradeInfoEvent::resource_type].
21244    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
21245        mut self,
21246        v: T,
21247    ) -> Self {
21248        self.resource_type = v.into();
21249        self
21250    }
21251
21252    /// Sets the value of [operation][crate::model::UpgradeInfoEvent::operation].
21253    pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21254        self.operation = v.into();
21255        self
21256    }
21257
21258    /// Sets the value of [start_time][crate::model::UpgradeInfoEvent::start_time].
21259    pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
21260        mut self,
21261        v: T,
21262    ) -> Self {
21263        self.start_time = v.into();
21264        self
21265    }
21266
21267    /// Sets the value of [end_time][crate::model::UpgradeInfoEvent::end_time].
21268    pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
21269        mut self,
21270        v: T,
21271    ) -> Self {
21272        self.end_time = v.into();
21273        self
21274    }
21275
21276    /// Sets the value of [current_version][crate::model::UpgradeInfoEvent::current_version].
21277    pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21278        self.current_version = v.into();
21279        self
21280    }
21281
21282    /// Sets the value of [target_version][crate::model::UpgradeInfoEvent::target_version].
21283    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21284        self.target_version = v.into();
21285        self
21286    }
21287
21288    /// Sets the value of [resource][crate::model::UpgradeInfoEvent::resource].
21289    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21290        self.resource = v.into();
21291        self
21292    }
21293
21294    /// Sets the value of [state][crate::model::UpgradeInfoEvent::state].
21295    pub fn set_state<T: std::convert::Into<crate::model::upgrade_info_event::State>>(
21296        mut self,
21297        v: T,
21298    ) -> Self {
21299        self.state = v.into();
21300        self
21301    }
21302
21303    /// Sets the value of [description][crate::model::UpgradeInfoEvent::description].
21304    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21305        self.description = v.into();
21306        self
21307    }
21308}
21309
21310impl wkt::message::Message for UpgradeInfoEvent {
21311    fn typename() -> &'static str {
21312        "type.googleapis.com/google.container.v1.UpgradeInfoEvent"
21313    }
21314}
21315
21316/// Defines additional types related to [UpgradeInfoEvent].
21317pub mod upgrade_info_event {
21318    #[allow(unused_imports)]
21319    use super::*;
21320
21321    /// The state of the upgrade.
21322    ///
21323    /// # Working with unknown values
21324    ///
21325    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21326    /// additional enum variants at any time. Adding new variants is not considered
21327    /// a breaking change. Applications should write their code in anticipation of:
21328    ///
21329    /// - New values appearing in future releases of the client library, **and**
21330    /// - New values received dynamically, without application changes.
21331    ///
21332    /// Please consult the [Working with enums] section in the user guide for some
21333    /// guidelines.
21334    ///
21335    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21336    #[derive(Clone, Debug, PartialEq)]
21337    #[non_exhaustive]
21338    pub enum State {
21339        /// STATE_UNSPECIFIED indicates the state is unspecified.
21340        Unspecified,
21341        /// STARTED indicates the upgrade has started.
21342        Started,
21343        /// SUCCEEDED indicates the upgrade has completed successfully.
21344        Succeeded,
21345        /// FAILED indicates the upgrade has failed.
21346        Failed,
21347        /// CANCELED indicates the upgrade has canceled.
21348        Canceled,
21349        /// If set, the enum was initialized with an unknown value.
21350        ///
21351        /// Applications can examine the value using [State::value] or
21352        /// [State::name].
21353        UnknownValue(state::UnknownValue),
21354    }
21355
21356    #[doc(hidden)]
21357    pub mod state {
21358        #[allow(unused_imports)]
21359        use super::*;
21360        #[derive(Clone, Debug, PartialEq)]
21361        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21362    }
21363
21364    impl State {
21365        /// Gets the enum value.
21366        ///
21367        /// Returns `None` if the enum contains an unknown value deserialized from
21368        /// the string representation of enums.
21369        pub fn value(&self) -> std::option::Option<i32> {
21370            match self {
21371                Self::Unspecified => std::option::Option::Some(0),
21372                Self::Started => std::option::Option::Some(3),
21373                Self::Succeeded => std::option::Option::Some(4),
21374                Self::Failed => std::option::Option::Some(5),
21375                Self::Canceled => std::option::Option::Some(6),
21376                Self::UnknownValue(u) => u.0.value(),
21377            }
21378        }
21379
21380        /// Gets the enum value as a string.
21381        ///
21382        /// Returns `None` if the enum contains an unknown value deserialized from
21383        /// the integer representation of enums.
21384        pub fn name(&self) -> std::option::Option<&str> {
21385            match self {
21386                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
21387                Self::Started => std::option::Option::Some("STARTED"),
21388                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
21389                Self::Failed => std::option::Option::Some("FAILED"),
21390                Self::Canceled => std::option::Option::Some("CANCELED"),
21391                Self::UnknownValue(u) => u.0.name(),
21392            }
21393        }
21394    }
21395
21396    impl std::default::Default for State {
21397        fn default() -> Self {
21398            use std::convert::From;
21399            Self::from(0)
21400        }
21401    }
21402
21403    impl std::fmt::Display for State {
21404        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21405            wkt::internal::display_enum(f, self.name(), self.value())
21406        }
21407    }
21408
21409    impl std::convert::From<i32> for State {
21410        fn from(value: i32) -> Self {
21411            match value {
21412                0 => Self::Unspecified,
21413                3 => Self::Started,
21414                4 => Self::Succeeded,
21415                5 => Self::Failed,
21416                6 => Self::Canceled,
21417                _ => Self::UnknownValue(state::UnknownValue(
21418                    wkt::internal::UnknownEnumValue::Integer(value),
21419                )),
21420            }
21421        }
21422    }
21423
21424    impl std::convert::From<&str> for State {
21425        fn from(value: &str) -> Self {
21426            use std::string::ToString;
21427            match value {
21428                "STATE_UNSPECIFIED" => Self::Unspecified,
21429                "STARTED" => Self::Started,
21430                "SUCCEEDED" => Self::Succeeded,
21431                "FAILED" => Self::Failed,
21432                "CANCELED" => Self::Canceled,
21433                _ => Self::UnknownValue(state::UnknownValue(
21434                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21435                )),
21436            }
21437        }
21438    }
21439
21440    impl serde::ser::Serialize for State {
21441        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21442        where
21443            S: serde::Serializer,
21444        {
21445            match self {
21446                Self::Unspecified => serializer.serialize_i32(0),
21447                Self::Started => serializer.serialize_i32(3),
21448                Self::Succeeded => serializer.serialize_i32(4),
21449                Self::Failed => serializer.serialize_i32(5),
21450                Self::Canceled => serializer.serialize_i32(6),
21451                Self::UnknownValue(u) => u.0.serialize(serializer),
21452            }
21453        }
21454    }
21455
21456    impl<'de> serde::de::Deserialize<'de> for State {
21457        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21458        where
21459            D: serde::Deserializer<'de>,
21460        {
21461            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
21462                ".google.container.v1.UpgradeInfoEvent.State",
21463            ))
21464        }
21465    }
21466}
21467
21468/// UpgradeAvailableEvent is a notification sent to customers when a new
21469/// available version is released.
21470#[serde_with::serde_as]
21471#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21472#[serde(default, rename_all = "camelCase")]
21473#[non_exhaustive]
21474pub struct UpgradeAvailableEvent {
21475    /// The release version available for upgrade.
21476    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21477    pub version: std::string::String,
21478
21479    /// The resource type of the release version.
21480    pub resource_type: crate::model::UpgradeResourceType,
21481
21482    /// The release channel of the version. If empty, it means a non-channel
21483    /// release.
21484    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21485    pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
21486
21487    /// Optional relative path to the resource. For example, the relative path of
21488    /// the node pool.
21489    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21490    pub resource: std::string::String,
21491
21492    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21493    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21494}
21495
21496impl UpgradeAvailableEvent {
21497    pub fn new() -> Self {
21498        std::default::Default::default()
21499    }
21500
21501    /// Sets the value of [version][crate::model::UpgradeAvailableEvent::version].
21502    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21503        self.version = v.into();
21504        self
21505    }
21506
21507    /// Sets the value of [resource_type][crate::model::UpgradeAvailableEvent::resource_type].
21508    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
21509        mut self,
21510        v: T,
21511    ) -> Self {
21512        self.resource_type = v.into();
21513        self
21514    }
21515
21516    /// Sets the value of [release_channel][crate::model::UpgradeAvailableEvent::release_channel].
21517    pub fn set_release_channel<
21518        T: std::convert::Into<std::option::Option<crate::model::ReleaseChannel>>,
21519    >(
21520        mut self,
21521        v: T,
21522    ) -> Self {
21523        self.release_channel = v.into();
21524        self
21525    }
21526
21527    /// Sets the value of [resource][crate::model::UpgradeAvailableEvent::resource].
21528    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21529        self.resource = v.into();
21530        self
21531    }
21532}
21533
21534impl wkt::message::Message for UpgradeAvailableEvent {
21535    fn typename() -> &'static str {
21536        "type.googleapis.com/google.container.v1.UpgradeAvailableEvent"
21537    }
21538}
21539
21540/// SecurityBulletinEvent is a notification sent to customers when a security
21541/// bulletin has been posted that they are vulnerable to.
21542#[serde_with::serde_as]
21543#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21544#[serde(default, rename_all = "camelCase")]
21545#[non_exhaustive]
21546pub struct SecurityBulletinEvent {
21547    /// The resource type (node/control plane) that has the vulnerability. Multiple
21548    /// notifications (1 notification per resource type) will be sent for a
21549    /// vulnerability that affects > 1 resource type.
21550    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21551    pub resource_type_affected: std::string::String,
21552
21553    /// The ID of the bulletin corresponding to the vulnerability.
21554    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21555    pub bulletin_id: std::string::String,
21556
21557    /// The CVEs associated with this bulletin.
21558    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
21559    pub cve_ids: std::vec::Vec<std::string::String>,
21560
21561    /// The severity of this bulletin as it relates to GKE.
21562    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21563    pub severity: std::string::String,
21564
21565    /// The URI link to the bulletin on the website for more information.
21566    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21567    pub bulletin_uri: std::string::String,
21568
21569    /// A brief description of the bulletin. See the bulletin pointed to by the
21570    /// bulletin_uri field for an expanded description.
21571    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21572    pub brief_description: std::string::String,
21573
21574    /// The GKE minor versions affected by this vulnerability.
21575    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
21576    pub affected_supported_minors: std::vec::Vec<std::string::String>,
21577
21578    /// The GKE versions where this vulnerability is patched.
21579    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
21580    pub patched_versions: std::vec::Vec<std::string::String>,
21581
21582    /// This represents a version selected from the patched_versions field that
21583    /// the cluster receiving this notification should most likely want to upgrade
21584    /// to based on its current version. Note that if this notification is being
21585    /// received by a given cluster, it means that this version is currently
21586    /// available as an upgrade target in that cluster's location.
21587    #[serde(skip_serializing_if = "std::string::String::is_empty")]
21588    pub suggested_upgrade_target: std::string::String,
21589
21590    /// If this field is specified, it means there are manual steps that the user
21591    /// must take to make their clusters safe.
21592    #[serde(skip_serializing_if = "wkt::internal::is_default")]
21593    pub manual_steps_required: bool,
21594
21595    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21596    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21597}
21598
21599impl SecurityBulletinEvent {
21600    pub fn new() -> Self {
21601        std::default::Default::default()
21602    }
21603
21604    /// Sets the value of [resource_type_affected][crate::model::SecurityBulletinEvent::resource_type_affected].
21605    pub fn set_resource_type_affected<T: std::convert::Into<std::string::String>>(
21606        mut self,
21607        v: T,
21608    ) -> Self {
21609        self.resource_type_affected = v.into();
21610        self
21611    }
21612
21613    /// Sets the value of [bulletin_id][crate::model::SecurityBulletinEvent::bulletin_id].
21614    pub fn set_bulletin_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21615        self.bulletin_id = v.into();
21616        self
21617    }
21618
21619    /// Sets the value of [cve_ids][crate::model::SecurityBulletinEvent::cve_ids].
21620    pub fn set_cve_ids<T, V>(mut self, v: T) -> Self
21621    where
21622        T: std::iter::IntoIterator<Item = V>,
21623        V: std::convert::Into<std::string::String>,
21624    {
21625        use std::iter::Iterator;
21626        self.cve_ids = v.into_iter().map(|i| i.into()).collect();
21627        self
21628    }
21629
21630    /// Sets the value of [severity][crate::model::SecurityBulletinEvent::severity].
21631    pub fn set_severity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21632        self.severity = v.into();
21633        self
21634    }
21635
21636    /// Sets the value of [bulletin_uri][crate::model::SecurityBulletinEvent::bulletin_uri].
21637    pub fn set_bulletin_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21638        self.bulletin_uri = v.into();
21639        self
21640    }
21641
21642    /// Sets the value of [brief_description][crate::model::SecurityBulletinEvent::brief_description].
21643    pub fn set_brief_description<T: std::convert::Into<std::string::String>>(
21644        mut self,
21645        v: T,
21646    ) -> Self {
21647        self.brief_description = v.into();
21648        self
21649    }
21650
21651    /// Sets the value of [affected_supported_minors][crate::model::SecurityBulletinEvent::affected_supported_minors].
21652    pub fn set_affected_supported_minors<T, V>(mut self, v: T) -> Self
21653    where
21654        T: std::iter::IntoIterator<Item = V>,
21655        V: std::convert::Into<std::string::String>,
21656    {
21657        use std::iter::Iterator;
21658        self.affected_supported_minors = v.into_iter().map(|i| i.into()).collect();
21659        self
21660    }
21661
21662    /// Sets the value of [patched_versions][crate::model::SecurityBulletinEvent::patched_versions].
21663    pub fn set_patched_versions<T, V>(mut self, v: T) -> Self
21664    where
21665        T: std::iter::IntoIterator<Item = V>,
21666        V: std::convert::Into<std::string::String>,
21667    {
21668        use std::iter::Iterator;
21669        self.patched_versions = v.into_iter().map(|i| i.into()).collect();
21670        self
21671    }
21672
21673    /// Sets the value of [suggested_upgrade_target][crate::model::SecurityBulletinEvent::suggested_upgrade_target].
21674    pub fn set_suggested_upgrade_target<T: std::convert::Into<std::string::String>>(
21675        mut self,
21676        v: T,
21677    ) -> Self {
21678        self.suggested_upgrade_target = v.into();
21679        self
21680    }
21681
21682    /// Sets the value of [manual_steps_required][crate::model::SecurityBulletinEvent::manual_steps_required].
21683    pub fn set_manual_steps_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21684        self.manual_steps_required = v.into();
21685        self
21686    }
21687}
21688
21689impl wkt::message::Message for SecurityBulletinEvent {
21690    fn typename() -> &'static str {
21691        "type.googleapis.com/google.container.v1.SecurityBulletinEvent"
21692    }
21693}
21694
21695/// Autopilot is the configuration for Autopilot settings on the cluster.
21696#[serde_with::serde_as]
21697#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21698#[serde(default, rename_all = "camelCase")]
21699#[non_exhaustive]
21700pub struct Autopilot {
21701    /// Enable Autopilot
21702    #[serde(skip_serializing_if = "wkt::internal::is_default")]
21703    pub enabled: bool,
21704
21705    /// Workload policy configuration for Autopilot.
21706    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21707    pub workload_policy_config: std::option::Option<crate::model::WorkloadPolicyConfig>,
21708
21709    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21710    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21711}
21712
21713impl Autopilot {
21714    pub fn new() -> Self {
21715        std::default::Default::default()
21716    }
21717
21718    /// Sets the value of [enabled][crate::model::Autopilot::enabled].
21719    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21720        self.enabled = v.into();
21721        self
21722    }
21723
21724    /// Sets the value of [workload_policy_config][crate::model::Autopilot::workload_policy_config].
21725    pub fn set_workload_policy_config<
21726        T: std::convert::Into<std::option::Option<crate::model::WorkloadPolicyConfig>>,
21727    >(
21728        mut self,
21729        v: T,
21730    ) -> Self {
21731        self.workload_policy_config = v.into();
21732        self
21733    }
21734}
21735
21736impl wkt::message::Message for Autopilot {
21737    fn typename() -> &'static str {
21738        "type.googleapis.com/google.container.v1.Autopilot"
21739    }
21740}
21741
21742/// WorkloadPolicyConfig is the configuration of workload policy for autopilot
21743/// clusters.
21744#[serde_with::serde_as]
21745#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21746#[serde(default, rename_all = "camelCase")]
21747#[non_exhaustive]
21748pub struct WorkloadPolicyConfig {
21749    /// If true, workloads can use NET_ADMIN capability.
21750    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21751    pub allow_net_admin: std::option::Option<bool>,
21752
21753    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21754    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21755}
21756
21757impl WorkloadPolicyConfig {
21758    pub fn new() -> Self {
21759        std::default::Default::default()
21760    }
21761
21762    /// Sets the value of [allow_net_admin][crate::model::WorkloadPolicyConfig::allow_net_admin].
21763    pub fn set_allow_net_admin<T: std::convert::Into<std::option::Option<bool>>>(
21764        mut self,
21765        v: T,
21766    ) -> Self {
21767        self.allow_net_admin = v.into();
21768        self
21769    }
21770}
21771
21772impl wkt::message::Message for WorkloadPolicyConfig {
21773    fn typename() -> &'static str {
21774        "type.googleapis.com/google.container.v1.WorkloadPolicyConfig"
21775    }
21776}
21777
21778/// LoggingConfig is cluster logging configuration.
21779#[serde_with::serde_as]
21780#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21781#[serde(default, rename_all = "camelCase")]
21782#[non_exhaustive]
21783pub struct LoggingConfig {
21784    /// Logging components configuration
21785    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21786    pub component_config: std::option::Option<crate::model::LoggingComponentConfig>,
21787
21788    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21789    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21790}
21791
21792impl LoggingConfig {
21793    pub fn new() -> Self {
21794        std::default::Default::default()
21795    }
21796
21797    /// Sets the value of [component_config][crate::model::LoggingConfig::component_config].
21798    pub fn set_component_config<
21799        T: std::convert::Into<std::option::Option<crate::model::LoggingComponentConfig>>,
21800    >(
21801        mut self,
21802        v: T,
21803    ) -> Self {
21804        self.component_config = v.into();
21805        self
21806    }
21807}
21808
21809impl wkt::message::Message for LoggingConfig {
21810    fn typename() -> &'static str {
21811        "type.googleapis.com/google.container.v1.LoggingConfig"
21812    }
21813}
21814
21815/// LoggingComponentConfig is cluster logging component configuration.
21816#[serde_with::serde_as]
21817#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21818#[serde(default, rename_all = "camelCase")]
21819#[non_exhaustive]
21820pub struct LoggingComponentConfig {
21821    /// Select components to collect logs. An empty set would disable all logging.
21822    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
21823    pub enable_components: std::vec::Vec<crate::model::logging_component_config::Component>,
21824
21825    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21826    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21827}
21828
21829impl LoggingComponentConfig {
21830    pub fn new() -> Self {
21831        std::default::Default::default()
21832    }
21833
21834    /// Sets the value of [enable_components][crate::model::LoggingComponentConfig::enable_components].
21835    pub fn set_enable_components<T, V>(mut self, v: T) -> Self
21836    where
21837        T: std::iter::IntoIterator<Item = V>,
21838        V: std::convert::Into<crate::model::logging_component_config::Component>,
21839    {
21840        use std::iter::Iterator;
21841        self.enable_components = v.into_iter().map(|i| i.into()).collect();
21842        self
21843    }
21844}
21845
21846impl wkt::message::Message for LoggingComponentConfig {
21847    fn typename() -> &'static str {
21848        "type.googleapis.com/google.container.v1.LoggingComponentConfig"
21849    }
21850}
21851
21852/// Defines additional types related to [LoggingComponentConfig].
21853pub mod logging_component_config {
21854    #[allow(unused_imports)]
21855    use super::*;
21856
21857    /// GKE components exposing logs
21858    ///
21859    /// # Working with unknown values
21860    ///
21861    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21862    /// additional enum variants at any time. Adding new variants is not considered
21863    /// a breaking change. Applications should write their code in anticipation of:
21864    ///
21865    /// - New values appearing in future releases of the client library, **and**
21866    /// - New values received dynamically, without application changes.
21867    ///
21868    /// Please consult the [Working with enums] section in the user guide for some
21869    /// guidelines.
21870    ///
21871    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21872    #[derive(Clone, Debug, PartialEq)]
21873    #[non_exhaustive]
21874    pub enum Component {
21875        /// Default value. This shouldn't be used.
21876        Unspecified,
21877        /// system components
21878        SystemComponents,
21879        /// workloads
21880        Workloads,
21881        /// kube-apiserver
21882        Apiserver,
21883        /// kube-scheduler
21884        Scheduler,
21885        /// kube-controller-manager
21886        ControllerManager,
21887        /// kcp-sshd
21888        KcpSshd,
21889        /// kcp connection logs
21890        KcpConnection,
21891        /// If set, the enum was initialized with an unknown value.
21892        ///
21893        /// Applications can examine the value using [Component::value] or
21894        /// [Component::name].
21895        UnknownValue(component::UnknownValue),
21896    }
21897
21898    #[doc(hidden)]
21899    pub mod component {
21900        #[allow(unused_imports)]
21901        use super::*;
21902        #[derive(Clone, Debug, PartialEq)]
21903        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21904    }
21905
21906    impl Component {
21907        /// Gets the enum value.
21908        ///
21909        /// Returns `None` if the enum contains an unknown value deserialized from
21910        /// the string representation of enums.
21911        pub fn value(&self) -> std::option::Option<i32> {
21912            match self {
21913                Self::Unspecified => std::option::Option::Some(0),
21914                Self::SystemComponents => std::option::Option::Some(1),
21915                Self::Workloads => std::option::Option::Some(2),
21916                Self::Apiserver => std::option::Option::Some(3),
21917                Self::Scheduler => std::option::Option::Some(4),
21918                Self::ControllerManager => std::option::Option::Some(5),
21919                Self::KcpSshd => std::option::Option::Some(7),
21920                Self::KcpConnection => std::option::Option::Some(8),
21921                Self::UnknownValue(u) => u.0.value(),
21922            }
21923        }
21924
21925        /// Gets the enum value as a string.
21926        ///
21927        /// Returns `None` if the enum contains an unknown value deserialized from
21928        /// the integer representation of enums.
21929        pub fn name(&self) -> std::option::Option<&str> {
21930            match self {
21931                Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
21932                Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
21933                Self::Workloads => std::option::Option::Some("WORKLOADS"),
21934                Self::Apiserver => std::option::Option::Some("APISERVER"),
21935                Self::Scheduler => std::option::Option::Some("SCHEDULER"),
21936                Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
21937                Self::KcpSshd => std::option::Option::Some("KCP_SSHD"),
21938                Self::KcpConnection => std::option::Option::Some("KCP_CONNECTION"),
21939                Self::UnknownValue(u) => u.0.name(),
21940            }
21941        }
21942    }
21943
21944    impl std::default::Default for Component {
21945        fn default() -> Self {
21946            use std::convert::From;
21947            Self::from(0)
21948        }
21949    }
21950
21951    impl std::fmt::Display for Component {
21952        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21953            wkt::internal::display_enum(f, self.name(), self.value())
21954        }
21955    }
21956
21957    impl std::convert::From<i32> for Component {
21958        fn from(value: i32) -> Self {
21959            match value {
21960                0 => Self::Unspecified,
21961                1 => Self::SystemComponents,
21962                2 => Self::Workloads,
21963                3 => Self::Apiserver,
21964                4 => Self::Scheduler,
21965                5 => Self::ControllerManager,
21966                7 => Self::KcpSshd,
21967                8 => Self::KcpConnection,
21968                _ => Self::UnknownValue(component::UnknownValue(
21969                    wkt::internal::UnknownEnumValue::Integer(value),
21970                )),
21971            }
21972        }
21973    }
21974
21975    impl std::convert::From<&str> for Component {
21976        fn from(value: &str) -> Self {
21977            use std::string::ToString;
21978            match value {
21979                "COMPONENT_UNSPECIFIED" => Self::Unspecified,
21980                "SYSTEM_COMPONENTS" => Self::SystemComponents,
21981                "WORKLOADS" => Self::Workloads,
21982                "APISERVER" => Self::Apiserver,
21983                "SCHEDULER" => Self::Scheduler,
21984                "CONTROLLER_MANAGER" => Self::ControllerManager,
21985                "KCP_SSHD" => Self::KcpSshd,
21986                "KCP_CONNECTION" => Self::KcpConnection,
21987                _ => Self::UnknownValue(component::UnknownValue(
21988                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21989                )),
21990            }
21991        }
21992    }
21993
21994    impl serde::ser::Serialize for Component {
21995        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21996        where
21997            S: serde::Serializer,
21998        {
21999            match self {
22000                Self::Unspecified => serializer.serialize_i32(0),
22001                Self::SystemComponents => serializer.serialize_i32(1),
22002                Self::Workloads => serializer.serialize_i32(2),
22003                Self::Apiserver => serializer.serialize_i32(3),
22004                Self::Scheduler => serializer.serialize_i32(4),
22005                Self::ControllerManager => serializer.serialize_i32(5),
22006                Self::KcpSshd => serializer.serialize_i32(7),
22007                Self::KcpConnection => serializer.serialize_i32(8),
22008                Self::UnknownValue(u) => u.0.serialize(serializer),
22009            }
22010        }
22011    }
22012
22013    impl<'de> serde::de::Deserialize<'de> for Component {
22014        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22015        where
22016            D: serde::Deserializer<'de>,
22017        {
22018            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
22019                ".google.container.v1.LoggingComponentConfig.Component",
22020            ))
22021        }
22022    }
22023}
22024
22025/// RayClusterLoggingConfig specifies configuration of Ray logging.
22026#[serde_with::serde_as]
22027#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22028#[serde(default, rename_all = "camelCase")]
22029#[non_exhaustive]
22030pub struct RayClusterLoggingConfig {
22031    /// Enable log collection for Ray clusters.
22032    #[serde(skip_serializing_if = "wkt::internal::is_default")]
22033    pub enabled: bool,
22034
22035    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22036    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22037}
22038
22039impl RayClusterLoggingConfig {
22040    pub fn new() -> Self {
22041        std::default::Default::default()
22042    }
22043
22044    /// Sets the value of [enabled][crate::model::RayClusterLoggingConfig::enabled].
22045    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22046        self.enabled = v.into();
22047        self
22048    }
22049}
22050
22051impl wkt::message::Message for RayClusterLoggingConfig {
22052    fn typename() -> &'static str {
22053        "type.googleapis.com/google.container.v1.RayClusterLoggingConfig"
22054    }
22055}
22056
22057/// MonitoringConfig is cluster monitoring configuration.
22058#[serde_with::serde_as]
22059#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22060#[serde(default, rename_all = "camelCase")]
22061#[non_exhaustive]
22062pub struct MonitoringConfig {
22063    /// Monitoring components configuration
22064    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22065    pub component_config: std::option::Option<crate::model::MonitoringComponentConfig>,
22066
22067    /// Enable Google Cloud Managed Service for Prometheus
22068    /// in the cluster.
22069    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22070    pub managed_prometheus_config: std::option::Option<crate::model::ManagedPrometheusConfig>,
22071
22072    /// Configuration of Advanced Datapath Observability features.
22073    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22074    pub advanced_datapath_observability_config:
22075        std::option::Option<crate::model::AdvancedDatapathObservabilityConfig>,
22076
22077    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22078    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22079}
22080
22081impl MonitoringConfig {
22082    pub fn new() -> Self {
22083        std::default::Default::default()
22084    }
22085
22086    /// Sets the value of [component_config][crate::model::MonitoringConfig::component_config].
22087    pub fn set_component_config<
22088        T: std::convert::Into<std::option::Option<crate::model::MonitoringComponentConfig>>,
22089    >(
22090        mut self,
22091        v: T,
22092    ) -> Self {
22093        self.component_config = v.into();
22094        self
22095    }
22096
22097    /// Sets the value of [managed_prometheus_config][crate::model::MonitoringConfig::managed_prometheus_config].
22098    pub fn set_managed_prometheus_config<
22099        T: std::convert::Into<std::option::Option<crate::model::ManagedPrometheusConfig>>,
22100    >(
22101        mut self,
22102        v: T,
22103    ) -> Self {
22104        self.managed_prometheus_config = v.into();
22105        self
22106    }
22107
22108    /// Sets the value of [advanced_datapath_observability_config][crate::model::MonitoringConfig::advanced_datapath_observability_config].
22109    pub fn set_advanced_datapath_observability_config<
22110        T: std::convert::Into<std::option::Option<crate::model::AdvancedDatapathObservabilityConfig>>,
22111    >(
22112        mut self,
22113        v: T,
22114    ) -> Self {
22115        self.advanced_datapath_observability_config = v.into();
22116        self
22117    }
22118}
22119
22120impl wkt::message::Message for MonitoringConfig {
22121    fn typename() -> &'static str {
22122        "type.googleapis.com/google.container.v1.MonitoringConfig"
22123    }
22124}
22125
22126/// AdvancedDatapathObservabilityConfig specifies configuration of observability
22127/// features of advanced datapath.
22128#[serde_with::serde_as]
22129#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22130#[serde(default, rename_all = "camelCase")]
22131#[non_exhaustive]
22132pub struct AdvancedDatapathObservabilityConfig {
22133    /// Expose flow metrics on nodes
22134    #[serde(skip_serializing_if = "wkt::internal::is_default")]
22135    pub enable_metrics: bool,
22136
22137    /// Method used to make Relay available
22138    pub relay_mode: crate::model::advanced_datapath_observability_config::RelayMode,
22139
22140    /// Enable Relay component
22141    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22142    pub enable_relay: std::option::Option<bool>,
22143
22144    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22145    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22146}
22147
22148impl AdvancedDatapathObservabilityConfig {
22149    pub fn new() -> Self {
22150        std::default::Default::default()
22151    }
22152
22153    /// Sets the value of [enable_metrics][crate::model::AdvancedDatapathObservabilityConfig::enable_metrics].
22154    pub fn set_enable_metrics<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22155        self.enable_metrics = v.into();
22156        self
22157    }
22158
22159    /// Sets the value of [relay_mode][crate::model::AdvancedDatapathObservabilityConfig::relay_mode].
22160    pub fn set_relay_mode<
22161        T: std::convert::Into<crate::model::advanced_datapath_observability_config::RelayMode>,
22162    >(
22163        mut self,
22164        v: T,
22165    ) -> Self {
22166        self.relay_mode = v.into();
22167        self
22168    }
22169
22170    /// Sets the value of [enable_relay][crate::model::AdvancedDatapathObservabilityConfig::enable_relay].
22171    pub fn set_enable_relay<T: std::convert::Into<std::option::Option<bool>>>(
22172        mut self,
22173        v: T,
22174    ) -> Self {
22175        self.enable_relay = v.into();
22176        self
22177    }
22178}
22179
22180impl wkt::message::Message for AdvancedDatapathObservabilityConfig {
22181    fn typename() -> &'static str {
22182        "type.googleapis.com/google.container.v1.AdvancedDatapathObservabilityConfig"
22183    }
22184}
22185
22186/// Defines additional types related to [AdvancedDatapathObservabilityConfig].
22187pub mod advanced_datapath_observability_config {
22188    #[allow(unused_imports)]
22189    use super::*;
22190
22191    /// Supported Relay modes
22192    ///
22193    /// # Working with unknown values
22194    ///
22195    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22196    /// additional enum variants at any time. Adding new variants is not considered
22197    /// a breaking change. Applications should write their code in anticipation of:
22198    ///
22199    /// - New values appearing in future releases of the client library, **and**
22200    /// - New values received dynamically, without application changes.
22201    ///
22202    /// Please consult the [Working with enums] section in the user guide for some
22203    /// guidelines.
22204    ///
22205    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22206    #[derive(Clone, Debug, PartialEq)]
22207    #[non_exhaustive]
22208    pub enum RelayMode {
22209        /// Default value. This shouldn't be used.
22210        Unspecified,
22211        /// disabled
22212        Disabled,
22213        /// exposed via internal load balancer
22214        InternalVpcLb,
22215        /// exposed via external load balancer
22216        ExternalLb,
22217        /// If set, the enum was initialized with an unknown value.
22218        ///
22219        /// Applications can examine the value using [RelayMode::value] or
22220        /// [RelayMode::name].
22221        UnknownValue(relay_mode::UnknownValue),
22222    }
22223
22224    #[doc(hidden)]
22225    pub mod relay_mode {
22226        #[allow(unused_imports)]
22227        use super::*;
22228        #[derive(Clone, Debug, PartialEq)]
22229        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22230    }
22231
22232    impl RelayMode {
22233        /// Gets the enum value.
22234        ///
22235        /// Returns `None` if the enum contains an unknown value deserialized from
22236        /// the string representation of enums.
22237        pub fn value(&self) -> std::option::Option<i32> {
22238            match self {
22239                Self::Unspecified => std::option::Option::Some(0),
22240                Self::Disabled => std::option::Option::Some(1),
22241                Self::InternalVpcLb => std::option::Option::Some(3),
22242                Self::ExternalLb => std::option::Option::Some(4),
22243                Self::UnknownValue(u) => u.0.value(),
22244            }
22245        }
22246
22247        /// Gets the enum value as a string.
22248        ///
22249        /// Returns `None` if the enum contains an unknown value deserialized from
22250        /// the integer representation of enums.
22251        pub fn name(&self) -> std::option::Option<&str> {
22252            match self {
22253                Self::Unspecified => std::option::Option::Some("RELAY_MODE_UNSPECIFIED"),
22254                Self::Disabled => std::option::Option::Some("DISABLED"),
22255                Self::InternalVpcLb => std::option::Option::Some("INTERNAL_VPC_LB"),
22256                Self::ExternalLb => std::option::Option::Some("EXTERNAL_LB"),
22257                Self::UnknownValue(u) => u.0.name(),
22258            }
22259        }
22260    }
22261
22262    impl std::default::Default for RelayMode {
22263        fn default() -> Self {
22264            use std::convert::From;
22265            Self::from(0)
22266        }
22267    }
22268
22269    impl std::fmt::Display for RelayMode {
22270        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22271            wkt::internal::display_enum(f, self.name(), self.value())
22272        }
22273    }
22274
22275    impl std::convert::From<i32> for RelayMode {
22276        fn from(value: i32) -> Self {
22277            match value {
22278                0 => Self::Unspecified,
22279                1 => Self::Disabled,
22280                3 => Self::InternalVpcLb,
22281                4 => Self::ExternalLb,
22282                _ => Self::UnknownValue(relay_mode::UnknownValue(
22283                    wkt::internal::UnknownEnumValue::Integer(value),
22284                )),
22285            }
22286        }
22287    }
22288
22289    impl std::convert::From<&str> for RelayMode {
22290        fn from(value: &str) -> Self {
22291            use std::string::ToString;
22292            match value {
22293                "RELAY_MODE_UNSPECIFIED" => Self::Unspecified,
22294                "DISABLED" => Self::Disabled,
22295                "INTERNAL_VPC_LB" => Self::InternalVpcLb,
22296                "EXTERNAL_LB" => Self::ExternalLb,
22297                _ => Self::UnknownValue(relay_mode::UnknownValue(
22298                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22299                )),
22300            }
22301        }
22302    }
22303
22304    impl serde::ser::Serialize for RelayMode {
22305        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22306        where
22307            S: serde::Serializer,
22308        {
22309            match self {
22310                Self::Unspecified => serializer.serialize_i32(0),
22311                Self::Disabled => serializer.serialize_i32(1),
22312                Self::InternalVpcLb => serializer.serialize_i32(3),
22313                Self::ExternalLb => serializer.serialize_i32(4),
22314                Self::UnknownValue(u) => u.0.serialize(serializer),
22315            }
22316        }
22317    }
22318
22319    impl<'de> serde::de::Deserialize<'de> for RelayMode {
22320        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22321        where
22322            D: serde::Deserializer<'de>,
22323        {
22324            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelayMode>::new(
22325                ".google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode",
22326            ))
22327        }
22328    }
22329}
22330
22331/// RayClusterMonitoringConfig specifies monitoring configuration for Ray
22332/// clusters.
22333#[serde_with::serde_as]
22334#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22335#[serde(default, rename_all = "camelCase")]
22336#[non_exhaustive]
22337pub struct RayClusterMonitoringConfig {
22338    /// Enable metrics collection for Ray clusters.
22339    #[serde(skip_serializing_if = "wkt::internal::is_default")]
22340    pub enabled: bool,
22341
22342    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22343    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22344}
22345
22346impl RayClusterMonitoringConfig {
22347    pub fn new() -> Self {
22348        std::default::Default::default()
22349    }
22350
22351    /// Sets the value of [enabled][crate::model::RayClusterMonitoringConfig::enabled].
22352    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22353        self.enabled = v.into();
22354        self
22355    }
22356}
22357
22358impl wkt::message::Message for RayClusterMonitoringConfig {
22359    fn typename() -> &'static str {
22360        "type.googleapis.com/google.container.v1.RayClusterMonitoringConfig"
22361    }
22362}
22363
22364/// NodePoolLoggingConfig specifies logging configuration for nodepools.
22365#[serde_with::serde_as]
22366#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22367#[serde(default, rename_all = "camelCase")]
22368#[non_exhaustive]
22369pub struct NodePoolLoggingConfig {
22370    /// Logging variant configuration.
22371    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22372    pub variant_config: std::option::Option<crate::model::LoggingVariantConfig>,
22373
22374    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22375    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22376}
22377
22378impl NodePoolLoggingConfig {
22379    pub fn new() -> Self {
22380        std::default::Default::default()
22381    }
22382
22383    /// Sets the value of [variant_config][crate::model::NodePoolLoggingConfig::variant_config].
22384    pub fn set_variant_config<
22385        T: std::convert::Into<std::option::Option<crate::model::LoggingVariantConfig>>,
22386    >(
22387        mut self,
22388        v: T,
22389    ) -> Self {
22390        self.variant_config = v.into();
22391        self
22392    }
22393}
22394
22395impl wkt::message::Message for NodePoolLoggingConfig {
22396    fn typename() -> &'static str {
22397        "type.googleapis.com/google.container.v1.NodePoolLoggingConfig"
22398    }
22399}
22400
22401/// LoggingVariantConfig specifies the behaviour of the logging component.
22402#[serde_with::serde_as]
22403#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22404#[serde(default, rename_all = "camelCase")]
22405#[non_exhaustive]
22406pub struct LoggingVariantConfig {
22407    /// Logging variant deployed on nodes.
22408    pub variant: crate::model::logging_variant_config::Variant,
22409
22410    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22411    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22412}
22413
22414impl LoggingVariantConfig {
22415    pub fn new() -> Self {
22416        std::default::Default::default()
22417    }
22418
22419    /// Sets the value of [variant][crate::model::LoggingVariantConfig::variant].
22420    pub fn set_variant<T: std::convert::Into<crate::model::logging_variant_config::Variant>>(
22421        mut self,
22422        v: T,
22423    ) -> Self {
22424        self.variant = v.into();
22425        self
22426    }
22427}
22428
22429impl wkt::message::Message for LoggingVariantConfig {
22430    fn typename() -> &'static str {
22431        "type.googleapis.com/google.container.v1.LoggingVariantConfig"
22432    }
22433}
22434
22435/// Defines additional types related to [LoggingVariantConfig].
22436pub mod logging_variant_config {
22437    #[allow(unused_imports)]
22438    use super::*;
22439
22440    /// Logging component variants.
22441    ///
22442    /// # Working with unknown values
22443    ///
22444    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22445    /// additional enum variants at any time. Adding new variants is not considered
22446    /// a breaking change. Applications should write their code in anticipation of:
22447    ///
22448    /// - New values appearing in future releases of the client library, **and**
22449    /// - New values received dynamically, without application changes.
22450    ///
22451    /// Please consult the [Working with enums] section in the user guide for some
22452    /// guidelines.
22453    ///
22454    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22455    #[derive(Clone, Debug, PartialEq)]
22456    #[non_exhaustive]
22457    pub enum Variant {
22458        /// Default value. This shouldn't be used.
22459        Unspecified,
22460        /// default logging variant.
22461        Default,
22462        /// maximum logging throughput variant.
22463        MaxThroughput,
22464        /// If set, the enum was initialized with an unknown value.
22465        ///
22466        /// Applications can examine the value using [Variant::value] or
22467        /// [Variant::name].
22468        UnknownValue(variant::UnknownValue),
22469    }
22470
22471    #[doc(hidden)]
22472    pub mod variant {
22473        #[allow(unused_imports)]
22474        use super::*;
22475        #[derive(Clone, Debug, PartialEq)]
22476        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22477    }
22478
22479    impl Variant {
22480        /// Gets the enum value.
22481        ///
22482        /// Returns `None` if the enum contains an unknown value deserialized from
22483        /// the string representation of enums.
22484        pub fn value(&self) -> std::option::Option<i32> {
22485            match self {
22486                Self::Unspecified => std::option::Option::Some(0),
22487                Self::Default => std::option::Option::Some(1),
22488                Self::MaxThroughput => std::option::Option::Some(2),
22489                Self::UnknownValue(u) => u.0.value(),
22490            }
22491        }
22492
22493        /// Gets the enum value as a string.
22494        ///
22495        /// Returns `None` if the enum contains an unknown value deserialized from
22496        /// the integer representation of enums.
22497        pub fn name(&self) -> std::option::Option<&str> {
22498            match self {
22499                Self::Unspecified => std::option::Option::Some("VARIANT_UNSPECIFIED"),
22500                Self::Default => std::option::Option::Some("DEFAULT"),
22501                Self::MaxThroughput => std::option::Option::Some("MAX_THROUGHPUT"),
22502                Self::UnknownValue(u) => u.0.name(),
22503            }
22504        }
22505    }
22506
22507    impl std::default::Default for Variant {
22508        fn default() -> Self {
22509            use std::convert::From;
22510            Self::from(0)
22511        }
22512    }
22513
22514    impl std::fmt::Display for Variant {
22515        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22516            wkt::internal::display_enum(f, self.name(), self.value())
22517        }
22518    }
22519
22520    impl std::convert::From<i32> for Variant {
22521        fn from(value: i32) -> Self {
22522            match value {
22523                0 => Self::Unspecified,
22524                1 => Self::Default,
22525                2 => Self::MaxThroughput,
22526                _ => Self::UnknownValue(variant::UnknownValue(
22527                    wkt::internal::UnknownEnumValue::Integer(value),
22528                )),
22529            }
22530        }
22531    }
22532
22533    impl std::convert::From<&str> for Variant {
22534        fn from(value: &str) -> Self {
22535            use std::string::ToString;
22536            match value {
22537                "VARIANT_UNSPECIFIED" => Self::Unspecified,
22538                "DEFAULT" => Self::Default,
22539                "MAX_THROUGHPUT" => Self::MaxThroughput,
22540                _ => Self::UnknownValue(variant::UnknownValue(
22541                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22542                )),
22543            }
22544        }
22545    }
22546
22547    impl serde::ser::Serialize for Variant {
22548        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22549        where
22550            S: serde::Serializer,
22551        {
22552            match self {
22553                Self::Unspecified => serializer.serialize_i32(0),
22554                Self::Default => serializer.serialize_i32(1),
22555                Self::MaxThroughput => serializer.serialize_i32(2),
22556                Self::UnknownValue(u) => u.0.serialize(serializer),
22557            }
22558        }
22559    }
22560
22561    impl<'de> serde::de::Deserialize<'de> for Variant {
22562        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22563        where
22564            D: serde::Deserializer<'de>,
22565        {
22566            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Variant>::new(
22567                ".google.container.v1.LoggingVariantConfig.Variant",
22568            ))
22569        }
22570    }
22571}
22572
22573/// MonitoringComponentConfig is cluster monitoring component configuration.
22574#[serde_with::serde_as]
22575#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22576#[serde(default, rename_all = "camelCase")]
22577#[non_exhaustive]
22578pub struct MonitoringComponentConfig {
22579    /// Select components to collect metrics. An empty set would disable all
22580    /// monitoring.
22581    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
22582    pub enable_components: std::vec::Vec<crate::model::monitoring_component_config::Component>,
22583
22584    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22585    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22586}
22587
22588impl MonitoringComponentConfig {
22589    pub fn new() -> Self {
22590        std::default::Default::default()
22591    }
22592
22593    /// Sets the value of [enable_components][crate::model::MonitoringComponentConfig::enable_components].
22594    pub fn set_enable_components<T, V>(mut self, v: T) -> Self
22595    where
22596        T: std::iter::IntoIterator<Item = V>,
22597        V: std::convert::Into<crate::model::monitoring_component_config::Component>,
22598    {
22599        use std::iter::Iterator;
22600        self.enable_components = v.into_iter().map(|i| i.into()).collect();
22601        self
22602    }
22603}
22604
22605impl wkt::message::Message for MonitoringComponentConfig {
22606    fn typename() -> &'static str {
22607        "type.googleapis.com/google.container.v1.MonitoringComponentConfig"
22608    }
22609}
22610
22611/// Defines additional types related to [MonitoringComponentConfig].
22612pub mod monitoring_component_config {
22613    #[allow(unused_imports)]
22614    use super::*;
22615
22616    /// GKE components exposing metrics
22617    ///
22618    /// # Working with unknown values
22619    ///
22620    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22621    /// additional enum variants at any time. Adding new variants is not considered
22622    /// a breaking change. Applications should write their code in anticipation of:
22623    ///
22624    /// - New values appearing in future releases of the client library, **and**
22625    /// - New values received dynamically, without application changes.
22626    ///
22627    /// Please consult the [Working with enums] section in the user guide for some
22628    /// guidelines.
22629    ///
22630    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22631    #[derive(Clone, Debug, PartialEq)]
22632    #[non_exhaustive]
22633    pub enum Component {
22634        /// Default value. This shouldn't be used.
22635        Unspecified,
22636        /// system components
22637        SystemComponents,
22638        /// kube-apiserver
22639        Apiserver,
22640        /// kube-scheduler
22641        Scheduler,
22642        /// kube-controller-manager
22643        ControllerManager,
22644        /// Storage
22645        Storage,
22646        /// Horizontal Pod Autoscaling
22647        Hpa,
22648        /// Pod
22649        Pod,
22650        /// DaemonSet
22651        Daemonset,
22652        /// Deployment
22653        Deployment,
22654        /// Statefulset
22655        Statefulset,
22656        /// CADVISOR
22657        Cadvisor,
22658        /// KUBELET
22659        Kubelet,
22660        /// NVIDIA Data Center GPU Manager (DCGM)
22661        Dcgm,
22662        /// If set, the enum was initialized with an unknown value.
22663        ///
22664        /// Applications can examine the value using [Component::value] or
22665        /// [Component::name].
22666        UnknownValue(component::UnknownValue),
22667    }
22668
22669    #[doc(hidden)]
22670    pub mod component {
22671        #[allow(unused_imports)]
22672        use super::*;
22673        #[derive(Clone, Debug, PartialEq)]
22674        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22675    }
22676
22677    impl Component {
22678        /// Gets the enum value.
22679        ///
22680        /// Returns `None` if the enum contains an unknown value deserialized from
22681        /// the string representation of enums.
22682        pub fn value(&self) -> std::option::Option<i32> {
22683            match self {
22684                Self::Unspecified => std::option::Option::Some(0),
22685                Self::SystemComponents => std::option::Option::Some(1),
22686                Self::Apiserver => std::option::Option::Some(3),
22687                Self::Scheduler => std::option::Option::Some(4),
22688                Self::ControllerManager => std::option::Option::Some(5),
22689                Self::Storage => std::option::Option::Some(7),
22690                Self::Hpa => std::option::Option::Some(8),
22691                Self::Pod => std::option::Option::Some(9),
22692                Self::Daemonset => std::option::Option::Some(10),
22693                Self::Deployment => std::option::Option::Some(11),
22694                Self::Statefulset => std::option::Option::Some(12),
22695                Self::Cadvisor => std::option::Option::Some(13),
22696                Self::Kubelet => std::option::Option::Some(14),
22697                Self::Dcgm => std::option::Option::Some(15),
22698                Self::UnknownValue(u) => u.0.value(),
22699            }
22700        }
22701
22702        /// Gets the enum value as a string.
22703        ///
22704        /// Returns `None` if the enum contains an unknown value deserialized from
22705        /// the integer representation of enums.
22706        pub fn name(&self) -> std::option::Option<&str> {
22707            match self {
22708                Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
22709                Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
22710                Self::Apiserver => std::option::Option::Some("APISERVER"),
22711                Self::Scheduler => std::option::Option::Some("SCHEDULER"),
22712                Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
22713                Self::Storage => std::option::Option::Some("STORAGE"),
22714                Self::Hpa => std::option::Option::Some("HPA"),
22715                Self::Pod => std::option::Option::Some("POD"),
22716                Self::Daemonset => std::option::Option::Some("DAEMONSET"),
22717                Self::Deployment => std::option::Option::Some("DEPLOYMENT"),
22718                Self::Statefulset => std::option::Option::Some("STATEFULSET"),
22719                Self::Cadvisor => std::option::Option::Some("CADVISOR"),
22720                Self::Kubelet => std::option::Option::Some("KUBELET"),
22721                Self::Dcgm => std::option::Option::Some("DCGM"),
22722                Self::UnknownValue(u) => u.0.name(),
22723            }
22724        }
22725    }
22726
22727    impl std::default::Default for Component {
22728        fn default() -> Self {
22729            use std::convert::From;
22730            Self::from(0)
22731        }
22732    }
22733
22734    impl std::fmt::Display for Component {
22735        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22736            wkt::internal::display_enum(f, self.name(), self.value())
22737        }
22738    }
22739
22740    impl std::convert::From<i32> for Component {
22741        fn from(value: i32) -> Self {
22742            match value {
22743                0 => Self::Unspecified,
22744                1 => Self::SystemComponents,
22745                3 => Self::Apiserver,
22746                4 => Self::Scheduler,
22747                5 => Self::ControllerManager,
22748                7 => Self::Storage,
22749                8 => Self::Hpa,
22750                9 => Self::Pod,
22751                10 => Self::Daemonset,
22752                11 => Self::Deployment,
22753                12 => Self::Statefulset,
22754                13 => Self::Cadvisor,
22755                14 => Self::Kubelet,
22756                15 => Self::Dcgm,
22757                _ => Self::UnknownValue(component::UnknownValue(
22758                    wkt::internal::UnknownEnumValue::Integer(value),
22759                )),
22760            }
22761        }
22762    }
22763
22764    impl std::convert::From<&str> for Component {
22765        fn from(value: &str) -> Self {
22766            use std::string::ToString;
22767            match value {
22768                "COMPONENT_UNSPECIFIED" => Self::Unspecified,
22769                "SYSTEM_COMPONENTS" => Self::SystemComponents,
22770                "APISERVER" => Self::Apiserver,
22771                "SCHEDULER" => Self::Scheduler,
22772                "CONTROLLER_MANAGER" => Self::ControllerManager,
22773                "STORAGE" => Self::Storage,
22774                "HPA" => Self::Hpa,
22775                "POD" => Self::Pod,
22776                "DAEMONSET" => Self::Daemonset,
22777                "DEPLOYMENT" => Self::Deployment,
22778                "STATEFULSET" => Self::Statefulset,
22779                "CADVISOR" => Self::Cadvisor,
22780                "KUBELET" => Self::Kubelet,
22781                "DCGM" => Self::Dcgm,
22782                _ => Self::UnknownValue(component::UnknownValue(
22783                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22784                )),
22785            }
22786        }
22787    }
22788
22789    impl serde::ser::Serialize for Component {
22790        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22791        where
22792            S: serde::Serializer,
22793        {
22794            match self {
22795                Self::Unspecified => serializer.serialize_i32(0),
22796                Self::SystemComponents => serializer.serialize_i32(1),
22797                Self::Apiserver => serializer.serialize_i32(3),
22798                Self::Scheduler => serializer.serialize_i32(4),
22799                Self::ControllerManager => serializer.serialize_i32(5),
22800                Self::Storage => serializer.serialize_i32(7),
22801                Self::Hpa => serializer.serialize_i32(8),
22802                Self::Pod => serializer.serialize_i32(9),
22803                Self::Daemonset => serializer.serialize_i32(10),
22804                Self::Deployment => serializer.serialize_i32(11),
22805                Self::Statefulset => serializer.serialize_i32(12),
22806                Self::Cadvisor => serializer.serialize_i32(13),
22807                Self::Kubelet => serializer.serialize_i32(14),
22808                Self::Dcgm => serializer.serialize_i32(15),
22809                Self::UnknownValue(u) => u.0.serialize(serializer),
22810            }
22811        }
22812    }
22813
22814    impl<'de> serde::de::Deserialize<'de> for Component {
22815        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22816        where
22817            D: serde::Deserializer<'de>,
22818        {
22819            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
22820                ".google.container.v1.MonitoringComponentConfig.Component",
22821            ))
22822        }
22823    }
22824}
22825
22826/// ManagedPrometheusConfig defines the configuration for
22827/// Google Cloud Managed Service for Prometheus.
22828#[serde_with::serde_as]
22829#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22830#[serde(default, rename_all = "camelCase")]
22831#[non_exhaustive]
22832pub struct ManagedPrometheusConfig {
22833    /// Enable Managed Collection.
22834    #[serde(skip_serializing_if = "wkt::internal::is_default")]
22835    pub enabled: bool,
22836
22837    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22838    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22839}
22840
22841impl ManagedPrometheusConfig {
22842    pub fn new() -> Self {
22843        std::default::Default::default()
22844    }
22845
22846    /// Sets the value of [enabled][crate::model::ManagedPrometheusConfig::enabled].
22847    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22848        self.enabled = v.into();
22849        self
22850    }
22851}
22852
22853impl wkt::message::Message for ManagedPrometheusConfig {
22854    fn typename() -> &'static str {
22855        "type.googleapis.com/google.container.v1.ManagedPrometheusConfig"
22856    }
22857}
22858
22859/// Fleet is the fleet configuration for the cluster.
22860#[serde_with::serde_as]
22861#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22862#[serde(default, rename_all = "camelCase")]
22863#[non_exhaustive]
22864pub struct Fleet {
22865    /// The Fleet host project(project ID or project number) where this cluster
22866    /// will be registered to. This field cannot be changed after the cluster has
22867    /// been registered.
22868    #[serde(skip_serializing_if = "std::string::String::is_empty")]
22869    pub project: std::string::String,
22870
22871    /// Output only. The full resource name of the registered fleet membership of
22872    /// the cluster, in the format
22873    /// `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.
22874    #[serde(skip_serializing_if = "std::string::String::is_empty")]
22875    pub membership: std::string::String,
22876
22877    /// Output only. Whether the cluster has been registered through the fleet
22878    /// API.
22879    #[serde(skip_serializing_if = "wkt::internal::is_default")]
22880    pub pre_registered: bool,
22881
22882    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22883    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22884}
22885
22886impl Fleet {
22887    pub fn new() -> Self {
22888        std::default::Default::default()
22889    }
22890
22891    /// Sets the value of [project][crate::model::Fleet::project].
22892    pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22893        self.project = v.into();
22894        self
22895    }
22896
22897    /// Sets the value of [membership][crate::model::Fleet::membership].
22898    pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22899        self.membership = v.into();
22900        self
22901    }
22902
22903    /// Sets the value of [pre_registered][crate::model::Fleet::pre_registered].
22904    pub fn set_pre_registered<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22905        self.pre_registered = v.into();
22906        self
22907    }
22908}
22909
22910impl wkt::message::Message for Fleet {
22911    fn typename() -> &'static str {
22912        "type.googleapis.com/google.container.v1.Fleet"
22913    }
22914}
22915
22916/// Configuration for all of the cluster's control plane endpoints.
22917#[serde_with::serde_as]
22918#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22919#[serde(default, rename_all = "camelCase")]
22920#[non_exhaustive]
22921pub struct ControlPlaneEndpointsConfig {
22922    /// DNS endpoint configuration.
22923    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22924    pub dns_endpoint_config:
22925        std::option::Option<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
22926
22927    /// IP endpoints configuration.
22928    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22929    pub ip_endpoints_config:
22930        std::option::Option<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
22931
22932    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22933    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22934}
22935
22936impl ControlPlaneEndpointsConfig {
22937    pub fn new() -> Self {
22938        std::default::Default::default()
22939    }
22940
22941    /// Sets the value of [dns_endpoint_config][crate::model::ControlPlaneEndpointsConfig::dns_endpoint_config].
22942    pub fn set_dns_endpoint_config<
22943        T: std::convert::Into<
22944                std::option::Option<
22945                    crate::model::control_plane_endpoints_config::DNSEndpointConfig,
22946                >,
22947            >,
22948    >(
22949        mut self,
22950        v: T,
22951    ) -> Self {
22952        self.dns_endpoint_config = v.into();
22953        self
22954    }
22955
22956    /// Sets the value of [ip_endpoints_config][crate::model::ControlPlaneEndpointsConfig::ip_endpoints_config].
22957    pub fn set_ip_endpoints_config<
22958        T: std::convert::Into<
22959                std::option::Option<
22960                    crate::model::control_plane_endpoints_config::IPEndpointsConfig,
22961                >,
22962            >,
22963    >(
22964        mut self,
22965        v: T,
22966    ) -> Self {
22967        self.ip_endpoints_config = v.into();
22968        self
22969    }
22970}
22971
22972impl wkt::message::Message for ControlPlaneEndpointsConfig {
22973    fn typename() -> &'static str {
22974        "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig"
22975    }
22976}
22977
22978/// Defines additional types related to [ControlPlaneEndpointsConfig].
22979pub mod control_plane_endpoints_config {
22980    #[allow(unused_imports)]
22981    use super::*;
22982
22983    /// Describes the configuration of a DNS endpoint.
22984    #[serde_with::serde_as]
22985    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22986    #[serde(default, rename_all = "camelCase")]
22987    #[non_exhaustive]
22988    pub struct DNSEndpointConfig {
22989        /// Output only. The cluster's DNS endpoint configuration.
22990        /// A DNS format address. This is accessible from the public internet.
22991        /// Ex: uid.us-central1.gke.goog.
22992        /// Always present, but the behavior may change according to the value of
22993        /// [DNSEndpointConfig.allow_external_traffic][google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic].
22994        ///
22995        /// [google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic]: crate::model::control_plane_endpoints_config::DNSEndpointConfig::allow_external_traffic
22996        #[serde(skip_serializing_if = "std::string::String::is_empty")]
22997        pub endpoint: std::string::String,
22998
22999        /// Controls whether user traffic is allowed over this endpoint. Note that
23000        /// GCP-managed services may still use the endpoint even if this is false.
23001        #[serde(skip_serializing_if = "std::option::Option::is_none")]
23002        pub allow_external_traffic: std::option::Option<bool>,
23003
23004        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23005        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23006    }
23007
23008    impl DNSEndpointConfig {
23009        pub fn new() -> Self {
23010            std::default::Default::default()
23011        }
23012
23013        /// Sets the value of [endpoint][crate::model::control_plane_endpoints_config::DNSEndpointConfig::endpoint].
23014        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23015            self.endpoint = v.into();
23016            self
23017        }
23018
23019        /// Sets the value of [allow_external_traffic][crate::model::control_plane_endpoints_config::DNSEndpointConfig::allow_external_traffic].
23020        pub fn set_allow_external_traffic<T: std::convert::Into<std::option::Option<bool>>>(
23021            mut self,
23022            v: T,
23023        ) -> Self {
23024            self.allow_external_traffic = v.into();
23025            self
23026        }
23027    }
23028
23029    impl wkt::message::Message for DNSEndpointConfig {
23030        fn typename() -> &'static str {
23031            "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig"
23032        }
23033    }
23034
23035    /// IP endpoints configuration.
23036    #[serde_with::serde_as]
23037    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23038    #[serde(default, rename_all = "camelCase")]
23039    #[non_exhaustive]
23040    pub struct IPEndpointsConfig {
23041        /// Controls whether to allow direct IP access.
23042        #[serde(skip_serializing_if = "std::option::Option::is_none")]
23043        pub enabled: std::option::Option<bool>,
23044
23045        /// Controls whether the control plane allows access through a public IP.
23046        /// It is invalid to specify both
23047        /// [PrivateClusterConfig.enablePrivateEndpoint][] and this field at the same
23048        /// time.
23049        #[serde(skip_serializing_if = "std::option::Option::is_none")]
23050        pub enable_public_endpoint: std::option::Option<bool>,
23051
23052        /// Controls whether the control plane's private endpoint is accessible from
23053        /// sources in other regions.
23054        /// It is invalid to specify both
23055        /// [PrivateClusterMasterGlobalAccessConfig.enabled][google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled]
23056        /// and this field at the same time.
23057        ///
23058        /// [google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled]: crate::model::PrivateClusterMasterGlobalAccessConfig::enabled
23059        #[serde(skip_serializing_if = "std::option::Option::is_none")]
23060        pub global_access: std::option::Option<bool>,
23061
23062        /// Configuration of authorized networks. If enabled, restricts access to the
23063        /// control plane based on source IP.
23064        /// It is invalid to specify both
23065        /// [Cluster.masterAuthorizedNetworksConfig][] and this field at the same
23066        /// time.
23067        #[serde(skip_serializing_if = "std::option::Option::is_none")]
23068        pub authorized_networks_config:
23069            std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
23070
23071        /// Output only. The external IP address of this cluster's control plane.
23072        /// Only populated if enabled.
23073        #[serde(skip_serializing_if = "std::string::String::is_empty")]
23074        pub public_endpoint: std::string::String,
23075
23076        /// Output only. The internal IP address of this cluster's control plane.
23077        /// Only populated if enabled.
23078        #[serde(skip_serializing_if = "std::string::String::is_empty")]
23079        pub private_endpoint: std::string::String,
23080
23081        /// Subnet to provision the master's private endpoint during cluster
23082        /// creation. Specified in projects/*/regions/*/subnetworks/* format. It is
23083        /// invalid to specify both
23084        /// [PrivateClusterConfig.privateEndpointSubnetwork][] and this field at the
23085        /// same time.
23086        #[serde(skip_serializing_if = "std::string::String::is_empty")]
23087        pub private_endpoint_subnetwork: std::string::String,
23088
23089        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23090        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23091    }
23092
23093    impl IPEndpointsConfig {
23094        pub fn new() -> Self {
23095            std::default::Default::default()
23096        }
23097
23098        /// Sets the value of [enabled][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enabled].
23099        pub fn set_enabled<T: std::convert::Into<std::option::Option<bool>>>(
23100            mut self,
23101            v: T,
23102        ) -> Self {
23103            self.enabled = v.into();
23104            self
23105        }
23106
23107        /// Sets the value of [enable_public_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enable_public_endpoint].
23108        pub fn set_enable_public_endpoint<T: std::convert::Into<std::option::Option<bool>>>(
23109            mut self,
23110            v: T,
23111        ) -> Self {
23112            self.enable_public_endpoint = v.into();
23113            self
23114        }
23115
23116        /// Sets the value of [global_access][crate::model::control_plane_endpoints_config::IPEndpointsConfig::global_access].
23117        pub fn set_global_access<T: std::convert::Into<std::option::Option<bool>>>(
23118            mut self,
23119            v: T,
23120        ) -> Self {
23121            self.global_access = v.into();
23122            self
23123        }
23124
23125        /// Sets the value of [authorized_networks_config][crate::model::control_plane_endpoints_config::IPEndpointsConfig::authorized_networks_config].
23126        pub fn set_authorized_networks_config<
23127            T: std::convert::Into<std::option::Option<crate::model::MasterAuthorizedNetworksConfig>>,
23128        >(
23129            mut self,
23130            v: T,
23131        ) -> Self {
23132            self.authorized_networks_config = v.into();
23133            self
23134        }
23135
23136        /// Sets the value of [public_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::public_endpoint].
23137        pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(
23138            mut self,
23139            v: T,
23140        ) -> Self {
23141            self.public_endpoint = v.into();
23142            self
23143        }
23144
23145        /// Sets the value of [private_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint].
23146        pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
23147            mut self,
23148            v: T,
23149        ) -> Self {
23150            self.private_endpoint = v.into();
23151            self
23152        }
23153
23154        /// Sets the value of [private_endpoint_subnetwork][crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint_subnetwork].
23155        pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
23156            mut self,
23157            v: T,
23158        ) -> Self {
23159            self.private_endpoint_subnetwork = v.into();
23160            self
23161        }
23162    }
23163
23164    impl wkt::message::Message for IPEndpointsConfig {
23165        fn typename() -> &'static str {
23166            "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig"
23167        }
23168    }
23169}
23170
23171/// LocalNvmeSsdBlockConfig contains configuration for using raw-block local
23172/// NVMe SSDs
23173#[serde_with::serde_as]
23174#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23175#[serde(default, rename_all = "camelCase")]
23176#[non_exhaustive]
23177pub struct LocalNvmeSsdBlockConfig {
23178    /// Number of local NVMe SSDs to use.  The limit for this value is dependent
23179    /// upon the maximum number of disk available on a machine per zone. See:
23180    /// <https://cloud.google.com/compute/docs/disks/local-ssd>
23181    /// for more information.
23182    ///
23183    /// A zero (or unset) value has different meanings depending on machine type
23184    /// being used:
23185    ///
23186    /// . For pre-Gen3 machines, which support flexible numbers of local ssds,
23187    ///   zero (or unset) means to disable using local SSDs as ephemeral storage.
23188    /// . For Gen3 machines which dictate a specific number of local ssds, zero
23189    ///   (or unset) means to use the default number of local ssds that goes with
23190    ///   that machine type. For example, for a c3-standard-8-lssd machine, 2 local
23191    ///   ssds would be provisioned. For c3-standard-8 (which doesn't support local
23192    ///   ssds), 0 will be provisioned. See
23193    ///   <https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds>
23194    ///   for more info.
23195    #[serde(skip_serializing_if = "wkt::internal::is_default")]
23196    pub local_ssd_count: i32,
23197
23198    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23199    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23200}
23201
23202impl LocalNvmeSsdBlockConfig {
23203    pub fn new() -> Self {
23204        std::default::Default::default()
23205    }
23206
23207    /// Sets the value of [local_ssd_count][crate::model::LocalNvmeSsdBlockConfig::local_ssd_count].
23208    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23209        self.local_ssd_count = v.into();
23210        self
23211    }
23212}
23213
23214impl wkt::message::Message for LocalNvmeSsdBlockConfig {
23215    fn typename() -> &'static str {
23216        "type.googleapis.com/google.container.v1.LocalNvmeSsdBlockConfig"
23217    }
23218}
23219
23220/// EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral
23221/// storage using Local SSDs.
23222#[serde_with::serde_as]
23223#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23224#[serde(default, rename_all = "camelCase")]
23225#[non_exhaustive]
23226pub struct EphemeralStorageLocalSsdConfig {
23227    /// Number of local SSDs to use to back ephemeral storage. Uses NVMe
23228    /// interfaces.
23229    ///
23230    /// A zero (or unset) value has different meanings depending on machine type
23231    /// being used:
23232    ///
23233    /// . For pre-Gen3 machines, which support flexible numbers of local ssds,
23234    ///   zero (or unset) means to disable using local SSDs as ephemeral storage. The
23235    ///   limit for this value is dependent upon the maximum number of disk
23236    ///   available on a machine per zone. See:
23237    ///   <https://cloud.google.com/compute/docs/disks/local-ssd>
23238    ///   for more information.
23239    /// . For Gen3 machines which dictate a specific number of local ssds, zero
23240    ///   (or unset) means to use the default number of local ssds that goes with
23241    ///   that machine type. For example, for a c3-standard-8-lssd machine, 2 local
23242    ///   ssds would be provisioned. For c3-standard-8 (which doesn't support local
23243    ///   ssds), 0 will be provisioned. See
23244    ///   <https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds>
23245    ///   for more info.
23246    #[serde(skip_serializing_if = "wkt::internal::is_default")]
23247    pub local_ssd_count: i32,
23248
23249    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23250    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23251}
23252
23253impl EphemeralStorageLocalSsdConfig {
23254    pub fn new() -> Self {
23255        std::default::Default::default()
23256    }
23257
23258    /// Sets the value of [local_ssd_count][crate::model::EphemeralStorageLocalSsdConfig::local_ssd_count].
23259    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23260        self.local_ssd_count = v.into();
23261        self
23262    }
23263}
23264
23265impl wkt::message::Message for EphemeralStorageLocalSsdConfig {
23266    fn typename() -> &'static str {
23267        "type.googleapis.com/google.container.v1.EphemeralStorageLocalSsdConfig"
23268    }
23269}
23270
23271/// A map of resource manager tag keys and values to be attached to the nodes
23272/// for managing Compute Engine firewalls using Network Firewall Policies.
23273/// Tags must be according to specifications in
23274/// <https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications>.
23275/// A maximum of 5 tag key-value pairs can be specified.
23276/// Existing tags will be replaced with new values.
23277#[serde_with::serde_as]
23278#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23279#[serde(default, rename_all = "camelCase")]
23280#[non_exhaustive]
23281pub struct ResourceManagerTags {
23282    /// TagKeyValue must be in one of the following formats ([KEY]=[VALUE])
23283    ///
23284    /// . `tagKeys/{tag_key_id}=tagValues/{tag_value_id}`
23285    /// . `{org_id}/{tag_key_name}={tag_value_name}`
23286    /// . `{project_id}/{tag_key_name}={tag_value_name}`
23287    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
23288    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
23289
23290    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23291    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23292}
23293
23294impl ResourceManagerTags {
23295    pub fn new() -> Self {
23296        std::default::Default::default()
23297    }
23298
23299    /// Sets the value of [tags][crate::model::ResourceManagerTags::tags].
23300    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
23301    where
23302        T: std::iter::IntoIterator<Item = (K, V)>,
23303        K: std::convert::Into<std::string::String>,
23304        V: std::convert::Into<std::string::String>,
23305    {
23306        use std::iter::Iterator;
23307        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
23308        self
23309    }
23310}
23311
23312impl wkt::message::Message for ResourceManagerTags {
23313    fn typename() -> &'static str {
23314        "type.googleapis.com/google.container.v1.ResourceManagerTags"
23315    }
23316}
23317
23318/// EnterpriseConfig is the cluster enterprise configuration.
23319#[serde_with::serde_as]
23320#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23321#[serde(default, rename_all = "camelCase")]
23322#[non_exhaustive]
23323pub struct EnterpriseConfig {
23324    /// Output only. cluster_tier indicates the effective tier of the cluster.
23325    pub cluster_tier: crate::model::enterprise_config::ClusterTier,
23326
23327    /// desired_tier specifies the desired tier of the cluster.
23328    pub desired_tier: crate::model::enterprise_config::ClusterTier,
23329
23330    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23331    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23332}
23333
23334impl EnterpriseConfig {
23335    pub fn new() -> Self {
23336        std::default::Default::default()
23337    }
23338
23339    /// Sets the value of [cluster_tier][crate::model::EnterpriseConfig::cluster_tier].
23340    pub fn set_cluster_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
23341        mut self,
23342        v: T,
23343    ) -> Self {
23344        self.cluster_tier = v.into();
23345        self
23346    }
23347
23348    /// Sets the value of [desired_tier][crate::model::EnterpriseConfig::desired_tier].
23349    pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
23350        mut self,
23351        v: T,
23352    ) -> Self {
23353        self.desired_tier = v.into();
23354        self
23355    }
23356}
23357
23358impl wkt::message::Message for EnterpriseConfig {
23359    fn typename() -> &'static str {
23360        "type.googleapis.com/google.container.v1.EnterpriseConfig"
23361    }
23362}
23363
23364/// Defines additional types related to [EnterpriseConfig].
23365pub mod enterprise_config {
23366    #[allow(unused_imports)]
23367    use super::*;
23368
23369    /// Premium tiers for GKE Cluster.
23370    ///
23371    /// # Working with unknown values
23372    ///
23373    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23374    /// additional enum variants at any time. Adding new variants is not considered
23375    /// a breaking change. Applications should write their code in anticipation of:
23376    ///
23377    /// - New values appearing in future releases of the client library, **and**
23378    /// - New values received dynamically, without application changes.
23379    ///
23380    /// Please consult the [Working with enums] section in the user guide for some
23381    /// guidelines.
23382    ///
23383    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23384    #[derive(Clone, Debug, PartialEq)]
23385    #[non_exhaustive]
23386    pub enum ClusterTier {
23387        /// CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set.
23388        Unspecified,
23389        /// STANDARD indicates a standard GKE cluster.
23390        Standard,
23391        /// ENTERPRISE indicates a GKE Enterprise cluster.
23392        Enterprise,
23393        /// If set, the enum was initialized with an unknown value.
23394        ///
23395        /// Applications can examine the value using [ClusterTier::value] or
23396        /// [ClusterTier::name].
23397        UnknownValue(cluster_tier::UnknownValue),
23398    }
23399
23400    #[doc(hidden)]
23401    pub mod cluster_tier {
23402        #[allow(unused_imports)]
23403        use super::*;
23404        #[derive(Clone, Debug, PartialEq)]
23405        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23406    }
23407
23408    impl ClusterTier {
23409        /// Gets the enum value.
23410        ///
23411        /// Returns `None` if the enum contains an unknown value deserialized from
23412        /// the string representation of enums.
23413        pub fn value(&self) -> std::option::Option<i32> {
23414            match self {
23415                Self::Unspecified => std::option::Option::Some(0),
23416                Self::Standard => std::option::Option::Some(1),
23417                Self::Enterprise => std::option::Option::Some(2),
23418                Self::UnknownValue(u) => u.0.value(),
23419            }
23420        }
23421
23422        /// Gets the enum value as a string.
23423        ///
23424        /// Returns `None` if the enum contains an unknown value deserialized from
23425        /// the integer representation of enums.
23426        pub fn name(&self) -> std::option::Option<&str> {
23427            match self {
23428                Self::Unspecified => std::option::Option::Some("CLUSTER_TIER_UNSPECIFIED"),
23429                Self::Standard => std::option::Option::Some("STANDARD"),
23430                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
23431                Self::UnknownValue(u) => u.0.name(),
23432            }
23433        }
23434    }
23435
23436    impl std::default::Default for ClusterTier {
23437        fn default() -> Self {
23438            use std::convert::From;
23439            Self::from(0)
23440        }
23441    }
23442
23443    impl std::fmt::Display for ClusterTier {
23444        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23445            wkt::internal::display_enum(f, self.name(), self.value())
23446        }
23447    }
23448
23449    impl std::convert::From<i32> for ClusterTier {
23450        fn from(value: i32) -> Self {
23451            match value {
23452                0 => Self::Unspecified,
23453                1 => Self::Standard,
23454                2 => Self::Enterprise,
23455                _ => Self::UnknownValue(cluster_tier::UnknownValue(
23456                    wkt::internal::UnknownEnumValue::Integer(value),
23457                )),
23458            }
23459        }
23460    }
23461
23462    impl std::convert::From<&str> for ClusterTier {
23463        fn from(value: &str) -> Self {
23464            use std::string::ToString;
23465            match value {
23466                "CLUSTER_TIER_UNSPECIFIED" => Self::Unspecified,
23467                "STANDARD" => Self::Standard,
23468                "ENTERPRISE" => Self::Enterprise,
23469                _ => Self::UnknownValue(cluster_tier::UnknownValue(
23470                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23471                )),
23472            }
23473        }
23474    }
23475
23476    impl serde::ser::Serialize for ClusterTier {
23477        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23478        where
23479            S: serde::Serializer,
23480        {
23481            match self {
23482                Self::Unspecified => serializer.serialize_i32(0),
23483                Self::Standard => serializer.serialize_i32(1),
23484                Self::Enterprise => serializer.serialize_i32(2),
23485                Self::UnknownValue(u) => u.0.serialize(serializer),
23486            }
23487        }
23488    }
23489
23490    impl<'de> serde::de::Deserialize<'de> for ClusterTier {
23491        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23492        where
23493            D: serde::Deserializer<'de>,
23494        {
23495            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ClusterTier>::new(
23496                ".google.container.v1.EnterpriseConfig.ClusterTier",
23497            ))
23498        }
23499    }
23500}
23501
23502/// SecretManagerConfig is config for secret manager enablement.
23503#[serde_with::serde_as]
23504#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23505#[serde(default, rename_all = "camelCase")]
23506#[non_exhaustive]
23507pub struct SecretManagerConfig {
23508    /// Enable/Disable Secret Manager Config.
23509    #[serde(skip_serializing_if = "std::option::Option::is_none")]
23510    pub enabled: std::option::Option<bool>,
23511
23512    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23513    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23514}
23515
23516impl SecretManagerConfig {
23517    pub fn new() -> Self {
23518        std::default::Default::default()
23519    }
23520
23521    /// Sets the value of [enabled][crate::model::SecretManagerConfig::enabled].
23522    pub fn set_enabled<T: std::convert::Into<std::option::Option<bool>>>(mut self, v: T) -> Self {
23523        self.enabled = v.into();
23524        self
23525    }
23526}
23527
23528impl wkt::message::Message for SecretManagerConfig {
23529    fn typename() -> &'static str {
23530        "type.googleapis.com/google.container.v1.SecretManagerConfig"
23531    }
23532}
23533
23534/// SecondaryBootDisk represents a persistent disk attached to a node
23535/// with special configurations based on its mode.
23536#[serde_with::serde_as]
23537#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23538#[serde(default, rename_all = "camelCase")]
23539#[non_exhaustive]
23540pub struct SecondaryBootDisk {
23541    /// Disk mode (container image cache, etc.)
23542    pub mode: crate::model::secondary_boot_disk::Mode,
23543
23544    /// Fully-qualified resource ID for an existing disk image.
23545    #[serde(skip_serializing_if = "std::string::String::is_empty")]
23546    pub disk_image: std::string::String,
23547
23548    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23549    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23550}
23551
23552impl SecondaryBootDisk {
23553    pub fn new() -> Self {
23554        std::default::Default::default()
23555    }
23556
23557    /// Sets the value of [mode][crate::model::SecondaryBootDisk::mode].
23558    pub fn set_mode<T: std::convert::Into<crate::model::secondary_boot_disk::Mode>>(
23559        mut self,
23560        v: T,
23561    ) -> Self {
23562        self.mode = v.into();
23563        self
23564    }
23565
23566    /// Sets the value of [disk_image][crate::model::SecondaryBootDisk::disk_image].
23567    pub fn set_disk_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23568        self.disk_image = v.into();
23569        self
23570    }
23571}
23572
23573impl wkt::message::Message for SecondaryBootDisk {
23574    fn typename() -> &'static str {
23575        "type.googleapis.com/google.container.v1.SecondaryBootDisk"
23576    }
23577}
23578
23579/// Defines additional types related to [SecondaryBootDisk].
23580pub mod secondary_boot_disk {
23581    #[allow(unused_imports)]
23582    use super::*;
23583
23584    /// Mode specifies how the secondary boot disk will be used.
23585    /// This triggers mode-specified logic in the control plane.
23586    ///
23587    /// # Working with unknown values
23588    ///
23589    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23590    /// additional enum variants at any time. Adding new variants is not considered
23591    /// a breaking change. Applications should write their code in anticipation of:
23592    ///
23593    /// - New values appearing in future releases of the client library, **and**
23594    /// - New values received dynamically, without application changes.
23595    ///
23596    /// Please consult the [Working with enums] section in the user guide for some
23597    /// guidelines.
23598    ///
23599    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23600    #[derive(Clone, Debug, PartialEq)]
23601    #[non_exhaustive]
23602    pub enum Mode {
23603        /// MODE_UNSPECIFIED is when mode is not set.
23604        Unspecified,
23605        /// CONTAINER_IMAGE_CACHE is for using the secondary boot disk as
23606        /// a container image cache.
23607        ContainerImageCache,
23608        /// If set, the enum was initialized with an unknown value.
23609        ///
23610        /// Applications can examine the value using [Mode::value] or
23611        /// [Mode::name].
23612        UnknownValue(mode::UnknownValue),
23613    }
23614
23615    #[doc(hidden)]
23616    pub mod mode {
23617        #[allow(unused_imports)]
23618        use super::*;
23619        #[derive(Clone, Debug, PartialEq)]
23620        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23621    }
23622
23623    impl Mode {
23624        /// Gets the enum value.
23625        ///
23626        /// Returns `None` if the enum contains an unknown value deserialized from
23627        /// the string representation of enums.
23628        pub fn value(&self) -> std::option::Option<i32> {
23629            match self {
23630                Self::Unspecified => std::option::Option::Some(0),
23631                Self::ContainerImageCache => std::option::Option::Some(1),
23632                Self::UnknownValue(u) => u.0.value(),
23633            }
23634        }
23635
23636        /// Gets the enum value as a string.
23637        ///
23638        /// Returns `None` if the enum contains an unknown value deserialized from
23639        /// the integer representation of enums.
23640        pub fn name(&self) -> std::option::Option<&str> {
23641            match self {
23642                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
23643                Self::ContainerImageCache => std::option::Option::Some("CONTAINER_IMAGE_CACHE"),
23644                Self::UnknownValue(u) => u.0.name(),
23645            }
23646        }
23647    }
23648
23649    impl std::default::Default for Mode {
23650        fn default() -> Self {
23651            use std::convert::From;
23652            Self::from(0)
23653        }
23654    }
23655
23656    impl std::fmt::Display for Mode {
23657        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23658            wkt::internal::display_enum(f, self.name(), self.value())
23659        }
23660    }
23661
23662    impl std::convert::From<i32> for Mode {
23663        fn from(value: i32) -> Self {
23664            match value {
23665                0 => Self::Unspecified,
23666                1 => Self::ContainerImageCache,
23667                _ => Self::UnknownValue(mode::UnknownValue(
23668                    wkt::internal::UnknownEnumValue::Integer(value),
23669                )),
23670            }
23671        }
23672    }
23673
23674    impl std::convert::From<&str> for Mode {
23675        fn from(value: &str) -> Self {
23676            use std::string::ToString;
23677            match value {
23678                "MODE_UNSPECIFIED" => Self::Unspecified,
23679                "CONTAINER_IMAGE_CACHE" => Self::ContainerImageCache,
23680                _ => Self::UnknownValue(mode::UnknownValue(
23681                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23682                )),
23683            }
23684        }
23685    }
23686
23687    impl serde::ser::Serialize for Mode {
23688        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23689        where
23690            S: serde::Serializer,
23691        {
23692            match self {
23693                Self::Unspecified => serializer.serialize_i32(0),
23694                Self::ContainerImageCache => serializer.serialize_i32(1),
23695                Self::UnknownValue(u) => u.0.serialize(serializer),
23696            }
23697        }
23698    }
23699
23700    impl<'de> serde::de::Deserialize<'de> for Mode {
23701        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23702        where
23703            D: serde::Deserializer<'de>,
23704        {
23705            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
23706                ".google.container.v1.SecondaryBootDisk.Mode",
23707            ))
23708        }
23709    }
23710}
23711
23712/// SecondaryBootDiskUpdateStrategy is a placeholder which will be extended
23713/// in the future to define different options for updating secondary boot disks.
23714#[serde_with::serde_as]
23715#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23716#[serde(default, rename_all = "camelCase")]
23717#[non_exhaustive]
23718pub struct SecondaryBootDiskUpdateStrategy {
23719    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23720    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23721}
23722
23723impl SecondaryBootDiskUpdateStrategy {
23724    pub fn new() -> Self {
23725        std::default::Default::default()
23726    }
23727}
23728
23729impl wkt::message::Message for SecondaryBootDiskUpdateStrategy {
23730    fn typename() -> &'static str {
23731        "type.googleapis.com/google.container.v1.SecondaryBootDiskUpdateStrategy"
23732    }
23733}
23734
23735/// PrivateIPv6GoogleAccess controls whether and how the pods can communicate
23736/// with Google Services through gRPC over IPv6.
23737///
23738/// # Working with unknown values
23739///
23740/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23741/// additional enum variants at any time. Adding new variants is not considered
23742/// a breaking change. Applications should write their code in anticipation of:
23743///
23744/// - New values appearing in future releases of the client library, **and**
23745/// - New values received dynamically, without application changes.
23746///
23747/// Please consult the [Working with enums] section in the user guide for some
23748/// guidelines.
23749///
23750/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23751#[derive(Clone, Debug, PartialEq)]
23752#[non_exhaustive]
23753pub enum PrivateIPv6GoogleAccess {
23754    /// Default value. Same as DISABLED
23755    PrivateIpv6GoogleAccessUnspecified,
23756    /// No private access to or from Google Services
23757    PrivateIpv6GoogleAccessDisabled,
23758    /// Enables private IPv6 access to Google Services from GKE
23759    PrivateIpv6GoogleAccessToGoogle,
23760    /// Enables private IPv6 access to and from Google Services
23761    PrivateIpv6GoogleAccessBidirectional,
23762    /// If set, the enum was initialized with an unknown value.
23763    ///
23764    /// Applications can examine the value using [PrivateIPv6GoogleAccess::value] or
23765    /// [PrivateIPv6GoogleAccess::name].
23766    UnknownValue(private_i_pv_6_google_access::UnknownValue),
23767}
23768
23769#[doc(hidden)]
23770pub mod private_i_pv_6_google_access {
23771    #[allow(unused_imports)]
23772    use super::*;
23773    #[derive(Clone, Debug, PartialEq)]
23774    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23775}
23776
23777impl PrivateIPv6GoogleAccess {
23778    /// Gets the enum value.
23779    ///
23780    /// Returns `None` if the enum contains an unknown value deserialized from
23781    /// the string representation of enums.
23782    pub fn value(&self) -> std::option::Option<i32> {
23783        match self {
23784            Self::PrivateIpv6GoogleAccessUnspecified => std::option::Option::Some(0),
23785            Self::PrivateIpv6GoogleAccessDisabled => std::option::Option::Some(1),
23786            Self::PrivateIpv6GoogleAccessToGoogle => std::option::Option::Some(2),
23787            Self::PrivateIpv6GoogleAccessBidirectional => std::option::Option::Some(3),
23788            Self::UnknownValue(u) => u.0.value(),
23789        }
23790    }
23791
23792    /// Gets the enum value as a string.
23793    ///
23794    /// Returns `None` if the enum contains an unknown value deserialized from
23795    /// the integer representation of enums.
23796    pub fn name(&self) -> std::option::Option<&str> {
23797        match self {
23798            Self::PrivateIpv6GoogleAccessUnspecified => {
23799                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED")
23800            }
23801            Self::PrivateIpv6GoogleAccessDisabled => {
23802                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED")
23803            }
23804            Self::PrivateIpv6GoogleAccessToGoogle => {
23805                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE")
23806            }
23807            Self::PrivateIpv6GoogleAccessBidirectional => {
23808                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL")
23809            }
23810            Self::UnknownValue(u) => u.0.name(),
23811        }
23812    }
23813}
23814
23815impl std::default::Default for PrivateIPv6GoogleAccess {
23816    fn default() -> Self {
23817        use std::convert::From;
23818        Self::from(0)
23819    }
23820}
23821
23822impl std::fmt::Display for PrivateIPv6GoogleAccess {
23823    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23824        wkt::internal::display_enum(f, self.name(), self.value())
23825    }
23826}
23827
23828impl std::convert::From<i32> for PrivateIPv6GoogleAccess {
23829    fn from(value: i32) -> Self {
23830        match value {
23831            0 => Self::PrivateIpv6GoogleAccessUnspecified,
23832            1 => Self::PrivateIpv6GoogleAccessDisabled,
23833            2 => Self::PrivateIpv6GoogleAccessToGoogle,
23834            3 => Self::PrivateIpv6GoogleAccessBidirectional,
23835            _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
23836                wkt::internal::UnknownEnumValue::Integer(value),
23837            )),
23838        }
23839    }
23840}
23841
23842impl std::convert::From<&str> for PrivateIPv6GoogleAccess {
23843    fn from(value: &str) -> Self {
23844        use std::string::ToString;
23845        match value {
23846            "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" => Self::PrivateIpv6GoogleAccessUnspecified,
23847            "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" => Self::PrivateIpv6GoogleAccessDisabled,
23848            "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" => Self::PrivateIpv6GoogleAccessToGoogle,
23849            "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" => {
23850                Self::PrivateIpv6GoogleAccessBidirectional
23851            }
23852            _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
23853                wkt::internal::UnknownEnumValue::String(value.to_string()),
23854            )),
23855        }
23856    }
23857}
23858
23859impl serde::ser::Serialize for PrivateIPv6GoogleAccess {
23860    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23861    where
23862        S: serde::Serializer,
23863    {
23864        match self {
23865            Self::PrivateIpv6GoogleAccessUnspecified => serializer.serialize_i32(0),
23866            Self::PrivateIpv6GoogleAccessDisabled => serializer.serialize_i32(1),
23867            Self::PrivateIpv6GoogleAccessToGoogle => serializer.serialize_i32(2),
23868            Self::PrivateIpv6GoogleAccessBidirectional => serializer.serialize_i32(3),
23869            Self::UnknownValue(u) => u.0.serialize(serializer),
23870        }
23871    }
23872}
23873
23874impl<'de> serde::de::Deserialize<'de> for PrivateIPv6GoogleAccess {
23875    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23876    where
23877        D: serde::Deserializer<'de>,
23878    {
23879        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PrivateIPv6GoogleAccess>::new(
23880            ".google.container.v1.PrivateIPv6GoogleAccess",
23881        ))
23882    }
23883}
23884
23885/// UpgradeResourceType is the resource type that is upgrading. It is used
23886/// in upgrade notifications.
23887///
23888/// # Working with unknown values
23889///
23890/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23891/// additional enum variants at any time. Adding new variants is not considered
23892/// a breaking change. Applications should write their code in anticipation of:
23893///
23894/// - New values appearing in future releases of the client library, **and**
23895/// - New values received dynamically, without application changes.
23896///
23897/// Please consult the [Working with enums] section in the user guide for some
23898/// guidelines.
23899///
23900/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23901#[derive(Clone, Debug, PartialEq)]
23902#[non_exhaustive]
23903pub enum UpgradeResourceType {
23904    /// Default value. This shouldn't be used.
23905    Unspecified,
23906    /// Master / control plane
23907    Master,
23908    /// Node pool
23909    NodePool,
23910    /// If set, the enum was initialized with an unknown value.
23911    ///
23912    /// Applications can examine the value using [UpgradeResourceType::value] or
23913    /// [UpgradeResourceType::name].
23914    UnknownValue(upgrade_resource_type::UnknownValue),
23915}
23916
23917#[doc(hidden)]
23918pub mod upgrade_resource_type {
23919    #[allow(unused_imports)]
23920    use super::*;
23921    #[derive(Clone, Debug, PartialEq)]
23922    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23923}
23924
23925impl UpgradeResourceType {
23926    /// Gets the enum value.
23927    ///
23928    /// Returns `None` if the enum contains an unknown value deserialized from
23929    /// the string representation of enums.
23930    pub fn value(&self) -> std::option::Option<i32> {
23931        match self {
23932            Self::Unspecified => std::option::Option::Some(0),
23933            Self::Master => std::option::Option::Some(1),
23934            Self::NodePool => std::option::Option::Some(2),
23935            Self::UnknownValue(u) => u.0.value(),
23936        }
23937    }
23938
23939    /// Gets the enum value as a string.
23940    ///
23941    /// Returns `None` if the enum contains an unknown value deserialized from
23942    /// the integer representation of enums.
23943    pub fn name(&self) -> std::option::Option<&str> {
23944        match self {
23945            Self::Unspecified => std::option::Option::Some("UPGRADE_RESOURCE_TYPE_UNSPECIFIED"),
23946            Self::Master => std::option::Option::Some("MASTER"),
23947            Self::NodePool => std::option::Option::Some("NODE_POOL"),
23948            Self::UnknownValue(u) => u.0.name(),
23949        }
23950    }
23951}
23952
23953impl std::default::Default for UpgradeResourceType {
23954    fn default() -> Self {
23955        use std::convert::From;
23956        Self::from(0)
23957    }
23958}
23959
23960impl std::fmt::Display for UpgradeResourceType {
23961    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23962        wkt::internal::display_enum(f, self.name(), self.value())
23963    }
23964}
23965
23966impl std::convert::From<i32> for UpgradeResourceType {
23967    fn from(value: i32) -> Self {
23968        match value {
23969            0 => Self::Unspecified,
23970            1 => Self::Master,
23971            2 => Self::NodePool,
23972            _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
23973                wkt::internal::UnknownEnumValue::Integer(value),
23974            )),
23975        }
23976    }
23977}
23978
23979impl std::convert::From<&str> for UpgradeResourceType {
23980    fn from(value: &str) -> Self {
23981        use std::string::ToString;
23982        match value {
23983            "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
23984            "MASTER" => Self::Master,
23985            "NODE_POOL" => Self::NodePool,
23986            _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
23987                wkt::internal::UnknownEnumValue::String(value.to_string()),
23988            )),
23989        }
23990    }
23991}
23992
23993impl serde::ser::Serialize for UpgradeResourceType {
23994    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23995    where
23996        S: serde::Serializer,
23997    {
23998        match self {
23999            Self::Unspecified => serializer.serialize_i32(0),
24000            Self::Master => serializer.serialize_i32(1),
24001            Self::NodePool => serializer.serialize_i32(2),
24002            Self::UnknownValue(u) => u.0.serialize(serializer),
24003        }
24004    }
24005}
24006
24007impl<'de> serde::de::Deserialize<'de> for UpgradeResourceType {
24008    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24009    where
24010        D: serde::Deserializer<'de>,
24011    {
24012        deserializer.deserialize_any(wkt::internal::EnumVisitor::<UpgradeResourceType>::new(
24013            ".google.container.v1.UpgradeResourceType",
24014        ))
24015    }
24016}
24017
24018/// The datapath provider selects the implementation of the Kubernetes networking
24019/// model for service resolution and network policy enforcement.
24020///
24021/// # Working with unknown values
24022///
24023/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24024/// additional enum variants at any time. Adding new variants is not considered
24025/// a breaking change. Applications should write their code in anticipation of:
24026///
24027/// - New values appearing in future releases of the client library, **and**
24028/// - New values received dynamically, without application changes.
24029///
24030/// Please consult the [Working with enums] section in the user guide for some
24031/// guidelines.
24032///
24033/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24034#[derive(Clone, Debug, PartialEq)]
24035#[non_exhaustive]
24036pub enum DatapathProvider {
24037    /// Default value.
24038    Unspecified,
24039    /// Use the IPTables implementation based on kube-proxy.
24040    LegacyDatapath,
24041    /// Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE
24042    /// Dataplane V2
24043    /// documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2)
24044    /// for more.
24045    AdvancedDatapath,
24046    /// If set, the enum was initialized with an unknown value.
24047    ///
24048    /// Applications can examine the value using [DatapathProvider::value] or
24049    /// [DatapathProvider::name].
24050    UnknownValue(datapath_provider::UnknownValue),
24051}
24052
24053#[doc(hidden)]
24054pub mod datapath_provider {
24055    #[allow(unused_imports)]
24056    use super::*;
24057    #[derive(Clone, Debug, PartialEq)]
24058    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24059}
24060
24061impl DatapathProvider {
24062    /// Gets the enum value.
24063    ///
24064    /// Returns `None` if the enum contains an unknown value deserialized from
24065    /// the string representation of enums.
24066    pub fn value(&self) -> std::option::Option<i32> {
24067        match self {
24068            Self::Unspecified => std::option::Option::Some(0),
24069            Self::LegacyDatapath => std::option::Option::Some(1),
24070            Self::AdvancedDatapath => std::option::Option::Some(2),
24071            Self::UnknownValue(u) => u.0.value(),
24072        }
24073    }
24074
24075    /// Gets the enum value as a string.
24076    ///
24077    /// Returns `None` if the enum contains an unknown value deserialized from
24078    /// the integer representation of enums.
24079    pub fn name(&self) -> std::option::Option<&str> {
24080        match self {
24081            Self::Unspecified => std::option::Option::Some("DATAPATH_PROVIDER_UNSPECIFIED"),
24082            Self::LegacyDatapath => std::option::Option::Some("LEGACY_DATAPATH"),
24083            Self::AdvancedDatapath => std::option::Option::Some("ADVANCED_DATAPATH"),
24084            Self::UnknownValue(u) => u.0.name(),
24085        }
24086    }
24087}
24088
24089impl std::default::Default for DatapathProvider {
24090    fn default() -> Self {
24091        use std::convert::From;
24092        Self::from(0)
24093    }
24094}
24095
24096impl std::fmt::Display for DatapathProvider {
24097    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24098        wkt::internal::display_enum(f, self.name(), self.value())
24099    }
24100}
24101
24102impl std::convert::From<i32> for DatapathProvider {
24103    fn from(value: i32) -> Self {
24104        match value {
24105            0 => Self::Unspecified,
24106            1 => Self::LegacyDatapath,
24107            2 => Self::AdvancedDatapath,
24108            _ => Self::UnknownValue(datapath_provider::UnknownValue(
24109                wkt::internal::UnknownEnumValue::Integer(value),
24110            )),
24111        }
24112    }
24113}
24114
24115impl std::convert::From<&str> for DatapathProvider {
24116    fn from(value: &str) -> Self {
24117        use std::string::ToString;
24118        match value {
24119            "DATAPATH_PROVIDER_UNSPECIFIED" => Self::Unspecified,
24120            "LEGACY_DATAPATH" => Self::LegacyDatapath,
24121            "ADVANCED_DATAPATH" => Self::AdvancedDatapath,
24122            _ => Self::UnknownValue(datapath_provider::UnknownValue(
24123                wkt::internal::UnknownEnumValue::String(value.to_string()),
24124            )),
24125        }
24126    }
24127}
24128
24129impl serde::ser::Serialize for DatapathProvider {
24130    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24131    where
24132        S: serde::Serializer,
24133    {
24134        match self {
24135            Self::Unspecified => serializer.serialize_i32(0),
24136            Self::LegacyDatapath => serializer.serialize_i32(1),
24137            Self::AdvancedDatapath => serializer.serialize_i32(2),
24138            Self::UnknownValue(u) => u.0.serialize(serializer),
24139        }
24140    }
24141}
24142
24143impl<'de> serde::de::Deserialize<'de> for DatapathProvider {
24144    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24145    where
24146        D: serde::Deserializer<'de>,
24147    {
24148        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatapathProvider>::new(
24149            ".google.container.v1.DatapathProvider",
24150        ))
24151    }
24152}
24153
24154/// Strategy used for node pool update.
24155///
24156/// # Working with unknown values
24157///
24158/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24159/// additional enum variants at any time. Adding new variants is not considered
24160/// a breaking change. Applications should write their code in anticipation of:
24161///
24162/// - New values appearing in future releases of the client library, **and**
24163/// - New values received dynamically, without application changes.
24164///
24165/// Please consult the [Working with enums] section in the user guide for some
24166/// guidelines.
24167///
24168/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24169#[derive(Clone, Debug, PartialEq)]
24170#[non_exhaustive]
24171pub enum NodePoolUpdateStrategy {
24172    /// Default value if unset. GKE internally defaults the update strategy to
24173    /// SURGE for unspecified strategies.
24174    Unspecified,
24175    /// blue-green upgrade.
24176    BlueGreen,
24177    /// SURGE is the traditional way of upgrade a node pool.
24178    /// max_surge and max_unavailable determines the level of upgrade parallelism.
24179    Surge,
24180    /// If set, the enum was initialized with an unknown value.
24181    ///
24182    /// Applications can examine the value using [NodePoolUpdateStrategy::value] or
24183    /// [NodePoolUpdateStrategy::name].
24184    UnknownValue(node_pool_update_strategy::UnknownValue),
24185}
24186
24187#[doc(hidden)]
24188pub mod node_pool_update_strategy {
24189    #[allow(unused_imports)]
24190    use super::*;
24191    #[derive(Clone, Debug, PartialEq)]
24192    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24193}
24194
24195impl NodePoolUpdateStrategy {
24196    /// Gets the enum value.
24197    ///
24198    /// Returns `None` if the enum contains an unknown value deserialized from
24199    /// the string representation of enums.
24200    pub fn value(&self) -> std::option::Option<i32> {
24201        match self {
24202            Self::Unspecified => std::option::Option::Some(0),
24203            Self::BlueGreen => std::option::Option::Some(2),
24204            Self::Surge => std::option::Option::Some(3),
24205            Self::UnknownValue(u) => u.0.value(),
24206        }
24207    }
24208
24209    /// Gets the enum value as a string.
24210    ///
24211    /// Returns `None` if the enum contains an unknown value deserialized from
24212    /// the integer representation of enums.
24213    pub fn name(&self) -> std::option::Option<&str> {
24214        match self {
24215            Self::Unspecified => std::option::Option::Some("NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"),
24216            Self::BlueGreen => std::option::Option::Some("BLUE_GREEN"),
24217            Self::Surge => std::option::Option::Some("SURGE"),
24218            Self::UnknownValue(u) => u.0.name(),
24219        }
24220    }
24221}
24222
24223impl std::default::Default for NodePoolUpdateStrategy {
24224    fn default() -> Self {
24225        use std::convert::From;
24226        Self::from(0)
24227    }
24228}
24229
24230impl std::fmt::Display for NodePoolUpdateStrategy {
24231    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24232        wkt::internal::display_enum(f, self.name(), self.value())
24233    }
24234}
24235
24236impl std::convert::From<i32> for NodePoolUpdateStrategy {
24237    fn from(value: i32) -> Self {
24238        match value {
24239            0 => Self::Unspecified,
24240            2 => Self::BlueGreen,
24241            3 => Self::Surge,
24242            _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
24243                wkt::internal::UnknownEnumValue::Integer(value),
24244            )),
24245        }
24246    }
24247}
24248
24249impl std::convert::From<&str> for NodePoolUpdateStrategy {
24250    fn from(value: &str) -> Self {
24251        use std::string::ToString;
24252        match value {
24253            "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED" => Self::Unspecified,
24254            "BLUE_GREEN" => Self::BlueGreen,
24255            "SURGE" => Self::Surge,
24256            _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
24257                wkt::internal::UnknownEnumValue::String(value.to_string()),
24258            )),
24259        }
24260    }
24261}
24262
24263impl serde::ser::Serialize for NodePoolUpdateStrategy {
24264    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24265    where
24266        S: serde::Serializer,
24267    {
24268        match self {
24269            Self::Unspecified => serializer.serialize_i32(0),
24270            Self::BlueGreen => serializer.serialize_i32(2),
24271            Self::Surge => serializer.serialize_i32(3),
24272            Self::UnknownValue(u) => u.0.serialize(serializer),
24273        }
24274    }
24275}
24276
24277impl<'de> serde::de::Deserialize<'de> for NodePoolUpdateStrategy {
24278    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24279    where
24280        D: serde::Deserializer<'de>,
24281    {
24282        deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodePoolUpdateStrategy>::new(
24283            ".google.container.v1.NodePoolUpdateStrategy",
24284        ))
24285    }
24286}
24287
24288/// Possible values for IP stack type
24289///
24290/// # Working with unknown values
24291///
24292/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24293/// additional enum variants at any time. Adding new variants is not considered
24294/// a breaking change. Applications should write their code in anticipation of:
24295///
24296/// - New values appearing in future releases of the client library, **and**
24297/// - New values received dynamically, without application changes.
24298///
24299/// Please consult the [Working with enums] section in the user guide for some
24300/// guidelines.
24301///
24302/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24303#[derive(Clone, Debug, PartialEq)]
24304#[non_exhaustive]
24305pub enum StackType {
24306    /// Default value, will be defaulted as IPV4 only
24307    Unspecified,
24308    /// Cluster is IPV4 only
24309    Ipv4,
24310    /// Cluster can use both IPv4 and IPv6
24311    Ipv4Ipv6,
24312    /// If set, the enum was initialized with an unknown value.
24313    ///
24314    /// Applications can examine the value using [StackType::value] or
24315    /// [StackType::name].
24316    UnknownValue(stack_type::UnknownValue),
24317}
24318
24319#[doc(hidden)]
24320pub mod stack_type {
24321    #[allow(unused_imports)]
24322    use super::*;
24323    #[derive(Clone, Debug, PartialEq)]
24324    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24325}
24326
24327impl StackType {
24328    /// Gets the enum value.
24329    ///
24330    /// Returns `None` if the enum contains an unknown value deserialized from
24331    /// the string representation of enums.
24332    pub fn value(&self) -> std::option::Option<i32> {
24333        match self {
24334            Self::Unspecified => std::option::Option::Some(0),
24335            Self::Ipv4 => std::option::Option::Some(1),
24336            Self::Ipv4Ipv6 => std::option::Option::Some(2),
24337            Self::UnknownValue(u) => u.0.value(),
24338        }
24339    }
24340
24341    /// Gets the enum value as a string.
24342    ///
24343    /// Returns `None` if the enum contains an unknown value deserialized from
24344    /// the integer representation of enums.
24345    pub fn name(&self) -> std::option::Option<&str> {
24346        match self {
24347            Self::Unspecified => std::option::Option::Some("STACK_TYPE_UNSPECIFIED"),
24348            Self::Ipv4 => std::option::Option::Some("IPV4"),
24349            Self::Ipv4Ipv6 => std::option::Option::Some("IPV4_IPV6"),
24350            Self::UnknownValue(u) => u.0.name(),
24351        }
24352    }
24353}
24354
24355impl std::default::Default for StackType {
24356    fn default() -> Self {
24357        use std::convert::From;
24358        Self::from(0)
24359    }
24360}
24361
24362impl std::fmt::Display for StackType {
24363    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24364        wkt::internal::display_enum(f, self.name(), self.value())
24365    }
24366}
24367
24368impl std::convert::From<i32> for StackType {
24369    fn from(value: i32) -> Self {
24370        match value {
24371            0 => Self::Unspecified,
24372            1 => Self::Ipv4,
24373            2 => Self::Ipv4Ipv6,
24374            _ => Self::UnknownValue(stack_type::UnknownValue(
24375                wkt::internal::UnknownEnumValue::Integer(value),
24376            )),
24377        }
24378    }
24379}
24380
24381impl std::convert::From<&str> for StackType {
24382    fn from(value: &str) -> Self {
24383        use std::string::ToString;
24384        match value {
24385            "STACK_TYPE_UNSPECIFIED" => Self::Unspecified,
24386            "IPV4" => Self::Ipv4,
24387            "IPV4_IPV6" => Self::Ipv4Ipv6,
24388            _ => Self::UnknownValue(stack_type::UnknownValue(
24389                wkt::internal::UnknownEnumValue::String(value.to_string()),
24390            )),
24391        }
24392    }
24393}
24394
24395impl serde::ser::Serialize for StackType {
24396    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24397    where
24398        S: serde::Serializer,
24399    {
24400        match self {
24401            Self::Unspecified => serializer.serialize_i32(0),
24402            Self::Ipv4 => serializer.serialize_i32(1),
24403            Self::Ipv4Ipv6 => serializer.serialize_i32(2),
24404            Self::UnknownValue(u) => u.0.serialize(serializer),
24405        }
24406    }
24407}
24408
24409impl<'de> serde::de::Deserialize<'de> for StackType {
24410    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24411    where
24412        D: serde::Deserializer<'de>,
24413    {
24414        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StackType>::new(
24415            ".google.container.v1.StackType",
24416        ))
24417    }
24418}
24419
24420/// Possible values for IPv6 access type
24421///
24422/// # Working with unknown values
24423///
24424/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24425/// additional enum variants at any time. Adding new variants is not considered
24426/// a breaking change. Applications should write their code in anticipation of:
24427///
24428/// - New values appearing in future releases of the client library, **and**
24429/// - New values received dynamically, without application changes.
24430///
24431/// Please consult the [Working with enums] section in the user guide for some
24432/// guidelines.
24433///
24434/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24435#[derive(Clone, Debug, PartialEq)]
24436#[non_exhaustive]
24437pub enum IPv6AccessType {
24438    /// Default value, will be defaulted as type external.
24439    Ipv6AccessTypeUnspecified,
24440    /// Access type internal (all v6 addresses are internal IPs)
24441    Internal,
24442    /// Access type external (all v6 addresses are external IPs)
24443    External,
24444    /// If set, the enum was initialized with an unknown value.
24445    ///
24446    /// Applications can examine the value using [IPv6AccessType::value] or
24447    /// [IPv6AccessType::name].
24448    UnknownValue(i_pv_6_access_type::UnknownValue),
24449}
24450
24451#[doc(hidden)]
24452pub mod i_pv_6_access_type {
24453    #[allow(unused_imports)]
24454    use super::*;
24455    #[derive(Clone, Debug, PartialEq)]
24456    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24457}
24458
24459impl IPv6AccessType {
24460    /// Gets the enum value.
24461    ///
24462    /// Returns `None` if the enum contains an unknown value deserialized from
24463    /// the string representation of enums.
24464    pub fn value(&self) -> std::option::Option<i32> {
24465        match self {
24466            Self::Ipv6AccessTypeUnspecified => std::option::Option::Some(0),
24467            Self::Internal => std::option::Option::Some(1),
24468            Self::External => std::option::Option::Some(2),
24469            Self::UnknownValue(u) => u.0.value(),
24470        }
24471    }
24472
24473    /// Gets the enum value as a string.
24474    ///
24475    /// Returns `None` if the enum contains an unknown value deserialized from
24476    /// the integer representation of enums.
24477    pub fn name(&self) -> std::option::Option<&str> {
24478        match self {
24479            Self::Ipv6AccessTypeUnspecified => {
24480                std::option::Option::Some("IPV6_ACCESS_TYPE_UNSPECIFIED")
24481            }
24482            Self::Internal => std::option::Option::Some("INTERNAL"),
24483            Self::External => std::option::Option::Some("EXTERNAL"),
24484            Self::UnknownValue(u) => u.0.name(),
24485        }
24486    }
24487}
24488
24489impl std::default::Default for IPv6AccessType {
24490    fn default() -> Self {
24491        use std::convert::From;
24492        Self::from(0)
24493    }
24494}
24495
24496impl std::fmt::Display for IPv6AccessType {
24497    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24498        wkt::internal::display_enum(f, self.name(), self.value())
24499    }
24500}
24501
24502impl std::convert::From<i32> for IPv6AccessType {
24503    fn from(value: i32) -> Self {
24504        match value {
24505            0 => Self::Ipv6AccessTypeUnspecified,
24506            1 => Self::Internal,
24507            2 => Self::External,
24508            _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
24509                wkt::internal::UnknownEnumValue::Integer(value),
24510            )),
24511        }
24512    }
24513}
24514
24515impl std::convert::From<&str> for IPv6AccessType {
24516    fn from(value: &str) -> Self {
24517        use std::string::ToString;
24518        match value {
24519            "IPV6_ACCESS_TYPE_UNSPECIFIED" => Self::Ipv6AccessTypeUnspecified,
24520            "INTERNAL" => Self::Internal,
24521            "EXTERNAL" => Self::External,
24522            _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
24523                wkt::internal::UnknownEnumValue::String(value.to_string()),
24524            )),
24525        }
24526    }
24527}
24528
24529impl serde::ser::Serialize for IPv6AccessType {
24530    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24531    where
24532        S: serde::Serializer,
24533    {
24534        match self {
24535            Self::Ipv6AccessTypeUnspecified => serializer.serialize_i32(0),
24536            Self::Internal => serializer.serialize_i32(1),
24537            Self::External => serializer.serialize_i32(2),
24538            Self::UnknownValue(u) => u.0.serialize(serializer),
24539        }
24540    }
24541}
24542
24543impl<'de> serde::de::Deserialize<'de> for IPv6AccessType {
24544    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24545    where
24546        D: serde::Deserializer<'de>,
24547    {
24548        deserializer.deserialize_any(wkt::internal::EnumVisitor::<IPv6AccessType>::new(
24549            ".google.container.v1.IPv6AccessType",
24550        ))
24551    }
24552}
24553
24554/// Options for in-transit encryption.
24555///
24556/// # Working with unknown values
24557///
24558/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24559/// additional enum variants at any time. Adding new variants is not considered
24560/// a breaking change. Applications should write their code in anticipation of:
24561///
24562/// - New values appearing in future releases of the client library, **and**
24563/// - New values received dynamically, without application changes.
24564///
24565/// Please consult the [Working with enums] section in the user guide for some
24566/// guidelines.
24567///
24568/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24569#[derive(Clone, Debug, PartialEq)]
24570#[non_exhaustive]
24571pub enum InTransitEncryptionConfig {
24572    /// Unspecified, will be inferred as default -
24573    /// IN_TRANSIT_ENCRYPTION_UNSPECIFIED.
24574    Unspecified,
24575    /// In-transit encryption is disabled.
24576    InTransitEncryptionDisabled,
24577    /// Data in-transit is encrypted using inter-node transparent encryption.
24578    InTransitEncryptionInterNodeTransparent,
24579    /// If set, the enum was initialized with an unknown value.
24580    ///
24581    /// Applications can examine the value using [InTransitEncryptionConfig::value] or
24582    /// [InTransitEncryptionConfig::name].
24583    UnknownValue(in_transit_encryption_config::UnknownValue),
24584}
24585
24586#[doc(hidden)]
24587pub mod in_transit_encryption_config {
24588    #[allow(unused_imports)]
24589    use super::*;
24590    #[derive(Clone, Debug, PartialEq)]
24591    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24592}
24593
24594impl InTransitEncryptionConfig {
24595    /// Gets the enum value.
24596    ///
24597    /// Returns `None` if the enum contains an unknown value deserialized from
24598    /// the string representation of enums.
24599    pub fn value(&self) -> std::option::Option<i32> {
24600        match self {
24601            Self::Unspecified => std::option::Option::Some(0),
24602            Self::InTransitEncryptionDisabled => std::option::Option::Some(1),
24603            Self::InTransitEncryptionInterNodeTransparent => std::option::Option::Some(2),
24604            Self::UnknownValue(u) => u.0.value(),
24605        }
24606    }
24607
24608    /// Gets the enum value as a string.
24609    ///
24610    /// Returns `None` if the enum contains an unknown value deserialized from
24611    /// the integer representation of enums.
24612    pub fn name(&self) -> std::option::Option<&str> {
24613        match self {
24614            Self::Unspecified => {
24615                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED")
24616            }
24617            Self::InTransitEncryptionDisabled => {
24618                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_DISABLED")
24619            }
24620            Self::InTransitEncryptionInterNodeTransparent => {
24621                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT")
24622            }
24623            Self::UnknownValue(u) => u.0.name(),
24624        }
24625    }
24626}
24627
24628impl std::default::Default for InTransitEncryptionConfig {
24629    fn default() -> Self {
24630        use std::convert::From;
24631        Self::from(0)
24632    }
24633}
24634
24635impl std::fmt::Display for InTransitEncryptionConfig {
24636    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24637        wkt::internal::display_enum(f, self.name(), self.value())
24638    }
24639}
24640
24641impl std::convert::From<i32> for InTransitEncryptionConfig {
24642    fn from(value: i32) -> Self {
24643        match value {
24644            0 => Self::Unspecified,
24645            1 => Self::InTransitEncryptionDisabled,
24646            2 => Self::InTransitEncryptionInterNodeTransparent,
24647            _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
24648                wkt::internal::UnknownEnumValue::Integer(value),
24649            )),
24650        }
24651    }
24652}
24653
24654impl std::convert::From<&str> for InTransitEncryptionConfig {
24655    fn from(value: &str) -> Self {
24656        use std::string::ToString;
24657        match value {
24658            "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" => Self::Unspecified,
24659            "IN_TRANSIT_ENCRYPTION_DISABLED" => Self::InTransitEncryptionDisabled,
24660            "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" => {
24661                Self::InTransitEncryptionInterNodeTransparent
24662            }
24663            _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
24664                wkt::internal::UnknownEnumValue::String(value.to_string()),
24665            )),
24666        }
24667    }
24668}
24669
24670impl serde::ser::Serialize for InTransitEncryptionConfig {
24671    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24672    where
24673        S: serde::Serializer,
24674    {
24675        match self {
24676            Self::Unspecified => serializer.serialize_i32(0),
24677            Self::InTransitEncryptionDisabled => serializer.serialize_i32(1),
24678            Self::InTransitEncryptionInterNodeTransparent => serializer.serialize_i32(2),
24679            Self::UnknownValue(u) => u.0.serialize(serializer),
24680        }
24681    }
24682}
24683
24684impl<'de> serde::de::Deserialize<'de> for InTransitEncryptionConfig {
24685    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24686    where
24687        D: serde::Deserializer<'de>,
24688    {
24689        deserializer.deserialize_any(
24690            wkt::internal::EnumVisitor::<InTransitEncryptionConfig>::new(
24691                ".google.container.v1.InTransitEncryptionConfig",
24692            ),
24693        )
24694    }
24695}