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
34mod debug;
35mod deserialize;
36mod serialize;
37
38/// Parameters that can be configured on Linux nodes.
39#[derive(Clone, Default, PartialEq)]
40#[non_exhaustive]
41pub struct LinuxNodeConfig {
42    /// The Linux kernel parameters to be applied to the nodes and all pods running
43    /// on the nodes.
44    ///
45    /// The following parameters are supported.
46    ///
47    /// net.core.busy_poll
48    /// net.core.busy_read
49    /// net.core.netdev_max_backlog
50    /// net.core.rmem_max
51    /// net.core.rmem_default
52    /// net.core.wmem_default
53    /// net.core.wmem_max
54    /// net.core.optmem_max
55    /// net.core.somaxconn
56    /// net.ipv4.tcp_rmem
57    /// net.ipv4.tcp_wmem
58    /// net.ipv4.tcp_tw_reuse
59    /// net.ipv4.tcp_max_orphans
60    /// net.netfilter.nf_conntrack_max
61    /// net.netfilter.nf_conntrack_buckets
62    /// net.netfilter.nf_conntrack_tcp_timeout_close_wait
63    /// net.netfilter.nf_conntrack_tcp_timeout_time_wait
64    /// net.netfilter.nf_conntrack_tcp_timeout_established
65    /// net.netfilter.nf_conntrack_acct
66    /// kernel.shmmni
67    /// kernel.shmmax
68    /// kernel.shmall
69    /// fs.aio-max-nr
70    /// fs.file-max
71    /// fs.inotify.max_user_instances
72    /// fs.inotify.max_user_watches
73    /// fs.nr_open
74    /// vm.dirty_background_ratio
75    /// vm.dirty_expire_centisecs
76    /// vm.dirty_ratio
77    /// vm.dirty_writeback_centisecs
78    /// vm.max_map_count
79    /// vm.overcommit_memory
80    /// vm.overcommit_ratio
81    /// vm.vfs_cache_pressure
82    /// vm.swappiness
83    /// vm.watermark_scale_factor
84    /// vm.min_free_kbytes
85    pub sysctls: std::collections::HashMap<std::string::String, std::string::String>,
86
87    /// cgroup_mode specifies the cgroup mode to be used on the node.
88    pub cgroup_mode: crate::model::linux_node_config::CgroupMode,
89
90    /// Optional. Amounts for 2M and 1G hugepages
91    pub hugepages: std::option::Option<crate::model::linux_node_config::HugepagesConfig>,
92
93    /// Optional. Transparent hugepage support for anonymous memory can be entirely
94    /// disabled (mostly for debugging purposes) or only enabled inside
95    /// MADV_HUGEPAGE regions (to avoid the risk of consuming more memory
96    /// resources) or enabled system wide.
97    ///
98    /// See <https://docs.kernel.org/admin-guide/mm/transhuge.html>
99    /// for more details.
100    pub transparent_hugepage_enabled: crate::model::linux_node_config::TransparentHugepageEnabled,
101
102    /// Optional. Defines the transparent hugepage defrag configuration on the
103    /// node. VM hugepage allocation can be managed by either limiting
104    /// defragmentation for delayed allocation or skipping it entirely for
105    /// immediate allocation only.
106    ///
107    /// See <https://docs.kernel.org/admin-guide/mm/transhuge.html>
108    /// for more details.
109    pub transparent_hugepage_defrag: crate::model::linux_node_config::TransparentHugepageDefrag,
110
111    /// Optional. Configuration for kernel module loading on nodes.
112    /// When enabled, the node pool will be provisioned with a Container-Optimized
113    /// OS image that enforces kernel module signature verification.
114    pub node_kernel_module_loading:
115        std::option::Option<crate::model::linux_node_config::NodeKernelModuleLoading>,
116
117    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
118}
119
120impl LinuxNodeConfig {
121    pub fn new() -> Self {
122        std::default::Default::default()
123    }
124
125    /// Sets the value of [sysctls][crate::model::LinuxNodeConfig::sysctls].
126    pub fn set_sysctls<T, K, V>(mut self, v: T) -> Self
127    where
128        T: std::iter::IntoIterator<Item = (K, V)>,
129        K: std::convert::Into<std::string::String>,
130        V: std::convert::Into<std::string::String>,
131    {
132        use std::iter::Iterator;
133        self.sysctls = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
134        self
135    }
136
137    /// Sets the value of [cgroup_mode][crate::model::LinuxNodeConfig::cgroup_mode].
138    pub fn set_cgroup_mode<T: std::convert::Into<crate::model::linux_node_config::CgroupMode>>(
139        mut self,
140        v: T,
141    ) -> Self {
142        self.cgroup_mode = v.into();
143        self
144    }
145
146    /// Sets the value of [hugepages][crate::model::LinuxNodeConfig::hugepages].
147    pub fn set_hugepages<T>(mut self, v: T) -> Self
148    where
149        T: std::convert::Into<crate::model::linux_node_config::HugepagesConfig>,
150    {
151        self.hugepages = std::option::Option::Some(v.into());
152        self
153    }
154
155    /// Sets or clears the value of [hugepages][crate::model::LinuxNodeConfig::hugepages].
156    pub fn set_or_clear_hugepages<T>(mut self, v: std::option::Option<T>) -> Self
157    where
158        T: std::convert::Into<crate::model::linux_node_config::HugepagesConfig>,
159    {
160        self.hugepages = v.map(|x| x.into());
161        self
162    }
163
164    /// Sets the value of [transparent_hugepage_enabled][crate::model::LinuxNodeConfig::transparent_hugepage_enabled].
165    pub fn set_transparent_hugepage_enabled<
166        T: std::convert::Into<crate::model::linux_node_config::TransparentHugepageEnabled>,
167    >(
168        mut self,
169        v: T,
170    ) -> Self {
171        self.transparent_hugepage_enabled = v.into();
172        self
173    }
174
175    /// Sets the value of [transparent_hugepage_defrag][crate::model::LinuxNodeConfig::transparent_hugepage_defrag].
176    pub fn set_transparent_hugepage_defrag<
177        T: std::convert::Into<crate::model::linux_node_config::TransparentHugepageDefrag>,
178    >(
179        mut self,
180        v: T,
181    ) -> Self {
182        self.transparent_hugepage_defrag = v.into();
183        self
184    }
185
186    /// Sets the value of [node_kernel_module_loading][crate::model::LinuxNodeConfig::node_kernel_module_loading].
187    pub fn set_node_kernel_module_loading<T>(mut self, v: T) -> Self
188    where
189        T: std::convert::Into<crate::model::linux_node_config::NodeKernelModuleLoading>,
190    {
191        self.node_kernel_module_loading = std::option::Option::Some(v.into());
192        self
193    }
194
195    /// Sets or clears the value of [node_kernel_module_loading][crate::model::LinuxNodeConfig::node_kernel_module_loading].
196    pub fn set_or_clear_node_kernel_module_loading<T>(mut self, v: std::option::Option<T>) -> Self
197    where
198        T: std::convert::Into<crate::model::linux_node_config::NodeKernelModuleLoading>,
199    {
200        self.node_kernel_module_loading = v.map(|x| x.into());
201        self
202    }
203}
204
205impl wkt::message::Message for LinuxNodeConfig {
206    fn typename() -> &'static str {
207        "type.googleapis.com/google.container.v1.LinuxNodeConfig"
208    }
209}
210
211/// Defines additional types related to [LinuxNodeConfig].
212pub mod linux_node_config {
213    #[allow(unused_imports)]
214    use super::*;
215
216    /// Hugepages amount in both 2m and 1g size
217    #[derive(Clone, Default, PartialEq)]
218    #[non_exhaustive]
219    pub struct HugepagesConfig {
220        /// Optional. Amount of 2M hugepages
221        pub hugepage_size2m: std::option::Option<i32>,
222
223        /// Optional. Amount of 1G hugepages
224        pub hugepage_size1g: std::option::Option<i32>,
225
226        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
227    }
228
229    impl HugepagesConfig {
230        pub fn new() -> Self {
231            std::default::Default::default()
232        }
233
234        /// Sets the value of [hugepage_size2m][crate::model::linux_node_config::HugepagesConfig::hugepage_size2m].
235        pub fn set_hugepage_size2m<T>(mut self, v: T) -> Self
236        where
237            T: std::convert::Into<i32>,
238        {
239            self.hugepage_size2m = std::option::Option::Some(v.into());
240            self
241        }
242
243        /// Sets or clears the value of [hugepage_size2m][crate::model::linux_node_config::HugepagesConfig::hugepage_size2m].
244        pub fn set_or_clear_hugepage_size2m<T>(mut self, v: std::option::Option<T>) -> Self
245        where
246            T: std::convert::Into<i32>,
247        {
248            self.hugepage_size2m = v.map(|x| x.into());
249            self
250        }
251
252        /// Sets the value of [hugepage_size1g][crate::model::linux_node_config::HugepagesConfig::hugepage_size1g].
253        pub fn set_hugepage_size1g<T>(mut self, v: T) -> Self
254        where
255            T: std::convert::Into<i32>,
256        {
257            self.hugepage_size1g = std::option::Option::Some(v.into());
258            self
259        }
260
261        /// Sets or clears the value of [hugepage_size1g][crate::model::linux_node_config::HugepagesConfig::hugepage_size1g].
262        pub fn set_or_clear_hugepage_size1g<T>(mut self, v: std::option::Option<T>) -> Self
263        where
264            T: std::convert::Into<i32>,
265        {
266            self.hugepage_size1g = v.map(|x| x.into());
267            self
268        }
269    }
270
271    impl wkt::message::Message for HugepagesConfig {
272        fn typename() -> &'static str {
273            "type.googleapis.com/google.container.v1.LinuxNodeConfig.HugepagesConfig"
274        }
275    }
276
277    /// Configuration for kernel module loading on nodes.
278    #[derive(Clone, Default, PartialEq)]
279    #[non_exhaustive]
280    pub struct NodeKernelModuleLoading {
281        /// Set the node module loading policy for nodes in the node pool.
282        pub policy: crate::model::linux_node_config::node_kernel_module_loading::Policy,
283
284        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
285    }
286
287    impl NodeKernelModuleLoading {
288        pub fn new() -> Self {
289            std::default::Default::default()
290        }
291
292        /// Sets the value of [policy][crate::model::linux_node_config::NodeKernelModuleLoading::policy].
293        pub fn set_policy<
294            T: std::convert::Into<crate::model::linux_node_config::node_kernel_module_loading::Policy>,
295        >(
296            mut self,
297            v: T,
298        ) -> Self {
299            self.policy = v.into();
300            self
301        }
302    }
303
304    impl wkt::message::Message for NodeKernelModuleLoading {
305        fn typename() -> &'static str {
306            "type.googleapis.com/google.container.v1.LinuxNodeConfig.NodeKernelModuleLoading"
307        }
308    }
309
310    /// Defines additional types related to [NodeKernelModuleLoading].
311    pub mod node_kernel_module_loading {
312        #[allow(unused_imports)]
313        use super::*;
314
315        /// Defines the kernel module loading policy for nodes in the nodepool.
316        ///
317        /// # Working with unknown values
318        ///
319        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
320        /// additional enum variants at any time. Adding new variants is not considered
321        /// a breaking change. Applications should write their code in anticipation of:
322        ///
323        /// - New values appearing in future releases of the client library, **and**
324        /// - New values received dynamically, without application changes.
325        ///
326        /// Please consult the [Working with enums] section in the user guide for some
327        /// guidelines.
328        ///
329        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
330        #[derive(Clone, Debug, PartialEq)]
331        #[non_exhaustive]
332        pub enum Policy {
333            /// Default behavior. GKE selects the image based on node type.
334            /// For CPU and TPU nodes, the image will not allow loading external
335            /// kernel modules.
336            /// For GPU nodes, the image will allow loading any module, whether it
337            /// is signed or not.
338            Unspecified,
339            /// Enforced signature verification: Node pools will use a
340            /// Container-Optimized OS image configured to allow loading of
341            /// *Google-signed* external kernel modules.
342            /// Loadpin is enabled but configured to exclude modules, and kernel
343            /// module signature checking is enforced.
344            EnforceSignedModules,
345            /// Mirrors existing DEFAULT behavior:
346            /// For CPU and TPU nodes, the image will not allow loading external
347            /// kernel modules.
348            /// For GPU nodes, the image will allow loading any module, whether it
349            /// is signed or not.
350            DoNotEnforceSignedModules,
351            /// If set, the enum was initialized with an unknown value.
352            ///
353            /// Applications can examine the value using [Policy::value] or
354            /// [Policy::name].
355            UnknownValue(policy::UnknownValue),
356        }
357
358        #[doc(hidden)]
359        pub mod policy {
360            #[allow(unused_imports)]
361            use super::*;
362            #[derive(Clone, Debug, PartialEq)]
363            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
364        }
365
366        impl Policy {
367            /// Gets the enum value.
368            ///
369            /// Returns `None` if the enum contains an unknown value deserialized from
370            /// the string representation of enums.
371            pub fn value(&self) -> std::option::Option<i32> {
372                match self {
373                    Self::Unspecified => std::option::Option::Some(0),
374                    Self::EnforceSignedModules => std::option::Option::Some(1),
375                    Self::DoNotEnforceSignedModules => std::option::Option::Some(2),
376                    Self::UnknownValue(u) => u.0.value(),
377                }
378            }
379
380            /// Gets the enum value as a string.
381            ///
382            /// Returns `None` if the enum contains an unknown value deserialized from
383            /// the integer representation of enums.
384            pub fn name(&self) -> std::option::Option<&str> {
385                match self {
386                    Self::Unspecified => std::option::Option::Some("POLICY_UNSPECIFIED"),
387                    Self::EnforceSignedModules => {
388                        std::option::Option::Some("ENFORCE_SIGNED_MODULES")
389                    }
390                    Self::DoNotEnforceSignedModules => {
391                        std::option::Option::Some("DO_NOT_ENFORCE_SIGNED_MODULES")
392                    }
393                    Self::UnknownValue(u) => u.0.name(),
394                }
395            }
396        }
397
398        impl std::default::Default for Policy {
399            fn default() -> Self {
400                use std::convert::From;
401                Self::from(0)
402            }
403        }
404
405        impl std::fmt::Display for Policy {
406            fn fmt(
407                &self,
408                f: &mut std::fmt::Formatter<'_>,
409            ) -> std::result::Result<(), std::fmt::Error> {
410                wkt::internal::display_enum(f, self.name(), self.value())
411            }
412        }
413
414        impl std::convert::From<i32> for Policy {
415            fn from(value: i32) -> Self {
416                match value {
417                    0 => Self::Unspecified,
418                    1 => Self::EnforceSignedModules,
419                    2 => Self::DoNotEnforceSignedModules,
420                    _ => Self::UnknownValue(policy::UnknownValue(
421                        wkt::internal::UnknownEnumValue::Integer(value),
422                    )),
423                }
424            }
425        }
426
427        impl std::convert::From<&str> for Policy {
428            fn from(value: &str) -> Self {
429                use std::string::ToString;
430                match value {
431                    "POLICY_UNSPECIFIED" => Self::Unspecified,
432                    "ENFORCE_SIGNED_MODULES" => Self::EnforceSignedModules,
433                    "DO_NOT_ENFORCE_SIGNED_MODULES" => Self::DoNotEnforceSignedModules,
434                    _ => Self::UnknownValue(policy::UnknownValue(
435                        wkt::internal::UnknownEnumValue::String(value.to_string()),
436                    )),
437                }
438            }
439        }
440
441        impl serde::ser::Serialize for Policy {
442            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
443            where
444                S: serde::Serializer,
445            {
446                match self {
447                    Self::Unspecified => serializer.serialize_i32(0),
448                    Self::EnforceSignedModules => serializer.serialize_i32(1),
449                    Self::DoNotEnforceSignedModules => serializer.serialize_i32(2),
450                    Self::UnknownValue(u) => u.0.serialize(serializer),
451                }
452            }
453        }
454
455        impl<'de> serde::de::Deserialize<'de> for Policy {
456            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
457            where
458                D: serde::Deserializer<'de>,
459            {
460                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Policy>::new(
461                    ".google.container.v1.LinuxNodeConfig.NodeKernelModuleLoading.Policy",
462                ))
463            }
464        }
465    }
466
467    /// Possible cgroup modes that can be used.
468    ///
469    /// # Working with unknown values
470    ///
471    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
472    /// additional enum variants at any time. Adding new variants is not considered
473    /// a breaking change. Applications should write their code in anticipation of:
474    ///
475    /// - New values appearing in future releases of the client library, **and**
476    /// - New values received dynamically, without application changes.
477    ///
478    /// Please consult the [Working with enums] section in the user guide for some
479    /// guidelines.
480    ///
481    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
482    #[derive(Clone, Debug, PartialEq)]
483    #[non_exhaustive]
484    pub enum CgroupMode {
485        /// CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used.
486        /// The default for the GKE node OS image will be used.
487        Unspecified,
488        /// CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on
489        /// the node image.
490        V1,
491        /// CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on
492        /// the node image.
493        V2,
494        /// If set, the enum was initialized with an unknown value.
495        ///
496        /// Applications can examine the value using [CgroupMode::value] or
497        /// [CgroupMode::name].
498        UnknownValue(cgroup_mode::UnknownValue),
499    }
500
501    #[doc(hidden)]
502    pub mod cgroup_mode {
503        #[allow(unused_imports)]
504        use super::*;
505        #[derive(Clone, Debug, PartialEq)]
506        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
507    }
508
509    impl CgroupMode {
510        /// Gets the enum value.
511        ///
512        /// Returns `None` if the enum contains an unknown value deserialized from
513        /// the string representation of enums.
514        pub fn value(&self) -> std::option::Option<i32> {
515            match self {
516                Self::Unspecified => std::option::Option::Some(0),
517                Self::V1 => std::option::Option::Some(1),
518                Self::V2 => std::option::Option::Some(2),
519                Self::UnknownValue(u) => u.0.value(),
520            }
521        }
522
523        /// Gets the enum value as a string.
524        ///
525        /// Returns `None` if the enum contains an unknown value deserialized from
526        /// the integer representation of enums.
527        pub fn name(&self) -> std::option::Option<&str> {
528            match self {
529                Self::Unspecified => std::option::Option::Some("CGROUP_MODE_UNSPECIFIED"),
530                Self::V1 => std::option::Option::Some("CGROUP_MODE_V1"),
531                Self::V2 => std::option::Option::Some("CGROUP_MODE_V2"),
532                Self::UnknownValue(u) => u.0.name(),
533            }
534        }
535    }
536
537    impl std::default::Default for CgroupMode {
538        fn default() -> Self {
539            use std::convert::From;
540            Self::from(0)
541        }
542    }
543
544    impl std::fmt::Display for CgroupMode {
545        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
546            wkt::internal::display_enum(f, self.name(), self.value())
547        }
548    }
549
550    impl std::convert::From<i32> for CgroupMode {
551        fn from(value: i32) -> Self {
552            match value {
553                0 => Self::Unspecified,
554                1 => Self::V1,
555                2 => Self::V2,
556                _ => Self::UnknownValue(cgroup_mode::UnknownValue(
557                    wkt::internal::UnknownEnumValue::Integer(value),
558                )),
559            }
560        }
561    }
562
563    impl std::convert::From<&str> for CgroupMode {
564        fn from(value: &str) -> Self {
565            use std::string::ToString;
566            match value {
567                "CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
568                "CGROUP_MODE_V1" => Self::V1,
569                "CGROUP_MODE_V2" => Self::V2,
570                _ => Self::UnknownValue(cgroup_mode::UnknownValue(
571                    wkt::internal::UnknownEnumValue::String(value.to_string()),
572                )),
573            }
574        }
575    }
576
577    impl serde::ser::Serialize for CgroupMode {
578        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
579        where
580            S: serde::Serializer,
581        {
582            match self {
583                Self::Unspecified => serializer.serialize_i32(0),
584                Self::V1 => serializer.serialize_i32(1),
585                Self::V2 => serializer.serialize_i32(2),
586                Self::UnknownValue(u) => u.0.serialize(serializer),
587            }
588        }
589    }
590
591    impl<'de> serde::de::Deserialize<'de> for CgroupMode {
592        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
593        where
594            D: serde::Deserializer<'de>,
595        {
596            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CgroupMode>::new(
597                ".google.container.v1.LinuxNodeConfig.CgroupMode",
598            ))
599        }
600    }
601
602    /// Possible values for transparent hugepage enabled support.
603    ///
604    /// # Working with unknown values
605    ///
606    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
607    /// additional enum variants at any time. Adding new variants is not considered
608    /// a breaking change. Applications should write their code in anticipation of:
609    ///
610    /// - New values appearing in future releases of the client library, **and**
611    /// - New values received dynamically, without application changes.
612    ///
613    /// Please consult the [Working with enums] section in the user guide for some
614    /// guidelines.
615    ///
616    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
617    #[derive(Clone, Debug, PartialEq)]
618    #[non_exhaustive]
619    pub enum TransparentHugepageEnabled {
620        /// Default value. GKE will not modify the kernel configuration.
621        Unspecified,
622        /// Transparent hugepage support for anonymous memory is enabled system wide.
623        Always,
624        /// Transparent hugepage support for anonymous memory is enabled inside
625        /// MADV_HUGEPAGE regions. This is the default kernel configuration.
626        Madvise,
627        /// Transparent hugepage support for anonymous memory is disabled.
628        Never,
629        /// If set, the enum was initialized with an unknown value.
630        ///
631        /// Applications can examine the value using [TransparentHugepageEnabled::value] or
632        /// [TransparentHugepageEnabled::name].
633        UnknownValue(transparent_hugepage_enabled::UnknownValue),
634    }
635
636    #[doc(hidden)]
637    pub mod transparent_hugepage_enabled {
638        #[allow(unused_imports)]
639        use super::*;
640        #[derive(Clone, Debug, PartialEq)]
641        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
642    }
643
644    impl TransparentHugepageEnabled {
645        /// Gets the enum value.
646        ///
647        /// Returns `None` if the enum contains an unknown value deserialized from
648        /// the string representation of enums.
649        pub fn value(&self) -> std::option::Option<i32> {
650            match self {
651                Self::Unspecified => std::option::Option::Some(0),
652                Self::Always => std::option::Option::Some(1),
653                Self::Madvise => std::option::Option::Some(2),
654                Self::Never => std::option::Option::Some(3),
655                Self::UnknownValue(u) => u.0.value(),
656            }
657        }
658
659        /// Gets the enum value as a string.
660        ///
661        /// Returns `None` if the enum contains an unknown value deserialized from
662        /// the integer representation of enums.
663        pub fn name(&self) -> std::option::Option<&str> {
664            match self {
665                Self::Unspecified => {
666                    std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED")
667                }
668                Self::Always => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS"),
669                Self::Madvise => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_MADVISE"),
670                Self::Never => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_NEVER"),
671                Self::UnknownValue(u) => u.0.name(),
672            }
673        }
674    }
675
676    impl std::default::Default for TransparentHugepageEnabled {
677        fn default() -> Self {
678            use std::convert::From;
679            Self::from(0)
680        }
681    }
682
683    impl std::fmt::Display for TransparentHugepageEnabled {
684        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
685            wkt::internal::display_enum(f, self.name(), self.value())
686        }
687    }
688
689    impl std::convert::From<i32> for TransparentHugepageEnabled {
690        fn from(value: i32) -> Self {
691            match value {
692                0 => Self::Unspecified,
693                1 => Self::Always,
694                2 => Self::Madvise,
695                3 => Self::Never,
696                _ => Self::UnknownValue(transparent_hugepage_enabled::UnknownValue(
697                    wkt::internal::UnknownEnumValue::Integer(value),
698                )),
699            }
700        }
701    }
702
703    impl std::convert::From<&str> for TransparentHugepageEnabled {
704        fn from(value: &str) -> Self {
705            use std::string::ToString;
706            match value {
707                "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED" => Self::Unspecified,
708                "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS" => Self::Always,
709                "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE" => Self::Madvise,
710                "TRANSPARENT_HUGEPAGE_ENABLED_NEVER" => Self::Never,
711                _ => Self::UnknownValue(transparent_hugepage_enabled::UnknownValue(
712                    wkt::internal::UnknownEnumValue::String(value.to_string()),
713                )),
714            }
715        }
716    }
717
718    impl serde::ser::Serialize for TransparentHugepageEnabled {
719        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
720        where
721            S: serde::Serializer,
722        {
723            match self {
724                Self::Unspecified => serializer.serialize_i32(0),
725                Self::Always => serializer.serialize_i32(1),
726                Self::Madvise => serializer.serialize_i32(2),
727                Self::Never => serializer.serialize_i32(3),
728                Self::UnknownValue(u) => u.0.serialize(serializer),
729            }
730        }
731    }
732
733    impl<'de> serde::de::Deserialize<'de> for TransparentHugepageEnabled {
734        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
735        where
736            D: serde::Deserializer<'de>,
737        {
738            deserializer.deserialize_any(
739                wkt::internal::EnumVisitor::<TransparentHugepageEnabled>::new(
740                    ".google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled",
741                ),
742            )
743        }
744    }
745
746    /// Possible values for transparent hugepage defrag support.
747    ///
748    /// # Working with unknown values
749    ///
750    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
751    /// additional enum variants at any time. Adding new variants is not considered
752    /// a breaking change. Applications should write their code in anticipation of:
753    ///
754    /// - New values appearing in future releases of the client library, **and**
755    /// - New values received dynamically, without application changes.
756    ///
757    /// Please consult the [Working with enums] section in the user guide for some
758    /// guidelines.
759    ///
760    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
761    #[derive(Clone, Debug, PartialEq)]
762    #[non_exhaustive]
763    pub enum TransparentHugepageDefrag {
764        /// Default value. GKE will not modify the kernel configuration.
765        Unspecified,
766        /// It means that an application requesting THP will stall on allocation
767        /// failure and directly reclaim pages and compact memory in an effort to
768        /// allocate a THP immediately.
769        Always,
770        /// It means that an application will wake kswapd in the background to
771        /// reclaim pages and wake kcompactd to compact memory so that THP is
772        /// available in the near future. It's the responsibility of khugepaged to
773        /// then install the THP pages later.
774        Defer,
775        /// It means that an application will enter direct reclaim and compaction
776        /// like always, but only for regions that have used madvise(MADV_HUGEPAGE);
777        /// all other regions will wake kswapd in the background to reclaim pages and
778        /// wake kcompactd to compact memory so that THP is available in the near
779        /// future.
780        DeferWithMadvise,
781        /// It means that an application will enter direct reclaim like always but
782        /// only for regions that are have used madvise(MADV_HUGEPAGE). This is the
783        /// default kernel configuration.
784        Madvise,
785        /// It means that an application will never enter direct reclaim or
786        /// compaction.
787        Never,
788        /// If set, the enum was initialized with an unknown value.
789        ///
790        /// Applications can examine the value using [TransparentHugepageDefrag::value] or
791        /// [TransparentHugepageDefrag::name].
792        UnknownValue(transparent_hugepage_defrag::UnknownValue),
793    }
794
795    #[doc(hidden)]
796    pub mod transparent_hugepage_defrag {
797        #[allow(unused_imports)]
798        use super::*;
799        #[derive(Clone, Debug, PartialEq)]
800        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
801    }
802
803    impl TransparentHugepageDefrag {
804        /// Gets the enum value.
805        ///
806        /// Returns `None` if the enum contains an unknown value deserialized from
807        /// the string representation of enums.
808        pub fn value(&self) -> std::option::Option<i32> {
809            match self {
810                Self::Unspecified => std::option::Option::Some(0),
811                Self::Always => std::option::Option::Some(1),
812                Self::Defer => std::option::Option::Some(2),
813                Self::DeferWithMadvise => std::option::Option::Some(3),
814                Self::Madvise => std::option::Option::Some(4),
815                Self::Never => std::option::Option::Some(5),
816                Self::UnknownValue(u) => u.0.value(),
817            }
818        }
819
820        /// Gets the enum value as a string.
821        ///
822        /// Returns `None` if the enum contains an unknown value deserialized from
823        /// the integer representation of enums.
824        pub fn name(&self) -> std::option::Option<&str> {
825            match self {
826                Self::Unspecified => {
827                    std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED")
828                }
829                Self::Always => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS"),
830                Self::Defer => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_DEFER"),
831                Self::DeferWithMadvise => {
832                    std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE")
833                }
834                Self::Madvise => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE"),
835                Self::Never => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_NEVER"),
836                Self::UnknownValue(u) => u.0.name(),
837            }
838        }
839    }
840
841    impl std::default::Default for TransparentHugepageDefrag {
842        fn default() -> Self {
843            use std::convert::From;
844            Self::from(0)
845        }
846    }
847
848    impl std::fmt::Display for TransparentHugepageDefrag {
849        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
850            wkt::internal::display_enum(f, self.name(), self.value())
851        }
852    }
853
854    impl std::convert::From<i32> for TransparentHugepageDefrag {
855        fn from(value: i32) -> Self {
856            match value {
857                0 => Self::Unspecified,
858                1 => Self::Always,
859                2 => Self::Defer,
860                3 => Self::DeferWithMadvise,
861                4 => Self::Madvise,
862                5 => Self::Never,
863                _ => Self::UnknownValue(transparent_hugepage_defrag::UnknownValue(
864                    wkt::internal::UnknownEnumValue::Integer(value),
865                )),
866            }
867        }
868    }
869
870    impl std::convert::From<&str> for TransparentHugepageDefrag {
871        fn from(value: &str) -> Self {
872            use std::string::ToString;
873            match value {
874                "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED" => Self::Unspecified,
875                "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS" => Self::Always,
876                "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER" => Self::Defer,
877                "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE" => Self::DeferWithMadvise,
878                "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE" => Self::Madvise,
879                "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER" => Self::Never,
880                _ => Self::UnknownValue(transparent_hugepage_defrag::UnknownValue(
881                    wkt::internal::UnknownEnumValue::String(value.to_string()),
882                )),
883            }
884        }
885    }
886
887    impl serde::ser::Serialize for TransparentHugepageDefrag {
888        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
889        where
890            S: serde::Serializer,
891        {
892            match self {
893                Self::Unspecified => serializer.serialize_i32(0),
894                Self::Always => serializer.serialize_i32(1),
895                Self::Defer => serializer.serialize_i32(2),
896                Self::DeferWithMadvise => serializer.serialize_i32(3),
897                Self::Madvise => serializer.serialize_i32(4),
898                Self::Never => serializer.serialize_i32(5),
899                Self::UnknownValue(u) => u.0.serialize(serializer),
900            }
901        }
902    }
903
904    impl<'de> serde::de::Deserialize<'de> for TransparentHugepageDefrag {
905        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
906        where
907            D: serde::Deserializer<'de>,
908        {
909            deserializer.deserialize_any(
910                wkt::internal::EnumVisitor::<TransparentHugepageDefrag>::new(
911                    ".google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag",
912                ),
913            )
914        }
915    }
916}
917
918/// Parameters that can be configured on Windows nodes.
919/// Windows Node Config that define the parameters that will be used to
920/// configure the Windows node pool settings.
921#[derive(Clone, Default, PartialEq)]
922#[non_exhaustive]
923pub struct WindowsNodeConfig {
924    /// OSVersion specifies the Windows node config to be used on the node.
925    pub os_version: crate::model::windows_node_config::OSVersion,
926
927    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
928}
929
930impl WindowsNodeConfig {
931    pub fn new() -> Self {
932        std::default::Default::default()
933    }
934
935    /// Sets the value of [os_version][crate::model::WindowsNodeConfig::os_version].
936    pub fn set_os_version<T: std::convert::Into<crate::model::windows_node_config::OSVersion>>(
937        mut self,
938        v: T,
939    ) -> Self {
940        self.os_version = v.into();
941        self
942    }
943}
944
945impl wkt::message::Message for WindowsNodeConfig {
946    fn typename() -> &'static str {
947        "type.googleapis.com/google.container.v1.WindowsNodeConfig"
948    }
949}
950
951/// Defines additional types related to [WindowsNodeConfig].
952pub mod windows_node_config {
953    #[allow(unused_imports)]
954    use super::*;
955
956    /// Possible OS version that can be used.
957    ///
958    /// # Working with unknown values
959    ///
960    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
961    /// additional enum variants at any time. Adding new variants is not considered
962    /// a breaking change. Applications should write their code in anticipation of:
963    ///
964    /// - New values appearing in future releases of the client library, **and**
965    /// - New values received dynamically, without application changes.
966    ///
967    /// Please consult the [Working with enums] section in the user guide for some
968    /// guidelines.
969    ///
970    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
971    #[derive(Clone, Debug, PartialEq)]
972    #[non_exhaustive]
973    pub enum OSVersion {
974        /// When OSVersion is not specified.
975        Unspecified,
976        /// LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image.
977        Ltsc2019,
978        /// LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image.
979        Ltsc2022,
980        /// If set, the enum was initialized with an unknown value.
981        ///
982        /// Applications can examine the value using [OSVersion::value] or
983        /// [OSVersion::name].
984        UnknownValue(os_version::UnknownValue),
985    }
986
987    #[doc(hidden)]
988    pub mod os_version {
989        #[allow(unused_imports)]
990        use super::*;
991        #[derive(Clone, Debug, PartialEq)]
992        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
993    }
994
995    impl OSVersion {
996        /// Gets the enum value.
997        ///
998        /// Returns `None` if the enum contains an unknown value deserialized from
999        /// the string representation of enums.
1000        pub fn value(&self) -> std::option::Option<i32> {
1001            match self {
1002                Self::Unspecified => std::option::Option::Some(0),
1003                Self::Ltsc2019 => std::option::Option::Some(1),
1004                Self::Ltsc2022 => std::option::Option::Some(2),
1005                Self::UnknownValue(u) => u.0.value(),
1006            }
1007        }
1008
1009        /// Gets the enum value as a string.
1010        ///
1011        /// Returns `None` if the enum contains an unknown value deserialized from
1012        /// the integer representation of enums.
1013        pub fn name(&self) -> std::option::Option<&str> {
1014            match self {
1015                Self::Unspecified => std::option::Option::Some("OS_VERSION_UNSPECIFIED"),
1016                Self::Ltsc2019 => std::option::Option::Some("OS_VERSION_LTSC2019"),
1017                Self::Ltsc2022 => std::option::Option::Some("OS_VERSION_LTSC2022"),
1018                Self::UnknownValue(u) => u.0.name(),
1019            }
1020        }
1021    }
1022
1023    impl std::default::Default for OSVersion {
1024        fn default() -> Self {
1025            use std::convert::From;
1026            Self::from(0)
1027        }
1028    }
1029
1030    impl std::fmt::Display for OSVersion {
1031        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1032            wkt::internal::display_enum(f, self.name(), self.value())
1033        }
1034    }
1035
1036    impl std::convert::From<i32> for OSVersion {
1037        fn from(value: i32) -> Self {
1038            match value {
1039                0 => Self::Unspecified,
1040                1 => Self::Ltsc2019,
1041                2 => Self::Ltsc2022,
1042                _ => Self::UnknownValue(os_version::UnknownValue(
1043                    wkt::internal::UnknownEnumValue::Integer(value),
1044                )),
1045            }
1046        }
1047    }
1048
1049    impl std::convert::From<&str> for OSVersion {
1050        fn from(value: &str) -> Self {
1051            use std::string::ToString;
1052            match value {
1053                "OS_VERSION_UNSPECIFIED" => Self::Unspecified,
1054                "OS_VERSION_LTSC2019" => Self::Ltsc2019,
1055                "OS_VERSION_LTSC2022" => Self::Ltsc2022,
1056                _ => Self::UnknownValue(os_version::UnknownValue(
1057                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1058                )),
1059            }
1060        }
1061    }
1062
1063    impl serde::ser::Serialize for OSVersion {
1064        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1065        where
1066            S: serde::Serializer,
1067        {
1068            match self {
1069                Self::Unspecified => serializer.serialize_i32(0),
1070                Self::Ltsc2019 => serializer.serialize_i32(1),
1071                Self::Ltsc2022 => serializer.serialize_i32(2),
1072                Self::UnknownValue(u) => u.0.serialize(serializer),
1073            }
1074        }
1075    }
1076
1077    impl<'de> serde::de::Deserialize<'de> for OSVersion {
1078        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1079        where
1080            D: serde::Deserializer<'de>,
1081        {
1082            deserializer.deserialize_any(wkt::internal::EnumVisitor::<OSVersion>::new(
1083                ".google.container.v1.WindowsNodeConfig.OSVersion",
1084            ))
1085        }
1086    }
1087}
1088
1089/// Node kubelet configs.
1090#[derive(Clone, Default, PartialEq)]
1091#[non_exhaustive]
1092pub struct NodeKubeletConfig {
1093    /// Control the CPU management policy on the node.
1094    /// See
1095    /// <https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/>
1096    ///
1097    /// The following values are allowed.
1098    ///
1099    /// * "none": the default, which represents the existing scheduling behavior.
1100    /// * "static": allows pods with certain resource characteristics to be granted
1101    ///   increased CPU affinity and exclusivity on the node.
1102    ///   The default value is 'none' if unspecified.
1103    pub cpu_manager_policy: std::string::String,
1104
1105    /// Optional. Controls Topology Manager configuration on the node.
1106    /// For more information, see:
1107    /// <https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/>
1108    pub topology_manager: std::option::Option<crate::model::TopologyManager>,
1109
1110    /// Optional. Controls NUMA-aware Memory Manager configuration on the
1111    /// node. For more information, see:
1112    /// <https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/>
1113    pub memory_manager: std::option::Option<crate::model::MemoryManager>,
1114
1115    /// Enable CPU CFS quota enforcement for containers that specify CPU limits.
1116    ///
1117    /// This option is enabled by default which makes kubelet use CFS quota
1118    /// (<https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt>) to
1119    /// enforce container CPU limits. Otherwise, CPU limits will not be enforced at
1120    /// all.
1121    ///
1122    /// Disable this option to mitigate CPU throttling problems while still having
1123    /// your pods to be in Guaranteed QoS class by specifying the CPU limits.
1124    ///
1125    /// The default value is 'true' if unspecified.
1126    pub cpu_cfs_quota: std::option::Option<wkt::BoolValue>,
1127
1128    /// Set the CPU CFS quota period value 'cpu.cfs_period_us'.
1129    ///
1130    /// The string must be a sequence of decimal numbers, each with optional
1131    /// fraction and a unit suffix, such as "300ms".
1132    /// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
1133    /// The value must be a positive duration between 1ms and 1 second, inclusive.
1134    pub cpu_cfs_quota_period: std::string::String,
1135
1136    /// Set the Pod PID limits. See
1137    /// <https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits>
1138    ///
1139    /// Controls the maximum number of processes allowed to run in a pod. The value
1140    /// must be greater than or equal to 1024 and less than 4194304.
1141    pub pod_pids_limit: i64,
1142
1143    /// Enable or disable Kubelet read only port.
1144    pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
1145
1146    /// Optional. Defines the percent of disk usage before which image garbage
1147    /// collection is never run. Lowest disk usage to garbage collect to. The
1148    /// percent is calculated as this field value out of 100.
1149    ///
1150    /// The value must be between 10 and 85, inclusive and smaller than
1151    /// image_gc_high_threshold_percent.
1152    ///
1153    /// The default value is 80 if unspecified.
1154    pub image_gc_low_threshold_percent: i32,
1155
1156    /// Optional. Defines the percent of disk usage after which image garbage
1157    /// collection is always run. The percent is calculated as this field value out
1158    /// of 100.
1159    ///
1160    /// The value must be between 10 and 85, inclusive and greater than
1161    /// image_gc_low_threshold_percent.
1162    ///
1163    /// The default value is 85 if unspecified.
1164    pub image_gc_high_threshold_percent: i32,
1165
1166    /// Optional. Defines the minimum age for an unused image before it is garbage
1167    /// collected.
1168    ///
1169    /// The string must be a sequence of decimal numbers, each with optional
1170    /// fraction and a unit suffix, such as "300s", "1.5h", and "2h45m". Valid time
1171    /// units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
1172    ///
1173    /// The value must be a positive duration less than or equal to 2 minutes.
1174    ///
1175    /// The default value is "2m0s" if unspecified.
1176    pub image_minimum_gc_age: std::string::String,
1177
1178    /// Optional. Defines the maximum age an image can be unused before it is
1179    /// garbage collected. The string must be a sequence of decimal numbers, each
1180    /// with optional fraction and a unit suffix, such as "300s", "1.5h", and
1181    /// "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
1182    ///
1183    /// The value must be a positive duration greater than image_minimum_gc_age
1184    /// or "0s".
1185    ///
1186    /// The default value is "0s" if unspecified, which disables this field,
1187    /// meaning images won't be garbage collected based on being unused for too
1188    /// long.
1189    pub image_maximum_gc_age: std::string::String,
1190
1191    /// Optional. Defines the maximum size of the container log file before it is
1192    /// rotated. See
1193    /// <https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation>
1194    ///
1195    /// Valid format is positive number + unit, e.g. 100Ki, 10Mi. Valid units are
1196    /// Ki, Mi, Gi.
1197    /// The value must be between 10Mi and 500Mi, inclusive.
1198    ///
1199    /// Note that the total container log size (container_log_max_size *
1200    /// container_log_max_files) cannot exceed 1% of the total
1201    /// storage of the node, to avoid disk pressure caused by log files.
1202    ///
1203    /// The default value is 10Mi if unspecified.
1204    pub container_log_max_size: std::string::String,
1205
1206    /// Optional. Defines the maximum number of container log files that can be
1207    /// present for a container. See
1208    /// <https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation>
1209    ///
1210    /// The value must be an integer between 2 and 10, inclusive.
1211    /// The default value is 5 if unspecified.
1212    pub container_log_max_files: i32,
1213
1214    /// Optional. Defines a comma-separated allowlist of unsafe sysctls or sysctl
1215    /// patterns (ending in `*`).
1216    ///
1217    /// The unsafe namespaced sysctl groups are `kernel.shm*`, `kernel.msg*`,
1218    /// `kernel.sem`, `fs.mqueue.*`, and `net.*`. Leaving this allowlist empty
1219    /// means they cannot be set on Pods.
1220    ///
1221    /// To allow certain sysctls or sysctl patterns to be set on Pods, list them
1222    /// separated by commas.
1223    /// For example: `kernel.msg*,net.ipv4.route.min_pmtu`.
1224    ///
1225    /// See <https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/>
1226    /// for more details.
1227    pub allowed_unsafe_sysctls: std::vec::Vec<std::string::String>,
1228
1229    /// Optional. eviction_soft is a map of signal names to quantities that defines
1230    /// soft eviction thresholds. Each signal is compared to its corresponding
1231    /// threshold to determine if a pod eviction should occur.
1232    pub eviction_soft: std::option::Option<crate::model::EvictionSignals>,
1233
1234    /// Optional. eviction_soft_grace_period is a map of signal names to quantities
1235    /// that defines grace periods for each soft eviction signal. The grace period
1236    /// is the amount of time that a pod must be under pressure before an eviction
1237    /// occurs.
1238    pub eviction_soft_grace_period: std::option::Option<crate::model::EvictionGracePeriod>,
1239
1240    /// Optional. eviction_minimum_reclaim is a map of signal names to quantities
1241    /// that defines minimum reclaims, which describe the minimum amount of a given
1242    /// resource the kubelet will reclaim when performing a pod eviction while that
1243    /// resource is under pressure.
1244    pub eviction_minimum_reclaim: std::option::Option<crate::model::EvictionMinimumReclaim>,
1245
1246    /// Optional. eviction_max_pod_grace_period_seconds is the maximum allowed
1247    /// grace period (in seconds) to use when terminating pods in response to a
1248    /// soft eviction threshold being met. This value effectively caps the Pod's
1249    /// terminationGracePeriodSeconds value during soft evictions. Default: 0.
1250    /// Range: [0, 300].
1251    pub eviction_max_pod_grace_period_seconds: i32,
1252
1253    /// Optional. Defines the maximum number of image pulls in parallel.
1254    /// The range is 2 to 5, inclusive.
1255    /// The default value is 2 or 3 depending on the disk type.
1256    ///
1257    /// See
1258    /// <https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls>
1259    /// for more details.
1260    pub max_parallel_image_pulls: i32,
1261
1262    /// Optional. Defines whether to enable single process OOM killer.
1263    /// If true, will prevent the memory.oom.group flag from being set for
1264    /// container cgroups in cgroups v2. This causes processes in the container to
1265    /// be OOM killed individually instead of as a group.
1266    pub single_process_oom_kill: std::option::Option<bool>,
1267
1268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1269}
1270
1271impl NodeKubeletConfig {
1272    pub fn new() -> Self {
1273        std::default::Default::default()
1274    }
1275
1276    /// Sets the value of [cpu_manager_policy][crate::model::NodeKubeletConfig::cpu_manager_policy].
1277    pub fn set_cpu_manager_policy<T: std::convert::Into<std::string::String>>(
1278        mut self,
1279        v: T,
1280    ) -> Self {
1281        self.cpu_manager_policy = v.into();
1282        self
1283    }
1284
1285    /// Sets the value of [topology_manager][crate::model::NodeKubeletConfig::topology_manager].
1286    pub fn set_topology_manager<T>(mut self, v: T) -> Self
1287    where
1288        T: std::convert::Into<crate::model::TopologyManager>,
1289    {
1290        self.topology_manager = std::option::Option::Some(v.into());
1291        self
1292    }
1293
1294    /// Sets or clears the value of [topology_manager][crate::model::NodeKubeletConfig::topology_manager].
1295    pub fn set_or_clear_topology_manager<T>(mut self, v: std::option::Option<T>) -> Self
1296    where
1297        T: std::convert::Into<crate::model::TopologyManager>,
1298    {
1299        self.topology_manager = v.map(|x| x.into());
1300        self
1301    }
1302
1303    /// Sets the value of [memory_manager][crate::model::NodeKubeletConfig::memory_manager].
1304    pub fn set_memory_manager<T>(mut self, v: T) -> Self
1305    where
1306        T: std::convert::Into<crate::model::MemoryManager>,
1307    {
1308        self.memory_manager = std::option::Option::Some(v.into());
1309        self
1310    }
1311
1312    /// Sets or clears the value of [memory_manager][crate::model::NodeKubeletConfig::memory_manager].
1313    pub fn set_or_clear_memory_manager<T>(mut self, v: std::option::Option<T>) -> Self
1314    where
1315        T: std::convert::Into<crate::model::MemoryManager>,
1316    {
1317        self.memory_manager = v.map(|x| x.into());
1318        self
1319    }
1320
1321    /// Sets the value of [cpu_cfs_quota][crate::model::NodeKubeletConfig::cpu_cfs_quota].
1322    pub fn set_cpu_cfs_quota<T>(mut self, v: T) -> Self
1323    where
1324        T: std::convert::Into<wkt::BoolValue>,
1325    {
1326        self.cpu_cfs_quota = std::option::Option::Some(v.into());
1327        self
1328    }
1329
1330    /// Sets or clears the value of [cpu_cfs_quota][crate::model::NodeKubeletConfig::cpu_cfs_quota].
1331    pub fn set_or_clear_cpu_cfs_quota<T>(mut self, v: std::option::Option<T>) -> Self
1332    where
1333        T: std::convert::Into<wkt::BoolValue>,
1334    {
1335        self.cpu_cfs_quota = v.map(|x| x.into());
1336        self
1337    }
1338
1339    /// Sets the value of [cpu_cfs_quota_period][crate::model::NodeKubeletConfig::cpu_cfs_quota_period].
1340    pub fn set_cpu_cfs_quota_period<T: std::convert::Into<std::string::String>>(
1341        mut self,
1342        v: T,
1343    ) -> Self {
1344        self.cpu_cfs_quota_period = v.into();
1345        self
1346    }
1347
1348    /// Sets the value of [pod_pids_limit][crate::model::NodeKubeletConfig::pod_pids_limit].
1349    pub fn set_pod_pids_limit<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1350        self.pod_pids_limit = v.into();
1351        self
1352    }
1353
1354    /// Sets the value of [insecure_kubelet_readonly_port_enabled][crate::model::NodeKubeletConfig::insecure_kubelet_readonly_port_enabled].
1355    pub fn set_insecure_kubelet_readonly_port_enabled<T>(mut self, v: T) -> Self
1356    where
1357        T: std::convert::Into<bool>,
1358    {
1359        self.insecure_kubelet_readonly_port_enabled = std::option::Option::Some(v.into());
1360        self
1361    }
1362
1363    /// Sets or clears the value of [insecure_kubelet_readonly_port_enabled][crate::model::NodeKubeletConfig::insecure_kubelet_readonly_port_enabled].
1364    pub fn set_or_clear_insecure_kubelet_readonly_port_enabled<T>(
1365        mut self,
1366        v: std::option::Option<T>,
1367    ) -> Self
1368    where
1369        T: std::convert::Into<bool>,
1370    {
1371        self.insecure_kubelet_readonly_port_enabled = v.map(|x| x.into());
1372        self
1373    }
1374
1375    /// Sets the value of [image_gc_low_threshold_percent][crate::model::NodeKubeletConfig::image_gc_low_threshold_percent].
1376    pub fn set_image_gc_low_threshold_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1377        self.image_gc_low_threshold_percent = v.into();
1378        self
1379    }
1380
1381    /// Sets the value of [image_gc_high_threshold_percent][crate::model::NodeKubeletConfig::image_gc_high_threshold_percent].
1382    pub fn set_image_gc_high_threshold_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1383        self.image_gc_high_threshold_percent = v.into();
1384        self
1385    }
1386
1387    /// Sets the value of [image_minimum_gc_age][crate::model::NodeKubeletConfig::image_minimum_gc_age].
1388    pub fn set_image_minimum_gc_age<T: std::convert::Into<std::string::String>>(
1389        mut self,
1390        v: T,
1391    ) -> Self {
1392        self.image_minimum_gc_age = v.into();
1393        self
1394    }
1395
1396    /// Sets the value of [image_maximum_gc_age][crate::model::NodeKubeletConfig::image_maximum_gc_age].
1397    pub fn set_image_maximum_gc_age<T: std::convert::Into<std::string::String>>(
1398        mut self,
1399        v: T,
1400    ) -> Self {
1401        self.image_maximum_gc_age = v.into();
1402        self
1403    }
1404
1405    /// Sets the value of [container_log_max_size][crate::model::NodeKubeletConfig::container_log_max_size].
1406    pub fn set_container_log_max_size<T: std::convert::Into<std::string::String>>(
1407        mut self,
1408        v: T,
1409    ) -> Self {
1410        self.container_log_max_size = v.into();
1411        self
1412    }
1413
1414    /// Sets the value of [container_log_max_files][crate::model::NodeKubeletConfig::container_log_max_files].
1415    pub fn set_container_log_max_files<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1416        self.container_log_max_files = v.into();
1417        self
1418    }
1419
1420    /// Sets the value of [allowed_unsafe_sysctls][crate::model::NodeKubeletConfig::allowed_unsafe_sysctls].
1421    pub fn set_allowed_unsafe_sysctls<T, V>(mut self, v: T) -> Self
1422    where
1423        T: std::iter::IntoIterator<Item = V>,
1424        V: std::convert::Into<std::string::String>,
1425    {
1426        use std::iter::Iterator;
1427        self.allowed_unsafe_sysctls = v.into_iter().map(|i| i.into()).collect();
1428        self
1429    }
1430
1431    /// Sets the value of [eviction_soft][crate::model::NodeKubeletConfig::eviction_soft].
1432    pub fn set_eviction_soft<T>(mut self, v: T) -> Self
1433    where
1434        T: std::convert::Into<crate::model::EvictionSignals>,
1435    {
1436        self.eviction_soft = std::option::Option::Some(v.into());
1437        self
1438    }
1439
1440    /// Sets or clears the value of [eviction_soft][crate::model::NodeKubeletConfig::eviction_soft].
1441    pub fn set_or_clear_eviction_soft<T>(mut self, v: std::option::Option<T>) -> Self
1442    where
1443        T: std::convert::Into<crate::model::EvictionSignals>,
1444    {
1445        self.eviction_soft = v.map(|x| x.into());
1446        self
1447    }
1448
1449    /// Sets the value of [eviction_soft_grace_period][crate::model::NodeKubeletConfig::eviction_soft_grace_period].
1450    pub fn set_eviction_soft_grace_period<T>(mut self, v: T) -> Self
1451    where
1452        T: std::convert::Into<crate::model::EvictionGracePeriod>,
1453    {
1454        self.eviction_soft_grace_period = std::option::Option::Some(v.into());
1455        self
1456    }
1457
1458    /// Sets or clears the value of [eviction_soft_grace_period][crate::model::NodeKubeletConfig::eviction_soft_grace_period].
1459    pub fn set_or_clear_eviction_soft_grace_period<T>(mut self, v: std::option::Option<T>) -> Self
1460    where
1461        T: std::convert::Into<crate::model::EvictionGracePeriod>,
1462    {
1463        self.eviction_soft_grace_period = v.map(|x| x.into());
1464        self
1465    }
1466
1467    /// Sets the value of [eviction_minimum_reclaim][crate::model::NodeKubeletConfig::eviction_minimum_reclaim].
1468    pub fn set_eviction_minimum_reclaim<T>(mut self, v: T) -> Self
1469    where
1470        T: std::convert::Into<crate::model::EvictionMinimumReclaim>,
1471    {
1472        self.eviction_minimum_reclaim = std::option::Option::Some(v.into());
1473        self
1474    }
1475
1476    /// Sets or clears the value of [eviction_minimum_reclaim][crate::model::NodeKubeletConfig::eviction_minimum_reclaim].
1477    pub fn set_or_clear_eviction_minimum_reclaim<T>(mut self, v: std::option::Option<T>) -> Self
1478    where
1479        T: std::convert::Into<crate::model::EvictionMinimumReclaim>,
1480    {
1481        self.eviction_minimum_reclaim = v.map(|x| x.into());
1482        self
1483    }
1484
1485    /// Sets the value of [eviction_max_pod_grace_period_seconds][crate::model::NodeKubeletConfig::eviction_max_pod_grace_period_seconds].
1486    pub fn set_eviction_max_pod_grace_period_seconds<T: std::convert::Into<i32>>(
1487        mut self,
1488        v: T,
1489    ) -> Self {
1490        self.eviction_max_pod_grace_period_seconds = v.into();
1491        self
1492    }
1493
1494    /// Sets the value of [max_parallel_image_pulls][crate::model::NodeKubeletConfig::max_parallel_image_pulls].
1495    pub fn set_max_parallel_image_pulls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1496        self.max_parallel_image_pulls = v.into();
1497        self
1498    }
1499
1500    /// Sets the value of [single_process_oom_kill][crate::model::NodeKubeletConfig::single_process_oom_kill].
1501    pub fn set_single_process_oom_kill<T>(mut self, v: T) -> Self
1502    where
1503        T: std::convert::Into<bool>,
1504    {
1505        self.single_process_oom_kill = std::option::Option::Some(v.into());
1506        self
1507    }
1508
1509    /// Sets or clears the value of [single_process_oom_kill][crate::model::NodeKubeletConfig::single_process_oom_kill].
1510    pub fn set_or_clear_single_process_oom_kill<T>(mut self, v: std::option::Option<T>) -> Self
1511    where
1512        T: std::convert::Into<bool>,
1513    {
1514        self.single_process_oom_kill = v.map(|x| x.into());
1515        self
1516    }
1517}
1518
1519impl wkt::message::Message for NodeKubeletConfig {
1520    fn typename() -> &'static str {
1521        "type.googleapis.com/google.container.v1.NodeKubeletConfig"
1522    }
1523}
1524
1525/// TopologyManager defines the configuration options for Topology Manager
1526/// feature. See
1527/// <https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/>
1528#[derive(Clone, Default, PartialEq)]
1529#[non_exhaustive]
1530pub struct TopologyManager {
1531    /// Configures the strategy for resource alignment.
1532    /// Allowed values are:
1533    ///
1534    /// * none: the default policy, and does not perform any topology alignment.
1535    /// * restricted: the topology manager stores the preferred NUMA node affinity
1536    ///   for the container, and will reject the pod if the affinity if not
1537    ///   preferred.
1538    /// * best-effort: the topology manager stores the preferred NUMA node affinity
1539    ///   for the container. If the affinity is not preferred, the topology manager
1540    ///   will admit the pod to the node anyway.
1541    /// * single-numa-node: the topology manager determines if the single NUMA node
1542    ///   affinity is possible. If it is, Topology Manager will store this and the
1543    ///   Hint Providers can then use this information when making the resource
1544    ///   allocation decision. If, however, this is not possible then the
1545    ///   Topology Manager will reject the pod from the node. This will result in a
1546    ///   pod in a Terminated state with a pod admission failure.
1547    ///
1548    /// The default policy value is 'none' if unspecified.
1549    /// Details about each strategy can be found
1550    /// [here](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies).
1551    pub policy: std::string::String,
1552
1553    /// The Topology Manager aligns resources in following scopes:
1554    ///
1555    /// * container
1556    /// * pod
1557    ///
1558    /// The default scope is 'container' if unspecified.
1559    /// See
1560    /// <https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes>
1561    pub scope: std::string::String,
1562
1563    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1564}
1565
1566impl TopologyManager {
1567    pub fn new() -> Self {
1568        std::default::Default::default()
1569    }
1570
1571    /// Sets the value of [policy][crate::model::TopologyManager::policy].
1572    pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1573        self.policy = v.into();
1574        self
1575    }
1576
1577    /// Sets the value of [scope][crate::model::TopologyManager::scope].
1578    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1579        self.scope = v.into();
1580        self
1581    }
1582}
1583
1584impl wkt::message::Message for TopologyManager {
1585    fn typename() -> &'static str {
1586        "type.googleapis.com/google.container.v1.TopologyManager"
1587    }
1588}
1589
1590/// The option enables the Kubernetes NUMA-aware Memory Manager feature.
1591/// Detailed description about the feature can be found
1592/// [here](https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/).
1593#[derive(Clone, Default, PartialEq)]
1594#[non_exhaustive]
1595pub struct MemoryManager {
1596    /// Controls the memory management policy on the Node.
1597    /// See
1598    /// <https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#policies>
1599    ///
1600    /// The following values are allowed.
1601    ///
1602    /// * "none"
1603    /// * "static"
1604    ///   The default value is 'none' if unspecified.
1605    pub policy: std::string::String,
1606
1607    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1608}
1609
1610impl MemoryManager {
1611    pub fn new() -> Self {
1612        std::default::Default::default()
1613    }
1614
1615    /// Sets the value of [policy][crate::model::MemoryManager::policy].
1616    pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1617        self.policy = v.into();
1618        self
1619    }
1620}
1621
1622impl wkt::message::Message for MemoryManager {
1623    fn typename() -> &'static str {
1624        "type.googleapis.com/google.container.v1.MemoryManager"
1625    }
1626}
1627
1628/// Eviction signals are the current state of a particular resource at a specific
1629/// point in time. The kubelet uses eviction signals to make eviction decisions
1630/// by comparing the signals to eviction thresholds, which are the minimum amount
1631/// of the resource that should be available on the node.
1632#[derive(Clone, Default, PartialEq)]
1633#[non_exhaustive]
1634pub struct EvictionSignals {
1635    /// Optional. Memory available (i.e. capacity - workingSet), in bytes. Defines
1636    /// the amount of "memory.available" signal in kubelet. Default is unset, if
1637    /// not specified in the kubelet config. Format: positive number + unit, e.g.
1638    /// 100Ki, 10Mi, 5Gi. Valid units are Ki, Mi, Gi. Must be >= 100Mi and <= 50%
1639    /// of the node's memory. See
1640    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1641    pub memory_available: std::string::String,
1642
1643    /// Optional. Amount of storage available on filesystem that kubelet uses for
1644    /// volumes, daemon logs, etc. Defines the amount of "nodefs.available" signal
1645    /// in kubelet. Default is unset, if not specified in the kubelet config. It
1646    /// takses percentage value for now. Sample format: "30%". Must be >= 10% and
1647    /// <= 50%. See
1648    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1649    pub nodefs_available: std::string::String,
1650
1651    /// Optional. Amount of inodes available on filesystem that kubelet uses for
1652    /// volumes, daemon logs, etc. Defines the amount of "nodefs.inodesFree" signal
1653    /// in kubelet. Default is unset, if not specified in the kubelet config. Linux
1654    /// only. It takses percentage value for now. Sample format: "30%". Must be >=
1655    /// 5% and <= 50%. See
1656    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1657    pub nodefs_inodes_free: std::string::String,
1658
1659    /// Optional. Amount of storage available on filesystem that container runtime
1660    /// uses for storing images layers. If the container filesystem and image
1661    /// filesystem are not separate, then imagefs can store both image layers and
1662    /// writeable layers. Defines the amount of "imagefs.available" signal in
1663    /// kubelet. Default is unset, if not specified in the kubelet config. It
1664    /// takses percentage value for now. Sample format: "30%". Must be >= 15% and
1665    /// <= 50%. See
1666    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1667    pub imagefs_available: std::string::String,
1668
1669    /// Optional. Amount of inodes available on filesystem that container runtime
1670    /// uses for storing images layers. Defines the amount of "imagefs.inodesFree"
1671    /// signal in kubelet. Default is unset, if not specified in the kubelet
1672    /// config. Linux only. It takses percentage value for now. Sample format:
1673    /// "30%". Must be >= 5% and <= 50%. See
1674    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1675    pub imagefs_inodes_free: std::string::String,
1676
1677    /// Optional. Amount of PID available for pod allocation. Defines the amount of
1678    /// "pid.available" signal in kubelet. Default is unset, if not specified in
1679    /// the kubelet config. It takses percentage value for now. Sample format:
1680    /// "30%". Must be >= 10% and <= 50%. See
1681    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1682    pub pid_available: std::string::String,
1683
1684    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1685}
1686
1687impl EvictionSignals {
1688    pub fn new() -> Self {
1689        std::default::Default::default()
1690    }
1691
1692    /// Sets the value of [memory_available][crate::model::EvictionSignals::memory_available].
1693    pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1694        mut self,
1695        v: T,
1696    ) -> Self {
1697        self.memory_available = v.into();
1698        self
1699    }
1700
1701    /// Sets the value of [nodefs_available][crate::model::EvictionSignals::nodefs_available].
1702    pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1703        mut self,
1704        v: T,
1705    ) -> Self {
1706        self.nodefs_available = v.into();
1707        self
1708    }
1709
1710    /// Sets the value of [nodefs_inodes_free][crate::model::EvictionSignals::nodefs_inodes_free].
1711    pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1712        mut self,
1713        v: T,
1714    ) -> Self {
1715        self.nodefs_inodes_free = v.into();
1716        self
1717    }
1718
1719    /// Sets the value of [imagefs_available][crate::model::EvictionSignals::imagefs_available].
1720    pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1721        mut self,
1722        v: T,
1723    ) -> Self {
1724        self.imagefs_available = v.into();
1725        self
1726    }
1727
1728    /// Sets the value of [imagefs_inodes_free][crate::model::EvictionSignals::imagefs_inodes_free].
1729    pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1730        mut self,
1731        v: T,
1732    ) -> Self {
1733        self.imagefs_inodes_free = v.into();
1734        self
1735    }
1736
1737    /// Sets the value of [pid_available][crate::model::EvictionSignals::pid_available].
1738    pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1739        self.pid_available = v.into();
1740        self
1741    }
1742}
1743
1744impl wkt::message::Message for EvictionSignals {
1745    fn typename() -> &'static str {
1746        "type.googleapis.com/google.container.v1.EvictionSignals"
1747    }
1748}
1749
1750/// Eviction grace periods are grace periods for each eviction signal.
1751#[derive(Clone, Default, PartialEq)]
1752#[non_exhaustive]
1753pub struct EvictionGracePeriod {
1754    /// Optional. Grace period for eviction due to memory available signal. Sample
1755    /// format: "10s". Must be >= 0. See
1756    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1757    pub memory_available: std::string::String,
1758
1759    /// Optional. Grace period for eviction due to nodefs available signal. Sample
1760    /// format: "10s". Must be >= 0. See
1761    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1762    pub nodefs_available: std::string::String,
1763
1764    /// Optional. Grace period for eviction due to nodefs inodes free signal.
1765    /// Sample format: "10s". Must be >= 0. See
1766    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1767    pub nodefs_inodes_free: std::string::String,
1768
1769    /// Optional. Grace period for eviction due to imagefs available signal. Sample
1770    /// format: "10s". Must be >= 0. See
1771    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1772    pub imagefs_available: std::string::String,
1773
1774    /// Optional. Grace period for eviction due to imagefs inodes free signal.
1775    /// Sample format: "10s". Must be >= 0. See
1776    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1777    pub imagefs_inodes_free: std::string::String,
1778
1779    /// Optional. Grace period for eviction due to pid available signal. Sample
1780    /// format: "10s". Must be >= 0. See
1781    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1782    pub pid_available: std::string::String,
1783
1784    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1785}
1786
1787impl EvictionGracePeriod {
1788    pub fn new() -> Self {
1789        std::default::Default::default()
1790    }
1791
1792    /// Sets the value of [memory_available][crate::model::EvictionGracePeriod::memory_available].
1793    pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1794        mut self,
1795        v: T,
1796    ) -> Self {
1797        self.memory_available = v.into();
1798        self
1799    }
1800
1801    /// Sets the value of [nodefs_available][crate::model::EvictionGracePeriod::nodefs_available].
1802    pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1803        mut self,
1804        v: T,
1805    ) -> Self {
1806        self.nodefs_available = v.into();
1807        self
1808    }
1809
1810    /// Sets the value of [nodefs_inodes_free][crate::model::EvictionGracePeriod::nodefs_inodes_free].
1811    pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1812        mut self,
1813        v: T,
1814    ) -> Self {
1815        self.nodefs_inodes_free = v.into();
1816        self
1817    }
1818
1819    /// Sets the value of [imagefs_available][crate::model::EvictionGracePeriod::imagefs_available].
1820    pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1821        mut self,
1822        v: T,
1823    ) -> Self {
1824        self.imagefs_available = v.into();
1825        self
1826    }
1827
1828    /// Sets the value of [imagefs_inodes_free][crate::model::EvictionGracePeriod::imagefs_inodes_free].
1829    pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1830        mut self,
1831        v: T,
1832    ) -> Self {
1833        self.imagefs_inodes_free = v.into();
1834        self
1835    }
1836
1837    /// Sets the value of [pid_available][crate::model::EvictionGracePeriod::pid_available].
1838    pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1839        self.pid_available = v.into();
1840        self
1841    }
1842}
1843
1844impl wkt::message::Message for EvictionGracePeriod {
1845    fn typename() -> &'static str {
1846        "type.googleapis.com/google.container.v1.EvictionGracePeriod"
1847    }
1848}
1849
1850/// Eviction minimum reclaims are the resource amounts of minimum reclaims for
1851/// each eviction signal.
1852#[derive(Clone, Default, PartialEq)]
1853#[non_exhaustive]
1854pub struct EvictionMinimumReclaim {
1855    /// Optional. Minimum reclaim for eviction due to memory available signal. Only
1856    /// take percentage value for now. Sample format: "10%". Must be <=10%. See
1857    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1858    pub memory_available: std::string::String,
1859
1860    /// Optional. Minimum reclaim for eviction due to nodefs available signal. Only
1861    /// take percentage value for now. Sample format: "10%". Must be <=10%. See
1862    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1863    pub nodefs_available: std::string::String,
1864
1865    /// Optional. Minimum reclaim for eviction due to nodefs inodes free signal.
1866    /// Only take percentage value for now. Sample format: "10%". Must be <=10%.
1867    /// See
1868    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1869    pub nodefs_inodes_free: std::string::String,
1870
1871    /// Optional. Minimum reclaim for eviction due to imagefs available signal.
1872    /// Only take percentage value for now. Sample format: "10%". Must be <=10%.
1873    /// See
1874    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1875    pub imagefs_available: std::string::String,
1876
1877    /// Optional. Minimum reclaim for eviction due to imagefs inodes free signal.
1878    /// Only take percentage value for now. Sample format: "10%". Must be <=10%.
1879    /// See
1880    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1881    pub imagefs_inodes_free: std::string::String,
1882
1883    /// Optional. Minimum reclaim for eviction due to pid available signal. Only
1884    /// take percentage value for now. Sample format: "10%". Must be <=10%. See
1885    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1886    pub pid_available: std::string::String,
1887
1888    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1889}
1890
1891impl EvictionMinimumReclaim {
1892    pub fn new() -> Self {
1893        std::default::Default::default()
1894    }
1895
1896    /// Sets the value of [memory_available][crate::model::EvictionMinimumReclaim::memory_available].
1897    pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1898        mut self,
1899        v: T,
1900    ) -> Self {
1901        self.memory_available = v.into();
1902        self
1903    }
1904
1905    /// Sets the value of [nodefs_available][crate::model::EvictionMinimumReclaim::nodefs_available].
1906    pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1907        mut self,
1908        v: T,
1909    ) -> Self {
1910        self.nodefs_available = v.into();
1911        self
1912    }
1913
1914    /// Sets the value of [nodefs_inodes_free][crate::model::EvictionMinimumReclaim::nodefs_inodes_free].
1915    pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1916        mut self,
1917        v: T,
1918    ) -> Self {
1919        self.nodefs_inodes_free = v.into();
1920        self
1921    }
1922
1923    /// Sets the value of [imagefs_available][crate::model::EvictionMinimumReclaim::imagefs_available].
1924    pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1925        mut self,
1926        v: T,
1927    ) -> Self {
1928        self.imagefs_available = v.into();
1929        self
1930    }
1931
1932    /// Sets the value of [imagefs_inodes_free][crate::model::EvictionMinimumReclaim::imagefs_inodes_free].
1933    pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1934        mut self,
1935        v: T,
1936    ) -> Self {
1937        self.imagefs_inodes_free = v.into();
1938        self
1939    }
1940
1941    /// Sets the value of [pid_available][crate::model::EvictionMinimumReclaim::pid_available].
1942    pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1943        self.pid_available = v.into();
1944        self
1945    }
1946}
1947
1948impl wkt::message::Message for EvictionMinimumReclaim {
1949    fn typename() -> &'static str {
1950        "type.googleapis.com/google.container.v1.EvictionMinimumReclaim"
1951    }
1952}
1953
1954/// Parameters that describe the nodes in a cluster.
1955///
1956/// GKE Autopilot clusters do not
1957/// recognize parameters in `NodeConfig`. Use
1958/// [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults]
1959/// instead.
1960///
1961/// [google.container.v1.AutoprovisioningNodePoolDefaults]: crate::model::AutoprovisioningNodePoolDefaults
1962#[derive(Clone, Default, PartialEq)]
1963#[non_exhaustive]
1964pub struct NodeConfig {
1965    /// The name of a Google Compute Engine [machine
1966    /// type](https://cloud.google.com/compute/docs/machine-types)
1967    ///
1968    /// If unspecified, the default machine type is `e2-medium`.
1969    pub machine_type: std::string::String,
1970
1971    /// Size of the disk attached to each node, specified in GB.
1972    /// The smallest allowed disk size is 10GB.
1973    ///
1974    /// If unspecified, the default disk size is 100GB.
1975    pub disk_size_gb: i32,
1976
1977    /// The set of Google API scopes to be made available on all of the
1978    /// node VMs under the "default" service account.
1979    ///
1980    /// The following scopes are recommended, but not required, and by default are
1981    /// not included:
1982    ///
1983    /// * `<https://www.googleapis.com/auth/compute>` is required for mounting
1984    ///   persistent storage on your nodes.
1985    /// * `<https://www.googleapis.com/auth/devstorage.read_only>` is required for
1986    ///   communicating with **gcr.io**
1987    ///   (the [Artifact Registry](https://cloud.google.com/artifact-registry/)).
1988    ///
1989    /// If unspecified, no scopes are added, unless Cloud Logging or Cloud
1990    /// Monitoring are enabled, in which case their required scopes will be added.
1991    pub oauth_scopes: std::vec::Vec<std::string::String>,
1992
1993    /// The Google Cloud Platform Service Account to be used by the node VMs.
1994    /// Specify the email address of the Service Account; otherwise, if no Service
1995    /// Account is specified, the "default" service account is used.
1996    pub service_account: std::string::String,
1997
1998    /// The metadata key/value pairs assigned to instances in the cluster.
1999    ///
2000    /// Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes
2001    /// in length. These are reflected as part of a URL in the metadata server.
2002    /// Additionally, to avoid ambiguity, keys must not conflict with any other
2003    /// metadata keys for the project or be one of the reserved keys:
2004    ///
2005    /// - "cluster-location"
2006    /// - "cluster-name"
2007    /// - "cluster-uid"
2008    /// - "configure-sh"
2009    /// - "containerd-configure-sh"
2010    /// - "enable-os-login"
2011    /// - "gci-ensure-gke-docker"
2012    /// - "gci-metrics-enabled"
2013    /// - "gci-update-strategy"
2014    /// - "instance-template"
2015    /// - "kube-env"
2016    /// - "startup-script"
2017    /// - "user-data"
2018    /// - "disable-address-manager"
2019    /// - "windows-startup-script-ps1"
2020    /// - "common-psm1"
2021    /// - "k8s-node-setup-psm1"
2022    /// - "install-ssh-psm1"
2023    /// - "user-profile-psm1"
2024    ///
2025    /// Values are free-form strings, and only have meaning as interpreted by
2026    /// the image running in the instance. The only restriction placed on them is
2027    /// that each value's size must be less than or equal to 32 KB.
2028    ///
2029    /// The total size of all keys and values must be less than 512 KB.
2030    pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
2031
2032    /// The image type to use for this node. Note that for a given image type,
2033    /// the latest version of it will be used. Please see
2034    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images>
2035    /// for available image types.
2036    pub image_type: std::string::String,
2037
2038    /// The map of Kubernetes labels (key/value pairs) to be applied to each node.
2039    /// These will added in addition to any default label(s) that
2040    /// Kubernetes may apply to the node.
2041    /// In case of conflict in label keys, the applied set may differ depending on
2042    /// the Kubernetes version -- it's best to assume the behavior is undefined
2043    /// and conflicts should be avoided.
2044    /// For more information, including usage and the valid values, see:
2045    /// <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/>
2046    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2047
2048    /// The number of local SSD disks to be attached to the node.
2049    ///
2050    /// The limit for this value is dependent upon the maximum number of
2051    /// disks available on a machine per zone. See:
2052    /// <https://cloud.google.com/compute/docs/disks/local-ssd>
2053    /// for more information.
2054    pub local_ssd_count: i32,
2055
2056    /// The list of instance tags applied to all nodes. Tags are used to identify
2057    /// valid sources or targets for network firewalls and are specified by
2058    /// the client during cluster or node pool creation. Each tag within the list
2059    /// must comply with RFC1035.
2060    pub tags: std::vec::Vec<std::string::String>,
2061
2062    /// Whether the nodes are created as preemptible VM instances. See:
2063    /// <https://cloud.google.com/compute/docs/instances/preemptible>
2064    /// for more information about preemptible VM instances.
2065    pub preemptible: bool,
2066
2067    /// A list of hardware accelerators to be attached to each node.
2068    /// See
2069    /// <https://cloud.google.com/compute/docs/gpus>
2070    /// for more information about support for GPUs.
2071    pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
2072
2073    /// Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or
2074    /// 'pd-balanced')
2075    ///
2076    /// If unspecified, the default disk type is 'pd-standard'
2077    pub disk_type: std::string::String,
2078
2079    /// Minimum CPU platform to be used by this instance. The instance may be
2080    /// scheduled on the specified or newer CPU platform. Applicable values are the
2081    /// friendly names of CPU platforms, such as
2082    /// `minCpuPlatform: "Intel Haswell"` or
2083    /// `minCpuPlatform: "Intel Sandy Bridge"`. For more
2084    /// information, read [how to specify min CPU
2085    /// platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
2086    pub min_cpu_platform: std::string::String,
2087
2088    /// The workload metadata configuration for this node.
2089    pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
2090
2091    /// List of kubernetes taints to be applied to each node.
2092    ///
2093    /// For more information, including usage and the valid values, see:
2094    /// <https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/>
2095    pub taints: std::vec::Vec<crate::model::NodeTaint>,
2096
2097    /// Sandbox configuration for this node.
2098    pub sandbox_config: std::option::Option<crate::model::SandboxConfig>,
2099
2100    /// Setting this field will assign instances of this
2101    /// pool to run on the specified node group. This is useful for running
2102    /// workloads on [sole tenant
2103    /// nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes).
2104    pub node_group: std::string::String,
2105
2106    /// The optional reservation affinity. Setting this field will apply
2107    /// the specified [Zonal Compute
2108    /// Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
2109    /// to this node pool.
2110    pub reservation_affinity: std::option::Option<crate::model::ReservationAffinity>,
2111
2112    /// Shielded Instance options.
2113    pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
2114
2115    /// Parameters that can be configured on Linux nodes.
2116    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
2117
2118    /// Node kubelet configs.
2119    pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
2120
2121    /// The Customer Managed Encryption Key used to encrypt the boot disk attached
2122    /// to each node in the node pool. This should be of the form
2123    /// projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME].
2124    /// For more information about protecting resources with Cloud KMS Keys please
2125    /// see:
2126    /// <https://cloud.google.com/compute/docs/disks/customer-managed-encryption>
2127    pub boot_disk_kms_key: std::string::String,
2128
2129    /// Google Container File System (image streaming) configs.
2130    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
2131
2132    /// Advanced features for the Compute Engine VM.
2133    pub advanced_machine_features: std::option::Option<crate::model::AdvancedMachineFeatures>,
2134
2135    /// Enable or disable gvnic in the node pool.
2136    pub gvnic: std::option::Option<crate::model::VirtualNIC>,
2137
2138    /// Spot flag for enabling Spot VM, which is a rebrand of
2139    /// the existing preemptible flag.
2140    pub spot: bool,
2141
2142    /// Confidential nodes config.
2143    /// All the nodes in the node pool will be Confidential VM once enabled.
2144    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
2145
2146    /// Enable or disable NCCL fast socket for the node pool.
2147    pub fast_socket: std::option::Option<crate::model::FastSocket>,
2148
2149    /// The resource labels for the node pool to use to annotate any related
2150    /// Google Compute Engine resources.
2151    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
2152
2153    /// Logging configuration.
2154    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
2155
2156    /// Parameters that can be configured on Windows nodes.
2157    pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
2158
2159    /// Parameters for using raw-block Local NVMe SSDs.
2160    pub local_nvme_ssd_block_config: std::option::Option<crate::model::LocalNvmeSsdBlockConfig>,
2161
2162    /// Parameters for the node ephemeral storage using Local SSDs.
2163    /// If unspecified, ephemeral storage is backed by the boot disk.
2164    pub ephemeral_storage_local_ssd_config:
2165        std::option::Option<crate::model::EphemeralStorageLocalSsdConfig>,
2166
2167    /// Parameters for node pools to be backed by shared sole tenant node groups.
2168    pub sole_tenant_config: std::option::Option<crate::model::SoleTenantConfig>,
2169
2170    /// Parameters for containerd customization.
2171    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
2172
2173    /// A map of resource manager tag keys and values to be attached to the nodes.
2174    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
2175
2176    /// Optional. Reserved for future use.
2177    pub enable_confidential_storage: bool,
2178
2179    /// List of secondary boot disks attached to the nodes.
2180    pub secondary_boot_disks: std::vec::Vec<crate::model::SecondaryBootDisk>,
2181
2182    /// List of Storage Pools where boot disks are provisioned.
2183    pub storage_pools: std::vec::Vec<std::string::String>,
2184
2185    /// Secondary boot disk update strategy.
2186    pub secondary_boot_disk_update_strategy:
2187        std::option::Option<crate::model::SecondaryBootDiskUpdateStrategy>,
2188
2189    /// The maximum duration for the nodes to exist.
2190    /// If unspecified, the nodes can exist indefinitely.
2191    pub max_run_duration: std::option::Option<wkt::Duration>,
2192
2193    /// Specifies which method should be used for encrypting the
2194    /// Local SSDs attached to the node.
2195    pub local_ssd_encryption_mode:
2196        std::option::Option<crate::model::node_config::LocalSsdEncryptionMode>,
2197
2198    /// Output only. effective_cgroup_mode is the cgroup mode actually used by the
2199    /// node pool. It is determined by the cgroup mode specified in the
2200    /// LinuxNodeConfig or the default cgroup mode based on the cluster creation
2201    /// version.
2202    pub effective_cgroup_mode: crate::model::node_config::EffectiveCgroupMode,
2203
2204    /// Flex Start flag for enabling Flex Start VM.
2205    pub flex_start: std::option::Option<bool>,
2206
2207    /// The boot disk configuration for the node pool.
2208    pub boot_disk: std::option::Option<crate::model::BootDisk>,
2209
2210    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2211}
2212
2213impl NodeConfig {
2214    pub fn new() -> Self {
2215        std::default::Default::default()
2216    }
2217
2218    /// Sets the value of [machine_type][crate::model::NodeConfig::machine_type].
2219    pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2220        self.machine_type = v.into();
2221        self
2222    }
2223
2224    /// Sets the value of [disk_size_gb][crate::model::NodeConfig::disk_size_gb].
2225    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2226        self.disk_size_gb = v.into();
2227        self
2228    }
2229
2230    /// Sets the value of [oauth_scopes][crate::model::NodeConfig::oauth_scopes].
2231    pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
2232    where
2233        T: std::iter::IntoIterator<Item = V>,
2234        V: std::convert::Into<std::string::String>,
2235    {
2236        use std::iter::Iterator;
2237        self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
2238        self
2239    }
2240
2241    /// Sets the value of [service_account][crate::model::NodeConfig::service_account].
2242    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2243        self.service_account = v.into();
2244        self
2245    }
2246
2247    /// Sets the value of [metadata][crate::model::NodeConfig::metadata].
2248    pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
2249    where
2250        T: std::iter::IntoIterator<Item = (K, V)>,
2251        K: std::convert::Into<std::string::String>,
2252        V: std::convert::Into<std::string::String>,
2253    {
2254        use std::iter::Iterator;
2255        self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2256        self
2257    }
2258
2259    /// Sets the value of [image_type][crate::model::NodeConfig::image_type].
2260    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2261        self.image_type = v.into();
2262        self
2263    }
2264
2265    /// Sets the value of [labels][crate::model::NodeConfig::labels].
2266    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2267    where
2268        T: std::iter::IntoIterator<Item = (K, V)>,
2269        K: std::convert::Into<std::string::String>,
2270        V: std::convert::Into<std::string::String>,
2271    {
2272        use std::iter::Iterator;
2273        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2274        self
2275    }
2276
2277    /// Sets the value of [local_ssd_count][crate::model::NodeConfig::local_ssd_count].
2278    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2279        self.local_ssd_count = v.into();
2280        self
2281    }
2282
2283    /// Sets the value of [tags][crate::model::NodeConfig::tags].
2284    pub fn set_tags<T, V>(mut self, v: T) -> Self
2285    where
2286        T: std::iter::IntoIterator<Item = V>,
2287        V: std::convert::Into<std::string::String>,
2288    {
2289        use std::iter::Iterator;
2290        self.tags = v.into_iter().map(|i| i.into()).collect();
2291        self
2292    }
2293
2294    /// Sets the value of [preemptible][crate::model::NodeConfig::preemptible].
2295    pub fn set_preemptible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2296        self.preemptible = v.into();
2297        self
2298    }
2299
2300    /// Sets the value of [accelerators][crate::model::NodeConfig::accelerators].
2301    pub fn set_accelerators<T, V>(mut self, v: T) -> Self
2302    where
2303        T: std::iter::IntoIterator<Item = V>,
2304        V: std::convert::Into<crate::model::AcceleratorConfig>,
2305    {
2306        use std::iter::Iterator;
2307        self.accelerators = v.into_iter().map(|i| i.into()).collect();
2308        self
2309    }
2310
2311    /// Sets the value of [disk_type][crate::model::NodeConfig::disk_type].
2312    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2313        self.disk_type = v.into();
2314        self
2315    }
2316
2317    /// Sets the value of [min_cpu_platform][crate::model::NodeConfig::min_cpu_platform].
2318    pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
2319        mut self,
2320        v: T,
2321    ) -> Self {
2322        self.min_cpu_platform = v.into();
2323        self
2324    }
2325
2326    /// Sets the value of [workload_metadata_config][crate::model::NodeConfig::workload_metadata_config].
2327    pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
2328    where
2329        T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
2330    {
2331        self.workload_metadata_config = std::option::Option::Some(v.into());
2332        self
2333    }
2334
2335    /// Sets or clears the value of [workload_metadata_config][crate::model::NodeConfig::workload_metadata_config].
2336    pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
2337    where
2338        T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
2339    {
2340        self.workload_metadata_config = v.map(|x| x.into());
2341        self
2342    }
2343
2344    /// Sets the value of [taints][crate::model::NodeConfig::taints].
2345    pub fn set_taints<T, V>(mut self, v: T) -> Self
2346    where
2347        T: std::iter::IntoIterator<Item = V>,
2348        V: std::convert::Into<crate::model::NodeTaint>,
2349    {
2350        use std::iter::Iterator;
2351        self.taints = v.into_iter().map(|i| i.into()).collect();
2352        self
2353    }
2354
2355    /// Sets the value of [sandbox_config][crate::model::NodeConfig::sandbox_config].
2356    pub fn set_sandbox_config<T>(mut self, v: T) -> Self
2357    where
2358        T: std::convert::Into<crate::model::SandboxConfig>,
2359    {
2360        self.sandbox_config = std::option::Option::Some(v.into());
2361        self
2362    }
2363
2364    /// Sets or clears the value of [sandbox_config][crate::model::NodeConfig::sandbox_config].
2365    pub fn set_or_clear_sandbox_config<T>(mut self, v: std::option::Option<T>) -> Self
2366    where
2367        T: std::convert::Into<crate::model::SandboxConfig>,
2368    {
2369        self.sandbox_config = v.map(|x| x.into());
2370        self
2371    }
2372
2373    /// Sets the value of [node_group][crate::model::NodeConfig::node_group].
2374    pub fn set_node_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2375        self.node_group = v.into();
2376        self
2377    }
2378
2379    /// Sets the value of [reservation_affinity][crate::model::NodeConfig::reservation_affinity].
2380    pub fn set_reservation_affinity<T>(mut self, v: T) -> Self
2381    where
2382        T: std::convert::Into<crate::model::ReservationAffinity>,
2383    {
2384        self.reservation_affinity = std::option::Option::Some(v.into());
2385        self
2386    }
2387
2388    /// Sets or clears the value of [reservation_affinity][crate::model::NodeConfig::reservation_affinity].
2389    pub fn set_or_clear_reservation_affinity<T>(mut self, v: std::option::Option<T>) -> Self
2390    where
2391        T: std::convert::Into<crate::model::ReservationAffinity>,
2392    {
2393        self.reservation_affinity = v.map(|x| x.into());
2394        self
2395    }
2396
2397    /// Sets the value of [shielded_instance_config][crate::model::NodeConfig::shielded_instance_config].
2398    pub fn set_shielded_instance_config<T>(mut self, v: T) -> Self
2399    where
2400        T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
2401    {
2402        self.shielded_instance_config = std::option::Option::Some(v.into());
2403        self
2404    }
2405
2406    /// Sets or clears the value of [shielded_instance_config][crate::model::NodeConfig::shielded_instance_config].
2407    pub fn set_or_clear_shielded_instance_config<T>(mut self, v: std::option::Option<T>) -> Self
2408    where
2409        T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
2410    {
2411        self.shielded_instance_config = v.map(|x| x.into());
2412        self
2413    }
2414
2415    /// Sets the value of [linux_node_config][crate::model::NodeConfig::linux_node_config].
2416    pub fn set_linux_node_config<T>(mut self, v: T) -> Self
2417    where
2418        T: std::convert::Into<crate::model::LinuxNodeConfig>,
2419    {
2420        self.linux_node_config = std::option::Option::Some(v.into());
2421        self
2422    }
2423
2424    /// Sets or clears the value of [linux_node_config][crate::model::NodeConfig::linux_node_config].
2425    pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
2426    where
2427        T: std::convert::Into<crate::model::LinuxNodeConfig>,
2428    {
2429        self.linux_node_config = v.map(|x| x.into());
2430        self
2431    }
2432
2433    /// Sets the value of [kubelet_config][crate::model::NodeConfig::kubelet_config].
2434    pub fn set_kubelet_config<T>(mut self, v: T) -> Self
2435    where
2436        T: std::convert::Into<crate::model::NodeKubeletConfig>,
2437    {
2438        self.kubelet_config = std::option::Option::Some(v.into());
2439        self
2440    }
2441
2442    /// Sets or clears the value of [kubelet_config][crate::model::NodeConfig::kubelet_config].
2443    pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
2444    where
2445        T: std::convert::Into<crate::model::NodeKubeletConfig>,
2446    {
2447        self.kubelet_config = v.map(|x| x.into());
2448        self
2449    }
2450
2451    /// Sets the value of [boot_disk_kms_key][crate::model::NodeConfig::boot_disk_kms_key].
2452    pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
2453        mut self,
2454        v: T,
2455    ) -> Self {
2456        self.boot_disk_kms_key = v.into();
2457        self
2458    }
2459
2460    /// Sets the value of [gcfs_config][crate::model::NodeConfig::gcfs_config].
2461    pub fn set_gcfs_config<T>(mut self, v: T) -> Self
2462    where
2463        T: std::convert::Into<crate::model::GcfsConfig>,
2464    {
2465        self.gcfs_config = std::option::Option::Some(v.into());
2466        self
2467    }
2468
2469    /// Sets or clears the value of [gcfs_config][crate::model::NodeConfig::gcfs_config].
2470    pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
2471    where
2472        T: std::convert::Into<crate::model::GcfsConfig>,
2473    {
2474        self.gcfs_config = v.map(|x| x.into());
2475        self
2476    }
2477
2478    /// Sets the value of [advanced_machine_features][crate::model::NodeConfig::advanced_machine_features].
2479    pub fn set_advanced_machine_features<T>(mut self, v: T) -> Self
2480    where
2481        T: std::convert::Into<crate::model::AdvancedMachineFeatures>,
2482    {
2483        self.advanced_machine_features = std::option::Option::Some(v.into());
2484        self
2485    }
2486
2487    /// Sets or clears the value of [advanced_machine_features][crate::model::NodeConfig::advanced_machine_features].
2488    pub fn set_or_clear_advanced_machine_features<T>(mut self, v: std::option::Option<T>) -> Self
2489    where
2490        T: std::convert::Into<crate::model::AdvancedMachineFeatures>,
2491    {
2492        self.advanced_machine_features = v.map(|x| x.into());
2493        self
2494    }
2495
2496    /// Sets the value of [gvnic][crate::model::NodeConfig::gvnic].
2497    pub fn set_gvnic<T>(mut self, v: T) -> Self
2498    where
2499        T: std::convert::Into<crate::model::VirtualNIC>,
2500    {
2501        self.gvnic = std::option::Option::Some(v.into());
2502        self
2503    }
2504
2505    /// Sets or clears the value of [gvnic][crate::model::NodeConfig::gvnic].
2506    pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
2507    where
2508        T: std::convert::Into<crate::model::VirtualNIC>,
2509    {
2510        self.gvnic = v.map(|x| x.into());
2511        self
2512    }
2513
2514    /// Sets the value of [spot][crate::model::NodeConfig::spot].
2515    pub fn set_spot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2516        self.spot = v.into();
2517        self
2518    }
2519
2520    /// Sets the value of [confidential_nodes][crate::model::NodeConfig::confidential_nodes].
2521    pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
2522    where
2523        T: std::convert::Into<crate::model::ConfidentialNodes>,
2524    {
2525        self.confidential_nodes = std::option::Option::Some(v.into());
2526        self
2527    }
2528
2529    /// Sets or clears the value of [confidential_nodes][crate::model::NodeConfig::confidential_nodes].
2530    pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
2531    where
2532        T: std::convert::Into<crate::model::ConfidentialNodes>,
2533    {
2534        self.confidential_nodes = v.map(|x| x.into());
2535        self
2536    }
2537
2538    /// Sets the value of [fast_socket][crate::model::NodeConfig::fast_socket].
2539    pub fn set_fast_socket<T>(mut self, v: T) -> Self
2540    where
2541        T: std::convert::Into<crate::model::FastSocket>,
2542    {
2543        self.fast_socket = std::option::Option::Some(v.into());
2544        self
2545    }
2546
2547    /// Sets or clears the value of [fast_socket][crate::model::NodeConfig::fast_socket].
2548    pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
2549    where
2550        T: std::convert::Into<crate::model::FastSocket>,
2551    {
2552        self.fast_socket = v.map(|x| x.into());
2553        self
2554    }
2555
2556    /// Sets the value of [resource_labels][crate::model::NodeConfig::resource_labels].
2557    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2558    where
2559        T: std::iter::IntoIterator<Item = (K, V)>,
2560        K: std::convert::Into<std::string::String>,
2561        V: std::convert::Into<std::string::String>,
2562    {
2563        use std::iter::Iterator;
2564        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2565        self
2566    }
2567
2568    /// Sets the value of [logging_config][crate::model::NodeConfig::logging_config].
2569    pub fn set_logging_config<T>(mut self, v: T) -> Self
2570    where
2571        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
2572    {
2573        self.logging_config = std::option::Option::Some(v.into());
2574        self
2575    }
2576
2577    /// Sets or clears the value of [logging_config][crate::model::NodeConfig::logging_config].
2578    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
2579    where
2580        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
2581    {
2582        self.logging_config = v.map(|x| x.into());
2583        self
2584    }
2585
2586    /// Sets the value of [windows_node_config][crate::model::NodeConfig::windows_node_config].
2587    pub fn set_windows_node_config<T>(mut self, v: T) -> Self
2588    where
2589        T: std::convert::Into<crate::model::WindowsNodeConfig>,
2590    {
2591        self.windows_node_config = std::option::Option::Some(v.into());
2592        self
2593    }
2594
2595    /// Sets or clears the value of [windows_node_config][crate::model::NodeConfig::windows_node_config].
2596    pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
2597    where
2598        T: std::convert::Into<crate::model::WindowsNodeConfig>,
2599    {
2600        self.windows_node_config = v.map(|x| x.into());
2601        self
2602    }
2603
2604    /// Sets the value of [local_nvme_ssd_block_config][crate::model::NodeConfig::local_nvme_ssd_block_config].
2605    pub fn set_local_nvme_ssd_block_config<T>(mut self, v: T) -> Self
2606    where
2607        T: std::convert::Into<crate::model::LocalNvmeSsdBlockConfig>,
2608    {
2609        self.local_nvme_ssd_block_config = std::option::Option::Some(v.into());
2610        self
2611    }
2612
2613    /// Sets or clears the value of [local_nvme_ssd_block_config][crate::model::NodeConfig::local_nvme_ssd_block_config].
2614    pub fn set_or_clear_local_nvme_ssd_block_config<T>(mut self, v: std::option::Option<T>) -> Self
2615    where
2616        T: std::convert::Into<crate::model::LocalNvmeSsdBlockConfig>,
2617    {
2618        self.local_nvme_ssd_block_config = v.map(|x| x.into());
2619        self
2620    }
2621
2622    /// Sets the value of [ephemeral_storage_local_ssd_config][crate::model::NodeConfig::ephemeral_storage_local_ssd_config].
2623    pub fn set_ephemeral_storage_local_ssd_config<T>(mut self, v: T) -> Self
2624    where
2625        T: std::convert::Into<crate::model::EphemeralStorageLocalSsdConfig>,
2626    {
2627        self.ephemeral_storage_local_ssd_config = std::option::Option::Some(v.into());
2628        self
2629    }
2630
2631    /// Sets or clears the value of [ephemeral_storage_local_ssd_config][crate::model::NodeConfig::ephemeral_storage_local_ssd_config].
2632    pub fn set_or_clear_ephemeral_storage_local_ssd_config<T>(
2633        mut self,
2634        v: std::option::Option<T>,
2635    ) -> Self
2636    where
2637        T: std::convert::Into<crate::model::EphemeralStorageLocalSsdConfig>,
2638    {
2639        self.ephemeral_storage_local_ssd_config = v.map(|x| x.into());
2640        self
2641    }
2642
2643    /// Sets the value of [sole_tenant_config][crate::model::NodeConfig::sole_tenant_config].
2644    pub fn set_sole_tenant_config<T>(mut self, v: T) -> Self
2645    where
2646        T: std::convert::Into<crate::model::SoleTenantConfig>,
2647    {
2648        self.sole_tenant_config = std::option::Option::Some(v.into());
2649        self
2650    }
2651
2652    /// Sets or clears the value of [sole_tenant_config][crate::model::NodeConfig::sole_tenant_config].
2653    pub fn set_or_clear_sole_tenant_config<T>(mut self, v: std::option::Option<T>) -> Self
2654    where
2655        T: std::convert::Into<crate::model::SoleTenantConfig>,
2656    {
2657        self.sole_tenant_config = v.map(|x| x.into());
2658        self
2659    }
2660
2661    /// Sets the value of [containerd_config][crate::model::NodeConfig::containerd_config].
2662    pub fn set_containerd_config<T>(mut self, v: T) -> Self
2663    where
2664        T: std::convert::Into<crate::model::ContainerdConfig>,
2665    {
2666        self.containerd_config = std::option::Option::Some(v.into());
2667        self
2668    }
2669
2670    /// Sets or clears the value of [containerd_config][crate::model::NodeConfig::containerd_config].
2671    pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
2672    where
2673        T: std::convert::Into<crate::model::ContainerdConfig>,
2674    {
2675        self.containerd_config = v.map(|x| x.into());
2676        self
2677    }
2678
2679    /// Sets the value of [resource_manager_tags][crate::model::NodeConfig::resource_manager_tags].
2680    pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
2681    where
2682        T: std::convert::Into<crate::model::ResourceManagerTags>,
2683    {
2684        self.resource_manager_tags = std::option::Option::Some(v.into());
2685        self
2686    }
2687
2688    /// Sets or clears the value of [resource_manager_tags][crate::model::NodeConfig::resource_manager_tags].
2689    pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
2690    where
2691        T: std::convert::Into<crate::model::ResourceManagerTags>,
2692    {
2693        self.resource_manager_tags = v.map(|x| x.into());
2694        self
2695    }
2696
2697    /// Sets the value of [enable_confidential_storage][crate::model::NodeConfig::enable_confidential_storage].
2698    pub fn set_enable_confidential_storage<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2699        self.enable_confidential_storage = v.into();
2700        self
2701    }
2702
2703    /// Sets the value of [secondary_boot_disks][crate::model::NodeConfig::secondary_boot_disks].
2704    pub fn set_secondary_boot_disks<T, V>(mut self, v: T) -> Self
2705    where
2706        T: std::iter::IntoIterator<Item = V>,
2707        V: std::convert::Into<crate::model::SecondaryBootDisk>,
2708    {
2709        use std::iter::Iterator;
2710        self.secondary_boot_disks = v.into_iter().map(|i| i.into()).collect();
2711        self
2712    }
2713
2714    /// Sets the value of [storage_pools][crate::model::NodeConfig::storage_pools].
2715    pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
2716    where
2717        T: std::iter::IntoIterator<Item = V>,
2718        V: std::convert::Into<std::string::String>,
2719    {
2720        use std::iter::Iterator;
2721        self.storage_pools = v.into_iter().map(|i| i.into()).collect();
2722        self
2723    }
2724
2725    /// Sets the value of [secondary_boot_disk_update_strategy][crate::model::NodeConfig::secondary_boot_disk_update_strategy].
2726    pub fn set_secondary_boot_disk_update_strategy<T>(mut self, v: T) -> Self
2727    where
2728        T: std::convert::Into<crate::model::SecondaryBootDiskUpdateStrategy>,
2729    {
2730        self.secondary_boot_disk_update_strategy = std::option::Option::Some(v.into());
2731        self
2732    }
2733
2734    /// Sets or clears the value of [secondary_boot_disk_update_strategy][crate::model::NodeConfig::secondary_boot_disk_update_strategy].
2735    pub fn set_or_clear_secondary_boot_disk_update_strategy<T>(
2736        mut self,
2737        v: std::option::Option<T>,
2738    ) -> Self
2739    where
2740        T: std::convert::Into<crate::model::SecondaryBootDiskUpdateStrategy>,
2741    {
2742        self.secondary_boot_disk_update_strategy = v.map(|x| x.into());
2743        self
2744    }
2745
2746    /// Sets the value of [max_run_duration][crate::model::NodeConfig::max_run_duration].
2747    pub fn set_max_run_duration<T>(mut self, v: T) -> Self
2748    where
2749        T: std::convert::Into<wkt::Duration>,
2750    {
2751        self.max_run_duration = std::option::Option::Some(v.into());
2752        self
2753    }
2754
2755    /// Sets or clears the value of [max_run_duration][crate::model::NodeConfig::max_run_duration].
2756    pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
2757    where
2758        T: std::convert::Into<wkt::Duration>,
2759    {
2760        self.max_run_duration = v.map(|x| x.into());
2761        self
2762    }
2763
2764    /// Sets the value of [local_ssd_encryption_mode][crate::model::NodeConfig::local_ssd_encryption_mode].
2765    pub fn set_local_ssd_encryption_mode<T>(mut self, v: T) -> Self
2766    where
2767        T: std::convert::Into<crate::model::node_config::LocalSsdEncryptionMode>,
2768    {
2769        self.local_ssd_encryption_mode = std::option::Option::Some(v.into());
2770        self
2771    }
2772
2773    /// Sets or clears the value of [local_ssd_encryption_mode][crate::model::NodeConfig::local_ssd_encryption_mode].
2774    pub fn set_or_clear_local_ssd_encryption_mode<T>(mut self, v: std::option::Option<T>) -> Self
2775    where
2776        T: std::convert::Into<crate::model::node_config::LocalSsdEncryptionMode>,
2777    {
2778        self.local_ssd_encryption_mode = v.map(|x| x.into());
2779        self
2780    }
2781
2782    /// Sets the value of [effective_cgroup_mode][crate::model::NodeConfig::effective_cgroup_mode].
2783    pub fn set_effective_cgroup_mode<
2784        T: std::convert::Into<crate::model::node_config::EffectiveCgroupMode>,
2785    >(
2786        mut self,
2787        v: T,
2788    ) -> Self {
2789        self.effective_cgroup_mode = v.into();
2790        self
2791    }
2792
2793    /// Sets the value of [flex_start][crate::model::NodeConfig::flex_start].
2794    pub fn set_flex_start<T>(mut self, v: T) -> Self
2795    where
2796        T: std::convert::Into<bool>,
2797    {
2798        self.flex_start = std::option::Option::Some(v.into());
2799        self
2800    }
2801
2802    /// Sets or clears the value of [flex_start][crate::model::NodeConfig::flex_start].
2803    pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
2804    where
2805        T: std::convert::Into<bool>,
2806    {
2807        self.flex_start = v.map(|x| x.into());
2808        self
2809    }
2810
2811    /// Sets the value of [boot_disk][crate::model::NodeConfig::boot_disk].
2812    pub fn set_boot_disk<T>(mut self, v: T) -> Self
2813    where
2814        T: std::convert::Into<crate::model::BootDisk>,
2815    {
2816        self.boot_disk = std::option::Option::Some(v.into());
2817        self
2818    }
2819
2820    /// Sets or clears the value of [boot_disk][crate::model::NodeConfig::boot_disk].
2821    pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
2822    where
2823        T: std::convert::Into<crate::model::BootDisk>,
2824    {
2825        self.boot_disk = v.map(|x| x.into());
2826        self
2827    }
2828}
2829
2830impl wkt::message::Message for NodeConfig {
2831    fn typename() -> &'static str {
2832        "type.googleapis.com/google.container.v1.NodeConfig"
2833    }
2834}
2835
2836/// Defines additional types related to [NodeConfig].
2837pub mod node_config {
2838    #[allow(unused_imports)]
2839    use super::*;
2840
2841    /// LocalSsdEncryptionMode specifies the method used for encrypting the Local
2842    /// SSDs attached to the node.
2843    ///
2844    /// # Working with unknown values
2845    ///
2846    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2847    /// additional enum variants at any time. Adding new variants is not considered
2848    /// a breaking change. Applications should write their code in anticipation of:
2849    ///
2850    /// - New values appearing in future releases of the client library, **and**
2851    /// - New values received dynamically, without application changes.
2852    ///
2853    /// Please consult the [Working with enums] section in the user guide for some
2854    /// guidelines.
2855    ///
2856    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2857    #[derive(Clone, Debug, PartialEq)]
2858    #[non_exhaustive]
2859    pub enum LocalSsdEncryptionMode {
2860        /// The given node will be encrypted using keys managed by Google
2861        /// infrastructure and the keys will be deleted when the node is
2862        /// deleted.
2863        Unspecified,
2864        /// The given node will be encrypted using keys managed by Google
2865        /// infrastructure and the keys will be deleted when the node is
2866        /// deleted.
2867        StandardEncryption,
2868        /// The given node will opt-in for using ephemeral key for
2869        /// encryption of Local SSDs.
2870        /// The Local SSDs will not be able to recover data in case of node
2871        /// crash.
2872        EphemeralKeyEncryption,
2873        /// If set, the enum was initialized with an unknown value.
2874        ///
2875        /// Applications can examine the value using [LocalSsdEncryptionMode::value] or
2876        /// [LocalSsdEncryptionMode::name].
2877        UnknownValue(local_ssd_encryption_mode::UnknownValue),
2878    }
2879
2880    #[doc(hidden)]
2881    pub mod local_ssd_encryption_mode {
2882        #[allow(unused_imports)]
2883        use super::*;
2884        #[derive(Clone, Debug, PartialEq)]
2885        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2886    }
2887
2888    impl LocalSsdEncryptionMode {
2889        /// Gets the enum value.
2890        ///
2891        /// Returns `None` if the enum contains an unknown value deserialized from
2892        /// the string representation of enums.
2893        pub fn value(&self) -> std::option::Option<i32> {
2894            match self {
2895                Self::Unspecified => std::option::Option::Some(0),
2896                Self::StandardEncryption => std::option::Option::Some(1),
2897                Self::EphemeralKeyEncryption => std::option::Option::Some(2),
2898                Self::UnknownValue(u) => u.0.value(),
2899            }
2900        }
2901
2902        /// Gets the enum value as a string.
2903        ///
2904        /// Returns `None` if the enum contains an unknown value deserialized from
2905        /// the integer representation of enums.
2906        pub fn name(&self) -> std::option::Option<&str> {
2907            match self {
2908                Self::Unspecified => {
2909                    std::option::Option::Some("LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED")
2910                }
2911                Self::StandardEncryption => std::option::Option::Some("STANDARD_ENCRYPTION"),
2912                Self::EphemeralKeyEncryption => {
2913                    std::option::Option::Some("EPHEMERAL_KEY_ENCRYPTION")
2914                }
2915                Self::UnknownValue(u) => u.0.name(),
2916            }
2917        }
2918    }
2919
2920    impl std::default::Default for LocalSsdEncryptionMode {
2921        fn default() -> Self {
2922            use std::convert::From;
2923            Self::from(0)
2924        }
2925    }
2926
2927    impl std::fmt::Display for LocalSsdEncryptionMode {
2928        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2929            wkt::internal::display_enum(f, self.name(), self.value())
2930        }
2931    }
2932
2933    impl std::convert::From<i32> for LocalSsdEncryptionMode {
2934        fn from(value: i32) -> Self {
2935            match value {
2936                0 => Self::Unspecified,
2937                1 => Self::StandardEncryption,
2938                2 => Self::EphemeralKeyEncryption,
2939                _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
2940                    wkt::internal::UnknownEnumValue::Integer(value),
2941                )),
2942            }
2943        }
2944    }
2945
2946    impl std::convert::From<&str> for LocalSsdEncryptionMode {
2947        fn from(value: &str) -> Self {
2948            use std::string::ToString;
2949            match value {
2950                "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED" => Self::Unspecified,
2951                "STANDARD_ENCRYPTION" => Self::StandardEncryption,
2952                "EPHEMERAL_KEY_ENCRYPTION" => Self::EphemeralKeyEncryption,
2953                _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
2954                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2955                )),
2956            }
2957        }
2958    }
2959
2960    impl serde::ser::Serialize for LocalSsdEncryptionMode {
2961        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2962        where
2963            S: serde::Serializer,
2964        {
2965            match self {
2966                Self::Unspecified => serializer.serialize_i32(0),
2967                Self::StandardEncryption => serializer.serialize_i32(1),
2968                Self::EphemeralKeyEncryption => serializer.serialize_i32(2),
2969                Self::UnknownValue(u) => u.0.serialize(serializer),
2970            }
2971        }
2972    }
2973
2974    impl<'de> serde::de::Deserialize<'de> for LocalSsdEncryptionMode {
2975        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2976        where
2977            D: serde::Deserializer<'de>,
2978        {
2979            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocalSsdEncryptionMode>::new(
2980                ".google.container.v1.NodeConfig.LocalSsdEncryptionMode",
2981            ))
2982        }
2983    }
2984
2985    /// Possible effective cgroup modes for the node.
2986    ///
2987    /// # Working with unknown values
2988    ///
2989    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2990    /// additional enum variants at any time. Adding new variants is not considered
2991    /// a breaking change. Applications should write their code in anticipation of:
2992    ///
2993    /// - New values appearing in future releases of the client library, **and**
2994    /// - New values received dynamically, without application changes.
2995    ///
2996    /// Please consult the [Working with enums] section in the user guide for some
2997    /// guidelines.
2998    ///
2999    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3000    #[derive(Clone, Debug, PartialEq)]
3001    #[non_exhaustive]
3002    pub enum EffectiveCgroupMode {
3003        /// EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the
3004        /// node pool is unspecified, i.e. the node pool is a Windows node pool.
3005        Unspecified,
3006        /// CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the
3007        /// cgroup configuration.
3008        V1,
3009        /// CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the
3010        /// cgroup configuration.
3011        V2,
3012        /// If set, the enum was initialized with an unknown value.
3013        ///
3014        /// Applications can examine the value using [EffectiveCgroupMode::value] or
3015        /// [EffectiveCgroupMode::name].
3016        UnknownValue(effective_cgroup_mode::UnknownValue),
3017    }
3018
3019    #[doc(hidden)]
3020    pub mod effective_cgroup_mode {
3021        #[allow(unused_imports)]
3022        use super::*;
3023        #[derive(Clone, Debug, PartialEq)]
3024        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3025    }
3026
3027    impl EffectiveCgroupMode {
3028        /// Gets the enum value.
3029        ///
3030        /// Returns `None` if the enum contains an unknown value deserialized from
3031        /// the string representation of enums.
3032        pub fn value(&self) -> std::option::Option<i32> {
3033            match self {
3034                Self::Unspecified => std::option::Option::Some(0),
3035                Self::V1 => std::option::Option::Some(1),
3036                Self::V2 => std::option::Option::Some(2),
3037                Self::UnknownValue(u) => u.0.value(),
3038            }
3039        }
3040
3041        /// Gets the enum value as a string.
3042        ///
3043        /// Returns `None` if the enum contains an unknown value deserialized from
3044        /// the integer representation of enums.
3045        pub fn name(&self) -> std::option::Option<&str> {
3046            match self {
3047                Self::Unspecified => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_UNSPECIFIED"),
3048                Self::V1 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V1"),
3049                Self::V2 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V2"),
3050                Self::UnknownValue(u) => u.0.name(),
3051            }
3052        }
3053    }
3054
3055    impl std::default::Default for EffectiveCgroupMode {
3056        fn default() -> Self {
3057            use std::convert::From;
3058            Self::from(0)
3059        }
3060    }
3061
3062    impl std::fmt::Display for EffectiveCgroupMode {
3063        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3064            wkt::internal::display_enum(f, self.name(), self.value())
3065        }
3066    }
3067
3068    impl std::convert::From<i32> for EffectiveCgroupMode {
3069        fn from(value: i32) -> Self {
3070            match value {
3071                0 => Self::Unspecified,
3072                1 => Self::V1,
3073                2 => Self::V2,
3074                _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
3075                    wkt::internal::UnknownEnumValue::Integer(value),
3076                )),
3077            }
3078        }
3079    }
3080
3081    impl std::convert::From<&str> for EffectiveCgroupMode {
3082        fn from(value: &str) -> Self {
3083            use std::string::ToString;
3084            match value {
3085                "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
3086                "EFFECTIVE_CGROUP_MODE_V1" => Self::V1,
3087                "EFFECTIVE_CGROUP_MODE_V2" => Self::V2,
3088                _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
3089                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3090                )),
3091            }
3092        }
3093    }
3094
3095    impl serde::ser::Serialize for EffectiveCgroupMode {
3096        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3097        where
3098            S: serde::Serializer,
3099        {
3100            match self {
3101                Self::Unspecified => serializer.serialize_i32(0),
3102                Self::V1 => serializer.serialize_i32(1),
3103                Self::V2 => serializer.serialize_i32(2),
3104                Self::UnknownValue(u) => u.0.serialize(serializer),
3105            }
3106        }
3107    }
3108
3109    impl<'de> serde::de::Deserialize<'de> for EffectiveCgroupMode {
3110        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3111        where
3112            D: serde::Deserializer<'de>,
3113        {
3114            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EffectiveCgroupMode>::new(
3115                ".google.container.v1.NodeConfig.EffectiveCgroupMode",
3116            ))
3117        }
3118    }
3119}
3120
3121/// Specifies options for controlling advanced machine features.
3122#[derive(Clone, Default, PartialEq)]
3123#[non_exhaustive]
3124pub struct AdvancedMachineFeatures {
3125    /// The number of threads per physical core. To disable simultaneous
3126    /// multithreading (SMT) set this to 1. If unset, the maximum number of threads
3127    /// supported per core by the underlying processor is assumed.
3128    pub threads_per_core: std::option::Option<i64>,
3129
3130    /// Whether or not to enable nested virtualization (defaults to false).
3131    pub enable_nested_virtualization: std::option::Option<bool>,
3132
3133    /// Type of Performance Monitoring Unit (PMU) requested on node pool instances.
3134    /// If unset, PMU will not be available to the node.
3135    pub performance_monitoring_unit:
3136        std::option::Option<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
3137
3138    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3139}
3140
3141impl AdvancedMachineFeatures {
3142    pub fn new() -> Self {
3143        std::default::Default::default()
3144    }
3145
3146    /// Sets the value of [threads_per_core][crate::model::AdvancedMachineFeatures::threads_per_core].
3147    pub fn set_threads_per_core<T>(mut self, v: T) -> Self
3148    where
3149        T: std::convert::Into<i64>,
3150    {
3151        self.threads_per_core = std::option::Option::Some(v.into());
3152        self
3153    }
3154
3155    /// Sets or clears the value of [threads_per_core][crate::model::AdvancedMachineFeatures::threads_per_core].
3156    pub fn set_or_clear_threads_per_core<T>(mut self, v: std::option::Option<T>) -> Self
3157    where
3158        T: std::convert::Into<i64>,
3159    {
3160        self.threads_per_core = v.map(|x| x.into());
3161        self
3162    }
3163
3164    /// Sets the value of [enable_nested_virtualization][crate::model::AdvancedMachineFeatures::enable_nested_virtualization].
3165    pub fn set_enable_nested_virtualization<T>(mut self, v: T) -> Self
3166    where
3167        T: std::convert::Into<bool>,
3168    {
3169        self.enable_nested_virtualization = std::option::Option::Some(v.into());
3170        self
3171    }
3172
3173    /// Sets or clears the value of [enable_nested_virtualization][crate::model::AdvancedMachineFeatures::enable_nested_virtualization].
3174    pub fn set_or_clear_enable_nested_virtualization<T>(mut self, v: std::option::Option<T>) -> Self
3175    where
3176        T: std::convert::Into<bool>,
3177    {
3178        self.enable_nested_virtualization = v.map(|x| x.into());
3179        self
3180    }
3181
3182    /// Sets the value of [performance_monitoring_unit][crate::model::AdvancedMachineFeatures::performance_monitoring_unit].
3183    pub fn set_performance_monitoring_unit<T>(mut self, v: T) -> Self
3184    where
3185        T: std::convert::Into<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
3186    {
3187        self.performance_monitoring_unit = std::option::Option::Some(v.into());
3188        self
3189    }
3190
3191    /// Sets or clears the value of [performance_monitoring_unit][crate::model::AdvancedMachineFeatures::performance_monitoring_unit].
3192    pub fn set_or_clear_performance_monitoring_unit<T>(mut self, v: std::option::Option<T>) -> Self
3193    where
3194        T: std::convert::Into<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
3195    {
3196        self.performance_monitoring_unit = v.map(|x| x.into());
3197        self
3198    }
3199}
3200
3201impl wkt::message::Message for AdvancedMachineFeatures {
3202    fn typename() -> &'static str {
3203        "type.googleapis.com/google.container.v1.AdvancedMachineFeatures"
3204    }
3205}
3206
3207/// Defines additional types related to [AdvancedMachineFeatures].
3208pub mod advanced_machine_features {
3209    #[allow(unused_imports)]
3210    use super::*;
3211
3212    /// Level of PMU access.
3213    ///
3214    /// # Working with unknown values
3215    ///
3216    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3217    /// additional enum variants at any time. Adding new variants is not considered
3218    /// a breaking change. Applications should write their code in anticipation of:
3219    ///
3220    /// - New values appearing in future releases of the client library, **and**
3221    /// - New values received dynamically, without application changes.
3222    ///
3223    /// Please consult the [Working with enums] section in the user guide for some
3224    /// guidelines.
3225    ///
3226    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3227    #[derive(Clone, Debug, PartialEq)]
3228    #[non_exhaustive]
3229    pub enum PerformanceMonitoringUnit {
3230        /// PMU not enabled.
3231        Unspecified,
3232        /// Architecturally defined non-LLC events.
3233        Architectural,
3234        /// Most documented core/L2 events.
3235        Standard,
3236        /// Most documented core/L2 and LLC events.
3237        Enhanced,
3238        /// If set, the enum was initialized with an unknown value.
3239        ///
3240        /// Applications can examine the value using [PerformanceMonitoringUnit::value] or
3241        /// [PerformanceMonitoringUnit::name].
3242        UnknownValue(performance_monitoring_unit::UnknownValue),
3243    }
3244
3245    #[doc(hidden)]
3246    pub mod performance_monitoring_unit {
3247        #[allow(unused_imports)]
3248        use super::*;
3249        #[derive(Clone, Debug, PartialEq)]
3250        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3251    }
3252
3253    impl PerformanceMonitoringUnit {
3254        /// Gets the enum value.
3255        ///
3256        /// Returns `None` if the enum contains an unknown value deserialized from
3257        /// the string representation of enums.
3258        pub fn value(&self) -> std::option::Option<i32> {
3259            match self {
3260                Self::Unspecified => std::option::Option::Some(0),
3261                Self::Architectural => std::option::Option::Some(1),
3262                Self::Standard => std::option::Option::Some(2),
3263                Self::Enhanced => std::option::Option::Some(3),
3264                Self::UnknownValue(u) => u.0.value(),
3265            }
3266        }
3267
3268        /// Gets the enum value as a string.
3269        ///
3270        /// Returns `None` if the enum contains an unknown value deserialized from
3271        /// the integer representation of enums.
3272        pub fn name(&self) -> std::option::Option<&str> {
3273            match self {
3274                Self::Unspecified => {
3275                    std::option::Option::Some("PERFORMANCE_MONITORING_UNIT_UNSPECIFIED")
3276                }
3277                Self::Architectural => std::option::Option::Some("ARCHITECTURAL"),
3278                Self::Standard => std::option::Option::Some("STANDARD"),
3279                Self::Enhanced => std::option::Option::Some("ENHANCED"),
3280                Self::UnknownValue(u) => u.0.name(),
3281            }
3282        }
3283    }
3284
3285    impl std::default::Default for PerformanceMonitoringUnit {
3286        fn default() -> Self {
3287            use std::convert::From;
3288            Self::from(0)
3289        }
3290    }
3291
3292    impl std::fmt::Display for PerformanceMonitoringUnit {
3293        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3294            wkt::internal::display_enum(f, self.name(), self.value())
3295        }
3296    }
3297
3298    impl std::convert::From<i32> for PerformanceMonitoringUnit {
3299        fn from(value: i32) -> Self {
3300            match value {
3301                0 => Self::Unspecified,
3302                1 => Self::Architectural,
3303                2 => Self::Standard,
3304                3 => Self::Enhanced,
3305                _ => Self::UnknownValue(performance_monitoring_unit::UnknownValue(
3306                    wkt::internal::UnknownEnumValue::Integer(value),
3307                )),
3308            }
3309        }
3310    }
3311
3312    impl std::convert::From<&str> for PerformanceMonitoringUnit {
3313        fn from(value: &str) -> Self {
3314            use std::string::ToString;
3315            match value {
3316                "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED" => Self::Unspecified,
3317                "ARCHITECTURAL" => Self::Architectural,
3318                "STANDARD" => Self::Standard,
3319                "ENHANCED" => Self::Enhanced,
3320                _ => Self::UnknownValue(performance_monitoring_unit::UnknownValue(
3321                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3322                )),
3323            }
3324        }
3325    }
3326
3327    impl serde::ser::Serialize for PerformanceMonitoringUnit {
3328        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3329        where
3330            S: serde::Serializer,
3331        {
3332            match self {
3333                Self::Unspecified => serializer.serialize_i32(0),
3334                Self::Architectural => serializer.serialize_i32(1),
3335                Self::Standard => serializer.serialize_i32(2),
3336                Self::Enhanced => serializer.serialize_i32(3),
3337                Self::UnknownValue(u) => u.0.serialize(serializer),
3338            }
3339        }
3340    }
3341
3342    impl<'de> serde::de::Deserialize<'de> for PerformanceMonitoringUnit {
3343        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3344        where
3345            D: serde::Deserializer<'de>,
3346        {
3347            deserializer.deserialize_any(
3348                wkt::internal::EnumVisitor::<PerformanceMonitoringUnit>::new(
3349                    ".google.container.v1.AdvancedMachineFeatures.PerformanceMonitoringUnit",
3350                ),
3351            )
3352        }
3353    }
3354}
3355
3356/// Parameters for node pool-level network config.
3357#[derive(Clone, Default, PartialEq)]
3358#[non_exhaustive]
3359pub struct NodeNetworkConfig {
3360    /// Input only. Whether to create a new range for pod IPs in this node pool.
3361    /// Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they
3362    /// are not specified.
3363    ///
3364    /// If neither `create_pod_range` or `pod_range` are specified, the
3365    /// cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is
3366    /// used.
3367    ///
3368    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
3369    ///
3370    /// This field cannot be changed after the node pool has been created.
3371    pub create_pod_range: bool,
3372
3373    /// The ID of the secondary range for pod IPs.
3374    /// If `create_pod_range` is true, this ID is used for the new range.
3375    /// If `create_pod_range` is false, uses an existing secondary range with this
3376    /// ID.
3377    ///
3378    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
3379    ///
3380    /// This field cannot be changed after the node pool has been created.
3381    pub pod_range: std::string::String,
3382
3383    /// The IP address range for pod IPs in this node pool.
3384    ///
3385    /// Only applicable if `create_pod_range` is true.
3386    ///
3387    /// Set to blank to have a range chosen with the default size.
3388    ///
3389    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
3390    /// netmask.
3391    ///
3392    /// Set to a
3393    /// [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
3394    /// notation (e.g. `10.96.0.0/14`) to pick a specific range to use.
3395    ///
3396    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
3397    ///
3398    /// This field cannot be changed after the node pool has been created.
3399    pub pod_ipv4_cidr_block: std::string::String,
3400
3401    /// Whether nodes have internal IP addresses only.
3402    /// If enable_private_nodes is not specified, then the value is derived from
3403    /// [Cluster.NetworkConfig.default_enable_private_nodes][]
3404    pub enable_private_nodes: std::option::Option<bool>,
3405
3406    /// Network bandwidth tier configuration.
3407    pub network_performance_config:
3408        std::option::Option<crate::model::node_network_config::NetworkPerformanceConfig>,
3409
3410    /// [PRIVATE FIELD]
3411    /// Pod CIDR size overprovisioning config for the nodepool.
3412    ///
3413    /// Pod CIDR size per node depends on max_pods_per_node. By default, the value
3414    /// of max_pods_per_node is rounded off to next power of 2 and we then double
3415    /// that to get the size of pod CIDR block per node.
3416    /// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
3417    ///
3418    /// This config can disable the doubling of IPs (we still round off to next
3419    /// power of 2)
3420    /// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
3421    /// overprovisioning is disabled.
3422    pub pod_cidr_overprovision_config:
3423        std::option::Option<crate::model::PodCIDROverprovisionConfig>,
3424
3425    /// We specify the additional node networks for this node pool using this list.
3426    /// Each node network corresponds to an additional interface
3427    pub additional_node_network_configs: std::vec::Vec<crate::model::AdditionalNodeNetworkConfig>,
3428
3429    /// We specify the additional pod networks for this node pool using this list.
3430    /// Each pod network corresponds to an additional alias IP range for the node
3431    pub additional_pod_network_configs: std::vec::Vec<crate::model::AdditionalPodNetworkConfig>,
3432
3433    /// Output only. The utilization of the IPv4 range for the pod.
3434    /// The ratio is Usage/[Total number of IPs in the secondary range],
3435    /// Usage=numNodes*numZones*podIPsPerNode.
3436    pub pod_ipv4_range_utilization: f64,
3437
3438    /// Output only. The subnetwork path for the node pool.
3439    /// Format: projects/{project}/regions/{region}/subnetworks/{subnetwork}
3440    /// If the cluster is associated with multiple subnetworks, the subnetwork for
3441    /// the node pool is picked based on the IP utilization during node pool
3442    /// creation and is immutable.
3443    pub subnetwork: std::string::String,
3444
3445    /// Output only. The network tier configuration for the node pool inherits from
3446    /// the cluster-level configuration and remains immutable throughout the node
3447    /// pool's lifecycle, including during upgrades.
3448    pub network_tier_config: std::option::Option<crate::model::NetworkTierConfig>,
3449
3450    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3451}
3452
3453impl NodeNetworkConfig {
3454    pub fn new() -> Self {
3455        std::default::Default::default()
3456    }
3457
3458    /// Sets the value of [create_pod_range][crate::model::NodeNetworkConfig::create_pod_range].
3459    pub fn set_create_pod_range<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3460        self.create_pod_range = v.into();
3461        self
3462    }
3463
3464    /// Sets the value of [pod_range][crate::model::NodeNetworkConfig::pod_range].
3465    pub fn set_pod_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3466        self.pod_range = v.into();
3467        self
3468    }
3469
3470    /// Sets the value of [pod_ipv4_cidr_block][crate::model::NodeNetworkConfig::pod_ipv4_cidr_block].
3471    pub fn set_pod_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
3472        mut self,
3473        v: T,
3474    ) -> Self {
3475        self.pod_ipv4_cidr_block = v.into();
3476        self
3477    }
3478
3479    /// Sets the value of [enable_private_nodes][crate::model::NodeNetworkConfig::enable_private_nodes].
3480    pub fn set_enable_private_nodes<T>(mut self, v: T) -> Self
3481    where
3482        T: std::convert::Into<bool>,
3483    {
3484        self.enable_private_nodes = std::option::Option::Some(v.into());
3485        self
3486    }
3487
3488    /// Sets or clears the value of [enable_private_nodes][crate::model::NodeNetworkConfig::enable_private_nodes].
3489    pub fn set_or_clear_enable_private_nodes<T>(mut self, v: std::option::Option<T>) -> Self
3490    where
3491        T: std::convert::Into<bool>,
3492    {
3493        self.enable_private_nodes = v.map(|x| x.into());
3494        self
3495    }
3496
3497    /// Sets the value of [network_performance_config][crate::model::NodeNetworkConfig::network_performance_config].
3498    pub fn set_network_performance_config<T>(mut self, v: T) -> Self
3499    where
3500        T: std::convert::Into<crate::model::node_network_config::NetworkPerformanceConfig>,
3501    {
3502        self.network_performance_config = std::option::Option::Some(v.into());
3503        self
3504    }
3505
3506    /// Sets or clears the value of [network_performance_config][crate::model::NodeNetworkConfig::network_performance_config].
3507    pub fn set_or_clear_network_performance_config<T>(mut self, v: std::option::Option<T>) -> Self
3508    where
3509        T: std::convert::Into<crate::model::node_network_config::NetworkPerformanceConfig>,
3510    {
3511        self.network_performance_config = v.map(|x| x.into());
3512        self
3513    }
3514
3515    /// Sets the value of [pod_cidr_overprovision_config][crate::model::NodeNetworkConfig::pod_cidr_overprovision_config].
3516    pub fn set_pod_cidr_overprovision_config<T>(mut self, v: T) -> Self
3517    where
3518        T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
3519    {
3520        self.pod_cidr_overprovision_config = std::option::Option::Some(v.into());
3521        self
3522    }
3523
3524    /// Sets or clears the value of [pod_cidr_overprovision_config][crate::model::NodeNetworkConfig::pod_cidr_overprovision_config].
3525    pub fn set_or_clear_pod_cidr_overprovision_config<T>(
3526        mut self,
3527        v: std::option::Option<T>,
3528    ) -> Self
3529    where
3530        T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
3531    {
3532        self.pod_cidr_overprovision_config = v.map(|x| x.into());
3533        self
3534    }
3535
3536    /// Sets the value of [additional_node_network_configs][crate::model::NodeNetworkConfig::additional_node_network_configs].
3537    pub fn set_additional_node_network_configs<T, V>(mut self, v: T) -> Self
3538    where
3539        T: std::iter::IntoIterator<Item = V>,
3540        V: std::convert::Into<crate::model::AdditionalNodeNetworkConfig>,
3541    {
3542        use std::iter::Iterator;
3543        self.additional_node_network_configs = v.into_iter().map(|i| i.into()).collect();
3544        self
3545    }
3546
3547    /// Sets the value of [additional_pod_network_configs][crate::model::NodeNetworkConfig::additional_pod_network_configs].
3548    pub fn set_additional_pod_network_configs<T, V>(mut self, v: T) -> Self
3549    where
3550        T: std::iter::IntoIterator<Item = V>,
3551        V: std::convert::Into<crate::model::AdditionalPodNetworkConfig>,
3552    {
3553        use std::iter::Iterator;
3554        self.additional_pod_network_configs = v.into_iter().map(|i| i.into()).collect();
3555        self
3556    }
3557
3558    /// Sets the value of [pod_ipv4_range_utilization][crate::model::NodeNetworkConfig::pod_ipv4_range_utilization].
3559    pub fn set_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3560        self.pod_ipv4_range_utilization = v.into();
3561        self
3562    }
3563
3564    /// Sets the value of [subnetwork][crate::model::NodeNetworkConfig::subnetwork].
3565    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3566        self.subnetwork = v.into();
3567        self
3568    }
3569
3570    /// Sets the value of [network_tier_config][crate::model::NodeNetworkConfig::network_tier_config].
3571    pub fn set_network_tier_config<T>(mut self, v: T) -> Self
3572    where
3573        T: std::convert::Into<crate::model::NetworkTierConfig>,
3574    {
3575        self.network_tier_config = std::option::Option::Some(v.into());
3576        self
3577    }
3578
3579    /// Sets or clears the value of [network_tier_config][crate::model::NodeNetworkConfig::network_tier_config].
3580    pub fn set_or_clear_network_tier_config<T>(mut self, v: std::option::Option<T>) -> Self
3581    where
3582        T: std::convert::Into<crate::model::NetworkTierConfig>,
3583    {
3584        self.network_tier_config = v.map(|x| x.into());
3585        self
3586    }
3587}
3588
3589impl wkt::message::Message for NodeNetworkConfig {
3590    fn typename() -> &'static str {
3591        "type.googleapis.com/google.container.v1.NodeNetworkConfig"
3592    }
3593}
3594
3595/// Defines additional types related to [NodeNetworkConfig].
3596pub mod node_network_config {
3597    #[allow(unused_imports)]
3598    use super::*;
3599
3600    /// Configuration of all network bandwidth tiers
3601    #[derive(Clone, Default, PartialEq)]
3602    #[non_exhaustive]
3603    pub struct NetworkPerformanceConfig {
3604        /// Specifies the total network bandwidth tier for the NodePool.
3605        pub total_egress_bandwidth_tier: std::option::Option<
3606            crate::model::node_network_config::network_performance_config::Tier,
3607        >,
3608
3609        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3610    }
3611
3612    impl NetworkPerformanceConfig {
3613        pub fn new() -> Self {
3614            std::default::Default::default()
3615        }
3616
3617        /// Sets the value of [total_egress_bandwidth_tier][crate::model::node_network_config::NetworkPerformanceConfig::total_egress_bandwidth_tier].
3618        pub fn set_total_egress_bandwidth_tier<T>(mut self, v: T) -> Self
3619        where
3620            T: std::convert::Into<
3621                    crate::model::node_network_config::network_performance_config::Tier,
3622                >,
3623        {
3624            self.total_egress_bandwidth_tier = std::option::Option::Some(v.into());
3625            self
3626        }
3627
3628        /// Sets or clears the value of [total_egress_bandwidth_tier][crate::model::node_network_config::NetworkPerformanceConfig::total_egress_bandwidth_tier].
3629        pub fn set_or_clear_total_egress_bandwidth_tier<T>(
3630            mut self,
3631            v: std::option::Option<T>,
3632        ) -> Self
3633        where
3634            T: std::convert::Into<
3635                    crate::model::node_network_config::network_performance_config::Tier,
3636                >,
3637        {
3638            self.total_egress_bandwidth_tier = v.map(|x| x.into());
3639            self
3640        }
3641    }
3642
3643    impl wkt::message::Message for NetworkPerformanceConfig {
3644        fn typename() -> &'static str {
3645            "type.googleapis.com/google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig"
3646        }
3647    }
3648
3649    /// Defines additional types related to [NetworkPerformanceConfig].
3650    pub mod network_performance_config {
3651        #[allow(unused_imports)]
3652        use super::*;
3653
3654        /// Node network tier
3655        ///
3656        /// # Working with unknown values
3657        ///
3658        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3659        /// additional enum variants at any time. Adding new variants is not considered
3660        /// a breaking change. Applications should write their code in anticipation of:
3661        ///
3662        /// - New values appearing in future releases of the client library, **and**
3663        /// - New values received dynamically, without application changes.
3664        ///
3665        /// Please consult the [Working with enums] section in the user guide for some
3666        /// guidelines.
3667        ///
3668        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3669        #[derive(Clone, Debug, PartialEq)]
3670        #[non_exhaustive]
3671        pub enum Tier {
3672            /// Default value
3673            Unspecified,
3674            /// Higher bandwidth, actual values based on VM size.
3675            Tier1,
3676            /// If set, the enum was initialized with an unknown value.
3677            ///
3678            /// Applications can examine the value using [Tier::value] or
3679            /// [Tier::name].
3680            UnknownValue(tier::UnknownValue),
3681        }
3682
3683        #[doc(hidden)]
3684        pub mod tier {
3685            #[allow(unused_imports)]
3686            use super::*;
3687            #[derive(Clone, Debug, PartialEq)]
3688            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3689        }
3690
3691        impl Tier {
3692            /// Gets the enum value.
3693            ///
3694            /// Returns `None` if the enum contains an unknown value deserialized from
3695            /// the string representation of enums.
3696            pub fn value(&self) -> std::option::Option<i32> {
3697                match self {
3698                    Self::Unspecified => std::option::Option::Some(0),
3699                    Self::Tier1 => std::option::Option::Some(1),
3700                    Self::UnknownValue(u) => u.0.value(),
3701                }
3702            }
3703
3704            /// Gets the enum value as a string.
3705            ///
3706            /// Returns `None` if the enum contains an unknown value deserialized from
3707            /// the integer representation of enums.
3708            pub fn name(&self) -> std::option::Option<&str> {
3709                match self {
3710                    Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
3711                    Self::Tier1 => std::option::Option::Some("TIER_1"),
3712                    Self::UnknownValue(u) => u.0.name(),
3713                }
3714            }
3715        }
3716
3717        impl std::default::Default for Tier {
3718            fn default() -> Self {
3719                use std::convert::From;
3720                Self::from(0)
3721            }
3722        }
3723
3724        impl std::fmt::Display for Tier {
3725            fn fmt(
3726                &self,
3727                f: &mut std::fmt::Formatter<'_>,
3728            ) -> std::result::Result<(), std::fmt::Error> {
3729                wkt::internal::display_enum(f, self.name(), self.value())
3730            }
3731        }
3732
3733        impl std::convert::From<i32> for Tier {
3734            fn from(value: i32) -> Self {
3735                match value {
3736                    0 => Self::Unspecified,
3737                    1 => Self::Tier1,
3738                    _ => Self::UnknownValue(tier::UnknownValue(
3739                        wkt::internal::UnknownEnumValue::Integer(value),
3740                    )),
3741                }
3742            }
3743        }
3744
3745        impl std::convert::From<&str> for Tier {
3746            fn from(value: &str) -> Self {
3747                use std::string::ToString;
3748                match value {
3749                    "TIER_UNSPECIFIED" => Self::Unspecified,
3750                    "TIER_1" => Self::Tier1,
3751                    _ => Self::UnknownValue(tier::UnknownValue(
3752                        wkt::internal::UnknownEnumValue::String(value.to_string()),
3753                    )),
3754                }
3755            }
3756        }
3757
3758        impl serde::ser::Serialize for Tier {
3759            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3760            where
3761                S: serde::Serializer,
3762            {
3763                match self {
3764                    Self::Unspecified => serializer.serialize_i32(0),
3765                    Self::Tier1 => serializer.serialize_i32(1),
3766                    Self::UnknownValue(u) => u.0.serialize(serializer),
3767                }
3768            }
3769        }
3770
3771        impl<'de> serde::de::Deserialize<'de> for Tier {
3772            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3773            where
3774                D: serde::Deserializer<'de>,
3775            {
3776                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
3777                    ".google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier",
3778                ))
3779            }
3780        }
3781    }
3782}
3783
3784/// AdditionalNodeNetworkConfig is the configuration for additional node networks
3785/// within the NodeNetworkConfig message
3786#[derive(Clone, Default, PartialEq)]
3787#[non_exhaustive]
3788pub struct AdditionalNodeNetworkConfig {
3789    /// Name of the VPC where the additional interface belongs
3790    pub network: std::string::String,
3791
3792    /// Name of the subnetwork where the additional interface belongs
3793    pub subnetwork: std::string::String,
3794
3795    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3796}
3797
3798impl AdditionalNodeNetworkConfig {
3799    pub fn new() -> Self {
3800        std::default::Default::default()
3801    }
3802
3803    /// Sets the value of [network][crate::model::AdditionalNodeNetworkConfig::network].
3804    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3805        self.network = v.into();
3806        self
3807    }
3808
3809    /// Sets the value of [subnetwork][crate::model::AdditionalNodeNetworkConfig::subnetwork].
3810    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3811        self.subnetwork = v.into();
3812        self
3813    }
3814}
3815
3816impl wkt::message::Message for AdditionalNodeNetworkConfig {
3817    fn typename() -> &'static str {
3818        "type.googleapis.com/google.container.v1.AdditionalNodeNetworkConfig"
3819    }
3820}
3821
3822/// AdditionalPodNetworkConfig is the configuration for additional pod networks
3823/// within the NodeNetworkConfig message
3824#[derive(Clone, Default, PartialEq)]
3825#[non_exhaustive]
3826pub struct AdditionalPodNetworkConfig {
3827    /// Name of the subnetwork where the additional pod network belongs.
3828    pub subnetwork: std::string::String,
3829
3830    /// The name of the secondary range on the subnet which provides IP address for
3831    /// this pod range.
3832    pub secondary_pod_range: std::string::String,
3833
3834    /// The maximum number of pods per node which use this pod network.
3835    pub max_pods_per_node: std::option::Option<crate::model::MaxPodsConstraint>,
3836
3837    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3838}
3839
3840impl AdditionalPodNetworkConfig {
3841    pub fn new() -> Self {
3842        std::default::Default::default()
3843    }
3844
3845    /// Sets the value of [subnetwork][crate::model::AdditionalPodNetworkConfig::subnetwork].
3846    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3847        self.subnetwork = v.into();
3848        self
3849    }
3850
3851    /// Sets the value of [secondary_pod_range][crate::model::AdditionalPodNetworkConfig::secondary_pod_range].
3852    pub fn set_secondary_pod_range<T: std::convert::Into<std::string::String>>(
3853        mut self,
3854        v: T,
3855    ) -> Self {
3856        self.secondary_pod_range = v.into();
3857        self
3858    }
3859
3860    /// Sets the value of [max_pods_per_node][crate::model::AdditionalPodNetworkConfig::max_pods_per_node].
3861    pub fn set_max_pods_per_node<T>(mut self, v: T) -> Self
3862    where
3863        T: std::convert::Into<crate::model::MaxPodsConstraint>,
3864    {
3865        self.max_pods_per_node = std::option::Option::Some(v.into());
3866        self
3867    }
3868
3869    /// Sets or clears the value of [max_pods_per_node][crate::model::AdditionalPodNetworkConfig::max_pods_per_node].
3870    pub fn set_or_clear_max_pods_per_node<T>(mut self, v: std::option::Option<T>) -> Self
3871    where
3872        T: std::convert::Into<crate::model::MaxPodsConstraint>,
3873    {
3874        self.max_pods_per_node = v.map(|x| x.into());
3875        self
3876    }
3877}
3878
3879impl wkt::message::Message for AdditionalPodNetworkConfig {
3880    fn typename() -> &'static str {
3881        "type.googleapis.com/google.container.v1.AdditionalPodNetworkConfig"
3882    }
3883}
3884
3885/// A set of Shielded Instance options.
3886#[derive(Clone, Default, PartialEq)]
3887#[non_exhaustive]
3888pub struct ShieldedInstanceConfig {
3889    /// Defines whether the instance has Secure Boot enabled.
3890    ///
3891    /// Secure Boot helps ensure that the system only runs authentic software by
3892    /// verifying the digital signature of all boot components, and halting the
3893    /// boot process if signature verification fails.
3894    pub enable_secure_boot: bool,
3895
3896    /// Defines whether the instance has integrity monitoring enabled.
3897    ///
3898    /// Enables monitoring and attestation of the boot integrity of the instance.
3899    /// The attestation is performed against the integrity policy baseline. This
3900    /// baseline is initially derived from the implicitly trusted boot image when
3901    /// the instance is created.
3902    pub enable_integrity_monitoring: bool,
3903
3904    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3905}
3906
3907impl ShieldedInstanceConfig {
3908    pub fn new() -> Self {
3909        std::default::Default::default()
3910    }
3911
3912    /// Sets the value of [enable_secure_boot][crate::model::ShieldedInstanceConfig::enable_secure_boot].
3913    pub fn set_enable_secure_boot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3914        self.enable_secure_boot = v.into();
3915        self
3916    }
3917
3918    /// Sets the value of [enable_integrity_monitoring][crate::model::ShieldedInstanceConfig::enable_integrity_monitoring].
3919    pub fn set_enable_integrity_monitoring<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3920        self.enable_integrity_monitoring = v.into();
3921        self
3922    }
3923}
3924
3925impl wkt::message::Message for ShieldedInstanceConfig {
3926    fn typename() -> &'static str {
3927        "type.googleapis.com/google.container.v1.ShieldedInstanceConfig"
3928    }
3929}
3930
3931/// SandboxConfig contains configurations of the sandbox to use for the node.
3932#[derive(Clone, Default, PartialEq)]
3933#[non_exhaustive]
3934pub struct SandboxConfig {
3935    /// Type of the sandbox to use for the node.
3936    pub r#type: crate::model::sandbox_config::Type,
3937
3938    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3939}
3940
3941impl SandboxConfig {
3942    pub fn new() -> Self {
3943        std::default::Default::default()
3944    }
3945
3946    /// Sets the value of [r#type][crate::model::SandboxConfig::type].
3947    pub fn set_type<T: std::convert::Into<crate::model::sandbox_config::Type>>(
3948        mut self,
3949        v: T,
3950    ) -> Self {
3951        self.r#type = v.into();
3952        self
3953    }
3954}
3955
3956impl wkt::message::Message for SandboxConfig {
3957    fn typename() -> &'static str {
3958        "type.googleapis.com/google.container.v1.SandboxConfig"
3959    }
3960}
3961
3962/// Defines additional types related to [SandboxConfig].
3963pub mod sandbox_config {
3964    #[allow(unused_imports)]
3965    use super::*;
3966
3967    /// Possible types of sandboxes.
3968    ///
3969    /// # Working with unknown values
3970    ///
3971    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3972    /// additional enum variants at any time. Adding new variants is not considered
3973    /// a breaking change. Applications should write their code in anticipation of:
3974    ///
3975    /// - New values appearing in future releases of the client library, **and**
3976    /// - New values received dynamically, without application changes.
3977    ///
3978    /// Please consult the [Working with enums] section in the user guide for some
3979    /// guidelines.
3980    ///
3981    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3982    #[derive(Clone, Debug, PartialEq)]
3983    #[non_exhaustive]
3984    pub enum Type {
3985        /// Default value. This should not be used.
3986        Unspecified,
3987        /// Run sandbox using gvisor.
3988        Gvisor,
3989        /// If set, the enum was initialized with an unknown value.
3990        ///
3991        /// Applications can examine the value using [Type::value] or
3992        /// [Type::name].
3993        UnknownValue(r#type::UnknownValue),
3994    }
3995
3996    #[doc(hidden)]
3997    pub mod r#type {
3998        #[allow(unused_imports)]
3999        use super::*;
4000        #[derive(Clone, Debug, PartialEq)]
4001        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4002    }
4003
4004    impl Type {
4005        /// Gets the enum value.
4006        ///
4007        /// Returns `None` if the enum contains an unknown value deserialized from
4008        /// the string representation of enums.
4009        pub fn value(&self) -> std::option::Option<i32> {
4010            match self {
4011                Self::Unspecified => std::option::Option::Some(0),
4012                Self::Gvisor => std::option::Option::Some(1),
4013                Self::UnknownValue(u) => u.0.value(),
4014            }
4015        }
4016
4017        /// Gets the enum value as a string.
4018        ///
4019        /// Returns `None` if the enum contains an unknown value deserialized from
4020        /// the integer representation of enums.
4021        pub fn name(&self) -> std::option::Option<&str> {
4022            match self {
4023                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
4024                Self::Gvisor => std::option::Option::Some("GVISOR"),
4025                Self::UnknownValue(u) => u.0.name(),
4026            }
4027        }
4028    }
4029
4030    impl std::default::Default for Type {
4031        fn default() -> Self {
4032            use std::convert::From;
4033            Self::from(0)
4034        }
4035    }
4036
4037    impl std::fmt::Display for Type {
4038        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4039            wkt::internal::display_enum(f, self.name(), self.value())
4040        }
4041    }
4042
4043    impl std::convert::From<i32> for Type {
4044        fn from(value: i32) -> Self {
4045            match value {
4046                0 => Self::Unspecified,
4047                1 => Self::Gvisor,
4048                _ => Self::UnknownValue(r#type::UnknownValue(
4049                    wkt::internal::UnknownEnumValue::Integer(value),
4050                )),
4051            }
4052        }
4053    }
4054
4055    impl std::convert::From<&str> for Type {
4056        fn from(value: &str) -> Self {
4057            use std::string::ToString;
4058            match value {
4059                "UNSPECIFIED" => Self::Unspecified,
4060                "GVISOR" => Self::Gvisor,
4061                _ => Self::UnknownValue(r#type::UnknownValue(
4062                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4063                )),
4064            }
4065        }
4066    }
4067
4068    impl serde::ser::Serialize for Type {
4069        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4070        where
4071            S: serde::Serializer,
4072        {
4073            match self {
4074                Self::Unspecified => serializer.serialize_i32(0),
4075                Self::Gvisor => serializer.serialize_i32(1),
4076                Self::UnknownValue(u) => u.0.serialize(serializer),
4077            }
4078        }
4079    }
4080
4081    impl<'de> serde::de::Deserialize<'de> for Type {
4082        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4083        where
4084            D: serde::Deserializer<'de>,
4085        {
4086            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
4087                ".google.container.v1.SandboxConfig.Type",
4088            ))
4089        }
4090    }
4091}
4092
4093/// GcfsConfig contains configurations of Google Container File System
4094/// (image streaming).
4095#[derive(Clone, Default, PartialEq)]
4096#[non_exhaustive]
4097pub struct GcfsConfig {
4098    /// Whether to use GCFS.
4099    pub enabled: bool,
4100
4101    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4102}
4103
4104impl GcfsConfig {
4105    pub fn new() -> Self {
4106        std::default::Default::default()
4107    }
4108
4109    /// Sets the value of [enabled][crate::model::GcfsConfig::enabled].
4110    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4111        self.enabled = v.into();
4112        self
4113    }
4114}
4115
4116impl wkt::message::Message for GcfsConfig {
4117    fn typename() -> &'static str {
4118        "type.googleapis.com/google.container.v1.GcfsConfig"
4119    }
4120}
4121
4122/// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
4123/// is the configuration of desired reservation which instances could take
4124/// capacity from.
4125#[derive(Clone, Default, PartialEq)]
4126#[non_exhaustive]
4127pub struct ReservationAffinity {
4128    /// Corresponds to the type of reservation consumption.
4129    pub consume_reservation_type: crate::model::reservation_affinity::Type,
4130
4131    /// Corresponds to the label key of a reservation resource. To target a
4132    /// SPECIFIC_RESERVATION by name, specify
4133    /// "compute.googleapis.com/reservation-name" as the key and specify the name
4134    /// of your reservation as its value.
4135    pub key: std::string::String,
4136
4137    /// Corresponds to the label value(s) of reservation resource(s).
4138    pub values: std::vec::Vec<std::string::String>,
4139
4140    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4141}
4142
4143impl ReservationAffinity {
4144    pub fn new() -> Self {
4145        std::default::Default::default()
4146    }
4147
4148    /// Sets the value of [consume_reservation_type][crate::model::ReservationAffinity::consume_reservation_type].
4149    pub fn set_consume_reservation_type<
4150        T: std::convert::Into<crate::model::reservation_affinity::Type>,
4151    >(
4152        mut self,
4153        v: T,
4154    ) -> Self {
4155        self.consume_reservation_type = v.into();
4156        self
4157    }
4158
4159    /// Sets the value of [key][crate::model::ReservationAffinity::key].
4160    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4161        self.key = v.into();
4162        self
4163    }
4164
4165    /// Sets the value of [values][crate::model::ReservationAffinity::values].
4166    pub fn set_values<T, V>(mut self, v: T) -> Self
4167    where
4168        T: std::iter::IntoIterator<Item = V>,
4169        V: std::convert::Into<std::string::String>,
4170    {
4171        use std::iter::Iterator;
4172        self.values = v.into_iter().map(|i| i.into()).collect();
4173        self
4174    }
4175}
4176
4177impl wkt::message::Message for ReservationAffinity {
4178    fn typename() -> &'static str {
4179        "type.googleapis.com/google.container.v1.ReservationAffinity"
4180    }
4181}
4182
4183/// Defines additional types related to [ReservationAffinity].
4184pub mod reservation_affinity {
4185    #[allow(unused_imports)]
4186    use super::*;
4187
4188    /// Indicates whether to consume capacity from a reservation or not.
4189    ///
4190    /// # Working with unknown values
4191    ///
4192    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4193    /// additional enum variants at any time. Adding new variants is not considered
4194    /// a breaking change. Applications should write their code in anticipation of:
4195    ///
4196    /// - New values appearing in future releases of the client library, **and**
4197    /// - New values received dynamically, without application changes.
4198    ///
4199    /// Please consult the [Working with enums] section in the user guide for some
4200    /// guidelines.
4201    ///
4202    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4203    #[derive(Clone, Debug, PartialEq)]
4204    #[non_exhaustive]
4205    pub enum Type {
4206        /// Default value. This should not be used.
4207        Unspecified,
4208        /// Do not consume from any reserved capacity.
4209        NoReservation,
4210        /// Consume any reservation available.
4211        AnyReservation,
4212        /// Must consume from a specific reservation. Must specify key value fields
4213        /// for specifying the reservations.
4214        SpecificReservation,
4215        /// If set, the enum was initialized with an unknown value.
4216        ///
4217        /// Applications can examine the value using [Type::value] or
4218        /// [Type::name].
4219        UnknownValue(r#type::UnknownValue),
4220    }
4221
4222    #[doc(hidden)]
4223    pub mod r#type {
4224        #[allow(unused_imports)]
4225        use super::*;
4226        #[derive(Clone, Debug, PartialEq)]
4227        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4228    }
4229
4230    impl Type {
4231        /// Gets the enum value.
4232        ///
4233        /// Returns `None` if the enum contains an unknown value deserialized from
4234        /// the string representation of enums.
4235        pub fn value(&self) -> std::option::Option<i32> {
4236            match self {
4237                Self::Unspecified => std::option::Option::Some(0),
4238                Self::NoReservation => std::option::Option::Some(1),
4239                Self::AnyReservation => std::option::Option::Some(2),
4240                Self::SpecificReservation => std::option::Option::Some(3),
4241                Self::UnknownValue(u) => u.0.value(),
4242            }
4243        }
4244
4245        /// Gets the enum value as a string.
4246        ///
4247        /// Returns `None` if the enum contains an unknown value deserialized from
4248        /// the integer representation of enums.
4249        pub fn name(&self) -> std::option::Option<&str> {
4250            match self {
4251                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
4252                Self::NoReservation => std::option::Option::Some("NO_RESERVATION"),
4253                Self::AnyReservation => std::option::Option::Some("ANY_RESERVATION"),
4254                Self::SpecificReservation => std::option::Option::Some("SPECIFIC_RESERVATION"),
4255                Self::UnknownValue(u) => u.0.name(),
4256            }
4257        }
4258    }
4259
4260    impl std::default::Default for Type {
4261        fn default() -> Self {
4262            use std::convert::From;
4263            Self::from(0)
4264        }
4265    }
4266
4267    impl std::fmt::Display for Type {
4268        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4269            wkt::internal::display_enum(f, self.name(), self.value())
4270        }
4271    }
4272
4273    impl std::convert::From<i32> for Type {
4274        fn from(value: i32) -> Self {
4275            match value {
4276                0 => Self::Unspecified,
4277                1 => Self::NoReservation,
4278                2 => Self::AnyReservation,
4279                3 => Self::SpecificReservation,
4280                _ => Self::UnknownValue(r#type::UnknownValue(
4281                    wkt::internal::UnknownEnumValue::Integer(value),
4282                )),
4283            }
4284        }
4285    }
4286
4287    impl std::convert::From<&str> for Type {
4288        fn from(value: &str) -> Self {
4289            use std::string::ToString;
4290            match value {
4291                "UNSPECIFIED" => Self::Unspecified,
4292                "NO_RESERVATION" => Self::NoReservation,
4293                "ANY_RESERVATION" => Self::AnyReservation,
4294                "SPECIFIC_RESERVATION" => Self::SpecificReservation,
4295                _ => Self::UnknownValue(r#type::UnknownValue(
4296                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4297                )),
4298            }
4299        }
4300    }
4301
4302    impl serde::ser::Serialize for Type {
4303        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4304        where
4305            S: serde::Serializer,
4306        {
4307            match self {
4308                Self::Unspecified => serializer.serialize_i32(0),
4309                Self::NoReservation => serializer.serialize_i32(1),
4310                Self::AnyReservation => serializer.serialize_i32(2),
4311                Self::SpecificReservation => serializer.serialize_i32(3),
4312                Self::UnknownValue(u) => u.0.serialize(serializer),
4313            }
4314        }
4315    }
4316
4317    impl<'de> serde::de::Deserialize<'de> for Type {
4318        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4319        where
4320            D: serde::Deserializer<'de>,
4321        {
4322            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
4323                ".google.container.v1.ReservationAffinity.Type",
4324            ))
4325        }
4326    }
4327}
4328
4329/// SoleTenantConfig contains the NodeAffinities to specify what shared sole
4330/// tenant node groups should back the node pool.
4331#[derive(Clone, Default, PartialEq)]
4332#[non_exhaustive]
4333pub struct SoleTenantConfig {
4334    /// NodeAffinities used to match to a shared sole tenant node group.
4335    pub node_affinities: std::vec::Vec<crate::model::sole_tenant_config::NodeAffinity>,
4336
4337    /// Optional. The minimum number of virtual CPUs this instance will consume
4338    /// when running on a sole-tenant node. This field can only be set if the node
4339    /// pool is created in a shared sole-tenant node group.
4340    pub min_node_cpus: std::option::Option<i32>,
4341
4342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4343}
4344
4345impl SoleTenantConfig {
4346    pub fn new() -> Self {
4347        std::default::Default::default()
4348    }
4349
4350    /// Sets the value of [node_affinities][crate::model::SoleTenantConfig::node_affinities].
4351    pub fn set_node_affinities<T, V>(mut self, v: T) -> Self
4352    where
4353        T: std::iter::IntoIterator<Item = V>,
4354        V: std::convert::Into<crate::model::sole_tenant_config::NodeAffinity>,
4355    {
4356        use std::iter::Iterator;
4357        self.node_affinities = v.into_iter().map(|i| i.into()).collect();
4358        self
4359    }
4360
4361    /// Sets the value of [min_node_cpus][crate::model::SoleTenantConfig::min_node_cpus].
4362    pub fn set_min_node_cpus<T>(mut self, v: T) -> Self
4363    where
4364        T: std::convert::Into<i32>,
4365    {
4366        self.min_node_cpus = std::option::Option::Some(v.into());
4367        self
4368    }
4369
4370    /// Sets or clears the value of [min_node_cpus][crate::model::SoleTenantConfig::min_node_cpus].
4371    pub fn set_or_clear_min_node_cpus<T>(mut self, v: std::option::Option<T>) -> Self
4372    where
4373        T: std::convert::Into<i32>,
4374    {
4375        self.min_node_cpus = v.map(|x| x.into());
4376        self
4377    }
4378}
4379
4380impl wkt::message::Message for SoleTenantConfig {
4381    fn typename() -> &'static str {
4382        "type.googleapis.com/google.container.v1.SoleTenantConfig"
4383    }
4384}
4385
4386/// Defines additional types related to [SoleTenantConfig].
4387pub mod sole_tenant_config {
4388    #[allow(unused_imports)]
4389    use super::*;
4390
4391    /// Specifies the NodeAffinity key, values, and affinity operator according to
4392    /// [shared sole tenant node group
4393    /// affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity).
4394    #[derive(Clone, Default, PartialEq)]
4395    #[non_exhaustive]
4396    pub struct NodeAffinity {
4397        /// Key for NodeAffinity.
4398        pub key: std::string::String,
4399
4400        /// Operator for NodeAffinity.
4401        pub operator: crate::model::sole_tenant_config::node_affinity::Operator,
4402
4403        /// Values for NodeAffinity.
4404        pub values: std::vec::Vec<std::string::String>,
4405
4406        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4407    }
4408
4409    impl NodeAffinity {
4410        pub fn new() -> Self {
4411            std::default::Default::default()
4412        }
4413
4414        /// Sets the value of [key][crate::model::sole_tenant_config::NodeAffinity::key].
4415        pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4416            self.key = v.into();
4417            self
4418        }
4419
4420        /// Sets the value of [operator][crate::model::sole_tenant_config::NodeAffinity::operator].
4421        pub fn set_operator<
4422            T: std::convert::Into<crate::model::sole_tenant_config::node_affinity::Operator>,
4423        >(
4424            mut self,
4425            v: T,
4426        ) -> Self {
4427            self.operator = v.into();
4428            self
4429        }
4430
4431        /// Sets the value of [values][crate::model::sole_tenant_config::NodeAffinity::values].
4432        pub fn set_values<T, V>(mut self, v: T) -> Self
4433        where
4434            T: std::iter::IntoIterator<Item = V>,
4435            V: std::convert::Into<std::string::String>,
4436        {
4437            use std::iter::Iterator;
4438            self.values = v.into_iter().map(|i| i.into()).collect();
4439            self
4440        }
4441    }
4442
4443    impl wkt::message::Message for NodeAffinity {
4444        fn typename() -> &'static str {
4445            "type.googleapis.com/google.container.v1.SoleTenantConfig.NodeAffinity"
4446        }
4447    }
4448
4449    /// Defines additional types related to [NodeAffinity].
4450    pub mod node_affinity {
4451        #[allow(unused_imports)]
4452        use super::*;
4453
4454        /// Operator allows user to specify affinity or anti-affinity for the
4455        /// given key values.
4456        ///
4457        /// # Working with unknown values
4458        ///
4459        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4460        /// additional enum variants at any time. Adding new variants is not considered
4461        /// a breaking change. Applications should write their code in anticipation of:
4462        ///
4463        /// - New values appearing in future releases of the client library, **and**
4464        /// - New values received dynamically, without application changes.
4465        ///
4466        /// Please consult the [Working with enums] section in the user guide for some
4467        /// guidelines.
4468        ///
4469        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4470        #[derive(Clone, Debug, PartialEq)]
4471        #[non_exhaustive]
4472        pub enum Operator {
4473            /// Invalid or unspecified affinity operator.
4474            Unspecified,
4475            /// Affinity operator.
4476            In,
4477            /// Anti-affinity operator.
4478            NotIn,
4479            /// If set, the enum was initialized with an unknown value.
4480            ///
4481            /// Applications can examine the value using [Operator::value] or
4482            /// [Operator::name].
4483            UnknownValue(operator::UnknownValue),
4484        }
4485
4486        #[doc(hidden)]
4487        pub mod operator {
4488            #[allow(unused_imports)]
4489            use super::*;
4490            #[derive(Clone, Debug, PartialEq)]
4491            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4492        }
4493
4494        impl Operator {
4495            /// Gets the enum value.
4496            ///
4497            /// Returns `None` if the enum contains an unknown value deserialized from
4498            /// the string representation of enums.
4499            pub fn value(&self) -> std::option::Option<i32> {
4500                match self {
4501                    Self::Unspecified => std::option::Option::Some(0),
4502                    Self::In => std::option::Option::Some(1),
4503                    Self::NotIn => std::option::Option::Some(2),
4504                    Self::UnknownValue(u) => u.0.value(),
4505                }
4506            }
4507
4508            /// Gets the enum value as a string.
4509            ///
4510            /// Returns `None` if the enum contains an unknown value deserialized from
4511            /// the integer representation of enums.
4512            pub fn name(&self) -> std::option::Option<&str> {
4513                match self {
4514                    Self::Unspecified => std::option::Option::Some("OPERATOR_UNSPECIFIED"),
4515                    Self::In => std::option::Option::Some("IN"),
4516                    Self::NotIn => std::option::Option::Some("NOT_IN"),
4517                    Self::UnknownValue(u) => u.0.name(),
4518                }
4519            }
4520        }
4521
4522        impl std::default::Default for Operator {
4523            fn default() -> Self {
4524                use std::convert::From;
4525                Self::from(0)
4526            }
4527        }
4528
4529        impl std::fmt::Display for Operator {
4530            fn fmt(
4531                &self,
4532                f: &mut std::fmt::Formatter<'_>,
4533            ) -> std::result::Result<(), std::fmt::Error> {
4534                wkt::internal::display_enum(f, self.name(), self.value())
4535            }
4536        }
4537
4538        impl std::convert::From<i32> for Operator {
4539            fn from(value: i32) -> Self {
4540                match value {
4541                    0 => Self::Unspecified,
4542                    1 => Self::In,
4543                    2 => Self::NotIn,
4544                    _ => Self::UnknownValue(operator::UnknownValue(
4545                        wkt::internal::UnknownEnumValue::Integer(value),
4546                    )),
4547                }
4548            }
4549        }
4550
4551        impl std::convert::From<&str> for Operator {
4552            fn from(value: &str) -> Self {
4553                use std::string::ToString;
4554                match value {
4555                    "OPERATOR_UNSPECIFIED" => Self::Unspecified,
4556                    "IN" => Self::In,
4557                    "NOT_IN" => Self::NotIn,
4558                    _ => Self::UnknownValue(operator::UnknownValue(
4559                        wkt::internal::UnknownEnumValue::String(value.to_string()),
4560                    )),
4561                }
4562            }
4563        }
4564
4565        impl serde::ser::Serialize for Operator {
4566            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4567            where
4568                S: serde::Serializer,
4569            {
4570                match self {
4571                    Self::Unspecified => serializer.serialize_i32(0),
4572                    Self::In => serializer.serialize_i32(1),
4573                    Self::NotIn => serializer.serialize_i32(2),
4574                    Self::UnknownValue(u) => u.0.serialize(serializer),
4575                }
4576            }
4577        }
4578
4579        impl<'de> serde::de::Deserialize<'de> for Operator {
4580            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4581            where
4582                D: serde::Deserializer<'de>,
4583            {
4584                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operator>::new(
4585                    ".google.container.v1.SoleTenantConfig.NodeAffinity.Operator",
4586                ))
4587            }
4588        }
4589    }
4590}
4591
4592/// ContainerdConfig contains configuration to customize containerd.
4593#[derive(Clone, Default, PartialEq)]
4594#[non_exhaustive]
4595pub struct ContainerdConfig {
4596    /// PrivateRegistryAccessConfig is used to configure access configuration
4597    /// for private container registries.
4598    pub private_registry_access_config:
4599        std::option::Option<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4600
4601    /// Optional. WritableCgroups defines writable cgroups configuration for the
4602    /// node pool.
4603    pub writable_cgroups: std::option::Option<crate::model::containerd_config::WritableCgroups>,
4604
4605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4606}
4607
4608impl ContainerdConfig {
4609    pub fn new() -> Self {
4610        std::default::Default::default()
4611    }
4612
4613    /// Sets the value of [private_registry_access_config][crate::model::ContainerdConfig::private_registry_access_config].
4614    pub fn set_private_registry_access_config<T>(mut self, v: T) -> Self
4615    where
4616        T: std::convert::Into<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4617    {
4618        self.private_registry_access_config = std::option::Option::Some(v.into());
4619        self
4620    }
4621
4622    /// Sets or clears the value of [private_registry_access_config][crate::model::ContainerdConfig::private_registry_access_config].
4623    pub fn set_or_clear_private_registry_access_config<T>(
4624        mut self,
4625        v: std::option::Option<T>,
4626    ) -> Self
4627    where
4628        T: std::convert::Into<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4629    {
4630        self.private_registry_access_config = v.map(|x| x.into());
4631        self
4632    }
4633
4634    /// Sets the value of [writable_cgroups][crate::model::ContainerdConfig::writable_cgroups].
4635    pub fn set_writable_cgroups<T>(mut self, v: T) -> Self
4636    where
4637        T: std::convert::Into<crate::model::containerd_config::WritableCgroups>,
4638    {
4639        self.writable_cgroups = std::option::Option::Some(v.into());
4640        self
4641    }
4642
4643    /// Sets or clears the value of [writable_cgroups][crate::model::ContainerdConfig::writable_cgroups].
4644    pub fn set_or_clear_writable_cgroups<T>(mut self, v: std::option::Option<T>) -> Self
4645    where
4646        T: std::convert::Into<crate::model::containerd_config::WritableCgroups>,
4647    {
4648        self.writable_cgroups = v.map(|x| x.into());
4649        self
4650    }
4651}
4652
4653impl wkt::message::Message for ContainerdConfig {
4654    fn typename() -> &'static str {
4655        "type.googleapis.com/google.container.v1.ContainerdConfig"
4656    }
4657}
4658
4659/// Defines additional types related to [ContainerdConfig].
4660pub mod containerd_config {
4661    #[allow(unused_imports)]
4662    use super::*;
4663
4664    /// PrivateRegistryAccessConfig contains access configuration for
4665    /// private container registries.
4666    #[derive(Clone, Default, PartialEq)]
4667    #[non_exhaustive]
4668    pub struct PrivateRegistryAccessConfig {
4669
4670        /// Private registry access is enabled.
4671        pub enabled: bool,
4672
4673        /// Private registry access configuration.
4674        pub certificate_authority_domain_config: std::vec::Vec<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>,
4675
4676        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4677    }
4678
4679    impl PrivateRegistryAccessConfig {
4680        pub fn new() -> Self {
4681            std::default::Default::default()
4682        }
4683
4684        /// Sets the value of [enabled][crate::model::containerd_config::PrivateRegistryAccessConfig::enabled].
4685        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4686            self.enabled = v.into();
4687            self
4688        }
4689
4690        /// Sets the value of [certificate_authority_domain_config][crate::model::containerd_config::PrivateRegistryAccessConfig::certificate_authority_domain_config].
4691        pub fn set_certificate_authority_domain_config<T, V>(mut self, v: T) -> Self
4692        where
4693            T: std::iter::IntoIterator<Item = V>,
4694            V: std::convert::Into<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>
4695        {
4696            use std::iter::Iterator;
4697            self.certificate_authority_domain_config = v.into_iter().map(|i| i.into()).collect();
4698            self
4699        }
4700    }
4701
4702    impl wkt::message::Message for PrivateRegistryAccessConfig {
4703        fn typename() -> &'static str {
4704            "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig"
4705        }
4706    }
4707
4708    /// Defines additional types related to [PrivateRegistryAccessConfig].
4709    pub mod private_registry_access_config {
4710        #[allow(unused_imports)]
4711        use super::*;
4712
4713        /// CertificateAuthorityDomainConfig configures one or more fully qualified
4714        /// domain names (FQDN) to a specific certificate.
4715        #[derive(Clone, Default, PartialEq)]
4716        #[non_exhaustive]
4717        pub struct CertificateAuthorityDomainConfig {
4718
4719            /// List of fully qualified domain names (FQDN).
4720            /// Specifying port is supported.
4721            /// Wildcards are NOT supported.
4722            /// Examples:
4723            ///
4724            /// - my.customdomain.com
4725            /// - 10.0.1.2:5000
4726            pub fqdns: std::vec::Vec<std::string::String>,
4727
4728            /// Certificate access config. The following are supported:
4729            ///
4730            /// - GCPSecretManagerCertificateConfig
4731            pub certificate_config: std::option::Option<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig>,
4732
4733            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4734        }
4735
4736        impl CertificateAuthorityDomainConfig {
4737            pub fn new() -> Self {
4738                std::default::Default::default()
4739            }
4740
4741            /// Sets the value of [fqdns][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::fqdns].
4742            pub fn set_fqdns<T, V>(mut self, v: T) -> Self
4743            where
4744                T: std::iter::IntoIterator<Item = V>,
4745                V: std::convert::Into<std::string::String>,
4746            {
4747                use std::iter::Iterator;
4748                self.fqdns = v.into_iter().map(|i| i.into()).collect();
4749                self
4750            }
4751
4752            /// Sets the value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config].
4753            ///
4754            /// Note that all the setters affecting `certificate_config` are mutually
4755            /// exclusive.
4756            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
4757            {
4758                self.certificate_config = v.into();
4759                self
4760            }
4761
4762            /// The value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config]
4763            /// if it holds a `GcpSecretManagerCertificateConfig`, `None` if the field is not set or
4764            /// holds a different branch.
4765            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>>{
4766                #[allow(unreachable_patterns)]
4767                self.certificate_config.as_ref().and_then(|v| match v {
4768                    crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(v) => std::option::Option::Some(v),
4769                    _ => std::option::Option::None,
4770                })
4771            }
4772
4773            /// Sets the value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config]
4774            /// to hold a `GcpSecretManagerCertificateConfig`.
4775            ///
4776            /// Note that all the setters affecting `certificate_config` are
4777            /// mutually exclusive.
4778            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{
4779                self.certificate_config = std::option::Option::Some(
4780                    crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(
4781                        v.into()
4782                    )
4783                );
4784                self
4785            }
4786        }
4787
4788        impl wkt::message::Message for CertificateAuthorityDomainConfig {
4789            fn typename() -> &'static str {
4790                "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"
4791            }
4792        }
4793
4794        /// Defines additional types related to [CertificateAuthorityDomainConfig].
4795        pub mod certificate_authority_domain_config {
4796            #[allow(unused_imports)]
4797            use super::*;
4798
4799            /// GCPSecretManagerCertificateConfig configures a secret from
4800            /// [Secret Manager](https://cloud.google.com/secret-manager).
4801            #[derive(Clone, Default, PartialEq)]
4802            #[non_exhaustive]
4803            pub struct GCPSecretManagerCertificateConfig {
4804                /// Secret URI, in the form
4805                /// "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
4806                /// Version can be fixed (e.g. "2") or "latest"
4807                pub secret_uri: std::string::String,
4808
4809                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4810            }
4811
4812            impl GCPSecretManagerCertificateConfig {
4813                pub fn new() -> Self {
4814                    std::default::Default::default()
4815                }
4816
4817                /// Sets the value of [secret_uri][crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig::secret_uri].
4818                pub fn set_secret_uri<T: std::convert::Into<std::string::String>>(
4819                    mut self,
4820                    v: T,
4821                ) -> Self {
4822                    self.secret_uri = v.into();
4823                    self
4824                }
4825            }
4826
4827            impl wkt::message::Message for GCPSecretManagerCertificateConfig {
4828                fn typename() -> &'static str {
4829                    "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"
4830                }
4831            }
4832
4833            /// Certificate access config. The following are supported:
4834            ///
4835            /// - GCPSecretManagerCertificateConfig
4836            #[derive(Clone, Debug, PartialEq)]
4837            #[non_exhaustive]
4838            pub enum CertificateConfig {
4839                /// Google Secret Manager (GCP) certificate configuration.
4840                GcpSecretManagerCertificateConfig(std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>),
4841            }
4842        }
4843    }
4844
4845    /// Defines writable cgroups configuration.
4846    #[derive(Clone, Default, PartialEq)]
4847    #[non_exhaustive]
4848    pub struct WritableCgroups {
4849        /// Optional. Whether writable cgroups is enabled.
4850        pub enabled: bool,
4851
4852        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4853    }
4854
4855    impl WritableCgroups {
4856        pub fn new() -> Self {
4857            std::default::Default::default()
4858        }
4859
4860        /// Sets the value of [enabled][crate::model::containerd_config::WritableCgroups::enabled].
4861        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4862            self.enabled = v.into();
4863            self
4864        }
4865    }
4866
4867    impl wkt::message::Message for WritableCgroups {
4868        fn typename() -> &'static str {
4869            "type.googleapis.com/google.container.v1.ContainerdConfig.WritableCgroups"
4870        }
4871    }
4872}
4873
4874/// Kubernetes taint is composed of three fields: key, value, and effect. Effect
4875/// can only be one of three types:  NoSchedule, PreferNoSchedule or NoExecute.
4876///
4877/// See
4878/// [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration)
4879/// for more information, including usage and the valid values.
4880#[derive(Clone, Default, PartialEq)]
4881#[non_exhaustive]
4882pub struct NodeTaint {
4883    /// Key for taint.
4884    pub key: std::string::String,
4885
4886    /// Value for taint.
4887    pub value: std::string::String,
4888
4889    /// Effect for taint.
4890    pub effect: crate::model::node_taint::Effect,
4891
4892    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4893}
4894
4895impl NodeTaint {
4896    pub fn new() -> Self {
4897        std::default::Default::default()
4898    }
4899
4900    /// Sets the value of [key][crate::model::NodeTaint::key].
4901    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4902        self.key = v.into();
4903        self
4904    }
4905
4906    /// Sets the value of [value][crate::model::NodeTaint::value].
4907    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4908        self.value = v.into();
4909        self
4910    }
4911
4912    /// Sets the value of [effect][crate::model::NodeTaint::effect].
4913    pub fn set_effect<T: std::convert::Into<crate::model::node_taint::Effect>>(
4914        mut self,
4915        v: T,
4916    ) -> Self {
4917        self.effect = v.into();
4918        self
4919    }
4920}
4921
4922impl wkt::message::Message for NodeTaint {
4923    fn typename() -> &'static str {
4924        "type.googleapis.com/google.container.v1.NodeTaint"
4925    }
4926}
4927
4928/// Defines additional types related to [NodeTaint].
4929pub mod node_taint {
4930    #[allow(unused_imports)]
4931    use super::*;
4932
4933    /// Possible values for Effect in taint.
4934    ///
4935    /// # Working with unknown values
4936    ///
4937    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4938    /// additional enum variants at any time. Adding new variants is not considered
4939    /// a breaking change. Applications should write their code in anticipation of:
4940    ///
4941    /// - New values appearing in future releases of the client library, **and**
4942    /// - New values received dynamically, without application changes.
4943    ///
4944    /// Please consult the [Working with enums] section in the user guide for some
4945    /// guidelines.
4946    ///
4947    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4948    #[derive(Clone, Debug, PartialEq)]
4949    #[non_exhaustive]
4950    pub enum Effect {
4951        /// Not set
4952        Unspecified,
4953        /// NoSchedule
4954        NoSchedule,
4955        /// PreferNoSchedule
4956        PreferNoSchedule,
4957        /// NoExecute
4958        NoExecute,
4959        /// If set, the enum was initialized with an unknown value.
4960        ///
4961        /// Applications can examine the value using [Effect::value] or
4962        /// [Effect::name].
4963        UnknownValue(effect::UnknownValue),
4964    }
4965
4966    #[doc(hidden)]
4967    pub mod effect {
4968        #[allow(unused_imports)]
4969        use super::*;
4970        #[derive(Clone, Debug, PartialEq)]
4971        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4972    }
4973
4974    impl Effect {
4975        /// Gets the enum value.
4976        ///
4977        /// Returns `None` if the enum contains an unknown value deserialized from
4978        /// the string representation of enums.
4979        pub fn value(&self) -> std::option::Option<i32> {
4980            match self {
4981                Self::Unspecified => std::option::Option::Some(0),
4982                Self::NoSchedule => std::option::Option::Some(1),
4983                Self::PreferNoSchedule => std::option::Option::Some(2),
4984                Self::NoExecute => std::option::Option::Some(3),
4985                Self::UnknownValue(u) => u.0.value(),
4986            }
4987        }
4988
4989        /// Gets the enum value as a string.
4990        ///
4991        /// Returns `None` if the enum contains an unknown value deserialized from
4992        /// the integer representation of enums.
4993        pub fn name(&self) -> std::option::Option<&str> {
4994            match self {
4995                Self::Unspecified => std::option::Option::Some("EFFECT_UNSPECIFIED"),
4996                Self::NoSchedule => std::option::Option::Some("NO_SCHEDULE"),
4997                Self::PreferNoSchedule => std::option::Option::Some("PREFER_NO_SCHEDULE"),
4998                Self::NoExecute => std::option::Option::Some("NO_EXECUTE"),
4999                Self::UnknownValue(u) => u.0.name(),
5000            }
5001        }
5002    }
5003
5004    impl std::default::Default for Effect {
5005        fn default() -> Self {
5006            use std::convert::From;
5007            Self::from(0)
5008        }
5009    }
5010
5011    impl std::fmt::Display for Effect {
5012        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5013            wkt::internal::display_enum(f, self.name(), self.value())
5014        }
5015    }
5016
5017    impl std::convert::From<i32> for Effect {
5018        fn from(value: i32) -> Self {
5019            match value {
5020                0 => Self::Unspecified,
5021                1 => Self::NoSchedule,
5022                2 => Self::PreferNoSchedule,
5023                3 => Self::NoExecute,
5024                _ => Self::UnknownValue(effect::UnknownValue(
5025                    wkt::internal::UnknownEnumValue::Integer(value),
5026                )),
5027            }
5028        }
5029    }
5030
5031    impl std::convert::From<&str> for Effect {
5032        fn from(value: &str) -> Self {
5033            use std::string::ToString;
5034            match value {
5035                "EFFECT_UNSPECIFIED" => Self::Unspecified,
5036                "NO_SCHEDULE" => Self::NoSchedule,
5037                "PREFER_NO_SCHEDULE" => Self::PreferNoSchedule,
5038                "NO_EXECUTE" => Self::NoExecute,
5039                _ => Self::UnknownValue(effect::UnknownValue(
5040                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5041                )),
5042            }
5043        }
5044    }
5045
5046    impl serde::ser::Serialize for Effect {
5047        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5048        where
5049            S: serde::Serializer,
5050        {
5051            match self {
5052                Self::Unspecified => serializer.serialize_i32(0),
5053                Self::NoSchedule => serializer.serialize_i32(1),
5054                Self::PreferNoSchedule => serializer.serialize_i32(2),
5055                Self::NoExecute => serializer.serialize_i32(3),
5056                Self::UnknownValue(u) => u.0.serialize(serializer),
5057            }
5058        }
5059    }
5060
5061    impl<'de> serde::de::Deserialize<'de> for Effect {
5062        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5063        where
5064            D: serde::Deserializer<'de>,
5065        {
5066            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Effect>::new(
5067                ".google.container.v1.NodeTaint.Effect",
5068            ))
5069        }
5070    }
5071}
5072
5073/// Collection of Kubernetes [node
5074/// taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration).
5075#[derive(Clone, Default, PartialEq)]
5076#[non_exhaustive]
5077pub struct NodeTaints {
5078    /// List of node taints.
5079    pub taints: std::vec::Vec<crate::model::NodeTaint>,
5080
5081    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5082}
5083
5084impl NodeTaints {
5085    pub fn new() -> Self {
5086        std::default::Default::default()
5087    }
5088
5089    /// Sets the value of [taints][crate::model::NodeTaints::taints].
5090    pub fn set_taints<T, V>(mut self, v: T) -> Self
5091    where
5092        T: std::iter::IntoIterator<Item = V>,
5093        V: std::convert::Into<crate::model::NodeTaint>,
5094    {
5095        use std::iter::Iterator;
5096        self.taints = v.into_iter().map(|i| i.into()).collect();
5097        self
5098    }
5099}
5100
5101impl wkt::message::Message for NodeTaints {
5102    fn typename() -> &'static str {
5103        "type.googleapis.com/google.container.v1.NodeTaints"
5104    }
5105}
5106
5107/// Collection of node-level [Kubernetes
5108/// labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels).
5109#[derive(Clone, Default, PartialEq)]
5110#[non_exhaustive]
5111pub struct NodeLabels {
5112    /// Map of node label keys and node label values.
5113    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5114
5115    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5116}
5117
5118impl NodeLabels {
5119    pub fn new() -> Self {
5120        std::default::Default::default()
5121    }
5122
5123    /// Sets the value of [labels][crate::model::NodeLabels::labels].
5124    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5125    where
5126        T: std::iter::IntoIterator<Item = (K, V)>,
5127        K: std::convert::Into<std::string::String>,
5128        V: std::convert::Into<std::string::String>,
5129    {
5130        use std::iter::Iterator;
5131        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5132        self
5133    }
5134}
5135
5136impl wkt::message::Message for NodeLabels {
5137    fn typename() -> &'static str {
5138        "type.googleapis.com/google.container.v1.NodeLabels"
5139    }
5140}
5141
5142/// Collection of [Resource Manager
5143/// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
5144#[derive(Clone, Default, PartialEq)]
5145#[non_exhaustive]
5146pub struct ResourceLabels {
5147    /// Map of node label keys and node label values.
5148    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5149
5150    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5151}
5152
5153impl ResourceLabels {
5154    pub fn new() -> Self {
5155        std::default::Default::default()
5156    }
5157
5158    /// Sets the value of [labels][crate::model::ResourceLabels::labels].
5159    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5160    where
5161        T: std::iter::IntoIterator<Item = (K, V)>,
5162        K: std::convert::Into<std::string::String>,
5163        V: std::convert::Into<std::string::String>,
5164    {
5165        use std::iter::Iterator;
5166        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5167        self
5168    }
5169}
5170
5171impl wkt::message::Message for ResourceLabels {
5172    fn typename() -> &'static str {
5173        "type.googleapis.com/google.container.v1.ResourceLabels"
5174    }
5175}
5176
5177/// Collection of Compute Engine network tags that can be applied to a node's
5178/// underlying VM instance.
5179#[derive(Clone, Default, PartialEq)]
5180#[non_exhaustive]
5181pub struct NetworkTags {
5182    /// List of network tags.
5183    pub tags: std::vec::Vec<std::string::String>,
5184
5185    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5186}
5187
5188impl NetworkTags {
5189    pub fn new() -> Self {
5190        std::default::Default::default()
5191    }
5192
5193    /// Sets the value of [tags][crate::model::NetworkTags::tags].
5194    pub fn set_tags<T, V>(mut self, v: T) -> Self
5195    where
5196        T: std::iter::IntoIterator<Item = V>,
5197        V: std::convert::Into<std::string::String>,
5198    {
5199        use std::iter::Iterator;
5200        self.tags = v.into_iter().map(|i| i.into()).collect();
5201        self
5202    }
5203}
5204
5205impl wkt::message::Message for NetworkTags {
5206    fn typename() -> &'static str {
5207        "type.googleapis.com/google.container.v1.NetworkTags"
5208    }
5209}
5210
5211/// The authentication information for accessing the master endpoint.
5212/// Authentication can be done using HTTP basic auth or using client
5213/// certificates.
5214#[derive(Clone, Default, PartialEq)]
5215#[non_exhaustive]
5216pub struct MasterAuth {
5217    /// The username to use for HTTP basic authentication to the master endpoint.
5218    /// For clusters v1.6.0 and later, basic authentication can be disabled by
5219    /// leaving username unspecified (or setting it to the empty string).
5220    ///
5221    /// Warning: basic authentication is deprecated, and will be removed in GKE
5222    /// control plane versions 1.19 and newer. For a list of recommended
5223    /// authentication methods, see:
5224    /// <https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication>
5225    #[deprecated]
5226    pub username: std::string::String,
5227
5228    /// The password to use for HTTP basic authentication to the master endpoint.
5229    /// Because the master endpoint is open to the Internet, you should create a
5230    /// strong password.  If a password is provided for cluster creation, username
5231    /// must be non-empty.
5232    ///
5233    /// Warning: basic authentication is deprecated, and will be removed in GKE
5234    /// control plane versions 1.19 and newer. For a list of recommended
5235    /// authentication methods, see:
5236    /// <https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication>
5237    #[deprecated]
5238    pub password: std::string::String,
5239
5240    /// Configuration for client certificate authentication on the cluster. For
5241    /// clusters before v1.12, if no configuration is specified, a client
5242    /// certificate is issued.
5243    pub client_certificate_config: std::option::Option<crate::model::ClientCertificateConfig>,
5244
5245    /// Output only. Base64-encoded public certificate that is the root of
5246    /// trust for the cluster.
5247    pub cluster_ca_certificate: std::string::String,
5248
5249    /// Output only. Base64-encoded public certificate used by clients to
5250    /// authenticate to the cluster endpoint. Issued only if
5251    /// client_certificate_config is set.
5252    pub client_certificate: std::string::String,
5253
5254    /// Output only. Base64-encoded private key used by clients to authenticate
5255    /// to the cluster endpoint.
5256    pub client_key: std::string::String,
5257
5258    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5259}
5260
5261impl MasterAuth {
5262    pub fn new() -> Self {
5263        std::default::Default::default()
5264    }
5265
5266    /// Sets the value of [username][crate::model::MasterAuth::username].
5267    #[deprecated]
5268    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5269        self.username = v.into();
5270        self
5271    }
5272
5273    /// Sets the value of [password][crate::model::MasterAuth::password].
5274    #[deprecated]
5275    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5276        self.password = v.into();
5277        self
5278    }
5279
5280    /// Sets the value of [client_certificate_config][crate::model::MasterAuth::client_certificate_config].
5281    pub fn set_client_certificate_config<T>(mut self, v: T) -> Self
5282    where
5283        T: std::convert::Into<crate::model::ClientCertificateConfig>,
5284    {
5285        self.client_certificate_config = std::option::Option::Some(v.into());
5286        self
5287    }
5288
5289    /// Sets or clears the value of [client_certificate_config][crate::model::MasterAuth::client_certificate_config].
5290    pub fn set_or_clear_client_certificate_config<T>(mut self, v: std::option::Option<T>) -> Self
5291    where
5292        T: std::convert::Into<crate::model::ClientCertificateConfig>,
5293    {
5294        self.client_certificate_config = v.map(|x| x.into());
5295        self
5296    }
5297
5298    /// Sets the value of [cluster_ca_certificate][crate::model::MasterAuth::cluster_ca_certificate].
5299    pub fn set_cluster_ca_certificate<T: std::convert::Into<std::string::String>>(
5300        mut self,
5301        v: T,
5302    ) -> Self {
5303        self.cluster_ca_certificate = v.into();
5304        self
5305    }
5306
5307    /// Sets the value of [client_certificate][crate::model::MasterAuth::client_certificate].
5308    pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
5309        mut self,
5310        v: T,
5311    ) -> Self {
5312        self.client_certificate = v.into();
5313        self
5314    }
5315
5316    /// Sets the value of [client_key][crate::model::MasterAuth::client_key].
5317    pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5318        self.client_key = v.into();
5319        self
5320    }
5321}
5322
5323impl wkt::message::Message for MasterAuth {
5324    fn typename() -> &'static str {
5325        "type.googleapis.com/google.container.v1.MasterAuth"
5326    }
5327}
5328
5329/// Configuration for client certificates on the cluster.
5330#[derive(Clone, Default, PartialEq)]
5331#[non_exhaustive]
5332pub struct ClientCertificateConfig {
5333    /// Issue a client certificate.
5334    pub issue_client_certificate: bool,
5335
5336    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5337}
5338
5339impl ClientCertificateConfig {
5340    pub fn new() -> Self {
5341        std::default::Default::default()
5342    }
5343
5344    /// Sets the value of [issue_client_certificate][crate::model::ClientCertificateConfig::issue_client_certificate].
5345    pub fn set_issue_client_certificate<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5346        self.issue_client_certificate = v.into();
5347        self
5348    }
5349}
5350
5351impl wkt::message::Message for ClientCertificateConfig {
5352    fn typename() -> &'static str {
5353        "type.googleapis.com/google.container.v1.ClientCertificateConfig"
5354    }
5355}
5356
5357/// Configuration for the addons that can be automatically spun up in the
5358/// cluster, enabling additional functionality.
5359#[derive(Clone, Default, PartialEq)]
5360#[non_exhaustive]
5361pub struct AddonsConfig {
5362    /// Configuration for the HTTP (L7) load balancing controller addon, which
5363    /// makes it easy to set up HTTP load balancers for services in a cluster.
5364    pub http_load_balancing: std::option::Option<crate::model::HttpLoadBalancing>,
5365
5366    /// Configuration for the horizontal pod autoscaling feature, which
5367    /// increases or decreases the number of replica pods a replication controller
5368    /// has based on the resource usage of the existing pods.
5369    pub horizontal_pod_autoscaling: std::option::Option<crate::model::HorizontalPodAutoscaling>,
5370
5371    /// Configuration for the Kubernetes Dashboard.
5372    /// This addon is deprecated, and will be disabled in 1.15. It is recommended
5373    /// to use the Cloud Console to manage and monitor your Kubernetes clusters,
5374    /// workloads and applications. For more information, see:
5375    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards>
5376    #[deprecated]
5377    pub kubernetes_dashboard: std::option::Option<crate::model::KubernetesDashboard>,
5378
5379    /// Configuration for NetworkPolicy. This only tracks whether the addon
5380    /// is enabled or not on the Master, it does not track whether network policy
5381    /// is enabled for the nodes.
5382    pub network_policy_config: std::option::Option<crate::model::NetworkPolicyConfig>,
5383
5384    /// Configuration for the Cloud Run addon, which allows the user to use a
5385    /// managed Knative service.
5386    pub cloud_run_config: std::option::Option<crate::model::CloudRunConfig>,
5387
5388    /// Configuration for NodeLocalDNS, a dns cache running on cluster nodes
5389    pub dns_cache_config: std::option::Option<crate::model::DnsCacheConfig>,
5390
5391    /// Configuration for the ConfigConnector add-on, a Kubernetes
5392    /// extension to manage hosted Google Cloud services through the Kubernetes
5393    /// API.
5394    pub config_connector_config: std::option::Option<crate::model::ConfigConnectorConfig>,
5395
5396    /// Configuration for the Compute Engine Persistent Disk CSI driver.
5397    pub gce_persistent_disk_csi_driver_config:
5398        std::option::Option<crate::model::GcePersistentDiskCsiDriverConfig>,
5399
5400    /// Configuration for the Filestore CSI driver.
5401    pub gcp_filestore_csi_driver_config:
5402        std::option::Option<crate::model::GcpFilestoreCsiDriverConfig>,
5403
5404    /// Configuration for the Backup for GKE agent addon.
5405    pub gke_backup_agent_config: std::option::Option<crate::model::GkeBackupAgentConfig>,
5406
5407    /// Configuration for the Cloud Storage Fuse CSI driver.
5408    pub gcs_fuse_csi_driver_config: std::option::Option<crate::model::GcsFuseCsiDriverConfig>,
5409
5410    /// Optional. Configuration for the StatefulHA add-on.
5411    pub stateful_ha_config: std::option::Option<crate::model::StatefulHAConfig>,
5412
5413    /// Configuration for the Cloud Storage Parallelstore CSI driver.
5414    pub parallelstore_csi_driver_config:
5415        std::option::Option<crate::model::ParallelstoreCsiDriverConfig>,
5416
5417    /// Optional. Configuration for Ray Operator addon.
5418    pub ray_operator_config: std::option::Option<crate::model::RayOperatorConfig>,
5419
5420    /// Configuration for the High Scale Checkpointing add-on.
5421    pub high_scale_checkpointing_config:
5422        std::option::Option<crate::model::HighScaleCheckpointingConfig>,
5423
5424    /// Configuration for the Lustre CSI driver.
5425    pub lustre_csi_driver_config: std::option::Option<crate::model::LustreCsiDriverConfig>,
5426
5427    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5428}
5429
5430impl AddonsConfig {
5431    pub fn new() -> Self {
5432        std::default::Default::default()
5433    }
5434
5435    /// Sets the value of [http_load_balancing][crate::model::AddonsConfig::http_load_balancing].
5436    pub fn set_http_load_balancing<T>(mut self, v: T) -> Self
5437    where
5438        T: std::convert::Into<crate::model::HttpLoadBalancing>,
5439    {
5440        self.http_load_balancing = std::option::Option::Some(v.into());
5441        self
5442    }
5443
5444    /// Sets or clears the value of [http_load_balancing][crate::model::AddonsConfig::http_load_balancing].
5445    pub fn set_or_clear_http_load_balancing<T>(mut self, v: std::option::Option<T>) -> Self
5446    where
5447        T: std::convert::Into<crate::model::HttpLoadBalancing>,
5448    {
5449        self.http_load_balancing = v.map(|x| x.into());
5450        self
5451    }
5452
5453    /// Sets the value of [horizontal_pod_autoscaling][crate::model::AddonsConfig::horizontal_pod_autoscaling].
5454    pub fn set_horizontal_pod_autoscaling<T>(mut self, v: T) -> Self
5455    where
5456        T: std::convert::Into<crate::model::HorizontalPodAutoscaling>,
5457    {
5458        self.horizontal_pod_autoscaling = std::option::Option::Some(v.into());
5459        self
5460    }
5461
5462    /// Sets or clears the value of [horizontal_pod_autoscaling][crate::model::AddonsConfig::horizontal_pod_autoscaling].
5463    pub fn set_or_clear_horizontal_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
5464    where
5465        T: std::convert::Into<crate::model::HorizontalPodAutoscaling>,
5466    {
5467        self.horizontal_pod_autoscaling = v.map(|x| x.into());
5468        self
5469    }
5470
5471    /// Sets the value of [kubernetes_dashboard][crate::model::AddonsConfig::kubernetes_dashboard].
5472    #[deprecated]
5473    pub fn set_kubernetes_dashboard<T>(mut self, v: T) -> Self
5474    where
5475        T: std::convert::Into<crate::model::KubernetesDashboard>,
5476    {
5477        self.kubernetes_dashboard = std::option::Option::Some(v.into());
5478        self
5479    }
5480
5481    /// Sets or clears the value of [kubernetes_dashboard][crate::model::AddonsConfig::kubernetes_dashboard].
5482    #[deprecated]
5483    pub fn set_or_clear_kubernetes_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
5484    where
5485        T: std::convert::Into<crate::model::KubernetesDashboard>,
5486    {
5487        self.kubernetes_dashboard = v.map(|x| x.into());
5488        self
5489    }
5490
5491    /// Sets the value of [network_policy_config][crate::model::AddonsConfig::network_policy_config].
5492    pub fn set_network_policy_config<T>(mut self, v: T) -> Self
5493    where
5494        T: std::convert::Into<crate::model::NetworkPolicyConfig>,
5495    {
5496        self.network_policy_config = std::option::Option::Some(v.into());
5497        self
5498    }
5499
5500    /// Sets or clears the value of [network_policy_config][crate::model::AddonsConfig::network_policy_config].
5501    pub fn set_or_clear_network_policy_config<T>(mut self, v: std::option::Option<T>) -> Self
5502    where
5503        T: std::convert::Into<crate::model::NetworkPolicyConfig>,
5504    {
5505        self.network_policy_config = v.map(|x| x.into());
5506        self
5507    }
5508
5509    /// Sets the value of [cloud_run_config][crate::model::AddonsConfig::cloud_run_config].
5510    pub fn set_cloud_run_config<T>(mut self, v: T) -> Self
5511    where
5512        T: std::convert::Into<crate::model::CloudRunConfig>,
5513    {
5514        self.cloud_run_config = std::option::Option::Some(v.into());
5515        self
5516    }
5517
5518    /// Sets or clears the value of [cloud_run_config][crate::model::AddonsConfig::cloud_run_config].
5519    pub fn set_or_clear_cloud_run_config<T>(mut self, v: std::option::Option<T>) -> Self
5520    where
5521        T: std::convert::Into<crate::model::CloudRunConfig>,
5522    {
5523        self.cloud_run_config = v.map(|x| x.into());
5524        self
5525    }
5526
5527    /// Sets the value of [dns_cache_config][crate::model::AddonsConfig::dns_cache_config].
5528    pub fn set_dns_cache_config<T>(mut self, v: T) -> Self
5529    where
5530        T: std::convert::Into<crate::model::DnsCacheConfig>,
5531    {
5532        self.dns_cache_config = std::option::Option::Some(v.into());
5533        self
5534    }
5535
5536    /// Sets or clears the value of [dns_cache_config][crate::model::AddonsConfig::dns_cache_config].
5537    pub fn set_or_clear_dns_cache_config<T>(mut self, v: std::option::Option<T>) -> Self
5538    where
5539        T: std::convert::Into<crate::model::DnsCacheConfig>,
5540    {
5541        self.dns_cache_config = v.map(|x| x.into());
5542        self
5543    }
5544
5545    /// Sets the value of [config_connector_config][crate::model::AddonsConfig::config_connector_config].
5546    pub fn set_config_connector_config<T>(mut self, v: T) -> Self
5547    where
5548        T: std::convert::Into<crate::model::ConfigConnectorConfig>,
5549    {
5550        self.config_connector_config = std::option::Option::Some(v.into());
5551        self
5552    }
5553
5554    /// Sets or clears the value of [config_connector_config][crate::model::AddonsConfig::config_connector_config].
5555    pub fn set_or_clear_config_connector_config<T>(mut self, v: std::option::Option<T>) -> Self
5556    where
5557        T: std::convert::Into<crate::model::ConfigConnectorConfig>,
5558    {
5559        self.config_connector_config = v.map(|x| x.into());
5560        self
5561    }
5562
5563    /// Sets the value of [gce_persistent_disk_csi_driver_config][crate::model::AddonsConfig::gce_persistent_disk_csi_driver_config].
5564    pub fn set_gce_persistent_disk_csi_driver_config<T>(mut self, v: T) -> Self
5565    where
5566        T: std::convert::Into<crate::model::GcePersistentDiskCsiDriverConfig>,
5567    {
5568        self.gce_persistent_disk_csi_driver_config = std::option::Option::Some(v.into());
5569        self
5570    }
5571
5572    /// Sets or clears the value of [gce_persistent_disk_csi_driver_config][crate::model::AddonsConfig::gce_persistent_disk_csi_driver_config].
5573    pub fn set_or_clear_gce_persistent_disk_csi_driver_config<T>(
5574        mut self,
5575        v: std::option::Option<T>,
5576    ) -> Self
5577    where
5578        T: std::convert::Into<crate::model::GcePersistentDiskCsiDriverConfig>,
5579    {
5580        self.gce_persistent_disk_csi_driver_config = v.map(|x| x.into());
5581        self
5582    }
5583
5584    /// Sets the value of [gcp_filestore_csi_driver_config][crate::model::AddonsConfig::gcp_filestore_csi_driver_config].
5585    pub fn set_gcp_filestore_csi_driver_config<T>(mut self, v: T) -> Self
5586    where
5587        T: std::convert::Into<crate::model::GcpFilestoreCsiDriverConfig>,
5588    {
5589        self.gcp_filestore_csi_driver_config = std::option::Option::Some(v.into());
5590        self
5591    }
5592
5593    /// Sets or clears the value of [gcp_filestore_csi_driver_config][crate::model::AddonsConfig::gcp_filestore_csi_driver_config].
5594    pub fn set_or_clear_gcp_filestore_csi_driver_config<T>(
5595        mut self,
5596        v: std::option::Option<T>,
5597    ) -> Self
5598    where
5599        T: std::convert::Into<crate::model::GcpFilestoreCsiDriverConfig>,
5600    {
5601        self.gcp_filestore_csi_driver_config = v.map(|x| x.into());
5602        self
5603    }
5604
5605    /// Sets the value of [gke_backup_agent_config][crate::model::AddonsConfig::gke_backup_agent_config].
5606    pub fn set_gke_backup_agent_config<T>(mut self, v: T) -> Self
5607    where
5608        T: std::convert::Into<crate::model::GkeBackupAgentConfig>,
5609    {
5610        self.gke_backup_agent_config = std::option::Option::Some(v.into());
5611        self
5612    }
5613
5614    /// Sets or clears the value of [gke_backup_agent_config][crate::model::AddonsConfig::gke_backup_agent_config].
5615    pub fn set_or_clear_gke_backup_agent_config<T>(mut self, v: std::option::Option<T>) -> Self
5616    where
5617        T: std::convert::Into<crate::model::GkeBackupAgentConfig>,
5618    {
5619        self.gke_backup_agent_config = v.map(|x| x.into());
5620        self
5621    }
5622
5623    /// Sets the value of [gcs_fuse_csi_driver_config][crate::model::AddonsConfig::gcs_fuse_csi_driver_config].
5624    pub fn set_gcs_fuse_csi_driver_config<T>(mut self, v: T) -> Self
5625    where
5626        T: std::convert::Into<crate::model::GcsFuseCsiDriverConfig>,
5627    {
5628        self.gcs_fuse_csi_driver_config = std::option::Option::Some(v.into());
5629        self
5630    }
5631
5632    /// Sets or clears the value of [gcs_fuse_csi_driver_config][crate::model::AddonsConfig::gcs_fuse_csi_driver_config].
5633    pub fn set_or_clear_gcs_fuse_csi_driver_config<T>(mut self, v: std::option::Option<T>) -> Self
5634    where
5635        T: std::convert::Into<crate::model::GcsFuseCsiDriverConfig>,
5636    {
5637        self.gcs_fuse_csi_driver_config = v.map(|x| x.into());
5638        self
5639    }
5640
5641    /// Sets the value of [stateful_ha_config][crate::model::AddonsConfig::stateful_ha_config].
5642    pub fn set_stateful_ha_config<T>(mut self, v: T) -> Self
5643    where
5644        T: std::convert::Into<crate::model::StatefulHAConfig>,
5645    {
5646        self.stateful_ha_config = std::option::Option::Some(v.into());
5647        self
5648    }
5649
5650    /// Sets or clears the value of [stateful_ha_config][crate::model::AddonsConfig::stateful_ha_config].
5651    pub fn set_or_clear_stateful_ha_config<T>(mut self, v: std::option::Option<T>) -> Self
5652    where
5653        T: std::convert::Into<crate::model::StatefulHAConfig>,
5654    {
5655        self.stateful_ha_config = v.map(|x| x.into());
5656        self
5657    }
5658
5659    /// Sets the value of [parallelstore_csi_driver_config][crate::model::AddonsConfig::parallelstore_csi_driver_config].
5660    pub fn set_parallelstore_csi_driver_config<T>(mut self, v: T) -> Self
5661    where
5662        T: std::convert::Into<crate::model::ParallelstoreCsiDriverConfig>,
5663    {
5664        self.parallelstore_csi_driver_config = std::option::Option::Some(v.into());
5665        self
5666    }
5667
5668    /// Sets or clears the value of [parallelstore_csi_driver_config][crate::model::AddonsConfig::parallelstore_csi_driver_config].
5669    pub fn set_or_clear_parallelstore_csi_driver_config<T>(
5670        mut self,
5671        v: std::option::Option<T>,
5672    ) -> Self
5673    where
5674        T: std::convert::Into<crate::model::ParallelstoreCsiDriverConfig>,
5675    {
5676        self.parallelstore_csi_driver_config = v.map(|x| x.into());
5677        self
5678    }
5679
5680    /// Sets the value of [ray_operator_config][crate::model::AddonsConfig::ray_operator_config].
5681    pub fn set_ray_operator_config<T>(mut self, v: T) -> Self
5682    where
5683        T: std::convert::Into<crate::model::RayOperatorConfig>,
5684    {
5685        self.ray_operator_config = std::option::Option::Some(v.into());
5686        self
5687    }
5688
5689    /// Sets or clears the value of [ray_operator_config][crate::model::AddonsConfig::ray_operator_config].
5690    pub fn set_or_clear_ray_operator_config<T>(mut self, v: std::option::Option<T>) -> Self
5691    where
5692        T: std::convert::Into<crate::model::RayOperatorConfig>,
5693    {
5694        self.ray_operator_config = v.map(|x| x.into());
5695        self
5696    }
5697
5698    /// Sets the value of [high_scale_checkpointing_config][crate::model::AddonsConfig::high_scale_checkpointing_config].
5699    pub fn set_high_scale_checkpointing_config<T>(mut self, v: T) -> Self
5700    where
5701        T: std::convert::Into<crate::model::HighScaleCheckpointingConfig>,
5702    {
5703        self.high_scale_checkpointing_config = std::option::Option::Some(v.into());
5704        self
5705    }
5706
5707    /// Sets or clears the value of [high_scale_checkpointing_config][crate::model::AddonsConfig::high_scale_checkpointing_config].
5708    pub fn set_or_clear_high_scale_checkpointing_config<T>(
5709        mut self,
5710        v: std::option::Option<T>,
5711    ) -> Self
5712    where
5713        T: std::convert::Into<crate::model::HighScaleCheckpointingConfig>,
5714    {
5715        self.high_scale_checkpointing_config = v.map(|x| x.into());
5716        self
5717    }
5718
5719    /// Sets the value of [lustre_csi_driver_config][crate::model::AddonsConfig::lustre_csi_driver_config].
5720    pub fn set_lustre_csi_driver_config<T>(mut self, v: T) -> Self
5721    where
5722        T: std::convert::Into<crate::model::LustreCsiDriverConfig>,
5723    {
5724        self.lustre_csi_driver_config = std::option::Option::Some(v.into());
5725        self
5726    }
5727
5728    /// Sets or clears the value of [lustre_csi_driver_config][crate::model::AddonsConfig::lustre_csi_driver_config].
5729    pub fn set_or_clear_lustre_csi_driver_config<T>(mut self, v: std::option::Option<T>) -> Self
5730    where
5731        T: std::convert::Into<crate::model::LustreCsiDriverConfig>,
5732    {
5733        self.lustre_csi_driver_config = v.map(|x| x.into());
5734        self
5735    }
5736}
5737
5738impl wkt::message::Message for AddonsConfig {
5739    fn typename() -> &'static str {
5740        "type.googleapis.com/google.container.v1.AddonsConfig"
5741    }
5742}
5743
5744/// Configuration options for the HTTP (L7) load balancing controller addon,
5745/// which makes it easy to set up HTTP load balancers for services in a cluster.
5746#[derive(Clone, Default, PartialEq)]
5747#[non_exhaustive]
5748pub struct HttpLoadBalancing {
5749    /// Whether the HTTP Load Balancing controller is enabled in the cluster.
5750    /// When enabled, it runs a small pod in the cluster that manages the load
5751    /// balancers.
5752    pub disabled: bool,
5753
5754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5755}
5756
5757impl HttpLoadBalancing {
5758    pub fn new() -> Self {
5759        std::default::Default::default()
5760    }
5761
5762    /// Sets the value of [disabled][crate::model::HttpLoadBalancing::disabled].
5763    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5764        self.disabled = v.into();
5765        self
5766    }
5767}
5768
5769impl wkt::message::Message for HttpLoadBalancing {
5770    fn typename() -> &'static str {
5771        "type.googleapis.com/google.container.v1.HttpLoadBalancing"
5772    }
5773}
5774
5775/// Configuration options for the horizontal pod autoscaling feature, which
5776/// increases or decreases the number of replica pods a replication controller
5777/// has based on the resource usage of the existing pods.
5778#[derive(Clone, Default, PartialEq)]
5779#[non_exhaustive]
5780pub struct HorizontalPodAutoscaling {
5781    /// Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
5782    /// When enabled, it ensures that metrics are collected into Stackdriver
5783    /// Monitoring.
5784    pub disabled: bool,
5785
5786    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5787}
5788
5789impl HorizontalPodAutoscaling {
5790    pub fn new() -> Self {
5791        std::default::Default::default()
5792    }
5793
5794    /// Sets the value of [disabled][crate::model::HorizontalPodAutoscaling::disabled].
5795    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5796        self.disabled = v.into();
5797        self
5798    }
5799}
5800
5801impl wkt::message::Message for HorizontalPodAutoscaling {
5802    fn typename() -> &'static str {
5803        "type.googleapis.com/google.container.v1.HorizontalPodAutoscaling"
5804    }
5805}
5806
5807/// Configuration for the Kubernetes Dashboard.
5808#[derive(Clone, Default, PartialEq)]
5809#[non_exhaustive]
5810pub struct KubernetesDashboard {
5811    /// Whether the Kubernetes Dashboard is enabled for this cluster.
5812    pub disabled: bool,
5813
5814    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5815}
5816
5817impl KubernetesDashboard {
5818    pub fn new() -> Self {
5819        std::default::Default::default()
5820    }
5821
5822    /// Sets the value of [disabled][crate::model::KubernetesDashboard::disabled].
5823    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5824        self.disabled = v.into();
5825        self
5826    }
5827}
5828
5829impl wkt::message::Message for KubernetesDashboard {
5830    fn typename() -> &'static str {
5831        "type.googleapis.com/google.container.v1.KubernetesDashboard"
5832    }
5833}
5834
5835/// Configuration for NetworkPolicy. This only tracks whether the addon
5836/// is enabled or not on the Master, it does not track whether network policy
5837/// is enabled for the nodes.
5838#[derive(Clone, Default, PartialEq)]
5839#[non_exhaustive]
5840pub struct NetworkPolicyConfig {
5841    /// Whether NetworkPolicy is enabled for this cluster.
5842    pub disabled: bool,
5843
5844    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5845}
5846
5847impl NetworkPolicyConfig {
5848    pub fn new() -> Self {
5849        std::default::Default::default()
5850    }
5851
5852    /// Sets the value of [disabled][crate::model::NetworkPolicyConfig::disabled].
5853    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5854        self.disabled = v.into();
5855        self
5856    }
5857}
5858
5859impl wkt::message::Message for NetworkPolicyConfig {
5860    fn typename() -> &'static str {
5861        "type.googleapis.com/google.container.v1.NetworkPolicyConfig"
5862    }
5863}
5864
5865/// Configuration for NodeLocal DNSCache
5866#[derive(Clone, Default, PartialEq)]
5867#[non_exhaustive]
5868pub struct DnsCacheConfig {
5869    /// Whether NodeLocal DNSCache is enabled for this cluster.
5870    pub enabled: bool,
5871
5872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5873}
5874
5875impl DnsCacheConfig {
5876    pub fn new() -> Self {
5877        std::default::Default::default()
5878    }
5879
5880    /// Sets the value of [enabled][crate::model::DnsCacheConfig::enabled].
5881    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5882        self.enabled = v.into();
5883        self
5884    }
5885}
5886
5887impl wkt::message::Message for DnsCacheConfig {
5888    fn typename() -> &'static str {
5889        "type.googleapis.com/google.container.v1.DnsCacheConfig"
5890    }
5891}
5892
5893/// Configuration for controlling master global access settings.
5894#[derive(Clone, Default, PartialEq)]
5895#[non_exhaustive]
5896pub struct PrivateClusterMasterGlobalAccessConfig {
5897    /// Whenever master is accessible globally or not.
5898    pub enabled: bool,
5899
5900    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5901}
5902
5903impl PrivateClusterMasterGlobalAccessConfig {
5904    pub fn new() -> Self {
5905        std::default::Default::default()
5906    }
5907
5908    /// Sets the value of [enabled][crate::model::PrivateClusterMasterGlobalAccessConfig::enabled].
5909    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5910        self.enabled = v.into();
5911        self
5912    }
5913}
5914
5915impl wkt::message::Message for PrivateClusterMasterGlobalAccessConfig {
5916    fn typename() -> &'static str {
5917        "type.googleapis.com/google.container.v1.PrivateClusterMasterGlobalAccessConfig"
5918    }
5919}
5920
5921/// Configuration options for private clusters.
5922#[derive(Clone, Default, PartialEq)]
5923#[non_exhaustive]
5924pub struct PrivateClusterConfig {
5925    /// Whether nodes have internal IP addresses only. If enabled, all nodes are
5926    /// given only RFC 1918 private addresses and communicate with the master via
5927    /// private networking.
5928    ///
5929    /// Deprecated: Use
5930    /// [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes]
5931    /// instead.
5932    ///
5933    /// [google.container.v1.NetworkConfig.default_enable_private_nodes]: crate::model::NetworkConfig::default_enable_private_nodes
5934    #[deprecated]
5935    pub enable_private_nodes: bool,
5936
5937    /// Whether the master's internal IP address is used as the cluster endpoint.
5938    ///
5939    /// Deprecated: Use
5940    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint]
5941    /// instead. Note that the value of enable_public_endpoint is reversed: if
5942    /// enable_private_endpoint is false, then enable_public_endpoint will be true.
5943    ///
5944    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::enable_public_endpoint
5945    #[deprecated]
5946    pub enable_private_endpoint: bool,
5947
5948    /// The IP range in CIDR notation to use for the hosted master network. This
5949    /// range will be used for assigning internal IP addresses to the master or
5950    /// set of masters, as well as the ILB VIP. This range must not overlap with
5951    /// any other ranges in use within the cluster's network.
5952    pub master_ipv4_cidr_block: std::string::String,
5953
5954    /// Output only. The internal IP address of this cluster's master endpoint.
5955    ///
5956    /// Deprecated: Use
5957    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint]
5958    /// instead.
5959    ///
5960    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint
5961    #[deprecated]
5962    pub private_endpoint: std::string::String,
5963
5964    /// Output only. The external IP address of this cluster's master endpoint.
5965    ///
5966    /// Deprecated:Use
5967    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint]
5968    /// instead.
5969    ///
5970    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::public_endpoint
5971    #[deprecated]
5972    pub public_endpoint: std::string::String,
5973
5974    /// Output only. The peering name in the customer VPC used by this cluster.
5975    pub peering_name: std::string::String,
5976
5977    /// Controls master global access settings.
5978    ///
5979    /// Deprecated: Use
5980    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][]
5981    /// instead.
5982    #[deprecated]
5983    pub master_global_access_config:
5984        std::option::Option<crate::model::PrivateClusterMasterGlobalAccessConfig>,
5985
5986    /// Subnet to provision the master's private endpoint during cluster creation.
5987    /// Specified in projects/*/regions/*/subnetworks/* format.
5988    ///
5989    /// Deprecated: Use
5990    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork]
5991    /// instead.
5992    ///
5993    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint_subnetwork
5994    #[deprecated]
5995    pub private_endpoint_subnetwork: std::string::String,
5996
5997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5998}
5999
6000impl PrivateClusterConfig {
6001    pub fn new() -> Self {
6002        std::default::Default::default()
6003    }
6004
6005    /// Sets the value of [enable_private_nodes][crate::model::PrivateClusterConfig::enable_private_nodes].
6006    #[deprecated]
6007    pub fn set_enable_private_nodes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6008        self.enable_private_nodes = v.into();
6009        self
6010    }
6011
6012    /// Sets the value of [enable_private_endpoint][crate::model::PrivateClusterConfig::enable_private_endpoint].
6013    #[deprecated]
6014    pub fn set_enable_private_endpoint<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6015        self.enable_private_endpoint = v.into();
6016        self
6017    }
6018
6019    /// Sets the value of [master_ipv4_cidr_block][crate::model::PrivateClusterConfig::master_ipv4_cidr_block].
6020    pub fn set_master_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
6021        mut self,
6022        v: T,
6023    ) -> Self {
6024        self.master_ipv4_cidr_block = v.into();
6025        self
6026    }
6027
6028    /// Sets the value of [private_endpoint][crate::model::PrivateClusterConfig::private_endpoint].
6029    #[deprecated]
6030    pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
6031        mut self,
6032        v: T,
6033    ) -> Self {
6034        self.private_endpoint = v.into();
6035        self
6036    }
6037
6038    /// Sets the value of [public_endpoint][crate::model::PrivateClusterConfig::public_endpoint].
6039    #[deprecated]
6040    pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6041        self.public_endpoint = v.into();
6042        self
6043    }
6044
6045    /// Sets the value of [peering_name][crate::model::PrivateClusterConfig::peering_name].
6046    pub fn set_peering_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6047        self.peering_name = v.into();
6048        self
6049    }
6050
6051    /// Sets the value of [master_global_access_config][crate::model::PrivateClusterConfig::master_global_access_config].
6052    #[deprecated]
6053    pub fn set_master_global_access_config<T>(mut self, v: T) -> Self
6054    where
6055        T: std::convert::Into<crate::model::PrivateClusterMasterGlobalAccessConfig>,
6056    {
6057        self.master_global_access_config = std::option::Option::Some(v.into());
6058        self
6059    }
6060
6061    /// Sets or clears the value of [master_global_access_config][crate::model::PrivateClusterConfig::master_global_access_config].
6062    #[deprecated]
6063    pub fn set_or_clear_master_global_access_config<T>(mut self, v: std::option::Option<T>) -> Self
6064    where
6065        T: std::convert::Into<crate::model::PrivateClusterMasterGlobalAccessConfig>,
6066    {
6067        self.master_global_access_config = v.map(|x| x.into());
6068        self
6069    }
6070
6071    /// Sets the value of [private_endpoint_subnetwork][crate::model::PrivateClusterConfig::private_endpoint_subnetwork].
6072    #[deprecated]
6073    pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
6074        mut self,
6075        v: T,
6076    ) -> Self {
6077        self.private_endpoint_subnetwork = v.into();
6078        self
6079    }
6080}
6081
6082impl wkt::message::Message for PrivateClusterConfig {
6083    fn typename() -> &'static str {
6084        "type.googleapis.com/google.container.v1.PrivateClusterConfig"
6085    }
6086}
6087
6088/// Configuration for returning group information from authenticators.
6089#[derive(Clone, Default, PartialEq)]
6090#[non_exhaustive]
6091pub struct AuthenticatorGroupsConfig {
6092    /// Whether this cluster should return group membership lookups
6093    /// during authentication using a group of security groups.
6094    pub enabled: bool,
6095
6096    /// The name of the security group-of-groups to be used. Only relevant
6097    /// if enabled = true.
6098    pub security_group: std::string::String,
6099
6100    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6101}
6102
6103impl AuthenticatorGroupsConfig {
6104    pub fn new() -> Self {
6105        std::default::Default::default()
6106    }
6107
6108    /// Sets the value of [enabled][crate::model::AuthenticatorGroupsConfig::enabled].
6109    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6110        self.enabled = v.into();
6111        self
6112    }
6113
6114    /// Sets the value of [security_group][crate::model::AuthenticatorGroupsConfig::security_group].
6115    pub fn set_security_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6116        self.security_group = v.into();
6117        self
6118    }
6119}
6120
6121impl wkt::message::Message for AuthenticatorGroupsConfig {
6122    fn typename() -> &'static str {
6123        "type.googleapis.com/google.container.v1.AuthenticatorGroupsConfig"
6124    }
6125}
6126
6127/// Configuration options for the Cloud Run feature.
6128#[derive(Clone, Default, PartialEq)]
6129#[non_exhaustive]
6130pub struct CloudRunConfig {
6131    /// Whether Cloud Run addon is enabled for this cluster.
6132    pub disabled: bool,
6133
6134    /// Which load balancer type is installed for Cloud Run.
6135    pub load_balancer_type: crate::model::cloud_run_config::LoadBalancerType,
6136
6137    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6138}
6139
6140impl CloudRunConfig {
6141    pub fn new() -> Self {
6142        std::default::Default::default()
6143    }
6144
6145    /// Sets the value of [disabled][crate::model::CloudRunConfig::disabled].
6146    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6147        self.disabled = v.into();
6148        self
6149    }
6150
6151    /// Sets the value of [load_balancer_type][crate::model::CloudRunConfig::load_balancer_type].
6152    pub fn set_load_balancer_type<
6153        T: std::convert::Into<crate::model::cloud_run_config::LoadBalancerType>,
6154    >(
6155        mut self,
6156        v: T,
6157    ) -> Self {
6158        self.load_balancer_type = v.into();
6159        self
6160    }
6161}
6162
6163impl wkt::message::Message for CloudRunConfig {
6164    fn typename() -> &'static str {
6165        "type.googleapis.com/google.container.v1.CloudRunConfig"
6166    }
6167}
6168
6169/// Defines additional types related to [CloudRunConfig].
6170pub mod cloud_run_config {
6171    #[allow(unused_imports)]
6172    use super::*;
6173
6174    /// Load balancer type of ingress service of Cloud Run.
6175    ///
6176    /// # Working with unknown values
6177    ///
6178    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6179    /// additional enum variants at any time. Adding new variants is not considered
6180    /// a breaking change. Applications should write their code in anticipation of:
6181    ///
6182    /// - New values appearing in future releases of the client library, **and**
6183    /// - New values received dynamically, without application changes.
6184    ///
6185    /// Please consult the [Working with enums] section in the user guide for some
6186    /// guidelines.
6187    ///
6188    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6189    #[derive(Clone, Debug, PartialEq)]
6190    #[non_exhaustive]
6191    pub enum LoadBalancerType {
6192        /// Load balancer type for Cloud Run is unspecified.
6193        Unspecified,
6194        /// Install external load balancer for Cloud Run.
6195        External,
6196        /// Install internal load balancer for Cloud Run.
6197        Internal,
6198        /// If set, the enum was initialized with an unknown value.
6199        ///
6200        /// Applications can examine the value using [LoadBalancerType::value] or
6201        /// [LoadBalancerType::name].
6202        UnknownValue(load_balancer_type::UnknownValue),
6203    }
6204
6205    #[doc(hidden)]
6206    pub mod load_balancer_type {
6207        #[allow(unused_imports)]
6208        use super::*;
6209        #[derive(Clone, Debug, PartialEq)]
6210        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6211    }
6212
6213    impl LoadBalancerType {
6214        /// Gets the enum value.
6215        ///
6216        /// Returns `None` if the enum contains an unknown value deserialized from
6217        /// the string representation of enums.
6218        pub fn value(&self) -> std::option::Option<i32> {
6219            match self {
6220                Self::Unspecified => std::option::Option::Some(0),
6221                Self::External => std::option::Option::Some(1),
6222                Self::Internal => std::option::Option::Some(2),
6223                Self::UnknownValue(u) => u.0.value(),
6224            }
6225        }
6226
6227        /// Gets the enum value as a string.
6228        ///
6229        /// Returns `None` if the enum contains an unknown value deserialized from
6230        /// the integer representation of enums.
6231        pub fn name(&self) -> std::option::Option<&str> {
6232            match self {
6233                Self::Unspecified => std::option::Option::Some("LOAD_BALANCER_TYPE_UNSPECIFIED"),
6234                Self::External => std::option::Option::Some("LOAD_BALANCER_TYPE_EXTERNAL"),
6235                Self::Internal => std::option::Option::Some("LOAD_BALANCER_TYPE_INTERNAL"),
6236                Self::UnknownValue(u) => u.0.name(),
6237            }
6238        }
6239    }
6240
6241    impl std::default::Default for LoadBalancerType {
6242        fn default() -> Self {
6243            use std::convert::From;
6244            Self::from(0)
6245        }
6246    }
6247
6248    impl std::fmt::Display for LoadBalancerType {
6249        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6250            wkt::internal::display_enum(f, self.name(), self.value())
6251        }
6252    }
6253
6254    impl std::convert::From<i32> for LoadBalancerType {
6255        fn from(value: i32) -> Self {
6256            match value {
6257                0 => Self::Unspecified,
6258                1 => Self::External,
6259                2 => Self::Internal,
6260                _ => Self::UnknownValue(load_balancer_type::UnknownValue(
6261                    wkt::internal::UnknownEnumValue::Integer(value),
6262                )),
6263            }
6264        }
6265    }
6266
6267    impl std::convert::From<&str> for LoadBalancerType {
6268        fn from(value: &str) -> Self {
6269            use std::string::ToString;
6270            match value {
6271                "LOAD_BALANCER_TYPE_UNSPECIFIED" => Self::Unspecified,
6272                "LOAD_BALANCER_TYPE_EXTERNAL" => Self::External,
6273                "LOAD_BALANCER_TYPE_INTERNAL" => Self::Internal,
6274                _ => Self::UnknownValue(load_balancer_type::UnknownValue(
6275                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6276                )),
6277            }
6278        }
6279    }
6280
6281    impl serde::ser::Serialize for LoadBalancerType {
6282        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6283        where
6284            S: serde::Serializer,
6285        {
6286            match self {
6287                Self::Unspecified => serializer.serialize_i32(0),
6288                Self::External => serializer.serialize_i32(1),
6289                Self::Internal => serializer.serialize_i32(2),
6290                Self::UnknownValue(u) => u.0.serialize(serializer),
6291            }
6292        }
6293    }
6294
6295    impl<'de> serde::de::Deserialize<'de> for LoadBalancerType {
6296        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6297        where
6298            D: serde::Deserializer<'de>,
6299        {
6300            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoadBalancerType>::new(
6301                ".google.container.v1.CloudRunConfig.LoadBalancerType",
6302            ))
6303        }
6304    }
6305}
6306
6307/// Configuration options for the Config Connector add-on.
6308#[derive(Clone, Default, PartialEq)]
6309#[non_exhaustive]
6310pub struct ConfigConnectorConfig {
6311    /// Whether Cloud Connector is enabled for this cluster.
6312    pub enabled: bool,
6313
6314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6315}
6316
6317impl ConfigConnectorConfig {
6318    pub fn new() -> Self {
6319        std::default::Default::default()
6320    }
6321
6322    /// Sets the value of [enabled][crate::model::ConfigConnectorConfig::enabled].
6323    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6324        self.enabled = v.into();
6325        self
6326    }
6327}
6328
6329impl wkt::message::Message for ConfigConnectorConfig {
6330    fn typename() -> &'static str {
6331        "type.googleapis.com/google.container.v1.ConfigConnectorConfig"
6332    }
6333}
6334
6335/// Configuration for the Compute Engine PD CSI driver.
6336#[derive(Clone, Default, PartialEq)]
6337#[non_exhaustive]
6338pub struct GcePersistentDiskCsiDriverConfig {
6339    /// Whether the Compute Engine PD CSI driver is enabled for this cluster.
6340    pub enabled: bool,
6341
6342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6343}
6344
6345impl GcePersistentDiskCsiDriverConfig {
6346    pub fn new() -> Self {
6347        std::default::Default::default()
6348    }
6349
6350    /// Sets the value of [enabled][crate::model::GcePersistentDiskCsiDriverConfig::enabled].
6351    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6352        self.enabled = v.into();
6353        self
6354    }
6355}
6356
6357impl wkt::message::Message for GcePersistentDiskCsiDriverConfig {
6358    fn typename() -> &'static str {
6359        "type.googleapis.com/google.container.v1.GcePersistentDiskCsiDriverConfig"
6360    }
6361}
6362
6363/// Configuration for the Filestore CSI driver.
6364#[derive(Clone, Default, PartialEq)]
6365#[non_exhaustive]
6366pub struct GcpFilestoreCsiDriverConfig {
6367    /// Whether the Filestore CSI driver is enabled for this cluster.
6368    pub enabled: bool,
6369
6370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6371}
6372
6373impl GcpFilestoreCsiDriverConfig {
6374    pub fn new() -> Self {
6375        std::default::Default::default()
6376    }
6377
6378    /// Sets the value of [enabled][crate::model::GcpFilestoreCsiDriverConfig::enabled].
6379    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6380        self.enabled = v.into();
6381        self
6382    }
6383}
6384
6385impl wkt::message::Message for GcpFilestoreCsiDriverConfig {
6386    fn typename() -> &'static str {
6387        "type.googleapis.com/google.container.v1.GcpFilestoreCsiDriverConfig"
6388    }
6389}
6390
6391/// Configuration for the Cloud Storage Fuse CSI driver.
6392#[derive(Clone, Default, PartialEq)]
6393#[non_exhaustive]
6394pub struct GcsFuseCsiDriverConfig {
6395    /// Whether the Cloud Storage Fuse CSI driver is enabled for this cluster.
6396    pub enabled: bool,
6397
6398    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6399}
6400
6401impl GcsFuseCsiDriverConfig {
6402    pub fn new() -> Self {
6403        std::default::Default::default()
6404    }
6405
6406    /// Sets the value of [enabled][crate::model::GcsFuseCsiDriverConfig::enabled].
6407    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6408        self.enabled = v.into();
6409        self
6410    }
6411}
6412
6413impl wkt::message::Message for GcsFuseCsiDriverConfig {
6414    fn typename() -> &'static str {
6415        "type.googleapis.com/google.container.v1.GcsFuseCsiDriverConfig"
6416    }
6417}
6418
6419/// Configuration for the Cloud Storage Parallelstore CSI driver.
6420#[derive(Clone, Default, PartialEq)]
6421#[non_exhaustive]
6422pub struct ParallelstoreCsiDriverConfig {
6423    /// Whether the Cloud Storage Parallelstore CSI driver is enabled for this
6424    /// cluster.
6425    pub enabled: bool,
6426
6427    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6428}
6429
6430impl ParallelstoreCsiDriverConfig {
6431    pub fn new() -> Self {
6432        std::default::Default::default()
6433    }
6434
6435    /// Sets the value of [enabled][crate::model::ParallelstoreCsiDriverConfig::enabled].
6436    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6437        self.enabled = v.into();
6438        self
6439    }
6440}
6441
6442impl wkt::message::Message for ParallelstoreCsiDriverConfig {
6443    fn typename() -> &'static str {
6444        "type.googleapis.com/google.container.v1.ParallelstoreCsiDriverConfig"
6445    }
6446}
6447
6448/// Configuration for the High Scale Checkpointing.
6449#[derive(Clone, Default, PartialEq)]
6450#[non_exhaustive]
6451pub struct HighScaleCheckpointingConfig {
6452    /// Whether the High Scale Checkpointing is enabled for this
6453    /// cluster.
6454    pub enabled: bool,
6455
6456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6457}
6458
6459impl HighScaleCheckpointingConfig {
6460    pub fn new() -> Self {
6461        std::default::Default::default()
6462    }
6463
6464    /// Sets the value of [enabled][crate::model::HighScaleCheckpointingConfig::enabled].
6465    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6466        self.enabled = v.into();
6467        self
6468    }
6469}
6470
6471impl wkt::message::Message for HighScaleCheckpointingConfig {
6472    fn typename() -> &'static str {
6473        "type.googleapis.com/google.container.v1.HighScaleCheckpointingConfig"
6474    }
6475}
6476
6477/// Configuration for the Lustre CSI driver.
6478#[derive(Clone, Default, PartialEq)]
6479#[non_exhaustive]
6480pub struct LustreCsiDriverConfig {
6481    /// Whether the Lustre CSI driver is enabled for this cluster.
6482    pub enabled: bool,
6483
6484    /// If set to true, the Lustre CSI driver will install Lustre kernel modules
6485    /// using port 6988.
6486    /// This serves as a workaround for a port conflict with the
6487    /// gke-metadata-server. This field is required ONLY under the following
6488    /// conditions:
6489    ///
6490    /// 1. The GKE node version is older than 1.33.2-gke.4655000.
6491    /// 1. You're connecting to a Lustre instance that has the
6492    ///    'gke-support-enabled' flag.
6493    ///    Deprecated: This flag is no longer required as of GKE node version
6494    ///    1.33.2-gke.4655000, unless you are connecting to a Lustre instance
6495    ///    that has the `gke-support-enabled` flag.
6496    #[deprecated]
6497    pub enable_legacy_lustre_port: bool,
6498
6499    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6500}
6501
6502impl LustreCsiDriverConfig {
6503    pub fn new() -> Self {
6504        std::default::Default::default()
6505    }
6506
6507    /// Sets the value of [enabled][crate::model::LustreCsiDriverConfig::enabled].
6508    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6509        self.enabled = v.into();
6510        self
6511    }
6512
6513    /// Sets the value of [enable_legacy_lustre_port][crate::model::LustreCsiDriverConfig::enable_legacy_lustre_port].
6514    #[deprecated]
6515    pub fn set_enable_legacy_lustre_port<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6516        self.enable_legacy_lustre_port = v.into();
6517        self
6518    }
6519}
6520
6521impl wkt::message::Message for LustreCsiDriverConfig {
6522    fn typename() -> &'static str {
6523        "type.googleapis.com/google.container.v1.LustreCsiDriverConfig"
6524    }
6525}
6526
6527/// Configuration options for the Ray Operator add-on.
6528#[derive(Clone, Default, PartialEq)]
6529#[non_exhaustive]
6530pub struct RayOperatorConfig {
6531    /// Whether the Ray Operator addon is enabled for this cluster.
6532    pub enabled: bool,
6533
6534    /// Optional. Logging configuration for Ray clusters.
6535    pub ray_cluster_logging_config: std::option::Option<crate::model::RayClusterLoggingConfig>,
6536
6537    /// Optional. Monitoring configuration for Ray clusters.
6538    pub ray_cluster_monitoring_config:
6539        std::option::Option<crate::model::RayClusterMonitoringConfig>,
6540
6541    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6542}
6543
6544impl RayOperatorConfig {
6545    pub fn new() -> Self {
6546        std::default::Default::default()
6547    }
6548
6549    /// Sets the value of [enabled][crate::model::RayOperatorConfig::enabled].
6550    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6551        self.enabled = v.into();
6552        self
6553    }
6554
6555    /// Sets the value of [ray_cluster_logging_config][crate::model::RayOperatorConfig::ray_cluster_logging_config].
6556    pub fn set_ray_cluster_logging_config<T>(mut self, v: T) -> Self
6557    where
6558        T: std::convert::Into<crate::model::RayClusterLoggingConfig>,
6559    {
6560        self.ray_cluster_logging_config = std::option::Option::Some(v.into());
6561        self
6562    }
6563
6564    /// Sets or clears the value of [ray_cluster_logging_config][crate::model::RayOperatorConfig::ray_cluster_logging_config].
6565    pub fn set_or_clear_ray_cluster_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
6566    where
6567        T: std::convert::Into<crate::model::RayClusterLoggingConfig>,
6568    {
6569        self.ray_cluster_logging_config = v.map(|x| x.into());
6570        self
6571    }
6572
6573    /// Sets the value of [ray_cluster_monitoring_config][crate::model::RayOperatorConfig::ray_cluster_monitoring_config].
6574    pub fn set_ray_cluster_monitoring_config<T>(mut self, v: T) -> Self
6575    where
6576        T: std::convert::Into<crate::model::RayClusterMonitoringConfig>,
6577    {
6578        self.ray_cluster_monitoring_config = std::option::Option::Some(v.into());
6579        self
6580    }
6581
6582    /// Sets or clears the value of [ray_cluster_monitoring_config][crate::model::RayOperatorConfig::ray_cluster_monitoring_config].
6583    pub fn set_or_clear_ray_cluster_monitoring_config<T>(
6584        mut self,
6585        v: std::option::Option<T>,
6586    ) -> Self
6587    where
6588        T: std::convert::Into<crate::model::RayClusterMonitoringConfig>,
6589    {
6590        self.ray_cluster_monitoring_config = v.map(|x| x.into());
6591        self
6592    }
6593}
6594
6595impl wkt::message::Message for RayOperatorConfig {
6596    fn typename() -> &'static str {
6597        "type.googleapis.com/google.container.v1.RayOperatorConfig"
6598    }
6599}
6600
6601/// Configuration for the Backup for GKE Agent.
6602#[derive(Clone, Default, PartialEq)]
6603#[non_exhaustive]
6604pub struct GkeBackupAgentConfig {
6605    /// Whether the Backup for GKE agent is enabled for this cluster.
6606    pub enabled: bool,
6607
6608    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6609}
6610
6611impl GkeBackupAgentConfig {
6612    pub fn new() -> Self {
6613        std::default::Default::default()
6614    }
6615
6616    /// Sets the value of [enabled][crate::model::GkeBackupAgentConfig::enabled].
6617    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6618        self.enabled = v.into();
6619        self
6620    }
6621}
6622
6623impl wkt::message::Message for GkeBackupAgentConfig {
6624    fn typename() -> &'static str {
6625        "type.googleapis.com/google.container.v1.GkeBackupAgentConfig"
6626    }
6627}
6628
6629/// Configuration for the Stateful HA add-on.
6630#[derive(Clone, Default, PartialEq)]
6631#[non_exhaustive]
6632pub struct StatefulHAConfig {
6633    /// Whether the Stateful HA add-on is enabled for this cluster.
6634    pub enabled: bool,
6635
6636    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6637}
6638
6639impl StatefulHAConfig {
6640    pub fn new() -> Self {
6641        std::default::Default::default()
6642    }
6643
6644    /// Sets the value of [enabled][crate::model::StatefulHAConfig::enabled].
6645    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6646        self.enabled = v.into();
6647        self
6648    }
6649}
6650
6651impl wkt::message::Message for StatefulHAConfig {
6652    fn typename() -> &'static str {
6653        "type.googleapis.com/google.container.v1.StatefulHAConfig"
6654    }
6655}
6656
6657/// Configuration options for the master authorized networks feature. Enabled
6658/// master authorized networks will disallow all external traffic to access
6659/// Kubernetes master through HTTPS except traffic from the given CIDR blocks,
6660/// Google Compute Engine Public IPs and Google Prod IPs.
6661#[derive(Clone, Default, PartialEq)]
6662#[non_exhaustive]
6663pub struct MasterAuthorizedNetworksConfig {
6664    /// Whether or not master authorized networks is enabled.
6665    pub enabled: bool,
6666
6667    /// cidr_blocks define up to 50 external networks that could access
6668    /// Kubernetes master through HTTPS.
6669    pub cidr_blocks: std::vec::Vec<crate::model::master_authorized_networks_config::CidrBlock>,
6670
6671    /// Whether master is accessible via Google Compute Engine Public IP addresses.
6672    pub gcp_public_cidrs_access_enabled: std::option::Option<bool>,
6673
6674    /// Whether master authorized networks is enforced on private endpoint or not.
6675    pub private_endpoint_enforcement_enabled: std::option::Option<bool>,
6676
6677    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6678}
6679
6680impl MasterAuthorizedNetworksConfig {
6681    pub fn new() -> Self {
6682        std::default::Default::default()
6683    }
6684
6685    /// Sets the value of [enabled][crate::model::MasterAuthorizedNetworksConfig::enabled].
6686    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6687        self.enabled = v.into();
6688        self
6689    }
6690
6691    /// Sets the value of [cidr_blocks][crate::model::MasterAuthorizedNetworksConfig::cidr_blocks].
6692    pub fn set_cidr_blocks<T, V>(mut self, v: T) -> Self
6693    where
6694        T: std::iter::IntoIterator<Item = V>,
6695        V: std::convert::Into<crate::model::master_authorized_networks_config::CidrBlock>,
6696    {
6697        use std::iter::Iterator;
6698        self.cidr_blocks = v.into_iter().map(|i| i.into()).collect();
6699        self
6700    }
6701
6702    /// Sets the value of [gcp_public_cidrs_access_enabled][crate::model::MasterAuthorizedNetworksConfig::gcp_public_cidrs_access_enabled].
6703    pub fn set_gcp_public_cidrs_access_enabled<T>(mut self, v: T) -> Self
6704    where
6705        T: std::convert::Into<bool>,
6706    {
6707        self.gcp_public_cidrs_access_enabled = std::option::Option::Some(v.into());
6708        self
6709    }
6710
6711    /// Sets or clears the value of [gcp_public_cidrs_access_enabled][crate::model::MasterAuthorizedNetworksConfig::gcp_public_cidrs_access_enabled].
6712    pub fn set_or_clear_gcp_public_cidrs_access_enabled<T>(
6713        mut self,
6714        v: std::option::Option<T>,
6715    ) -> Self
6716    where
6717        T: std::convert::Into<bool>,
6718    {
6719        self.gcp_public_cidrs_access_enabled = v.map(|x| x.into());
6720        self
6721    }
6722
6723    /// Sets the value of [private_endpoint_enforcement_enabled][crate::model::MasterAuthorizedNetworksConfig::private_endpoint_enforcement_enabled].
6724    pub fn set_private_endpoint_enforcement_enabled<T>(mut self, v: T) -> Self
6725    where
6726        T: std::convert::Into<bool>,
6727    {
6728        self.private_endpoint_enforcement_enabled = std::option::Option::Some(v.into());
6729        self
6730    }
6731
6732    /// Sets or clears the value of [private_endpoint_enforcement_enabled][crate::model::MasterAuthorizedNetworksConfig::private_endpoint_enforcement_enabled].
6733    pub fn set_or_clear_private_endpoint_enforcement_enabled<T>(
6734        mut self,
6735        v: std::option::Option<T>,
6736    ) -> Self
6737    where
6738        T: std::convert::Into<bool>,
6739    {
6740        self.private_endpoint_enforcement_enabled = v.map(|x| x.into());
6741        self
6742    }
6743}
6744
6745impl wkt::message::Message for MasterAuthorizedNetworksConfig {
6746    fn typename() -> &'static str {
6747        "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig"
6748    }
6749}
6750
6751/// Defines additional types related to [MasterAuthorizedNetworksConfig].
6752pub mod master_authorized_networks_config {
6753    #[allow(unused_imports)]
6754    use super::*;
6755
6756    /// CidrBlock contains an optional name and one CIDR block.
6757    #[derive(Clone, Default, PartialEq)]
6758    #[non_exhaustive]
6759    pub struct CidrBlock {
6760        /// display_name is an optional field for users to identify CIDR blocks.
6761        pub display_name: std::string::String,
6762
6763        /// cidr_block must be specified in CIDR notation.
6764        pub cidr_block: std::string::String,
6765
6766        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6767    }
6768
6769    impl CidrBlock {
6770        pub fn new() -> Self {
6771            std::default::Default::default()
6772        }
6773
6774        /// Sets the value of [display_name][crate::model::master_authorized_networks_config::CidrBlock::display_name].
6775        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
6776            mut self,
6777            v: T,
6778        ) -> Self {
6779            self.display_name = v.into();
6780            self
6781        }
6782
6783        /// Sets the value of [cidr_block][crate::model::master_authorized_networks_config::CidrBlock::cidr_block].
6784        pub fn set_cidr_block<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6785            self.cidr_block = v.into();
6786            self
6787        }
6788    }
6789
6790    impl wkt::message::Message for CidrBlock {
6791        fn typename() -> &'static str {
6792            "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock"
6793        }
6794    }
6795}
6796
6797/// Configuration for the legacy Attribute Based Access Control authorization
6798/// mode.
6799#[derive(Clone, Default, PartialEq)]
6800#[non_exhaustive]
6801pub struct LegacyAbac {
6802    /// Whether the ABAC authorizer is enabled for this cluster. When enabled,
6803    /// identities in the system, including service accounts, nodes, and
6804    /// controllers, will have statically granted permissions beyond those
6805    /// provided by the RBAC configuration or IAM.
6806    pub enabled: bool,
6807
6808    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6809}
6810
6811impl LegacyAbac {
6812    pub fn new() -> Self {
6813        std::default::Default::default()
6814    }
6815
6816    /// Sets the value of [enabled][crate::model::LegacyAbac::enabled].
6817    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6818        self.enabled = v.into();
6819        self
6820    }
6821}
6822
6823impl wkt::message::Message for LegacyAbac {
6824    fn typename() -> &'static str {
6825        "type.googleapis.com/google.container.v1.LegacyAbac"
6826    }
6827}
6828
6829/// Configuration options for the NetworkPolicy feature.
6830/// <https://kubernetes.io/docs/concepts/services-networking/networkpolicies/>
6831#[derive(Clone, Default, PartialEq)]
6832#[non_exhaustive]
6833pub struct NetworkPolicy {
6834    /// The selected network policy provider.
6835    pub provider: crate::model::network_policy::Provider,
6836
6837    /// Whether network policy is enabled on the cluster.
6838    pub enabled: bool,
6839
6840    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6841}
6842
6843impl NetworkPolicy {
6844    pub fn new() -> Self {
6845        std::default::Default::default()
6846    }
6847
6848    /// Sets the value of [provider][crate::model::NetworkPolicy::provider].
6849    pub fn set_provider<T: std::convert::Into<crate::model::network_policy::Provider>>(
6850        mut self,
6851        v: T,
6852    ) -> Self {
6853        self.provider = v.into();
6854        self
6855    }
6856
6857    /// Sets the value of [enabled][crate::model::NetworkPolicy::enabled].
6858    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6859        self.enabled = v.into();
6860        self
6861    }
6862}
6863
6864impl wkt::message::Message for NetworkPolicy {
6865    fn typename() -> &'static str {
6866        "type.googleapis.com/google.container.v1.NetworkPolicy"
6867    }
6868}
6869
6870/// Defines additional types related to [NetworkPolicy].
6871pub mod network_policy {
6872    #[allow(unused_imports)]
6873    use super::*;
6874
6875    /// Allowed Network Policy providers.
6876    ///
6877    /// # Working with unknown values
6878    ///
6879    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6880    /// additional enum variants at any time. Adding new variants is not considered
6881    /// a breaking change. Applications should write their code in anticipation of:
6882    ///
6883    /// - New values appearing in future releases of the client library, **and**
6884    /// - New values received dynamically, without application changes.
6885    ///
6886    /// Please consult the [Working with enums] section in the user guide for some
6887    /// guidelines.
6888    ///
6889    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6890    #[derive(Clone, Debug, PartialEq)]
6891    #[non_exhaustive]
6892    pub enum Provider {
6893        /// Not set
6894        Unspecified,
6895        /// Tigera (Calico Felix).
6896        Calico,
6897        /// If set, the enum was initialized with an unknown value.
6898        ///
6899        /// Applications can examine the value using [Provider::value] or
6900        /// [Provider::name].
6901        UnknownValue(provider::UnknownValue),
6902    }
6903
6904    #[doc(hidden)]
6905    pub mod provider {
6906        #[allow(unused_imports)]
6907        use super::*;
6908        #[derive(Clone, Debug, PartialEq)]
6909        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6910    }
6911
6912    impl Provider {
6913        /// Gets the enum value.
6914        ///
6915        /// Returns `None` if the enum contains an unknown value deserialized from
6916        /// the string representation of enums.
6917        pub fn value(&self) -> std::option::Option<i32> {
6918            match self {
6919                Self::Unspecified => std::option::Option::Some(0),
6920                Self::Calico => std::option::Option::Some(1),
6921                Self::UnknownValue(u) => u.0.value(),
6922            }
6923        }
6924
6925        /// Gets the enum value as a string.
6926        ///
6927        /// Returns `None` if the enum contains an unknown value deserialized from
6928        /// the integer representation of enums.
6929        pub fn name(&self) -> std::option::Option<&str> {
6930            match self {
6931                Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
6932                Self::Calico => std::option::Option::Some("CALICO"),
6933                Self::UnknownValue(u) => u.0.name(),
6934            }
6935        }
6936    }
6937
6938    impl std::default::Default for Provider {
6939        fn default() -> Self {
6940            use std::convert::From;
6941            Self::from(0)
6942        }
6943    }
6944
6945    impl std::fmt::Display for Provider {
6946        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6947            wkt::internal::display_enum(f, self.name(), self.value())
6948        }
6949    }
6950
6951    impl std::convert::From<i32> for Provider {
6952        fn from(value: i32) -> Self {
6953            match value {
6954                0 => Self::Unspecified,
6955                1 => Self::Calico,
6956                _ => Self::UnknownValue(provider::UnknownValue(
6957                    wkt::internal::UnknownEnumValue::Integer(value),
6958                )),
6959            }
6960        }
6961    }
6962
6963    impl std::convert::From<&str> for Provider {
6964        fn from(value: &str) -> Self {
6965            use std::string::ToString;
6966            match value {
6967                "PROVIDER_UNSPECIFIED" => Self::Unspecified,
6968                "CALICO" => Self::Calico,
6969                _ => Self::UnknownValue(provider::UnknownValue(
6970                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6971                )),
6972            }
6973        }
6974    }
6975
6976    impl serde::ser::Serialize for Provider {
6977        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6978        where
6979            S: serde::Serializer,
6980        {
6981            match self {
6982                Self::Unspecified => serializer.serialize_i32(0),
6983                Self::Calico => serializer.serialize_i32(1),
6984                Self::UnknownValue(u) => u.0.serialize(serializer),
6985            }
6986        }
6987    }
6988
6989    impl<'de> serde::de::Deserialize<'de> for Provider {
6990        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6991        where
6992            D: serde::Deserializer<'de>,
6993        {
6994            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
6995                ".google.container.v1.NetworkPolicy.Provider",
6996            ))
6997        }
6998    }
6999}
7000
7001/// Configuration for Binary Authorization.
7002#[derive(Clone, Default, PartialEq)]
7003#[non_exhaustive]
7004pub struct BinaryAuthorization {
7005    /// This field is deprecated. Leave this unset and instead configure
7006    /// BinaryAuthorization using evaluation_mode. If evaluation_mode is set to
7007    /// anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.
7008    #[deprecated]
7009    pub enabled: bool,
7010
7011    /// Mode of operation for binauthz policy evaluation. If unspecified, defaults
7012    /// to DISABLED.
7013    pub evaluation_mode: crate::model::binary_authorization::EvaluationMode,
7014
7015    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7016}
7017
7018impl BinaryAuthorization {
7019    pub fn new() -> Self {
7020        std::default::Default::default()
7021    }
7022
7023    /// Sets the value of [enabled][crate::model::BinaryAuthorization::enabled].
7024    #[deprecated]
7025    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7026        self.enabled = v.into();
7027        self
7028    }
7029
7030    /// Sets the value of [evaluation_mode][crate::model::BinaryAuthorization::evaluation_mode].
7031    pub fn set_evaluation_mode<
7032        T: std::convert::Into<crate::model::binary_authorization::EvaluationMode>,
7033    >(
7034        mut self,
7035        v: T,
7036    ) -> Self {
7037        self.evaluation_mode = v.into();
7038        self
7039    }
7040}
7041
7042impl wkt::message::Message for BinaryAuthorization {
7043    fn typename() -> &'static str {
7044        "type.googleapis.com/google.container.v1.BinaryAuthorization"
7045    }
7046}
7047
7048/// Defines additional types related to [BinaryAuthorization].
7049pub mod binary_authorization {
7050    #[allow(unused_imports)]
7051    use super::*;
7052
7053    /// Binary Authorization mode of operation.
7054    ///
7055    /// # Working with unknown values
7056    ///
7057    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7058    /// additional enum variants at any time. Adding new variants is not considered
7059    /// a breaking change. Applications should write their code in anticipation of:
7060    ///
7061    /// - New values appearing in future releases of the client library, **and**
7062    /// - New values received dynamically, without application changes.
7063    ///
7064    /// Please consult the [Working with enums] section in the user guide for some
7065    /// guidelines.
7066    ///
7067    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7068    #[derive(Clone, Debug, PartialEq)]
7069    #[non_exhaustive]
7070    pub enum EvaluationMode {
7071        /// Default value
7072        Unspecified,
7073        /// Disable BinaryAuthorization
7074        Disabled,
7075        /// Enforce Kubernetes admission requests with BinaryAuthorization using the
7076        /// project's singleton policy. This is equivalent to setting the
7077        /// enabled boolean to true.
7078        ProjectSingletonPolicyEnforce,
7079        /// If set, the enum was initialized with an unknown value.
7080        ///
7081        /// Applications can examine the value using [EvaluationMode::value] or
7082        /// [EvaluationMode::name].
7083        UnknownValue(evaluation_mode::UnknownValue),
7084    }
7085
7086    #[doc(hidden)]
7087    pub mod evaluation_mode {
7088        #[allow(unused_imports)]
7089        use super::*;
7090        #[derive(Clone, Debug, PartialEq)]
7091        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7092    }
7093
7094    impl EvaluationMode {
7095        /// Gets the enum value.
7096        ///
7097        /// Returns `None` if the enum contains an unknown value deserialized from
7098        /// the string representation of enums.
7099        pub fn value(&self) -> std::option::Option<i32> {
7100            match self {
7101                Self::Unspecified => std::option::Option::Some(0),
7102                Self::Disabled => std::option::Option::Some(1),
7103                Self::ProjectSingletonPolicyEnforce => std::option::Option::Some(2),
7104                Self::UnknownValue(u) => u.0.value(),
7105            }
7106        }
7107
7108        /// Gets the enum value as a string.
7109        ///
7110        /// Returns `None` if the enum contains an unknown value deserialized from
7111        /// the integer representation of enums.
7112        pub fn name(&self) -> std::option::Option<&str> {
7113            match self {
7114                Self::Unspecified => std::option::Option::Some("EVALUATION_MODE_UNSPECIFIED"),
7115                Self::Disabled => std::option::Option::Some("DISABLED"),
7116                Self::ProjectSingletonPolicyEnforce => {
7117                    std::option::Option::Some("PROJECT_SINGLETON_POLICY_ENFORCE")
7118                }
7119                Self::UnknownValue(u) => u.0.name(),
7120            }
7121        }
7122    }
7123
7124    impl std::default::Default for EvaluationMode {
7125        fn default() -> Self {
7126            use std::convert::From;
7127            Self::from(0)
7128        }
7129    }
7130
7131    impl std::fmt::Display for EvaluationMode {
7132        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7133            wkt::internal::display_enum(f, self.name(), self.value())
7134        }
7135    }
7136
7137    impl std::convert::From<i32> for EvaluationMode {
7138        fn from(value: i32) -> Self {
7139            match value {
7140                0 => Self::Unspecified,
7141                1 => Self::Disabled,
7142                2 => Self::ProjectSingletonPolicyEnforce,
7143                _ => Self::UnknownValue(evaluation_mode::UnknownValue(
7144                    wkt::internal::UnknownEnumValue::Integer(value),
7145                )),
7146            }
7147        }
7148    }
7149
7150    impl std::convert::From<&str> for EvaluationMode {
7151        fn from(value: &str) -> Self {
7152            use std::string::ToString;
7153            match value {
7154                "EVALUATION_MODE_UNSPECIFIED" => Self::Unspecified,
7155                "DISABLED" => Self::Disabled,
7156                "PROJECT_SINGLETON_POLICY_ENFORCE" => Self::ProjectSingletonPolicyEnforce,
7157                _ => Self::UnknownValue(evaluation_mode::UnknownValue(
7158                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7159                )),
7160            }
7161        }
7162    }
7163
7164    impl serde::ser::Serialize for EvaluationMode {
7165        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7166        where
7167            S: serde::Serializer,
7168        {
7169            match self {
7170                Self::Unspecified => serializer.serialize_i32(0),
7171                Self::Disabled => serializer.serialize_i32(1),
7172                Self::ProjectSingletonPolicyEnforce => serializer.serialize_i32(2),
7173                Self::UnknownValue(u) => u.0.serialize(serializer),
7174            }
7175        }
7176    }
7177
7178    impl<'de> serde::de::Deserialize<'de> for EvaluationMode {
7179        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7180        where
7181            D: serde::Deserializer<'de>,
7182        {
7183            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationMode>::new(
7184                ".google.container.v1.BinaryAuthorization.EvaluationMode",
7185            ))
7186        }
7187    }
7188}
7189
7190/// [PRIVATE FIELD]
7191/// Config for pod CIDR size overprovisioning.
7192#[derive(Clone, Default, PartialEq)]
7193#[non_exhaustive]
7194pub struct PodCIDROverprovisionConfig {
7195    /// Whether Pod CIDR overprovisioning is disabled.
7196    /// Note: Pod CIDR overprovisioning is enabled by default.
7197    pub disable: bool,
7198
7199    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7200}
7201
7202impl PodCIDROverprovisionConfig {
7203    pub fn new() -> Self {
7204        std::default::Default::default()
7205    }
7206
7207    /// Sets the value of [disable][crate::model::PodCIDROverprovisionConfig::disable].
7208    pub fn set_disable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7209        self.disable = v.into();
7210        self
7211    }
7212}
7213
7214impl wkt::message::Message for PodCIDROverprovisionConfig {
7215    fn typename() -> &'static str {
7216        "type.googleapis.com/google.container.v1.PodCIDROverprovisionConfig"
7217    }
7218}
7219
7220/// Configuration for controlling how IPs are allocated in the cluster.
7221#[derive(Clone, Default, PartialEq)]
7222#[non_exhaustive]
7223pub struct IPAllocationPolicy {
7224    /// Whether alias IPs will be used for pod IPs in the cluster.
7225    /// This is used in conjunction with use_routes. It cannot
7226    /// be true if use_routes is true. If both use_ip_aliases and use_routes are
7227    /// false, then the server picks the default IP allocation mode
7228    pub use_ip_aliases: bool,
7229
7230    /// Whether a new subnetwork will be created automatically for the cluster.
7231    ///
7232    /// This field is only applicable when `use_ip_aliases` is true.
7233    pub create_subnetwork: bool,
7234
7235    /// A custom subnetwork name to be used if `create_subnetwork` is true.  If
7236    /// this field is empty, then an automatic name will be chosen for the new
7237    /// subnetwork.
7238    pub subnetwork_name: std::string::String,
7239
7240    /// This field is deprecated, use cluster_ipv4_cidr_block.
7241    #[deprecated]
7242    pub cluster_ipv4_cidr: std::string::String,
7243
7244    /// This field is deprecated, use node_ipv4_cidr_block.
7245    #[deprecated]
7246    pub node_ipv4_cidr: std::string::String,
7247
7248    /// This field is deprecated, use services_ipv4_cidr_block.
7249    #[deprecated]
7250    pub services_ipv4_cidr: std::string::String,
7251
7252    /// The name of the secondary range to be used for the cluster CIDR
7253    /// block.  The secondary range will be used for pod IP
7254    /// addresses. This must be an existing secondary range associated
7255    /// with the cluster subnetwork.
7256    ///
7257    /// This field is only applicable with use_ip_aliases is true and
7258    /// create_subnetwork is false.
7259    pub cluster_secondary_range_name: std::string::String,
7260
7261    /// The name of the secondary range to be used as for the services
7262    /// CIDR block.  The secondary range will be used for service
7263    /// ClusterIPs. This must be an existing secondary range associated
7264    /// with the cluster subnetwork.
7265    ///
7266    /// This field is only applicable with use_ip_aliases is true and
7267    /// create_subnetwork is false.
7268    pub services_secondary_range_name: std::string::String,
7269
7270    /// The IP address range for the cluster pod IPs. If this field is set, then
7271    /// `cluster.cluster_ipv4_cidr` must be left blank.
7272    ///
7273    /// This field is only applicable when `use_ip_aliases` is true.
7274    ///
7275    /// Set to blank to have a range chosen with the default size.
7276    ///
7277    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
7278    /// netmask.
7279    ///
7280    /// Set to a
7281    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7282    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
7283    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
7284    /// to use.
7285    pub cluster_ipv4_cidr_block: std::string::String,
7286
7287    /// The IP address range of the instance IPs in this cluster.
7288    ///
7289    /// This is applicable only if `create_subnetwork` is true.
7290    ///
7291    /// Set to blank to have a range chosen with the default size.
7292    ///
7293    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
7294    /// netmask.
7295    ///
7296    /// Set to a
7297    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7298    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
7299    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
7300    /// to use.
7301    pub node_ipv4_cidr_block: std::string::String,
7302
7303    /// The IP address range of the services IPs in this cluster. If blank, a range
7304    /// will be automatically chosen with the default size.
7305    ///
7306    /// This field is only applicable when `use_ip_aliases` is true.
7307    ///
7308    /// Set to blank to have a range chosen with the default size.
7309    ///
7310    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
7311    /// netmask.
7312    ///
7313    /// Set to a
7314    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7315    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
7316    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
7317    /// to use.
7318    pub services_ipv4_cidr_block: std::string::String,
7319
7320    /// The IP address range of the Cloud TPUs in this cluster. If unspecified, a
7321    /// range will be automatically chosen with the default size.
7322    ///
7323    /// This field is only applicable when `use_ip_aliases` is true.
7324    ///
7325    /// If unspecified, the range will use the default size.
7326    ///
7327    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
7328    /// netmask.
7329    ///
7330    /// Set to a
7331    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7332    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
7333    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
7334    /// to use.
7335    ///
7336    /// This field is deprecated due to the deprecation of 2VM TPU. The end of life
7337    /// date for 2VM TPU is 2025-04-25.
7338    #[deprecated]
7339    pub tpu_ipv4_cidr_block: std::string::String,
7340
7341    /// Whether routes will be used for pod IPs in the cluster.
7342    /// This is used in conjunction with use_ip_aliases. It cannot be true if
7343    /// use_ip_aliases is true. If both use_ip_aliases and use_routes are false,
7344    /// then the server picks the default IP allocation mode
7345    pub use_routes: bool,
7346
7347    /// The IP stack type of the cluster
7348    pub stack_type: crate::model::StackType,
7349
7350    /// The ipv6 access type (internal or external) when create_subnetwork is true
7351    pub ipv6_access_type: crate::model::IPv6AccessType,
7352
7353    /// [PRIVATE FIELD]
7354    /// Pod CIDR size overprovisioning config for the cluster.
7355    ///
7356    /// Pod CIDR size per node depends on max_pods_per_node. By default, the value
7357    /// of max_pods_per_node is doubled and then rounded off to next power of 2 to
7358    /// get the size of pod CIDR block per node.
7359    /// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
7360    ///
7361    /// This config can disable the doubling of IPs (we still round off to next
7362    /// power of 2)
7363    /// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
7364    /// overprovisioning is disabled.
7365    pub pod_cidr_overprovision_config:
7366        std::option::Option<crate::model::PodCIDROverprovisionConfig>,
7367
7368    /// Output only. The subnet's IPv6 CIDR block used by nodes and pods.
7369    pub subnet_ipv6_cidr_block: std::string::String,
7370
7371    /// Output only. The services IPv6 CIDR block for the cluster.
7372    pub services_ipv6_cidr_block: std::string::String,
7373
7374    /// Output only. The additional pod ranges that are added to the cluster.
7375    /// These pod ranges can be used by new node pools to allocate pod IPs
7376    /// automatically. Once the range is removed it will not show up in
7377    /// IPAllocationPolicy.
7378    pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
7379
7380    /// Output only. The utilization of the cluster default IPv4 range for the
7381    /// pod. The ratio is Usage/[Total number of IPs in the secondary range],
7382    /// Usage=numNodes*numZones*podIPsPerNode.
7383    pub default_pod_ipv4_range_utilization: f64,
7384
7385    /// Output only. The additional IP ranges that are added to the cluster.
7386    /// These IP ranges can be used by new node pools to allocate node and pod IPs
7387    /// automatically.
7388    /// Each AdditionalIPRangesConfig corresponds to a single subnetwork.
7389    /// Once a range is removed it will not show up in IPAllocationPolicy.
7390    pub additional_ip_ranges_configs: std::vec::Vec<crate::model::AdditionalIPRangesConfig>,
7391
7392    /// Optional. AutoIpamConfig contains all information related to Auto IPAM
7393    pub auto_ipam_config: std::option::Option<crate::model::AutoIpamConfig>,
7394
7395    /// Cluster-level network tier configuration is used to determine the default
7396    /// network tier for external IP addresses on cluster resources, such as node
7397    /// pools and load balancers.
7398    pub network_tier_config: std::option::Option<crate::model::NetworkTierConfig>,
7399
7400    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7401}
7402
7403impl IPAllocationPolicy {
7404    pub fn new() -> Self {
7405        std::default::Default::default()
7406    }
7407
7408    /// Sets the value of [use_ip_aliases][crate::model::IPAllocationPolicy::use_ip_aliases].
7409    pub fn set_use_ip_aliases<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7410        self.use_ip_aliases = v.into();
7411        self
7412    }
7413
7414    /// Sets the value of [create_subnetwork][crate::model::IPAllocationPolicy::create_subnetwork].
7415    pub fn set_create_subnetwork<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7416        self.create_subnetwork = v.into();
7417        self
7418    }
7419
7420    /// Sets the value of [subnetwork_name][crate::model::IPAllocationPolicy::subnetwork_name].
7421    pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7422        self.subnetwork_name = v.into();
7423        self
7424    }
7425
7426    /// Sets the value of [cluster_ipv4_cidr][crate::model::IPAllocationPolicy::cluster_ipv4_cidr].
7427    #[deprecated]
7428    pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
7429        mut self,
7430        v: T,
7431    ) -> Self {
7432        self.cluster_ipv4_cidr = v.into();
7433        self
7434    }
7435
7436    /// Sets the value of [node_ipv4_cidr][crate::model::IPAllocationPolicy::node_ipv4_cidr].
7437    #[deprecated]
7438    pub fn set_node_ipv4_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7439        self.node_ipv4_cidr = v.into();
7440        self
7441    }
7442
7443    /// Sets the value of [services_ipv4_cidr][crate::model::IPAllocationPolicy::services_ipv4_cidr].
7444    #[deprecated]
7445    pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
7446        mut self,
7447        v: T,
7448    ) -> Self {
7449        self.services_ipv4_cidr = v.into();
7450        self
7451    }
7452
7453    /// Sets the value of [cluster_secondary_range_name][crate::model::IPAllocationPolicy::cluster_secondary_range_name].
7454    pub fn set_cluster_secondary_range_name<T: std::convert::Into<std::string::String>>(
7455        mut self,
7456        v: T,
7457    ) -> Self {
7458        self.cluster_secondary_range_name = v.into();
7459        self
7460    }
7461
7462    /// Sets the value of [services_secondary_range_name][crate::model::IPAllocationPolicy::services_secondary_range_name].
7463    pub fn set_services_secondary_range_name<T: std::convert::Into<std::string::String>>(
7464        mut self,
7465        v: T,
7466    ) -> Self {
7467        self.services_secondary_range_name = v.into();
7468        self
7469    }
7470
7471    /// Sets the value of [cluster_ipv4_cidr_block][crate::model::IPAllocationPolicy::cluster_ipv4_cidr_block].
7472    pub fn set_cluster_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7473        mut self,
7474        v: T,
7475    ) -> Self {
7476        self.cluster_ipv4_cidr_block = v.into();
7477        self
7478    }
7479
7480    /// Sets the value of [node_ipv4_cidr_block][crate::model::IPAllocationPolicy::node_ipv4_cidr_block].
7481    pub fn set_node_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7482        mut self,
7483        v: T,
7484    ) -> Self {
7485        self.node_ipv4_cidr_block = v.into();
7486        self
7487    }
7488
7489    /// Sets the value of [services_ipv4_cidr_block][crate::model::IPAllocationPolicy::services_ipv4_cidr_block].
7490    pub fn set_services_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7491        mut self,
7492        v: T,
7493    ) -> Self {
7494        self.services_ipv4_cidr_block = v.into();
7495        self
7496    }
7497
7498    /// Sets the value of [tpu_ipv4_cidr_block][crate::model::IPAllocationPolicy::tpu_ipv4_cidr_block].
7499    #[deprecated]
7500    pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7501        mut self,
7502        v: T,
7503    ) -> Self {
7504        self.tpu_ipv4_cidr_block = v.into();
7505        self
7506    }
7507
7508    /// Sets the value of [use_routes][crate::model::IPAllocationPolicy::use_routes].
7509    pub fn set_use_routes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7510        self.use_routes = v.into();
7511        self
7512    }
7513
7514    /// Sets the value of [stack_type][crate::model::IPAllocationPolicy::stack_type].
7515    pub fn set_stack_type<T: std::convert::Into<crate::model::StackType>>(mut self, v: T) -> Self {
7516        self.stack_type = v.into();
7517        self
7518    }
7519
7520    /// Sets the value of [ipv6_access_type][crate::model::IPAllocationPolicy::ipv6_access_type].
7521    pub fn set_ipv6_access_type<T: std::convert::Into<crate::model::IPv6AccessType>>(
7522        mut self,
7523        v: T,
7524    ) -> Self {
7525        self.ipv6_access_type = v.into();
7526        self
7527    }
7528
7529    /// Sets the value of [pod_cidr_overprovision_config][crate::model::IPAllocationPolicy::pod_cidr_overprovision_config].
7530    pub fn set_pod_cidr_overprovision_config<T>(mut self, v: T) -> Self
7531    where
7532        T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
7533    {
7534        self.pod_cidr_overprovision_config = std::option::Option::Some(v.into());
7535        self
7536    }
7537
7538    /// Sets or clears the value of [pod_cidr_overprovision_config][crate::model::IPAllocationPolicy::pod_cidr_overprovision_config].
7539    pub fn set_or_clear_pod_cidr_overprovision_config<T>(
7540        mut self,
7541        v: std::option::Option<T>,
7542    ) -> Self
7543    where
7544        T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
7545    {
7546        self.pod_cidr_overprovision_config = v.map(|x| x.into());
7547        self
7548    }
7549
7550    /// Sets the value of [subnet_ipv6_cidr_block][crate::model::IPAllocationPolicy::subnet_ipv6_cidr_block].
7551    pub fn set_subnet_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
7552        mut self,
7553        v: T,
7554    ) -> Self {
7555        self.subnet_ipv6_cidr_block = v.into();
7556        self
7557    }
7558
7559    /// Sets the value of [services_ipv6_cidr_block][crate::model::IPAllocationPolicy::services_ipv6_cidr_block].
7560    pub fn set_services_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
7561        mut self,
7562        v: T,
7563    ) -> Self {
7564        self.services_ipv6_cidr_block = v.into();
7565        self
7566    }
7567
7568    /// Sets the value of [additional_pod_ranges_config][crate::model::IPAllocationPolicy::additional_pod_ranges_config].
7569    pub fn set_additional_pod_ranges_config<T>(mut self, v: T) -> Self
7570    where
7571        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
7572    {
7573        self.additional_pod_ranges_config = std::option::Option::Some(v.into());
7574        self
7575    }
7576
7577    /// Sets or clears the value of [additional_pod_ranges_config][crate::model::IPAllocationPolicy::additional_pod_ranges_config].
7578    pub fn set_or_clear_additional_pod_ranges_config<T>(mut self, v: std::option::Option<T>) -> Self
7579    where
7580        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
7581    {
7582        self.additional_pod_ranges_config = v.map(|x| x.into());
7583        self
7584    }
7585
7586    /// Sets the value of [default_pod_ipv4_range_utilization][crate::model::IPAllocationPolicy::default_pod_ipv4_range_utilization].
7587    pub fn set_default_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(
7588        mut self,
7589        v: T,
7590    ) -> Self {
7591        self.default_pod_ipv4_range_utilization = v.into();
7592        self
7593    }
7594
7595    /// Sets the value of [additional_ip_ranges_configs][crate::model::IPAllocationPolicy::additional_ip_ranges_configs].
7596    pub fn set_additional_ip_ranges_configs<T, V>(mut self, v: T) -> Self
7597    where
7598        T: std::iter::IntoIterator<Item = V>,
7599        V: std::convert::Into<crate::model::AdditionalIPRangesConfig>,
7600    {
7601        use std::iter::Iterator;
7602        self.additional_ip_ranges_configs = v.into_iter().map(|i| i.into()).collect();
7603        self
7604    }
7605
7606    /// Sets the value of [auto_ipam_config][crate::model::IPAllocationPolicy::auto_ipam_config].
7607    pub fn set_auto_ipam_config<T>(mut self, v: T) -> Self
7608    where
7609        T: std::convert::Into<crate::model::AutoIpamConfig>,
7610    {
7611        self.auto_ipam_config = std::option::Option::Some(v.into());
7612        self
7613    }
7614
7615    /// Sets or clears the value of [auto_ipam_config][crate::model::IPAllocationPolicy::auto_ipam_config].
7616    pub fn set_or_clear_auto_ipam_config<T>(mut self, v: std::option::Option<T>) -> Self
7617    where
7618        T: std::convert::Into<crate::model::AutoIpamConfig>,
7619    {
7620        self.auto_ipam_config = v.map(|x| x.into());
7621        self
7622    }
7623
7624    /// Sets the value of [network_tier_config][crate::model::IPAllocationPolicy::network_tier_config].
7625    pub fn set_network_tier_config<T>(mut self, v: T) -> Self
7626    where
7627        T: std::convert::Into<crate::model::NetworkTierConfig>,
7628    {
7629        self.network_tier_config = std::option::Option::Some(v.into());
7630        self
7631    }
7632
7633    /// Sets or clears the value of [network_tier_config][crate::model::IPAllocationPolicy::network_tier_config].
7634    pub fn set_or_clear_network_tier_config<T>(mut self, v: std::option::Option<T>) -> Self
7635    where
7636        T: std::convert::Into<crate::model::NetworkTierConfig>,
7637    {
7638        self.network_tier_config = v.map(|x| x.into());
7639        self
7640    }
7641}
7642
7643impl wkt::message::Message for IPAllocationPolicy {
7644    fn typename() -> &'static str {
7645        "type.googleapis.com/google.container.v1.IPAllocationPolicy"
7646    }
7647}
7648
7649/// A Google Kubernetes Engine cluster.
7650#[derive(Clone, Default, PartialEq)]
7651#[non_exhaustive]
7652pub struct Cluster {
7653    /// The name of this cluster. The name must be unique within this project
7654    /// and location (e.g. zone or region), and can be up to 40 characters with
7655    /// the following restrictions:
7656    ///
7657    /// * Lowercase letters, numbers, and hyphens only.
7658    /// * Must start with a letter.
7659    /// * Must end with a number or a letter.
7660    pub name: std::string::String,
7661
7662    /// An optional description of this cluster.
7663    pub description: std::string::String,
7664
7665    /// The number of nodes to create in this cluster. You must ensure that your
7666    /// Compute Engine [resource
7667    /// quota](https://cloud.google.com/compute/quotas)
7668    /// is sufficient for this number of instances. You must also have available
7669    /// firewall and routes quota.
7670    /// For requests, this field should only be used in lieu of a
7671    /// "node_pool" object, since this configuration (along with the
7672    /// "node_config") will be used to create a "NodePool" object with an
7673    /// auto-generated name. Do not use this and a node_pool at the same time.
7674    ///
7675    /// This field is deprecated, use node_pool.initial_node_count instead.
7676    #[deprecated]
7677    pub initial_node_count: i32,
7678
7679    /// Parameters used in creating the cluster's nodes.
7680    /// For requests, this field should only be used in lieu of a
7681    /// "node_pool" object, since this configuration (along with the
7682    /// "initial_node_count") will be used to create a "NodePool" object with an
7683    /// auto-generated name. Do not use this and a node_pool at the same time.
7684    /// For responses, this field will be populated with the node configuration of
7685    /// the first node pool. (For configuration of each node pool, see
7686    /// `node_pool.config`)
7687    ///
7688    /// If unspecified, the defaults are used.
7689    /// This field is deprecated, use node_pool.config instead.
7690    #[deprecated]
7691    pub node_config: std::option::Option<crate::model::NodeConfig>,
7692
7693    /// The authentication information for accessing the master endpoint.
7694    /// If unspecified, the defaults are used:
7695    /// For clusters before v1.12, if master_auth is unspecified, `username` will
7696    /// be set to "admin", a random password will be generated, and a client
7697    /// certificate will be issued.
7698    pub master_auth: std::option::Option<crate::model::MasterAuth>,
7699
7700    /// The logging service the cluster should use to write logs.
7701    /// Currently available options:
7702    ///
7703    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
7704    ///   service with a Kubernetes-native resource model
7705    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
7706    ///   available as of GKE 1.15).
7707    /// * `none` - no logs will be exported from the cluster.
7708    ///
7709    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
7710    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
7711    pub logging_service: std::string::String,
7712
7713    /// The monitoring service the cluster should use to write metrics.
7714    /// Currently available options:
7715    ///
7716    /// * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring
7717    ///   service with a Kubernetes-native resource model
7718    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
7719    ///   longer available as of GKE 1.15).
7720    /// * `none` - No metrics will be exported from the cluster.
7721    ///
7722    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
7723    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
7724    pub monitoring_service: std::string::String,
7725
7726    /// The name of the Google Compute Engine
7727    /// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
7728    /// to which the cluster is connected. If left unspecified, the `default`
7729    /// network will be used.
7730    pub network: std::string::String,
7731
7732    /// The IP address range of the container pods in this cluster, in
7733    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7734    /// notation (e.g. `10.96.0.0/14`). Leave blank to have
7735    /// one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
7736    pub cluster_ipv4_cidr: std::string::String,
7737
7738    /// Configurations for the various addons available to run in the cluster.
7739    pub addons_config: std::option::Option<crate::model::AddonsConfig>,
7740
7741    /// The name of the Google Compute Engine
7742    /// [subnetwork](https://cloud.google.com/compute/docs/subnetworks)
7743    /// to which the cluster is connected.
7744    pub subnetwork: std::string::String,
7745
7746    /// The node pools associated with this cluster.
7747    /// This field should not be set if "node_config" or "initial_node_count" are
7748    /// specified.
7749    pub node_pools: std::vec::Vec<crate::model::NodePool>,
7750
7751    /// The list of Google Compute Engine
7752    /// [zones](https://cloud.google.com/compute/docs/zones#available)
7753    /// in which the cluster's nodes should be located.
7754    ///
7755    /// This field provides a default value if
7756    /// [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
7757    /// are not specified during node pool creation.
7758    ///
7759    /// Warning: changing cluster locations will update the
7760    /// [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
7761    /// of all node pools and will result in nodes being added and/or removed.
7762    pub locations: std::vec::Vec<std::string::String>,
7763
7764    /// Kubernetes alpha features are enabled on this cluster. This includes alpha
7765    /// API groups (e.g. v1alpha1) and features that may not be production ready in
7766    /// the kubernetes version of the master and nodes.
7767    /// The cluster has no SLA for uptime and master/node upgrades are disabled.
7768    /// Alpha enabled clusters are automatically deleted thirty days after
7769    /// creation.
7770    pub enable_kubernetes_alpha: bool,
7771
7772    /// The list of user specified Kubernetes feature gates.
7773    /// Each string represents the activation status of a feature gate (e.g.
7774    /// "featureX=true" or "featureX=false")
7775    pub alpha_cluster_feature_gates: std::vec::Vec<std::string::String>,
7776
7777    /// The resource labels for the cluster to use to annotate any related
7778    /// Google Compute Engine resources.
7779    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
7780
7781    /// The fingerprint of the set of labels for this cluster.
7782    pub label_fingerprint: std::string::String,
7783
7784    /// Configuration for the legacy ABAC authorization mode.
7785    pub legacy_abac: std::option::Option<crate::model::LegacyAbac>,
7786
7787    /// Configuration options for the NetworkPolicy feature.
7788    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
7789
7790    /// Configuration for cluster IP allocation.
7791    pub ip_allocation_policy: std::option::Option<crate::model::IPAllocationPolicy>,
7792
7793    /// The configuration options for master authorized networks feature.
7794    ///
7795    /// Deprecated: Use
7796    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config]
7797    /// instead.
7798    ///
7799    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::authorized_networks_config
7800    #[deprecated]
7801    pub master_authorized_networks_config:
7802        std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
7803
7804    /// Configure the maintenance policy for this cluster.
7805    pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
7806
7807    /// Configuration for Binary Authorization.
7808    pub binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
7809
7810    /// Cluster-level autoscaling configuration.
7811    pub autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
7812
7813    /// Configuration for cluster networking.
7814    pub network_config: std::option::Option<crate::model::NetworkConfig>,
7815
7816    /// The default constraint on the maximum number of pods that can be run
7817    /// simultaneously on a node in the node pool of this cluster. Only honored
7818    /// if cluster created with IP Alias support.
7819    pub default_max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
7820
7821    /// Configuration for exporting resource usages. Resource usage export is
7822    /// disabled when this config is unspecified.
7823    pub resource_usage_export_config: std::option::Option<crate::model::ResourceUsageExportConfig>,
7824
7825    /// Configuration controlling RBAC group membership information.
7826    pub authenticator_groups_config: std::option::Option<crate::model::AuthenticatorGroupsConfig>,
7827
7828    /// Configuration for private cluster.
7829    pub private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
7830
7831    /// Configuration of etcd encryption.
7832    pub database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
7833
7834    /// Cluster-level Vertical Pod Autoscaling configuration.
7835    pub vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
7836
7837    /// Shielded Nodes configuration.
7838    pub shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
7839
7840    /// Release channel configuration. If left unspecified on cluster creation and
7841    /// a version is specified, the cluster is enrolled in the most mature release
7842    /// channel where the version is available (first checking STABLE, then
7843    /// REGULAR, and finally RAPID). Otherwise, if no release channel
7844    /// configuration and no version is specified, the cluster is enrolled in the
7845    /// REGULAR channel with its default version.
7846    pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
7847
7848    /// Configuration for the use of Kubernetes Service Accounts in IAM policies.
7849    pub workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
7850
7851    /// Configuration for issuance of mTLS keys and certificates to Kubernetes
7852    /// pods.
7853    pub mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
7854
7855    /// Configuration for the fine-grained cost management feature.
7856    pub cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
7857
7858    /// Notification configuration of the cluster.
7859    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
7860
7861    /// Configuration of Confidential Nodes.
7862    /// All the nodes in the cluster will be Confidential VM once enabled.
7863    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
7864
7865    /// Configuration for Identity Service component.
7866    pub identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
7867
7868    /// Output only. Server-defined URL for the resource.
7869    pub self_link: std::string::String,
7870
7871    /// Output only. The name of the Google Compute Engine
7872    /// [zone](https://cloud.google.com/compute/docs/zones#available)
7873    /// in which the cluster resides. This field is deprecated, use location
7874    /// instead.
7875    #[deprecated]
7876    pub zone: std::string::String,
7877
7878    /// Output only. The IP address of this cluster's master endpoint.
7879    /// The endpoint can be accessed from the internet at
7880    /// `https://username:password@endpoint/`.
7881    ///
7882    /// See the `masterAuth` property of this resource for username and
7883    /// password information.
7884    pub endpoint: std::string::String,
7885
7886    /// The initial Kubernetes version for this cluster.  Valid versions are those
7887    /// found in validMasterVersions returned by getServerConfig.  The version can
7888    /// be upgraded over time; such upgrades are reflected in
7889    /// currentMasterVersion and currentNodeVersion.
7890    ///
7891    /// Users may specify either explicit versions offered by
7892    /// Kubernetes Engine or version aliases, which have the following behavior:
7893    ///
7894    /// - "latest": picks the highest valid Kubernetes version
7895    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
7896    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
7897    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
7898    /// - "","-": picks the default Kubernetes version
7899    pub initial_cluster_version: std::string::String,
7900
7901    /// Output only. The current software version of the master endpoint.
7902    pub current_master_version: std::string::String,
7903
7904    /// Output only. Deprecated, use
7905    /// [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools)
7906    /// instead. The current version of the node software components. If they are
7907    /// currently at multiple versions because they're in the process of being
7908    /// upgraded, this reflects the minimum version of all nodes.
7909    #[deprecated]
7910    pub current_node_version: std::string::String,
7911
7912    /// Output only. The time the cluster was created, in
7913    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
7914    pub create_time: std::string::String,
7915
7916    /// Output only. The current status of this cluster.
7917    pub status: crate::model::cluster::Status,
7918
7919    /// Output only. Deprecated. Use conditions instead.
7920    /// Additional information about the current status of this
7921    /// cluster, if available.
7922    #[deprecated]
7923    pub status_message: std::string::String,
7924
7925    /// Output only. The size of the address space on each node for hosting
7926    /// containers. This is provisioned from within the `container_ipv4_cidr`
7927    /// range. This field will only be set when cluster is in route-based network
7928    /// mode.
7929    pub node_ipv4_cidr_size: i32,
7930
7931    /// Output only. The IP address range of the Kubernetes services in
7932    /// this cluster, in
7933    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7934    /// notation (e.g. `1.2.3.4/29`). Service addresses are
7935    /// typically put in the last `/16` from the container CIDR.
7936    pub services_ipv4_cidr: std::string::String,
7937
7938    /// Output only. Deprecated. Use node_pools.instance_group_urls.
7939    #[deprecated]
7940    pub instance_group_urls: std::vec::Vec<std::string::String>,
7941
7942    /// Output only. The number of nodes currently in the cluster. Deprecated.
7943    /// Call Kubernetes API directly to retrieve node information.
7944    #[deprecated]
7945    pub current_node_count: i32,
7946
7947    /// Output only. The time the cluster will be automatically
7948    /// deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
7949    pub expire_time: std::string::String,
7950
7951    /// Output only. The name of the Google Compute Engine
7952    /// [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
7953    /// or
7954    /// [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
7955    /// in which the cluster resides.
7956    pub location: std::string::String,
7957
7958    /// Enable the ability to use Cloud TPUs in this cluster.
7959    /// This field is deprecated due to the deprecation of 2VM TPU. The end of life
7960    /// date for 2VM TPU is 2025-04-25.
7961    #[deprecated]
7962    pub enable_tpu: bool,
7963
7964    /// Output only. The IP address range of the Cloud TPUs in this cluster, in
7965    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7966    /// notation (e.g. `1.2.3.4/29`).
7967    /// This field is deprecated due to the deprecation of 2VM TPU. The end of life
7968    /// date for 2VM TPU is 2025-04-25.
7969    #[deprecated]
7970    pub tpu_ipv4_cidr_block: std::string::String,
7971
7972    /// Which conditions caused the current cluster state.
7973    pub conditions: std::vec::Vec<crate::model::StatusCondition>,
7974
7975    /// Autopilot configuration for the cluster.
7976    pub autopilot: std::option::Option<crate::model::Autopilot>,
7977
7978    /// Output only. Unique id for the cluster.
7979    pub id: std::string::String,
7980
7981    /// Default NodePool settings for the entire cluster. These settings are
7982    /// overridden if specified on the specific NodePool object.
7983    pub node_pool_defaults: std::option::Option<crate::model::NodePoolDefaults>,
7984
7985    /// Logging configuration for the cluster.
7986    pub logging_config: std::option::Option<crate::model::LoggingConfig>,
7987
7988    /// Monitoring configuration for the cluster.
7989    pub monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
7990
7991    /// Node pool configs that apply to all auto-provisioned node pools
7992    /// in autopilot clusters and node auto-provisioning enabled clusters.
7993    pub node_pool_auto_config: std::option::Option<crate::model::NodePoolAutoConfig>,
7994
7995    /// The config for pod autoscaling.
7996    pub pod_autoscaling: std::option::Option<crate::model::PodAutoscaling>,
7997
7998    /// This checksum is computed by the server based on the value of cluster
7999    /// fields, and may be sent on update requests to ensure the client has an
8000    /// up-to-date value before proceeding.
8001    pub etag: std::string::String,
8002
8003    /// Fleet information for the cluster.
8004    pub fleet: std::option::Option<crate::model::Fleet>,
8005
8006    /// Enable/Disable Security Posture API features for the cluster.
8007    pub security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
8008
8009    /// Configuration for all cluster's control plane endpoints.
8010    pub control_plane_endpoints_config:
8011        std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
8012
8013    /// Beta APIs Config
8014    pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
8015
8016    /// GKE Enterprise Configuration.
8017    ///
8018    /// Deprecated: GKE Enterprise features are now available without an Enterprise
8019    /// tier.
8020    #[deprecated]
8021    pub enterprise_config: std::option::Option<crate::model::EnterpriseConfig>,
8022
8023    /// Secret CSI driver configuration.
8024    pub secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
8025
8026    /// Enable/Disable Compliance Posture features for the cluster.
8027    pub compliance_posture_config: std::option::Option<crate::model::CompliancePostureConfig>,
8028
8029    /// Output only. Reserved for future use.
8030    pub satisfies_pzs: std::option::Option<bool>,
8031
8032    /// Output only. Reserved for future use.
8033    pub satisfies_pzi: std::option::Option<bool>,
8034
8035    /// The Custom keys configuration for the cluster.
8036    pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
8037
8038    /// RBACBindingConfig allows user to restrict ClusterRoleBindings an
8039    /// RoleBindings that can be created.
8040    pub rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
8041
8042    /// Configuration for GKE auto upgrades.
8043    pub gke_auto_upgrade_config: std::option::Option<crate::model::GkeAutoUpgradeConfig>,
8044
8045    /// Configuration for limiting anonymous access to all endpoints except the
8046    /// health checks.
8047    pub anonymous_authentication_config:
8048        std::option::Option<crate::model::AnonymousAuthenticationConfig>,
8049
8050    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8051}
8052
8053impl Cluster {
8054    pub fn new() -> Self {
8055        std::default::Default::default()
8056    }
8057
8058    /// Sets the value of [name][crate::model::Cluster::name].
8059    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8060        self.name = v.into();
8061        self
8062    }
8063
8064    /// Sets the value of [description][crate::model::Cluster::description].
8065    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8066        self.description = v.into();
8067        self
8068    }
8069
8070    /// Sets the value of [initial_node_count][crate::model::Cluster::initial_node_count].
8071    #[deprecated]
8072    pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8073        self.initial_node_count = v.into();
8074        self
8075    }
8076
8077    /// Sets the value of [node_config][crate::model::Cluster::node_config].
8078    #[deprecated]
8079    pub fn set_node_config<T>(mut self, v: T) -> Self
8080    where
8081        T: std::convert::Into<crate::model::NodeConfig>,
8082    {
8083        self.node_config = std::option::Option::Some(v.into());
8084        self
8085    }
8086
8087    /// Sets or clears the value of [node_config][crate::model::Cluster::node_config].
8088    #[deprecated]
8089    pub fn set_or_clear_node_config<T>(mut self, v: std::option::Option<T>) -> Self
8090    where
8091        T: std::convert::Into<crate::model::NodeConfig>,
8092    {
8093        self.node_config = v.map(|x| x.into());
8094        self
8095    }
8096
8097    /// Sets the value of [master_auth][crate::model::Cluster::master_auth].
8098    pub fn set_master_auth<T>(mut self, v: T) -> Self
8099    where
8100        T: std::convert::Into<crate::model::MasterAuth>,
8101    {
8102        self.master_auth = std::option::Option::Some(v.into());
8103        self
8104    }
8105
8106    /// Sets or clears the value of [master_auth][crate::model::Cluster::master_auth].
8107    pub fn set_or_clear_master_auth<T>(mut self, v: std::option::Option<T>) -> Self
8108    where
8109        T: std::convert::Into<crate::model::MasterAuth>,
8110    {
8111        self.master_auth = v.map(|x| x.into());
8112        self
8113    }
8114
8115    /// Sets the value of [logging_service][crate::model::Cluster::logging_service].
8116    pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8117        self.logging_service = v.into();
8118        self
8119    }
8120
8121    /// Sets the value of [monitoring_service][crate::model::Cluster::monitoring_service].
8122    pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
8123        mut self,
8124        v: T,
8125    ) -> Self {
8126        self.monitoring_service = v.into();
8127        self
8128    }
8129
8130    /// Sets the value of [network][crate::model::Cluster::network].
8131    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8132        self.network = v.into();
8133        self
8134    }
8135
8136    /// Sets the value of [cluster_ipv4_cidr][crate::model::Cluster::cluster_ipv4_cidr].
8137    pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
8138        mut self,
8139        v: T,
8140    ) -> Self {
8141        self.cluster_ipv4_cidr = v.into();
8142        self
8143    }
8144
8145    /// Sets the value of [addons_config][crate::model::Cluster::addons_config].
8146    pub fn set_addons_config<T>(mut self, v: T) -> Self
8147    where
8148        T: std::convert::Into<crate::model::AddonsConfig>,
8149    {
8150        self.addons_config = std::option::Option::Some(v.into());
8151        self
8152    }
8153
8154    /// Sets or clears the value of [addons_config][crate::model::Cluster::addons_config].
8155    pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
8156    where
8157        T: std::convert::Into<crate::model::AddonsConfig>,
8158    {
8159        self.addons_config = v.map(|x| x.into());
8160        self
8161    }
8162
8163    /// Sets the value of [subnetwork][crate::model::Cluster::subnetwork].
8164    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8165        self.subnetwork = v.into();
8166        self
8167    }
8168
8169    /// Sets the value of [node_pools][crate::model::Cluster::node_pools].
8170    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
8171    where
8172        T: std::iter::IntoIterator<Item = V>,
8173        V: std::convert::Into<crate::model::NodePool>,
8174    {
8175        use std::iter::Iterator;
8176        self.node_pools = v.into_iter().map(|i| i.into()).collect();
8177        self
8178    }
8179
8180    /// Sets the value of [locations][crate::model::Cluster::locations].
8181    pub fn set_locations<T, V>(mut self, v: T) -> Self
8182    where
8183        T: std::iter::IntoIterator<Item = V>,
8184        V: std::convert::Into<std::string::String>,
8185    {
8186        use std::iter::Iterator;
8187        self.locations = v.into_iter().map(|i| i.into()).collect();
8188        self
8189    }
8190
8191    /// Sets the value of [enable_kubernetes_alpha][crate::model::Cluster::enable_kubernetes_alpha].
8192    pub fn set_enable_kubernetes_alpha<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8193        self.enable_kubernetes_alpha = v.into();
8194        self
8195    }
8196
8197    /// Sets the value of [alpha_cluster_feature_gates][crate::model::Cluster::alpha_cluster_feature_gates].
8198    pub fn set_alpha_cluster_feature_gates<T, V>(mut self, v: T) -> Self
8199    where
8200        T: std::iter::IntoIterator<Item = V>,
8201        V: std::convert::Into<std::string::String>,
8202    {
8203        use std::iter::Iterator;
8204        self.alpha_cluster_feature_gates = v.into_iter().map(|i| i.into()).collect();
8205        self
8206    }
8207
8208    /// Sets the value of [resource_labels][crate::model::Cluster::resource_labels].
8209    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
8210    where
8211        T: std::iter::IntoIterator<Item = (K, V)>,
8212        K: std::convert::Into<std::string::String>,
8213        V: std::convert::Into<std::string::String>,
8214    {
8215        use std::iter::Iterator;
8216        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8217        self
8218    }
8219
8220    /// Sets the value of [label_fingerprint][crate::model::Cluster::label_fingerprint].
8221    pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
8222        mut self,
8223        v: T,
8224    ) -> Self {
8225        self.label_fingerprint = v.into();
8226        self
8227    }
8228
8229    /// Sets the value of [legacy_abac][crate::model::Cluster::legacy_abac].
8230    pub fn set_legacy_abac<T>(mut self, v: T) -> Self
8231    where
8232        T: std::convert::Into<crate::model::LegacyAbac>,
8233    {
8234        self.legacy_abac = std::option::Option::Some(v.into());
8235        self
8236    }
8237
8238    /// Sets or clears the value of [legacy_abac][crate::model::Cluster::legacy_abac].
8239    pub fn set_or_clear_legacy_abac<T>(mut self, v: std::option::Option<T>) -> Self
8240    where
8241        T: std::convert::Into<crate::model::LegacyAbac>,
8242    {
8243        self.legacy_abac = v.map(|x| x.into());
8244        self
8245    }
8246
8247    /// Sets the value of [network_policy][crate::model::Cluster::network_policy].
8248    pub fn set_network_policy<T>(mut self, v: T) -> Self
8249    where
8250        T: std::convert::Into<crate::model::NetworkPolicy>,
8251    {
8252        self.network_policy = std::option::Option::Some(v.into());
8253        self
8254    }
8255
8256    /// Sets or clears the value of [network_policy][crate::model::Cluster::network_policy].
8257    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
8258    where
8259        T: std::convert::Into<crate::model::NetworkPolicy>,
8260    {
8261        self.network_policy = v.map(|x| x.into());
8262        self
8263    }
8264
8265    /// Sets the value of [ip_allocation_policy][crate::model::Cluster::ip_allocation_policy].
8266    pub fn set_ip_allocation_policy<T>(mut self, v: T) -> Self
8267    where
8268        T: std::convert::Into<crate::model::IPAllocationPolicy>,
8269    {
8270        self.ip_allocation_policy = std::option::Option::Some(v.into());
8271        self
8272    }
8273
8274    /// Sets or clears the value of [ip_allocation_policy][crate::model::Cluster::ip_allocation_policy].
8275    pub fn set_or_clear_ip_allocation_policy<T>(mut self, v: std::option::Option<T>) -> Self
8276    where
8277        T: std::convert::Into<crate::model::IPAllocationPolicy>,
8278    {
8279        self.ip_allocation_policy = v.map(|x| x.into());
8280        self
8281    }
8282
8283    /// Sets the value of [master_authorized_networks_config][crate::model::Cluster::master_authorized_networks_config].
8284    #[deprecated]
8285    pub fn set_master_authorized_networks_config<T>(mut self, v: T) -> Self
8286    where
8287        T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
8288    {
8289        self.master_authorized_networks_config = std::option::Option::Some(v.into());
8290        self
8291    }
8292
8293    /// Sets or clears the value of [master_authorized_networks_config][crate::model::Cluster::master_authorized_networks_config].
8294    #[deprecated]
8295    pub fn set_or_clear_master_authorized_networks_config<T>(
8296        mut self,
8297        v: std::option::Option<T>,
8298    ) -> Self
8299    where
8300        T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
8301    {
8302        self.master_authorized_networks_config = v.map(|x| x.into());
8303        self
8304    }
8305
8306    /// Sets the value of [maintenance_policy][crate::model::Cluster::maintenance_policy].
8307    pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
8308    where
8309        T: std::convert::Into<crate::model::MaintenancePolicy>,
8310    {
8311        self.maintenance_policy = std::option::Option::Some(v.into());
8312        self
8313    }
8314
8315    /// Sets or clears the value of [maintenance_policy][crate::model::Cluster::maintenance_policy].
8316    pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
8317    where
8318        T: std::convert::Into<crate::model::MaintenancePolicy>,
8319    {
8320        self.maintenance_policy = v.map(|x| x.into());
8321        self
8322    }
8323
8324    /// Sets the value of [binary_authorization][crate::model::Cluster::binary_authorization].
8325    pub fn set_binary_authorization<T>(mut self, v: T) -> Self
8326    where
8327        T: std::convert::Into<crate::model::BinaryAuthorization>,
8328    {
8329        self.binary_authorization = std::option::Option::Some(v.into());
8330        self
8331    }
8332
8333    /// Sets or clears the value of [binary_authorization][crate::model::Cluster::binary_authorization].
8334    pub fn set_or_clear_binary_authorization<T>(mut self, v: std::option::Option<T>) -> Self
8335    where
8336        T: std::convert::Into<crate::model::BinaryAuthorization>,
8337    {
8338        self.binary_authorization = v.map(|x| x.into());
8339        self
8340    }
8341
8342    /// Sets the value of [autoscaling][crate::model::Cluster::autoscaling].
8343    pub fn set_autoscaling<T>(mut self, v: T) -> Self
8344    where
8345        T: std::convert::Into<crate::model::ClusterAutoscaling>,
8346    {
8347        self.autoscaling = std::option::Option::Some(v.into());
8348        self
8349    }
8350
8351    /// Sets or clears the value of [autoscaling][crate::model::Cluster::autoscaling].
8352    pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8353    where
8354        T: std::convert::Into<crate::model::ClusterAutoscaling>,
8355    {
8356        self.autoscaling = v.map(|x| x.into());
8357        self
8358    }
8359
8360    /// Sets the value of [network_config][crate::model::Cluster::network_config].
8361    pub fn set_network_config<T>(mut self, v: T) -> Self
8362    where
8363        T: std::convert::Into<crate::model::NetworkConfig>,
8364    {
8365        self.network_config = std::option::Option::Some(v.into());
8366        self
8367    }
8368
8369    /// Sets or clears the value of [network_config][crate::model::Cluster::network_config].
8370    pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
8371    where
8372        T: std::convert::Into<crate::model::NetworkConfig>,
8373    {
8374        self.network_config = v.map(|x| x.into());
8375        self
8376    }
8377
8378    /// Sets the value of [default_max_pods_constraint][crate::model::Cluster::default_max_pods_constraint].
8379    pub fn set_default_max_pods_constraint<T>(mut self, v: T) -> Self
8380    where
8381        T: std::convert::Into<crate::model::MaxPodsConstraint>,
8382    {
8383        self.default_max_pods_constraint = std::option::Option::Some(v.into());
8384        self
8385    }
8386
8387    /// Sets or clears the value of [default_max_pods_constraint][crate::model::Cluster::default_max_pods_constraint].
8388    pub fn set_or_clear_default_max_pods_constraint<T>(mut self, v: std::option::Option<T>) -> Self
8389    where
8390        T: std::convert::Into<crate::model::MaxPodsConstraint>,
8391    {
8392        self.default_max_pods_constraint = v.map(|x| x.into());
8393        self
8394    }
8395
8396    /// Sets the value of [resource_usage_export_config][crate::model::Cluster::resource_usage_export_config].
8397    pub fn set_resource_usage_export_config<T>(mut self, v: T) -> Self
8398    where
8399        T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
8400    {
8401        self.resource_usage_export_config = std::option::Option::Some(v.into());
8402        self
8403    }
8404
8405    /// Sets or clears the value of [resource_usage_export_config][crate::model::Cluster::resource_usage_export_config].
8406    pub fn set_or_clear_resource_usage_export_config<T>(mut self, v: std::option::Option<T>) -> Self
8407    where
8408        T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
8409    {
8410        self.resource_usage_export_config = v.map(|x| x.into());
8411        self
8412    }
8413
8414    /// Sets the value of [authenticator_groups_config][crate::model::Cluster::authenticator_groups_config].
8415    pub fn set_authenticator_groups_config<T>(mut self, v: T) -> Self
8416    where
8417        T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
8418    {
8419        self.authenticator_groups_config = std::option::Option::Some(v.into());
8420        self
8421    }
8422
8423    /// Sets or clears the value of [authenticator_groups_config][crate::model::Cluster::authenticator_groups_config].
8424    pub fn set_or_clear_authenticator_groups_config<T>(mut self, v: std::option::Option<T>) -> Self
8425    where
8426        T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
8427    {
8428        self.authenticator_groups_config = v.map(|x| x.into());
8429        self
8430    }
8431
8432    /// Sets the value of [private_cluster_config][crate::model::Cluster::private_cluster_config].
8433    pub fn set_private_cluster_config<T>(mut self, v: T) -> Self
8434    where
8435        T: std::convert::Into<crate::model::PrivateClusterConfig>,
8436    {
8437        self.private_cluster_config = std::option::Option::Some(v.into());
8438        self
8439    }
8440
8441    /// Sets or clears the value of [private_cluster_config][crate::model::Cluster::private_cluster_config].
8442    pub fn set_or_clear_private_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
8443    where
8444        T: std::convert::Into<crate::model::PrivateClusterConfig>,
8445    {
8446        self.private_cluster_config = v.map(|x| x.into());
8447        self
8448    }
8449
8450    /// Sets the value of [database_encryption][crate::model::Cluster::database_encryption].
8451    pub fn set_database_encryption<T>(mut self, v: T) -> Self
8452    where
8453        T: std::convert::Into<crate::model::DatabaseEncryption>,
8454    {
8455        self.database_encryption = std::option::Option::Some(v.into());
8456        self
8457    }
8458
8459    /// Sets or clears the value of [database_encryption][crate::model::Cluster::database_encryption].
8460    pub fn set_or_clear_database_encryption<T>(mut self, v: std::option::Option<T>) -> Self
8461    where
8462        T: std::convert::Into<crate::model::DatabaseEncryption>,
8463    {
8464        self.database_encryption = v.map(|x| x.into());
8465        self
8466    }
8467
8468    /// Sets the value of [vertical_pod_autoscaling][crate::model::Cluster::vertical_pod_autoscaling].
8469    pub fn set_vertical_pod_autoscaling<T>(mut self, v: T) -> Self
8470    where
8471        T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
8472    {
8473        self.vertical_pod_autoscaling = std::option::Option::Some(v.into());
8474        self
8475    }
8476
8477    /// Sets or clears the value of [vertical_pod_autoscaling][crate::model::Cluster::vertical_pod_autoscaling].
8478    pub fn set_or_clear_vertical_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8479    where
8480        T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
8481    {
8482        self.vertical_pod_autoscaling = v.map(|x| x.into());
8483        self
8484    }
8485
8486    /// Sets the value of [shielded_nodes][crate::model::Cluster::shielded_nodes].
8487    pub fn set_shielded_nodes<T>(mut self, v: T) -> Self
8488    where
8489        T: std::convert::Into<crate::model::ShieldedNodes>,
8490    {
8491        self.shielded_nodes = std::option::Option::Some(v.into());
8492        self
8493    }
8494
8495    /// Sets or clears the value of [shielded_nodes][crate::model::Cluster::shielded_nodes].
8496    pub fn set_or_clear_shielded_nodes<T>(mut self, v: std::option::Option<T>) -> Self
8497    where
8498        T: std::convert::Into<crate::model::ShieldedNodes>,
8499    {
8500        self.shielded_nodes = v.map(|x| x.into());
8501        self
8502    }
8503
8504    /// Sets the value of [release_channel][crate::model::Cluster::release_channel].
8505    pub fn set_release_channel<T>(mut self, v: T) -> Self
8506    where
8507        T: std::convert::Into<crate::model::ReleaseChannel>,
8508    {
8509        self.release_channel = std::option::Option::Some(v.into());
8510        self
8511    }
8512
8513    /// Sets or clears the value of [release_channel][crate::model::Cluster::release_channel].
8514    pub fn set_or_clear_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
8515    where
8516        T: std::convert::Into<crate::model::ReleaseChannel>,
8517    {
8518        self.release_channel = v.map(|x| x.into());
8519        self
8520    }
8521
8522    /// Sets the value of [workload_identity_config][crate::model::Cluster::workload_identity_config].
8523    pub fn set_workload_identity_config<T>(mut self, v: T) -> Self
8524    where
8525        T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
8526    {
8527        self.workload_identity_config = std::option::Option::Some(v.into());
8528        self
8529    }
8530
8531    /// Sets or clears the value of [workload_identity_config][crate::model::Cluster::workload_identity_config].
8532    pub fn set_or_clear_workload_identity_config<T>(mut self, v: std::option::Option<T>) -> Self
8533    where
8534        T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
8535    {
8536        self.workload_identity_config = v.map(|x| x.into());
8537        self
8538    }
8539
8540    /// Sets the value of [mesh_certificates][crate::model::Cluster::mesh_certificates].
8541    pub fn set_mesh_certificates<T>(mut self, v: T) -> Self
8542    where
8543        T: std::convert::Into<crate::model::MeshCertificates>,
8544    {
8545        self.mesh_certificates = std::option::Option::Some(v.into());
8546        self
8547    }
8548
8549    /// Sets or clears the value of [mesh_certificates][crate::model::Cluster::mesh_certificates].
8550    pub fn set_or_clear_mesh_certificates<T>(mut self, v: std::option::Option<T>) -> Self
8551    where
8552        T: std::convert::Into<crate::model::MeshCertificates>,
8553    {
8554        self.mesh_certificates = v.map(|x| x.into());
8555        self
8556    }
8557
8558    /// Sets the value of [cost_management_config][crate::model::Cluster::cost_management_config].
8559    pub fn set_cost_management_config<T>(mut self, v: T) -> Self
8560    where
8561        T: std::convert::Into<crate::model::CostManagementConfig>,
8562    {
8563        self.cost_management_config = std::option::Option::Some(v.into());
8564        self
8565    }
8566
8567    /// Sets or clears the value of [cost_management_config][crate::model::Cluster::cost_management_config].
8568    pub fn set_or_clear_cost_management_config<T>(mut self, v: std::option::Option<T>) -> Self
8569    where
8570        T: std::convert::Into<crate::model::CostManagementConfig>,
8571    {
8572        self.cost_management_config = v.map(|x| x.into());
8573        self
8574    }
8575
8576    /// Sets the value of [notification_config][crate::model::Cluster::notification_config].
8577    pub fn set_notification_config<T>(mut self, v: T) -> Self
8578    where
8579        T: std::convert::Into<crate::model::NotificationConfig>,
8580    {
8581        self.notification_config = std::option::Option::Some(v.into());
8582        self
8583    }
8584
8585    /// Sets or clears the value of [notification_config][crate::model::Cluster::notification_config].
8586    pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
8587    where
8588        T: std::convert::Into<crate::model::NotificationConfig>,
8589    {
8590        self.notification_config = v.map(|x| x.into());
8591        self
8592    }
8593
8594    /// Sets the value of [confidential_nodes][crate::model::Cluster::confidential_nodes].
8595    pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
8596    where
8597        T: std::convert::Into<crate::model::ConfidentialNodes>,
8598    {
8599        self.confidential_nodes = std::option::Option::Some(v.into());
8600        self
8601    }
8602
8603    /// Sets or clears the value of [confidential_nodes][crate::model::Cluster::confidential_nodes].
8604    pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
8605    where
8606        T: std::convert::Into<crate::model::ConfidentialNodes>,
8607    {
8608        self.confidential_nodes = v.map(|x| x.into());
8609        self
8610    }
8611
8612    /// Sets the value of [identity_service_config][crate::model::Cluster::identity_service_config].
8613    pub fn set_identity_service_config<T>(mut self, v: T) -> Self
8614    where
8615        T: std::convert::Into<crate::model::IdentityServiceConfig>,
8616    {
8617        self.identity_service_config = std::option::Option::Some(v.into());
8618        self
8619    }
8620
8621    /// Sets or clears the value of [identity_service_config][crate::model::Cluster::identity_service_config].
8622    pub fn set_or_clear_identity_service_config<T>(mut self, v: std::option::Option<T>) -> Self
8623    where
8624        T: std::convert::Into<crate::model::IdentityServiceConfig>,
8625    {
8626        self.identity_service_config = v.map(|x| x.into());
8627        self
8628    }
8629
8630    /// Sets the value of [self_link][crate::model::Cluster::self_link].
8631    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8632        self.self_link = v.into();
8633        self
8634    }
8635
8636    /// Sets the value of [zone][crate::model::Cluster::zone].
8637    #[deprecated]
8638    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8639        self.zone = v.into();
8640        self
8641    }
8642
8643    /// Sets the value of [endpoint][crate::model::Cluster::endpoint].
8644    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8645        self.endpoint = v.into();
8646        self
8647    }
8648
8649    /// Sets the value of [initial_cluster_version][crate::model::Cluster::initial_cluster_version].
8650    pub fn set_initial_cluster_version<T: std::convert::Into<std::string::String>>(
8651        mut self,
8652        v: T,
8653    ) -> Self {
8654        self.initial_cluster_version = v.into();
8655        self
8656    }
8657
8658    /// Sets the value of [current_master_version][crate::model::Cluster::current_master_version].
8659    pub fn set_current_master_version<T: std::convert::Into<std::string::String>>(
8660        mut self,
8661        v: T,
8662    ) -> Self {
8663        self.current_master_version = v.into();
8664        self
8665    }
8666
8667    /// Sets the value of [current_node_version][crate::model::Cluster::current_node_version].
8668    #[deprecated]
8669    pub fn set_current_node_version<T: std::convert::Into<std::string::String>>(
8670        mut self,
8671        v: T,
8672    ) -> Self {
8673        self.current_node_version = v.into();
8674        self
8675    }
8676
8677    /// Sets the value of [create_time][crate::model::Cluster::create_time].
8678    pub fn set_create_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8679        self.create_time = v.into();
8680        self
8681    }
8682
8683    /// Sets the value of [status][crate::model::Cluster::status].
8684    pub fn set_status<T: std::convert::Into<crate::model::cluster::Status>>(
8685        mut self,
8686        v: T,
8687    ) -> Self {
8688        self.status = v.into();
8689        self
8690    }
8691
8692    /// Sets the value of [status_message][crate::model::Cluster::status_message].
8693    #[deprecated]
8694    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8695        self.status_message = v.into();
8696        self
8697    }
8698
8699    /// Sets the value of [node_ipv4_cidr_size][crate::model::Cluster::node_ipv4_cidr_size].
8700    pub fn set_node_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8701        self.node_ipv4_cidr_size = v.into();
8702        self
8703    }
8704
8705    /// Sets the value of [services_ipv4_cidr][crate::model::Cluster::services_ipv4_cidr].
8706    pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
8707        mut self,
8708        v: T,
8709    ) -> Self {
8710        self.services_ipv4_cidr = v.into();
8711        self
8712    }
8713
8714    /// Sets the value of [instance_group_urls][crate::model::Cluster::instance_group_urls].
8715    #[deprecated]
8716    pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
8717    where
8718        T: std::iter::IntoIterator<Item = V>,
8719        V: std::convert::Into<std::string::String>,
8720    {
8721        use std::iter::Iterator;
8722        self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
8723        self
8724    }
8725
8726    /// Sets the value of [current_node_count][crate::model::Cluster::current_node_count].
8727    #[deprecated]
8728    pub fn set_current_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8729        self.current_node_count = v.into();
8730        self
8731    }
8732
8733    /// Sets the value of [expire_time][crate::model::Cluster::expire_time].
8734    pub fn set_expire_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8735        self.expire_time = v.into();
8736        self
8737    }
8738
8739    /// Sets the value of [location][crate::model::Cluster::location].
8740    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8741        self.location = v.into();
8742        self
8743    }
8744
8745    /// Sets the value of [enable_tpu][crate::model::Cluster::enable_tpu].
8746    #[deprecated]
8747    pub fn set_enable_tpu<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8748        self.enable_tpu = v.into();
8749        self
8750    }
8751
8752    /// Sets the value of [tpu_ipv4_cidr_block][crate::model::Cluster::tpu_ipv4_cidr_block].
8753    #[deprecated]
8754    pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
8755        mut self,
8756        v: T,
8757    ) -> Self {
8758        self.tpu_ipv4_cidr_block = v.into();
8759        self
8760    }
8761
8762    /// Sets the value of [conditions][crate::model::Cluster::conditions].
8763    pub fn set_conditions<T, V>(mut self, v: T) -> Self
8764    where
8765        T: std::iter::IntoIterator<Item = V>,
8766        V: std::convert::Into<crate::model::StatusCondition>,
8767    {
8768        use std::iter::Iterator;
8769        self.conditions = v.into_iter().map(|i| i.into()).collect();
8770        self
8771    }
8772
8773    /// Sets the value of [autopilot][crate::model::Cluster::autopilot].
8774    pub fn set_autopilot<T>(mut self, v: T) -> Self
8775    where
8776        T: std::convert::Into<crate::model::Autopilot>,
8777    {
8778        self.autopilot = std::option::Option::Some(v.into());
8779        self
8780    }
8781
8782    /// Sets or clears the value of [autopilot][crate::model::Cluster::autopilot].
8783    pub fn set_or_clear_autopilot<T>(mut self, v: std::option::Option<T>) -> Self
8784    where
8785        T: std::convert::Into<crate::model::Autopilot>,
8786    {
8787        self.autopilot = v.map(|x| x.into());
8788        self
8789    }
8790
8791    /// Sets the value of [id][crate::model::Cluster::id].
8792    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8793        self.id = v.into();
8794        self
8795    }
8796
8797    /// Sets the value of [node_pool_defaults][crate::model::Cluster::node_pool_defaults].
8798    pub fn set_node_pool_defaults<T>(mut self, v: T) -> Self
8799    where
8800        T: std::convert::Into<crate::model::NodePoolDefaults>,
8801    {
8802        self.node_pool_defaults = std::option::Option::Some(v.into());
8803        self
8804    }
8805
8806    /// Sets or clears the value of [node_pool_defaults][crate::model::Cluster::node_pool_defaults].
8807    pub fn set_or_clear_node_pool_defaults<T>(mut self, v: std::option::Option<T>) -> Self
8808    where
8809        T: std::convert::Into<crate::model::NodePoolDefaults>,
8810    {
8811        self.node_pool_defaults = v.map(|x| x.into());
8812        self
8813    }
8814
8815    /// Sets the value of [logging_config][crate::model::Cluster::logging_config].
8816    pub fn set_logging_config<T>(mut self, v: T) -> Self
8817    where
8818        T: std::convert::Into<crate::model::LoggingConfig>,
8819    {
8820        self.logging_config = std::option::Option::Some(v.into());
8821        self
8822    }
8823
8824    /// Sets or clears the value of [logging_config][crate::model::Cluster::logging_config].
8825    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
8826    where
8827        T: std::convert::Into<crate::model::LoggingConfig>,
8828    {
8829        self.logging_config = v.map(|x| x.into());
8830        self
8831    }
8832
8833    /// Sets the value of [monitoring_config][crate::model::Cluster::monitoring_config].
8834    pub fn set_monitoring_config<T>(mut self, v: T) -> Self
8835    where
8836        T: std::convert::Into<crate::model::MonitoringConfig>,
8837    {
8838        self.monitoring_config = std::option::Option::Some(v.into());
8839        self
8840    }
8841
8842    /// Sets or clears the value of [monitoring_config][crate::model::Cluster::monitoring_config].
8843    pub fn set_or_clear_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
8844    where
8845        T: std::convert::Into<crate::model::MonitoringConfig>,
8846    {
8847        self.monitoring_config = v.map(|x| x.into());
8848        self
8849    }
8850
8851    /// Sets the value of [node_pool_auto_config][crate::model::Cluster::node_pool_auto_config].
8852    pub fn set_node_pool_auto_config<T>(mut self, v: T) -> Self
8853    where
8854        T: std::convert::Into<crate::model::NodePoolAutoConfig>,
8855    {
8856        self.node_pool_auto_config = std::option::Option::Some(v.into());
8857        self
8858    }
8859
8860    /// Sets or clears the value of [node_pool_auto_config][crate::model::Cluster::node_pool_auto_config].
8861    pub fn set_or_clear_node_pool_auto_config<T>(mut self, v: std::option::Option<T>) -> Self
8862    where
8863        T: std::convert::Into<crate::model::NodePoolAutoConfig>,
8864    {
8865        self.node_pool_auto_config = v.map(|x| x.into());
8866        self
8867    }
8868
8869    /// Sets the value of [pod_autoscaling][crate::model::Cluster::pod_autoscaling].
8870    pub fn set_pod_autoscaling<T>(mut self, v: T) -> Self
8871    where
8872        T: std::convert::Into<crate::model::PodAutoscaling>,
8873    {
8874        self.pod_autoscaling = std::option::Option::Some(v.into());
8875        self
8876    }
8877
8878    /// Sets or clears the value of [pod_autoscaling][crate::model::Cluster::pod_autoscaling].
8879    pub fn set_or_clear_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8880    where
8881        T: std::convert::Into<crate::model::PodAutoscaling>,
8882    {
8883        self.pod_autoscaling = v.map(|x| x.into());
8884        self
8885    }
8886
8887    /// Sets the value of [etag][crate::model::Cluster::etag].
8888    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8889        self.etag = v.into();
8890        self
8891    }
8892
8893    /// Sets the value of [fleet][crate::model::Cluster::fleet].
8894    pub fn set_fleet<T>(mut self, v: T) -> Self
8895    where
8896        T: std::convert::Into<crate::model::Fleet>,
8897    {
8898        self.fleet = std::option::Option::Some(v.into());
8899        self
8900    }
8901
8902    /// Sets or clears the value of [fleet][crate::model::Cluster::fleet].
8903    pub fn set_or_clear_fleet<T>(mut self, v: std::option::Option<T>) -> Self
8904    where
8905        T: std::convert::Into<crate::model::Fleet>,
8906    {
8907        self.fleet = v.map(|x| x.into());
8908        self
8909    }
8910
8911    /// Sets the value of [security_posture_config][crate::model::Cluster::security_posture_config].
8912    pub fn set_security_posture_config<T>(mut self, v: T) -> Self
8913    where
8914        T: std::convert::Into<crate::model::SecurityPostureConfig>,
8915    {
8916        self.security_posture_config = std::option::Option::Some(v.into());
8917        self
8918    }
8919
8920    /// Sets or clears the value of [security_posture_config][crate::model::Cluster::security_posture_config].
8921    pub fn set_or_clear_security_posture_config<T>(mut self, v: std::option::Option<T>) -> Self
8922    where
8923        T: std::convert::Into<crate::model::SecurityPostureConfig>,
8924    {
8925        self.security_posture_config = v.map(|x| x.into());
8926        self
8927    }
8928
8929    /// Sets the value of [control_plane_endpoints_config][crate::model::Cluster::control_plane_endpoints_config].
8930    pub fn set_control_plane_endpoints_config<T>(mut self, v: T) -> Self
8931    where
8932        T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
8933    {
8934        self.control_plane_endpoints_config = std::option::Option::Some(v.into());
8935        self
8936    }
8937
8938    /// Sets or clears the value of [control_plane_endpoints_config][crate::model::Cluster::control_plane_endpoints_config].
8939    pub fn set_or_clear_control_plane_endpoints_config<T>(
8940        mut self,
8941        v: std::option::Option<T>,
8942    ) -> Self
8943    where
8944        T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
8945    {
8946        self.control_plane_endpoints_config = v.map(|x| x.into());
8947        self
8948    }
8949
8950    /// Sets the value of [enable_k8s_beta_apis][crate::model::Cluster::enable_k8s_beta_apis].
8951    pub fn set_enable_k8s_beta_apis<T>(mut self, v: T) -> Self
8952    where
8953        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
8954    {
8955        self.enable_k8s_beta_apis = std::option::Option::Some(v.into());
8956        self
8957    }
8958
8959    /// Sets or clears the value of [enable_k8s_beta_apis][crate::model::Cluster::enable_k8s_beta_apis].
8960    pub fn set_or_clear_enable_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
8961    where
8962        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
8963    {
8964        self.enable_k8s_beta_apis = v.map(|x| x.into());
8965        self
8966    }
8967
8968    /// Sets the value of [enterprise_config][crate::model::Cluster::enterprise_config].
8969    #[deprecated]
8970    pub fn set_enterprise_config<T>(mut self, v: T) -> Self
8971    where
8972        T: std::convert::Into<crate::model::EnterpriseConfig>,
8973    {
8974        self.enterprise_config = std::option::Option::Some(v.into());
8975        self
8976    }
8977
8978    /// Sets or clears the value of [enterprise_config][crate::model::Cluster::enterprise_config].
8979    #[deprecated]
8980    pub fn set_or_clear_enterprise_config<T>(mut self, v: std::option::Option<T>) -> Self
8981    where
8982        T: std::convert::Into<crate::model::EnterpriseConfig>,
8983    {
8984        self.enterprise_config = v.map(|x| x.into());
8985        self
8986    }
8987
8988    /// Sets the value of [secret_manager_config][crate::model::Cluster::secret_manager_config].
8989    pub fn set_secret_manager_config<T>(mut self, v: T) -> Self
8990    where
8991        T: std::convert::Into<crate::model::SecretManagerConfig>,
8992    {
8993        self.secret_manager_config = std::option::Option::Some(v.into());
8994        self
8995    }
8996
8997    /// Sets or clears the value of [secret_manager_config][crate::model::Cluster::secret_manager_config].
8998    pub fn set_or_clear_secret_manager_config<T>(mut self, v: std::option::Option<T>) -> Self
8999    where
9000        T: std::convert::Into<crate::model::SecretManagerConfig>,
9001    {
9002        self.secret_manager_config = v.map(|x| x.into());
9003        self
9004    }
9005
9006    /// Sets the value of [compliance_posture_config][crate::model::Cluster::compliance_posture_config].
9007    pub fn set_compliance_posture_config<T>(mut self, v: T) -> Self
9008    where
9009        T: std::convert::Into<crate::model::CompliancePostureConfig>,
9010    {
9011        self.compliance_posture_config = std::option::Option::Some(v.into());
9012        self
9013    }
9014
9015    /// Sets or clears the value of [compliance_posture_config][crate::model::Cluster::compliance_posture_config].
9016    pub fn set_or_clear_compliance_posture_config<T>(mut self, v: std::option::Option<T>) -> Self
9017    where
9018        T: std::convert::Into<crate::model::CompliancePostureConfig>,
9019    {
9020        self.compliance_posture_config = v.map(|x| x.into());
9021        self
9022    }
9023
9024    /// Sets the value of [satisfies_pzs][crate::model::Cluster::satisfies_pzs].
9025    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
9026    where
9027        T: std::convert::Into<bool>,
9028    {
9029        self.satisfies_pzs = std::option::Option::Some(v.into());
9030        self
9031    }
9032
9033    /// Sets or clears the value of [satisfies_pzs][crate::model::Cluster::satisfies_pzs].
9034    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
9035    where
9036        T: std::convert::Into<bool>,
9037    {
9038        self.satisfies_pzs = v.map(|x| x.into());
9039        self
9040    }
9041
9042    /// Sets the value of [satisfies_pzi][crate::model::Cluster::satisfies_pzi].
9043    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
9044    where
9045        T: std::convert::Into<bool>,
9046    {
9047        self.satisfies_pzi = std::option::Option::Some(v.into());
9048        self
9049    }
9050
9051    /// Sets or clears the value of [satisfies_pzi][crate::model::Cluster::satisfies_pzi].
9052    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
9053    where
9054        T: std::convert::Into<bool>,
9055    {
9056        self.satisfies_pzi = v.map(|x| x.into());
9057        self
9058    }
9059
9060    /// Sets the value of [user_managed_keys_config][crate::model::Cluster::user_managed_keys_config].
9061    pub fn set_user_managed_keys_config<T>(mut self, v: T) -> Self
9062    where
9063        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
9064    {
9065        self.user_managed_keys_config = std::option::Option::Some(v.into());
9066        self
9067    }
9068
9069    /// Sets or clears the value of [user_managed_keys_config][crate::model::Cluster::user_managed_keys_config].
9070    pub fn set_or_clear_user_managed_keys_config<T>(mut self, v: std::option::Option<T>) -> Self
9071    where
9072        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
9073    {
9074        self.user_managed_keys_config = v.map(|x| x.into());
9075        self
9076    }
9077
9078    /// Sets the value of [rbac_binding_config][crate::model::Cluster::rbac_binding_config].
9079    pub fn set_rbac_binding_config<T>(mut self, v: T) -> Self
9080    where
9081        T: std::convert::Into<crate::model::RBACBindingConfig>,
9082    {
9083        self.rbac_binding_config = std::option::Option::Some(v.into());
9084        self
9085    }
9086
9087    /// Sets or clears the value of [rbac_binding_config][crate::model::Cluster::rbac_binding_config].
9088    pub fn set_or_clear_rbac_binding_config<T>(mut self, v: std::option::Option<T>) -> Self
9089    where
9090        T: std::convert::Into<crate::model::RBACBindingConfig>,
9091    {
9092        self.rbac_binding_config = v.map(|x| x.into());
9093        self
9094    }
9095
9096    /// Sets the value of [gke_auto_upgrade_config][crate::model::Cluster::gke_auto_upgrade_config].
9097    pub fn set_gke_auto_upgrade_config<T>(mut self, v: T) -> Self
9098    where
9099        T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
9100    {
9101        self.gke_auto_upgrade_config = std::option::Option::Some(v.into());
9102        self
9103    }
9104
9105    /// Sets or clears the value of [gke_auto_upgrade_config][crate::model::Cluster::gke_auto_upgrade_config].
9106    pub fn set_or_clear_gke_auto_upgrade_config<T>(mut self, v: std::option::Option<T>) -> Self
9107    where
9108        T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
9109    {
9110        self.gke_auto_upgrade_config = v.map(|x| x.into());
9111        self
9112    }
9113
9114    /// Sets the value of [anonymous_authentication_config][crate::model::Cluster::anonymous_authentication_config].
9115    pub fn set_anonymous_authentication_config<T>(mut self, v: T) -> Self
9116    where
9117        T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
9118    {
9119        self.anonymous_authentication_config = std::option::Option::Some(v.into());
9120        self
9121    }
9122
9123    /// Sets or clears the value of [anonymous_authentication_config][crate::model::Cluster::anonymous_authentication_config].
9124    pub fn set_or_clear_anonymous_authentication_config<T>(
9125        mut self,
9126        v: std::option::Option<T>,
9127    ) -> Self
9128    where
9129        T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
9130    {
9131        self.anonymous_authentication_config = v.map(|x| x.into());
9132        self
9133    }
9134}
9135
9136impl wkt::message::Message for Cluster {
9137    fn typename() -> &'static str {
9138        "type.googleapis.com/google.container.v1.Cluster"
9139    }
9140}
9141
9142/// Defines additional types related to [Cluster].
9143pub mod cluster {
9144    #[allow(unused_imports)]
9145    use super::*;
9146
9147    /// The current status of the cluster.
9148    ///
9149    /// # Working with unknown values
9150    ///
9151    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9152    /// additional enum variants at any time. Adding new variants is not considered
9153    /// a breaking change. Applications should write their code in anticipation of:
9154    ///
9155    /// - New values appearing in future releases of the client library, **and**
9156    /// - New values received dynamically, without application changes.
9157    ///
9158    /// Please consult the [Working with enums] section in the user guide for some
9159    /// guidelines.
9160    ///
9161    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9162    #[derive(Clone, Debug, PartialEq)]
9163    #[non_exhaustive]
9164    pub enum Status {
9165        /// Not set.
9166        Unspecified,
9167        /// The PROVISIONING state indicates the cluster is being created.
9168        Provisioning,
9169        /// The RUNNING state indicates the cluster has been created and is fully
9170        /// usable.
9171        Running,
9172        /// The RECONCILING state indicates that some work is actively being done on
9173        /// the cluster, such as upgrading the master or node software. Details can
9174        /// be found in the `statusMessage` field.
9175        Reconciling,
9176        /// The STOPPING state indicates the cluster is being deleted.
9177        Stopping,
9178        /// The ERROR state indicates the cluster is unusable. It will be
9179        /// automatically deleted. Details can be found in the `statusMessage` field.
9180        Error,
9181        /// The DEGRADED state indicates the cluster requires user action to restore
9182        /// full functionality. Details can be found in the `statusMessage` field.
9183        Degraded,
9184        /// If set, the enum was initialized with an unknown value.
9185        ///
9186        /// Applications can examine the value using [Status::value] or
9187        /// [Status::name].
9188        UnknownValue(status::UnknownValue),
9189    }
9190
9191    #[doc(hidden)]
9192    pub mod status {
9193        #[allow(unused_imports)]
9194        use super::*;
9195        #[derive(Clone, Debug, PartialEq)]
9196        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9197    }
9198
9199    impl Status {
9200        /// Gets the enum value.
9201        ///
9202        /// Returns `None` if the enum contains an unknown value deserialized from
9203        /// the string representation of enums.
9204        pub fn value(&self) -> std::option::Option<i32> {
9205            match self {
9206                Self::Unspecified => std::option::Option::Some(0),
9207                Self::Provisioning => std::option::Option::Some(1),
9208                Self::Running => std::option::Option::Some(2),
9209                Self::Reconciling => std::option::Option::Some(3),
9210                Self::Stopping => std::option::Option::Some(4),
9211                Self::Error => std::option::Option::Some(5),
9212                Self::Degraded => std::option::Option::Some(6),
9213                Self::UnknownValue(u) => u.0.value(),
9214            }
9215        }
9216
9217        /// Gets the enum value as a string.
9218        ///
9219        /// Returns `None` if the enum contains an unknown value deserialized from
9220        /// the integer representation of enums.
9221        pub fn name(&self) -> std::option::Option<&str> {
9222            match self {
9223                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
9224                Self::Provisioning => std::option::Option::Some("PROVISIONING"),
9225                Self::Running => std::option::Option::Some("RUNNING"),
9226                Self::Reconciling => std::option::Option::Some("RECONCILING"),
9227                Self::Stopping => std::option::Option::Some("STOPPING"),
9228                Self::Error => std::option::Option::Some("ERROR"),
9229                Self::Degraded => std::option::Option::Some("DEGRADED"),
9230                Self::UnknownValue(u) => u.0.name(),
9231            }
9232        }
9233    }
9234
9235    impl std::default::Default for Status {
9236        fn default() -> Self {
9237            use std::convert::From;
9238            Self::from(0)
9239        }
9240    }
9241
9242    impl std::fmt::Display for Status {
9243        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9244            wkt::internal::display_enum(f, self.name(), self.value())
9245        }
9246    }
9247
9248    impl std::convert::From<i32> for Status {
9249        fn from(value: i32) -> Self {
9250            match value {
9251                0 => Self::Unspecified,
9252                1 => Self::Provisioning,
9253                2 => Self::Running,
9254                3 => Self::Reconciling,
9255                4 => Self::Stopping,
9256                5 => Self::Error,
9257                6 => Self::Degraded,
9258                _ => Self::UnknownValue(status::UnknownValue(
9259                    wkt::internal::UnknownEnumValue::Integer(value),
9260                )),
9261            }
9262        }
9263    }
9264
9265    impl std::convert::From<&str> for Status {
9266        fn from(value: &str) -> Self {
9267            use std::string::ToString;
9268            match value {
9269                "STATUS_UNSPECIFIED" => Self::Unspecified,
9270                "PROVISIONING" => Self::Provisioning,
9271                "RUNNING" => Self::Running,
9272                "RECONCILING" => Self::Reconciling,
9273                "STOPPING" => Self::Stopping,
9274                "ERROR" => Self::Error,
9275                "DEGRADED" => Self::Degraded,
9276                _ => Self::UnknownValue(status::UnknownValue(
9277                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9278                )),
9279            }
9280        }
9281    }
9282
9283    impl serde::ser::Serialize for Status {
9284        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9285        where
9286            S: serde::Serializer,
9287        {
9288            match self {
9289                Self::Unspecified => serializer.serialize_i32(0),
9290                Self::Provisioning => serializer.serialize_i32(1),
9291                Self::Running => serializer.serialize_i32(2),
9292                Self::Reconciling => serializer.serialize_i32(3),
9293                Self::Stopping => serializer.serialize_i32(4),
9294                Self::Error => serializer.serialize_i32(5),
9295                Self::Degraded => serializer.serialize_i32(6),
9296                Self::UnknownValue(u) => u.0.serialize(serializer),
9297            }
9298        }
9299    }
9300
9301    impl<'de> serde::de::Deserialize<'de> for Status {
9302        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9303        where
9304            D: serde::Deserializer<'de>,
9305        {
9306            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
9307                ".google.container.v1.Cluster.Status",
9308            ))
9309        }
9310    }
9311}
9312
9313/// RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings
9314/// that can be created.
9315#[derive(Clone, Default, PartialEq)]
9316#[non_exhaustive]
9317pub struct RBACBindingConfig {
9318    /// Setting this to true will allow any ClusterRoleBinding and RoleBinding
9319    /// with subjets system:anonymous or system:unauthenticated.
9320    pub enable_insecure_binding_system_unauthenticated: std::option::Option<bool>,
9321
9322    /// Setting this to true will allow any ClusterRoleBinding and RoleBinding
9323    /// with subjects system:authenticated.
9324    pub enable_insecure_binding_system_authenticated: std::option::Option<bool>,
9325
9326    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9327}
9328
9329impl RBACBindingConfig {
9330    pub fn new() -> Self {
9331        std::default::Default::default()
9332    }
9333
9334    /// Sets the value of [enable_insecure_binding_system_unauthenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_unauthenticated].
9335    pub fn set_enable_insecure_binding_system_unauthenticated<T>(mut self, v: T) -> Self
9336    where
9337        T: std::convert::Into<bool>,
9338    {
9339        self.enable_insecure_binding_system_unauthenticated = std::option::Option::Some(v.into());
9340        self
9341    }
9342
9343    /// Sets or clears the value of [enable_insecure_binding_system_unauthenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_unauthenticated].
9344    pub fn set_or_clear_enable_insecure_binding_system_unauthenticated<T>(
9345        mut self,
9346        v: std::option::Option<T>,
9347    ) -> Self
9348    where
9349        T: std::convert::Into<bool>,
9350    {
9351        self.enable_insecure_binding_system_unauthenticated = v.map(|x| x.into());
9352        self
9353    }
9354
9355    /// Sets the value of [enable_insecure_binding_system_authenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_authenticated].
9356    pub fn set_enable_insecure_binding_system_authenticated<T>(mut self, v: T) -> Self
9357    where
9358        T: std::convert::Into<bool>,
9359    {
9360        self.enable_insecure_binding_system_authenticated = std::option::Option::Some(v.into());
9361        self
9362    }
9363
9364    /// Sets or clears the value of [enable_insecure_binding_system_authenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_authenticated].
9365    pub fn set_or_clear_enable_insecure_binding_system_authenticated<T>(
9366        mut self,
9367        v: std::option::Option<T>,
9368    ) -> Self
9369    where
9370        T: std::convert::Into<bool>,
9371    {
9372        self.enable_insecure_binding_system_authenticated = v.map(|x| x.into());
9373        self
9374    }
9375}
9376
9377impl wkt::message::Message for RBACBindingConfig {
9378    fn typename() -> &'static str {
9379        "type.googleapis.com/google.container.v1.RBACBindingConfig"
9380    }
9381}
9382
9383/// UserManagedKeysConfig holds the resource address to Keys which are used
9384/// for signing certs and token that are used for communication within cluster.
9385#[derive(Clone, Default, PartialEq)]
9386#[non_exhaustive]
9387pub struct UserManagedKeysConfig {
9388    /// The Certificate Authority Service caPool to use for the cluster CA in this
9389    /// cluster.
9390    pub cluster_ca: std::string::String,
9391
9392    /// Resource path of the Certificate Authority Service caPool to use for the
9393    /// etcd API CA in this cluster.
9394    pub etcd_api_ca: std::string::String,
9395
9396    /// Resource path of the Certificate Authority Service caPool to use for the
9397    /// etcd peer CA in this cluster.
9398    pub etcd_peer_ca: std::string::String,
9399
9400    /// The Cloud KMS cryptoKeyVersions to use for signing service account JWTs
9401    /// issued by this cluster.
9402    ///
9403    /// Format:
9404    /// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}`
9405    pub service_account_signing_keys: std::vec::Vec<std::string::String>,
9406
9407    /// The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs
9408    /// issued by this cluster.
9409    ///
9410    /// Format:
9411    /// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}`
9412    pub service_account_verification_keys: std::vec::Vec<std::string::String>,
9413
9414    /// The Certificate Authority Service caPool to use for the aggregation CA in
9415    /// this cluster.
9416    pub aggregation_ca: std::string::String,
9417
9418    /// The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control
9419    /// plane nodes.
9420    pub control_plane_disk_encryption_key: std::string::String,
9421
9422    /// Resource path of the Cloud KMS cryptoKey to use for encryption of internal
9423    /// etcd backups.
9424    pub gkeops_etcd_backup_encryption_key: std::string::String,
9425
9426    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9427}
9428
9429impl UserManagedKeysConfig {
9430    pub fn new() -> Self {
9431        std::default::Default::default()
9432    }
9433
9434    /// Sets the value of [cluster_ca][crate::model::UserManagedKeysConfig::cluster_ca].
9435    pub fn set_cluster_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9436        self.cluster_ca = v.into();
9437        self
9438    }
9439
9440    /// Sets the value of [etcd_api_ca][crate::model::UserManagedKeysConfig::etcd_api_ca].
9441    pub fn set_etcd_api_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9442        self.etcd_api_ca = v.into();
9443        self
9444    }
9445
9446    /// Sets the value of [etcd_peer_ca][crate::model::UserManagedKeysConfig::etcd_peer_ca].
9447    pub fn set_etcd_peer_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9448        self.etcd_peer_ca = v.into();
9449        self
9450    }
9451
9452    /// Sets the value of [service_account_signing_keys][crate::model::UserManagedKeysConfig::service_account_signing_keys].
9453    pub fn set_service_account_signing_keys<T, V>(mut self, v: T) -> Self
9454    where
9455        T: std::iter::IntoIterator<Item = V>,
9456        V: std::convert::Into<std::string::String>,
9457    {
9458        use std::iter::Iterator;
9459        self.service_account_signing_keys = v.into_iter().map(|i| i.into()).collect();
9460        self
9461    }
9462
9463    /// Sets the value of [service_account_verification_keys][crate::model::UserManagedKeysConfig::service_account_verification_keys].
9464    pub fn set_service_account_verification_keys<T, V>(mut self, v: T) -> Self
9465    where
9466        T: std::iter::IntoIterator<Item = V>,
9467        V: std::convert::Into<std::string::String>,
9468    {
9469        use std::iter::Iterator;
9470        self.service_account_verification_keys = v.into_iter().map(|i| i.into()).collect();
9471        self
9472    }
9473
9474    /// Sets the value of [aggregation_ca][crate::model::UserManagedKeysConfig::aggregation_ca].
9475    pub fn set_aggregation_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9476        self.aggregation_ca = v.into();
9477        self
9478    }
9479
9480    /// Sets the value of [control_plane_disk_encryption_key][crate::model::UserManagedKeysConfig::control_plane_disk_encryption_key].
9481    pub fn set_control_plane_disk_encryption_key<T: std::convert::Into<std::string::String>>(
9482        mut self,
9483        v: T,
9484    ) -> Self {
9485        self.control_plane_disk_encryption_key = v.into();
9486        self
9487    }
9488
9489    /// Sets the value of [gkeops_etcd_backup_encryption_key][crate::model::UserManagedKeysConfig::gkeops_etcd_backup_encryption_key].
9490    pub fn set_gkeops_etcd_backup_encryption_key<T: std::convert::Into<std::string::String>>(
9491        mut self,
9492        v: T,
9493    ) -> Self {
9494        self.gkeops_etcd_backup_encryption_key = v.into();
9495        self
9496    }
9497}
9498
9499impl wkt::message::Message for UserManagedKeysConfig {
9500    fn typename() -> &'static str {
9501        "type.googleapis.com/google.container.v1.UserManagedKeysConfig"
9502    }
9503}
9504
9505/// AnonymousAuthenticationConfig defines the settings needed to limit endpoints
9506/// that allow anonymous authentication.
9507#[derive(Clone, Default, PartialEq)]
9508#[non_exhaustive]
9509pub struct AnonymousAuthenticationConfig {
9510    /// Defines the mode of limiting anonymous access in the cluster.
9511    pub mode: crate::model::anonymous_authentication_config::Mode,
9512
9513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9514}
9515
9516impl AnonymousAuthenticationConfig {
9517    pub fn new() -> Self {
9518        std::default::Default::default()
9519    }
9520
9521    /// Sets the value of [mode][crate::model::AnonymousAuthenticationConfig::mode].
9522    pub fn set_mode<T: std::convert::Into<crate::model::anonymous_authentication_config::Mode>>(
9523        mut self,
9524        v: T,
9525    ) -> Self {
9526        self.mode = v.into();
9527        self
9528    }
9529}
9530
9531impl wkt::message::Message for AnonymousAuthenticationConfig {
9532    fn typename() -> &'static str {
9533        "type.googleapis.com/google.container.v1.AnonymousAuthenticationConfig"
9534    }
9535}
9536
9537/// Defines additional types related to [AnonymousAuthenticationConfig].
9538pub mod anonymous_authentication_config {
9539    #[allow(unused_imports)]
9540    use super::*;
9541
9542    /// Mode defines the mode of anonymous authentication
9543    /// allowed in the cluster.
9544    ///
9545    /// # Working with unknown values
9546    ///
9547    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9548    /// additional enum variants at any time. Adding new variants is not considered
9549    /// a breaking change. Applications should write their code in anticipation of:
9550    ///
9551    /// - New values appearing in future releases of the client library, **and**
9552    /// - New values received dynamically, without application changes.
9553    ///
9554    /// Please consult the [Working with enums] section in the user guide for some
9555    /// guidelines.
9556    ///
9557    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9558    #[derive(Clone, Debug, PartialEq)]
9559    #[non_exhaustive]
9560    pub enum Mode {
9561        /// Default value not specified.
9562        Unspecified,
9563        /// Anonymous authentication is allowed for all endpoints.
9564        Enabled,
9565        /// Anonymous authentication is allowed for only health check endpoints.
9566        Limited,
9567        /// If set, the enum was initialized with an unknown value.
9568        ///
9569        /// Applications can examine the value using [Mode::value] or
9570        /// [Mode::name].
9571        UnknownValue(mode::UnknownValue),
9572    }
9573
9574    #[doc(hidden)]
9575    pub mod mode {
9576        #[allow(unused_imports)]
9577        use super::*;
9578        #[derive(Clone, Debug, PartialEq)]
9579        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9580    }
9581
9582    impl Mode {
9583        /// Gets the enum value.
9584        ///
9585        /// Returns `None` if the enum contains an unknown value deserialized from
9586        /// the string representation of enums.
9587        pub fn value(&self) -> std::option::Option<i32> {
9588            match self {
9589                Self::Unspecified => std::option::Option::Some(0),
9590                Self::Enabled => std::option::Option::Some(1),
9591                Self::Limited => std::option::Option::Some(2),
9592                Self::UnknownValue(u) => u.0.value(),
9593            }
9594        }
9595
9596        /// Gets the enum value as a string.
9597        ///
9598        /// Returns `None` if the enum contains an unknown value deserialized from
9599        /// the integer representation of enums.
9600        pub fn name(&self) -> std::option::Option<&str> {
9601            match self {
9602                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
9603                Self::Enabled => std::option::Option::Some("ENABLED"),
9604                Self::Limited => std::option::Option::Some("LIMITED"),
9605                Self::UnknownValue(u) => u.0.name(),
9606            }
9607        }
9608    }
9609
9610    impl std::default::Default for Mode {
9611        fn default() -> Self {
9612            use std::convert::From;
9613            Self::from(0)
9614        }
9615    }
9616
9617    impl std::fmt::Display for Mode {
9618        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9619            wkt::internal::display_enum(f, self.name(), self.value())
9620        }
9621    }
9622
9623    impl std::convert::From<i32> for Mode {
9624        fn from(value: i32) -> Self {
9625            match value {
9626                0 => Self::Unspecified,
9627                1 => Self::Enabled,
9628                2 => Self::Limited,
9629                _ => Self::UnknownValue(mode::UnknownValue(
9630                    wkt::internal::UnknownEnumValue::Integer(value),
9631                )),
9632            }
9633        }
9634    }
9635
9636    impl std::convert::From<&str> for Mode {
9637        fn from(value: &str) -> Self {
9638            use std::string::ToString;
9639            match value {
9640                "MODE_UNSPECIFIED" => Self::Unspecified,
9641                "ENABLED" => Self::Enabled,
9642                "LIMITED" => Self::Limited,
9643                _ => Self::UnknownValue(mode::UnknownValue(
9644                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9645                )),
9646            }
9647        }
9648    }
9649
9650    impl serde::ser::Serialize for Mode {
9651        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9652        where
9653            S: serde::Serializer,
9654        {
9655            match self {
9656                Self::Unspecified => serializer.serialize_i32(0),
9657                Self::Enabled => serializer.serialize_i32(1),
9658                Self::Limited => serializer.serialize_i32(2),
9659                Self::UnknownValue(u) => u.0.serialize(serializer),
9660            }
9661        }
9662    }
9663
9664    impl<'de> serde::de::Deserialize<'de> for Mode {
9665        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9666        where
9667            D: serde::Deserializer<'de>,
9668        {
9669            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
9670                ".google.container.v1.AnonymousAuthenticationConfig.Mode",
9671            ))
9672        }
9673    }
9674}
9675
9676/// CompliancePostureConfig defines the settings needed to enable/disable
9677/// features for the Compliance Posture.
9678#[derive(Clone, Default, PartialEq)]
9679#[non_exhaustive]
9680pub struct CompliancePostureConfig {
9681    /// Defines the enablement mode for Compliance Posture.
9682    pub mode: std::option::Option<crate::model::compliance_posture_config::Mode>,
9683
9684    /// List of enabled compliance standards.
9685    pub compliance_standards:
9686        std::vec::Vec<crate::model::compliance_posture_config::ComplianceStandard>,
9687
9688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9689}
9690
9691impl CompliancePostureConfig {
9692    pub fn new() -> Self {
9693        std::default::Default::default()
9694    }
9695
9696    /// Sets the value of [mode][crate::model::CompliancePostureConfig::mode].
9697    pub fn set_mode<T>(mut self, v: T) -> Self
9698    where
9699        T: std::convert::Into<crate::model::compliance_posture_config::Mode>,
9700    {
9701        self.mode = std::option::Option::Some(v.into());
9702        self
9703    }
9704
9705    /// Sets or clears the value of [mode][crate::model::CompliancePostureConfig::mode].
9706    pub fn set_or_clear_mode<T>(mut self, v: std::option::Option<T>) -> Self
9707    where
9708        T: std::convert::Into<crate::model::compliance_posture_config::Mode>,
9709    {
9710        self.mode = v.map(|x| x.into());
9711        self
9712    }
9713
9714    /// Sets the value of [compliance_standards][crate::model::CompliancePostureConfig::compliance_standards].
9715    pub fn set_compliance_standards<T, V>(mut self, v: T) -> Self
9716    where
9717        T: std::iter::IntoIterator<Item = V>,
9718        V: std::convert::Into<crate::model::compliance_posture_config::ComplianceStandard>,
9719    {
9720        use std::iter::Iterator;
9721        self.compliance_standards = v.into_iter().map(|i| i.into()).collect();
9722        self
9723    }
9724}
9725
9726impl wkt::message::Message for CompliancePostureConfig {
9727    fn typename() -> &'static str {
9728        "type.googleapis.com/google.container.v1.CompliancePostureConfig"
9729    }
9730}
9731
9732/// Defines additional types related to [CompliancePostureConfig].
9733pub mod compliance_posture_config {
9734    #[allow(unused_imports)]
9735    use super::*;
9736
9737    /// Defines the details of a compliance standard.
9738    #[derive(Clone, Default, PartialEq)]
9739    #[non_exhaustive]
9740    pub struct ComplianceStandard {
9741        /// Name of the compliance standard.
9742        pub standard: std::option::Option<std::string::String>,
9743
9744        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9745    }
9746
9747    impl ComplianceStandard {
9748        pub fn new() -> Self {
9749            std::default::Default::default()
9750        }
9751
9752        /// Sets the value of [standard][crate::model::compliance_posture_config::ComplianceStandard::standard].
9753        pub fn set_standard<T>(mut self, v: T) -> Self
9754        where
9755            T: std::convert::Into<std::string::String>,
9756        {
9757            self.standard = std::option::Option::Some(v.into());
9758            self
9759        }
9760
9761        /// Sets or clears the value of [standard][crate::model::compliance_posture_config::ComplianceStandard::standard].
9762        pub fn set_or_clear_standard<T>(mut self, v: std::option::Option<T>) -> Self
9763        where
9764            T: std::convert::Into<std::string::String>,
9765        {
9766            self.standard = v.map(|x| x.into());
9767            self
9768        }
9769    }
9770
9771    impl wkt::message::Message for ComplianceStandard {
9772        fn typename() -> &'static str {
9773            "type.googleapis.com/google.container.v1.CompliancePostureConfig.ComplianceStandard"
9774        }
9775    }
9776
9777    /// Mode defines enablement mode for Compliance Posture.
9778    ///
9779    /// # Working with unknown values
9780    ///
9781    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9782    /// additional enum variants at any time. Adding new variants is not considered
9783    /// a breaking change. Applications should write their code in anticipation of:
9784    ///
9785    /// - New values appearing in future releases of the client library, **and**
9786    /// - New values received dynamically, without application changes.
9787    ///
9788    /// Please consult the [Working with enums] section in the user guide for some
9789    /// guidelines.
9790    ///
9791    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9792    #[derive(Clone, Debug, PartialEq)]
9793    #[non_exhaustive]
9794    pub enum Mode {
9795        /// Default value not specified.
9796        Unspecified,
9797        /// Disables Compliance Posture features on the cluster.
9798        Disabled,
9799        /// Enables Compliance Posture features on the cluster.
9800        Enabled,
9801        /// If set, the enum was initialized with an unknown value.
9802        ///
9803        /// Applications can examine the value using [Mode::value] or
9804        /// [Mode::name].
9805        UnknownValue(mode::UnknownValue),
9806    }
9807
9808    #[doc(hidden)]
9809    pub mod mode {
9810        #[allow(unused_imports)]
9811        use super::*;
9812        #[derive(Clone, Debug, PartialEq)]
9813        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9814    }
9815
9816    impl Mode {
9817        /// Gets the enum value.
9818        ///
9819        /// Returns `None` if the enum contains an unknown value deserialized from
9820        /// the string representation of enums.
9821        pub fn value(&self) -> std::option::Option<i32> {
9822            match self {
9823                Self::Unspecified => std::option::Option::Some(0),
9824                Self::Disabled => std::option::Option::Some(1),
9825                Self::Enabled => std::option::Option::Some(2),
9826                Self::UnknownValue(u) => u.0.value(),
9827            }
9828        }
9829
9830        /// Gets the enum value as a string.
9831        ///
9832        /// Returns `None` if the enum contains an unknown value deserialized from
9833        /// the integer representation of enums.
9834        pub fn name(&self) -> std::option::Option<&str> {
9835            match self {
9836                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
9837                Self::Disabled => std::option::Option::Some("DISABLED"),
9838                Self::Enabled => std::option::Option::Some("ENABLED"),
9839                Self::UnknownValue(u) => u.0.name(),
9840            }
9841        }
9842    }
9843
9844    impl std::default::Default for Mode {
9845        fn default() -> Self {
9846            use std::convert::From;
9847            Self::from(0)
9848        }
9849    }
9850
9851    impl std::fmt::Display for Mode {
9852        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9853            wkt::internal::display_enum(f, self.name(), self.value())
9854        }
9855    }
9856
9857    impl std::convert::From<i32> for Mode {
9858        fn from(value: i32) -> Self {
9859            match value {
9860                0 => Self::Unspecified,
9861                1 => Self::Disabled,
9862                2 => Self::Enabled,
9863                _ => Self::UnknownValue(mode::UnknownValue(
9864                    wkt::internal::UnknownEnumValue::Integer(value),
9865                )),
9866            }
9867        }
9868    }
9869
9870    impl std::convert::From<&str> for Mode {
9871        fn from(value: &str) -> Self {
9872            use std::string::ToString;
9873            match value {
9874                "MODE_UNSPECIFIED" => Self::Unspecified,
9875                "DISABLED" => Self::Disabled,
9876                "ENABLED" => Self::Enabled,
9877                _ => Self::UnknownValue(mode::UnknownValue(
9878                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9879                )),
9880            }
9881        }
9882    }
9883
9884    impl serde::ser::Serialize for Mode {
9885        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9886        where
9887            S: serde::Serializer,
9888        {
9889            match self {
9890                Self::Unspecified => serializer.serialize_i32(0),
9891                Self::Disabled => serializer.serialize_i32(1),
9892                Self::Enabled => serializer.serialize_i32(2),
9893                Self::UnknownValue(u) => u.0.serialize(serializer),
9894            }
9895        }
9896    }
9897
9898    impl<'de> serde::de::Deserialize<'de> for Mode {
9899        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9900        where
9901            D: serde::Deserializer<'de>,
9902        {
9903            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
9904                ".google.container.v1.CompliancePostureConfig.Mode",
9905            ))
9906        }
9907    }
9908}
9909
9910/// K8sBetaAPIConfig , configuration for beta APIs
9911#[derive(Clone, Default, PartialEq)]
9912#[non_exhaustive]
9913pub struct K8sBetaAPIConfig {
9914    /// Enabled k8s beta APIs.
9915    pub enabled_apis: std::vec::Vec<std::string::String>,
9916
9917    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9918}
9919
9920impl K8sBetaAPIConfig {
9921    pub fn new() -> Self {
9922        std::default::Default::default()
9923    }
9924
9925    /// Sets the value of [enabled_apis][crate::model::K8sBetaAPIConfig::enabled_apis].
9926    pub fn set_enabled_apis<T, V>(mut self, v: T) -> Self
9927    where
9928        T: std::iter::IntoIterator<Item = V>,
9929        V: std::convert::Into<std::string::String>,
9930    {
9931        use std::iter::Iterator;
9932        self.enabled_apis = v.into_iter().map(|i| i.into()).collect();
9933        self
9934    }
9935}
9936
9937impl wkt::message::Message for K8sBetaAPIConfig {
9938    fn typename() -> &'static str {
9939        "type.googleapis.com/google.container.v1.K8sBetaAPIConfig"
9940    }
9941}
9942
9943/// SecurityPostureConfig defines the flags needed to enable/disable features for
9944/// the Security Posture API.
9945#[derive(Clone, Default, PartialEq)]
9946#[non_exhaustive]
9947pub struct SecurityPostureConfig {
9948    /// Sets which mode to use for Security Posture features.
9949    pub mode: std::option::Option<crate::model::security_posture_config::Mode>,
9950
9951    /// Sets which mode to use for vulnerability scanning.
9952    pub vulnerability_mode:
9953        std::option::Option<crate::model::security_posture_config::VulnerabilityMode>,
9954
9955    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9956}
9957
9958impl SecurityPostureConfig {
9959    pub fn new() -> Self {
9960        std::default::Default::default()
9961    }
9962
9963    /// Sets the value of [mode][crate::model::SecurityPostureConfig::mode].
9964    pub fn set_mode<T>(mut self, v: T) -> Self
9965    where
9966        T: std::convert::Into<crate::model::security_posture_config::Mode>,
9967    {
9968        self.mode = std::option::Option::Some(v.into());
9969        self
9970    }
9971
9972    /// Sets or clears the value of [mode][crate::model::SecurityPostureConfig::mode].
9973    pub fn set_or_clear_mode<T>(mut self, v: std::option::Option<T>) -> Self
9974    where
9975        T: std::convert::Into<crate::model::security_posture_config::Mode>,
9976    {
9977        self.mode = v.map(|x| x.into());
9978        self
9979    }
9980
9981    /// Sets the value of [vulnerability_mode][crate::model::SecurityPostureConfig::vulnerability_mode].
9982    pub fn set_vulnerability_mode<T>(mut self, v: T) -> Self
9983    where
9984        T: std::convert::Into<crate::model::security_posture_config::VulnerabilityMode>,
9985    {
9986        self.vulnerability_mode = std::option::Option::Some(v.into());
9987        self
9988    }
9989
9990    /// Sets or clears the value of [vulnerability_mode][crate::model::SecurityPostureConfig::vulnerability_mode].
9991    pub fn set_or_clear_vulnerability_mode<T>(mut self, v: std::option::Option<T>) -> Self
9992    where
9993        T: std::convert::Into<crate::model::security_posture_config::VulnerabilityMode>,
9994    {
9995        self.vulnerability_mode = v.map(|x| x.into());
9996        self
9997    }
9998}
9999
10000impl wkt::message::Message for SecurityPostureConfig {
10001    fn typename() -> &'static str {
10002        "type.googleapis.com/google.container.v1.SecurityPostureConfig"
10003    }
10004}
10005
10006/// Defines additional types related to [SecurityPostureConfig].
10007pub mod security_posture_config {
10008    #[allow(unused_imports)]
10009    use super::*;
10010
10011    /// Mode defines enablement mode for GKE Security posture features.
10012    ///
10013    /// # Working with unknown values
10014    ///
10015    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10016    /// additional enum variants at any time. Adding new variants is not considered
10017    /// a breaking change. Applications should write their code in anticipation of:
10018    ///
10019    /// - New values appearing in future releases of the client library, **and**
10020    /// - New values received dynamically, without application changes.
10021    ///
10022    /// Please consult the [Working with enums] section in the user guide for some
10023    /// guidelines.
10024    ///
10025    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10026    #[derive(Clone, Debug, PartialEq)]
10027    #[non_exhaustive]
10028    pub enum Mode {
10029        /// Default value not specified.
10030        Unspecified,
10031        /// Disables Security Posture features on the cluster.
10032        Disabled,
10033        /// Applies Security Posture features on the cluster.
10034        Basic,
10035        /// Applies the Security Posture off cluster Enterprise level features.
10036        Enterprise,
10037        /// If set, the enum was initialized with an unknown value.
10038        ///
10039        /// Applications can examine the value using [Mode::value] or
10040        /// [Mode::name].
10041        UnknownValue(mode::UnknownValue),
10042    }
10043
10044    #[doc(hidden)]
10045    pub mod mode {
10046        #[allow(unused_imports)]
10047        use super::*;
10048        #[derive(Clone, Debug, PartialEq)]
10049        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10050    }
10051
10052    impl Mode {
10053        /// Gets the enum value.
10054        ///
10055        /// Returns `None` if the enum contains an unknown value deserialized from
10056        /// the string representation of enums.
10057        pub fn value(&self) -> std::option::Option<i32> {
10058            match self {
10059                Self::Unspecified => std::option::Option::Some(0),
10060                Self::Disabled => std::option::Option::Some(1),
10061                Self::Basic => std::option::Option::Some(2),
10062                Self::Enterprise => std::option::Option::Some(3),
10063                Self::UnknownValue(u) => u.0.value(),
10064            }
10065        }
10066
10067        /// Gets the enum value as a string.
10068        ///
10069        /// Returns `None` if the enum contains an unknown value deserialized from
10070        /// the integer representation of enums.
10071        pub fn name(&self) -> std::option::Option<&str> {
10072            match self {
10073                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
10074                Self::Disabled => std::option::Option::Some("DISABLED"),
10075                Self::Basic => std::option::Option::Some("BASIC"),
10076                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
10077                Self::UnknownValue(u) => u.0.name(),
10078            }
10079        }
10080    }
10081
10082    impl std::default::Default for Mode {
10083        fn default() -> Self {
10084            use std::convert::From;
10085            Self::from(0)
10086        }
10087    }
10088
10089    impl std::fmt::Display for Mode {
10090        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10091            wkt::internal::display_enum(f, self.name(), self.value())
10092        }
10093    }
10094
10095    impl std::convert::From<i32> for Mode {
10096        fn from(value: i32) -> Self {
10097            match value {
10098                0 => Self::Unspecified,
10099                1 => Self::Disabled,
10100                2 => Self::Basic,
10101                3 => Self::Enterprise,
10102                _ => Self::UnknownValue(mode::UnknownValue(
10103                    wkt::internal::UnknownEnumValue::Integer(value),
10104                )),
10105            }
10106        }
10107    }
10108
10109    impl std::convert::From<&str> for Mode {
10110        fn from(value: &str) -> Self {
10111            use std::string::ToString;
10112            match value {
10113                "MODE_UNSPECIFIED" => Self::Unspecified,
10114                "DISABLED" => Self::Disabled,
10115                "BASIC" => Self::Basic,
10116                "ENTERPRISE" => Self::Enterprise,
10117                _ => Self::UnknownValue(mode::UnknownValue(
10118                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10119                )),
10120            }
10121        }
10122    }
10123
10124    impl serde::ser::Serialize for Mode {
10125        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10126        where
10127            S: serde::Serializer,
10128        {
10129            match self {
10130                Self::Unspecified => serializer.serialize_i32(0),
10131                Self::Disabled => serializer.serialize_i32(1),
10132                Self::Basic => serializer.serialize_i32(2),
10133                Self::Enterprise => serializer.serialize_i32(3),
10134                Self::UnknownValue(u) => u.0.serialize(serializer),
10135            }
10136        }
10137    }
10138
10139    impl<'de> serde::de::Deserialize<'de> for Mode {
10140        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10141        where
10142            D: serde::Deserializer<'de>,
10143        {
10144            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
10145                ".google.container.v1.SecurityPostureConfig.Mode",
10146            ))
10147        }
10148    }
10149
10150    /// VulnerabilityMode defines enablement mode for vulnerability scanning.
10151    ///
10152    /// # Working with unknown values
10153    ///
10154    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10155    /// additional enum variants at any time. Adding new variants is not considered
10156    /// a breaking change. Applications should write their code in anticipation of:
10157    ///
10158    /// - New values appearing in future releases of the client library, **and**
10159    /// - New values received dynamically, without application changes.
10160    ///
10161    /// Please consult the [Working with enums] section in the user guide for some
10162    /// guidelines.
10163    ///
10164    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10165    #[derive(Clone, Debug, PartialEq)]
10166    #[non_exhaustive]
10167    pub enum VulnerabilityMode {
10168        /// Default value not specified.
10169        Unspecified,
10170        /// Disables vulnerability scanning on the cluster.
10171        VulnerabilityDisabled,
10172        /// Applies basic vulnerability scanning on the cluster.
10173        VulnerabilityBasic,
10174        /// Applies the Security Posture's vulnerability on cluster Enterprise level
10175        /// features.
10176        VulnerabilityEnterprise,
10177        /// If set, the enum was initialized with an unknown value.
10178        ///
10179        /// Applications can examine the value using [VulnerabilityMode::value] or
10180        /// [VulnerabilityMode::name].
10181        UnknownValue(vulnerability_mode::UnknownValue),
10182    }
10183
10184    #[doc(hidden)]
10185    pub mod vulnerability_mode {
10186        #[allow(unused_imports)]
10187        use super::*;
10188        #[derive(Clone, Debug, PartialEq)]
10189        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10190    }
10191
10192    impl VulnerabilityMode {
10193        /// Gets the enum value.
10194        ///
10195        /// Returns `None` if the enum contains an unknown value deserialized from
10196        /// the string representation of enums.
10197        pub fn value(&self) -> std::option::Option<i32> {
10198            match self {
10199                Self::Unspecified => std::option::Option::Some(0),
10200                Self::VulnerabilityDisabled => std::option::Option::Some(1),
10201                Self::VulnerabilityBasic => std::option::Option::Some(2),
10202                Self::VulnerabilityEnterprise => std::option::Option::Some(3),
10203                Self::UnknownValue(u) => u.0.value(),
10204            }
10205        }
10206
10207        /// Gets the enum value as a string.
10208        ///
10209        /// Returns `None` if the enum contains an unknown value deserialized from
10210        /// the integer representation of enums.
10211        pub fn name(&self) -> std::option::Option<&str> {
10212            match self {
10213                Self::Unspecified => std::option::Option::Some("VULNERABILITY_MODE_UNSPECIFIED"),
10214                Self::VulnerabilityDisabled => std::option::Option::Some("VULNERABILITY_DISABLED"),
10215                Self::VulnerabilityBasic => std::option::Option::Some("VULNERABILITY_BASIC"),
10216                Self::VulnerabilityEnterprise => {
10217                    std::option::Option::Some("VULNERABILITY_ENTERPRISE")
10218                }
10219                Self::UnknownValue(u) => u.0.name(),
10220            }
10221        }
10222    }
10223
10224    impl std::default::Default for VulnerabilityMode {
10225        fn default() -> Self {
10226            use std::convert::From;
10227            Self::from(0)
10228        }
10229    }
10230
10231    impl std::fmt::Display for VulnerabilityMode {
10232        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10233            wkt::internal::display_enum(f, self.name(), self.value())
10234        }
10235    }
10236
10237    impl std::convert::From<i32> for VulnerabilityMode {
10238        fn from(value: i32) -> Self {
10239            match value {
10240                0 => Self::Unspecified,
10241                1 => Self::VulnerabilityDisabled,
10242                2 => Self::VulnerabilityBasic,
10243                3 => Self::VulnerabilityEnterprise,
10244                _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
10245                    wkt::internal::UnknownEnumValue::Integer(value),
10246                )),
10247            }
10248        }
10249    }
10250
10251    impl std::convert::From<&str> for VulnerabilityMode {
10252        fn from(value: &str) -> Self {
10253            use std::string::ToString;
10254            match value {
10255                "VULNERABILITY_MODE_UNSPECIFIED" => Self::Unspecified,
10256                "VULNERABILITY_DISABLED" => Self::VulnerabilityDisabled,
10257                "VULNERABILITY_BASIC" => Self::VulnerabilityBasic,
10258                "VULNERABILITY_ENTERPRISE" => Self::VulnerabilityEnterprise,
10259                _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
10260                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10261                )),
10262            }
10263        }
10264    }
10265
10266    impl serde::ser::Serialize for VulnerabilityMode {
10267        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10268        where
10269            S: serde::Serializer,
10270        {
10271            match self {
10272                Self::Unspecified => serializer.serialize_i32(0),
10273                Self::VulnerabilityDisabled => serializer.serialize_i32(1),
10274                Self::VulnerabilityBasic => serializer.serialize_i32(2),
10275                Self::VulnerabilityEnterprise => serializer.serialize_i32(3),
10276                Self::UnknownValue(u) => u.0.serialize(serializer),
10277            }
10278        }
10279    }
10280
10281    impl<'de> serde::de::Deserialize<'de> for VulnerabilityMode {
10282        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10283        where
10284            D: serde::Deserializer<'de>,
10285        {
10286            deserializer.deserialize_any(wkt::internal::EnumVisitor::<VulnerabilityMode>::new(
10287                ".google.container.v1.SecurityPostureConfig.VulnerabilityMode",
10288            ))
10289        }
10290    }
10291}
10292
10293/// Node pool configs that apply to all auto-provisioned node pools
10294/// in autopilot clusters and node auto-provisioning enabled clusters.
10295#[derive(Clone, Default, PartialEq)]
10296#[non_exhaustive]
10297pub struct NodePoolAutoConfig {
10298    /// The list of instance tags applied to all nodes. Tags are used to identify
10299    /// valid sources or targets for network firewalls and are specified by
10300    /// the client during cluster creation. Each tag within the list
10301    /// must comply with RFC1035.
10302    pub network_tags: std::option::Option<crate::model::NetworkTags>,
10303
10304    /// Resource manager tag keys and values to be attached to the nodes
10305    /// for managing Compute Engine firewalls using Network Firewall Policies.
10306    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
10307
10308    /// NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
10309    ///
10310    /// Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
10311    pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10312
10313    /// Output only. Configuration options for Linux nodes.
10314    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
10315
10316    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10317}
10318
10319impl NodePoolAutoConfig {
10320    pub fn new() -> Self {
10321        std::default::Default::default()
10322    }
10323
10324    /// Sets the value of [network_tags][crate::model::NodePoolAutoConfig::network_tags].
10325    pub fn set_network_tags<T>(mut self, v: T) -> Self
10326    where
10327        T: std::convert::Into<crate::model::NetworkTags>,
10328    {
10329        self.network_tags = std::option::Option::Some(v.into());
10330        self
10331    }
10332
10333    /// Sets or clears the value of [network_tags][crate::model::NodePoolAutoConfig::network_tags].
10334    pub fn set_or_clear_network_tags<T>(mut self, v: std::option::Option<T>) -> Self
10335    where
10336        T: std::convert::Into<crate::model::NetworkTags>,
10337    {
10338        self.network_tags = v.map(|x| x.into());
10339        self
10340    }
10341
10342    /// Sets the value of [resource_manager_tags][crate::model::NodePoolAutoConfig::resource_manager_tags].
10343    pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
10344    where
10345        T: std::convert::Into<crate::model::ResourceManagerTags>,
10346    {
10347        self.resource_manager_tags = std::option::Option::Some(v.into());
10348        self
10349    }
10350
10351    /// Sets or clears the value of [resource_manager_tags][crate::model::NodePoolAutoConfig::resource_manager_tags].
10352    pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
10353    where
10354        T: std::convert::Into<crate::model::ResourceManagerTags>,
10355    {
10356        self.resource_manager_tags = v.map(|x| x.into());
10357        self
10358    }
10359
10360    /// Sets the value of [node_kubelet_config][crate::model::NodePoolAutoConfig::node_kubelet_config].
10361    pub fn set_node_kubelet_config<T>(mut self, v: T) -> Self
10362    where
10363        T: std::convert::Into<crate::model::NodeKubeletConfig>,
10364    {
10365        self.node_kubelet_config = std::option::Option::Some(v.into());
10366        self
10367    }
10368
10369    /// Sets or clears the value of [node_kubelet_config][crate::model::NodePoolAutoConfig::node_kubelet_config].
10370    pub fn set_or_clear_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
10371    where
10372        T: std::convert::Into<crate::model::NodeKubeletConfig>,
10373    {
10374        self.node_kubelet_config = v.map(|x| x.into());
10375        self
10376    }
10377
10378    /// Sets the value of [linux_node_config][crate::model::NodePoolAutoConfig::linux_node_config].
10379    pub fn set_linux_node_config<T>(mut self, v: T) -> Self
10380    where
10381        T: std::convert::Into<crate::model::LinuxNodeConfig>,
10382    {
10383        self.linux_node_config = std::option::Option::Some(v.into());
10384        self
10385    }
10386
10387    /// Sets or clears the value of [linux_node_config][crate::model::NodePoolAutoConfig::linux_node_config].
10388    pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
10389    where
10390        T: std::convert::Into<crate::model::LinuxNodeConfig>,
10391    {
10392        self.linux_node_config = v.map(|x| x.into());
10393        self
10394    }
10395}
10396
10397impl wkt::message::Message for NodePoolAutoConfig {
10398    fn typename() -> &'static str {
10399        "type.googleapis.com/google.container.v1.NodePoolAutoConfig"
10400    }
10401}
10402
10403/// Subset of Nodepool message that has defaults.
10404#[derive(Clone, Default, PartialEq)]
10405#[non_exhaustive]
10406pub struct NodePoolDefaults {
10407    /// Subset of NodeConfig message that has defaults.
10408    pub node_config_defaults: std::option::Option<crate::model::NodeConfigDefaults>,
10409
10410    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10411}
10412
10413impl NodePoolDefaults {
10414    pub fn new() -> Self {
10415        std::default::Default::default()
10416    }
10417
10418    /// Sets the value of [node_config_defaults][crate::model::NodePoolDefaults::node_config_defaults].
10419    pub fn set_node_config_defaults<T>(mut self, v: T) -> Self
10420    where
10421        T: std::convert::Into<crate::model::NodeConfigDefaults>,
10422    {
10423        self.node_config_defaults = std::option::Option::Some(v.into());
10424        self
10425    }
10426
10427    /// Sets or clears the value of [node_config_defaults][crate::model::NodePoolDefaults::node_config_defaults].
10428    pub fn set_or_clear_node_config_defaults<T>(mut self, v: std::option::Option<T>) -> Self
10429    where
10430        T: std::convert::Into<crate::model::NodeConfigDefaults>,
10431    {
10432        self.node_config_defaults = v.map(|x| x.into());
10433        self
10434    }
10435}
10436
10437impl wkt::message::Message for NodePoolDefaults {
10438    fn typename() -> &'static str {
10439        "type.googleapis.com/google.container.v1.NodePoolDefaults"
10440    }
10441}
10442
10443/// Subset of NodeConfig message that has defaults.
10444#[derive(Clone, Default, PartialEq)]
10445#[non_exhaustive]
10446pub struct NodeConfigDefaults {
10447    /// GCFS (Google Container File System, also known as Riptide) options.
10448    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10449
10450    /// Logging configuration for node pools.
10451    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10452
10453    /// Parameters for containerd customization.
10454    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10455
10456    /// NodeKubeletConfig controls the defaults for new node-pools.
10457    ///
10458    /// Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
10459    pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10460
10461    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10462}
10463
10464impl NodeConfigDefaults {
10465    pub fn new() -> Self {
10466        std::default::Default::default()
10467    }
10468
10469    /// Sets the value of [gcfs_config][crate::model::NodeConfigDefaults::gcfs_config].
10470    pub fn set_gcfs_config<T>(mut self, v: T) -> Self
10471    where
10472        T: std::convert::Into<crate::model::GcfsConfig>,
10473    {
10474        self.gcfs_config = std::option::Option::Some(v.into());
10475        self
10476    }
10477
10478    /// Sets or clears the value of [gcfs_config][crate::model::NodeConfigDefaults::gcfs_config].
10479    pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
10480    where
10481        T: std::convert::Into<crate::model::GcfsConfig>,
10482    {
10483        self.gcfs_config = v.map(|x| x.into());
10484        self
10485    }
10486
10487    /// Sets the value of [logging_config][crate::model::NodeConfigDefaults::logging_config].
10488    pub fn set_logging_config<T>(mut self, v: T) -> Self
10489    where
10490        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
10491    {
10492        self.logging_config = std::option::Option::Some(v.into());
10493        self
10494    }
10495
10496    /// Sets or clears the value of [logging_config][crate::model::NodeConfigDefaults::logging_config].
10497    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
10498    where
10499        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
10500    {
10501        self.logging_config = v.map(|x| x.into());
10502        self
10503    }
10504
10505    /// Sets the value of [containerd_config][crate::model::NodeConfigDefaults::containerd_config].
10506    pub fn set_containerd_config<T>(mut self, v: T) -> Self
10507    where
10508        T: std::convert::Into<crate::model::ContainerdConfig>,
10509    {
10510        self.containerd_config = std::option::Option::Some(v.into());
10511        self
10512    }
10513
10514    /// Sets or clears the value of [containerd_config][crate::model::NodeConfigDefaults::containerd_config].
10515    pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
10516    where
10517        T: std::convert::Into<crate::model::ContainerdConfig>,
10518    {
10519        self.containerd_config = v.map(|x| x.into());
10520        self
10521    }
10522
10523    /// Sets the value of [node_kubelet_config][crate::model::NodeConfigDefaults::node_kubelet_config].
10524    pub fn set_node_kubelet_config<T>(mut self, v: T) -> Self
10525    where
10526        T: std::convert::Into<crate::model::NodeKubeletConfig>,
10527    {
10528        self.node_kubelet_config = std::option::Option::Some(v.into());
10529        self
10530    }
10531
10532    /// Sets or clears the value of [node_kubelet_config][crate::model::NodeConfigDefaults::node_kubelet_config].
10533    pub fn set_or_clear_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
10534    where
10535        T: std::convert::Into<crate::model::NodeKubeletConfig>,
10536    {
10537        self.node_kubelet_config = v.map(|x| x.into());
10538        self
10539    }
10540}
10541
10542impl wkt::message::Message for NodeConfigDefaults {
10543    fn typename() -> &'static str {
10544        "type.googleapis.com/google.container.v1.NodeConfigDefaults"
10545    }
10546}
10547
10548/// ClusterUpdate describes an update to the cluster. Exactly one update can
10549/// be applied to a cluster with each request, so at most one field can be
10550/// provided.
10551#[derive(Clone, Default, PartialEq)]
10552#[non_exhaustive]
10553pub struct ClusterUpdate {
10554    /// The Kubernetes version to change the nodes to (typically an
10555    /// upgrade).
10556    ///
10557    /// Users may specify either explicit versions offered by
10558    /// Kubernetes Engine or version aliases, which have the following behavior:
10559    ///
10560    /// - "latest": picks the highest valid Kubernetes version
10561    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
10562    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
10563    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
10564    /// - "-": picks the Kubernetes master version
10565    pub desired_node_version: std::string::String,
10566
10567    /// The monitoring service the cluster should use to write metrics.
10568    /// Currently available options:
10569    ///
10570    /// * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring
10571    ///   service with a Kubernetes-native resource model
10572    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
10573    ///   longer available as of GKE 1.15).
10574    /// * `none` - No metrics will be exported from the cluster.
10575    ///
10576    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
10577    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
10578    pub desired_monitoring_service: std::string::String,
10579
10580    /// Configurations for the various addons available to run in the cluster.
10581    pub desired_addons_config: std::option::Option<crate::model::AddonsConfig>,
10582
10583    /// The node pool to be upgraded. This field is mandatory if
10584    /// "desired_node_version", "desired_image_family" or
10585    /// "desired_node_pool_autoscaling" is specified and there is more than one
10586    /// node pool on the cluster.
10587    pub desired_node_pool_id: std::string::String,
10588
10589    /// The desired image type for the node pool.
10590    /// NOTE: Set the "desired_node_pool" field as well.
10591    pub desired_image_type: std::string::String,
10592
10593    /// Configuration of etcd encryption.
10594    pub desired_database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
10595
10596    /// Configuration for Workload Identity.
10597    pub desired_workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
10598
10599    /// Configuration for issuance of mTLS keys and certificates to Kubernetes
10600    /// pods.
10601    pub desired_mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
10602
10603    /// Configuration for Shielded Nodes.
10604    pub desired_shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
10605
10606    /// The desired configuration for the fine-grained cost management feature.
10607    pub desired_cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
10608
10609    /// DNSConfig contains clusterDNS config for this cluster.
10610    pub desired_dns_config: std::option::Option<crate::model::DNSConfig>,
10611
10612    /// Autoscaler configuration for the node pool specified in
10613    /// desired_node_pool_id. If there is only one pool in the
10614    /// cluster and desired_node_pool_id is not provided then
10615    /// the change applies to that single node pool.
10616    pub desired_node_pool_autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
10617
10618    /// The desired list of Google Compute Engine
10619    /// [zones](https://cloud.google.com/compute/docs/zones#available)
10620    /// in which the cluster's nodes should be located.
10621    ///
10622    /// This list must always include the cluster's primary zone.
10623    ///
10624    /// Warning: changing cluster locations will update the locations of all node
10625    /// pools and will result in nodes being added and/or removed.
10626    pub desired_locations: std::vec::Vec<std::string::String>,
10627
10628    /// The desired configuration options for master authorized networks feature.
10629    ///
10630    /// Deprecated: Use
10631    /// desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config
10632    /// instead.
10633    #[deprecated]
10634    pub desired_master_authorized_networks_config:
10635        std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
10636
10637    /// Cluster-level autoscaling configuration.
10638    pub desired_cluster_autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
10639
10640    /// The desired configuration options for the Binary Authorization feature.
10641    pub desired_binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
10642
10643    /// The logging service the cluster should use to write logs.
10644    /// Currently available options:
10645    ///
10646    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
10647    ///   service with a Kubernetes-native resource model
10648    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
10649    ///   available as of GKE 1.15).
10650    /// * `none` - no logs will be exported from the cluster.
10651    ///
10652    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
10653    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
10654    pub desired_logging_service: std::string::String,
10655
10656    /// The desired configuration for exporting resource usage.
10657    pub desired_resource_usage_export_config:
10658        std::option::Option<crate::model::ResourceUsageExportConfig>,
10659
10660    /// Cluster-level Vertical Pod Autoscaling configuration.
10661    pub desired_vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
10662
10663    /// The desired private cluster configuration. master_global_access_config is
10664    /// the only field that can be changed via this field.
10665    /// See also
10666    /// [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
10667    /// for modifying other fields within
10668    /// [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
10669    ///
10670    /// Deprecated: Use
10671    /// desired_control_plane_endpoints_config.ip_endpoints_config.global_access
10672    /// instead.
10673    ///
10674    /// [google.container.v1.ClusterUpdate.desired_enable_private_endpoint]: crate::model::ClusterUpdate::desired_enable_private_endpoint
10675    /// [google.container.v1.PrivateClusterConfig]: crate::model::PrivateClusterConfig
10676    #[deprecated]
10677    pub desired_private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
10678
10679    /// The desired config of Intra-node visibility.
10680    pub desired_intra_node_visibility_config:
10681        std::option::Option<crate::model::IntraNodeVisibilityConfig>,
10682
10683    /// The desired status of whether to disable default sNAT for this cluster.
10684    pub desired_default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
10685
10686    /// The desired release channel configuration.
10687    pub desired_release_channel: std::option::Option<crate::model::ReleaseChannel>,
10688
10689    /// The desired L4 Internal Load Balancer Subsetting configuration.
10690    pub desired_l4ilb_subsetting_config: std::option::Option<crate::model::ILBSubsettingConfig>,
10691
10692    /// The desired datapath provider for the cluster.
10693    pub desired_datapath_provider: crate::model::DatapathProvider,
10694
10695    /// The desired state of IPv6 connectivity to Google Services.
10696    pub desired_private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
10697
10698    /// The desired notification configuration.
10699    pub desired_notification_config: std::option::Option<crate::model::NotificationConfig>,
10700
10701    /// The desired authenticator groups config for the cluster.
10702    pub desired_authenticator_groups_config:
10703        std::option::Option<crate::model::AuthenticatorGroupsConfig>,
10704
10705    /// The desired logging configuration.
10706    pub desired_logging_config: std::option::Option<crate::model::LoggingConfig>,
10707
10708    /// The desired monitoring configuration.
10709    pub desired_monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
10710
10711    /// The desired Identity Service component configuration.
10712    pub desired_identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
10713
10714    /// ServiceExternalIPsConfig specifies the config for the use of Services with
10715    /// ExternalIPs field.
10716    pub desired_service_external_ips_config:
10717        std::option::Option<crate::model::ServiceExternalIPsConfig>,
10718
10719    /// Enable/Disable private endpoint for the cluster's master.
10720    ///
10721    /// Deprecated: Use
10722    /// desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint
10723    /// instead. Note that the value of enable_public_endpoint is reversed: if
10724    /// enable_private_endpoint is false, then enable_public_endpoint will be true.
10725    #[deprecated]
10726    pub desired_enable_private_endpoint: std::option::Option<bool>,
10727
10728    /// Override the default setting of whether future created
10729    /// nodes have private IP addresses only, namely
10730    /// [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes]
10731    ///
10732    /// [google.container.v1.NetworkConfig.default_enable_private_nodes]: crate::model::NetworkConfig::default_enable_private_nodes
10733    pub desired_default_enable_private_nodes: std::option::Option<bool>,
10734
10735    /// [Control plane
10736    /// endpoints][google.container.v1.Cluster.control_plane_endpoints_config]
10737    /// configuration.
10738    ///
10739    /// [google.container.v1.Cluster.control_plane_endpoints_config]: crate::model::Cluster::control_plane_endpoints_config
10740    pub desired_control_plane_endpoints_config:
10741        std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
10742
10743    /// The Kubernetes version to change the master to.
10744    ///
10745    /// Users may specify either explicit versions offered by
10746    /// Kubernetes Engine or version aliases, which have the following behavior:
10747    ///
10748    /// - "latest": picks the highest valid Kubernetes version
10749    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
10750    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
10751    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
10752    /// - "-": picks the default Kubernetes version
10753    pub desired_master_version: std::string::String,
10754
10755    /// The desired GCFS config for the cluster
10756    pub desired_gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10757
10758    /// The desired network tags that apply to all auto-provisioned node pools
10759    /// in autopilot clusters and node auto-provisioning enabled clusters.
10760    pub desired_node_pool_auto_config_network_tags: std::option::Option<crate::model::NetworkTags>,
10761
10762    /// The desired config for pod autoscaling.
10763    pub desired_pod_autoscaling: std::option::Option<crate::model::PodAutoscaling>,
10764
10765    /// The desired config of Gateway API on this cluster.
10766    pub desired_gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
10767
10768    /// The current etag of the cluster.
10769    /// If an etag is provided and does not match the current etag of the cluster,
10770    /// update will be blocked and an ABORTED error will be returned.
10771    pub etag: std::string::String,
10772
10773    /// The desired node pool logging configuration defaults for the cluster.
10774    pub desired_node_pool_logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10775
10776    /// The desired fleet configuration for the cluster.
10777    pub desired_fleet: std::option::Option<crate::model::Fleet>,
10778
10779    /// The desired stack type of the cluster.
10780    /// If a stack type is provided and does not match the current stack type of
10781    /// the cluster, update will attempt to change the stack type to the new type.
10782    pub desired_stack_type: crate::model::StackType,
10783
10784    /// The additional pod ranges to be added to the cluster. These pod ranges
10785    /// can be used by node pools to allocate pod IPs.
10786    pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
10787
10788    /// The additional pod ranges that are to be removed from the cluster.
10789    /// The pod ranges specified here must have been specified earlier in the
10790    /// 'additional_pod_ranges_config' argument.
10791    pub removed_additional_pod_ranges_config:
10792        std::option::Option<crate::model::AdditionalPodRangesConfig>,
10793
10794    /// Kubernetes open source beta apis enabled on the cluster. Only beta apis
10795    pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
10796
10797    /// Enable/Disable Security Posture API features for the cluster.
10798    pub desired_security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
10799
10800    /// The desired network performance config.
10801    pub desired_network_performance_config:
10802        std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
10803
10804    /// Enable/Disable FQDN Network Policy for the cluster.
10805    pub desired_enable_fqdn_network_policy: std::option::Option<bool>,
10806
10807    /// WorkloadPolicyConfig is the configuration related to GCW workload policy
10808    pub desired_autopilot_workload_policy_config:
10809        std::option::Option<crate::model::WorkloadPolicyConfig>,
10810
10811    /// Desired Beta APIs to be enabled for cluster.
10812    pub desired_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
10813
10814    /// The desired containerd config for the cluster.
10815    pub desired_containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10816
10817    /// Enable/Disable Multi-Networking for the cluster
10818    pub desired_enable_multi_networking: std::option::Option<bool>,
10819
10820    /// The desired resource manager tags that apply to all auto-provisioned node
10821    /// pools in autopilot clusters and node auto-provisioning enabled clusters.
10822    pub desired_node_pool_auto_config_resource_manager_tags:
10823        std::option::Option<crate::model::ResourceManagerTags>,
10824
10825    /// Specify the details of in-transit encryption.
10826    pub desired_in_transit_encryption_config:
10827        std::option::Option<crate::model::InTransitEncryptionConfig>,
10828
10829    /// Enable/Disable Cilium Clusterwide Network Policy for the cluster.
10830    pub desired_enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
10831
10832    /// Enable/Disable Secret Manager Config.
10833    pub desired_secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
10834
10835    /// Enable/Disable Compliance Posture features for the cluster.
10836    pub desired_compliance_posture_config:
10837        std::option::Option<crate::model::CompliancePostureConfig>,
10838
10839    /// The desired node kubelet config for the cluster.
10840    pub desired_node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10841
10842    /// The desired node kubelet config for all auto-provisioned node pools
10843    /// in autopilot clusters and node auto-provisioning enabled clusters.
10844    pub desired_node_pool_auto_config_kubelet_config:
10845        std::option::Option<crate::model::NodeKubeletConfig>,
10846
10847    /// The Custom keys configuration for the cluster.
10848    ///
10849    /// This field is deprecated.
10850    /// Use
10851    /// [ClusterUpdate.desired_user_managed_keys_config][google.container.v1.ClusterUpdate.desired_user_managed_keys_config]
10852    /// instead.
10853    ///
10854    /// [google.container.v1.ClusterUpdate.desired_user_managed_keys_config]: crate::model::ClusterUpdate::desired_user_managed_keys_config
10855    #[deprecated]
10856    pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
10857
10858    /// RBACBindingConfig allows user to restrict ClusterRoleBindings an
10859    /// RoleBindings that can be created.
10860    pub desired_rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
10861
10862    /// The desired config for additional subnetworks attached to the cluster.
10863    pub desired_additional_ip_ranges_config:
10864        std::option::Option<crate::model::DesiredAdditionalIPRangesConfig>,
10865
10866    /// The desired enterprise configuration for the cluster.
10867    ///
10868    /// Deprecated: GKE Enterprise features are now available without an Enterprise
10869    /// tier.
10870    #[deprecated]
10871    pub desired_enterprise_config: std::option::Option<crate::model::DesiredEnterpriseConfig>,
10872
10873    /// AutoIpamConfig contains all information related to Auto IPAM
10874    pub desired_auto_ipam_config: std::option::Option<crate::model::AutoIpamConfig>,
10875
10876    /// Enable/Disable L4 LB VPC firewall reconciliation for the cluster.
10877    pub desired_disable_l4_lb_firewall_reconciliation: std::option::Option<bool>,
10878
10879    /// The desired Linux node config for all auto-provisioned node pools
10880    /// in autopilot clusters and node auto-provisioning enabled clusters.
10881    ///
10882    /// Currently only `cgroup_mode` can be set here.
10883    pub desired_node_pool_auto_config_linux_node_config:
10884        std::option::Option<crate::model::LinuxNodeConfig>,
10885
10886    /// The desired user managed keys config for the cluster.
10887    pub desired_user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
10888
10889    /// Configuration for limiting anonymous access to all endpoints except the
10890    /// health checks.
10891    pub desired_anonymous_authentication_config:
10892        std::option::Option<crate::model::AnonymousAuthenticationConfig>,
10893
10894    /// Configuration for GKE auto upgrade.
10895    pub gke_auto_upgrade_config: std::option::Option<crate::model::GkeAutoUpgradeConfig>,
10896
10897    /// The desired network tier configuration for the cluster.
10898    pub desired_network_tier_config: std::option::Option<crate::model::NetworkTierConfig>,
10899
10900    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10901}
10902
10903impl ClusterUpdate {
10904    pub fn new() -> Self {
10905        std::default::Default::default()
10906    }
10907
10908    /// Sets the value of [desired_node_version][crate::model::ClusterUpdate::desired_node_version].
10909    pub fn set_desired_node_version<T: std::convert::Into<std::string::String>>(
10910        mut self,
10911        v: T,
10912    ) -> Self {
10913        self.desired_node_version = v.into();
10914        self
10915    }
10916
10917    /// Sets the value of [desired_monitoring_service][crate::model::ClusterUpdate::desired_monitoring_service].
10918    pub fn set_desired_monitoring_service<T: std::convert::Into<std::string::String>>(
10919        mut self,
10920        v: T,
10921    ) -> Self {
10922        self.desired_monitoring_service = v.into();
10923        self
10924    }
10925
10926    /// Sets the value of [desired_addons_config][crate::model::ClusterUpdate::desired_addons_config].
10927    pub fn set_desired_addons_config<T>(mut self, v: T) -> Self
10928    where
10929        T: std::convert::Into<crate::model::AddonsConfig>,
10930    {
10931        self.desired_addons_config = std::option::Option::Some(v.into());
10932        self
10933    }
10934
10935    /// Sets or clears the value of [desired_addons_config][crate::model::ClusterUpdate::desired_addons_config].
10936    pub fn set_or_clear_desired_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
10937    where
10938        T: std::convert::Into<crate::model::AddonsConfig>,
10939    {
10940        self.desired_addons_config = v.map(|x| x.into());
10941        self
10942    }
10943
10944    /// Sets the value of [desired_node_pool_id][crate::model::ClusterUpdate::desired_node_pool_id].
10945    pub fn set_desired_node_pool_id<T: std::convert::Into<std::string::String>>(
10946        mut self,
10947        v: T,
10948    ) -> Self {
10949        self.desired_node_pool_id = v.into();
10950        self
10951    }
10952
10953    /// Sets the value of [desired_image_type][crate::model::ClusterUpdate::desired_image_type].
10954    pub fn set_desired_image_type<T: std::convert::Into<std::string::String>>(
10955        mut self,
10956        v: T,
10957    ) -> Self {
10958        self.desired_image_type = v.into();
10959        self
10960    }
10961
10962    /// Sets the value of [desired_database_encryption][crate::model::ClusterUpdate::desired_database_encryption].
10963    pub fn set_desired_database_encryption<T>(mut self, v: T) -> Self
10964    where
10965        T: std::convert::Into<crate::model::DatabaseEncryption>,
10966    {
10967        self.desired_database_encryption = std::option::Option::Some(v.into());
10968        self
10969    }
10970
10971    /// Sets or clears the value of [desired_database_encryption][crate::model::ClusterUpdate::desired_database_encryption].
10972    pub fn set_or_clear_desired_database_encryption<T>(mut self, v: std::option::Option<T>) -> Self
10973    where
10974        T: std::convert::Into<crate::model::DatabaseEncryption>,
10975    {
10976        self.desired_database_encryption = v.map(|x| x.into());
10977        self
10978    }
10979
10980    /// Sets the value of [desired_workload_identity_config][crate::model::ClusterUpdate::desired_workload_identity_config].
10981    pub fn set_desired_workload_identity_config<T>(mut self, v: T) -> Self
10982    where
10983        T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
10984    {
10985        self.desired_workload_identity_config = std::option::Option::Some(v.into());
10986        self
10987    }
10988
10989    /// Sets or clears the value of [desired_workload_identity_config][crate::model::ClusterUpdate::desired_workload_identity_config].
10990    pub fn set_or_clear_desired_workload_identity_config<T>(
10991        mut self,
10992        v: std::option::Option<T>,
10993    ) -> Self
10994    where
10995        T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
10996    {
10997        self.desired_workload_identity_config = v.map(|x| x.into());
10998        self
10999    }
11000
11001    /// Sets the value of [desired_mesh_certificates][crate::model::ClusterUpdate::desired_mesh_certificates].
11002    pub fn set_desired_mesh_certificates<T>(mut self, v: T) -> Self
11003    where
11004        T: std::convert::Into<crate::model::MeshCertificates>,
11005    {
11006        self.desired_mesh_certificates = std::option::Option::Some(v.into());
11007        self
11008    }
11009
11010    /// Sets or clears the value of [desired_mesh_certificates][crate::model::ClusterUpdate::desired_mesh_certificates].
11011    pub fn set_or_clear_desired_mesh_certificates<T>(mut self, v: std::option::Option<T>) -> Self
11012    where
11013        T: std::convert::Into<crate::model::MeshCertificates>,
11014    {
11015        self.desired_mesh_certificates = v.map(|x| x.into());
11016        self
11017    }
11018
11019    /// Sets the value of [desired_shielded_nodes][crate::model::ClusterUpdate::desired_shielded_nodes].
11020    pub fn set_desired_shielded_nodes<T>(mut self, v: T) -> Self
11021    where
11022        T: std::convert::Into<crate::model::ShieldedNodes>,
11023    {
11024        self.desired_shielded_nodes = std::option::Option::Some(v.into());
11025        self
11026    }
11027
11028    /// Sets or clears the value of [desired_shielded_nodes][crate::model::ClusterUpdate::desired_shielded_nodes].
11029    pub fn set_or_clear_desired_shielded_nodes<T>(mut self, v: std::option::Option<T>) -> Self
11030    where
11031        T: std::convert::Into<crate::model::ShieldedNodes>,
11032    {
11033        self.desired_shielded_nodes = v.map(|x| x.into());
11034        self
11035    }
11036
11037    /// Sets the value of [desired_cost_management_config][crate::model::ClusterUpdate::desired_cost_management_config].
11038    pub fn set_desired_cost_management_config<T>(mut self, v: T) -> Self
11039    where
11040        T: std::convert::Into<crate::model::CostManagementConfig>,
11041    {
11042        self.desired_cost_management_config = std::option::Option::Some(v.into());
11043        self
11044    }
11045
11046    /// Sets or clears the value of [desired_cost_management_config][crate::model::ClusterUpdate::desired_cost_management_config].
11047    pub fn set_or_clear_desired_cost_management_config<T>(
11048        mut self,
11049        v: std::option::Option<T>,
11050    ) -> Self
11051    where
11052        T: std::convert::Into<crate::model::CostManagementConfig>,
11053    {
11054        self.desired_cost_management_config = v.map(|x| x.into());
11055        self
11056    }
11057
11058    /// Sets the value of [desired_dns_config][crate::model::ClusterUpdate::desired_dns_config].
11059    pub fn set_desired_dns_config<T>(mut self, v: T) -> Self
11060    where
11061        T: std::convert::Into<crate::model::DNSConfig>,
11062    {
11063        self.desired_dns_config = std::option::Option::Some(v.into());
11064        self
11065    }
11066
11067    /// Sets or clears the value of [desired_dns_config][crate::model::ClusterUpdate::desired_dns_config].
11068    pub fn set_or_clear_desired_dns_config<T>(mut self, v: std::option::Option<T>) -> Self
11069    where
11070        T: std::convert::Into<crate::model::DNSConfig>,
11071    {
11072        self.desired_dns_config = v.map(|x| x.into());
11073        self
11074    }
11075
11076    /// Sets the value of [desired_node_pool_autoscaling][crate::model::ClusterUpdate::desired_node_pool_autoscaling].
11077    pub fn set_desired_node_pool_autoscaling<T>(mut self, v: T) -> Self
11078    where
11079        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
11080    {
11081        self.desired_node_pool_autoscaling = std::option::Option::Some(v.into());
11082        self
11083    }
11084
11085    /// Sets or clears the value of [desired_node_pool_autoscaling][crate::model::ClusterUpdate::desired_node_pool_autoscaling].
11086    pub fn set_or_clear_desired_node_pool_autoscaling<T>(
11087        mut self,
11088        v: std::option::Option<T>,
11089    ) -> Self
11090    where
11091        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
11092    {
11093        self.desired_node_pool_autoscaling = v.map(|x| x.into());
11094        self
11095    }
11096
11097    /// Sets the value of [desired_locations][crate::model::ClusterUpdate::desired_locations].
11098    pub fn set_desired_locations<T, V>(mut self, v: T) -> Self
11099    where
11100        T: std::iter::IntoIterator<Item = V>,
11101        V: std::convert::Into<std::string::String>,
11102    {
11103        use std::iter::Iterator;
11104        self.desired_locations = v.into_iter().map(|i| i.into()).collect();
11105        self
11106    }
11107
11108    /// Sets the value of [desired_master_authorized_networks_config][crate::model::ClusterUpdate::desired_master_authorized_networks_config].
11109    #[deprecated]
11110    pub fn set_desired_master_authorized_networks_config<T>(mut self, v: T) -> Self
11111    where
11112        T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
11113    {
11114        self.desired_master_authorized_networks_config = std::option::Option::Some(v.into());
11115        self
11116    }
11117
11118    /// Sets or clears the value of [desired_master_authorized_networks_config][crate::model::ClusterUpdate::desired_master_authorized_networks_config].
11119    #[deprecated]
11120    pub fn set_or_clear_desired_master_authorized_networks_config<T>(
11121        mut self,
11122        v: std::option::Option<T>,
11123    ) -> Self
11124    where
11125        T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
11126    {
11127        self.desired_master_authorized_networks_config = v.map(|x| x.into());
11128        self
11129    }
11130
11131    /// Sets the value of [desired_cluster_autoscaling][crate::model::ClusterUpdate::desired_cluster_autoscaling].
11132    pub fn set_desired_cluster_autoscaling<T>(mut self, v: T) -> Self
11133    where
11134        T: std::convert::Into<crate::model::ClusterAutoscaling>,
11135    {
11136        self.desired_cluster_autoscaling = std::option::Option::Some(v.into());
11137        self
11138    }
11139
11140    /// Sets or clears the value of [desired_cluster_autoscaling][crate::model::ClusterUpdate::desired_cluster_autoscaling].
11141    pub fn set_or_clear_desired_cluster_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
11142    where
11143        T: std::convert::Into<crate::model::ClusterAutoscaling>,
11144    {
11145        self.desired_cluster_autoscaling = v.map(|x| x.into());
11146        self
11147    }
11148
11149    /// Sets the value of [desired_binary_authorization][crate::model::ClusterUpdate::desired_binary_authorization].
11150    pub fn set_desired_binary_authorization<T>(mut self, v: T) -> Self
11151    where
11152        T: std::convert::Into<crate::model::BinaryAuthorization>,
11153    {
11154        self.desired_binary_authorization = std::option::Option::Some(v.into());
11155        self
11156    }
11157
11158    /// Sets or clears the value of [desired_binary_authorization][crate::model::ClusterUpdate::desired_binary_authorization].
11159    pub fn set_or_clear_desired_binary_authorization<T>(mut self, v: std::option::Option<T>) -> Self
11160    where
11161        T: std::convert::Into<crate::model::BinaryAuthorization>,
11162    {
11163        self.desired_binary_authorization = v.map(|x| x.into());
11164        self
11165    }
11166
11167    /// Sets the value of [desired_logging_service][crate::model::ClusterUpdate::desired_logging_service].
11168    pub fn set_desired_logging_service<T: std::convert::Into<std::string::String>>(
11169        mut self,
11170        v: T,
11171    ) -> Self {
11172        self.desired_logging_service = v.into();
11173        self
11174    }
11175
11176    /// Sets the value of [desired_resource_usage_export_config][crate::model::ClusterUpdate::desired_resource_usage_export_config].
11177    pub fn set_desired_resource_usage_export_config<T>(mut self, v: T) -> Self
11178    where
11179        T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
11180    {
11181        self.desired_resource_usage_export_config = std::option::Option::Some(v.into());
11182        self
11183    }
11184
11185    /// Sets or clears the value of [desired_resource_usage_export_config][crate::model::ClusterUpdate::desired_resource_usage_export_config].
11186    pub fn set_or_clear_desired_resource_usage_export_config<T>(
11187        mut self,
11188        v: std::option::Option<T>,
11189    ) -> Self
11190    where
11191        T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
11192    {
11193        self.desired_resource_usage_export_config = v.map(|x| x.into());
11194        self
11195    }
11196
11197    /// Sets the value of [desired_vertical_pod_autoscaling][crate::model::ClusterUpdate::desired_vertical_pod_autoscaling].
11198    pub fn set_desired_vertical_pod_autoscaling<T>(mut self, v: T) -> Self
11199    where
11200        T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
11201    {
11202        self.desired_vertical_pod_autoscaling = std::option::Option::Some(v.into());
11203        self
11204    }
11205
11206    /// Sets or clears the value of [desired_vertical_pod_autoscaling][crate::model::ClusterUpdate::desired_vertical_pod_autoscaling].
11207    pub fn set_or_clear_desired_vertical_pod_autoscaling<T>(
11208        mut self,
11209        v: std::option::Option<T>,
11210    ) -> Self
11211    where
11212        T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
11213    {
11214        self.desired_vertical_pod_autoscaling = v.map(|x| x.into());
11215        self
11216    }
11217
11218    /// Sets the value of [desired_private_cluster_config][crate::model::ClusterUpdate::desired_private_cluster_config].
11219    #[deprecated]
11220    pub fn set_desired_private_cluster_config<T>(mut self, v: T) -> Self
11221    where
11222        T: std::convert::Into<crate::model::PrivateClusterConfig>,
11223    {
11224        self.desired_private_cluster_config = std::option::Option::Some(v.into());
11225        self
11226    }
11227
11228    /// Sets or clears the value of [desired_private_cluster_config][crate::model::ClusterUpdate::desired_private_cluster_config].
11229    #[deprecated]
11230    pub fn set_or_clear_desired_private_cluster_config<T>(
11231        mut self,
11232        v: std::option::Option<T>,
11233    ) -> Self
11234    where
11235        T: std::convert::Into<crate::model::PrivateClusterConfig>,
11236    {
11237        self.desired_private_cluster_config = v.map(|x| x.into());
11238        self
11239    }
11240
11241    /// Sets the value of [desired_intra_node_visibility_config][crate::model::ClusterUpdate::desired_intra_node_visibility_config].
11242    pub fn set_desired_intra_node_visibility_config<T>(mut self, v: T) -> Self
11243    where
11244        T: std::convert::Into<crate::model::IntraNodeVisibilityConfig>,
11245    {
11246        self.desired_intra_node_visibility_config = std::option::Option::Some(v.into());
11247        self
11248    }
11249
11250    /// Sets or clears the value of [desired_intra_node_visibility_config][crate::model::ClusterUpdate::desired_intra_node_visibility_config].
11251    pub fn set_or_clear_desired_intra_node_visibility_config<T>(
11252        mut self,
11253        v: std::option::Option<T>,
11254    ) -> Self
11255    where
11256        T: std::convert::Into<crate::model::IntraNodeVisibilityConfig>,
11257    {
11258        self.desired_intra_node_visibility_config = v.map(|x| x.into());
11259        self
11260    }
11261
11262    /// Sets the value of [desired_default_snat_status][crate::model::ClusterUpdate::desired_default_snat_status].
11263    pub fn set_desired_default_snat_status<T>(mut self, v: T) -> Self
11264    where
11265        T: std::convert::Into<crate::model::DefaultSnatStatus>,
11266    {
11267        self.desired_default_snat_status = std::option::Option::Some(v.into());
11268        self
11269    }
11270
11271    /// Sets or clears the value of [desired_default_snat_status][crate::model::ClusterUpdate::desired_default_snat_status].
11272    pub fn set_or_clear_desired_default_snat_status<T>(mut self, v: std::option::Option<T>) -> Self
11273    where
11274        T: std::convert::Into<crate::model::DefaultSnatStatus>,
11275    {
11276        self.desired_default_snat_status = v.map(|x| x.into());
11277        self
11278    }
11279
11280    /// Sets the value of [desired_release_channel][crate::model::ClusterUpdate::desired_release_channel].
11281    pub fn set_desired_release_channel<T>(mut self, v: T) -> Self
11282    where
11283        T: std::convert::Into<crate::model::ReleaseChannel>,
11284    {
11285        self.desired_release_channel = std::option::Option::Some(v.into());
11286        self
11287    }
11288
11289    /// Sets or clears the value of [desired_release_channel][crate::model::ClusterUpdate::desired_release_channel].
11290    pub fn set_or_clear_desired_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
11291    where
11292        T: std::convert::Into<crate::model::ReleaseChannel>,
11293    {
11294        self.desired_release_channel = v.map(|x| x.into());
11295        self
11296    }
11297
11298    /// Sets the value of [desired_l4ilb_subsetting_config][crate::model::ClusterUpdate::desired_l4ilb_subsetting_config].
11299    pub fn set_desired_l4ilb_subsetting_config<T>(mut self, v: T) -> Self
11300    where
11301        T: std::convert::Into<crate::model::ILBSubsettingConfig>,
11302    {
11303        self.desired_l4ilb_subsetting_config = std::option::Option::Some(v.into());
11304        self
11305    }
11306
11307    /// Sets or clears the value of [desired_l4ilb_subsetting_config][crate::model::ClusterUpdate::desired_l4ilb_subsetting_config].
11308    pub fn set_or_clear_desired_l4ilb_subsetting_config<T>(
11309        mut self,
11310        v: std::option::Option<T>,
11311    ) -> Self
11312    where
11313        T: std::convert::Into<crate::model::ILBSubsettingConfig>,
11314    {
11315        self.desired_l4ilb_subsetting_config = v.map(|x| x.into());
11316        self
11317    }
11318
11319    /// Sets the value of [desired_datapath_provider][crate::model::ClusterUpdate::desired_datapath_provider].
11320    pub fn set_desired_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
11321        mut self,
11322        v: T,
11323    ) -> Self {
11324        self.desired_datapath_provider = v.into();
11325        self
11326    }
11327
11328    /// Sets the value of [desired_private_ipv6_google_access][crate::model::ClusterUpdate::desired_private_ipv6_google_access].
11329    pub fn set_desired_private_ipv6_google_access<
11330        T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
11331    >(
11332        mut self,
11333        v: T,
11334    ) -> Self {
11335        self.desired_private_ipv6_google_access = v.into();
11336        self
11337    }
11338
11339    /// Sets the value of [desired_notification_config][crate::model::ClusterUpdate::desired_notification_config].
11340    pub fn set_desired_notification_config<T>(mut self, v: T) -> Self
11341    where
11342        T: std::convert::Into<crate::model::NotificationConfig>,
11343    {
11344        self.desired_notification_config = std::option::Option::Some(v.into());
11345        self
11346    }
11347
11348    /// Sets or clears the value of [desired_notification_config][crate::model::ClusterUpdate::desired_notification_config].
11349    pub fn set_or_clear_desired_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
11350    where
11351        T: std::convert::Into<crate::model::NotificationConfig>,
11352    {
11353        self.desired_notification_config = v.map(|x| x.into());
11354        self
11355    }
11356
11357    /// Sets the value of [desired_authenticator_groups_config][crate::model::ClusterUpdate::desired_authenticator_groups_config].
11358    pub fn set_desired_authenticator_groups_config<T>(mut self, v: T) -> Self
11359    where
11360        T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
11361    {
11362        self.desired_authenticator_groups_config = std::option::Option::Some(v.into());
11363        self
11364    }
11365
11366    /// Sets or clears the value of [desired_authenticator_groups_config][crate::model::ClusterUpdate::desired_authenticator_groups_config].
11367    pub fn set_or_clear_desired_authenticator_groups_config<T>(
11368        mut self,
11369        v: std::option::Option<T>,
11370    ) -> Self
11371    where
11372        T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
11373    {
11374        self.desired_authenticator_groups_config = v.map(|x| x.into());
11375        self
11376    }
11377
11378    /// Sets the value of [desired_logging_config][crate::model::ClusterUpdate::desired_logging_config].
11379    pub fn set_desired_logging_config<T>(mut self, v: T) -> Self
11380    where
11381        T: std::convert::Into<crate::model::LoggingConfig>,
11382    {
11383        self.desired_logging_config = std::option::Option::Some(v.into());
11384        self
11385    }
11386
11387    /// Sets or clears the value of [desired_logging_config][crate::model::ClusterUpdate::desired_logging_config].
11388    pub fn set_or_clear_desired_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
11389    where
11390        T: std::convert::Into<crate::model::LoggingConfig>,
11391    {
11392        self.desired_logging_config = v.map(|x| x.into());
11393        self
11394    }
11395
11396    /// Sets the value of [desired_monitoring_config][crate::model::ClusterUpdate::desired_monitoring_config].
11397    pub fn set_desired_monitoring_config<T>(mut self, v: T) -> Self
11398    where
11399        T: std::convert::Into<crate::model::MonitoringConfig>,
11400    {
11401        self.desired_monitoring_config = std::option::Option::Some(v.into());
11402        self
11403    }
11404
11405    /// Sets or clears the value of [desired_monitoring_config][crate::model::ClusterUpdate::desired_monitoring_config].
11406    pub fn set_or_clear_desired_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
11407    where
11408        T: std::convert::Into<crate::model::MonitoringConfig>,
11409    {
11410        self.desired_monitoring_config = v.map(|x| x.into());
11411        self
11412    }
11413
11414    /// Sets the value of [desired_identity_service_config][crate::model::ClusterUpdate::desired_identity_service_config].
11415    pub fn set_desired_identity_service_config<T>(mut self, v: T) -> Self
11416    where
11417        T: std::convert::Into<crate::model::IdentityServiceConfig>,
11418    {
11419        self.desired_identity_service_config = std::option::Option::Some(v.into());
11420        self
11421    }
11422
11423    /// Sets or clears the value of [desired_identity_service_config][crate::model::ClusterUpdate::desired_identity_service_config].
11424    pub fn set_or_clear_desired_identity_service_config<T>(
11425        mut self,
11426        v: std::option::Option<T>,
11427    ) -> Self
11428    where
11429        T: std::convert::Into<crate::model::IdentityServiceConfig>,
11430    {
11431        self.desired_identity_service_config = v.map(|x| x.into());
11432        self
11433    }
11434
11435    /// Sets the value of [desired_service_external_ips_config][crate::model::ClusterUpdate::desired_service_external_ips_config].
11436    pub fn set_desired_service_external_ips_config<T>(mut self, v: T) -> Self
11437    where
11438        T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
11439    {
11440        self.desired_service_external_ips_config = std::option::Option::Some(v.into());
11441        self
11442    }
11443
11444    /// Sets or clears the value of [desired_service_external_ips_config][crate::model::ClusterUpdate::desired_service_external_ips_config].
11445    pub fn set_or_clear_desired_service_external_ips_config<T>(
11446        mut self,
11447        v: std::option::Option<T>,
11448    ) -> Self
11449    where
11450        T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
11451    {
11452        self.desired_service_external_ips_config = v.map(|x| x.into());
11453        self
11454    }
11455
11456    /// Sets the value of [desired_enable_private_endpoint][crate::model::ClusterUpdate::desired_enable_private_endpoint].
11457    #[deprecated]
11458    pub fn set_desired_enable_private_endpoint<T>(mut self, v: T) -> Self
11459    where
11460        T: std::convert::Into<bool>,
11461    {
11462        self.desired_enable_private_endpoint = std::option::Option::Some(v.into());
11463        self
11464    }
11465
11466    /// Sets or clears the value of [desired_enable_private_endpoint][crate::model::ClusterUpdate::desired_enable_private_endpoint].
11467    #[deprecated]
11468    pub fn set_or_clear_desired_enable_private_endpoint<T>(
11469        mut self,
11470        v: std::option::Option<T>,
11471    ) -> Self
11472    where
11473        T: std::convert::Into<bool>,
11474    {
11475        self.desired_enable_private_endpoint = v.map(|x| x.into());
11476        self
11477    }
11478
11479    /// Sets the value of [desired_default_enable_private_nodes][crate::model::ClusterUpdate::desired_default_enable_private_nodes].
11480    pub fn set_desired_default_enable_private_nodes<T>(mut self, v: T) -> Self
11481    where
11482        T: std::convert::Into<bool>,
11483    {
11484        self.desired_default_enable_private_nodes = std::option::Option::Some(v.into());
11485        self
11486    }
11487
11488    /// Sets or clears the value of [desired_default_enable_private_nodes][crate::model::ClusterUpdate::desired_default_enable_private_nodes].
11489    pub fn set_or_clear_desired_default_enable_private_nodes<T>(
11490        mut self,
11491        v: std::option::Option<T>,
11492    ) -> Self
11493    where
11494        T: std::convert::Into<bool>,
11495    {
11496        self.desired_default_enable_private_nodes = v.map(|x| x.into());
11497        self
11498    }
11499
11500    /// Sets the value of [desired_control_plane_endpoints_config][crate::model::ClusterUpdate::desired_control_plane_endpoints_config].
11501    pub fn set_desired_control_plane_endpoints_config<T>(mut self, v: T) -> Self
11502    where
11503        T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
11504    {
11505        self.desired_control_plane_endpoints_config = std::option::Option::Some(v.into());
11506        self
11507    }
11508
11509    /// Sets or clears the value of [desired_control_plane_endpoints_config][crate::model::ClusterUpdate::desired_control_plane_endpoints_config].
11510    pub fn set_or_clear_desired_control_plane_endpoints_config<T>(
11511        mut self,
11512        v: std::option::Option<T>,
11513    ) -> Self
11514    where
11515        T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
11516    {
11517        self.desired_control_plane_endpoints_config = v.map(|x| x.into());
11518        self
11519    }
11520
11521    /// Sets the value of [desired_master_version][crate::model::ClusterUpdate::desired_master_version].
11522    pub fn set_desired_master_version<T: std::convert::Into<std::string::String>>(
11523        mut self,
11524        v: T,
11525    ) -> Self {
11526        self.desired_master_version = v.into();
11527        self
11528    }
11529
11530    /// Sets the value of [desired_gcfs_config][crate::model::ClusterUpdate::desired_gcfs_config].
11531    pub fn set_desired_gcfs_config<T>(mut self, v: T) -> Self
11532    where
11533        T: std::convert::Into<crate::model::GcfsConfig>,
11534    {
11535        self.desired_gcfs_config = std::option::Option::Some(v.into());
11536        self
11537    }
11538
11539    /// Sets or clears the value of [desired_gcfs_config][crate::model::ClusterUpdate::desired_gcfs_config].
11540    pub fn set_or_clear_desired_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
11541    where
11542        T: std::convert::Into<crate::model::GcfsConfig>,
11543    {
11544        self.desired_gcfs_config = v.map(|x| x.into());
11545        self
11546    }
11547
11548    /// Sets the value of [desired_node_pool_auto_config_network_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_network_tags].
11549    pub fn set_desired_node_pool_auto_config_network_tags<T>(mut self, v: T) -> Self
11550    where
11551        T: std::convert::Into<crate::model::NetworkTags>,
11552    {
11553        self.desired_node_pool_auto_config_network_tags = std::option::Option::Some(v.into());
11554        self
11555    }
11556
11557    /// Sets or clears the value of [desired_node_pool_auto_config_network_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_network_tags].
11558    pub fn set_or_clear_desired_node_pool_auto_config_network_tags<T>(
11559        mut self,
11560        v: std::option::Option<T>,
11561    ) -> Self
11562    where
11563        T: std::convert::Into<crate::model::NetworkTags>,
11564    {
11565        self.desired_node_pool_auto_config_network_tags = v.map(|x| x.into());
11566        self
11567    }
11568
11569    /// Sets the value of [desired_pod_autoscaling][crate::model::ClusterUpdate::desired_pod_autoscaling].
11570    pub fn set_desired_pod_autoscaling<T>(mut self, v: T) -> Self
11571    where
11572        T: std::convert::Into<crate::model::PodAutoscaling>,
11573    {
11574        self.desired_pod_autoscaling = std::option::Option::Some(v.into());
11575        self
11576    }
11577
11578    /// Sets or clears the value of [desired_pod_autoscaling][crate::model::ClusterUpdate::desired_pod_autoscaling].
11579    pub fn set_or_clear_desired_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
11580    where
11581        T: std::convert::Into<crate::model::PodAutoscaling>,
11582    {
11583        self.desired_pod_autoscaling = v.map(|x| x.into());
11584        self
11585    }
11586
11587    /// Sets the value of [desired_gateway_api_config][crate::model::ClusterUpdate::desired_gateway_api_config].
11588    pub fn set_desired_gateway_api_config<T>(mut self, v: T) -> Self
11589    where
11590        T: std::convert::Into<crate::model::GatewayAPIConfig>,
11591    {
11592        self.desired_gateway_api_config = std::option::Option::Some(v.into());
11593        self
11594    }
11595
11596    /// Sets or clears the value of [desired_gateway_api_config][crate::model::ClusterUpdate::desired_gateway_api_config].
11597    pub fn set_or_clear_desired_gateway_api_config<T>(mut self, v: std::option::Option<T>) -> Self
11598    where
11599        T: std::convert::Into<crate::model::GatewayAPIConfig>,
11600    {
11601        self.desired_gateway_api_config = v.map(|x| x.into());
11602        self
11603    }
11604
11605    /// Sets the value of [etag][crate::model::ClusterUpdate::etag].
11606    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11607        self.etag = v.into();
11608        self
11609    }
11610
11611    /// Sets the value of [desired_node_pool_logging_config][crate::model::ClusterUpdate::desired_node_pool_logging_config].
11612    pub fn set_desired_node_pool_logging_config<T>(mut self, v: T) -> Self
11613    where
11614        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
11615    {
11616        self.desired_node_pool_logging_config = std::option::Option::Some(v.into());
11617        self
11618    }
11619
11620    /// Sets or clears the value of [desired_node_pool_logging_config][crate::model::ClusterUpdate::desired_node_pool_logging_config].
11621    pub fn set_or_clear_desired_node_pool_logging_config<T>(
11622        mut self,
11623        v: std::option::Option<T>,
11624    ) -> Self
11625    where
11626        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
11627    {
11628        self.desired_node_pool_logging_config = v.map(|x| x.into());
11629        self
11630    }
11631
11632    /// Sets the value of [desired_fleet][crate::model::ClusterUpdate::desired_fleet].
11633    pub fn set_desired_fleet<T>(mut self, v: T) -> Self
11634    where
11635        T: std::convert::Into<crate::model::Fleet>,
11636    {
11637        self.desired_fleet = std::option::Option::Some(v.into());
11638        self
11639    }
11640
11641    /// Sets or clears the value of [desired_fleet][crate::model::ClusterUpdate::desired_fleet].
11642    pub fn set_or_clear_desired_fleet<T>(mut self, v: std::option::Option<T>) -> Self
11643    where
11644        T: std::convert::Into<crate::model::Fleet>,
11645    {
11646        self.desired_fleet = v.map(|x| x.into());
11647        self
11648    }
11649
11650    /// Sets the value of [desired_stack_type][crate::model::ClusterUpdate::desired_stack_type].
11651    pub fn set_desired_stack_type<T: std::convert::Into<crate::model::StackType>>(
11652        mut self,
11653        v: T,
11654    ) -> Self {
11655        self.desired_stack_type = v.into();
11656        self
11657    }
11658
11659    /// Sets the value of [additional_pod_ranges_config][crate::model::ClusterUpdate::additional_pod_ranges_config].
11660    pub fn set_additional_pod_ranges_config<T>(mut self, v: T) -> Self
11661    where
11662        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11663    {
11664        self.additional_pod_ranges_config = std::option::Option::Some(v.into());
11665        self
11666    }
11667
11668    /// Sets or clears the value of [additional_pod_ranges_config][crate::model::ClusterUpdate::additional_pod_ranges_config].
11669    pub fn set_or_clear_additional_pod_ranges_config<T>(mut self, v: std::option::Option<T>) -> Self
11670    where
11671        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11672    {
11673        self.additional_pod_ranges_config = v.map(|x| x.into());
11674        self
11675    }
11676
11677    /// Sets the value of [removed_additional_pod_ranges_config][crate::model::ClusterUpdate::removed_additional_pod_ranges_config].
11678    pub fn set_removed_additional_pod_ranges_config<T>(mut self, v: T) -> Self
11679    where
11680        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11681    {
11682        self.removed_additional_pod_ranges_config = std::option::Option::Some(v.into());
11683        self
11684    }
11685
11686    /// Sets or clears the value of [removed_additional_pod_ranges_config][crate::model::ClusterUpdate::removed_additional_pod_ranges_config].
11687    pub fn set_or_clear_removed_additional_pod_ranges_config<T>(
11688        mut self,
11689        v: std::option::Option<T>,
11690    ) -> Self
11691    where
11692        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11693    {
11694        self.removed_additional_pod_ranges_config = v.map(|x| x.into());
11695        self
11696    }
11697
11698    /// Sets the value of [enable_k8s_beta_apis][crate::model::ClusterUpdate::enable_k8s_beta_apis].
11699    pub fn set_enable_k8s_beta_apis<T>(mut self, v: T) -> Self
11700    where
11701        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11702    {
11703        self.enable_k8s_beta_apis = std::option::Option::Some(v.into());
11704        self
11705    }
11706
11707    /// Sets or clears the value of [enable_k8s_beta_apis][crate::model::ClusterUpdate::enable_k8s_beta_apis].
11708    pub fn set_or_clear_enable_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
11709    where
11710        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11711    {
11712        self.enable_k8s_beta_apis = v.map(|x| x.into());
11713        self
11714    }
11715
11716    /// Sets the value of [desired_security_posture_config][crate::model::ClusterUpdate::desired_security_posture_config].
11717    pub fn set_desired_security_posture_config<T>(mut self, v: T) -> Self
11718    where
11719        T: std::convert::Into<crate::model::SecurityPostureConfig>,
11720    {
11721        self.desired_security_posture_config = std::option::Option::Some(v.into());
11722        self
11723    }
11724
11725    /// Sets or clears the value of [desired_security_posture_config][crate::model::ClusterUpdate::desired_security_posture_config].
11726    pub fn set_or_clear_desired_security_posture_config<T>(
11727        mut self,
11728        v: std::option::Option<T>,
11729    ) -> Self
11730    where
11731        T: std::convert::Into<crate::model::SecurityPostureConfig>,
11732    {
11733        self.desired_security_posture_config = v.map(|x| x.into());
11734        self
11735    }
11736
11737    /// Sets the value of [desired_network_performance_config][crate::model::ClusterUpdate::desired_network_performance_config].
11738    pub fn set_desired_network_performance_config<T>(mut self, v: T) -> Self
11739    where
11740        T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
11741    {
11742        self.desired_network_performance_config = std::option::Option::Some(v.into());
11743        self
11744    }
11745
11746    /// Sets or clears the value of [desired_network_performance_config][crate::model::ClusterUpdate::desired_network_performance_config].
11747    pub fn set_or_clear_desired_network_performance_config<T>(
11748        mut self,
11749        v: std::option::Option<T>,
11750    ) -> Self
11751    where
11752        T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
11753    {
11754        self.desired_network_performance_config = v.map(|x| x.into());
11755        self
11756    }
11757
11758    /// Sets the value of [desired_enable_fqdn_network_policy][crate::model::ClusterUpdate::desired_enable_fqdn_network_policy].
11759    pub fn set_desired_enable_fqdn_network_policy<T>(mut self, v: T) -> Self
11760    where
11761        T: std::convert::Into<bool>,
11762    {
11763        self.desired_enable_fqdn_network_policy = std::option::Option::Some(v.into());
11764        self
11765    }
11766
11767    /// Sets or clears the value of [desired_enable_fqdn_network_policy][crate::model::ClusterUpdate::desired_enable_fqdn_network_policy].
11768    pub fn set_or_clear_desired_enable_fqdn_network_policy<T>(
11769        mut self,
11770        v: std::option::Option<T>,
11771    ) -> Self
11772    where
11773        T: std::convert::Into<bool>,
11774    {
11775        self.desired_enable_fqdn_network_policy = v.map(|x| x.into());
11776        self
11777    }
11778
11779    /// Sets the value of [desired_autopilot_workload_policy_config][crate::model::ClusterUpdate::desired_autopilot_workload_policy_config].
11780    pub fn set_desired_autopilot_workload_policy_config<T>(mut self, v: T) -> Self
11781    where
11782        T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
11783    {
11784        self.desired_autopilot_workload_policy_config = std::option::Option::Some(v.into());
11785        self
11786    }
11787
11788    /// Sets or clears the value of [desired_autopilot_workload_policy_config][crate::model::ClusterUpdate::desired_autopilot_workload_policy_config].
11789    pub fn set_or_clear_desired_autopilot_workload_policy_config<T>(
11790        mut self,
11791        v: std::option::Option<T>,
11792    ) -> Self
11793    where
11794        T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
11795    {
11796        self.desired_autopilot_workload_policy_config = v.map(|x| x.into());
11797        self
11798    }
11799
11800    /// Sets the value of [desired_k8s_beta_apis][crate::model::ClusterUpdate::desired_k8s_beta_apis].
11801    pub fn set_desired_k8s_beta_apis<T>(mut self, v: T) -> Self
11802    where
11803        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11804    {
11805        self.desired_k8s_beta_apis = std::option::Option::Some(v.into());
11806        self
11807    }
11808
11809    /// Sets or clears the value of [desired_k8s_beta_apis][crate::model::ClusterUpdate::desired_k8s_beta_apis].
11810    pub fn set_or_clear_desired_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
11811    where
11812        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11813    {
11814        self.desired_k8s_beta_apis = v.map(|x| x.into());
11815        self
11816    }
11817
11818    /// Sets the value of [desired_containerd_config][crate::model::ClusterUpdate::desired_containerd_config].
11819    pub fn set_desired_containerd_config<T>(mut self, v: T) -> Self
11820    where
11821        T: std::convert::Into<crate::model::ContainerdConfig>,
11822    {
11823        self.desired_containerd_config = std::option::Option::Some(v.into());
11824        self
11825    }
11826
11827    /// Sets or clears the value of [desired_containerd_config][crate::model::ClusterUpdate::desired_containerd_config].
11828    pub fn set_or_clear_desired_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
11829    where
11830        T: std::convert::Into<crate::model::ContainerdConfig>,
11831    {
11832        self.desired_containerd_config = v.map(|x| x.into());
11833        self
11834    }
11835
11836    /// Sets the value of [desired_enable_multi_networking][crate::model::ClusterUpdate::desired_enable_multi_networking].
11837    pub fn set_desired_enable_multi_networking<T>(mut self, v: T) -> Self
11838    where
11839        T: std::convert::Into<bool>,
11840    {
11841        self.desired_enable_multi_networking = std::option::Option::Some(v.into());
11842        self
11843    }
11844
11845    /// Sets or clears the value of [desired_enable_multi_networking][crate::model::ClusterUpdate::desired_enable_multi_networking].
11846    pub fn set_or_clear_desired_enable_multi_networking<T>(
11847        mut self,
11848        v: std::option::Option<T>,
11849    ) -> Self
11850    where
11851        T: std::convert::Into<bool>,
11852    {
11853        self.desired_enable_multi_networking = v.map(|x| x.into());
11854        self
11855    }
11856
11857    /// Sets the value of [desired_node_pool_auto_config_resource_manager_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_resource_manager_tags].
11858    pub fn set_desired_node_pool_auto_config_resource_manager_tags<T>(mut self, v: T) -> Self
11859    where
11860        T: std::convert::Into<crate::model::ResourceManagerTags>,
11861    {
11862        self.desired_node_pool_auto_config_resource_manager_tags =
11863            std::option::Option::Some(v.into());
11864        self
11865    }
11866
11867    /// Sets or clears the value of [desired_node_pool_auto_config_resource_manager_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_resource_manager_tags].
11868    pub fn set_or_clear_desired_node_pool_auto_config_resource_manager_tags<T>(
11869        mut self,
11870        v: std::option::Option<T>,
11871    ) -> Self
11872    where
11873        T: std::convert::Into<crate::model::ResourceManagerTags>,
11874    {
11875        self.desired_node_pool_auto_config_resource_manager_tags = v.map(|x| x.into());
11876        self
11877    }
11878
11879    /// Sets the value of [desired_in_transit_encryption_config][crate::model::ClusterUpdate::desired_in_transit_encryption_config].
11880    pub fn set_desired_in_transit_encryption_config<T>(mut self, v: T) -> Self
11881    where
11882        T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
11883    {
11884        self.desired_in_transit_encryption_config = std::option::Option::Some(v.into());
11885        self
11886    }
11887
11888    /// Sets or clears the value of [desired_in_transit_encryption_config][crate::model::ClusterUpdate::desired_in_transit_encryption_config].
11889    pub fn set_or_clear_desired_in_transit_encryption_config<T>(
11890        mut self,
11891        v: std::option::Option<T>,
11892    ) -> Self
11893    where
11894        T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
11895    {
11896        self.desired_in_transit_encryption_config = v.map(|x| x.into());
11897        self
11898    }
11899
11900    /// Sets the value of [desired_enable_cilium_clusterwide_network_policy][crate::model::ClusterUpdate::desired_enable_cilium_clusterwide_network_policy].
11901    pub fn set_desired_enable_cilium_clusterwide_network_policy<T>(mut self, v: T) -> Self
11902    where
11903        T: std::convert::Into<bool>,
11904    {
11905        self.desired_enable_cilium_clusterwide_network_policy = std::option::Option::Some(v.into());
11906        self
11907    }
11908
11909    /// Sets or clears the value of [desired_enable_cilium_clusterwide_network_policy][crate::model::ClusterUpdate::desired_enable_cilium_clusterwide_network_policy].
11910    pub fn set_or_clear_desired_enable_cilium_clusterwide_network_policy<T>(
11911        mut self,
11912        v: std::option::Option<T>,
11913    ) -> Self
11914    where
11915        T: std::convert::Into<bool>,
11916    {
11917        self.desired_enable_cilium_clusterwide_network_policy = v.map(|x| x.into());
11918        self
11919    }
11920
11921    /// Sets the value of [desired_secret_manager_config][crate::model::ClusterUpdate::desired_secret_manager_config].
11922    pub fn set_desired_secret_manager_config<T>(mut self, v: T) -> Self
11923    where
11924        T: std::convert::Into<crate::model::SecretManagerConfig>,
11925    {
11926        self.desired_secret_manager_config = std::option::Option::Some(v.into());
11927        self
11928    }
11929
11930    /// Sets or clears the value of [desired_secret_manager_config][crate::model::ClusterUpdate::desired_secret_manager_config].
11931    pub fn set_or_clear_desired_secret_manager_config<T>(
11932        mut self,
11933        v: std::option::Option<T>,
11934    ) -> Self
11935    where
11936        T: std::convert::Into<crate::model::SecretManagerConfig>,
11937    {
11938        self.desired_secret_manager_config = v.map(|x| x.into());
11939        self
11940    }
11941
11942    /// Sets the value of [desired_compliance_posture_config][crate::model::ClusterUpdate::desired_compliance_posture_config].
11943    pub fn set_desired_compliance_posture_config<T>(mut self, v: T) -> Self
11944    where
11945        T: std::convert::Into<crate::model::CompliancePostureConfig>,
11946    {
11947        self.desired_compliance_posture_config = std::option::Option::Some(v.into());
11948        self
11949    }
11950
11951    /// Sets or clears the value of [desired_compliance_posture_config][crate::model::ClusterUpdate::desired_compliance_posture_config].
11952    pub fn set_or_clear_desired_compliance_posture_config<T>(
11953        mut self,
11954        v: std::option::Option<T>,
11955    ) -> Self
11956    where
11957        T: std::convert::Into<crate::model::CompliancePostureConfig>,
11958    {
11959        self.desired_compliance_posture_config = v.map(|x| x.into());
11960        self
11961    }
11962
11963    /// Sets the value of [desired_node_kubelet_config][crate::model::ClusterUpdate::desired_node_kubelet_config].
11964    pub fn set_desired_node_kubelet_config<T>(mut self, v: T) -> Self
11965    where
11966        T: std::convert::Into<crate::model::NodeKubeletConfig>,
11967    {
11968        self.desired_node_kubelet_config = std::option::Option::Some(v.into());
11969        self
11970    }
11971
11972    /// Sets or clears the value of [desired_node_kubelet_config][crate::model::ClusterUpdate::desired_node_kubelet_config].
11973    pub fn set_or_clear_desired_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
11974    where
11975        T: std::convert::Into<crate::model::NodeKubeletConfig>,
11976    {
11977        self.desired_node_kubelet_config = v.map(|x| x.into());
11978        self
11979    }
11980
11981    /// Sets the value of [desired_node_pool_auto_config_kubelet_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_kubelet_config].
11982    pub fn set_desired_node_pool_auto_config_kubelet_config<T>(mut self, v: T) -> Self
11983    where
11984        T: std::convert::Into<crate::model::NodeKubeletConfig>,
11985    {
11986        self.desired_node_pool_auto_config_kubelet_config = std::option::Option::Some(v.into());
11987        self
11988    }
11989
11990    /// Sets or clears the value of [desired_node_pool_auto_config_kubelet_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_kubelet_config].
11991    pub fn set_or_clear_desired_node_pool_auto_config_kubelet_config<T>(
11992        mut self,
11993        v: std::option::Option<T>,
11994    ) -> Self
11995    where
11996        T: std::convert::Into<crate::model::NodeKubeletConfig>,
11997    {
11998        self.desired_node_pool_auto_config_kubelet_config = v.map(|x| x.into());
11999        self
12000    }
12001
12002    /// Sets the value of [user_managed_keys_config][crate::model::ClusterUpdate::user_managed_keys_config].
12003    #[deprecated]
12004    pub fn set_user_managed_keys_config<T>(mut self, v: T) -> Self
12005    where
12006        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
12007    {
12008        self.user_managed_keys_config = std::option::Option::Some(v.into());
12009        self
12010    }
12011
12012    /// Sets or clears the value of [user_managed_keys_config][crate::model::ClusterUpdate::user_managed_keys_config].
12013    #[deprecated]
12014    pub fn set_or_clear_user_managed_keys_config<T>(mut self, v: std::option::Option<T>) -> Self
12015    where
12016        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
12017    {
12018        self.user_managed_keys_config = v.map(|x| x.into());
12019        self
12020    }
12021
12022    /// Sets the value of [desired_rbac_binding_config][crate::model::ClusterUpdate::desired_rbac_binding_config].
12023    pub fn set_desired_rbac_binding_config<T>(mut self, v: T) -> Self
12024    where
12025        T: std::convert::Into<crate::model::RBACBindingConfig>,
12026    {
12027        self.desired_rbac_binding_config = std::option::Option::Some(v.into());
12028        self
12029    }
12030
12031    /// Sets or clears the value of [desired_rbac_binding_config][crate::model::ClusterUpdate::desired_rbac_binding_config].
12032    pub fn set_or_clear_desired_rbac_binding_config<T>(mut self, v: std::option::Option<T>) -> Self
12033    where
12034        T: std::convert::Into<crate::model::RBACBindingConfig>,
12035    {
12036        self.desired_rbac_binding_config = v.map(|x| x.into());
12037        self
12038    }
12039
12040    /// Sets the value of [desired_additional_ip_ranges_config][crate::model::ClusterUpdate::desired_additional_ip_ranges_config].
12041    pub fn set_desired_additional_ip_ranges_config<T>(mut self, v: T) -> Self
12042    where
12043        T: std::convert::Into<crate::model::DesiredAdditionalIPRangesConfig>,
12044    {
12045        self.desired_additional_ip_ranges_config = std::option::Option::Some(v.into());
12046        self
12047    }
12048
12049    /// Sets or clears the value of [desired_additional_ip_ranges_config][crate::model::ClusterUpdate::desired_additional_ip_ranges_config].
12050    pub fn set_or_clear_desired_additional_ip_ranges_config<T>(
12051        mut self,
12052        v: std::option::Option<T>,
12053    ) -> Self
12054    where
12055        T: std::convert::Into<crate::model::DesiredAdditionalIPRangesConfig>,
12056    {
12057        self.desired_additional_ip_ranges_config = v.map(|x| x.into());
12058        self
12059    }
12060
12061    /// Sets the value of [desired_enterprise_config][crate::model::ClusterUpdate::desired_enterprise_config].
12062    #[deprecated]
12063    pub fn set_desired_enterprise_config<T>(mut self, v: T) -> Self
12064    where
12065        T: std::convert::Into<crate::model::DesiredEnterpriseConfig>,
12066    {
12067        self.desired_enterprise_config = std::option::Option::Some(v.into());
12068        self
12069    }
12070
12071    /// Sets or clears the value of [desired_enterprise_config][crate::model::ClusterUpdate::desired_enterprise_config].
12072    #[deprecated]
12073    pub fn set_or_clear_desired_enterprise_config<T>(mut self, v: std::option::Option<T>) -> Self
12074    where
12075        T: std::convert::Into<crate::model::DesiredEnterpriseConfig>,
12076    {
12077        self.desired_enterprise_config = v.map(|x| x.into());
12078        self
12079    }
12080
12081    /// Sets the value of [desired_auto_ipam_config][crate::model::ClusterUpdate::desired_auto_ipam_config].
12082    pub fn set_desired_auto_ipam_config<T>(mut self, v: T) -> Self
12083    where
12084        T: std::convert::Into<crate::model::AutoIpamConfig>,
12085    {
12086        self.desired_auto_ipam_config = std::option::Option::Some(v.into());
12087        self
12088    }
12089
12090    /// Sets or clears the value of [desired_auto_ipam_config][crate::model::ClusterUpdate::desired_auto_ipam_config].
12091    pub fn set_or_clear_desired_auto_ipam_config<T>(mut self, v: std::option::Option<T>) -> Self
12092    where
12093        T: std::convert::Into<crate::model::AutoIpamConfig>,
12094    {
12095        self.desired_auto_ipam_config = v.map(|x| x.into());
12096        self
12097    }
12098
12099    /// Sets the value of [desired_disable_l4_lb_firewall_reconciliation][crate::model::ClusterUpdate::desired_disable_l4_lb_firewall_reconciliation].
12100    pub fn set_desired_disable_l4_lb_firewall_reconciliation<T>(mut self, v: T) -> Self
12101    where
12102        T: std::convert::Into<bool>,
12103    {
12104        self.desired_disable_l4_lb_firewall_reconciliation = std::option::Option::Some(v.into());
12105        self
12106    }
12107
12108    /// Sets or clears the value of [desired_disable_l4_lb_firewall_reconciliation][crate::model::ClusterUpdate::desired_disable_l4_lb_firewall_reconciliation].
12109    pub fn set_or_clear_desired_disable_l4_lb_firewall_reconciliation<T>(
12110        mut self,
12111        v: std::option::Option<T>,
12112    ) -> Self
12113    where
12114        T: std::convert::Into<bool>,
12115    {
12116        self.desired_disable_l4_lb_firewall_reconciliation = v.map(|x| x.into());
12117        self
12118    }
12119
12120    /// Sets the value of [desired_node_pool_auto_config_linux_node_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_linux_node_config].
12121    pub fn set_desired_node_pool_auto_config_linux_node_config<T>(mut self, v: T) -> Self
12122    where
12123        T: std::convert::Into<crate::model::LinuxNodeConfig>,
12124    {
12125        self.desired_node_pool_auto_config_linux_node_config = std::option::Option::Some(v.into());
12126        self
12127    }
12128
12129    /// Sets or clears the value of [desired_node_pool_auto_config_linux_node_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_linux_node_config].
12130    pub fn set_or_clear_desired_node_pool_auto_config_linux_node_config<T>(
12131        mut self,
12132        v: std::option::Option<T>,
12133    ) -> Self
12134    where
12135        T: std::convert::Into<crate::model::LinuxNodeConfig>,
12136    {
12137        self.desired_node_pool_auto_config_linux_node_config = v.map(|x| x.into());
12138        self
12139    }
12140
12141    /// Sets the value of [desired_user_managed_keys_config][crate::model::ClusterUpdate::desired_user_managed_keys_config].
12142    pub fn set_desired_user_managed_keys_config<T>(mut self, v: T) -> Self
12143    where
12144        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
12145    {
12146        self.desired_user_managed_keys_config = std::option::Option::Some(v.into());
12147        self
12148    }
12149
12150    /// Sets or clears the value of [desired_user_managed_keys_config][crate::model::ClusterUpdate::desired_user_managed_keys_config].
12151    pub fn set_or_clear_desired_user_managed_keys_config<T>(
12152        mut self,
12153        v: std::option::Option<T>,
12154    ) -> Self
12155    where
12156        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
12157    {
12158        self.desired_user_managed_keys_config = v.map(|x| x.into());
12159        self
12160    }
12161
12162    /// Sets the value of [desired_anonymous_authentication_config][crate::model::ClusterUpdate::desired_anonymous_authentication_config].
12163    pub fn set_desired_anonymous_authentication_config<T>(mut self, v: T) -> Self
12164    where
12165        T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
12166    {
12167        self.desired_anonymous_authentication_config = std::option::Option::Some(v.into());
12168        self
12169    }
12170
12171    /// Sets or clears the value of [desired_anonymous_authentication_config][crate::model::ClusterUpdate::desired_anonymous_authentication_config].
12172    pub fn set_or_clear_desired_anonymous_authentication_config<T>(
12173        mut self,
12174        v: std::option::Option<T>,
12175    ) -> Self
12176    where
12177        T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
12178    {
12179        self.desired_anonymous_authentication_config = v.map(|x| x.into());
12180        self
12181    }
12182
12183    /// Sets the value of [gke_auto_upgrade_config][crate::model::ClusterUpdate::gke_auto_upgrade_config].
12184    pub fn set_gke_auto_upgrade_config<T>(mut self, v: T) -> Self
12185    where
12186        T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
12187    {
12188        self.gke_auto_upgrade_config = std::option::Option::Some(v.into());
12189        self
12190    }
12191
12192    /// Sets or clears the value of [gke_auto_upgrade_config][crate::model::ClusterUpdate::gke_auto_upgrade_config].
12193    pub fn set_or_clear_gke_auto_upgrade_config<T>(mut self, v: std::option::Option<T>) -> Self
12194    where
12195        T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
12196    {
12197        self.gke_auto_upgrade_config = v.map(|x| x.into());
12198        self
12199    }
12200
12201    /// Sets the value of [desired_network_tier_config][crate::model::ClusterUpdate::desired_network_tier_config].
12202    pub fn set_desired_network_tier_config<T>(mut self, v: T) -> Self
12203    where
12204        T: std::convert::Into<crate::model::NetworkTierConfig>,
12205    {
12206        self.desired_network_tier_config = std::option::Option::Some(v.into());
12207        self
12208    }
12209
12210    /// Sets or clears the value of [desired_network_tier_config][crate::model::ClusterUpdate::desired_network_tier_config].
12211    pub fn set_or_clear_desired_network_tier_config<T>(mut self, v: std::option::Option<T>) -> Self
12212    where
12213        T: std::convert::Into<crate::model::NetworkTierConfig>,
12214    {
12215        self.desired_network_tier_config = v.map(|x| x.into());
12216        self
12217    }
12218}
12219
12220impl wkt::message::Message for ClusterUpdate {
12221    fn typename() -> &'static str {
12222        "type.googleapis.com/google.container.v1.ClusterUpdate"
12223    }
12224}
12225
12226/// AdditionalPodRangesConfig is the configuration for additional pod secondary
12227/// ranges supporting the ClusterUpdate message.
12228#[derive(Clone, Default, PartialEq)]
12229#[non_exhaustive]
12230pub struct AdditionalPodRangesConfig {
12231    /// Name for pod secondary ipv4 range which has the actual range defined ahead.
12232    pub pod_range_names: std::vec::Vec<std::string::String>,
12233
12234    /// Output only. Information for additional pod range.
12235    pub pod_range_info: std::vec::Vec<crate::model::RangeInfo>,
12236
12237    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12238}
12239
12240impl AdditionalPodRangesConfig {
12241    pub fn new() -> Self {
12242        std::default::Default::default()
12243    }
12244
12245    /// Sets the value of [pod_range_names][crate::model::AdditionalPodRangesConfig::pod_range_names].
12246    pub fn set_pod_range_names<T, V>(mut self, v: T) -> Self
12247    where
12248        T: std::iter::IntoIterator<Item = V>,
12249        V: std::convert::Into<std::string::String>,
12250    {
12251        use std::iter::Iterator;
12252        self.pod_range_names = v.into_iter().map(|i| i.into()).collect();
12253        self
12254    }
12255
12256    /// Sets the value of [pod_range_info][crate::model::AdditionalPodRangesConfig::pod_range_info].
12257    pub fn set_pod_range_info<T, V>(mut self, v: T) -> Self
12258    where
12259        T: std::iter::IntoIterator<Item = V>,
12260        V: std::convert::Into<crate::model::RangeInfo>,
12261    {
12262        use std::iter::Iterator;
12263        self.pod_range_info = v.into_iter().map(|i| i.into()).collect();
12264        self
12265    }
12266}
12267
12268impl wkt::message::Message for AdditionalPodRangesConfig {
12269    fn typename() -> &'static str {
12270        "type.googleapis.com/google.container.v1.AdditionalPodRangesConfig"
12271    }
12272}
12273
12274/// AdditionalIPRangesConfig is the configuration for individual additional
12275/// subnetwork attached to the cluster
12276#[derive(Clone, Default, PartialEq)]
12277#[non_exhaustive]
12278pub struct AdditionalIPRangesConfig {
12279    /// Name of the subnetwork. This can be the full path of the subnetwork or
12280    /// just the name.
12281    /// Example1: my-subnet
12282    /// Example2: projects/gke-project/regions/us-central1/subnetworks/my-subnet
12283    pub subnetwork: std::string::String,
12284
12285    /// List of secondary ranges names within this subnetwork that can be used for
12286    /// pod IPs.
12287    /// Example1: gke-pod-range1
12288    /// Example2: gke-pod-range1,gke-pod-range2
12289    pub pod_ipv4_range_names: std::vec::Vec<std::string::String>,
12290
12291    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12292}
12293
12294impl AdditionalIPRangesConfig {
12295    pub fn new() -> Self {
12296        std::default::Default::default()
12297    }
12298
12299    /// Sets the value of [subnetwork][crate::model::AdditionalIPRangesConfig::subnetwork].
12300    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12301        self.subnetwork = v.into();
12302        self
12303    }
12304
12305    /// Sets the value of [pod_ipv4_range_names][crate::model::AdditionalIPRangesConfig::pod_ipv4_range_names].
12306    pub fn set_pod_ipv4_range_names<T, V>(mut self, v: T) -> Self
12307    where
12308        T: std::iter::IntoIterator<Item = V>,
12309        V: std::convert::Into<std::string::String>,
12310    {
12311        use std::iter::Iterator;
12312        self.pod_ipv4_range_names = v.into_iter().map(|i| i.into()).collect();
12313        self
12314    }
12315}
12316
12317impl wkt::message::Message for AdditionalIPRangesConfig {
12318    fn typename() -> &'static str {
12319        "type.googleapis.com/google.container.v1.AdditionalIPRangesConfig"
12320    }
12321}
12322
12323/// DesiredAdditionalIPRangesConfig is a wrapper used for cluster update
12324/// operation and contains multiple AdditionalIPRangesConfigs.
12325#[derive(Clone, Default, PartialEq)]
12326#[non_exhaustive]
12327pub struct DesiredAdditionalIPRangesConfig {
12328    /// List of additional IP ranges configs where each AdditionalIPRangesConfig
12329    /// corresponds to one subnetwork's IP ranges
12330    pub additional_ip_ranges_configs: std::vec::Vec<crate::model::AdditionalIPRangesConfig>,
12331
12332    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12333}
12334
12335impl DesiredAdditionalIPRangesConfig {
12336    pub fn new() -> Self {
12337        std::default::Default::default()
12338    }
12339
12340    /// Sets the value of [additional_ip_ranges_configs][crate::model::DesiredAdditionalIPRangesConfig::additional_ip_ranges_configs].
12341    pub fn set_additional_ip_ranges_configs<T, V>(mut self, v: T) -> Self
12342    where
12343        T: std::iter::IntoIterator<Item = V>,
12344        V: std::convert::Into<crate::model::AdditionalIPRangesConfig>,
12345    {
12346        use std::iter::Iterator;
12347        self.additional_ip_ranges_configs = v.into_iter().map(|i| i.into()).collect();
12348        self
12349    }
12350}
12351
12352impl wkt::message::Message for DesiredAdditionalIPRangesConfig {
12353    fn typename() -> &'static str {
12354        "type.googleapis.com/google.container.v1.DesiredAdditionalIPRangesConfig"
12355    }
12356}
12357
12358/// AutoIpamConfig contains all information related to Auto IPAM
12359#[derive(Clone, Default, PartialEq)]
12360#[non_exhaustive]
12361pub struct AutoIpamConfig {
12362    /// The flag that enables Auto IPAM on this cluster
12363    pub enabled: std::option::Option<bool>,
12364
12365    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12366}
12367
12368impl AutoIpamConfig {
12369    pub fn new() -> Self {
12370        std::default::Default::default()
12371    }
12372
12373    /// Sets the value of [enabled][crate::model::AutoIpamConfig::enabled].
12374    pub fn set_enabled<T>(mut self, v: T) -> Self
12375    where
12376        T: std::convert::Into<bool>,
12377    {
12378        self.enabled = std::option::Option::Some(v.into());
12379        self
12380    }
12381
12382    /// Sets or clears the value of [enabled][crate::model::AutoIpamConfig::enabled].
12383    pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
12384    where
12385        T: std::convert::Into<bool>,
12386    {
12387        self.enabled = v.map(|x| x.into());
12388        self
12389    }
12390}
12391
12392impl wkt::message::Message for AutoIpamConfig {
12393    fn typename() -> &'static str {
12394        "type.googleapis.com/google.container.v1.AutoIpamConfig"
12395    }
12396}
12397
12398/// RangeInfo contains the range name and the range utilization by this cluster.
12399#[derive(Clone, Default, PartialEq)]
12400#[non_exhaustive]
12401pub struct RangeInfo {
12402    /// Output only. Name of a range.
12403    pub range_name: std::string::String,
12404
12405    /// Output only. The utilization of the range.
12406    pub utilization: f64,
12407
12408    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12409}
12410
12411impl RangeInfo {
12412    pub fn new() -> Self {
12413        std::default::Default::default()
12414    }
12415
12416    /// Sets the value of [range_name][crate::model::RangeInfo::range_name].
12417    pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12418        self.range_name = v.into();
12419        self
12420    }
12421
12422    /// Sets the value of [utilization][crate::model::RangeInfo::utilization].
12423    pub fn set_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12424        self.utilization = v.into();
12425        self
12426    }
12427}
12428
12429impl wkt::message::Message for RangeInfo {
12430    fn typename() -> &'static str {
12431        "type.googleapis.com/google.container.v1.RangeInfo"
12432    }
12433}
12434
12435/// DesiredEnterpriseConfig is a wrapper used for updating enterprise_config.
12436///
12437/// Deprecated: GKE Enterprise features are now available without an Enterprise
12438/// tier.
12439#[derive(Clone, Default, PartialEq)]
12440#[non_exhaustive]
12441#[deprecated]
12442pub struct DesiredEnterpriseConfig {
12443    /// desired_tier specifies the desired tier of the cluster.
12444    pub desired_tier: crate::model::enterprise_config::ClusterTier,
12445
12446    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12447}
12448
12449impl DesiredEnterpriseConfig {
12450    pub fn new() -> Self {
12451        std::default::Default::default()
12452    }
12453
12454    /// Sets the value of [desired_tier][crate::model::DesiredEnterpriseConfig::desired_tier].
12455    pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
12456        mut self,
12457        v: T,
12458    ) -> Self {
12459        self.desired_tier = v.into();
12460        self
12461    }
12462}
12463
12464impl wkt::message::Message for DesiredEnterpriseConfig {
12465    fn typename() -> &'static str {
12466        "type.googleapis.com/google.container.v1.DesiredEnterpriseConfig"
12467    }
12468}
12469
12470/// This operation resource represents operations that may have happened or are
12471/// happening on the cluster. All fields are output only.
12472#[derive(Clone, Default, PartialEq)]
12473#[non_exhaustive]
12474pub struct Operation {
12475    /// Output only. The server-assigned ID for the operation.
12476    pub name: std::string::String,
12477
12478    /// Output only. The name of the Google Compute Engine
12479    /// [zone](https://cloud.google.com/compute/docs/zones#available)
12480    /// in which the operation is taking place. This field is deprecated, use
12481    /// location instead.
12482    #[deprecated]
12483    pub zone: std::string::String,
12484
12485    /// Output only. The operation type.
12486    pub operation_type: crate::model::operation::Type,
12487
12488    /// Output only. The current status of the operation.
12489    pub status: crate::model::operation::Status,
12490
12491    /// Output only. Detailed operation progress, if available.
12492    pub detail: std::string::String,
12493
12494    /// Output only. If an error has occurred, a textual description of the error.
12495    /// Deprecated. Use the field error instead.
12496    #[deprecated]
12497    pub status_message: std::string::String,
12498
12499    /// Output only. Server-defined URI for the operation. Example:
12500    /// `<https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123>`.
12501    pub self_link: std::string::String,
12502
12503    /// Output only. Server-defined URI for the target of the operation. The format
12504    /// of this is a URI to the resource being modified (such as a cluster, node
12505    /// pool, or node). For node pool repairs, there may be multiple nodes being
12506    /// repaired, but only one will be the target.
12507    ///
12508    /// Examples:
12509    ///
12510    ///
12511    /// ##
12512    ///
12513    /// `<https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster>`
12514    ///
12515    /// ##
12516    ///
12517    /// `<https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np>`
12518    ///
12519    /// `<https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node>`
12520    pub target_link: std::string::String,
12521
12522    /// Output only. The name of the Google Compute Engine
12523    /// [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
12524    /// or
12525    /// [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
12526    /// in which the cluster resides.
12527    pub location: std::string::String,
12528
12529    /// Output only. The time the operation started, in
12530    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
12531    pub start_time: std::string::String,
12532
12533    /// Output only. The time the operation completed, in
12534    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
12535    pub end_time: std::string::String,
12536
12537    /// Output only. Progress information for an operation.
12538    pub progress: std::option::Option<crate::model::OperationProgress>,
12539
12540    /// Which conditions caused the current cluster state.
12541    /// Deprecated. Use field error instead.
12542    #[deprecated]
12543    pub cluster_conditions: std::vec::Vec<crate::model::StatusCondition>,
12544
12545    /// Which conditions caused the current node pool state.
12546    /// Deprecated. Use field error instead.
12547    #[deprecated]
12548    pub nodepool_conditions: std::vec::Vec<crate::model::StatusCondition>,
12549
12550    /// The error result of the operation in case of failure.
12551    pub error: std::option::Option<rpc::model::Status>,
12552
12553    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12554}
12555
12556impl Operation {
12557    pub fn new() -> Self {
12558        std::default::Default::default()
12559    }
12560
12561    /// Sets the value of [name][crate::model::Operation::name].
12562    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12563        self.name = v.into();
12564        self
12565    }
12566
12567    /// Sets the value of [zone][crate::model::Operation::zone].
12568    #[deprecated]
12569    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12570        self.zone = v.into();
12571        self
12572    }
12573
12574    /// Sets the value of [operation_type][crate::model::Operation::operation_type].
12575    pub fn set_operation_type<T: std::convert::Into<crate::model::operation::Type>>(
12576        mut self,
12577        v: T,
12578    ) -> Self {
12579        self.operation_type = v.into();
12580        self
12581    }
12582
12583    /// Sets the value of [status][crate::model::Operation::status].
12584    pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
12585        mut self,
12586        v: T,
12587    ) -> Self {
12588        self.status = v.into();
12589        self
12590    }
12591
12592    /// Sets the value of [detail][crate::model::Operation::detail].
12593    pub fn set_detail<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12594        self.detail = v.into();
12595        self
12596    }
12597
12598    /// Sets the value of [status_message][crate::model::Operation::status_message].
12599    #[deprecated]
12600    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12601        self.status_message = v.into();
12602        self
12603    }
12604
12605    /// Sets the value of [self_link][crate::model::Operation::self_link].
12606    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12607        self.self_link = v.into();
12608        self
12609    }
12610
12611    /// Sets the value of [target_link][crate::model::Operation::target_link].
12612    pub fn set_target_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12613        self.target_link = v.into();
12614        self
12615    }
12616
12617    /// Sets the value of [location][crate::model::Operation::location].
12618    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12619        self.location = v.into();
12620        self
12621    }
12622
12623    /// Sets the value of [start_time][crate::model::Operation::start_time].
12624    pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12625        self.start_time = v.into();
12626        self
12627    }
12628
12629    /// Sets the value of [end_time][crate::model::Operation::end_time].
12630    pub fn set_end_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12631        self.end_time = v.into();
12632        self
12633    }
12634
12635    /// Sets the value of [progress][crate::model::Operation::progress].
12636    pub fn set_progress<T>(mut self, v: T) -> Self
12637    where
12638        T: std::convert::Into<crate::model::OperationProgress>,
12639    {
12640        self.progress = std::option::Option::Some(v.into());
12641        self
12642    }
12643
12644    /// Sets or clears the value of [progress][crate::model::Operation::progress].
12645    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
12646    where
12647        T: std::convert::Into<crate::model::OperationProgress>,
12648    {
12649        self.progress = v.map(|x| x.into());
12650        self
12651    }
12652
12653    /// Sets the value of [cluster_conditions][crate::model::Operation::cluster_conditions].
12654    #[deprecated]
12655    pub fn set_cluster_conditions<T, V>(mut self, v: T) -> Self
12656    where
12657        T: std::iter::IntoIterator<Item = V>,
12658        V: std::convert::Into<crate::model::StatusCondition>,
12659    {
12660        use std::iter::Iterator;
12661        self.cluster_conditions = v.into_iter().map(|i| i.into()).collect();
12662        self
12663    }
12664
12665    /// Sets the value of [nodepool_conditions][crate::model::Operation::nodepool_conditions].
12666    #[deprecated]
12667    pub fn set_nodepool_conditions<T, V>(mut self, v: T) -> Self
12668    where
12669        T: std::iter::IntoIterator<Item = V>,
12670        V: std::convert::Into<crate::model::StatusCondition>,
12671    {
12672        use std::iter::Iterator;
12673        self.nodepool_conditions = v.into_iter().map(|i| i.into()).collect();
12674        self
12675    }
12676
12677    /// Sets the value of [error][crate::model::Operation::error].
12678    pub fn set_error<T>(mut self, v: T) -> Self
12679    where
12680        T: std::convert::Into<rpc::model::Status>,
12681    {
12682        self.error = std::option::Option::Some(v.into());
12683        self
12684    }
12685
12686    /// Sets or clears the value of [error][crate::model::Operation::error].
12687    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
12688    where
12689        T: std::convert::Into<rpc::model::Status>,
12690    {
12691        self.error = v.map(|x| x.into());
12692        self
12693    }
12694}
12695
12696impl wkt::message::Message for Operation {
12697    fn typename() -> &'static str {
12698        "type.googleapis.com/google.container.v1.Operation"
12699    }
12700}
12701
12702/// Defines additional types related to [Operation].
12703pub mod operation {
12704    #[allow(unused_imports)]
12705    use super::*;
12706
12707    /// Current status of the operation.
12708    ///
12709    /// # Working with unknown values
12710    ///
12711    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12712    /// additional enum variants at any time. Adding new variants is not considered
12713    /// a breaking change. Applications should write their code in anticipation of:
12714    ///
12715    /// - New values appearing in future releases of the client library, **and**
12716    /// - New values received dynamically, without application changes.
12717    ///
12718    /// Please consult the [Working with enums] section in the user guide for some
12719    /// guidelines.
12720    ///
12721    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12722    #[derive(Clone, Debug, PartialEq)]
12723    #[non_exhaustive]
12724    pub enum Status {
12725        /// Not set.
12726        Unspecified,
12727        /// The operation has been created.
12728        Pending,
12729        /// The operation is currently running.
12730        Running,
12731        /// The operation is done, either cancelled or completed.
12732        Done,
12733        /// The operation is aborting.
12734        Aborting,
12735        /// If set, the enum was initialized with an unknown value.
12736        ///
12737        /// Applications can examine the value using [Status::value] or
12738        /// [Status::name].
12739        UnknownValue(status::UnknownValue),
12740    }
12741
12742    #[doc(hidden)]
12743    pub mod status {
12744        #[allow(unused_imports)]
12745        use super::*;
12746        #[derive(Clone, Debug, PartialEq)]
12747        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12748    }
12749
12750    impl Status {
12751        /// Gets the enum value.
12752        ///
12753        /// Returns `None` if the enum contains an unknown value deserialized from
12754        /// the string representation of enums.
12755        pub fn value(&self) -> std::option::Option<i32> {
12756            match self {
12757                Self::Unspecified => std::option::Option::Some(0),
12758                Self::Pending => std::option::Option::Some(1),
12759                Self::Running => std::option::Option::Some(2),
12760                Self::Done => std::option::Option::Some(3),
12761                Self::Aborting => std::option::Option::Some(4),
12762                Self::UnknownValue(u) => u.0.value(),
12763            }
12764        }
12765
12766        /// Gets the enum value as a string.
12767        ///
12768        /// Returns `None` if the enum contains an unknown value deserialized from
12769        /// the integer representation of enums.
12770        pub fn name(&self) -> std::option::Option<&str> {
12771            match self {
12772                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
12773                Self::Pending => std::option::Option::Some("PENDING"),
12774                Self::Running => std::option::Option::Some("RUNNING"),
12775                Self::Done => std::option::Option::Some("DONE"),
12776                Self::Aborting => std::option::Option::Some("ABORTING"),
12777                Self::UnknownValue(u) => u.0.name(),
12778            }
12779        }
12780    }
12781
12782    impl std::default::Default for Status {
12783        fn default() -> Self {
12784            use std::convert::From;
12785            Self::from(0)
12786        }
12787    }
12788
12789    impl std::fmt::Display for Status {
12790        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12791            wkt::internal::display_enum(f, self.name(), self.value())
12792        }
12793    }
12794
12795    impl std::convert::From<i32> for Status {
12796        fn from(value: i32) -> Self {
12797            match value {
12798                0 => Self::Unspecified,
12799                1 => Self::Pending,
12800                2 => Self::Running,
12801                3 => Self::Done,
12802                4 => Self::Aborting,
12803                _ => Self::UnknownValue(status::UnknownValue(
12804                    wkt::internal::UnknownEnumValue::Integer(value),
12805                )),
12806            }
12807        }
12808    }
12809
12810    impl std::convert::From<&str> for Status {
12811        fn from(value: &str) -> Self {
12812            use std::string::ToString;
12813            match value {
12814                "STATUS_UNSPECIFIED" => Self::Unspecified,
12815                "PENDING" => Self::Pending,
12816                "RUNNING" => Self::Running,
12817                "DONE" => Self::Done,
12818                "ABORTING" => Self::Aborting,
12819                _ => Self::UnknownValue(status::UnknownValue(
12820                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12821                )),
12822            }
12823        }
12824    }
12825
12826    impl serde::ser::Serialize for Status {
12827        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12828        where
12829            S: serde::Serializer,
12830        {
12831            match self {
12832                Self::Unspecified => serializer.serialize_i32(0),
12833                Self::Pending => serializer.serialize_i32(1),
12834                Self::Running => serializer.serialize_i32(2),
12835                Self::Done => serializer.serialize_i32(3),
12836                Self::Aborting => serializer.serialize_i32(4),
12837                Self::UnknownValue(u) => u.0.serialize(serializer),
12838            }
12839        }
12840    }
12841
12842    impl<'de> serde::de::Deserialize<'de> for Status {
12843        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12844        where
12845            D: serde::Deserializer<'de>,
12846        {
12847            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
12848                ".google.container.v1.Operation.Status",
12849            ))
12850        }
12851    }
12852
12853    /// Operation type categorizes the operation.
12854    ///
12855    /// # Working with unknown values
12856    ///
12857    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12858    /// additional enum variants at any time. Adding new variants is not considered
12859    /// a breaking change. Applications should write their code in anticipation of:
12860    ///
12861    /// - New values appearing in future releases of the client library, **and**
12862    /// - New values received dynamically, without application changes.
12863    ///
12864    /// Please consult the [Working with enums] section in the user guide for some
12865    /// guidelines.
12866    ///
12867    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12868    #[derive(Clone, Debug, PartialEq)]
12869    #[non_exhaustive]
12870    pub enum Type {
12871        /// Not set.
12872        Unspecified,
12873        /// The cluster is being created. The cluster should be assumed to be
12874        /// unusable until the operation finishes.
12875        ///
12876        /// In the event of the operation failing, the cluster will enter the
12877        /// [ERROR state][google.container.v1.Cluster.Status.ERROR] and eventually be
12878        /// deleted.
12879        ///
12880        /// [google.container.v1.Cluster.Status.ERROR]: crate::model::cluster::Status::Error
12881        CreateCluster,
12882        /// The cluster is being deleted. The cluster should be assumed to be
12883        /// unusable as soon as this operation starts.
12884        ///
12885        /// In the event of the operation failing, the cluster will enter the
12886        /// [ERROR state][google.container.v1.Cluster.Status.ERROR] and the deletion
12887        /// will be automatically retried until completed.
12888        ///
12889        /// [google.container.v1.Cluster.Status.ERROR]: crate::model::cluster::Status::Error
12890        DeleteCluster,
12891        /// The [cluster
12892        /// version][google.container.v1.ClusterUpdate.desired_master_version] is
12893        /// being updated. Note that this includes "upgrades" to the same version,
12894        /// which are simply a recreation. This also includes
12895        /// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically).
12896        /// For more details, see [documentation on cluster
12897        /// upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades).
12898        ///
12899        /// [google.container.v1.ClusterUpdate.desired_master_version]: crate::model::ClusterUpdate::desired_master_version
12900        UpgradeMaster,
12901        /// A node pool is being updated. Despite calling this an "upgrade", this
12902        /// includes most forms of updates to node pools. This also includes
12903        /// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades).
12904        ///
12905        /// This operation sets the
12906        /// [progress][google.container.v1.Operation.progress] field and may be
12907        /// [canceled][google.container.v1.ClusterManager.CancelOperation].
12908        ///
12909        /// The upgrade strategy depends on [node pool
12910        /// configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies).
12911        /// The nodes are generally still usable during this operation.
12912        ///
12913        /// [google.container.v1.ClusterManager.CancelOperation]: crate::client::ClusterManager::cancel_operation
12914        /// [google.container.v1.Operation.progress]: crate::model::Operation::progress
12915        UpgradeNodes,
12916        /// A problem has been detected with the control plane and is being repaired.
12917        /// This operation type is initiated by GKE. For more details, see
12918        /// [documentation on
12919        /// repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
12920        RepairCluster,
12921        /// The cluster is being updated. This is a broad category of operations and
12922        /// includes operations that only change metadata as well as those that must
12923        /// recreate the entire cluster. If the control plane must be recreated, this
12924        /// will cause temporary downtime for zonal clusters.
12925        ///
12926        /// Some features require recreating the nodes as well. Those will be
12927        /// recreated as separate operations and the update may not be completely
12928        /// functional until the node pools recreations finish. Node recreations will
12929        /// generally follow [maintenance
12930        /// policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions).
12931        ///
12932        /// Some GKE-initiated operations use this type. This includes certain types
12933        /// of auto-upgrades and incident mitigations.
12934        UpdateCluster,
12935        /// A node pool is being created. The node pool should be assumed to be
12936        /// unusable until this operation finishes. In the event of an error, the
12937        /// node pool may be partially created.
12938        ///
12939        /// If enabled, [node
12940        /// autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning)
12941        /// may have automatically initiated such operations.
12942        CreateNodePool,
12943        /// The node pool is being deleted. The node pool should be assumed to be
12944        /// unusable as soon as this operation starts.
12945        DeleteNodePool,
12946        /// The node pool's [manamagent][google.container.v1.NodePool.management]
12947        /// field is being updated. These operations only update metadata and may be
12948        /// concurrent with most other operations.
12949        ///
12950        /// [google.container.v1.NodePool.management]: crate::model::NodePool::management
12951        SetNodePoolManagement,
12952        /// A problem has been detected with nodes and [they are being
12953        /// repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair).
12954        /// This operation type is initiated by GKE, typically automatically. This
12955        /// operation may be concurrent with other operations and there may be
12956        /// multiple repairs occurring on the same node pool.
12957        AutoRepairNodes,
12958        /// Unused. Automatic node upgrade uses
12959        /// [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES].
12960        ///
12961        /// [google.container.v1.Operation.Type.UPGRADE_NODES]: crate::model::operation::Type::UpgradeNodes
12962        #[deprecated]
12963        AutoUpgradeNodes,
12964        /// Unused. Updating labels uses
12965        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
12966        ///
12967        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
12968        #[deprecated]
12969        SetLabels,
12970        /// Unused. Updating master auth uses
12971        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
12972        ///
12973        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
12974        #[deprecated]
12975        SetMasterAuth,
12976        /// The node pool is being resized. With the exception of resizing to or from
12977        /// size zero, the node pool is generally usable during this operation.
12978        SetNodePoolSize,
12979        /// Unused. Updating network policy uses
12980        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
12981        ///
12982        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
12983        #[deprecated]
12984        SetNetworkPolicy,
12985        /// Unused. Updating maintenance policy uses
12986        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
12987        ///
12988        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
12989        #[deprecated]
12990        SetMaintenancePolicy,
12991        /// The control plane is being resized. This operation type is initiated by
12992        /// GKE. These operations are often performed preemptively to ensure that the
12993        /// control plane has sufficient resources and is not typically an indication
12994        /// of issues. For more details, see
12995        /// [documentation on
12996        /// resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
12997        ResizeCluster,
12998        /// Fleet features of GKE Enterprise are being upgraded. The cluster should
12999        /// be assumed to be blocked for other upgrades until the operation finishes.
13000        FleetFeatureUpgrade,
13001        /// If set, the enum was initialized with an unknown value.
13002        ///
13003        /// Applications can examine the value using [Type::value] or
13004        /// [Type::name].
13005        UnknownValue(r#type::UnknownValue),
13006    }
13007
13008    #[doc(hidden)]
13009    pub mod r#type {
13010        #[allow(unused_imports)]
13011        use super::*;
13012        #[derive(Clone, Debug, PartialEq)]
13013        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13014    }
13015
13016    impl Type {
13017        /// Gets the enum value.
13018        ///
13019        /// Returns `None` if the enum contains an unknown value deserialized from
13020        /// the string representation of enums.
13021        pub fn value(&self) -> std::option::Option<i32> {
13022            match self {
13023                Self::Unspecified => std::option::Option::Some(0),
13024                Self::CreateCluster => std::option::Option::Some(1),
13025                Self::DeleteCluster => std::option::Option::Some(2),
13026                Self::UpgradeMaster => std::option::Option::Some(3),
13027                Self::UpgradeNodes => std::option::Option::Some(4),
13028                Self::RepairCluster => std::option::Option::Some(5),
13029                Self::UpdateCluster => std::option::Option::Some(6),
13030                Self::CreateNodePool => std::option::Option::Some(7),
13031                Self::DeleteNodePool => std::option::Option::Some(8),
13032                Self::SetNodePoolManagement => std::option::Option::Some(9),
13033                Self::AutoRepairNodes => std::option::Option::Some(10),
13034                Self::AutoUpgradeNodes => std::option::Option::Some(11),
13035                Self::SetLabels => std::option::Option::Some(12),
13036                Self::SetMasterAuth => std::option::Option::Some(13),
13037                Self::SetNodePoolSize => std::option::Option::Some(14),
13038                Self::SetNetworkPolicy => std::option::Option::Some(15),
13039                Self::SetMaintenancePolicy => std::option::Option::Some(16),
13040                Self::ResizeCluster => std::option::Option::Some(18),
13041                Self::FleetFeatureUpgrade => std::option::Option::Some(19),
13042                Self::UnknownValue(u) => u.0.value(),
13043            }
13044        }
13045
13046        /// Gets the enum value as a string.
13047        ///
13048        /// Returns `None` if the enum contains an unknown value deserialized from
13049        /// the integer representation of enums.
13050        pub fn name(&self) -> std::option::Option<&str> {
13051            match self {
13052                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
13053                Self::CreateCluster => std::option::Option::Some("CREATE_CLUSTER"),
13054                Self::DeleteCluster => std::option::Option::Some("DELETE_CLUSTER"),
13055                Self::UpgradeMaster => std::option::Option::Some("UPGRADE_MASTER"),
13056                Self::UpgradeNodes => std::option::Option::Some("UPGRADE_NODES"),
13057                Self::RepairCluster => std::option::Option::Some("REPAIR_CLUSTER"),
13058                Self::UpdateCluster => std::option::Option::Some("UPDATE_CLUSTER"),
13059                Self::CreateNodePool => std::option::Option::Some("CREATE_NODE_POOL"),
13060                Self::DeleteNodePool => std::option::Option::Some("DELETE_NODE_POOL"),
13061                Self::SetNodePoolManagement => {
13062                    std::option::Option::Some("SET_NODE_POOL_MANAGEMENT")
13063                }
13064                Self::AutoRepairNodes => std::option::Option::Some("AUTO_REPAIR_NODES"),
13065                Self::AutoUpgradeNodes => std::option::Option::Some("AUTO_UPGRADE_NODES"),
13066                Self::SetLabels => std::option::Option::Some("SET_LABELS"),
13067                Self::SetMasterAuth => std::option::Option::Some("SET_MASTER_AUTH"),
13068                Self::SetNodePoolSize => std::option::Option::Some("SET_NODE_POOL_SIZE"),
13069                Self::SetNetworkPolicy => std::option::Option::Some("SET_NETWORK_POLICY"),
13070                Self::SetMaintenancePolicy => std::option::Option::Some("SET_MAINTENANCE_POLICY"),
13071                Self::ResizeCluster => std::option::Option::Some("RESIZE_CLUSTER"),
13072                Self::FleetFeatureUpgrade => std::option::Option::Some("FLEET_FEATURE_UPGRADE"),
13073                Self::UnknownValue(u) => u.0.name(),
13074            }
13075        }
13076    }
13077
13078    impl std::default::Default for Type {
13079        fn default() -> Self {
13080            use std::convert::From;
13081            Self::from(0)
13082        }
13083    }
13084
13085    impl std::fmt::Display for Type {
13086        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13087            wkt::internal::display_enum(f, self.name(), self.value())
13088        }
13089    }
13090
13091    impl std::convert::From<i32> for Type {
13092        fn from(value: i32) -> Self {
13093            match value {
13094                0 => Self::Unspecified,
13095                1 => Self::CreateCluster,
13096                2 => Self::DeleteCluster,
13097                3 => Self::UpgradeMaster,
13098                4 => Self::UpgradeNodes,
13099                5 => Self::RepairCluster,
13100                6 => Self::UpdateCluster,
13101                7 => Self::CreateNodePool,
13102                8 => Self::DeleteNodePool,
13103                9 => Self::SetNodePoolManagement,
13104                10 => Self::AutoRepairNodes,
13105                11 => Self::AutoUpgradeNodes,
13106                12 => Self::SetLabels,
13107                13 => Self::SetMasterAuth,
13108                14 => Self::SetNodePoolSize,
13109                15 => Self::SetNetworkPolicy,
13110                16 => Self::SetMaintenancePolicy,
13111                18 => Self::ResizeCluster,
13112                19 => Self::FleetFeatureUpgrade,
13113                _ => Self::UnknownValue(r#type::UnknownValue(
13114                    wkt::internal::UnknownEnumValue::Integer(value),
13115                )),
13116            }
13117        }
13118    }
13119
13120    impl std::convert::From<&str> for Type {
13121        fn from(value: &str) -> Self {
13122            use std::string::ToString;
13123            match value {
13124                "TYPE_UNSPECIFIED" => Self::Unspecified,
13125                "CREATE_CLUSTER" => Self::CreateCluster,
13126                "DELETE_CLUSTER" => Self::DeleteCluster,
13127                "UPGRADE_MASTER" => Self::UpgradeMaster,
13128                "UPGRADE_NODES" => Self::UpgradeNodes,
13129                "REPAIR_CLUSTER" => Self::RepairCluster,
13130                "UPDATE_CLUSTER" => Self::UpdateCluster,
13131                "CREATE_NODE_POOL" => Self::CreateNodePool,
13132                "DELETE_NODE_POOL" => Self::DeleteNodePool,
13133                "SET_NODE_POOL_MANAGEMENT" => Self::SetNodePoolManagement,
13134                "AUTO_REPAIR_NODES" => Self::AutoRepairNodes,
13135                "AUTO_UPGRADE_NODES" => Self::AutoUpgradeNodes,
13136                "SET_LABELS" => Self::SetLabels,
13137                "SET_MASTER_AUTH" => Self::SetMasterAuth,
13138                "SET_NODE_POOL_SIZE" => Self::SetNodePoolSize,
13139                "SET_NETWORK_POLICY" => Self::SetNetworkPolicy,
13140                "SET_MAINTENANCE_POLICY" => Self::SetMaintenancePolicy,
13141                "RESIZE_CLUSTER" => Self::ResizeCluster,
13142                "FLEET_FEATURE_UPGRADE" => Self::FleetFeatureUpgrade,
13143                _ => Self::UnknownValue(r#type::UnknownValue(
13144                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13145                )),
13146            }
13147        }
13148    }
13149
13150    impl serde::ser::Serialize for Type {
13151        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13152        where
13153            S: serde::Serializer,
13154        {
13155            match self {
13156                Self::Unspecified => serializer.serialize_i32(0),
13157                Self::CreateCluster => serializer.serialize_i32(1),
13158                Self::DeleteCluster => serializer.serialize_i32(2),
13159                Self::UpgradeMaster => serializer.serialize_i32(3),
13160                Self::UpgradeNodes => serializer.serialize_i32(4),
13161                Self::RepairCluster => serializer.serialize_i32(5),
13162                Self::UpdateCluster => serializer.serialize_i32(6),
13163                Self::CreateNodePool => serializer.serialize_i32(7),
13164                Self::DeleteNodePool => serializer.serialize_i32(8),
13165                Self::SetNodePoolManagement => serializer.serialize_i32(9),
13166                Self::AutoRepairNodes => serializer.serialize_i32(10),
13167                Self::AutoUpgradeNodes => serializer.serialize_i32(11),
13168                Self::SetLabels => serializer.serialize_i32(12),
13169                Self::SetMasterAuth => serializer.serialize_i32(13),
13170                Self::SetNodePoolSize => serializer.serialize_i32(14),
13171                Self::SetNetworkPolicy => serializer.serialize_i32(15),
13172                Self::SetMaintenancePolicy => serializer.serialize_i32(16),
13173                Self::ResizeCluster => serializer.serialize_i32(18),
13174                Self::FleetFeatureUpgrade => serializer.serialize_i32(19),
13175                Self::UnknownValue(u) => u.0.serialize(serializer),
13176            }
13177        }
13178    }
13179
13180    impl<'de> serde::de::Deserialize<'de> for Type {
13181        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13182        where
13183            D: serde::Deserializer<'de>,
13184        {
13185            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
13186                ".google.container.v1.Operation.Type",
13187            ))
13188        }
13189    }
13190}
13191
13192/// Information about operation (or operation stage) progress.
13193#[derive(Clone, Default, PartialEq)]
13194#[non_exhaustive]
13195pub struct OperationProgress {
13196    /// A non-parameterized string describing an operation stage.
13197    /// Unset for single-stage operations.
13198    pub name: std::string::String,
13199
13200    /// Status of an operation stage.
13201    /// Unset for single-stage operations.
13202    pub status: crate::model::operation::Status,
13203
13204    /// Progress metric bundle, for example:
13205    /// metrics: [{name: "nodes done",     int_value: 15},
13206    /// {name: "nodes total",    int_value: 32}]
13207    /// or
13208    /// metrics: [{name: "progress",       double_value: 0.56},
13209    /// {name: "progress scale", double_value: 1.0}]
13210    pub metrics: std::vec::Vec<crate::model::operation_progress::Metric>,
13211
13212    /// Substages of an operation or a stage.
13213    pub stages: std::vec::Vec<crate::model::OperationProgress>,
13214
13215    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13216}
13217
13218impl OperationProgress {
13219    pub fn new() -> Self {
13220        std::default::Default::default()
13221    }
13222
13223    /// Sets the value of [name][crate::model::OperationProgress::name].
13224    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13225        self.name = v.into();
13226        self
13227    }
13228
13229    /// Sets the value of [status][crate::model::OperationProgress::status].
13230    pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
13231        mut self,
13232        v: T,
13233    ) -> Self {
13234        self.status = v.into();
13235        self
13236    }
13237
13238    /// Sets the value of [metrics][crate::model::OperationProgress::metrics].
13239    pub fn set_metrics<T, V>(mut self, v: T) -> Self
13240    where
13241        T: std::iter::IntoIterator<Item = V>,
13242        V: std::convert::Into<crate::model::operation_progress::Metric>,
13243    {
13244        use std::iter::Iterator;
13245        self.metrics = v.into_iter().map(|i| i.into()).collect();
13246        self
13247    }
13248
13249    /// Sets the value of [stages][crate::model::OperationProgress::stages].
13250    pub fn set_stages<T, V>(mut self, v: T) -> Self
13251    where
13252        T: std::iter::IntoIterator<Item = V>,
13253        V: std::convert::Into<crate::model::OperationProgress>,
13254    {
13255        use std::iter::Iterator;
13256        self.stages = v.into_iter().map(|i| i.into()).collect();
13257        self
13258    }
13259}
13260
13261impl wkt::message::Message for OperationProgress {
13262    fn typename() -> &'static str {
13263        "type.googleapis.com/google.container.v1.OperationProgress"
13264    }
13265}
13266
13267/// Defines additional types related to [OperationProgress].
13268pub mod operation_progress {
13269    #[allow(unused_imports)]
13270    use super::*;
13271
13272    /// Progress metric is (string, int|float|string) pair.
13273    #[derive(Clone, Default, PartialEq)]
13274    #[non_exhaustive]
13275    pub struct Metric {
13276        /// Required. Metric name, e.g., "nodes total", "percent done".
13277        pub name: std::string::String,
13278
13279        /// Strictly one of the values is required.
13280        pub value: std::option::Option<crate::model::operation_progress::metric::Value>,
13281
13282        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13283    }
13284
13285    impl Metric {
13286        pub fn new() -> Self {
13287            std::default::Default::default()
13288        }
13289
13290        /// Sets the value of [name][crate::model::operation_progress::Metric::name].
13291        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13292            self.name = v.into();
13293            self
13294        }
13295
13296        /// Sets the value of [value][crate::model::operation_progress::Metric::value].
13297        ///
13298        /// Note that all the setters affecting `value` are mutually
13299        /// exclusive.
13300        pub fn set_value<
13301            T: std::convert::Into<
13302                    std::option::Option<crate::model::operation_progress::metric::Value>,
13303                >,
13304        >(
13305            mut self,
13306            v: T,
13307        ) -> Self {
13308            self.value = v.into();
13309            self
13310        }
13311
13312        /// The value of [value][crate::model::operation_progress::Metric::value]
13313        /// if it holds a `IntValue`, `None` if the field is not set or
13314        /// holds a different branch.
13315        pub fn int_value(&self) -> std::option::Option<&i64> {
13316            #[allow(unreachable_patterns)]
13317            self.value.as_ref().and_then(|v| match v {
13318                crate::model::operation_progress::metric::Value::IntValue(v) => {
13319                    std::option::Option::Some(v)
13320                }
13321                _ => std::option::Option::None,
13322            })
13323        }
13324
13325        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
13326        /// to hold a `IntValue`.
13327        ///
13328        /// Note that all the setters affecting `value` are
13329        /// mutually exclusive.
13330        pub fn set_int_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13331            self.value = std::option::Option::Some(
13332                crate::model::operation_progress::metric::Value::IntValue(v.into()),
13333            );
13334            self
13335        }
13336
13337        /// The value of [value][crate::model::operation_progress::Metric::value]
13338        /// if it holds a `DoubleValue`, `None` if the field is not set or
13339        /// holds a different branch.
13340        pub fn double_value(&self) -> std::option::Option<&f64> {
13341            #[allow(unreachable_patterns)]
13342            self.value.as_ref().and_then(|v| match v {
13343                crate::model::operation_progress::metric::Value::DoubleValue(v) => {
13344                    std::option::Option::Some(v)
13345                }
13346                _ => std::option::Option::None,
13347            })
13348        }
13349
13350        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
13351        /// to hold a `DoubleValue`.
13352        ///
13353        /// Note that all the setters affecting `value` are
13354        /// mutually exclusive.
13355        pub fn set_double_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
13356            self.value = std::option::Option::Some(
13357                crate::model::operation_progress::metric::Value::DoubleValue(v.into()),
13358            );
13359            self
13360        }
13361
13362        /// The value of [value][crate::model::operation_progress::Metric::value]
13363        /// if it holds a `StringValue`, `None` if the field is not set or
13364        /// holds a different branch.
13365        pub fn string_value(&self) -> std::option::Option<&std::string::String> {
13366            #[allow(unreachable_patterns)]
13367            self.value.as_ref().and_then(|v| match v {
13368                crate::model::operation_progress::metric::Value::StringValue(v) => {
13369                    std::option::Option::Some(v)
13370                }
13371                _ => std::option::Option::None,
13372            })
13373        }
13374
13375        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
13376        /// to hold a `StringValue`.
13377        ///
13378        /// Note that all the setters affecting `value` are
13379        /// mutually exclusive.
13380        pub fn set_string_value<T: std::convert::Into<std::string::String>>(
13381            mut self,
13382            v: T,
13383        ) -> Self {
13384            self.value = std::option::Option::Some(
13385                crate::model::operation_progress::metric::Value::StringValue(v.into()),
13386            );
13387            self
13388        }
13389    }
13390
13391    impl wkt::message::Message for Metric {
13392        fn typename() -> &'static str {
13393            "type.googleapis.com/google.container.v1.OperationProgress.Metric"
13394        }
13395    }
13396
13397    /// Defines additional types related to [Metric].
13398    pub mod metric {
13399        #[allow(unused_imports)]
13400        use super::*;
13401
13402        /// Strictly one of the values is required.
13403        #[derive(Clone, Debug, PartialEq)]
13404        #[non_exhaustive]
13405        pub enum Value {
13406            /// For metrics with integer value.
13407            IntValue(i64),
13408            /// For metrics with floating point value.
13409            DoubleValue(f64),
13410            /// For metrics with custom values (ratios, visual progress, etc.).
13411            StringValue(std::string::String),
13412        }
13413    }
13414}
13415
13416/// CreateClusterRequest creates a cluster.
13417#[derive(Clone, Default, PartialEq)]
13418#[non_exhaustive]
13419pub struct CreateClusterRequest {
13420    /// Deprecated. The Google Developers Console [project ID or project
13421    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13422    /// This field has been deprecated and replaced by the parent field.
13423    #[deprecated]
13424    pub project_id: std::string::String,
13425
13426    /// Deprecated. The name of the Google Compute Engine
13427    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13428    /// in which the cluster resides. This field has been deprecated and replaced
13429    /// by the parent field.
13430    #[deprecated]
13431    pub zone: std::string::String,
13432
13433    /// Required. A [cluster
13434    /// resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
13435    pub cluster: std::option::Option<crate::model::Cluster>,
13436
13437    /// The parent (project and location) where the cluster will be created.
13438    /// Specified in the format `projects/*/locations/*`.
13439    pub parent: std::string::String,
13440
13441    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13442}
13443
13444impl CreateClusterRequest {
13445    pub fn new() -> Self {
13446        std::default::Default::default()
13447    }
13448
13449    /// Sets the value of [project_id][crate::model::CreateClusterRequest::project_id].
13450    #[deprecated]
13451    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13452        self.project_id = v.into();
13453        self
13454    }
13455
13456    /// Sets the value of [zone][crate::model::CreateClusterRequest::zone].
13457    #[deprecated]
13458    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13459        self.zone = v.into();
13460        self
13461    }
13462
13463    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
13464    pub fn set_cluster<T>(mut self, v: T) -> Self
13465    where
13466        T: std::convert::Into<crate::model::Cluster>,
13467    {
13468        self.cluster = std::option::Option::Some(v.into());
13469        self
13470    }
13471
13472    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
13473    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
13474    where
13475        T: std::convert::Into<crate::model::Cluster>,
13476    {
13477        self.cluster = v.map(|x| x.into());
13478        self
13479    }
13480
13481    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
13482    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13483        self.parent = v.into();
13484        self
13485    }
13486}
13487
13488impl wkt::message::Message for CreateClusterRequest {
13489    fn typename() -> &'static str {
13490        "type.googleapis.com/google.container.v1.CreateClusterRequest"
13491    }
13492}
13493
13494/// GetClusterRequest gets the settings of a cluster.
13495#[derive(Clone, Default, PartialEq)]
13496#[non_exhaustive]
13497pub struct GetClusterRequest {
13498    /// Deprecated. The Google Developers Console [project ID or project
13499    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13500    /// This field has been deprecated and replaced by the name field.
13501    #[deprecated]
13502    pub project_id: std::string::String,
13503
13504    /// Deprecated. The name of the Google Compute Engine
13505    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13506    /// in which the cluster resides. This field has been deprecated and replaced
13507    /// by the name field.
13508    #[deprecated]
13509    pub zone: std::string::String,
13510
13511    /// Deprecated. The name of the cluster to retrieve.
13512    /// This field has been deprecated and replaced by the name field.
13513    #[deprecated]
13514    pub cluster_id: std::string::String,
13515
13516    /// The name (project, location, cluster) of the cluster to retrieve.
13517    /// Specified in the format `projects/*/locations/*/clusters/*`.
13518    pub name: std::string::String,
13519
13520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13521}
13522
13523impl GetClusterRequest {
13524    pub fn new() -> Self {
13525        std::default::Default::default()
13526    }
13527
13528    /// Sets the value of [project_id][crate::model::GetClusterRequest::project_id].
13529    #[deprecated]
13530    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13531        self.project_id = v.into();
13532        self
13533    }
13534
13535    /// Sets the value of [zone][crate::model::GetClusterRequest::zone].
13536    #[deprecated]
13537    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13538        self.zone = v.into();
13539        self
13540    }
13541
13542    /// Sets the value of [cluster_id][crate::model::GetClusterRequest::cluster_id].
13543    #[deprecated]
13544    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13545        self.cluster_id = v.into();
13546        self
13547    }
13548
13549    /// Sets the value of [name][crate::model::GetClusterRequest::name].
13550    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13551        self.name = v.into();
13552        self
13553    }
13554}
13555
13556impl wkt::message::Message for GetClusterRequest {
13557    fn typename() -> &'static str {
13558        "type.googleapis.com/google.container.v1.GetClusterRequest"
13559    }
13560}
13561
13562/// UpdateClusterRequest updates the settings of a cluster.
13563#[derive(Clone, Default, PartialEq)]
13564#[non_exhaustive]
13565pub struct UpdateClusterRequest {
13566    /// Deprecated. The Google Developers Console [project ID or project
13567    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13568    /// This field has been deprecated and replaced by the name field.
13569    #[deprecated]
13570    pub project_id: std::string::String,
13571
13572    /// Deprecated. The name of the Google Compute Engine
13573    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13574    /// in which the cluster resides. This field has been deprecated and replaced
13575    /// by the name field.
13576    #[deprecated]
13577    pub zone: std::string::String,
13578
13579    /// Deprecated. The name of the cluster to upgrade.
13580    /// This field has been deprecated and replaced by the name field.
13581    #[deprecated]
13582    pub cluster_id: std::string::String,
13583
13584    /// Required. A description of the update.
13585    pub update: std::option::Option<crate::model::ClusterUpdate>,
13586
13587    /// The name (project, location, cluster) of the cluster to update.
13588    /// Specified in the format `projects/*/locations/*/clusters/*`.
13589    pub name: std::string::String,
13590
13591    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13592}
13593
13594impl UpdateClusterRequest {
13595    pub fn new() -> Self {
13596        std::default::Default::default()
13597    }
13598
13599    /// Sets the value of [project_id][crate::model::UpdateClusterRequest::project_id].
13600    #[deprecated]
13601    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13602        self.project_id = v.into();
13603        self
13604    }
13605
13606    /// Sets the value of [zone][crate::model::UpdateClusterRequest::zone].
13607    #[deprecated]
13608    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13609        self.zone = v.into();
13610        self
13611    }
13612
13613    /// Sets the value of [cluster_id][crate::model::UpdateClusterRequest::cluster_id].
13614    #[deprecated]
13615    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13616        self.cluster_id = v.into();
13617        self
13618    }
13619
13620    /// Sets the value of [update][crate::model::UpdateClusterRequest::update].
13621    pub fn set_update<T>(mut self, v: T) -> Self
13622    where
13623        T: std::convert::Into<crate::model::ClusterUpdate>,
13624    {
13625        self.update = std::option::Option::Some(v.into());
13626        self
13627    }
13628
13629    /// Sets or clears the value of [update][crate::model::UpdateClusterRequest::update].
13630    pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
13631    where
13632        T: std::convert::Into<crate::model::ClusterUpdate>,
13633    {
13634        self.update = v.map(|x| x.into());
13635        self
13636    }
13637
13638    /// Sets the value of [name][crate::model::UpdateClusterRequest::name].
13639    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13640        self.name = v.into();
13641        self
13642    }
13643}
13644
13645impl wkt::message::Message for UpdateClusterRequest {
13646    fn typename() -> &'static str {
13647        "type.googleapis.com/google.container.v1.UpdateClusterRequest"
13648    }
13649}
13650
13651/// UpdateNodePoolRequests update a node pool's image and/or version.
13652#[derive(Clone, Default, PartialEq)]
13653#[non_exhaustive]
13654pub struct UpdateNodePoolRequest {
13655    /// Deprecated. The Google Developers Console [project ID or project
13656    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13657    /// This field has been deprecated and replaced by the name field.
13658    #[deprecated]
13659    pub project_id: std::string::String,
13660
13661    /// Deprecated. The name of the Google Compute Engine
13662    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13663    /// in which the cluster resides. This field has been deprecated and replaced
13664    /// by the name field.
13665    #[deprecated]
13666    pub zone: std::string::String,
13667
13668    /// Deprecated. The name of the cluster to upgrade.
13669    /// This field has been deprecated and replaced by the name field.
13670    #[deprecated]
13671    pub cluster_id: std::string::String,
13672
13673    /// Deprecated. The name of the node pool to upgrade.
13674    /// This field has been deprecated and replaced by the name field.
13675    #[deprecated]
13676    pub node_pool_id: std::string::String,
13677
13678    /// Required. The Kubernetes version to change the nodes to (typically an
13679    /// upgrade).
13680    ///
13681    /// Users may specify either explicit versions offered by Kubernetes Engine or
13682    /// version aliases, which have the following behavior:
13683    ///
13684    /// - "latest": picks the highest valid Kubernetes version
13685    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
13686    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
13687    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
13688    /// - "-": picks the Kubernetes master version
13689    pub node_version: std::string::String,
13690
13691    /// Required. The desired image type for the node pool. Please see
13692    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images>
13693    /// for available image types.
13694    pub image_type: std::string::String,
13695
13696    /// The name (project, location, cluster, node pool) of the node pool to
13697    /// update. Specified in the format
13698    /// `projects/*/locations/*/clusters/*/nodePools/*`.
13699    pub name: std::string::String,
13700
13701    /// The desired list of Google Compute Engine
13702    /// [zones](https://cloud.google.com/compute/docs/zones#available)
13703    /// in which the node pool's nodes should be located. Changing the locations
13704    /// for a node pool will result in nodes being either created or removed from
13705    /// the node pool, depending on whether locations are being added or removed.
13706    ///
13707    /// Warning: It is recommended to update node pool locations in a standalone
13708    /// API call. Do not combine a location update with changes to other fields
13709    /// (such as `tags`, `labels`, `taints`, etc.) in the same request.
13710    /// Otherwise, the API performs a structural modification where changes to
13711    /// other fields will only apply to newly created nodes and will not be
13712    /// applied to existing nodes in the node pool. To ensure all nodes are updated
13713    /// consistently, use a separate API call for location changes.
13714    pub locations: std::vec::Vec<std::string::String>,
13715
13716    /// The desired workload metadata config for the node pool.
13717    pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
13718
13719    /// Upgrade settings control disruption and speed of the upgrade.
13720    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
13721
13722    /// The desired network tags to be applied to all nodes in the node pool.
13723    /// If this field is not present, the tags will not be changed. Otherwise,
13724    /// the existing network tags will be *replaced* with the provided tags.
13725    pub tags: std::option::Option<crate::model::NetworkTags>,
13726
13727    /// The desired node taints to be applied to all nodes in the node pool.
13728    /// If this field is not present, the taints will not be changed. Otherwise,
13729    /// the existing node taints will be *replaced* with the provided taints.
13730    pub taints: std::option::Option<crate::model::NodeTaints>,
13731
13732    /// The desired node labels to be applied to all nodes in the node pool.
13733    /// If this field is not present, the labels will not be changed. Otherwise,
13734    /// the existing node labels will be *replaced* with the provided labels.
13735    pub labels: std::option::Option<crate::model::NodeLabels>,
13736
13737    /// Parameters that can be configured on Linux nodes.
13738    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
13739
13740    /// Node kubelet configs.
13741    pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
13742
13743    /// Node network config.
13744    pub node_network_config: std::option::Option<crate::model::NodeNetworkConfig>,
13745
13746    /// GCFS config.
13747    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
13748
13749    /// Confidential nodes config.
13750    /// All the nodes in the node pool will be Confidential VM once enabled.
13751    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
13752
13753    /// Enable or disable gvnic on the node pool.
13754    pub gvnic: std::option::Option<crate::model::VirtualNIC>,
13755
13756    /// The current etag of the node pool.
13757    /// If an etag is provided and does not match the current etag of the node
13758    /// pool, update will be blocked and an ABORTED error will be returned.
13759    pub etag: std::string::String,
13760
13761    /// Enable or disable NCCL fast socket for the node pool.
13762    pub fast_socket: std::option::Option<crate::model::FastSocket>,
13763
13764    /// Logging configuration.
13765    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
13766
13767    /// The resource labels for the node pool to use to annotate any related
13768    /// Google Compute Engine resources.
13769    pub resource_labels: std::option::Option<crate::model::ResourceLabels>,
13770
13771    /// Parameters that can be configured on Windows nodes.
13772    pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
13773
13774    /// A list of hardware accelerators to be attached to each node.
13775    /// See
13776    /// <https://cloud.google.com/compute/docs/gpus>
13777    /// for more information about support for GPUs.
13778    pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
13779
13780    /// Optional. The desired [Google Compute Engine machine
13781    /// type](https://cloud.google.com/compute/docs/machine-types)
13782    /// for nodes in the node pool. Initiates an upgrade operation that migrates
13783    /// the nodes in the node pool to the specified machine type.
13784    pub machine_type: std::string::String,
13785
13786    /// Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or
13787    /// 'pd-balanced') for nodes in the node pool.
13788    /// Initiates an upgrade operation that migrates the nodes in the
13789    /// node pool to the specified disk type.
13790    pub disk_type: std::string::String,
13791
13792    /// Optional. The desired disk size for nodes in the node pool specified in GB.
13793    /// The smallest allowed disk size is 10GB.
13794    /// Initiates an upgrade operation that migrates the nodes in the
13795    /// node pool to the specified disk size.
13796    pub disk_size_gb: i64,
13797
13798    /// Desired resource manager tag keys and values to be attached to the nodes
13799    /// for managing Compute Engine firewalls using Network Firewall Policies.
13800    /// Existing tags will be replaced with new values.
13801    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
13802
13803    /// The desired containerd config for nodes in the node pool.
13804    /// Initiates an upgrade operation that recreates the nodes with the new
13805    /// config.
13806    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
13807
13808    /// Specifies the configuration of queued provisioning.
13809    pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
13810
13811    /// List of Storage Pools where boot disks are provisioned.
13812    /// Existing Storage Pools will be replaced with storage-pools.
13813    pub storage_pools: std::vec::Vec<std::string::String>,
13814
13815    /// The maximum duration for the nodes to exist.
13816    /// If unspecified, the nodes can exist indefinitely.
13817    pub max_run_duration: std::option::Option<wkt::Duration>,
13818
13819    /// Flex Start flag for enabling Flex Start VM.
13820    pub flex_start: std::option::Option<bool>,
13821
13822    /// The desired boot disk config for nodes in the node pool.
13823    /// Initiates an upgrade operation that migrates the nodes in the
13824    /// node pool to the specified boot disk config.
13825    pub boot_disk: std::option::Option<crate::model::BootDisk>,
13826
13827    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13828}
13829
13830impl UpdateNodePoolRequest {
13831    pub fn new() -> Self {
13832        std::default::Default::default()
13833    }
13834
13835    /// Sets the value of [project_id][crate::model::UpdateNodePoolRequest::project_id].
13836    #[deprecated]
13837    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13838        self.project_id = v.into();
13839        self
13840    }
13841
13842    /// Sets the value of [zone][crate::model::UpdateNodePoolRequest::zone].
13843    #[deprecated]
13844    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13845        self.zone = v.into();
13846        self
13847    }
13848
13849    /// Sets the value of [cluster_id][crate::model::UpdateNodePoolRequest::cluster_id].
13850    #[deprecated]
13851    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13852        self.cluster_id = v.into();
13853        self
13854    }
13855
13856    /// Sets the value of [node_pool_id][crate::model::UpdateNodePoolRequest::node_pool_id].
13857    #[deprecated]
13858    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13859        self.node_pool_id = v.into();
13860        self
13861    }
13862
13863    /// Sets the value of [node_version][crate::model::UpdateNodePoolRequest::node_version].
13864    pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13865        self.node_version = v.into();
13866        self
13867    }
13868
13869    /// Sets the value of [image_type][crate::model::UpdateNodePoolRequest::image_type].
13870    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13871        self.image_type = v.into();
13872        self
13873    }
13874
13875    /// Sets the value of [name][crate::model::UpdateNodePoolRequest::name].
13876    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13877        self.name = v.into();
13878        self
13879    }
13880
13881    /// Sets the value of [locations][crate::model::UpdateNodePoolRequest::locations].
13882    pub fn set_locations<T, V>(mut self, v: T) -> Self
13883    where
13884        T: std::iter::IntoIterator<Item = V>,
13885        V: std::convert::Into<std::string::String>,
13886    {
13887        use std::iter::Iterator;
13888        self.locations = v.into_iter().map(|i| i.into()).collect();
13889        self
13890    }
13891
13892    /// Sets the value of [workload_metadata_config][crate::model::UpdateNodePoolRequest::workload_metadata_config].
13893    pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
13894    where
13895        T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
13896    {
13897        self.workload_metadata_config = std::option::Option::Some(v.into());
13898        self
13899    }
13900
13901    /// Sets or clears the value of [workload_metadata_config][crate::model::UpdateNodePoolRequest::workload_metadata_config].
13902    pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
13903    where
13904        T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
13905    {
13906        self.workload_metadata_config = v.map(|x| x.into());
13907        self
13908    }
13909
13910    /// Sets the value of [upgrade_settings][crate::model::UpdateNodePoolRequest::upgrade_settings].
13911    pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
13912    where
13913        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
13914    {
13915        self.upgrade_settings = std::option::Option::Some(v.into());
13916        self
13917    }
13918
13919    /// Sets or clears the value of [upgrade_settings][crate::model::UpdateNodePoolRequest::upgrade_settings].
13920    pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
13921    where
13922        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
13923    {
13924        self.upgrade_settings = v.map(|x| x.into());
13925        self
13926    }
13927
13928    /// Sets the value of [tags][crate::model::UpdateNodePoolRequest::tags].
13929    pub fn set_tags<T>(mut self, v: T) -> Self
13930    where
13931        T: std::convert::Into<crate::model::NetworkTags>,
13932    {
13933        self.tags = std::option::Option::Some(v.into());
13934        self
13935    }
13936
13937    /// Sets or clears the value of [tags][crate::model::UpdateNodePoolRequest::tags].
13938    pub fn set_or_clear_tags<T>(mut self, v: std::option::Option<T>) -> Self
13939    where
13940        T: std::convert::Into<crate::model::NetworkTags>,
13941    {
13942        self.tags = v.map(|x| x.into());
13943        self
13944    }
13945
13946    /// Sets the value of [taints][crate::model::UpdateNodePoolRequest::taints].
13947    pub fn set_taints<T>(mut self, v: T) -> Self
13948    where
13949        T: std::convert::Into<crate::model::NodeTaints>,
13950    {
13951        self.taints = std::option::Option::Some(v.into());
13952        self
13953    }
13954
13955    /// Sets or clears the value of [taints][crate::model::UpdateNodePoolRequest::taints].
13956    pub fn set_or_clear_taints<T>(mut self, v: std::option::Option<T>) -> Self
13957    where
13958        T: std::convert::Into<crate::model::NodeTaints>,
13959    {
13960        self.taints = v.map(|x| x.into());
13961        self
13962    }
13963
13964    /// Sets the value of [labels][crate::model::UpdateNodePoolRequest::labels].
13965    pub fn set_labels<T>(mut self, v: T) -> Self
13966    where
13967        T: std::convert::Into<crate::model::NodeLabels>,
13968    {
13969        self.labels = std::option::Option::Some(v.into());
13970        self
13971    }
13972
13973    /// Sets or clears the value of [labels][crate::model::UpdateNodePoolRequest::labels].
13974    pub fn set_or_clear_labels<T>(mut self, v: std::option::Option<T>) -> Self
13975    where
13976        T: std::convert::Into<crate::model::NodeLabels>,
13977    {
13978        self.labels = v.map(|x| x.into());
13979        self
13980    }
13981
13982    /// Sets the value of [linux_node_config][crate::model::UpdateNodePoolRequest::linux_node_config].
13983    pub fn set_linux_node_config<T>(mut self, v: T) -> Self
13984    where
13985        T: std::convert::Into<crate::model::LinuxNodeConfig>,
13986    {
13987        self.linux_node_config = std::option::Option::Some(v.into());
13988        self
13989    }
13990
13991    /// Sets or clears the value of [linux_node_config][crate::model::UpdateNodePoolRequest::linux_node_config].
13992    pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
13993    where
13994        T: std::convert::Into<crate::model::LinuxNodeConfig>,
13995    {
13996        self.linux_node_config = v.map(|x| x.into());
13997        self
13998    }
13999
14000    /// Sets the value of [kubelet_config][crate::model::UpdateNodePoolRequest::kubelet_config].
14001    pub fn set_kubelet_config<T>(mut self, v: T) -> Self
14002    where
14003        T: std::convert::Into<crate::model::NodeKubeletConfig>,
14004    {
14005        self.kubelet_config = std::option::Option::Some(v.into());
14006        self
14007    }
14008
14009    /// Sets or clears the value of [kubelet_config][crate::model::UpdateNodePoolRequest::kubelet_config].
14010    pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
14011    where
14012        T: std::convert::Into<crate::model::NodeKubeletConfig>,
14013    {
14014        self.kubelet_config = v.map(|x| x.into());
14015        self
14016    }
14017
14018    /// Sets the value of [node_network_config][crate::model::UpdateNodePoolRequest::node_network_config].
14019    pub fn set_node_network_config<T>(mut self, v: T) -> Self
14020    where
14021        T: std::convert::Into<crate::model::NodeNetworkConfig>,
14022    {
14023        self.node_network_config = std::option::Option::Some(v.into());
14024        self
14025    }
14026
14027    /// Sets or clears the value of [node_network_config][crate::model::UpdateNodePoolRequest::node_network_config].
14028    pub fn set_or_clear_node_network_config<T>(mut self, v: std::option::Option<T>) -> Self
14029    where
14030        T: std::convert::Into<crate::model::NodeNetworkConfig>,
14031    {
14032        self.node_network_config = v.map(|x| x.into());
14033        self
14034    }
14035
14036    /// Sets the value of [gcfs_config][crate::model::UpdateNodePoolRequest::gcfs_config].
14037    pub fn set_gcfs_config<T>(mut self, v: T) -> Self
14038    where
14039        T: std::convert::Into<crate::model::GcfsConfig>,
14040    {
14041        self.gcfs_config = std::option::Option::Some(v.into());
14042        self
14043    }
14044
14045    /// Sets or clears the value of [gcfs_config][crate::model::UpdateNodePoolRequest::gcfs_config].
14046    pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
14047    where
14048        T: std::convert::Into<crate::model::GcfsConfig>,
14049    {
14050        self.gcfs_config = v.map(|x| x.into());
14051        self
14052    }
14053
14054    /// Sets the value of [confidential_nodes][crate::model::UpdateNodePoolRequest::confidential_nodes].
14055    pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
14056    where
14057        T: std::convert::Into<crate::model::ConfidentialNodes>,
14058    {
14059        self.confidential_nodes = std::option::Option::Some(v.into());
14060        self
14061    }
14062
14063    /// Sets or clears the value of [confidential_nodes][crate::model::UpdateNodePoolRequest::confidential_nodes].
14064    pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
14065    where
14066        T: std::convert::Into<crate::model::ConfidentialNodes>,
14067    {
14068        self.confidential_nodes = v.map(|x| x.into());
14069        self
14070    }
14071
14072    /// Sets the value of [gvnic][crate::model::UpdateNodePoolRequest::gvnic].
14073    pub fn set_gvnic<T>(mut self, v: T) -> Self
14074    where
14075        T: std::convert::Into<crate::model::VirtualNIC>,
14076    {
14077        self.gvnic = std::option::Option::Some(v.into());
14078        self
14079    }
14080
14081    /// Sets or clears the value of [gvnic][crate::model::UpdateNodePoolRequest::gvnic].
14082    pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
14083    where
14084        T: std::convert::Into<crate::model::VirtualNIC>,
14085    {
14086        self.gvnic = v.map(|x| x.into());
14087        self
14088    }
14089
14090    /// Sets the value of [etag][crate::model::UpdateNodePoolRequest::etag].
14091    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14092        self.etag = v.into();
14093        self
14094    }
14095
14096    /// Sets the value of [fast_socket][crate::model::UpdateNodePoolRequest::fast_socket].
14097    pub fn set_fast_socket<T>(mut self, v: T) -> Self
14098    where
14099        T: std::convert::Into<crate::model::FastSocket>,
14100    {
14101        self.fast_socket = std::option::Option::Some(v.into());
14102        self
14103    }
14104
14105    /// Sets or clears the value of [fast_socket][crate::model::UpdateNodePoolRequest::fast_socket].
14106    pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
14107    where
14108        T: std::convert::Into<crate::model::FastSocket>,
14109    {
14110        self.fast_socket = v.map(|x| x.into());
14111        self
14112    }
14113
14114    /// Sets the value of [logging_config][crate::model::UpdateNodePoolRequest::logging_config].
14115    pub fn set_logging_config<T>(mut self, v: T) -> Self
14116    where
14117        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
14118    {
14119        self.logging_config = std::option::Option::Some(v.into());
14120        self
14121    }
14122
14123    /// Sets or clears the value of [logging_config][crate::model::UpdateNodePoolRequest::logging_config].
14124    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
14125    where
14126        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
14127    {
14128        self.logging_config = v.map(|x| x.into());
14129        self
14130    }
14131
14132    /// Sets the value of [resource_labels][crate::model::UpdateNodePoolRequest::resource_labels].
14133    pub fn set_resource_labels<T>(mut self, v: T) -> Self
14134    where
14135        T: std::convert::Into<crate::model::ResourceLabels>,
14136    {
14137        self.resource_labels = std::option::Option::Some(v.into());
14138        self
14139    }
14140
14141    /// Sets or clears the value of [resource_labels][crate::model::UpdateNodePoolRequest::resource_labels].
14142    pub fn set_or_clear_resource_labels<T>(mut self, v: std::option::Option<T>) -> Self
14143    where
14144        T: std::convert::Into<crate::model::ResourceLabels>,
14145    {
14146        self.resource_labels = v.map(|x| x.into());
14147        self
14148    }
14149
14150    /// Sets the value of [windows_node_config][crate::model::UpdateNodePoolRequest::windows_node_config].
14151    pub fn set_windows_node_config<T>(mut self, v: T) -> Self
14152    where
14153        T: std::convert::Into<crate::model::WindowsNodeConfig>,
14154    {
14155        self.windows_node_config = std::option::Option::Some(v.into());
14156        self
14157    }
14158
14159    /// Sets or clears the value of [windows_node_config][crate::model::UpdateNodePoolRequest::windows_node_config].
14160    pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
14161    where
14162        T: std::convert::Into<crate::model::WindowsNodeConfig>,
14163    {
14164        self.windows_node_config = v.map(|x| x.into());
14165        self
14166    }
14167
14168    /// Sets the value of [accelerators][crate::model::UpdateNodePoolRequest::accelerators].
14169    pub fn set_accelerators<T, V>(mut self, v: T) -> Self
14170    where
14171        T: std::iter::IntoIterator<Item = V>,
14172        V: std::convert::Into<crate::model::AcceleratorConfig>,
14173    {
14174        use std::iter::Iterator;
14175        self.accelerators = v.into_iter().map(|i| i.into()).collect();
14176        self
14177    }
14178
14179    /// Sets the value of [machine_type][crate::model::UpdateNodePoolRequest::machine_type].
14180    pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14181        self.machine_type = v.into();
14182        self
14183    }
14184
14185    /// Sets the value of [disk_type][crate::model::UpdateNodePoolRequest::disk_type].
14186    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14187        self.disk_type = v.into();
14188        self
14189    }
14190
14191    /// Sets the value of [disk_size_gb][crate::model::UpdateNodePoolRequest::disk_size_gb].
14192    pub fn set_disk_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14193        self.disk_size_gb = v.into();
14194        self
14195    }
14196
14197    /// Sets the value of [resource_manager_tags][crate::model::UpdateNodePoolRequest::resource_manager_tags].
14198    pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
14199    where
14200        T: std::convert::Into<crate::model::ResourceManagerTags>,
14201    {
14202        self.resource_manager_tags = std::option::Option::Some(v.into());
14203        self
14204    }
14205
14206    /// Sets or clears the value of [resource_manager_tags][crate::model::UpdateNodePoolRequest::resource_manager_tags].
14207    pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
14208    where
14209        T: std::convert::Into<crate::model::ResourceManagerTags>,
14210    {
14211        self.resource_manager_tags = v.map(|x| x.into());
14212        self
14213    }
14214
14215    /// Sets the value of [containerd_config][crate::model::UpdateNodePoolRequest::containerd_config].
14216    pub fn set_containerd_config<T>(mut self, v: T) -> Self
14217    where
14218        T: std::convert::Into<crate::model::ContainerdConfig>,
14219    {
14220        self.containerd_config = std::option::Option::Some(v.into());
14221        self
14222    }
14223
14224    /// Sets or clears the value of [containerd_config][crate::model::UpdateNodePoolRequest::containerd_config].
14225    pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
14226    where
14227        T: std::convert::Into<crate::model::ContainerdConfig>,
14228    {
14229        self.containerd_config = v.map(|x| x.into());
14230        self
14231    }
14232
14233    /// Sets the value of [queued_provisioning][crate::model::UpdateNodePoolRequest::queued_provisioning].
14234    pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
14235    where
14236        T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
14237    {
14238        self.queued_provisioning = std::option::Option::Some(v.into());
14239        self
14240    }
14241
14242    /// Sets or clears the value of [queued_provisioning][crate::model::UpdateNodePoolRequest::queued_provisioning].
14243    pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
14244    where
14245        T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
14246    {
14247        self.queued_provisioning = v.map(|x| x.into());
14248        self
14249    }
14250
14251    /// Sets the value of [storage_pools][crate::model::UpdateNodePoolRequest::storage_pools].
14252    pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
14253    where
14254        T: std::iter::IntoIterator<Item = V>,
14255        V: std::convert::Into<std::string::String>,
14256    {
14257        use std::iter::Iterator;
14258        self.storage_pools = v.into_iter().map(|i| i.into()).collect();
14259        self
14260    }
14261
14262    /// Sets the value of [max_run_duration][crate::model::UpdateNodePoolRequest::max_run_duration].
14263    pub fn set_max_run_duration<T>(mut self, v: T) -> Self
14264    where
14265        T: std::convert::Into<wkt::Duration>,
14266    {
14267        self.max_run_duration = std::option::Option::Some(v.into());
14268        self
14269    }
14270
14271    /// Sets or clears the value of [max_run_duration][crate::model::UpdateNodePoolRequest::max_run_duration].
14272    pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
14273    where
14274        T: std::convert::Into<wkt::Duration>,
14275    {
14276        self.max_run_duration = v.map(|x| x.into());
14277        self
14278    }
14279
14280    /// Sets the value of [flex_start][crate::model::UpdateNodePoolRequest::flex_start].
14281    pub fn set_flex_start<T>(mut self, v: T) -> Self
14282    where
14283        T: std::convert::Into<bool>,
14284    {
14285        self.flex_start = std::option::Option::Some(v.into());
14286        self
14287    }
14288
14289    /// Sets or clears the value of [flex_start][crate::model::UpdateNodePoolRequest::flex_start].
14290    pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
14291    where
14292        T: std::convert::Into<bool>,
14293    {
14294        self.flex_start = v.map(|x| x.into());
14295        self
14296    }
14297
14298    /// Sets the value of [boot_disk][crate::model::UpdateNodePoolRequest::boot_disk].
14299    pub fn set_boot_disk<T>(mut self, v: T) -> Self
14300    where
14301        T: std::convert::Into<crate::model::BootDisk>,
14302    {
14303        self.boot_disk = std::option::Option::Some(v.into());
14304        self
14305    }
14306
14307    /// Sets or clears the value of [boot_disk][crate::model::UpdateNodePoolRequest::boot_disk].
14308    pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
14309    where
14310        T: std::convert::Into<crate::model::BootDisk>,
14311    {
14312        self.boot_disk = v.map(|x| x.into());
14313        self
14314    }
14315}
14316
14317impl wkt::message::Message for UpdateNodePoolRequest {
14318    fn typename() -> &'static str {
14319        "type.googleapis.com/google.container.v1.UpdateNodePoolRequest"
14320    }
14321}
14322
14323/// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.
14324#[derive(Clone, Default, PartialEq)]
14325#[non_exhaustive]
14326pub struct SetNodePoolAutoscalingRequest {
14327    /// Deprecated. The Google Developers Console [project ID or project
14328    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14329    /// This field has been deprecated and replaced by the name field.
14330    #[deprecated]
14331    pub project_id: std::string::String,
14332
14333    /// Deprecated. The name of the Google Compute Engine
14334    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14335    /// in which the cluster resides. This field has been deprecated and replaced
14336    /// by the name field.
14337    #[deprecated]
14338    pub zone: std::string::String,
14339
14340    /// Deprecated. The name of the cluster to upgrade.
14341    /// This field has been deprecated and replaced by the name field.
14342    #[deprecated]
14343    pub cluster_id: std::string::String,
14344
14345    /// Deprecated. The name of the node pool to upgrade.
14346    /// This field has been deprecated and replaced by the name field.
14347    #[deprecated]
14348    pub node_pool_id: std::string::String,
14349
14350    /// Required. Autoscaling configuration for the node pool.
14351    pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
14352
14353    /// The name (project, location, cluster, node pool) of the node pool to set
14354    /// autoscaler settings. Specified in the format
14355    /// `projects/*/locations/*/clusters/*/nodePools/*`.
14356    pub name: std::string::String,
14357
14358    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14359}
14360
14361impl SetNodePoolAutoscalingRequest {
14362    pub fn new() -> Self {
14363        std::default::Default::default()
14364    }
14365
14366    /// Sets the value of [project_id][crate::model::SetNodePoolAutoscalingRequest::project_id].
14367    #[deprecated]
14368    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14369        self.project_id = v.into();
14370        self
14371    }
14372
14373    /// Sets the value of [zone][crate::model::SetNodePoolAutoscalingRequest::zone].
14374    #[deprecated]
14375    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14376        self.zone = v.into();
14377        self
14378    }
14379
14380    /// Sets the value of [cluster_id][crate::model::SetNodePoolAutoscalingRequest::cluster_id].
14381    #[deprecated]
14382    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14383        self.cluster_id = v.into();
14384        self
14385    }
14386
14387    /// Sets the value of [node_pool_id][crate::model::SetNodePoolAutoscalingRequest::node_pool_id].
14388    #[deprecated]
14389    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14390        self.node_pool_id = v.into();
14391        self
14392    }
14393
14394    /// Sets the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
14395    pub fn set_autoscaling<T>(mut self, v: T) -> Self
14396    where
14397        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
14398    {
14399        self.autoscaling = std::option::Option::Some(v.into());
14400        self
14401    }
14402
14403    /// Sets or clears the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
14404    pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
14405    where
14406        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
14407    {
14408        self.autoscaling = v.map(|x| x.into());
14409        self
14410    }
14411
14412    /// Sets the value of [name][crate::model::SetNodePoolAutoscalingRequest::name].
14413    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14414        self.name = v.into();
14415        self
14416    }
14417}
14418
14419impl wkt::message::Message for SetNodePoolAutoscalingRequest {
14420    fn typename() -> &'static str {
14421        "type.googleapis.com/google.container.v1.SetNodePoolAutoscalingRequest"
14422    }
14423}
14424
14425/// SetLoggingServiceRequest sets the logging service of a cluster.
14426#[derive(Clone, Default, PartialEq)]
14427#[non_exhaustive]
14428pub struct SetLoggingServiceRequest {
14429    /// Deprecated. The Google Developers Console [project ID or project
14430    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14431    /// This field has been deprecated and replaced by the name field.
14432    #[deprecated]
14433    pub project_id: std::string::String,
14434
14435    /// Deprecated. The name of the Google Compute Engine
14436    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14437    /// in which the cluster resides. This field has been deprecated and replaced
14438    /// by the name field.
14439    #[deprecated]
14440    pub zone: std::string::String,
14441
14442    /// Deprecated. The name of the cluster to upgrade.
14443    /// This field has been deprecated and replaced by the name field.
14444    #[deprecated]
14445    pub cluster_id: std::string::String,
14446
14447    /// Required. The logging service the cluster should use to write logs.
14448    /// Currently available options:
14449    ///
14450    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
14451    ///   service with a Kubernetes-native resource model
14452    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
14453    ///   available as of GKE 1.15).
14454    /// * `none` - no logs will be exported from the cluster.
14455    ///
14456    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
14457    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
14458    pub logging_service: std::string::String,
14459
14460    /// The name (project, location, cluster) of the cluster to set logging.
14461    /// Specified in the format `projects/*/locations/*/clusters/*`.
14462    pub name: std::string::String,
14463
14464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14465}
14466
14467impl SetLoggingServiceRequest {
14468    pub fn new() -> Self {
14469        std::default::Default::default()
14470    }
14471
14472    /// Sets the value of [project_id][crate::model::SetLoggingServiceRequest::project_id].
14473    #[deprecated]
14474    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14475        self.project_id = v.into();
14476        self
14477    }
14478
14479    /// Sets the value of [zone][crate::model::SetLoggingServiceRequest::zone].
14480    #[deprecated]
14481    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14482        self.zone = v.into();
14483        self
14484    }
14485
14486    /// Sets the value of [cluster_id][crate::model::SetLoggingServiceRequest::cluster_id].
14487    #[deprecated]
14488    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14489        self.cluster_id = v.into();
14490        self
14491    }
14492
14493    /// Sets the value of [logging_service][crate::model::SetLoggingServiceRequest::logging_service].
14494    pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14495        self.logging_service = v.into();
14496        self
14497    }
14498
14499    /// Sets the value of [name][crate::model::SetLoggingServiceRequest::name].
14500    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14501        self.name = v.into();
14502        self
14503    }
14504}
14505
14506impl wkt::message::Message for SetLoggingServiceRequest {
14507    fn typename() -> &'static str {
14508        "type.googleapis.com/google.container.v1.SetLoggingServiceRequest"
14509    }
14510}
14511
14512/// SetMonitoringServiceRequest sets the monitoring service of a cluster.
14513#[derive(Clone, Default, PartialEq)]
14514#[non_exhaustive]
14515pub struct SetMonitoringServiceRequest {
14516    /// Deprecated. The Google Developers Console [project ID or project
14517    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14518    /// This field has been deprecated and replaced by the name field.
14519    #[deprecated]
14520    pub project_id: std::string::String,
14521
14522    /// Deprecated. The name of the Google Compute Engine
14523    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14524    /// in which the cluster resides. This field has been deprecated and replaced
14525    /// by the name field.
14526    #[deprecated]
14527    pub zone: std::string::String,
14528
14529    /// Deprecated. The name of the cluster to upgrade.
14530    /// This field has been deprecated and replaced by the name field.
14531    #[deprecated]
14532    pub cluster_id: std::string::String,
14533
14534    /// Required. The monitoring service the cluster should use to write metrics.
14535    /// Currently available options:
14536    ///
14537    /// * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring
14538    ///   service with a Kubernetes-native resource model
14539    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
14540    ///   longer available as of GKE 1.15).
14541    /// * `none` - No metrics will be exported from the cluster.
14542    ///
14543    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
14544    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
14545    pub monitoring_service: std::string::String,
14546
14547    /// The name (project, location, cluster) of the cluster to set monitoring.
14548    /// Specified in the format `projects/*/locations/*/clusters/*`.
14549    pub name: std::string::String,
14550
14551    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14552}
14553
14554impl SetMonitoringServiceRequest {
14555    pub fn new() -> Self {
14556        std::default::Default::default()
14557    }
14558
14559    /// Sets the value of [project_id][crate::model::SetMonitoringServiceRequest::project_id].
14560    #[deprecated]
14561    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14562        self.project_id = v.into();
14563        self
14564    }
14565
14566    /// Sets the value of [zone][crate::model::SetMonitoringServiceRequest::zone].
14567    #[deprecated]
14568    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14569        self.zone = v.into();
14570        self
14571    }
14572
14573    /// Sets the value of [cluster_id][crate::model::SetMonitoringServiceRequest::cluster_id].
14574    #[deprecated]
14575    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14576        self.cluster_id = v.into();
14577        self
14578    }
14579
14580    /// Sets the value of [monitoring_service][crate::model::SetMonitoringServiceRequest::monitoring_service].
14581    pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
14582        mut self,
14583        v: T,
14584    ) -> Self {
14585        self.monitoring_service = v.into();
14586        self
14587    }
14588
14589    /// Sets the value of [name][crate::model::SetMonitoringServiceRequest::name].
14590    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14591        self.name = v.into();
14592        self
14593    }
14594}
14595
14596impl wkt::message::Message for SetMonitoringServiceRequest {
14597    fn typename() -> &'static str {
14598        "type.googleapis.com/google.container.v1.SetMonitoringServiceRequest"
14599    }
14600}
14601
14602/// SetAddonsConfigRequest sets the addons associated with the cluster.
14603#[derive(Clone, Default, PartialEq)]
14604#[non_exhaustive]
14605pub struct SetAddonsConfigRequest {
14606    /// Deprecated. The Google Developers Console [project ID or project
14607    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14608    /// This field has been deprecated and replaced by the name field.
14609    #[deprecated]
14610    pub project_id: std::string::String,
14611
14612    /// Deprecated. The name of the Google Compute Engine
14613    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14614    /// in which the cluster resides. This field has been deprecated and replaced
14615    /// by the name field.
14616    #[deprecated]
14617    pub zone: std::string::String,
14618
14619    /// Deprecated. The name of the cluster to upgrade.
14620    /// This field has been deprecated and replaced by the name field.
14621    #[deprecated]
14622    pub cluster_id: std::string::String,
14623
14624    /// Required. The desired configurations for the various addons available to
14625    /// run in the cluster.
14626    pub addons_config: std::option::Option<crate::model::AddonsConfig>,
14627
14628    /// The name (project, location, cluster) of the cluster to set addons.
14629    /// Specified in the format `projects/*/locations/*/clusters/*`.
14630    pub name: std::string::String,
14631
14632    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14633}
14634
14635impl SetAddonsConfigRequest {
14636    pub fn new() -> Self {
14637        std::default::Default::default()
14638    }
14639
14640    /// Sets the value of [project_id][crate::model::SetAddonsConfigRequest::project_id].
14641    #[deprecated]
14642    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14643        self.project_id = v.into();
14644        self
14645    }
14646
14647    /// Sets the value of [zone][crate::model::SetAddonsConfigRequest::zone].
14648    #[deprecated]
14649    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14650        self.zone = v.into();
14651        self
14652    }
14653
14654    /// Sets the value of [cluster_id][crate::model::SetAddonsConfigRequest::cluster_id].
14655    #[deprecated]
14656    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14657        self.cluster_id = v.into();
14658        self
14659    }
14660
14661    /// Sets the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
14662    pub fn set_addons_config<T>(mut self, v: T) -> Self
14663    where
14664        T: std::convert::Into<crate::model::AddonsConfig>,
14665    {
14666        self.addons_config = std::option::Option::Some(v.into());
14667        self
14668    }
14669
14670    /// Sets or clears the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
14671    pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
14672    where
14673        T: std::convert::Into<crate::model::AddonsConfig>,
14674    {
14675        self.addons_config = v.map(|x| x.into());
14676        self
14677    }
14678
14679    /// Sets the value of [name][crate::model::SetAddonsConfigRequest::name].
14680    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14681        self.name = v.into();
14682        self
14683    }
14684}
14685
14686impl wkt::message::Message for SetAddonsConfigRequest {
14687    fn typename() -> &'static str {
14688        "type.googleapis.com/google.container.v1.SetAddonsConfigRequest"
14689    }
14690}
14691
14692/// SetLocationsRequest sets the locations of the cluster.
14693#[derive(Clone, Default, PartialEq)]
14694#[non_exhaustive]
14695pub struct SetLocationsRequest {
14696    /// Deprecated. The Google Developers Console [project ID or project
14697    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14698    /// This field has been deprecated and replaced by the name field.
14699    #[deprecated]
14700    pub project_id: std::string::String,
14701
14702    /// Deprecated. The name of the Google Compute Engine
14703    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14704    /// in which the cluster resides. This field has been deprecated and replaced
14705    /// by the name field.
14706    #[deprecated]
14707    pub zone: std::string::String,
14708
14709    /// Deprecated. The name of the cluster to upgrade.
14710    /// This field has been deprecated and replaced by the name field.
14711    #[deprecated]
14712    pub cluster_id: std::string::String,
14713
14714    /// Required. The desired list of Google Compute Engine
14715    /// [zones](https://cloud.google.com/compute/docs/zones#available)
14716    /// in which the cluster's nodes should be located. Changing the locations a
14717    /// cluster is in will result in nodes being either created or removed from the
14718    /// cluster, depending on whether locations are being added or removed.
14719    ///
14720    /// This list must always include the cluster's primary zone.
14721    pub locations: std::vec::Vec<std::string::String>,
14722
14723    /// The name (project, location, cluster) of the cluster to set locations.
14724    /// Specified in the format `projects/*/locations/*/clusters/*`.
14725    pub name: std::string::String,
14726
14727    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14728}
14729
14730impl SetLocationsRequest {
14731    pub fn new() -> Self {
14732        std::default::Default::default()
14733    }
14734
14735    /// Sets the value of [project_id][crate::model::SetLocationsRequest::project_id].
14736    #[deprecated]
14737    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14738        self.project_id = v.into();
14739        self
14740    }
14741
14742    /// Sets the value of [zone][crate::model::SetLocationsRequest::zone].
14743    #[deprecated]
14744    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14745        self.zone = v.into();
14746        self
14747    }
14748
14749    /// Sets the value of [cluster_id][crate::model::SetLocationsRequest::cluster_id].
14750    #[deprecated]
14751    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14752        self.cluster_id = v.into();
14753        self
14754    }
14755
14756    /// Sets the value of [locations][crate::model::SetLocationsRequest::locations].
14757    pub fn set_locations<T, V>(mut self, v: T) -> Self
14758    where
14759        T: std::iter::IntoIterator<Item = V>,
14760        V: std::convert::Into<std::string::String>,
14761    {
14762        use std::iter::Iterator;
14763        self.locations = v.into_iter().map(|i| i.into()).collect();
14764        self
14765    }
14766
14767    /// Sets the value of [name][crate::model::SetLocationsRequest::name].
14768    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14769        self.name = v.into();
14770        self
14771    }
14772}
14773
14774impl wkt::message::Message for SetLocationsRequest {
14775    fn typename() -> &'static str {
14776        "type.googleapis.com/google.container.v1.SetLocationsRequest"
14777    }
14778}
14779
14780/// UpdateMasterRequest updates the master of the cluster.
14781#[derive(Clone, Default, PartialEq)]
14782#[non_exhaustive]
14783pub struct UpdateMasterRequest {
14784    /// Deprecated. The Google Developers Console [project ID or project
14785    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14786    /// This field has been deprecated and replaced by the name field.
14787    #[deprecated]
14788    pub project_id: std::string::String,
14789
14790    /// Deprecated. The name of the Google Compute Engine
14791    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14792    /// in which the cluster resides. This field has been deprecated and replaced
14793    /// by the name field.
14794    #[deprecated]
14795    pub zone: std::string::String,
14796
14797    /// Deprecated. The name of the cluster to upgrade.
14798    /// This field has been deprecated and replaced by the name field.
14799    #[deprecated]
14800    pub cluster_id: std::string::String,
14801
14802    /// Required. The Kubernetes version to change the master to.
14803    ///
14804    /// Users may specify either explicit versions offered by Kubernetes Engine or
14805    /// version aliases, which have the following behavior:
14806    ///
14807    /// - "latest": picks the highest valid Kubernetes version
14808    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
14809    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
14810    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
14811    /// - "-": picks the default Kubernetes version
14812    pub master_version: std::string::String,
14813
14814    /// The name (project, location, cluster) of the cluster to update.
14815    /// Specified in the format `projects/*/locations/*/clusters/*`.
14816    pub name: std::string::String,
14817
14818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14819}
14820
14821impl UpdateMasterRequest {
14822    pub fn new() -> Self {
14823        std::default::Default::default()
14824    }
14825
14826    /// Sets the value of [project_id][crate::model::UpdateMasterRequest::project_id].
14827    #[deprecated]
14828    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14829        self.project_id = v.into();
14830        self
14831    }
14832
14833    /// Sets the value of [zone][crate::model::UpdateMasterRequest::zone].
14834    #[deprecated]
14835    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14836        self.zone = v.into();
14837        self
14838    }
14839
14840    /// Sets the value of [cluster_id][crate::model::UpdateMasterRequest::cluster_id].
14841    #[deprecated]
14842    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14843        self.cluster_id = v.into();
14844        self
14845    }
14846
14847    /// Sets the value of [master_version][crate::model::UpdateMasterRequest::master_version].
14848    pub fn set_master_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14849        self.master_version = v.into();
14850        self
14851    }
14852
14853    /// Sets the value of [name][crate::model::UpdateMasterRequest::name].
14854    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14855        self.name = v.into();
14856        self
14857    }
14858}
14859
14860impl wkt::message::Message for UpdateMasterRequest {
14861    fn typename() -> &'static str {
14862        "type.googleapis.com/google.container.v1.UpdateMasterRequest"
14863    }
14864}
14865
14866/// SetMasterAuthRequest updates the admin password of a cluster.
14867#[derive(Clone, Default, PartialEq)]
14868#[non_exhaustive]
14869pub struct SetMasterAuthRequest {
14870    /// Deprecated. The Google Developers Console [project ID or project
14871    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14872    /// This field has been deprecated and replaced by the name field.
14873    #[deprecated]
14874    pub project_id: std::string::String,
14875
14876    /// Deprecated. The name of the Google Compute Engine
14877    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14878    /// in which the cluster resides. This field has been deprecated and replaced
14879    /// by the name field.
14880    #[deprecated]
14881    pub zone: std::string::String,
14882
14883    /// Deprecated. The name of the cluster to upgrade.
14884    /// This field has been deprecated and replaced by the name field.
14885    #[deprecated]
14886    pub cluster_id: std::string::String,
14887
14888    /// Required. The exact form of action to be taken on the master auth.
14889    pub action: crate::model::set_master_auth_request::Action,
14890
14891    /// Required. A description of the update.
14892    pub update: std::option::Option<crate::model::MasterAuth>,
14893
14894    /// The name (project, location, cluster) of the cluster to set auth.
14895    /// Specified in the format `projects/*/locations/*/clusters/*`.
14896    pub name: std::string::String,
14897
14898    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14899}
14900
14901impl SetMasterAuthRequest {
14902    pub fn new() -> Self {
14903        std::default::Default::default()
14904    }
14905
14906    /// Sets the value of [project_id][crate::model::SetMasterAuthRequest::project_id].
14907    #[deprecated]
14908    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14909        self.project_id = v.into();
14910        self
14911    }
14912
14913    /// Sets the value of [zone][crate::model::SetMasterAuthRequest::zone].
14914    #[deprecated]
14915    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14916        self.zone = v.into();
14917        self
14918    }
14919
14920    /// Sets the value of [cluster_id][crate::model::SetMasterAuthRequest::cluster_id].
14921    #[deprecated]
14922    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14923        self.cluster_id = v.into();
14924        self
14925    }
14926
14927    /// Sets the value of [action][crate::model::SetMasterAuthRequest::action].
14928    pub fn set_action<T: std::convert::Into<crate::model::set_master_auth_request::Action>>(
14929        mut self,
14930        v: T,
14931    ) -> Self {
14932        self.action = v.into();
14933        self
14934    }
14935
14936    /// Sets the value of [update][crate::model::SetMasterAuthRequest::update].
14937    pub fn set_update<T>(mut self, v: T) -> Self
14938    where
14939        T: std::convert::Into<crate::model::MasterAuth>,
14940    {
14941        self.update = std::option::Option::Some(v.into());
14942        self
14943    }
14944
14945    /// Sets or clears the value of [update][crate::model::SetMasterAuthRequest::update].
14946    pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
14947    where
14948        T: std::convert::Into<crate::model::MasterAuth>,
14949    {
14950        self.update = v.map(|x| x.into());
14951        self
14952    }
14953
14954    /// Sets the value of [name][crate::model::SetMasterAuthRequest::name].
14955    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14956        self.name = v.into();
14957        self
14958    }
14959}
14960
14961impl wkt::message::Message for SetMasterAuthRequest {
14962    fn typename() -> &'static str {
14963        "type.googleapis.com/google.container.v1.SetMasterAuthRequest"
14964    }
14965}
14966
14967/// Defines additional types related to [SetMasterAuthRequest].
14968pub mod set_master_auth_request {
14969    #[allow(unused_imports)]
14970    use super::*;
14971
14972    /// Operation type: what type update to perform.
14973    ///
14974    /// # Working with unknown values
14975    ///
14976    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14977    /// additional enum variants at any time. Adding new variants is not considered
14978    /// a breaking change. Applications should write their code in anticipation of:
14979    ///
14980    /// - New values appearing in future releases of the client library, **and**
14981    /// - New values received dynamically, without application changes.
14982    ///
14983    /// Please consult the [Working with enums] section in the user guide for some
14984    /// guidelines.
14985    ///
14986    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14987    #[derive(Clone, Debug, PartialEq)]
14988    #[non_exhaustive]
14989    pub enum Action {
14990        /// Operation is unknown and will error out.
14991        Unknown,
14992        /// Set the password to a user generated value.
14993        SetPassword,
14994        /// Generate a new password and set it to that.
14995        GeneratePassword,
14996        /// Set the username.  If an empty username is provided, basic authentication
14997        /// is disabled for the cluster.  If a non-empty username is provided, basic
14998        /// authentication is enabled, with either a provided password or a generated
14999        /// one.
15000        SetUsername,
15001        /// If set, the enum was initialized with an unknown value.
15002        ///
15003        /// Applications can examine the value using [Action::value] or
15004        /// [Action::name].
15005        UnknownValue(action::UnknownValue),
15006    }
15007
15008    #[doc(hidden)]
15009    pub mod action {
15010        #[allow(unused_imports)]
15011        use super::*;
15012        #[derive(Clone, Debug, PartialEq)]
15013        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15014    }
15015
15016    impl Action {
15017        /// Gets the enum value.
15018        ///
15019        /// Returns `None` if the enum contains an unknown value deserialized from
15020        /// the string representation of enums.
15021        pub fn value(&self) -> std::option::Option<i32> {
15022            match self {
15023                Self::Unknown => std::option::Option::Some(0),
15024                Self::SetPassword => std::option::Option::Some(1),
15025                Self::GeneratePassword => std::option::Option::Some(2),
15026                Self::SetUsername => std::option::Option::Some(3),
15027                Self::UnknownValue(u) => u.0.value(),
15028            }
15029        }
15030
15031        /// Gets the enum value as a string.
15032        ///
15033        /// Returns `None` if the enum contains an unknown value deserialized from
15034        /// the integer representation of enums.
15035        pub fn name(&self) -> std::option::Option<&str> {
15036            match self {
15037                Self::Unknown => std::option::Option::Some("UNKNOWN"),
15038                Self::SetPassword => std::option::Option::Some("SET_PASSWORD"),
15039                Self::GeneratePassword => std::option::Option::Some("GENERATE_PASSWORD"),
15040                Self::SetUsername => std::option::Option::Some("SET_USERNAME"),
15041                Self::UnknownValue(u) => u.0.name(),
15042            }
15043        }
15044    }
15045
15046    impl std::default::Default for Action {
15047        fn default() -> Self {
15048            use std::convert::From;
15049            Self::from(0)
15050        }
15051    }
15052
15053    impl std::fmt::Display for Action {
15054        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15055            wkt::internal::display_enum(f, self.name(), self.value())
15056        }
15057    }
15058
15059    impl std::convert::From<i32> for Action {
15060        fn from(value: i32) -> Self {
15061            match value {
15062                0 => Self::Unknown,
15063                1 => Self::SetPassword,
15064                2 => Self::GeneratePassword,
15065                3 => Self::SetUsername,
15066                _ => Self::UnknownValue(action::UnknownValue(
15067                    wkt::internal::UnknownEnumValue::Integer(value),
15068                )),
15069            }
15070        }
15071    }
15072
15073    impl std::convert::From<&str> for Action {
15074        fn from(value: &str) -> Self {
15075            use std::string::ToString;
15076            match value {
15077                "UNKNOWN" => Self::Unknown,
15078                "SET_PASSWORD" => Self::SetPassword,
15079                "GENERATE_PASSWORD" => Self::GeneratePassword,
15080                "SET_USERNAME" => Self::SetUsername,
15081                _ => Self::UnknownValue(action::UnknownValue(
15082                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15083                )),
15084            }
15085        }
15086    }
15087
15088    impl serde::ser::Serialize for Action {
15089        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15090        where
15091            S: serde::Serializer,
15092        {
15093            match self {
15094                Self::Unknown => serializer.serialize_i32(0),
15095                Self::SetPassword => serializer.serialize_i32(1),
15096                Self::GeneratePassword => serializer.serialize_i32(2),
15097                Self::SetUsername => serializer.serialize_i32(3),
15098                Self::UnknownValue(u) => u.0.serialize(serializer),
15099            }
15100        }
15101    }
15102
15103    impl<'de> serde::de::Deserialize<'de> for Action {
15104        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15105        where
15106            D: serde::Deserializer<'de>,
15107        {
15108            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
15109                ".google.container.v1.SetMasterAuthRequest.Action",
15110            ))
15111        }
15112    }
15113}
15114
15115/// DeleteClusterRequest deletes a cluster.
15116#[derive(Clone, Default, PartialEq)]
15117#[non_exhaustive]
15118pub struct DeleteClusterRequest {
15119    /// Deprecated. The Google Developers Console [project ID or project
15120    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15121    /// This field has been deprecated and replaced by the name field.
15122    #[deprecated]
15123    pub project_id: std::string::String,
15124
15125    /// Deprecated. The name of the Google Compute Engine
15126    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15127    /// in which the cluster resides. This field has been deprecated and replaced
15128    /// by the name field.
15129    #[deprecated]
15130    pub zone: std::string::String,
15131
15132    /// Deprecated. The name of the cluster to delete.
15133    /// This field has been deprecated and replaced by the name field.
15134    #[deprecated]
15135    pub cluster_id: std::string::String,
15136
15137    /// The name (project, location, cluster) of the cluster to delete.
15138    /// Specified in the format `projects/*/locations/*/clusters/*`.
15139    pub name: std::string::String,
15140
15141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15142}
15143
15144impl DeleteClusterRequest {
15145    pub fn new() -> Self {
15146        std::default::Default::default()
15147    }
15148
15149    /// Sets the value of [project_id][crate::model::DeleteClusterRequest::project_id].
15150    #[deprecated]
15151    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15152        self.project_id = v.into();
15153        self
15154    }
15155
15156    /// Sets the value of [zone][crate::model::DeleteClusterRequest::zone].
15157    #[deprecated]
15158    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15159        self.zone = v.into();
15160        self
15161    }
15162
15163    /// Sets the value of [cluster_id][crate::model::DeleteClusterRequest::cluster_id].
15164    #[deprecated]
15165    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15166        self.cluster_id = v.into();
15167        self
15168    }
15169
15170    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
15171    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15172        self.name = v.into();
15173        self
15174    }
15175}
15176
15177impl wkt::message::Message for DeleteClusterRequest {
15178    fn typename() -> &'static str {
15179        "type.googleapis.com/google.container.v1.DeleteClusterRequest"
15180    }
15181}
15182
15183/// ListClustersRequest lists clusters.
15184#[derive(Clone, Default, PartialEq)]
15185#[non_exhaustive]
15186pub struct ListClustersRequest {
15187    /// Deprecated. The Google Developers Console [project ID or project
15188    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15189    /// This field has been deprecated and replaced by the parent field.
15190    #[deprecated]
15191    pub project_id: std::string::String,
15192
15193    /// Deprecated. The name of the Google Compute Engine
15194    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15195    /// in which the cluster resides, or "-" for all zones. This field has been
15196    /// deprecated and replaced by the parent field.
15197    #[deprecated]
15198    pub zone: std::string::String,
15199
15200    /// The parent (project and location) where the clusters will be listed.
15201    /// Specified in the format `projects/*/locations/*`.
15202    /// Location "-" matches all zones and all regions.
15203    pub parent: std::string::String,
15204
15205    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15206}
15207
15208impl ListClustersRequest {
15209    pub fn new() -> Self {
15210        std::default::Default::default()
15211    }
15212
15213    /// Sets the value of [project_id][crate::model::ListClustersRequest::project_id].
15214    #[deprecated]
15215    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15216        self.project_id = v.into();
15217        self
15218    }
15219
15220    /// Sets the value of [zone][crate::model::ListClustersRequest::zone].
15221    #[deprecated]
15222    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15223        self.zone = v.into();
15224        self
15225    }
15226
15227    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
15228    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15229        self.parent = v.into();
15230        self
15231    }
15232}
15233
15234impl wkt::message::Message for ListClustersRequest {
15235    fn typename() -> &'static str {
15236        "type.googleapis.com/google.container.v1.ListClustersRequest"
15237    }
15238}
15239
15240/// ListClustersResponse is the result of ListClustersRequest.
15241#[derive(Clone, Default, PartialEq)]
15242#[non_exhaustive]
15243pub struct ListClustersResponse {
15244    /// A list of clusters in the project in the specified zone, or
15245    /// across all ones.
15246    pub clusters: std::vec::Vec<crate::model::Cluster>,
15247
15248    /// If any zones are listed here, the list of clusters returned
15249    /// may be missing those zones.
15250    pub missing_zones: std::vec::Vec<std::string::String>,
15251
15252    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15253}
15254
15255impl ListClustersResponse {
15256    pub fn new() -> Self {
15257        std::default::Default::default()
15258    }
15259
15260    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
15261    pub fn set_clusters<T, V>(mut self, v: T) -> Self
15262    where
15263        T: std::iter::IntoIterator<Item = V>,
15264        V: std::convert::Into<crate::model::Cluster>,
15265    {
15266        use std::iter::Iterator;
15267        self.clusters = v.into_iter().map(|i| i.into()).collect();
15268        self
15269    }
15270
15271    /// Sets the value of [missing_zones][crate::model::ListClustersResponse::missing_zones].
15272    pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
15273    where
15274        T: std::iter::IntoIterator<Item = V>,
15275        V: std::convert::Into<std::string::String>,
15276    {
15277        use std::iter::Iterator;
15278        self.missing_zones = v.into_iter().map(|i| i.into()).collect();
15279        self
15280    }
15281}
15282
15283impl wkt::message::Message for ListClustersResponse {
15284    fn typename() -> &'static str {
15285        "type.googleapis.com/google.container.v1.ListClustersResponse"
15286    }
15287}
15288
15289/// GetOperationRequest gets a single operation.
15290#[derive(Clone, Default, PartialEq)]
15291#[non_exhaustive]
15292pub struct GetOperationRequest {
15293    /// Deprecated. The Google Developers Console [project ID or project
15294    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15295    /// This field has been deprecated and replaced by the name field.
15296    #[deprecated]
15297    pub project_id: std::string::String,
15298
15299    /// Deprecated. The name of the Google Compute Engine
15300    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15301    /// in which the cluster resides. This field has been deprecated and replaced
15302    /// by the name field.
15303    #[deprecated]
15304    pub zone: std::string::String,
15305
15306    /// Deprecated. The server-assigned `name` of the operation.
15307    /// This field has been deprecated and replaced by the name field.
15308    #[deprecated]
15309    pub operation_id: std::string::String,
15310
15311    /// The name (project, location, operation id) of the operation to get.
15312    /// Specified in the format `projects/*/locations/*/operations/*`.
15313    pub name: std::string::String,
15314
15315    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15316}
15317
15318impl GetOperationRequest {
15319    pub fn new() -> Self {
15320        std::default::Default::default()
15321    }
15322
15323    /// Sets the value of [project_id][crate::model::GetOperationRequest::project_id].
15324    #[deprecated]
15325    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15326        self.project_id = v.into();
15327        self
15328    }
15329
15330    /// Sets the value of [zone][crate::model::GetOperationRequest::zone].
15331    #[deprecated]
15332    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15333        self.zone = v.into();
15334        self
15335    }
15336
15337    /// Sets the value of [operation_id][crate::model::GetOperationRequest::operation_id].
15338    #[deprecated]
15339    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15340        self.operation_id = v.into();
15341        self
15342    }
15343
15344    /// Sets the value of [name][crate::model::GetOperationRequest::name].
15345    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15346        self.name = v.into();
15347        self
15348    }
15349}
15350
15351impl wkt::message::Message for GetOperationRequest {
15352    fn typename() -> &'static str {
15353        "type.googleapis.com/google.container.v1.GetOperationRequest"
15354    }
15355}
15356
15357/// ListOperationsRequest lists operations.
15358#[derive(Clone, Default, PartialEq)]
15359#[non_exhaustive]
15360pub struct ListOperationsRequest {
15361    /// Deprecated. The Google Developers Console [project ID or project
15362    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15363    /// This field has been deprecated and replaced by the parent field.
15364    #[deprecated]
15365    pub project_id: std::string::String,
15366
15367    /// Deprecated. The name of the Google Compute Engine
15368    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15369    /// to return operations for, or `-` for all zones. This field has been
15370    /// deprecated and replaced by the parent field.
15371    #[deprecated]
15372    pub zone: std::string::String,
15373
15374    /// The parent (project and location) where the operations will be listed.
15375    /// Specified in the format `projects/*/locations/*`.
15376    /// Location "-" matches all zones and all regions.
15377    pub parent: std::string::String,
15378
15379    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15380}
15381
15382impl ListOperationsRequest {
15383    pub fn new() -> Self {
15384        std::default::Default::default()
15385    }
15386
15387    /// Sets the value of [project_id][crate::model::ListOperationsRequest::project_id].
15388    #[deprecated]
15389    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15390        self.project_id = v.into();
15391        self
15392    }
15393
15394    /// Sets the value of [zone][crate::model::ListOperationsRequest::zone].
15395    #[deprecated]
15396    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15397        self.zone = v.into();
15398        self
15399    }
15400
15401    /// Sets the value of [parent][crate::model::ListOperationsRequest::parent].
15402    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15403        self.parent = v.into();
15404        self
15405    }
15406}
15407
15408impl wkt::message::Message for ListOperationsRequest {
15409    fn typename() -> &'static str {
15410        "type.googleapis.com/google.container.v1.ListOperationsRequest"
15411    }
15412}
15413
15414/// CancelOperationRequest cancels a single operation.
15415#[derive(Clone, Default, PartialEq)]
15416#[non_exhaustive]
15417pub struct CancelOperationRequest {
15418    /// Deprecated. The Google Developers Console [project ID or project
15419    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15420    /// This field has been deprecated and replaced by the name field.
15421    #[deprecated]
15422    pub project_id: std::string::String,
15423
15424    /// Deprecated. The name of the Google Compute Engine
15425    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15426    /// in which the operation resides. This field has been deprecated and replaced
15427    /// by the name field.
15428    #[deprecated]
15429    pub zone: std::string::String,
15430
15431    /// Deprecated. The server-assigned `name` of the operation.
15432    /// This field has been deprecated and replaced by the name field.
15433    #[deprecated]
15434    pub operation_id: std::string::String,
15435
15436    /// The name (project, location, operation id) of the operation to cancel.
15437    /// Specified in the format `projects/*/locations/*/operations/*`.
15438    pub name: std::string::String,
15439
15440    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15441}
15442
15443impl CancelOperationRequest {
15444    pub fn new() -> Self {
15445        std::default::Default::default()
15446    }
15447
15448    /// Sets the value of [project_id][crate::model::CancelOperationRequest::project_id].
15449    #[deprecated]
15450    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15451        self.project_id = v.into();
15452        self
15453    }
15454
15455    /// Sets the value of [zone][crate::model::CancelOperationRequest::zone].
15456    #[deprecated]
15457    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15458        self.zone = v.into();
15459        self
15460    }
15461
15462    /// Sets the value of [operation_id][crate::model::CancelOperationRequest::operation_id].
15463    #[deprecated]
15464    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15465        self.operation_id = v.into();
15466        self
15467    }
15468
15469    /// Sets the value of [name][crate::model::CancelOperationRequest::name].
15470    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15471        self.name = v.into();
15472        self
15473    }
15474}
15475
15476impl wkt::message::Message for CancelOperationRequest {
15477    fn typename() -> &'static str {
15478        "type.googleapis.com/google.container.v1.CancelOperationRequest"
15479    }
15480}
15481
15482/// ListOperationsResponse is the result of ListOperationsRequest.
15483#[derive(Clone, Default, PartialEq)]
15484#[non_exhaustive]
15485pub struct ListOperationsResponse {
15486    /// A list of operations in the project in the specified zone.
15487    pub operations: std::vec::Vec<crate::model::Operation>,
15488
15489    /// If any zones are listed here, the list of operations returned
15490    /// may be missing the operations from those zones.
15491    pub missing_zones: std::vec::Vec<std::string::String>,
15492
15493    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15494}
15495
15496impl ListOperationsResponse {
15497    pub fn new() -> Self {
15498        std::default::Default::default()
15499    }
15500
15501    /// Sets the value of [operations][crate::model::ListOperationsResponse::operations].
15502    pub fn set_operations<T, V>(mut self, v: T) -> Self
15503    where
15504        T: std::iter::IntoIterator<Item = V>,
15505        V: std::convert::Into<crate::model::Operation>,
15506    {
15507        use std::iter::Iterator;
15508        self.operations = v.into_iter().map(|i| i.into()).collect();
15509        self
15510    }
15511
15512    /// Sets the value of [missing_zones][crate::model::ListOperationsResponse::missing_zones].
15513    pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
15514    where
15515        T: std::iter::IntoIterator<Item = V>,
15516        V: std::convert::Into<std::string::String>,
15517    {
15518        use std::iter::Iterator;
15519        self.missing_zones = v.into_iter().map(|i| i.into()).collect();
15520        self
15521    }
15522}
15523
15524impl wkt::message::Message for ListOperationsResponse {
15525    fn typename() -> &'static str {
15526        "type.googleapis.com/google.container.v1.ListOperationsResponse"
15527    }
15528}
15529
15530/// Gets the current Kubernetes Engine service configuration.
15531#[derive(Clone, Default, PartialEq)]
15532#[non_exhaustive]
15533pub struct GetServerConfigRequest {
15534    /// Deprecated. The Google Developers Console [project ID or project
15535    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15536    /// This field has been deprecated and replaced by the name field.
15537    #[deprecated]
15538    pub project_id: std::string::String,
15539
15540    /// Deprecated. The name of the Google Compute Engine
15541    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15542    /// to return operations for. This field has been deprecated and replaced by
15543    /// the name field.
15544    #[deprecated]
15545    pub zone: std::string::String,
15546
15547    /// The name (project and location) of the server config to get,
15548    /// specified in the format `projects/*/locations/*`.
15549    pub name: std::string::String,
15550
15551    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15552}
15553
15554impl GetServerConfigRequest {
15555    pub fn new() -> Self {
15556        std::default::Default::default()
15557    }
15558
15559    /// Sets the value of [project_id][crate::model::GetServerConfigRequest::project_id].
15560    #[deprecated]
15561    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15562        self.project_id = v.into();
15563        self
15564    }
15565
15566    /// Sets the value of [zone][crate::model::GetServerConfigRequest::zone].
15567    #[deprecated]
15568    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15569        self.zone = v.into();
15570        self
15571    }
15572
15573    /// Sets the value of [name][crate::model::GetServerConfigRequest::name].
15574    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15575        self.name = v.into();
15576        self
15577    }
15578}
15579
15580impl wkt::message::Message for GetServerConfigRequest {
15581    fn typename() -> &'static str {
15582        "type.googleapis.com/google.container.v1.GetServerConfigRequest"
15583    }
15584}
15585
15586/// Kubernetes Engine service configuration.
15587#[derive(Clone, Default, PartialEq)]
15588#[non_exhaustive]
15589pub struct ServerConfig {
15590    /// Version of Kubernetes the service deploys by default.
15591    pub default_cluster_version: std::string::String,
15592
15593    /// List of valid node upgrade target versions, in descending order.
15594    pub valid_node_versions: std::vec::Vec<std::string::String>,
15595
15596    /// Default image type.
15597    pub default_image_type: std::string::String,
15598
15599    /// List of valid image types.
15600    pub valid_image_types: std::vec::Vec<std::string::String>,
15601
15602    /// List of valid master versions, in descending order.
15603    pub valid_master_versions: std::vec::Vec<std::string::String>,
15604
15605    /// List of release channel configurations.
15606    pub channels: std::vec::Vec<crate::model::server_config::ReleaseChannelConfig>,
15607
15608    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15609}
15610
15611impl ServerConfig {
15612    pub fn new() -> Self {
15613        std::default::Default::default()
15614    }
15615
15616    /// Sets the value of [default_cluster_version][crate::model::ServerConfig::default_cluster_version].
15617    pub fn set_default_cluster_version<T: std::convert::Into<std::string::String>>(
15618        mut self,
15619        v: T,
15620    ) -> Self {
15621        self.default_cluster_version = v.into();
15622        self
15623    }
15624
15625    /// Sets the value of [valid_node_versions][crate::model::ServerConfig::valid_node_versions].
15626    pub fn set_valid_node_versions<T, V>(mut self, v: T) -> Self
15627    where
15628        T: std::iter::IntoIterator<Item = V>,
15629        V: std::convert::Into<std::string::String>,
15630    {
15631        use std::iter::Iterator;
15632        self.valid_node_versions = v.into_iter().map(|i| i.into()).collect();
15633        self
15634    }
15635
15636    /// Sets the value of [default_image_type][crate::model::ServerConfig::default_image_type].
15637    pub fn set_default_image_type<T: std::convert::Into<std::string::String>>(
15638        mut self,
15639        v: T,
15640    ) -> Self {
15641        self.default_image_type = v.into();
15642        self
15643    }
15644
15645    /// Sets the value of [valid_image_types][crate::model::ServerConfig::valid_image_types].
15646    pub fn set_valid_image_types<T, V>(mut self, v: T) -> Self
15647    where
15648        T: std::iter::IntoIterator<Item = V>,
15649        V: std::convert::Into<std::string::String>,
15650    {
15651        use std::iter::Iterator;
15652        self.valid_image_types = v.into_iter().map(|i| i.into()).collect();
15653        self
15654    }
15655
15656    /// Sets the value of [valid_master_versions][crate::model::ServerConfig::valid_master_versions].
15657    pub fn set_valid_master_versions<T, V>(mut self, v: T) -> Self
15658    where
15659        T: std::iter::IntoIterator<Item = V>,
15660        V: std::convert::Into<std::string::String>,
15661    {
15662        use std::iter::Iterator;
15663        self.valid_master_versions = v.into_iter().map(|i| i.into()).collect();
15664        self
15665    }
15666
15667    /// Sets the value of [channels][crate::model::ServerConfig::channels].
15668    pub fn set_channels<T, V>(mut self, v: T) -> Self
15669    where
15670        T: std::iter::IntoIterator<Item = V>,
15671        V: std::convert::Into<crate::model::server_config::ReleaseChannelConfig>,
15672    {
15673        use std::iter::Iterator;
15674        self.channels = v.into_iter().map(|i| i.into()).collect();
15675        self
15676    }
15677}
15678
15679impl wkt::message::Message for ServerConfig {
15680    fn typename() -> &'static str {
15681        "type.googleapis.com/google.container.v1.ServerConfig"
15682    }
15683}
15684
15685/// Defines additional types related to [ServerConfig].
15686pub mod server_config {
15687    #[allow(unused_imports)]
15688    use super::*;
15689
15690    /// ReleaseChannelConfig exposes configuration for a release channel.
15691    #[derive(Clone, Default, PartialEq)]
15692    #[non_exhaustive]
15693    pub struct ReleaseChannelConfig {
15694        /// The release channel this configuration applies to.
15695        pub channel: crate::model::release_channel::Channel,
15696
15697        /// The default version for newly created clusters on the channel.
15698        pub default_version: std::string::String,
15699
15700        /// List of valid versions for the channel.
15701        pub valid_versions: std::vec::Vec<std::string::String>,
15702
15703        /// The auto upgrade target version for clusters on the channel.
15704        pub upgrade_target_version: std::string::String,
15705
15706        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15707    }
15708
15709    impl ReleaseChannelConfig {
15710        pub fn new() -> Self {
15711            std::default::Default::default()
15712        }
15713
15714        /// Sets the value of [channel][crate::model::server_config::ReleaseChannelConfig::channel].
15715        pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
15716            mut self,
15717            v: T,
15718        ) -> Self {
15719            self.channel = v.into();
15720            self
15721        }
15722
15723        /// Sets the value of [default_version][crate::model::server_config::ReleaseChannelConfig::default_version].
15724        pub fn set_default_version<T: std::convert::Into<std::string::String>>(
15725            mut self,
15726            v: T,
15727        ) -> Self {
15728            self.default_version = v.into();
15729            self
15730        }
15731
15732        /// Sets the value of [valid_versions][crate::model::server_config::ReleaseChannelConfig::valid_versions].
15733        pub fn set_valid_versions<T, V>(mut self, v: T) -> Self
15734        where
15735            T: std::iter::IntoIterator<Item = V>,
15736            V: std::convert::Into<std::string::String>,
15737        {
15738            use std::iter::Iterator;
15739            self.valid_versions = v.into_iter().map(|i| i.into()).collect();
15740            self
15741        }
15742
15743        /// Sets the value of [upgrade_target_version][crate::model::server_config::ReleaseChannelConfig::upgrade_target_version].
15744        pub fn set_upgrade_target_version<T: std::convert::Into<std::string::String>>(
15745            mut self,
15746            v: T,
15747        ) -> Self {
15748            self.upgrade_target_version = v.into();
15749            self
15750        }
15751    }
15752
15753    impl wkt::message::Message for ReleaseChannelConfig {
15754        fn typename() -> &'static str {
15755            "type.googleapis.com/google.container.v1.ServerConfig.ReleaseChannelConfig"
15756        }
15757    }
15758}
15759
15760/// CreateNodePoolRequest creates a node pool for a cluster.
15761#[derive(Clone, Default, PartialEq)]
15762#[non_exhaustive]
15763pub struct CreateNodePoolRequest {
15764    /// Deprecated. The Google Developers Console [project ID or project
15765    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15766    /// This field has been deprecated and replaced by the parent field.
15767    #[deprecated]
15768    pub project_id: std::string::String,
15769
15770    /// Deprecated. The name of the Google Compute Engine
15771    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15772    /// in which the cluster resides. This field has been deprecated and replaced
15773    /// by the parent field.
15774    #[deprecated]
15775    pub zone: std::string::String,
15776
15777    /// Deprecated. The name of the cluster.
15778    /// This field has been deprecated and replaced by the parent field.
15779    #[deprecated]
15780    pub cluster_id: std::string::String,
15781
15782    /// Required. The node pool to create.
15783    pub node_pool: std::option::Option<crate::model::NodePool>,
15784
15785    /// The parent (project, location, cluster name) where the node pool will be
15786    /// created. Specified in the format
15787    /// `projects/*/locations/*/clusters/*`.
15788    pub parent: std::string::String,
15789
15790    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15791}
15792
15793impl CreateNodePoolRequest {
15794    pub fn new() -> Self {
15795        std::default::Default::default()
15796    }
15797
15798    /// Sets the value of [project_id][crate::model::CreateNodePoolRequest::project_id].
15799    #[deprecated]
15800    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15801        self.project_id = v.into();
15802        self
15803    }
15804
15805    /// Sets the value of [zone][crate::model::CreateNodePoolRequest::zone].
15806    #[deprecated]
15807    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15808        self.zone = v.into();
15809        self
15810    }
15811
15812    /// Sets the value of [cluster_id][crate::model::CreateNodePoolRequest::cluster_id].
15813    #[deprecated]
15814    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15815        self.cluster_id = v.into();
15816        self
15817    }
15818
15819    /// Sets the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
15820    pub fn set_node_pool<T>(mut self, v: T) -> Self
15821    where
15822        T: std::convert::Into<crate::model::NodePool>,
15823    {
15824        self.node_pool = std::option::Option::Some(v.into());
15825        self
15826    }
15827
15828    /// Sets or clears the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
15829    pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
15830    where
15831        T: std::convert::Into<crate::model::NodePool>,
15832    {
15833        self.node_pool = v.map(|x| x.into());
15834        self
15835    }
15836
15837    /// Sets the value of [parent][crate::model::CreateNodePoolRequest::parent].
15838    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15839        self.parent = v.into();
15840        self
15841    }
15842}
15843
15844impl wkt::message::Message for CreateNodePoolRequest {
15845    fn typename() -> &'static str {
15846        "type.googleapis.com/google.container.v1.CreateNodePoolRequest"
15847    }
15848}
15849
15850/// DeleteNodePoolRequest deletes a node pool for a cluster.
15851#[derive(Clone, Default, PartialEq)]
15852#[non_exhaustive]
15853pub struct DeleteNodePoolRequest {
15854    /// Deprecated. The Google Developers Console [project ID or project
15855    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15856    /// This field has been deprecated and replaced by the name field.
15857    #[deprecated]
15858    pub project_id: std::string::String,
15859
15860    /// Deprecated. The name of the Google Compute Engine
15861    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15862    /// in which the cluster resides. This field has been deprecated and replaced
15863    /// by the name field.
15864    #[deprecated]
15865    pub zone: std::string::String,
15866
15867    /// Deprecated. The name of the cluster.
15868    /// This field has been deprecated and replaced by the name field.
15869    #[deprecated]
15870    pub cluster_id: std::string::String,
15871
15872    /// Deprecated. The name of the node pool to delete.
15873    /// This field has been deprecated and replaced by the name field.
15874    #[deprecated]
15875    pub node_pool_id: std::string::String,
15876
15877    /// The name (project, location, cluster, node pool id) of the node pool to
15878    /// delete. Specified in the format
15879    /// `projects/*/locations/*/clusters/*/nodePools/*`.
15880    pub name: std::string::String,
15881
15882    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15883}
15884
15885impl DeleteNodePoolRequest {
15886    pub fn new() -> Self {
15887        std::default::Default::default()
15888    }
15889
15890    /// Sets the value of [project_id][crate::model::DeleteNodePoolRequest::project_id].
15891    #[deprecated]
15892    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15893        self.project_id = v.into();
15894        self
15895    }
15896
15897    /// Sets the value of [zone][crate::model::DeleteNodePoolRequest::zone].
15898    #[deprecated]
15899    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15900        self.zone = v.into();
15901        self
15902    }
15903
15904    /// Sets the value of [cluster_id][crate::model::DeleteNodePoolRequest::cluster_id].
15905    #[deprecated]
15906    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15907        self.cluster_id = v.into();
15908        self
15909    }
15910
15911    /// Sets the value of [node_pool_id][crate::model::DeleteNodePoolRequest::node_pool_id].
15912    #[deprecated]
15913    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15914        self.node_pool_id = v.into();
15915        self
15916    }
15917
15918    /// Sets the value of [name][crate::model::DeleteNodePoolRequest::name].
15919    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15920        self.name = v.into();
15921        self
15922    }
15923}
15924
15925impl wkt::message::Message for DeleteNodePoolRequest {
15926    fn typename() -> &'static str {
15927        "type.googleapis.com/google.container.v1.DeleteNodePoolRequest"
15928    }
15929}
15930
15931/// ListNodePoolsRequest lists the node pool(s) for a cluster.
15932#[derive(Clone, Default, PartialEq)]
15933#[non_exhaustive]
15934pub struct ListNodePoolsRequest {
15935    /// Deprecated. The Google Developers Console [project ID or project
15936    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15937    /// This field has been deprecated and replaced by the parent field.
15938    #[deprecated]
15939    pub project_id: std::string::String,
15940
15941    /// Deprecated. The name of the Google Compute Engine
15942    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15943    /// in which the cluster resides. This field has been deprecated and replaced
15944    /// by the parent field.
15945    #[deprecated]
15946    pub zone: std::string::String,
15947
15948    /// Deprecated. The name of the cluster.
15949    /// This field has been deprecated and replaced by the parent field.
15950    #[deprecated]
15951    pub cluster_id: std::string::String,
15952
15953    /// The parent (project, location, cluster name) where the node pools will be
15954    /// listed. Specified in the format `projects/*/locations/*/clusters/*`.
15955    pub parent: std::string::String,
15956
15957    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15958}
15959
15960impl ListNodePoolsRequest {
15961    pub fn new() -> Self {
15962        std::default::Default::default()
15963    }
15964
15965    /// Sets the value of [project_id][crate::model::ListNodePoolsRequest::project_id].
15966    #[deprecated]
15967    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15968        self.project_id = v.into();
15969        self
15970    }
15971
15972    /// Sets the value of [zone][crate::model::ListNodePoolsRequest::zone].
15973    #[deprecated]
15974    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15975        self.zone = v.into();
15976        self
15977    }
15978
15979    /// Sets the value of [cluster_id][crate::model::ListNodePoolsRequest::cluster_id].
15980    #[deprecated]
15981    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15982        self.cluster_id = v.into();
15983        self
15984    }
15985
15986    /// Sets the value of [parent][crate::model::ListNodePoolsRequest::parent].
15987    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15988        self.parent = v.into();
15989        self
15990    }
15991}
15992
15993impl wkt::message::Message for ListNodePoolsRequest {
15994    fn typename() -> &'static str {
15995        "type.googleapis.com/google.container.v1.ListNodePoolsRequest"
15996    }
15997}
15998
15999/// GetNodePoolRequest retrieves a node pool for a cluster.
16000#[derive(Clone, Default, PartialEq)]
16001#[non_exhaustive]
16002pub struct GetNodePoolRequest {
16003    /// Deprecated. The Google Developers Console [project ID or project
16004    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
16005    /// This field has been deprecated and replaced by the name field.
16006    #[deprecated]
16007    pub project_id: std::string::String,
16008
16009    /// Deprecated. The name of the Google Compute Engine
16010    /// [zone](https://cloud.google.com/compute/docs/zones#available)
16011    /// in which the cluster resides. This field has been deprecated and replaced
16012    /// by the name field.
16013    #[deprecated]
16014    pub zone: std::string::String,
16015
16016    /// Deprecated. The name of the cluster.
16017    /// This field has been deprecated and replaced by the name field.
16018    #[deprecated]
16019    pub cluster_id: std::string::String,
16020
16021    /// Deprecated. The name of the node pool.
16022    /// This field has been deprecated and replaced by the name field.
16023    #[deprecated]
16024    pub node_pool_id: std::string::String,
16025
16026    /// The name (project, location, cluster, node pool id) of the node pool to
16027    /// get. Specified in the format
16028    /// `projects/*/locations/*/clusters/*/nodePools/*`.
16029    pub name: std::string::String,
16030
16031    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16032}
16033
16034impl GetNodePoolRequest {
16035    pub fn new() -> Self {
16036        std::default::Default::default()
16037    }
16038
16039    /// Sets the value of [project_id][crate::model::GetNodePoolRequest::project_id].
16040    #[deprecated]
16041    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16042        self.project_id = v.into();
16043        self
16044    }
16045
16046    /// Sets the value of [zone][crate::model::GetNodePoolRequest::zone].
16047    #[deprecated]
16048    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16049        self.zone = v.into();
16050        self
16051    }
16052
16053    /// Sets the value of [cluster_id][crate::model::GetNodePoolRequest::cluster_id].
16054    #[deprecated]
16055    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16056        self.cluster_id = v.into();
16057        self
16058    }
16059
16060    /// Sets the value of [node_pool_id][crate::model::GetNodePoolRequest::node_pool_id].
16061    #[deprecated]
16062    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16063        self.node_pool_id = v.into();
16064        self
16065    }
16066
16067    /// Sets the value of [name][crate::model::GetNodePoolRequest::name].
16068    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16069        self.name = v.into();
16070        self
16071    }
16072}
16073
16074impl wkt::message::Message for GetNodePoolRequest {
16075    fn typename() -> &'static str {
16076        "type.googleapis.com/google.container.v1.GetNodePoolRequest"
16077    }
16078}
16079
16080/// Settings for blue-green upgrade.
16081#[derive(Clone, Default, PartialEq)]
16082#[non_exhaustive]
16083pub struct BlueGreenSettings {
16084    /// Time needed after draining entire blue pool. After this period, blue pool
16085    /// will be cleaned up.
16086    pub node_pool_soak_duration: std::option::Option<wkt::Duration>,
16087
16088    /// The rollout policy controls the general rollout progress of blue-green.
16089    pub rollout_policy: std::option::Option<crate::model::blue_green_settings::RolloutPolicy>,
16090
16091    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16092}
16093
16094impl BlueGreenSettings {
16095    pub fn new() -> Self {
16096        std::default::Default::default()
16097    }
16098
16099    /// Sets the value of [node_pool_soak_duration][crate::model::BlueGreenSettings::node_pool_soak_duration].
16100    pub fn set_node_pool_soak_duration<T>(mut self, v: T) -> Self
16101    where
16102        T: std::convert::Into<wkt::Duration>,
16103    {
16104        self.node_pool_soak_duration = std::option::Option::Some(v.into());
16105        self
16106    }
16107
16108    /// Sets or clears the value of [node_pool_soak_duration][crate::model::BlueGreenSettings::node_pool_soak_duration].
16109    pub fn set_or_clear_node_pool_soak_duration<T>(mut self, v: std::option::Option<T>) -> Self
16110    where
16111        T: std::convert::Into<wkt::Duration>,
16112    {
16113        self.node_pool_soak_duration = v.map(|x| x.into());
16114        self
16115    }
16116
16117    /// Sets the value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy].
16118    ///
16119    /// Note that all the setters affecting `rollout_policy` are mutually
16120    /// exclusive.
16121    pub fn set_rollout_policy<
16122        T: std::convert::Into<std::option::Option<crate::model::blue_green_settings::RolloutPolicy>>,
16123    >(
16124        mut self,
16125        v: T,
16126    ) -> Self {
16127        self.rollout_policy = v.into();
16128        self
16129    }
16130
16131    /// The value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy]
16132    /// if it holds a `StandardRolloutPolicy`, `None` if the field is not set or
16133    /// holds a different branch.
16134    pub fn standard_rollout_policy(
16135        &self,
16136    ) -> std::option::Option<
16137        &std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
16138    > {
16139        #[allow(unreachable_patterns)]
16140        self.rollout_policy.as_ref().and_then(|v| match v {
16141            crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v) => {
16142                std::option::Option::Some(v)
16143            }
16144            _ => std::option::Option::None,
16145        })
16146    }
16147
16148    /// Sets the value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy]
16149    /// to hold a `StandardRolloutPolicy`.
16150    ///
16151    /// Note that all the setters affecting `rollout_policy` are
16152    /// mutually exclusive.
16153    pub fn set_standard_rollout_policy<
16154        T: std::convert::Into<
16155                std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
16156            >,
16157    >(
16158        mut self,
16159        v: T,
16160    ) -> Self {
16161        self.rollout_policy = std::option::Option::Some(
16162            crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v.into()),
16163        );
16164        self
16165    }
16166
16167    /// The value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy]
16168    /// if it holds a `AutoscaledRolloutPolicy`, `None` if the field is not set or
16169    /// holds a different branch.
16170    pub fn autoscaled_rollout_policy(
16171        &self,
16172    ) -> std::option::Option<
16173        &std::boxed::Box<crate::model::blue_green_settings::AutoscaledRolloutPolicy>,
16174    > {
16175        #[allow(unreachable_patterns)]
16176        self.rollout_policy.as_ref().and_then(|v| match v {
16177            crate::model::blue_green_settings::RolloutPolicy::AutoscaledRolloutPolicy(v) => {
16178                std::option::Option::Some(v)
16179            }
16180            _ => std::option::Option::None,
16181        })
16182    }
16183
16184    /// Sets the value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy]
16185    /// to hold a `AutoscaledRolloutPolicy`.
16186    ///
16187    /// Note that all the setters affecting `rollout_policy` are
16188    /// mutually exclusive.
16189    pub fn set_autoscaled_rollout_policy<
16190        T: std::convert::Into<
16191                std::boxed::Box<crate::model::blue_green_settings::AutoscaledRolloutPolicy>,
16192            >,
16193    >(
16194        mut self,
16195        v: T,
16196    ) -> Self {
16197        self.rollout_policy = std::option::Option::Some(
16198            crate::model::blue_green_settings::RolloutPolicy::AutoscaledRolloutPolicy(v.into()),
16199        );
16200        self
16201    }
16202}
16203
16204impl wkt::message::Message for BlueGreenSettings {
16205    fn typename() -> &'static str {
16206        "type.googleapis.com/google.container.v1.BlueGreenSettings"
16207    }
16208}
16209
16210/// Defines additional types related to [BlueGreenSettings].
16211pub mod blue_green_settings {
16212    #[allow(unused_imports)]
16213    use super::*;
16214
16215    /// Standard rollout policy is the default policy for blue-green.
16216    #[derive(Clone, Default, PartialEq)]
16217    #[non_exhaustive]
16218    pub struct StandardRolloutPolicy {
16219        /// Soak time after each batch gets drained. Default to zero.
16220        pub batch_soak_duration: std::option::Option<wkt::Duration>,
16221
16222        /// Blue pool size to drain in a batch.
16223        pub update_batch_size: std::option::Option<
16224            crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
16225        >,
16226
16227        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16228    }
16229
16230    impl StandardRolloutPolicy {
16231        pub fn new() -> Self {
16232            std::default::Default::default()
16233        }
16234
16235        /// Sets the value of [batch_soak_duration][crate::model::blue_green_settings::StandardRolloutPolicy::batch_soak_duration].
16236        pub fn set_batch_soak_duration<T>(mut self, v: T) -> Self
16237        where
16238            T: std::convert::Into<wkt::Duration>,
16239        {
16240            self.batch_soak_duration = std::option::Option::Some(v.into());
16241            self
16242        }
16243
16244        /// Sets or clears the value of [batch_soak_duration][crate::model::blue_green_settings::StandardRolloutPolicy::batch_soak_duration].
16245        pub fn set_or_clear_batch_soak_duration<T>(mut self, v: std::option::Option<T>) -> Self
16246        where
16247            T: std::convert::Into<wkt::Duration>,
16248        {
16249            self.batch_soak_duration = v.map(|x| x.into());
16250            self
16251        }
16252
16253        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size].
16254        ///
16255        /// Note that all the setters affecting `update_batch_size` are mutually
16256        /// exclusive.
16257        pub fn set_update_batch_size<
16258            T: std::convert::Into<
16259                    std::option::Option<
16260                        crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
16261                    >,
16262                >,
16263        >(
16264            mut self,
16265            v: T,
16266        ) -> Self {
16267            self.update_batch_size = v.into();
16268            self
16269        }
16270
16271        /// The value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
16272        /// if it holds a `BatchPercentage`, `None` if the field is not set or
16273        /// holds a different branch.
16274        pub fn batch_percentage(&self) -> std::option::Option<&f32> {
16275            #[allow(unreachable_patterns)]
16276            self.update_batch_size.as_ref().and_then(|v| match v {
16277                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(v) => std::option::Option::Some(v),
16278                _ => std::option::Option::None,
16279            })
16280        }
16281
16282        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
16283        /// to hold a `BatchPercentage`.
16284        ///
16285        /// Note that all the setters affecting `update_batch_size` are
16286        /// mutually exclusive.
16287        pub fn set_batch_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
16288            self.update_batch_size = std::option::Option::Some(
16289                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(
16290                    v.into()
16291                )
16292            );
16293            self
16294        }
16295
16296        /// The value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
16297        /// if it holds a `BatchNodeCount`, `None` if the field is not set or
16298        /// holds a different branch.
16299        pub fn batch_node_count(&self) -> std::option::Option<&i32> {
16300            #[allow(unreachable_patterns)]
16301            self.update_batch_size.as_ref().and_then(|v| match v {
16302                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(v) => std::option::Option::Some(v),
16303                _ => std::option::Option::None,
16304            })
16305        }
16306
16307        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
16308        /// to hold a `BatchNodeCount`.
16309        ///
16310        /// Note that all the setters affecting `update_batch_size` are
16311        /// mutually exclusive.
16312        pub fn set_batch_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16313            self.update_batch_size = std::option::Option::Some(
16314                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(
16315                    v.into()
16316                )
16317            );
16318            self
16319        }
16320    }
16321
16322    impl wkt::message::Message for StandardRolloutPolicy {
16323        fn typename() -> &'static str {
16324            "type.googleapis.com/google.container.v1.BlueGreenSettings.StandardRolloutPolicy"
16325        }
16326    }
16327
16328    /// Defines additional types related to [StandardRolloutPolicy].
16329    pub mod standard_rollout_policy {
16330        #[allow(unused_imports)]
16331        use super::*;
16332
16333        /// Blue pool size to drain in a batch.
16334        #[derive(Clone, Debug, PartialEq)]
16335        #[non_exhaustive]
16336        pub enum UpdateBatchSize {
16337            /// Percentage of the blue pool nodes to drain in a batch.
16338            /// The range of this field should be (0.0, 1.0].
16339            BatchPercentage(f32),
16340            /// Number of blue nodes to drain in a batch.
16341            BatchNodeCount(i32),
16342        }
16343    }
16344
16345    /// Autoscaled rollout policy utilizes the cluster autoscaler during
16346    /// blue-green upgrade to scale both the blue and green pools.
16347    #[derive(Clone, Default, PartialEq)]
16348    #[non_exhaustive]
16349    pub struct AutoscaledRolloutPolicy {
16350        /// Optional. Time to wait after cordoning the blue pool before draining the
16351        /// nodes. Defaults to 3 days. The value can be set between 0 and 7 days,
16352        /// inclusive.
16353        pub wait_for_drain_duration: std::option::Option<wkt::Duration>,
16354
16355        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16356    }
16357
16358    impl AutoscaledRolloutPolicy {
16359        pub fn new() -> Self {
16360            std::default::Default::default()
16361        }
16362
16363        /// Sets the value of [wait_for_drain_duration][crate::model::blue_green_settings::AutoscaledRolloutPolicy::wait_for_drain_duration].
16364        pub fn set_wait_for_drain_duration<T>(mut self, v: T) -> Self
16365        where
16366            T: std::convert::Into<wkt::Duration>,
16367        {
16368            self.wait_for_drain_duration = std::option::Option::Some(v.into());
16369            self
16370        }
16371
16372        /// Sets or clears the value of [wait_for_drain_duration][crate::model::blue_green_settings::AutoscaledRolloutPolicy::wait_for_drain_duration].
16373        pub fn set_or_clear_wait_for_drain_duration<T>(mut self, v: std::option::Option<T>) -> Self
16374        where
16375            T: std::convert::Into<wkt::Duration>,
16376        {
16377            self.wait_for_drain_duration = v.map(|x| x.into());
16378            self
16379        }
16380    }
16381
16382    impl wkt::message::Message for AutoscaledRolloutPolicy {
16383        fn typename() -> &'static str {
16384            "type.googleapis.com/google.container.v1.BlueGreenSettings.AutoscaledRolloutPolicy"
16385        }
16386    }
16387
16388    /// The rollout policy controls the general rollout progress of blue-green.
16389    #[derive(Clone, Debug, PartialEq)]
16390    #[non_exhaustive]
16391    pub enum RolloutPolicy {
16392        /// Standard policy for the blue-green upgrade.
16393        StandardRolloutPolicy(
16394            std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
16395        ),
16396        /// Autoscaled policy for cluster autoscaler enabled blue-green upgrade.
16397        AutoscaledRolloutPolicy(
16398            std::boxed::Box<crate::model::blue_green_settings::AutoscaledRolloutPolicy>,
16399        ),
16400    }
16401}
16402
16403/// NodePool contains the name and configuration for a cluster's node pool.
16404/// Node pools are a set of nodes (i.e. VM's), with a common configuration and
16405/// specification, under the control of the cluster master. They may have a set
16406/// of Kubernetes labels applied to them, which may be used to reference them
16407/// during pod scheduling. They may also be resized up or down, to accommodate
16408/// the workload.
16409#[derive(Clone, Default, PartialEq)]
16410#[non_exhaustive]
16411pub struct NodePool {
16412    /// The name of the node pool.
16413    pub name: std::string::String,
16414
16415    /// The node configuration of the pool.
16416    pub config: std::option::Option<crate::model::NodeConfig>,
16417
16418    /// The initial node count for the pool. You must ensure that your
16419    /// Compute Engine [resource
16420    /// quota](https://cloud.google.com/compute/quotas)
16421    /// is sufficient for this number of instances. You must also have available
16422    /// firewall and routes quota.
16423    pub initial_node_count: i32,
16424
16425    /// The list of Google Compute Engine
16426    /// [zones](https://cloud.google.com/compute/docs/zones#available)
16427    /// in which the NodePool's nodes should be located.
16428    ///
16429    /// If this value is unspecified during node pool creation, the
16430    /// [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations)
16431    /// value will be used, instead.
16432    ///
16433    /// Warning: changing node pool locations will result in nodes being added
16434    /// and/or removed.
16435    pub locations: std::vec::Vec<std::string::String>,
16436
16437    /// Networking configuration for this NodePool. If specified, it overrides the
16438    /// cluster-level defaults.
16439    pub network_config: std::option::Option<crate::model::NodeNetworkConfig>,
16440
16441    /// Output only. Server-defined URL for the resource.
16442    pub self_link: std::string::String,
16443
16444    /// The version of Kubernetes running on this NodePool's nodes. If unspecified,
16445    /// it defaults as described
16446    /// [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version).
16447    pub version: std::string::String,
16448
16449    /// Output only. The resource URLs of the [managed instance
16450    /// groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances)
16451    /// associated with this node pool.
16452    /// During the node pool blue-green upgrade operation, the URLs contain both
16453    /// blue and green resources.
16454    pub instance_group_urls: std::vec::Vec<std::string::String>,
16455
16456    /// Output only. The status of the nodes in this pool instance.
16457    pub status: crate::model::node_pool::Status,
16458
16459    /// Output only. Deprecated. Use conditions instead.
16460    /// Additional information about the current status of this
16461    /// node pool instance, if available.
16462    #[deprecated]
16463    pub status_message: std::string::String,
16464
16465    /// Autoscaler configuration for this NodePool. Autoscaler is enabled
16466    /// only if a valid configuration is present.
16467    pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
16468
16469    /// NodeManagement configuration for this NodePool.
16470    pub management: std::option::Option<crate::model::NodeManagement>,
16471
16472    /// The constraint on the maximum number of pods that can be run
16473    /// simultaneously on a node in the node pool.
16474    pub max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
16475
16476    /// Which conditions caused the current node pool state.
16477    pub conditions: std::vec::Vec<crate::model::StatusCondition>,
16478
16479    /// Output only. The pod CIDR block size per node in this node pool.
16480    pub pod_ipv4_cidr_size: i32,
16481
16482    /// Upgrade settings control disruption and speed of the upgrade.
16483    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
16484
16485    /// Specifies the node placement policy.
16486    pub placement_policy: std::option::Option<crate::model::node_pool::PlacementPolicy>,
16487
16488    /// Output only. Update info contains relevant information during a node
16489    /// pool update.
16490    pub update_info: std::option::Option<crate::model::node_pool::UpdateInfo>,
16491
16492    /// This checksum is computed by the server based on the value of node pool
16493    /// fields, and may be sent on update requests to ensure the client has an
16494    /// up-to-date value before proceeding.
16495    pub etag: std::string::String,
16496
16497    /// Specifies the configuration of queued provisioning.
16498    pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
16499
16500    /// Enable best effort provisioning for nodes
16501    pub best_effort_provisioning: std::option::Option<crate::model::BestEffortProvisioning>,
16502
16503    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16504}
16505
16506impl NodePool {
16507    pub fn new() -> Self {
16508        std::default::Default::default()
16509    }
16510
16511    /// Sets the value of [name][crate::model::NodePool::name].
16512    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16513        self.name = v.into();
16514        self
16515    }
16516
16517    /// Sets the value of [config][crate::model::NodePool::config].
16518    pub fn set_config<T>(mut self, v: T) -> Self
16519    where
16520        T: std::convert::Into<crate::model::NodeConfig>,
16521    {
16522        self.config = std::option::Option::Some(v.into());
16523        self
16524    }
16525
16526    /// Sets or clears the value of [config][crate::model::NodePool::config].
16527    pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
16528    where
16529        T: std::convert::Into<crate::model::NodeConfig>,
16530    {
16531        self.config = v.map(|x| x.into());
16532        self
16533    }
16534
16535    /// Sets the value of [initial_node_count][crate::model::NodePool::initial_node_count].
16536    pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16537        self.initial_node_count = v.into();
16538        self
16539    }
16540
16541    /// Sets the value of [locations][crate::model::NodePool::locations].
16542    pub fn set_locations<T, V>(mut self, v: T) -> Self
16543    where
16544        T: std::iter::IntoIterator<Item = V>,
16545        V: std::convert::Into<std::string::String>,
16546    {
16547        use std::iter::Iterator;
16548        self.locations = v.into_iter().map(|i| i.into()).collect();
16549        self
16550    }
16551
16552    /// Sets the value of [network_config][crate::model::NodePool::network_config].
16553    pub fn set_network_config<T>(mut self, v: T) -> Self
16554    where
16555        T: std::convert::Into<crate::model::NodeNetworkConfig>,
16556    {
16557        self.network_config = std::option::Option::Some(v.into());
16558        self
16559    }
16560
16561    /// Sets or clears the value of [network_config][crate::model::NodePool::network_config].
16562    pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
16563    where
16564        T: std::convert::Into<crate::model::NodeNetworkConfig>,
16565    {
16566        self.network_config = v.map(|x| x.into());
16567        self
16568    }
16569
16570    /// Sets the value of [self_link][crate::model::NodePool::self_link].
16571    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16572        self.self_link = v.into();
16573        self
16574    }
16575
16576    /// Sets the value of [version][crate::model::NodePool::version].
16577    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16578        self.version = v.into();
16579        self
16580    }
16581
16582    /// Sets the value of [instance_group_urls][crate::model::NodePool::instance_group_urls].
16583    pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
16584    where
16585        T: std::iter::IntoIterator<Item = V>,
16586        V: std::convert::Into<std::string::String>,
16587    {
16588        use std::iter::Iterator;
16589        self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
16590        self
16591    }
16592
16593    /// Sets the value of [status][crate::model::NodePool::status].
16594    pub fn set_status<T: std::convert::Into<crate::model::node_pool::Status>>(
16595        mut self,
16596        v: T,
16597    ) -> Self {
16598        self.status = v.into();
16599        self
16600    }
16601
16602    /// Sets the value of [status_message][crate::model::NodePool::status_message].
16603    #[deprecated]
16604    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16605        self.status_message = v.into();
16606        self
16607    }
16608
16609    /// Sets the value of [autoscaling][crate::model::NodePool::autoscaling].
16610    pub fn set_autoscaling<T>(mut self, v: T) -> Self
16611    where
16612        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
16613    {
16614        self.autoscaling = std::option::Option::Some(v.into());
16615        self
16616    }
16617
16618    /// Sets or clears the value of [autoscaling][crate::model::NodePool::autoscaling].
16619    pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
16620    where
16621        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
16622    {
16623        self.autoscaling = v.map(|x| x.into());
16624        self
16625    }
16626
16627    /// Sets the value of [management][crate::model::NodePool::management].
16628    pub fn set_management<T>(mut self, v: T) -> Self
16629    where
16630        T: std::convert::Into<crate::model::NodeManagement>,
16631    {
16632        self.management = std::option::Option::Some(v.into());
16633        self
16634    }
16635
16636    /// Sets or clears the value of [management][crate::model::NodePool::management].
16637    pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
16638    where
16639        T: std::convert::Into<crate::model::NodeManagement>,
16640    {
16641        self.management = v.map(|x| x.into());
16642        self
16643    }
16644
16645    /// Sets the value of [max_pods_constraint][crate::model::NodePool::max_pods_constraint].
16646    pub fn set_max_pods_constraint<T>(mut self, v: T) -> Self
16647    where
16648        T: std::convert::Into<crate::model::MaxPodsConstraint>,
16649    {
16650        self.max_pods_constraint = std::option::Option::Some(v.into());
16651        self
16652    }
16653
16654    /// Sets or clears the value of [max_pods_constraint][crate::model::NodePool::max_pods_constraint].
16655    pub fn set_or_clear_max_pods_constraint<T>(mut self, v: std::option::Option<T>) -> Self
16656    where
16657        T: std::convert::Into<crate::model::MaxPodsConstraint>,
16658    {
16659        self.max_pods_constraint = v.map(|x| x.into());
16660        self
16661    }
16662
16663    /// Sets the value of [conditions][crate::model::NodePool::conditions].
16664    pub fn set_conditions<T, V>(mut self, v: T) -> Self
16665    where
16666        T: std::iter::IntoIterator<Item = V>,
16667        V: std::convert::Into<crate::model::StatusCondition>,
16668    {
16669        use std::iter::Iterator;
16670        self.conditions = v.into_iter().map(|i| i.into()).collect();
16671        self
16672    }
16673
16674    /// Sets the value of [pod_ipv4_cidr_size][crate::model::NodePool::pod_ipv4_cidr_size].
16675    pub fn set_pod_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16676        self.pod_ipv4_cidr_size = v.into();
16677        self
16678    }
16679
16680    /// Sets the value of [upgrade_settings][crate::model::NodePool::upgrade_settings].
16681    pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
16682    where
16683        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
16684    {
16685        self.upgrade_settings = std::option::Option::Some(v.into());
16686        self
16687    }
16688
16689    /// Sets or clears the value of [upgrade_settings][crate::model::NodePool::upgrade_settings].
16690    pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
16691    where
16692        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
16693    {
16694        self.upgrade_settings = v.map(|x| x.into());
16695        self
16696    }
16697
16698    /// Sets the value of [placement_policy][crate::model::NodePool::placement_policy].
16699    pub fn set_placement_policy<T>(mut self, v: T) -> Self
16700    where
16701        T: std::convert::Into<crate::model::node_pool::PlacementPolicy>,
16702    {
16703        self.placement_policy = std::option::Option::Some(v.into());
16704        self
16705    }
16706
16707    /// Sets or clears the value of [placement_policy][crate::model::NodePool::placement_policy].
16708    pub fn set_or_clear_placement_policy<T>(mut self, v: std::option::Option<T>) -> Self
16709    where
16710        T: std::convert::Into<crate::model::node_pool::PlacementPolicy>,
16711    {
16712        self.placement_policy = v.map(|x| x.into());
16713        self
16714    }
16715
16716    /// Sets the value of [update_info][crate::model::NodePool::update_info].
16717    pub fn set_update_info<T>(mut self, v: T) -> Self
16718    where
16719        T: std::convert::Into<crate::model::node_pool::UpdateInfo>,
16720    {
16721        self.update_info = std::option::Option::Some(v.into());
16722        self
16723    }
16724
16725    /// Sets or clears the value of [update_info][crate::model::NodePool::update_info].
16726    pub fn set_or_clear_update_info<T>(mut self, v: std::option::Option<T>) -> Self
16727    where
16728        T: std::convert::Into<crate::model::node_pool::UpdateInfo>,
16729    {
16730        self.update_info = v.map(|x| x.into());
16731        self
16732    }
16733
16734    /// Sets the value of [etag][crate::model::NodePool::etag].
16735    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16736        self.etag = v.into();
16737        self
16738    }
16739
16740    /// Sets the value of [queued_provisioning][crate::model::NodePool::queued_provisioning].
16741    pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
16742    where
16743        T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
16744    {
16745        self.queued_provisioning = std::option::Option::Some(v.into());
16746        self
16747    }
16748
16749    /// Sets or clears the value of [queued_provisioning][crate::model::NodePool::queued_provisioning].
16750    pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
16751    where
16752        T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
16753    {
16754        self.queued_provisioning = v.map(|x| x.into());
16755        self
16756    }
16757
16758    /// Sets the value of [best_effort_provisioning][crate::model::NodePool::best_effort_provisioning].
16759    pub fn set_best_effort_provisioning<T>(mut self, v: T) -> Self
16760    where
16761        T: std::convert::Into<crate::model::BestEffortProvisioning>,
16762    {
16763        self.best_effort_provisioning = std::option::Option::Some(v.into());
16764        self
16765    }
16766
16767    /// Sets or clears the value of [best_effort_provisioning][crate::model::NodePool::best_effort_provisioning].
16768    pub fn set_or_clear_best_effort_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
16769    where
16770        T: std::convert::Into<crate::model::BestEffortProvisioning>,
16771    {
16772        self.best_effort_provisioning = v.map(|x| x.into());
16773        self
16774    }
16775}
16776
16777impl wkt::message::Message for NodePool {
16778    fn typename() -> &'static str {
16779        "type.googleapis.com/google.container.v1.NodePool"
16780    }
16781}
16782
16783/// Defines additional types related to [NodePool].
16784pub mod node_pool {
16785    #[allow(unused_imports)]
16786    use super::*;
16787
16788    /// These upgrade settings control the level of parallelism and the level of
16789    /// disruption caused by an upgrade.
16790    ///
16791    /// maxUnavailable controls the number of nodes that can be simultaneously
16792    /// unavailable.
16793    ///
16794    /// maxSurge controls the number of additional nodes that can be added to the
16795    /// node pool temporarily for the time of the upgrade to increase the number of
16796    /// available nodes.
16797    ///
16798    /// (maxUnavailable + maxSurge) determines the level of parallelism (how many
16799    /// nodes are being upgraded at the same time).
16800    ///
16801    /// Note: upgrades inevitably introduce some disruption since workloads need to
16802    /// be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0,
16803    /// this holds true. (Disruption stays within the limits of
16804    /// PodDisruptionBudget, if it is configured.)
16805    ///
16806    /// Consider a hypothetical node pool with 5 nodes having maxSurge=2,
16807    /// maxUnavailable=1. This means the upgrade process upgrades 3 nodes
16808    /// simultaneously. It creates 2 additional (upgraded) nodes, then it brings
16809    /// down 3 old (not yet upgraded) nodes at the same time. This ensures that
16810    /// there are always at least 4 nodes available.
16811    ///
16812    /// These upgrade settings configure the upgrade strategy for the node pool.
16813    /// Use strategy to switch between the strategies applied to the node pool.
16814    ///
16815    /// If the strategy is ROLLING, use max_surge and max_unavailable to control
16816    /// the level of parallelism and the level of disruption caused by upgrade.
16817    ///
16818    /// 1. maxSurge controls the number of additional nodes that can be added to
16819    ///    the node pool temporarily for the time of the upgrade to increase the
16820    ///    number of available nodes.
16821    /// 1. maxUnavailable controls the number of nodes that can be simultaneously
16822    ///    unavailable.
16823    /// 1. (maxUnavailable + maxSurge) determines the level of parallelism (how
16824    ///    many nodes are being upgraded at the same time).
16825    ///
16826    /// If the strategy is BLUE_GREEN, use blue_green_settings to configure the
16827    /// blue-green upgrade related settings.
16828    ///
16829    /// 1. standard_rollout_policy is the default policy. The policy is used to
16830    ///    control the way blue pool gets drained. The draining is executed in the
16831    ///    batch mode. The batch size could be specified as either percentage of the
16832    ///    node pool size or the number of nodes. batch_soak_duration is the soak
16833    ///    time after each batch gets drained.
16834    /// 1. node_pool_soak_duration is the soak time after all blue nodes are
16835    ///    drained. After this period, the blue pool nodes will be deleted.
16836    #[derive(Clone, Default, PartialEq)]
16837    #[non_exhaustive]
16838    pub struct UpgradeSettings {
16839        /// The maximum number of nodes that can be created beyond the current size
16840        /// of the node pool during the upgrade process.
16841        pub max_surge: i32,
16842
16843        /// The maximum number of nodes that can be simultaneously unavailable during
16844        /// the upgrade process. A node is considered available if its status is
16845        /// Ready.
16846        pub max_unavailable: i32,
16847
16848        /// Update strategy of the node pool.
16849        pub strategy: std::option::Option<crate::model::NodePoolUpdateStrategy>,
16850
16851        /// Settings for blue-green upgrade strategy.
16852        pub blue_green_settings: std::option::Option<crate::model::BlueGreenSettings>,
16853
16854        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16855    }
16856
16857    impl UpgradeSettings {
16858        pub fn new() -> Self {
16859            std::default::Default::default()
16860        }
16861
16862        /// Sets the value of [max_surge][crate::model::node_pool::UpgradeSettings::max_surge].
16863        pub fn set_max_surge<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16864            self.max_surge = v.into();
16865            self
16866        }
16867
16868        /// Sets the value of [max_unavailable][crate::model::node_pool::UpgradeSettings::max_unavailable].
16869        pub fn set_max_unavailable<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16870            self.max_unavailable = v.into();
16871            self
16872        }
16873
16874        /// Sets the value of [strategy][crate::model::node_pool::UpgradeSettings::strategy].
16875        pub fn set_strategy<T>(mut self, v: T) -> Self
16876        where
16877            T: std::convert::Into<crate::model::NodePoolUpdateStrategy>,
16878        {
16879            self.strategy = std::option::Option::Some(v.into());
16880            self
16881        }
16882
16883        /// Sets or clears the value of [strategy][crate::model::node_pool::UpgradeSettings::strategy].
16884        pub fn set_or_clear_strategy<T>(mut self, v: std::option::Option<T>) -> Self
16885        where
16886            T: std::convert::Into<crate::model::NodePoolUpdateStrategy>,
16887        {
16888            self.strategy = v.map(|x| x.into());
16889            self
16890        }
16891
16892        /// Sets the value of [blue_green_settings][crate::model::node_pool::UpgradeSettings::blue_green_settings].
16893        pub fn set_blue_green_settings<T>(mut self, v: T) -> Self
16894        where
16895            T: std::convert::Into<crate::model::BlueGreenSettings>,
16896        {
16897            self.blue_green_settings = std::option::Option::Some(v.into());
16898            self
16899        }
16900
16901        /// Sets or clears the value of [blue_green_settings][crate::model::node_pool::UpgradeSettings::blue_green_settings].
16902        pub fn set_or_clear_blue_green_settings<T>(mut self, v: std::option::Option<T>) -> Self
16903        where
16904            T: std::convert::Into<crate::model::BlueGreenSettings>,
16905        {
16906            self.blue_green_settings = v.map(|x| x.into());
16907            self
16908        }
16909    }
16910
16911    impl wkt::message::Message for UpgradeSettings {
16912        fn typename() -> &'static str {
16913            "type.googleapis.com/google.container.v1.NodePool.UpgradeSettings"
16914        }
16915    }
16916
16917    /// UpdateInfo contains resource (instance groups, etc), status and other
16918    /// intermediate information relevant to a node pool upgrade.
16919    #[derive(Clone, Default, PartialEq)]
16920    #[non_exhaustive]
16921    pub struct UpdateInfo {
16922        /// Information of a blue-green upgrade.
16923        pub blue_green_info:
16924            std::option::Option<crate::model::node_pool::update_info::BlueGreenInfo>,
16925
16926        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16927    }
16928
16929    impl UpdateInfo {
16930        pub fn new() -> Self {
16931            std::default::Default::default()
16932        }
16933
16934        /// Sets the value of [blue_green_info][crate::model::node_pool::UpdateInfo::blue_green_info].
16935        pub fn set_blue_green_info<T>(mut self, v: T) -> Self
16936        where
16937            T: std::convert::Into<crate::model::node_pool::update_info::BlueGreenInfo>,
16938        {
16939            self.blue_green_info = std::option::Option::Some(v.into());
16940            self
16941        }
16942
16943        /// Sets or clears the value of [blue_green_info][crate::model::node_pool::UpdateInfo::blue_green_info].
16944        pub fn set_or_clear_blue_green_info<T>(mut self, v: std::option::Option<T>) -> Self
16945        where
16946            T: std::convert::Into<crate::model::node_pool::update_info::BlueGreenInfo>,
16947        {
16948            self.blue_green_info = v.map(|x| x.into());
16949            self
16950        }
16951    }
16952
16953    impl wkt::message::Message for UpdateInfo {
16954        fn typename() -> &'static str {
16955            "type.googleapis.com/google.container.v1.NodePool.UpdateInfo"
16956        }
16957    }
16958
16959    /// Defines additional types related to [UpdateInfo].
16960    pub mod update_info {
16961        #[allow(unused_imports)]
16962        use super::*;
16963
16964        /// Information relevant to blue-green upgrade.
16965        #[derive(Clone, Default, PartialEq)]
16966        #[non_exhaustive]
16967        pub struct BlueGreenInfo {
16968            /// Current blue-green upgrade phase.
16969            pub phase: crate::model::node_pool::update_info::blue_green_info::Phase,
16970
16971            /// The resource URLs of the [managed instance groups]
16972            /// (/compute/docs/instance-groups/creating-groups-of-managed-instances)
16973            /// associated with blue pool.
16974            pub blue_instance_group_urls: std::vec::Vec<std::string::String>,
16975
16976            /// The resource URLs of the [managed instance groups]
16977            /// (/compute/docs/instance-groups/creating-groups-of-managed-instances)
16978            /// associated with green pool.
16979            pub green_instance_group_urls: std::vec::Vec<std::string::String>,
16980
16981            /// Time to start deleting blue pool to complete blue-green upgrade,
16982            /// in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
16983            pub blue_pool_deletion_start_time: std::string::String,
16984
16985            /// Version of green pool.
16986            pub green_pool_version: std::string::String,
16987
16988            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16989        }
16990
16991        impl BlueGreenInfo {
16992            pub fn new() -> Self {
16993                std::default::Default::default()
16994            }
16995
16996            /// Sets the value of [phase][crate::model::node_pool::update_info::BlueGreenInfo::phase].
16997            pub fn set_phase<
16998                T: std::convert::Into<crate::model::node_pool::update_info::blue_green_info::Phase>,
16999            >(
17000                mut self,
17001                v: T,
17002            ) -> Self {
17003                self.phase = v.into();
17004                self
17005            }
17006
17007            /// Sets the value of [blue_instance_group_urls][crate::model::node_pool::update_info::BlueGreenInfo::blue_instance_group_urls].
17008            pub fn set_blue_instance_group_urls<T, V>(mut self, v: T) -> Self
17009            where
17010                T: std::iter::IntoIterator<Item = V>,
17011                V: std::convert::Into<std::string::String>,
17012            {
17013                use std::iter::Iterator;
17014                self.blue_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
17015                self
17016            }
17017
17018            /// Sets the value of [green_instance_group_urls][crate::model::node_pool::update_info::BlueGreenInfo::green_instance_group_urls].
17019            pub fn set_green_instance_group_urls<T, V>(mut self, v: T) -> Self
17020            where
17021                T: std::iter::IntoIterator<Item = V>,
17022                V: std::convert::Into<std::string::String>,
17023            {
17024                use std::iter::Iterator;
17025                self.green_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
17026                self
17027            }
17028
17029            /// Sets the value of [blue_pool_deletion_start_time][crate::model::node_pool::update_info::BlueGreenInfo::blue_pool_deletion_start_time].
17030            pub fn set_blue_pool_deletion_start_time<T: std::convert::Into<std::string::String>>(
17031                mut self,
17032                v: T,
17033            ) -> Self {
17034                self.blue_pool_deletion_start_time = v.into();
17035                self
17036            }
17037
17038            /// Sets the value of [green_pool_version][crate::model::node_pool::update_info::BlueGreenInfo::green_pool_version].
17039            pub fn set_green_pool_version<T: std::convert::Into<std::string::String>>(
17040                mut self,
17041                v: T,
17042            ) -> Self {
17043                self.green_pool_version = v.into();
17044                self
17045            }
17046        }
17047
17048        impl wkt::message::Message for BlueGreenInfo {
17049            fn typename() -> &'static str {
17050                "type.googleapis.com/google.container.v1.NodePool.UpdateInfo.BlueGreenInfo"
17051            }
17052        }
17053
17054        /// Defines additional types related to [BlueGreenInfo].
17055        pub mod blue_green_info {
17056            #[allow(unused_imports)]
17057            use super::*;
17058
17059            /// Phase represents the different stages blue-green upgrade is running in.
17060            ///
17061            /// # Working with unknown values
17062            ///
17063            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17064            /// additional enum variants at any time. Adding new variants is not considered
17065            /// a breaking change. Applications should write their code in anticipation of:
17066            ///
17067            /// - New values appearing in future releases of the client library, **and**
17068            /// - New values received dynamically, without application changes.
17069            ///
17070            /// Please consult the [Working with enums] section in the user guide for some
17071            /// guidelines.
17072            ///
17073            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17074            #[derive(Clone, Debug, PartialEq)]
17075            #[non_exhaustive]
17076            pub enum Phase {
17077                /// Unspecified phase.
17078                Unspecified,
17079                /// blue-green upgrade has been initiated.
17080                UpdateStarted,
17081                /// Start creating green pool nodes.
17082                CreatingGreenPool,
17083                /// Start cordoning blue pool nodes.
17084                CordoningBluePool,
17085                /// Start draining blue pool nodes.
17086                DrainingBluePool,
17087                /// Start soaking time after draining entire blue pool.
17088                NodePoolSoaking,
17089                /// Start deleting blue nodes.
17090                DeletingBluePool,
17091                /// Rollback has been initiated.
17092                RollbackStarted,
17093                /// If set, the enum was initialized with an unknown value.
17094                ///
17095                /// Applications can examine the value using [Phase::value] or
17096                /// [Phase::name].
17097                UnknownValue(phase::UnknownValue),
17098            }
17099
17100            #[doc(hidden)]
17101            pub mod phase {
17102                #[allow(unused_imports)]
17103                use super::*;
17104                #[derive(Clone, Debug, PartialEq)]
17105                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17106            }
17107
17108            impl Phase {
17109                /// Gets the enum value.
17110                ///
17111                /// Returns `None` if the enum contains an unknown value deserialized from
17112                /// the string representation of enums.
17113                pub fn value(&self) -> std::option::Option<i32> {
17114                    match self {
17115                        Self::Unspecified => std::option::Option::Some(0),
17116                        Self::UpdateStarted => std::option::Option::Some(1),
17117                        Self::CreatingGreenPool => std::option::Option::Some(2),
17118                        Self::CordoningBluePool => std::option::Option::Some(3),
17119                        Self::DrainingBluePool => std::option::Option::Some(4),
17120                        Self::NodePoolSoaking => std::option::Option::Some(5),
17121                        Self::DeletingBluePool => std::option::Option::Some(6),
17122                        Self::RollbackStarted => std::option::Option::Some(7),
17123                        Self::UnknownValue(u) => u.0.value(),
17124                    }
17125                }
17126
17127                /// Gets the enum value as a string.
17128                ///
17129                /// Returns `None` if the enum contains an unknown value deserialized from
17130                /// the integer representation of enums.
17131                pub fn name(&self) -> std::option::Option<&str> {
17132                    match self {
17133                        Self::Unspecified => std::option::Option::Some("PHASE_UNSPECIFIED"),
17134                        Self::UpdateStarted => std::option::Option::Some("UPDATE_STARTED"),
17135                        Self::CreatingGreenPool => std::option::Option::Some("CREATING_GREEN_POOL"),
17136                        Self::CordoningBluePool => std::option::Option::Some("CORDONING_BLUE_POOL"),
17137                        Self::DrainingBluePool => std::option::Option::Some("DRAINING_BLUE_POOL"),
17138                        Self::NodePoolSoaking => std::option::Option::Some("NODE_POOL_SOAKING"),
17139                        Self::DeletingBluePool => std::option::Option::Some("DELETING_BLUE_POOL"),
17140                        Self::RollbackStarted => std::option::Option::Some("ROLLBACK_STARTED"),
17141                        Self::UnknownValue(u) => u.0.name(),
17142                    }
17143                }
17144            }
17145
17146            impl std::default::Default for Phase {
17147                fn default() -> Self {
17148                    use std::convert::From;
17149                    Self::from(0)
17150                }
17151            }
17152
17153            impl std::fmt::Display for Phase {
17154                fn fmt(
17155                    &self,
17156                    f: &mut std::fmt::Formatter<'_>,
17157                ) -> std::result::Result<(), std::fmt::Error> {
17158                    wkt::internal::display_enum(f, self.name(), self.value())
17159                }
17160            }
17161
17162            impl std::convert::From<i32> for Phase {
17163                fn from(value: i32) -> Self {
17164                    match value {
17165                        0 => Self::Unspecified,
17166                        1 => Self::UpdateStarted,
17167                        2 => Self::CreatingGreenPool,
17168                        3 => Self::CordoningBluePool,
17169                        4 => Self::DrainingBluePool,
17170                        5 => Self::NodePoolSoaking,
17171                        6 => Self::DeletingBluePool,
17172                        7 => Self::RollbackStarted,
17173                        _ => Self::UnknownValue(phase::UnknownValue(
17174                            wkt::internal::UnknownEnumValue::Integer(value),
17175                        )),
17176                    }
17177                }
17178            }
17179
17180            impl std::convert::From<&str> for Phase {
17181                fn from(value: &str) -> Self {
17182                    use std::string::ToString;
17183                    match value {
17184                        "PHASE_UNSPECIFIED" => Self::Unspecified,
17185                        "UPDATE_STARTED" => Self::UpdateStarted,
17186                        "CREATING_GREEN_POOL" => Self::CreatingGreenPool,
17187                        "CORDONING_BLUE_POOL" => Self::CordoningBluePool,
17188                        "DRAINING_BLUE_POOL" => Self::DrainingBluePool,
17189                        "NODE_POOL_SOAKING" => Self::NodePoolSoaking,
17190                        "DELETING_BLUE_POOL" => Self::DeletingBluePool,
17191                        "ROLLBACK_STARTED" => Self::RollbackStarted,
17192                        _ => Self::UnknownValue(phase::UnknownValue(
17193                            wkt::internal::UnknownEnumValue::String(value.to_string()),
17194                        )),
17195                    }
17196                }
17197            }
17198
17199            impl serde::ser::Serialize for Phase {
17200                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17201                where
17202                    S: serde::Serializer,
17203                {
17204                    match self {
17205                        Self::Unspecified => serializer.serialize_i32(0),
17206                        Self::UpdateStarted => serializer.serialize_i32(1),
17207                        Self::CreatingGreenPool => serializer.serialize_i32(2),
17208                        Self::CordoningBluePool => serializer.serialize_i32(3),
17209                        Self::DrainingBluePool => serializer.serialize_i32(4),
17210                        Self::NodePoolSoaking => serializer.serialize_i32(5),
17211                        Self::DeletingBluePool => serializer.serialize_i32(6),
17212                        Self::RollbackStarted => serializer.serialize_i32(7),
17213                        Self::UnknownValue(u) => u.0.serialize(serializer),
17214                    }
17215                }
17216            }
17217
17218            impl<'de> serde::de::Deserialize<'de> for Phase {
17219                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17220                where
17221                    D: serde::Deserializer<'de>,
17222                {
17223                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<Phase>::new(
17224                        ".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase",
17225                    ))
17226                }
17227            }
17228        }
17229    }
17230
17231    /// PlacementPolicy defines the placement policy used by the node pool.
17232    #[derive(Clone, Default, PartialEq)]
17233    #[non_exhaustive]
17234    pub struct PlacementPolicy {
17235        /// The type of placement.
17236        pub r#type: crate::model::node_pool::placement_policy::Type,
17237
17238        /// Optional. TPU placement topology for pod slice node pool.
17239        /// <https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies>
17240        pub tpu_topology: std::string::String,
17241
17242        /// If set, refers to the name of a custom resource policy supplied by the
17243        /// user. The resource policy must be in the same project and region as the
17244        /// node pool. If not found, InvalidArgument error is returned.
17245        pub policy_name: std::string::String,
17246
17247        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17248    }
17249
17250    impl PlacementPolicy {
17251        pub fn new() -> Self {
17252            std::default::Default::default()
17253        }
17254
17255        /// Sets the value of [r#type][crate::model::node_pool::PlacementPolicy::type].
17256        pub fn set_type<T: std::convert::Into<crate::model::node_pool::placement_policy::Type>>(
17257            mut self,
17258            v: T,
17259        ) -> Self {
17260            self.r#type = v.into();
17261            self
17262        }
17263
17264        /// Sets the value of [tpu_topology][crate::model::node_pool::PlacementPolicy::tpu_topology].
17265        pub fn set_tpu_topology<T: std::convert::Into<std::string::String>>(
17266            mut self,
17267            v: T,
17268        ) -> Self {
17269            self.tpu_topology = v.into();
17270            self
17271        }
17272
17273        /// Sets the value of [policy_name][crate::model::node_pool::PlacementPolicy::policy_name].
17274        pub fn set_policy_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17275            self.policy_name = v.into();
17276            self
17277        }
17278    }
17279
17280    impl wkt::message::Message for PlacementPolicy {
17281        fn typename() -> &'static str {
17282            "type.googleapis.com/google.container.v1.NodePool.PlacementPolicy"
17283        }
17284    }
17285
17286    /// Defines additional types related to [PlacementPolicy].
17287    pub mod placement_policy {
17288        #[allow(unused_imports)]
17289        use super::*;
17290
17291        /// Type defines the type of placement policy.
17292        ///
17293        /// # Working with unknown values
17294        ///
17295        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17296        /// additional enum variants at any time. Adding new variants is not considered
17297        /// a breaking change. Applications should write their code in anticipation of:
17298        ///
17299        /// - New values appearing in future releases of the client library, **and**
17300        /// - New values received dynamically, without application changes.
17301        ///
17302        /// Please consult the [Working with enums] section in the user guide for some
17303        /// guidelines.
17304        ///
17305        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17306        #[derive(Clone, Debug, PartialEq)]
17307        #[non_exhaustive]
17308        pub enum Type {
17309            /// TYPE_UNSPECIFIED specifies no requirements on nodes
17310            /// placement.
17311            Unspecified,
17312            /// COMPACT specifies node placement in the same availability domain to
17313            /// ensure low communication latency.
17314            Compact,
17315            /// If set, the enum was initialized with an unknown value.
17316            ///
17317            /// Applications can examine the value using [Type::value] or
17318            /// [Type::name].
17319            UnknownValue(r#type::UnknownValue),
17320        }
17321
17322        #[doc(hidden)]
17323        pub mod r#type {
17324            #[allow(unused_imports)]
17325            use super::*;
17326            #[derive(Clone, Debug, PartialEq)]
17327            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17328        }
17329
17330        impl Type {
17331            /// Gets the enum value.
17332            ///
17333            /// Returns `None` if the enum contains an unknown value deserialized from
17334            /// the string representation of enums.
17335            pub fn value(&self) -> std::option::Option<i32> {
17336                match self {
17337                    Self::Unspecified => std::option::Option::Some(0),
17338                    Self::Compact => std::option::Option::Some(1),
17339                    Self::UnknownValue(u) => u.0.value(),
17340                }
17341            }
17342
17343            /// Gets the enum value as a string.
17344            ///
17345            /// Returns `None` if the enum contains an unknown value deserialized from
17346            /// the integer representation of enums.
17347            pub fn name(&self) -> std::option::Option<&str> {
17348                match self {
17349                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
17350                    Self::Compact => std::option::Option::Some("COMPACT"),
17351                    Self::UnknownValue(u) => u.0.name(),
17352                }
17353            }
17354        }
17355
17356        impl std::default::Default for Type {
17357            fn default() -> Self {
17358                use std::convert::From;
17359                Self::from(0)
17360            }
17361        }
17362
17363        impl std::fmt::Display for Type {
17364            fn fmt(
17365                &self,
17366                f: &mut std::fmt::Formatter<'_>,
17367            ) -> std::result::Result<(), std::fmt::Error> {
17368                wkt::internal::display_enum(f, self.name(), self.value())
17369            }
17370        }
17371
17372        impl std::convert::From<i32> for Type {
17373            fn from(value: i32) -> Self {
17374                match value {
17375                    0 => Self::Unspecified,
17376                    1 => Self::Compact,
17377                    _ => Self::UnknownValue(r#type::UnknownValue(
17378                        wkt::internal::UnknownEnumValue::Integer(value),
17379                    )),
17380                }
17381            }
17382        }
17383
17384        impl std::convert::From<&str> for Type {
17385            fn from(value: &str) -> Self {
17386                use std::string::ToString;
17387                match value {
17388                    "TYPE_UNSPECIFIED" => Self::Unspecified,
17389                    "COMPACT" => Self::Compact,
17390                    _ => Self::UnknownValue(r#type::UnknownValue(
17391                        wkt::internal::UnknownEnumValue::String(value.to_string()),
17392                    )),
17393                }
17394            }
17395        }
17396
17397        impl serde::ser::Serialize for Type {
17398            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17399            where
17400                S: serde::Serializer,
17401            {
17402                match self {
17403                    Self::Unspecified => serializer.serialize_i32(0),
17404                    Self::Compact => serializer.serialize_i32(1),
17405                    Self::UnknownValue(u) => u.0.serialize(serializer),
17406                }
17407            }
17408        }
17409
17410        impl<'de> serde::de::Deserialize<'de> for Type {
17411            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17412            where
17413                D: serde::Deserializer<'de>,
17414            {
17415                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
17416                    ".google.container.v1.NodePool.PlacementPolicy.Type",
17417                ))
17418            }
17419        }
17420    }
17421
17422    /// QueuedProvisioning defines the queued provisioning used by the node pool.
17423    #[derive(Clone, Default, PartialEq)]
17424    #[non_exhaustive]
17425    pub struct QueuedProvisioning {
17426        /// Denotes that this nodepool is QRM specific, meaning nodes can be only
17427        /// obtained through queuing via the Cluster Autoscaler ProvisioningRequest
17428        /// API.
17429        pub enabled: bool,
17430
17431        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17432    }
17433
17434    impl QueuedProvisioning {
17435        pub fn new() -> Self {
17436            std::default::Default::default()
17437        }
17438
17439        /// Sets the value of [enabled][crate::model::node_pool::QueuedProvisioning::enabled].
17440        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17441            self.enabled = v.into();
17442            self
17443        }
17444    }
17445
17446    impl wkt::message::Message for QueuedProvisioning {
17447        fn typename() -> &'static str {
17448            "type.googleapis.com/google.container.v1.NodePool.QueuedProvisioning"
17449        }
17450    }
17451
17452    /// The current status of the node pool instance.
17453    ///
17454    /// # Working with unknown values
17455    ///
17456    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17457    /// additional enum variants at any time. Adding new variants is not considered
17458    /// a breaking change. Applications should write their code in anticipation of:
17459    ///
17460    /// - New values appearing in future releases of the client library, **and**
17461    /// - New values received dynamically, without application changes.
17462    ///
17463    /// Please consult the [Working with enums] section in the user guide for some
17464    /// guidelines.
17465    ///
17466    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17467    #[derive(Clone, Debug, PartialEq)]
17468    #[non_exhaustive]
17469    pub enum Status {
17470        /// Not set.
17471        Unspecified,
17472        /// The PROVISIONING state indicates the node pool is being created.
17473        Provisioning,
17474        /// The RUNNING state indicates the node pool has been created
17475        /// and is fully usable.
17476        Running,
17477        /// The RUNNING_WITH_ERROR state indicates the node pool has been created
17478        /// and is partially usable. Some error state has occurred and some
17479        /// functionality may be impaired. Customer may need to reissue a request
17480        /// or trigger a new update.
17481        RunningWithError,
17482        /// The RECONCILING state indicates that some work is actively being done on
17483        /// the node pool, such as upgrading node software. Details can
17484        /// be found in the `statusMessage` field.
17485        Reconciling,
17486        /// The STOPPING state indicates the node pool is being deleted.
17487        Stopping,
17488        /// The ERROR state indicates the node pool may be unusable. Details
17489        /// can be found in the `statusMessage` field.
17490        Error,
17491        /// If set, the enum was initialized with an unknown value.
17492        ///
17493        /// Applications can examine the value using [Status::value] or
17494        /// [Status::name].
17495        UnknownValue(status::UnknownValue),
17496    }
17497
17498    #[doc(hidden)]
17499    pub mod status {
17500        #[allow(unused_imports)]
17501        use super::*;
17502        #[derive(Clone, Debug, PartialEq)]
17503        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17504    }
17505
17506    impl Status {
17507        /// Gets the enum value.
17508        ///
17509        /// Returns `None` if the enum contains an unknown value deserialized from
17510        /// the string representation of enums.
17511        pub fn value(&self) -> std::option::Option<i32> {
17512            match self {
17513                Self::Unspecified => std::option::Option::Some(0),
17514                Self::Provisioning => std::option::Option::Some(1),
17515                Self::Running => std::option::Option::Some(2),
17516                Self::RunningWithError => std::option::Option::Some(3),
17517                Self::Reconciling => std::option::Option::Some(4),
17518                Self::Stopping => std::option::Option::Some(5),
17519                Self::Error => std::option::Option::Some(6),
17520                Self::UnknownValue(u) => u.0.value(),
17521            }
17522        }
17523
17524        /// Gets the enum value as a string.
17525        ///
17526        /// Returns `None` if the enum contains an unknown value deserialized from
17527        /// the integer representation of enums.
17528        pub fn name(&self) -> std::option::Option<&str> {
17529            match self {
17530                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
17531                Self::Provisioning => std::option::Option::Some("PROVISIONING"),
17532                Self::Running => std::option::Option::Some("RUNNING"),
17533                Self::RunningWithError => std::option::Option::Some("RUNNING_WITH_ERROR"),
17534                Self::Reconciling => std::option::Option::Some("RECONCILING"),
17535                Self::Stopping => std::option::Option::Some("STOPPING"),
17536                Self::Error => std::option::Option::Some("ERROR"),
17537                Self::UnknownValue(u) => u.0.name(),
17538            }
17539        }
17540    }
17541
17542    impl std::default::Default for Status {
17543        fn default() -> Self {
17544            use std::convert::From;
17545            Self::from(0)
17546        }
17547    }
17548
17549    impl std::fmt::Display for Status {
17550        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17551            wkt::internal::display_enum(f, self.name(), self.value())
17552        }
17553    }
17554
17555    impl std::convert::From<i32> for Status {
17556        fn from(value: i32) -> Self {
17557            match value {
17558                0 => Self::Unspecified,
17559                1 => Self::Provisioning,
17560                2 => Self::Running,
17561                3 => Self::RunningWithError,
17562                4 => Self::Reconciling,
17563                5 => Self::Stopping,
17564                6 => Self::Error,
17565                _ => Self::UnknownValue(status::UnknownValue(
17566                    wkt::internal::UnknownEnumValue::Integer(value),
17567                )),
17568            }
17569        }
17570    }
17571
17572    impl std::convert::From<&str> for Status {
17573        fn from(value: &str) -> Self {
17574            use std::string::ToString;
17575            match value {
17576                "STATUS_UNSPECIFIED" => Self::Unspecified,
17577                "PROVISIONING" => Self::Provisioning,
17578                "RUNNING" => Self::Running,
17579                "RUNNING_WITH_ERROR" => Self::RunningWithError,
17580                "RECONCILING" => Self::Reconciling,
17581                "STOPPING" => Self::Stopping,
17582                "ERROR" => Self::Error,
17583                _ => Self::UnknownValue(status::UnknownValue(
17584                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17585                )),
17586            }
17587        }
17588    }
17589
17590    impl serde::ser::Serialize for Status {
17591        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17592        where
17593            S: serde::Serializer,
17594        {
17595            match self {
17596                Self::Unspecified => serializer.serialize_i32(0),
17597                Self::Provisioning => serializer.serialize_i32(1),
17598                Self::Running => serializer.serialize_i32(2),
17599                Self::RunningWithError => serializer.serialize_i32(3),
17600                Self::Reconciling => serializer.serialize_i32(4),
17601                Self::Stopping => serializer.serialize_i32(5),
17602                Self::Error => serializer.serialize_i32(6),
17603                Self::UnknownValue(u) => u.0.serialize(serializer),
17604            }
17605        }
17606    }
17607
17608    impl<'de> serde::de::Deserialize<'de> for Status {
17609        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17610        where
17611            D: serde::Deserializer<'de>,
17612        {
17613            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
17614                ".google.container.v1.NodePool.Status",
17615            ))
17616        }
17617    }
17618}
17619
17620/// NodeManagement defines the set of node management services turned on for the
17621/// node pool.
17622#[derive(Clone, Default, PartialEq)]
17623#[non_exhaustive]
17624pub struct NodeManagement {
17625    /// A flag that specifies whether node auto-upgrade is enabled for the node
17626    /// pool. If enabled, node auto-upgrade helps keep the nodes in your node pool
17627    /// up to date with the latest release version of Kubernetes.
17628    pub auto_upgrade: bool,
17629
17630    /// A flag that specifies whether the node auto-repair is enabled for the node
17631    /// pool. If enabled, the nodes in this node pool will be monitored and, if
17632    /// they fail health checks too many times, an automatic repair action will be
17633    /// triggered.
17634    pub auto_repair: bool,
17635
17636    /// Specifies the Auto Upgrade knobs for the node pool.
17637    pub upgrade_options: std::option::Option<crate::model::AutoUpgradeOptions>,
17638
17639    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17640}
17641
17642impl NodeManagement {
17643    pub fn new() -> Self {
17644        std::default::Default::default()
17645    }
17646
17647    /// Sets the value of [auto_upgrade][crate::model::NodeManagement::auto_upgrade].
17648    pub fn set_auto_upgrade<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17649        self.auto_upgrade = v.into();
17650        self
17651    }
17652
17653    /// Sets the value of [auto_repair][crate::model::NodeManagement::auto_repair].
17654    pub fn set_auto_repair<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17655        self.auto_repair = v.into();
17656        self
17657    }
17658
17659    /// Sets the value of [upgrade_options][crate::model::NodeManagement::upgrade_options].
17660    pub fn set_upgrade_options<T>(mut self, v: T) -> Self
17661    where
17662        T: std::convert::Into<crate::model::AutoUpgradeOptions>,
17663    {
17664        self.upgrade_options = std::option::Option::Some(v.into());
17665        self
17666    }
17667
17668    /// Sets or clears the value of [upgrade_options][crate::model::NodeManagement::upgrade_options].
17669    pub fn set_or_clear_upgrade_options<T>(mut self, v: std::option::Option<T>) -> Self
17670    where
17671        T: std::convert::Into<crate::model::AutoUpgradeOptions>,
17672    {
17673        self.upgrade_options = v.map(|x| x.into());
17674        self
17675    }
17676}
17677
17678impl wkt::message::Message for NodeManagement {
17679    fn typename() -> &'static str {
17680        "type.googleapis.com/google.container.v1.NodeManagement"
17681    }
17682}
17683
17684/// Best effort provisioning.
17685#[derive(Clone, Default, PartialEq)]
17686#[non_exhaustive]
17687pub struct BestEffortProvisioning {
17688    /// When this is enabled, cluster/node pool creations will ignore non-fatal
17689    /// errors like stockout to best provision as many nodes as possible right now
17690    /// and eventually bring up all target number of nodes
17691    pub enabled: bool,
17692
17693    /// Minimum number of nodes to be provisioned to be considered as succeeded,
17694    /// and the rest of nodes will be provisioned gradually and eventually when
17695    /// stockout issue has been resolved.
17696    pub min_provision_nodes: i32,
17697
17698    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17699}
17700
17701impl BestEffortProvisioning {
17702    pub fn new() -> Self {
17703        std::default::Default::default()
17704    }
17705
17706    /// Sets the value of [enabled][crate::model::BestEffortProvisioning::enabled].
17707    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17708        self.enabled = v.into();
17709        self
17710    }
17711
17712    /// Sets the value of [min_provision_nodes][crate::model::BestEffortProvisioning::min_provision_nodes].
17713    pub fn set_min_provision_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17714        self.min_provision_nodes = v.into();
17715        self
17716    }
17717}
17718
17719impl wkt::message::Message for BestEffortProvisioning {
17720    fn typename() -> &'static str {
17721        "type.googleapis.com/google.container.v1.BestEffortProvisioning"
17722    }
17723}
17724
17725/// AutoUpgradeOptions defines the set of options for the user to control how
17726/// the Auto Upgrades will proceed.
17727#[derive(Clone, Default, PartialEq)]
17728#[non_exhaustive]
17729pub struct AutoUpgradeOptions {
17730    /// Output only. This field is set when upgrades are about to commence
17731    /// with the approximate start time for the upgrades, in
17732    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
17733    pub auto_upgrade_start_time: std::string::String,
17734
17735    /// Output only. This field is set when upgrades are about to commence
17736    /// with the description of the upgrade.
17737    pub description: std::string::String,
17738
17739    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17740}
17741
17742impl AutoUpgradeOptions {
17743    pub fn new() -> Self {
17744        std::default::Default::default()
17745    }
17746
17747    /// Sets the value of [auto_upgrade_start_time][crate::model::AutoUpgradeOptions::auto_upgrade_start_time].
17748    pub fn set_auto_upgrade_start_time<T: std::convert::Into<std::string::String>>(
17749        mut self,
17750        v: T,
17751    ) -> Self {
17752        self.auto_upgrade_start_time = v.into();
17753        self
17754    }
17755
17756    /// Sets the value of [description][crate::model::AutoUpgradeOptions::description].
17757    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17758        self.description = v.into();
17759        self
17760    }
17761}
17762
17763impl wkt::message::Message for AutoUpgradeOptions {
17764    fn typename() -> &'static str {
17765        "type.googleapis.com/google.container.v1.AutoUpgradeOptions"
17766    }
17767}
17768
17769/// MaintenancePolicy defines the maintenance policy to be used for the cluster.
17770#[derive(Clone, Default, PartialEq)]
17771#[non_exhaustive]
17772pub struct MaintenancePolicy {
17773    /// Specifies the maintenance window in which maintenance may be performed.
17774    pub window: std::option::Option<crate::model::MaintenanceWindow>,
17775
17776    /// A hash identifying the version of this policy, so that updates to fields of
17777    /// the policy won't accidentally undo intermediate changes (and so that users
17778    /// of the API unaware of some fields won't accidentally remove other fields).
17779    /// Make a `get()` request to the cluster to get the current
17780    /// resource version and include it with requests to set the policy.
17781    pub resource_version: std::string::String,
17782
17783    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17784}
17785
17786impl MaintenancePolicy {
17787    pub fn new() -> Self {
17788        std::default::Default::default()
17789    }
17790
17791    /// Sets the value of [window][crate::model::MaintenancePolicy::window].
17792    pub fn set_window<T>(mut self, v: T) -> Self
17793    where
17794        T: std::convert::Into<crate::model::MaintenanceWindow>,
17795    {
17796        self.window = std::option::Option::Some(v.into());
17797        self
17798    }
17799
17800    /// Sets or clears the value of [window][crate::model::MaintenancePolicy::window].
17801    pub fn set_or_clear_window<T>(mut self, v: std::option::Option<T>) -> Self
17802    where
17803        T: std::convert::Into<crate::model::MaintenanceWindow>,
17804    {
17805        self.window = v.map(|x| x.into());
17806        self
17807    }
17808
17809    /// Sets the value of [resource_version][crate::model::MaintenancePolicy::resource_version].
17810    pub fn set_resource_version<T: std::convert::Into<std::string::String>>(
17811        mut self,
17812        v: T,
17813    ) -> Self {
17814        self.resource_version = v.into();
17815        self
17816    }
17817}
17818
17819impl wkt::message::Message for MaintenancePolicy {
17820    fn typename() -> &'static str {
17821        "type.googleapis.com/google.container.v1.MaintenancePolicy"
17822    }
17823}
17824
17825/// MaintenanceWindow defines the maintenance window to be used for the cluster.
17826#[derive(Clone, Default, PartialEq)]
17827#[non_exhaustive]
17828pub struct MaintenanceWindow {
17829    /// Exceptions to maintenance window. Non-emergency maintenance should not
17830    /// occur in these windows.
17831    pub maintenance_exclusions:
17832        std::collections::HashMap<std::string::String, crate::model::TimeWindow>,
17833
17834    pub policy: std::option::Option<crate::model::maintenance_window::Policy>,
17835
17836    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17837}
17838
17839impl MaintenanceWindow {
17840    pub fn new() -> Self {
17841        std::default::Default::default()
17842    }
17843
17844    /// Sets the value of [maintenance_exclusions][crate::model::MaintenanceWindow::maintenance_exclusions].
17845    pub fn set_maintenance_exclusions<T, K, V>(mut self, v: T) -> Self
17846    where
17847        T: std::iter::IntoIterator<Item = (K, V)>,
17848        K: std::convert::Into<std::string::String>,
17849        V: std::convert::Into<crate::model::TimeWindow>,
17850    {
17851        use std::iter::Iterator;
17852        self.maintenance_exclusions = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17853        self
17854    }
17855
17856    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy].
17857    ///
17858    /// Note that all the setters affecting `policy` are mutually
17859    /// exclusive.
17860    pub fn set_policy<
17861        T: std::convert::Into<std::option::Option<crate::model::maintenance_window::Policy>>,
17862    >(
17863        mut self,
17864        v: T,
17865    ) -> Self {
17866        self.policy = v.into();
17867        self
17868    }
17869
17870    /// The value of [policy][crate::model::MaintenanceWindow::policy]
17871    /// if it holds a `DailyMaintenanceWindow`, `None` if the field is not set or
17872    /// holds a different branch.
17873    pub fn daily_maintenance_window(
17874        &self,
17875    ) -> std::option::Option<&std::boxed::Box<crate::model::DailyMaintenanceWindow>> {
17876        #[allow(unreachable_patterns)]
17877        self.policy.as_ref().and_then(|v| match v {
17878            crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v) => {
17879                std::option::Option::Some(v)
17880            }
17881            _ => std::option::Option::None,
17882        })
17883    }
17884
17885    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy]
17886    /// to hold a `DailyMaintenanceWindow`.
17887    ///
17888    /// Note that all the setters affecting `policy` are
17889    /// mutually exclusive.
17890    pub fn set_daily_maintenance_window<
17891        T: std::convert::Into<std::boxed::Box<crate::model::DailyMaintenanceWindow>>,
17892    >(
17893        mut self,
17894        v: T,
17895    ) -> Self {
17896        self.policy = std::option::Option::Some(
17897            crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v.into()),
17898        );
17899        self
17900    }
17901
17902    /// The value of [policy][crate::model::MaintenanceWindow::policy]
17903    /// if it holds a `RecurringWindow`, `None` if the field is not set or
17904    /// holds a different branch.
17905    pub fn recurring_window(
17906        &self,
17907    ) -> std::option::Option<&std::boxed::Box<crate::model::RecurringTimeWindow>> {
17908        #[allow(unreachable_patterns)]
17909        self.policy.as_ref().and_then(|v| match v {
17910            crate::model::maintenance_window::Policy::RecurringWindow(v) => {
17911                std::option::Option::Some(v)
17912            }
17913            _ => std::option::Option::None,
17914        })
17915    }
17916
17917    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy]
17918    /// to hold a `RecurringWindow`.
17919    ///
17920    /// Note that all the setters affecting `policy` are
17921    /// mutually exclusive.
17922    pub fn set_recurring_window<
17923        T: std::convert::Into<std::boxed::Box<crate::model::RecurringTimeWindow>>,
17924    >(
17925        mut self,
17926        v: T,
17927    ) -> Self {
17928        self.policy = std::option::Option::Some(
17929            crate::model::maintenance_window::Policy::RecurringWindow(v.into()),
17930        );
17931        self
17932    }
17933}
17934
17935impl wkt::message::Message for MaintenanceWindow {
17936    fn typename() -> &'static str {
17937        "type.googleapis.com/google.container.v1.MaintenanceWindow"
17938    }
17939}
17940
17941/// Defines additional types related to [MaintenanceWindow].
17942pub mod maintenance_window {
17943    #[allow(unused_imports)]
17944    use super::*;
17945
17946    #[derive(Clone, Debug, PartialEq)]
17947    #[non_exhaustive]
17948    pub enum Policy {
17949        /// DailyMaintenanceWindow specifies a daily maintenance operation window.
17950        DailyMaintenanceWindow(std::boxed::Box<crate::model::DailyMaintenanceWindow>),
17951        /// RecurringWindow specifies some number of recurring time periods for
17952        /// maintenance to occur. The time windows may be overlapping. If no
17953        /// maintenance windows are set, maintenance can occur at any time.
17954        RecurringWindow(std::boxed::Box<crate::model::RecurringTimeWindow>),
17955    }
17956}
17957
17958/// Represents an arbitrary window of time.
17959#[derive(Clone, Default, PartialEq)]
17960#[non_exhaustive]
17961pub struct TimeWindow {
17962    /// The time that the window first starts.
17963    pub start_time: std::option::Option<wkt::Timestamp>,
17964
17965    /// The time that the window ends. The end time should take place after the
17966    /// start time.
17967    pub end_time: std::option::Option<wkt::Timestamp>,
17968
17969    pub options: std::option::Option<crate::model::time_window::Options>,
17970
17971    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17972}
17973
17974impl TimeWindow {
17975    pub fn new() -> Self {
17976        std::default::Default::default()
17977    }
17978
17979    /// Sets the value of [start_time][crate::model::TimeWindow::start_time].
17980    pub fn set_start_time<T>(mut self, v: T) -> Self
17981    where
17982        T: std::convert::Into<wkt::Timestamp>,
17983    {
17984        self.start_time = std::option::Option::Some(v.into());
17985        self
17986    }
17987
17988    /// Sets or clears the value of [start_time][crate::model::TimeWindow::start_time].
17989    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
17990    where
17991        T: std::convert::Into<wkt::Timestamp>,
17992    {
17993        self.start_time = v.map(|x| x.into());
17994        self
17995    }
17996
17997    /// Sets the value of [end_time][crate::model::TimeWindow::end_time].
17998    pub fn set_end_time<T>(mut self, v: T) -> Self
17999    where
18000        T: std::convert::Into<wkt::Timestamp>,
18001    {
18002        self.end_time = std::option::Option::Some(v.into());
18003        self
18004    }
18005
18006    /// Sets or clears the value of [end_time][crate::model::TimeWindow::end_time].
18007    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
18008    where
18009        T: std::convert::Into<wkt::Timestamp>,
18010    {
18011        self.end_time = v.map(|x| x.into());
18012        self
18013    }
18014
18015    /// Sets the value of [options][crate::model::TimeWindow::options].
18016    ///
18017    /// Note that all the setters affecting `options` are mutually
18018    /// exclusive.
18019    pub fn set_options<
18020        T: std::convert::Into<std::option::Option<crate::model::time_window::Options>>,
18021    >(
18022        mut self,
18023        v: T,
18024    ) -> Self {
18025        self.options = v.into();
18026        self
18027    }
18028
18029    /// The value of [options][crate::model::TimeWindow::options]
18030    /// if it holds a `MaintenanceExclusionOptions`, `None` if the field is not set or
18031    /// holds a different branch.
18032    pub fn maintenance_exclusion_options(
18033        &self,
18034    ) -> std::option::Option<&std::boxed::Box<crate::model::MaintenanceExclusionOptions>> {
18035        #[allow(unreachable_patterns)]
18036        self.options.as_ref().and_then(|v| match v {
18037            crate::model::time_window::Options::MaintenanceExclusionOptions(v) => {
18038                std::option::Option::Some(v)
18039            }
18040            _ => std::option::Option::None,
18041        })
18042    }
18043
18044    /// Sets the value of [options][crate::model::TimeWindow::options]
18045    /// to hold a `MaintenanceExclusionOptions`.
18046    ///
18047    /// Note that all the setters affecting `options` are
18048    /// mutually exclusive.
18049    pub fn set_maintenance_exclusion_options<
18050        T: std::convert::Into<std::boxed::Box<crate::model::MaintenanceExclusionOptions>>,
18051    >(
18052        mut self,
18053        v: T,
18054    ) -> Self {
18055        self.options = std::option::Option::Some(
18056            crate::model::time_window::Options::MaintenanceExclusionOptions(v.into()),
18057        );
18058        self
18059    }
18060}
18061
18062impl wkt::message::Message for TimeWindow {
18063    fn typename() -> &'static str {
18064        "type.googleapis.com/google.container.v1.TimeWindow"
18065    }
18066}
18067
18068/// Defines additional types related to [TimeWindow].
18069pub mod time_window {
18070    #[allow(unused_imports)]
18071    use super::*;
18072
18073    #[derive(Clone, Debug, PartialEq)]
18074    #[non_exhaustive]
18075    pub enum Options {
18076        /// MaintenanceExclusionOptions provides maintenance exclusion related
18077        /// options.
18078        MaintenanceExclusionOptions(std::boxed::Box<crate::model::MaintenanceExclusionOptions>),
18079    }
18080}
18081
18082/// Represents the Maintenance exclusion option.
18083#[derive(Clone, Default, PartialEq)]
18084#[non_exhaustive]
18085pub struct MaintenanceExclusionOptions {
18086    /// Scope specifies the upgrade scope which upgrades are blocked by the
18087    /// exclusion.
18088    pub scope: crate::model::maintenance_exclusion_options::Scope,
18089
18090    /// EndTimeBehavior specifies the behavior of the exclusion end time.
18091    pub end_time_behavior: crate::model::maintenance_exclusion_options::EndTimeBehavior,
18092
18093    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18094}
18095
18096impl MaintenanceExclusionOptions {
18097    pub fn new() -> Self {
18098        std::default::Default::default()
18099    }
18100
18101    /// Sets the value of [scope][crate::model::MaintenanceExclusionOptions::scope].
18102    pub fn set_scope<T: std::convert::Into<crate::model::maintenance_exclusion_options::Scope>>(
18103        mut self,
18104        v: T,
18105    ) -> Self {
18106        self.scope = v.into();
18107        self
18108    }
18109
18110    /// Sets the value of [end_time_behavior][crate::model::MaintenanceExclusionOptions::end_time_behavior].
18111    pub fn set_end_time_behavior<
18112        T: std::convert::Into<crate::model::maintenance_exclusion_options::EndTimeBehavior>,
18113    >(
18114        mut self,
18115        v: T,
18116    ) -> Self {
18117        self.end_time_behavior = v.into();
18118        self
18119    }
18120}
18121
18122impl wkt::message::Message for MaintenanceExclusionOptions {
18123    fn typename() -> &'static str {
18124        "type.googleapis.com/google.container.v1.MaintenanceExclusionOptions"
18125    }
18126}
18127
18128/// Defines additional types related to [MaintenanceExclusionOptions].
18129pub mod maintenance_exclusion_options {
18130    #[allow(unused_imports)]
18131    use super::*;
18132
18133    /// Scope of exclusion.
18134    ///
18135    /// # Working with unknown values
18136    ///
18137    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18138    /// additional enum variants at any time. Adding new variants is not considered
18139    /// a breaking change. Applications should write their code in anticipation of:
18140    ///
18141    /// - New values appearing in future releases of the client library, **and**
18142    /// - New values received dynamically, without application changes.
18143    ///
18144    /// Please consult the [Working with enums] section in the user guide for some
18145    /// guidelines.
18146    ///
18147    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18148    #[derive(Clone, Debug, PartialEq)]
18149    #[non_exhaustive]
18150    pub enum Scope {
18151        /// NO_UPGRADES excludes all upgrades, including patch upgrades and minor
18152        /// upgrades across control planes and nodes. This is the default exclusion
18153        /// behavior.
18154        NoUpgrades,
18155        /// NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only
18156        /// patches are allowed.
18157        NoMinorUpgrades,
18158        /// NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster,
18159        /// and also exclude all node pool upgrades. Only control
18160        /// plane patches are allowed.
18161        NoMinorOrNodeUpgrades,
18162        /// If set, the enum was initialized with an unknown value.
18163        ///
18164        /// Applications can examine the value using [Scope::value] or
18165        /// [Scope::name].
18166        UnknownValue(scope::UnknownValue),
18167    }
18168
18169    #[doc(hidden)]
18170    pub mod scope {
18171        #[allow(unused_imports)]
18172        use super::*;
18173        #[derive(Clone, Debug, PartialEq)]
18174        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18175    }
18176
18177    impl Scope {
18178        /// Gets the enum value.
18179        ///
18180        /// Returns `None` if the enum contains an unknown value deserialized from
18181        /// the string representation of enums.
18182        pub fn value(&self) -> std::option::Option<i32> {
18183            match self {
18184                Self::NoUpgrades => std::option::Option::Some(0),
18185                Self::NoMinorUpgrades => std::option::Option::Some(1),
18186                Self::NoMinorOrNodeUpgrades => std::option::Option::Some(2),
18187                Self::UnknownValue(u) => u.0.value(),
18188            }
18189        }
18190
18191        /// Gets the enum value as a string.
18192        ///
18193        /// Returns `None` if the enum contains an unknown value deserialized from
18194        /// the integer representation of enums.
18195        pub fn name(&self) -> std::option::Option<&str> {
18196            match self {
18197                Self::NoUpgrades => std::option::Option::Some("NO_UPGRADES"),
18198                Self::NoMinorUpgrades => std::option::Option::Some("NO_MINOR_UPGRADES"),
18199                Self::NoMinorOrNodeUpgrades => {
18200                    std::option::Option::Some("NO_MINOR_OR_NODE_UPGRADES")
18201                }
18202                Self::UnknownValue(u) => u.0.name(),
18203            }
18204        }
18205    }
18206
18207    impl std::default::Default for Scope {
18208        fn default() -> Self {
18209            use std::convert::From;
18210            Self::from(0)
18211        }
18212    }
18213
18214    impl std::fmt::Display for Scope {
18215        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18216            wkt::internal::display_enum(f, self.name(), self.value())
18217        }
18218    }
18219
18220    impl std::convert::From<i32> for Scope {
18221        fn from(value: i32) -> Self {
18222            match value {
18223                0 => Self::NoUpgrades,
18224                1 => Self::NoMinorUpgrades,
18225                2 => Self::NoMinorOrNodeUpgrades,
18226                _ => Self::UnknownValue(scope::UnknownValue(
18227                    wkt::internal::UnknownEnumValue::Integer(value),
18228                )),
18229            }
18230        }
18231    }
18232
18233    impl std::convert::From<&str> for Scope {
18234        fn from(value: &str) -> Self {
18235            use std::string::ToString;
18236            match value {
18237                "NO_UPGRADES" => Self::NoUpgrades,
18238                "NO_MINOR_UPGRADES" => Self::NoMinorUpgrades,
18239                "NO_MINOR_OR_NODE_UPGRADES" => Self::NoMinorOrNodeUpgrades,
18240                _ => Self::UnknownValue(scope::UnknownValue(
18241                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18242                )),
18243            }
18244        }
18245    }
18246
18247    impl serde::ser::Serialize for Scope {
18248        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18249        where
18250            S: serde::Serializer,
18251        {
18252            match self {
18253                Self::NoUpgrades => serializer.serialize_i32(0),
18254                Self::NoMinorUpgrades => serializer.serialize_i32(1),
18255                Self::NoMinorOrNodeUpgrades => serializer.serialize_i32(2),
18256                Self::UnknownValue(u) => u.0.serialize(serializer),
18257            }
18258        }
18259    }
18260
18261    impl<'de> serde::de::Deserialize<'de> for Scope {
18262        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18263        where
18264            D: serde::Deserializer<'de>,
18265        {
18266            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
18267                ".google.container.v1.MaintenanceExclusionOptions.Scope",
18268            ))
18269        }
18270    }
18271
18272    /// EndTimeBehavior specifies the behavior of the exclusion end time.
18273    ///
18274    /// # Working with unknown values
18275    ///
18276    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18277    /// additional enum variants at any time. Adding new variants is not considered
18278    /// a breaking change. Applications should write their code in anticipation of:
18279    ///
18280    /// - New values appearing in future releases of the client library, **and**
18281    /// - New values received dynamically, without application changes.
18282    ///
18283    /// Please consult the [Working with enums] section in the user guide for some
18284    /// guidelines.
18285    ///
18286    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18287    #[derive(Clone, Debug, PartialEq)]
18288    #[non_exhaustive]
18289    pub enum EndTimeBehavior {
18290        /// END_TIME_BEHAVIOR_UNSPECIFIED is the default behavior, which is fixed
18291        /// end time.
18292        Unspecified,
18293        /// UNTIL_END_OF_SUPPORT means the exclusion will be in effect until the end
18294        /// of the support of the cluster's current version.
18295        UntilEndOfSupport,
18296        /// If set, the enum was initialized with an unknown value.
18297        ///
18298        /// Applications can examine the value using [EndTimeBehavior::value] or
18299        /// [EndTimeBehavior::name].
18300        UnknownValue(end_time_behavior::UnknownValue),
18301    }
18302
18303    #[doc(hidden)]
18304    pub mod end_time_behavior {
18305        #[allow(unused_imports)]
18306        use super::*;
18307        #[derive(Clone, Debug, PartialEq)]
18308        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18309    }
18310
18311    impl EndTimeBehavior {
18312        /// Gets the enum value.
18313        ///
18314        /// Returns `None` if the enum contains an unknown value deserialized from
18315        /// the string representation of enums.
18316        pub fn value(&self) -> std::option::Option<i32> {
18317            match self {
18318                Self::Unspecified => std::option::Option::Some(0),
18319                Self::UntilEndOfSupport => std::option::Option::Some(1),
18320                Self::UnknownValue(u) => u.0.value(),
18321            }
18322        }
18323
18324        /// Gets the enum value as a string.
18325        ///
18326        /// Returns `None` if the enum contains an unknown value deserialized from
18327        /// the integer representation of enums.
18328        pub fn name(&self) -> std::option::Option<&str> {
18329            match self {
18330                Self::Unspecified => std::option::Option::Some("END_TIME_BEHAVIOR_UNSPECIFIED"),
18331                Self::UntilEndOfSupport => std::option::Option::Some("UNTIL_END_OF_SUPPORT"),
18332                Self::UnknownValue(u) => u.0.name(),
18333            }
18334        }
18335    }
18336
18337    impl std::default::Default for EndTimeBehavior {
18338        fn default() -> Self {
18339            use std::convert::From;
18340            Self::from(0)
18341        }
18342    }
18343
18344    impl std::fmt::Display for EndTimeBehavior {
18345        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18346            wkt::internal::display_enum(f, self.name(), self.value())
18347        }
18348    }
18349
18350    impl std::convert::From<i32> for EndTimeBehavior {
18351        fn from(value: i32) -> Self {
18352            match value {
18353                0 => Self::Unspecified,
18354                1 => Self::UntilEndOfSupport,
18355                _ => Self::UnknownValue(end_time_behavior::UnknownValue(
18356                    wkt::internal::UnknownEnumValue::Integer(value),
18357                )),
18358            }
18359        }
18360    }
18361
18362    impl std::convert::From<&str> for EndTimeBehavior {
18363        fn from(value: &str) -> Self {
18364            use std::string::ToString;
18365            match value {
18366                "END_TIME_BEHAVIOR_UNSPECIFIED" => Self::Unspecified,
18367                "UNTIL_END_OF_SUPPORT" => Self::UntilEndOfSupport,
18368                _ => Self::UnknownValue(end_time_behavior::UnknownValue(
18369                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18370                )),
18371            }
18372        }
18373    }
18374
18375    impl serde::ser::Serialize for EndTimeBehavior {
18376        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18377        where
18378            S: serde::Serializer,
18379        {
18380            match self {
18381                Self::Unspecified => serializer.serialize_i32(0),
18382                Self::UntilEndOfSupport => serializer.serialize_i32(1),
18383                Self::UnknownValue(u) => u.0.serialize(serializer),
18384            }
18385        }
18386    }
18387
18388    impl<'de> serde::de::Deserialize<'de> for EndTimeBehavior {
18389        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18390        where
18391            D: serde::Deserializer<'de>,
18392        {
18393            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EndTimeBehavior>::new(
18394                ".google.container.v1.MaintenanceExclusionOptions.EndTimeBehavior",
18395            ))
18396        }
18397    }
18398}
18399
18400/// Represents an arbitrary window of time that recurs.
18401#[derive(Clone, Default, PartialEq)]
18402#[non_exhaustive]
18403pub struct RecurringTimeWindow {
18404    /// The window of the first recurrence.
18405    pub window: std::option::Option<crate::model::TimeWindow>,
18406
18407    /// An RRULE (<https://tools.ietf.org/html/rfc5545#section-3.8.5.3>) for how
18408    /// this window reccurs. They go on for the span of time between the start and
18409    /// end time.
18410    ///
18411    /// For example, to have something repeat every weekday, you'd use:
18412    /// `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR`
18413    ///
18414    /// To repeat some window daily (equivalent to the DailyMaintenanceWindow):
18415    /// `FREQ=DAILY`
18416    ///
18417    /// For the first weekend of every month:
18418    /// `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU`
18419    ///
18420    /// This specifies how frequently the window starts. Eg, if you wanted to have
18421    /// a 9-5 UTC-4 window every weekday, you'd use something like:
18422    ///
18423    /// ```norust
18424    /// start time = 2019-01-01T09:00:00-0400
18425    /// end time = 2019-01-01T17:00:00-0400
18426    /// recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
18427    /// ```
18428    ///
18429    /// Windows can span multiple days. Eg, to make the window encompass every
18430    /// weekend from midnight Saturday till the last minute of Sunday UTC:
18431    ///
18432    /// ```norust
18433    /// start time = 2019-01-05T00:00:00Z
18434    /// end time = 2019-01-07T23:59:00Z
18435    /// recurrence = FREQ=WEEKLY;BYDAY=SA
18436    /// ```
18437    ///
18438    /// Note the start and end time's specific dates are largely arbitrary except
18439    /// to specify duration of the window and when it first starts.
18440    /// The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported.
18441    pub recurrence: std::string::String,
18442
18443    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18444}
18445
18446impl RecurringTimeWindow {
18447    pub fn new() -> Self {
18448        std::default::Default::default()
18449    }
18450
18451    /// Sets the value of [window][crate::model::RecurringTimeWindow::window].
18452    pub fn set_window<T>(mut self, v: T) -> Self
18453    where
18454        T: std::convert::Into<crate::model::TimeWindow>,
18455    {
18456        self.window = std::option::Option::Some(v.into());
18457        self
18458    }
18459
18460    /// Sets or clears the value of [window][crate::model::RecurringTimeWindow::window].
18461    pub fn set_or_clear_window<T>(mut self, v: std::option::Option<T>) -> Self
18462    where
18463        T: std::convert::Into<crate::model::TimeWindow>,
18464    {
18465        self.window = v.map(|x| x.into());
18466        self
18467    }
18468
18469    /// Sets the value of [recurrence][crate::model::RecurringTimeWindow::recurrence].
18470    pub fn set_recurrence<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18471        self.recurrence = v.into();
18472        self
18473    }
18474}
18475
18476impl wkt::message::Message for RecurringTimeWindow {
18477    fn typename() -> &'static str {
18478        "type.googleapis.com/google.container.v1.RecurringTimeWindow"
18479    }
18480}
18481
18482/// Time window specified for daily maintenance operations.
18483#[derive(Clone, Default, PartialEq)]
18484#[non_exhaustive]
18485pub struct DailyMaintenanceWindow {
18486    /// Time within the maintenance window to start the maintenance operations.
18487    /// Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
18488    /// format "HH:MM", where HH : [00-23] and MM : [00-59] GMT.
18489    pub start_time: std::string::String,
18490
18491    /// Output only. Duration of the time window, automatically chosen to be
18492    /// smallest possible in the given scenario.
18493    /// Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
18494    /// format "PTnHnMnS".
18495    pub duration: std::string::String,
18496
18497    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18498}
18499
18500impl DailyMaintenanceWindow {
18501    pub fn new() -> Self {
18502        std::default::Default::default()
18503    }
18504
18505    /// Sets the value of [start_time][crate::model::DailyMaintenanceWindow::start_time].
18506    pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18507        self.start_time = v.into();
18508        self
18509    }
18510
18511    /// Sets the value of [duration][crate::model::DailyMaintenanceWindow::duration].
18512    pub fn set_duration<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18513        self.duration = v.into();
18514        self
18515    }
18516}
18517
18518impl wkt::message::Message for DailyMaintenanceWindow {
18519    fn typename() -> &'static str {
18520        "type.googleapis.com/google.container.v1.DailyMaintenanceWindow"
18521    }
18522}
18523
18524/// SetNodePoolManagementRequest sets the node management properties of a node
18525/// pool.
18526#[derive(Clone, Default, PartialEq)]
18527#[non_exhaustive]
18528pub struct SetNodePoolManagementRequest {
18529    /// Deprecated. The Google Developers Console [project ID or project
18530    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
18531    /// This field has been deprecated and replaced by the name field.
18532    #[deprecated]
18533    pub project_id: std::string::String,
18534
18535    /// Deprecated. The name of the Google Compute Engine
18536    /// [zone](https://cloud.google.com/compute/docs/zones#available)
18537    /// in which the cluster resides. This field has been deprecated and replaced
18538    /// by the name field.
18539    #[deprecated]
18540    pub zone: std::string::String,
18541
18542    /// Deprecated. The name of the cluster to update.
18543    /// This field has been deprecated and replaced by the name field.
18544    #[deprecated]
18545    pub cluster_id: std::string::String,
18546
18547    /// Deprecated. The name of the node pool to update.
18548    /// This field has been deprecated and replaced by the name field.
18549    #[deprecated]
18550    pub node_pool_id: std::string::String,
18551
18552    /// Required. NodeManagement configuration for the node pool.
18553    pub management: std::option::Option<crate::model::NodeManagement>,
18554
18555    /// The name (project, location, cluster, node pool id) of the node pool to set
18556    /// management properties. Specified in the format
18557    /// `projects/*/locations/*/clusters/*/nodePools/*`.
18558    pub name: std::string::String,
18559
18560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18561}
18562
18563impl SetNodePoolManagementRequest {
18564    pub fn new() -> Self {
18565        std::default::Default::default()
18566    }
18567
18568    /// Sets the value of [project_id][crate::model::SetNodePoolManagementRequest::project_id].
18569    #[deprecated]
18570    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18571        self.project_id = v.into();
18572        self
18573    }
18574
18575    /// Sets the value of [zone][crate::model::SetNodePoolManagementRequest::zone].
18576    #[deprecated]
18577    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18578        self.zone = v.into();
18579        self
18580    }
18581
18582    /// Sets the value of [cluster_id][crate::model::SetNodePoolManagementRequest::cluster_id].
18583    #[deprecated]
18584    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18585        self.cluster_id = v.into();
18586        self
18587    }
18588
18589    /// Sets the value of [node_pool_id][crate::model::SetNodePoolManagementRequest::node_pool_id].
18590    #[deprecated]
18591    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18592        self.node_pool_id = v.into();
18593        self
18594    }
18595
18596    /// Sets the value of [management][crate::model::SetNodePoolManagementRequest::management].
18597    pub fn set_management<T>(mut self, v: T) -> Self
18598    where
18599        T: std::convert::Into<crate::model::NodeManagement>,
18600    {
18601        self.management = std::option::Option::Some(v.into());
18602        self
18603    }
18604
18605    /// Sets or clears the value of [management][crate::model::SetNodePoolManagementRequest::management].
18606    pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
18607    where
18608        T: std::convert::Into<crate::model::NodeManagement>,
18609    {
18610        self.management = v.map(|x| x.into());
18611        self
18612    }
18613
18614    /// Sets the value of [name][crate::model::SetNodePoolManagementRequest::name].
18615    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18616        self.name = v.into();
18617        self
18618    }
18619}
18620
18621impl wkt::message::Message for SetNodePoolManagementRequest {
18622    fn typename() -> &'static str {
18623        "type.googleapis.com/google.container.v1.SetNodePoolManagementRequest"
18624    }
18625}
18626
18627/// SetNodePoolSizeRequest sets the size of a node pool.
18628#[derive(Clone, Default, PartialEq)]
18629#[non_exhaustive]
18630pub struct SetNodePoolSizeRequest {
18631    /// Deprecated. The Google Developers Console [project ID or project
18632    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
18633    /// This field has been deprecated and replaced by the name field.
18634    #[deprecated]
18635    pub project_id: std::string::String,
18636
18637    /// Deprecated. The name of the Google Compute Engine
18638    /// [zone](https://cloud.google.com/compute/docs/zones#available)
18639    /// in which the cluster resides. This field has been deprecated and replaced
18640    /// by the name field.
18641    #[deprecated]
18642    pub zone: std::string::String,
18643
18644    /// Deprecated. The name of the cluster to update.
18645    /// This field has been deprecated and replaced by the name field.
18646    #[deprecated]
18647    pub cluster_id: std::string::String,
18648
18649    /// Deprecated. The name of the node pool to update.
18650    /// This field has been deprecated and replaced by the name field.
18651    #[deprecated]
18652    pub node_pool_id: std::string::String,
18653
18654    /// Required. The desired node count for the pool.
18655    pub node_count: i32,
18656
18657    /// The name (project, location, cluster, node pool id) of the node pool to set
18658    /// size.
18659    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
18660    pub name: std::string::String,
18661
18662    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18663}
18664
18665impl SetNodePoolSizeRequest {
18666    pub fn new() -> Self {
18667        std::default::Default::default()
18668    }
18669
18670    /// Sets the value of [project_id][crate::model::SetNodePoolSizeRequest::project_id].
18671    #[deprecated]
18672    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18673        self.project_id = v.into();
18674        self
18675    }
18676
18677    /// Sets the value of [zone][crate::model::SetNodePoolSizeRequest::zone].
18678    #[deprecated]
18679    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18680        self.zone = v.into();
18681        self
18682    }
18683
18684    /// Sets the value of [cluster_id][crate::model::SetNodePoolSizeRequest::cluster_id].
18685    #[deprecated]
18686    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18687        self.cluster_id = v.into();
18688        self
18689    }
18690
18691    /// Sets the value of [node_pool_id][crate::model::SetNodePoolSizeRequest::node_pool_id].
18692    #[deprecated]
18693    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18694        self.node_pool_id = v.into();
18695        self
18696    }
18697
18698    /// Sets the value of [node_count][crate::model::SetNodePoolSizeRequest::node_count].
18699    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18700        self.node_count = v.into();
18701        self
18702    }
18703
18704    /// Sets the value of [name][crate::model::SetNodePoolSizeRequest::name].
18705    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18706        self.name = v.into();
18707        self
18708    }
18709}
18710
18711impl wkt::message::Message for SetNodePoolSizeRequest {
18712    fn typename() -> &'static str {
18713        "type.googleapis.com/google.container.v1.SetNodePoolSizeRequest"
18714    }
18715}
18716
18717/// CompleteNodePoolUpgradeRequest sets the name of target node pool to complete
18718/// upgrade.
18719#[derive(Clone, Default, PartialEq)]
18720#[non_exhaustive]
18721pub struct CompleteNodePoolUpgradeRequest {
18722    /// The name (project, location, cluster, node pool id) of the node pool to
18723    /// complete upgrade.
18724    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
18725    pub name: std::string::String,
18726
18727    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18728}
18729
18730impl CompleteNodePoolUpgradeRequest {
18731    pub fn new() -> Self {
18732        std::default::Default::default()
18733    }
18734
18735    /// Sets the value of [name][crate::model::CompleteNodePoolUpgradeRequest::name].
18736    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18737        self.name = v.into();
18738        self
18739    }
18740}
18741
18742impl wkt::message::Message for CompleteNodePoolUpgradeRequest {
18743    fn typename() -> &'static str {
18744        "type.googleapis.com/google.container.v1.CompleteNodePoolUpgradeRequest"
18745    }
18746}
18747
18748/// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed
18749/// NodePool upgrade. This will be an no-op if the last upgrade successfully
18750/// completed.
18751#[derive(Clone, Default, PartialEq)]
18752#[non_exhaustive]
18753pub struct RollbackNodePoolUpgradeRequest {
18754    /// Deprecated. The Google Developers Console [project ID or project
18755    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
18756    /// This field has been deprecated and replaced by the name field.
18757    #[deprecated]
18758    pub project_id: std::string::String,
18759
18760    /// Deprecated. The name of the Google Compute Engine
18761    /// [zone](https://cloud.google.com/compute/docs/zones#available)
18762    /// in which the cluster resides. This field has been deprecated and replaced
18763    /// by the name field.
18764    #[deprecated]
18765    pub zone: std::string::String,
18766
18767    /// Deprecated. The name of the cluster to rollback.
18768    /// This field has been deprecated and replaced by the name field.
18769    #[deprecated]
18770    pub cluster_id: std::string::String,
18771
18772    /// Deprecated. The name of the node pool to rollback.
18773    /// This field has been deprecated and replaced by the name field.
18774    #[deprecated]
18775    pub node_pool_id: std::string::String,
18776
18777    /// The name (project, location, cluster, node pool id) of the node poll to
18778    /// rollback upgrade.
18779    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
18780    pub name: std::string::String,
18781
18782    /// Option for rollback to ignore the PodDisruptionBudget.
18783    /// Default value is false.
18784    pub respect_pdb: bool,
18785
18786    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18787}
18788
18789impl RollbackNodePoolUpgradeRequest {
18790    pub fn new() -> Self {
18791        std::default::Default::default()
18792    }
18793
18794    /// Sets the value of [project_id][crate::model::RollbackNodePoolUpgradeRequest::project_id].
18795    #[deprecated]
18796    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18797        self.project_id = v.into();
18798        self
18799    }
18800
18801    /// Sets the value of [zone][crate::model::RollbackNodePoolUpgradeRequest::zone].
18802    #[deprecated]
18803    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18804        self.zone = v.into();
18805        self
18806    }
18807
18808    /// Sets the value of [cluster_id][crate::model::RollbackNodePoolUpgradeRequest::cluster_id].
18809    #[deprecated]
18810    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18811        self.cluster_id = v.into();
18812        self
18813    }
18814
18815    /// Sets the value of [node_pool_id][crate::model::RollbackNodePoolUpgradeRequest::node_pool_id].
18816    #[deprecated]
18817    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18818        self.node_pool_id = v.into();
18819        self
18820    }
18821
18822    /// Sets the value of [name][crate::model::RollbackNodePoolUpgradeRequest::name].
18823    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18824        self.name = v.into();
18825        self
18826    }
18827
18828    /// Sets the value of [respect_pdb][crate::model::RollbackNodePoolUpgradeRequest::respect_pdb].
18829    pub fn set_respect_pdb<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18830        self.respect_pdb = v.into();
18831        self
18832    }
18833}
18834
18835impl wkt::message::Message for RollbackNodePoolUpgradeRequest {
18836    fn typename() -> &'static str {
18837        "type.googleapis.com/google.container.v1.RollbackNodePoolUpgradeRequest"
18838    }
18839}
18840
18841/// ListNodePoolsResponse is the result of ListNodePoolsRequest.
18842#[derive(Clone, Default, PartialEq)]
18843#[non_exhaustive]
18844pub struct ListNodePoolsResponse {
18845    /// A list of node pools for a cluster.
18846    pub node_pools: std::vec::Vec<crate::model::NodePool>,
18847
18848    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18849}
18850
18851impl ListNodePoolsResponse {
18852    pub fn new() -> Self {
18853        std::default::Default::default()
18854    }
18855
18856    /// Sets the value of [node_pools][crate::model::ListNodePoolsResponse::node_pools].
18857    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
18858    where
18859        T: std::iter::IntoIterator<Item = V>,
18860        V: std::convert::Into<crate::model::NodePool>,
18861    {
18862        use std::iter::Iterator;
18863        self.node_pools = v.into_iter().map(|i| i.into()).collect();
18864        self
18865    }
18866}
18867
18868impl wkt::message::Message for ListNodePoolsResponse {
18869    fn typename() -> &'static str {
18870        "type.googleapis.com/google.container.v1.ListNodePoolsResponse"
18871    }
18872}
18873
18874/// ClusterAutoscaling contains global, per-cluster information
18875/// required by Cluster Autoscaler to automatically adjust
18876/// the size of the cluster and create/delete
18877/// node pools based on the current needs.
18878#[derive(Clone, Default, PartialEq)]
18879#[non_exhaustive]
18880pub struct ClusterAutoscaling {
18881    /// Enables automatic node pool creation and deletion.
18882    pub enable_node_autoprovisioning: bool,
18883
18884    /// Contains global constraints regarding minimum and maximum
18885    /// amount of resources in the cluster.
18886    pub resource_limits: std::vec::Vec<crate::model::ResourceLimit>,
18887
18888    /// Defines autoscaling behaviour.
18889    pub autoscaling_profile: crate::model::cluster_autoscaling::AutoscalingProfile,
18890
18891    /// AutoprovisioningNodePoolDefaults contains defaults for a node pool
18892    /// created by NAP.
18893    pub autoprovisioning_node_pool_defaults:
18894        std::option::Option<crate::model::AutoprovisioningNodePoolDefaults>,
18895
18896    /// The list of Google Compute Engine
18897    /// [zones](https://cloud.google.com/compute/docs/zones#available)
18898    /// in which the NodePool's nodes can be created by NAP.
18899    pub autoprovisioning_locations: std::vec::Vec<std::string::String>,
18900
18901    /// Default compute class is a configuration for default compute class.
18902    pub default_compute_class_config: std::option::Option<crate::model::DefaultComputeClassConfig>,
18903
18904    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18905}
18906
18907impl ClusterAutoscaling {
18908    pub fn new() -> Self {
18909        std::default::Default::default()
18910    }
18911
18912    /// Sets the value of [enable_node_autoprovisioning][crate::model::ClusterAutoscaling::enable_node_autoprovisioning].
18913    pub fn set_enable_node_autoprovisioning<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18914        self.enable_node_autoprovisioning = v.into();
18915        self
18916    }
18917
18918    /// Sets the value of [resource_limits][crate::model::ClusterAutoscaling::resource_limits].
18919    pub fn set_resource_limits<T, V>(mut self, v: T) -> Self
18920    where
18921        T: std::iter::IntoIterator<Item = V>,
18922        V: std::convert::Into<crate::model::ResourceLimit>,
18923    {
18924        use std::iter::Iterator;
18925        self.resource_limits = v.into_iter().map(|i| i.into()).collect();
18926        self
18927    }
18928
18929    /// Sets the value of [autoscaling_profile][crate::model::ClusterAutoscaling::autoscaling_profile].
18930    pub fn set_autoscaling_profile<
18931        T: std::convert::Into<crate::model::cluster_autoscaling::AutoscalingProfile>,
18932    >(
18933        mut self,
18934        v: T,
18935    ) -> Self {
18936        self.autoscaling_profile = v.into();
18937        self
18938    }
18939
18940    /// Sets the value of [autoprovisioning_node_pool_defaults][crate::model::ClusterAutoscaling::autoprovisioning_node_pool_defaults].
18941    pub fn set_autoprovisioning_node_pool_defaults<T>(mut self, v: T) -> Self
18942    where
18943        T: std::convert::Into<crate::model::AutoprovisioningNodePoolDefaults>,
18944    {
18945        self.autoprovisioning_node_pool_defaults = std::option::Option::Some(v.into());
18946        self
18947    }
18948
18949    /// Sets or clears the value of [autoprovisioning_node_pool_defaults][crate::model::ClusterAutoscaling::autoprovisioning_node_pool_defaults].
18950    pub fn set_or_clear_autoprovisioning_node_pool_defaults<T>(
18951        mut self,
18952        v: std::option::Option<T>,
18953    ) -> Self
18954    where
18955        T: std::convert::Into<crate::model::AutoprovisioningNodePoolDefaults>,
18956    {
18957        self.autoprovisioning_node_pool_defaults = v.map(|x| x.into());
18958        self
18959    }
18960
18961    /// Sets the value of [autoprovisioning_locations][crate::model::ClusterAutoscaling::autoprovisioning_locations].
18962    pub fn set_autoprovisioning_locations<T, V>(mut self, v: T) -> Self
18963    where
18964        T: std::iter::IntoIterator<Item = V>,
18965        V: std::convert::Into<std::string::String>,
18966    {
18967        use std::iter::Iterator;
18968        self.autoprovisioning_locations = v.into_iter().map(|i| i.into()).collect();
18969        self
18970    }
18971
18972    /// Sets the value of [default_compute_class_config][crate::model::ClusterAutoscaling::default_compute_class_config].
18973    pub fn set_default_compute_class_config<T>(mut self, v: T) -> Self
18974    where
18975        T: std::convert::Into<crate::model::DefaultComputeClassConfig>,
18976    {
18977        self.default_compute_class_config = std::option::Option::Some(v.into());
18978        self
18979    }
18980
18981    /// Sets or clears the value of [default_compute_class_config][crate::model::ClusterAutoscaling::default_compute_class_config].
18982    pub fn set_or_clear_default_compute_class_config<T>(mut self, v: std::option::Option<T>) -> Self
18983    where
18984        T: std::convert::Into<crate::model::DefaultComputeClassConfig>,
18985    {
18986        self.default_compute_class_config = v.map(|x| x.into());
18987        self
18988    }
18989}
18990
18991impl wkt::message::Message for ClusterAutoscaling {
18992    fn typename() -> &'static str {
18993        "type.googleapis.com/google.container.v1.ClusterAutoscaling"
18994    }
18995}
18996
18997/// Defines additional types related to [ClusterAutoscaling].
18998pub mod cluster_autoscaling {
18999    #[allow(unused_imports)]
19000    use super::*;
19001
19002    /// Defines possible options for autoscaling_profile field.
19003    ///
19004    /// # Working with unknown values
19005    ///
19006    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19007    /// additional enum variants at any time. Adding new variants is not considered
19008    /// a breaking change. Applications should write their code in anticipation of:
19009    ///
19010    /// - New values appearing in future releases of the client library, **and**
19011    /// - New values received dynamically, without application changes.
19012    ///
19013    /// Please consult the [Working with enums] section in the user guide for some
19014    /// guidelines.
19015    ///
19016    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19017    #[derive(Clone, Debug, PartialEq)]
19018    #[non_exhaustive]
19019    pub enum AutoscalingProfile {
19020        /// No change to autoscaling configuration.
19021        ProfileUnspecified,
19022        /// Prioritize optimizing utilization of resources.
19023        OptimizeUtilization,
19024        /// Use default (balanced) autoscaling configuration.
19025        Balanced,
19026        /// If set, the enum was initialized with an unknown value.
19027        ///
19028        /// Applications can examine the value using [AutoscalingProfile::value] or
19029        /// [AutoscalingProfile::name].
19030        UnknownValue(autoscaling_profile::UnknownValue),
19031    }
19032
19033    #[doc(hidden)]
19034    pub mod autoscaling_profile {
19035        #[allow(unused_imports)]
19036        use super::*;
19037        #[derive(Clone, Debug, PartialEq)]
19038        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19039    }
19040
19041    impl AutoscalingProfile {
19042        /// Gets the enum value.
19043        ///
19044        /// Returns `None` if the enum contains an unknown value deserialized from
19045        /// the string representation of enums.
19046        pub fn value(&self) -> std::option::Option<i32> {
19047            match self {
19048                Self::ProfileUnspecified => std::option::Option::Some(0),
19049                Self::OptimizeUtilization => std::option::Option::Some(1),
19050                Self::Balanced => std::option::Option::Some(2),
19051                Self::UnknownValue(u) => u.0.value(),
19052            }
19053        }
19054
19055        /// Gets the enum value as a string.
19056        ///
19057        /// Returns `None` if the enum contains an unknown value deserialized from
19058        /// the integer representation of enums.
19059        pub fn name(&self) -> std::option::Option<&str> {
19060            match self {
19061                Self::ProfileUnspecified => std::option::Option::Some("PROFILE_UNSPECIFIED"),
19062                Self::OptimizeUtilization => std::option::Option::Some("OPTIMIZE_UTILIZATION"),
19063                Self::Balanced => std::option::Option::Some("BALANCED"),
19064                Self::UnknownValue(u) => u.0.name(),
19065            }
19066        }
19067    }
19068
19069    impl std::default::Default for AutoscalingProfile {
19070        fn default() -> Self {
19071            use std::convert::From;
19072            Self::from(0)
19073        }
19074    }
19075
19076    impl std::fmt::Display for AutoscalingProfile {
19077        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19078            wkt::internal::display_enum(f, self.name(), self.value())
19079        }
19080    }
19081
19082    impl std::convert::From<i32> for AutoscalingProfile {
19083        fn from(value: i32) -> Self {
19084            match value {
19085                0 => Self::ProfileUnspecified,
19086                1 => Self::OptimizeUtilization,
19087                2 => Self::Balanced,
19088                _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
19089                    wkt::internal::UnknownEnumValue::Integer(value),
19090                )),
19091            }
19092        }
19093    }
19094
19095    impl std::convert::From<&str> for AutoscalingProfile {
19096        fn from(value: &str) -> Self {
19097            use std::string::ToString;
19098            match value {
19099                "PROFILE_UNSPECIFIED" => Self::ProfileUnspecified,
19100                "OPTIMIZE_UTILIZATION" => Self::OptimizeUtilization,
19101                "BALANCED" => Self::Balanced,
19102                _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
19103                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19104                )),
19105            }
19106        }
19107    }
19108
19109    impl serde::ser::Serialize for AutoscalingProfile {
19110        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19111        where
19112            S: serde::Serializer,
19113        {
19114            match self {
19115                Self::ProfileUnspecified => serializer.serialize_i32(0),
19116                Self::OptimizeUtilization => serializer.serialize_i32(1),
19117                Self::Balanced => serializer.serialize_i32(2),
19118                Self::UnknownValue(u) => u.0.serialize(serializer),
19119            }
19120        }
19121    }
19122
19123    impl<'de> serde::de::Deserialize<'de> for AutoscalingProfile {
19124        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19125        where
19126            D: serde::Deserializer<'de>,
19127        {
19128            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoscalingProfile>::new(
19129                ".google.container.v1.ClusterAutoscaling.AutoscalingProfile",
19130            ))
19131        }
19132    }
19133}
19134
19135/// AutoprovisioningNodePoolDefaults contains defaults for a node pool created
19136/// by NAP.
19137#[derive(Clone, Default, PartialEq)]
19138#[non_exhaustive]
19139pub struct AutoprovisioningNodePoolDefaults {
19140    /// Scopes that are used by NAP when creating node pools.
19141    pub oauth_scopes: std::vec::Vec<std::string::String>,
19142
19143    /// The Google Cloud Platform Service Account to be used by the node VMs.
19144    pub service_account: std::string::String,
19145
19146    /// Specifies the upgrade settings for NAP created node pools
19147    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
19148
19149    /// Specifies the node management options for NAP created node-pools.
19150    pub management: std::option::Option<crate::model::NodeManagement>,
19151
19152    /// Deprecated. Minimum CPU platform to be used for NAP created node pools.
19153    /// The instance may be scheduled on the specified or newer CPU platform.
19154    /// Applicable values are the friendly names of CPU platforms, such as
19155    /// minCpuPlatform: Intel Haswell or
19156    /// minCpuPlatform: Intel Sandy Bridge. For more
19157    /// information, read [how to specify min CPU
19158    /// platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
19159    /// This field is deprecated, min_cpu_platform should be specified using
19160    /// `cloud.google.com/requested-min-cpu-platform` label selector on the pod.
19161    /// To unset the min cpu platform field pass "automatic"
19162    /// as field value.
19163    #[deprecated]
19164    pub min_cpu_platform: std::string::String,
19165
19166    /// Size of the disk attached to each node, specified in GB.
19167    /// The smallest allowed disk size is 10GB.
19168    ///
19169    /// If unspecified, the default disk size is 100GB.
19170    pub disk_size_gb: i32,
19171
19172    /// Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or
19173    /// 'pd-balanced')
19174    ///
19175    /// If unspecified, the default disk type is 'pd-standard'
19176    pub disk_type: std::string::String,
19177
19178    /// Shielded Instance options.
19179    pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
19180
19181    /// The Customer Managed Encryption Key used to encrypt the boot disk attached
19182    /// to each node in the node pool. This should be of the form
19183    /// projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME].
19184    /// For more information about protecting resources with Cloud KMS Keys please
19185    /// see:
19186    /// <https://cloud.google.com/compute/docs/disks/customer-managed-encryption>
19187    pub boot_disk_kms_key: std::string::String,
19188
19189    /// The image type to use for NAP created node. Please see
19190    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images>
19191    /// for available image types.
19192    pub image_type: std::string::String,
19193
19194    /// DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead.
19195    pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
19196
19197    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19198}
19199
19200impl AutoprovisioningNodePoolDefaults {
19201    pub fn new() -> Self {
19202        std::default::Default::default()
19203    }
19204
19205    /// Sets the value of [oauth_scopes][crate::model::AutoprovisioningNodePoolDefaults::oauth_scopes].
19206    pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
19207    where
19208        T: std::iter::IntoIterator<Item = V>,
19209        V: std::convert::Into<std::string::String>,
19210    {
19211        use std::iter::Iterator;
19212        self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
19213        self
19214    }
19215
19216    /// Sets the value of [service_account][crate::model::AutoprovisioningNodePoolDefaults::service_account].
19217    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19218        self.service_account = v.into();
19219        self
19220    }
19221
19222    /// Sets the value of [upgrade_settings][crate::model::AutoprovisioningNodePoolDefaults::upgrade_settings].
19223    pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
19224    where
19225        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
19226    {
19227        self.upgrade_settings = std::option::Option::Some(v.into());
19228        self
19229    }
19230
19231    /// Sets or clears the value of [upgrade_settings][crate::model::AutoprovisioningNodePoolDefaults::upgrade_settings].
19232    pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
19233    where
19234        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
19235    {
19236        self.upgrade_settings = v.map(|x| x.into());
19237        self
19238    }
19239
19240    /// Sets the value of [management][crate::model::AutoprovisioningNodePoolDefaults::management].
19241    pub fn set_management<T>(mut self, v: T) -> Self
19242    where
19243        T: std::convert::Into<crate::model::NodeManagement>,
19244    {
19245        self.management = std::option::Option::Some(v.into());
19246        self
19247    }
19248
19249    /// Sets or clears the value of [management][crate::model::AutoprovisioningNodePoolDefaults::management].
19250    pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
19251    where
19252        T: std::convert::Into<crate::model::NodeManagement>,
19253    {
19254        self.management = v.map(|x| x.into());
19255        self
19256    }
19257
19258    /// Sets the value of [min_cpu_platform][crate::model::AutoprovisioningNodePoolDefaults::min_cpu_platform].
19259    #[deprecated]
19260    pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
19261        mut self,
19262        v: T,
19263    ) -> Self {
19264        self.min_cpu_platform = v.into();
19265        self
19266    }
19267
19268    /// Sets the value of [disk_size_gb][crate::model::AutoprovisioningNodePoolDefaults::disk_size_gb].
19269    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19270        self.disk_size_gb = v.into();
19271        self
19272    }
19273
19274    /// Sets the value of [disk_type][crate::model::AutoprovisioningNodePoolDefaults::disk_type].
19275    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19276        self.disk_type = v.into();
19277        self
19278    }
19279
19280    /// Sets the value of [shielded_instance_config][crate::model::AutoprovisioningNodePoolDefaults::shielded_instance_config].
19281    pub fn set_shielded_instance_config<T>(mut self, v: T) -> Self
19282    where
19283        T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
19284    {
19285        self.shielded_instance_config = std::option::Option::Some(v.into());
19286        self
19287    }
19288
19289    /// Sets or clears the value of [shielded_instance_config][crate::model::AutoprovisioningNodePoolDefaults::shielded_instance_config].
19290    pub fn set_or_clear_shielded_instance_config<T>(mut self, v: std::option::Option<T>) -> Self
19291    where
19292        T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
19293    {
19294        self.shielded_instance_config = v.map(|x| x.into());
19295        self
19296    }
19297
19298    /// Sets the value of [boot_disk_kms_key][crate::model::AutoprovisioningNodePoolDefaults::boot_disk_kms_key].
19299    pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
19300        mut self,
19301        v: T,
19302    ) -> Self {
19303        self.boot_disk_kms_key = v.into();
19304        self
19305    }
19306
19307    /// Sets the value of [image_type][crate::model::AutoprovisioningNodePoolDefaults::image_type].
19308    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19309        self.image_type = v.into();
19310        self
19311    }
19312
19313    /// Sets the value of [insecure_kubelet_readonly_port_enabled][crate::model::AutoprovisioningNodePoolDefaults::insecure_kubelet_readonly_port_enabled].
19314    pub fn set_insecure_kubelet_readonly_port_enabled<T>(mut self, v: T) -> Self
19315    where
19316        T: std::convert::Into<bool>,
19317    {
19318        self.insecure_kubelet_readonly_port_enabled = std::option::Option::Some(v.into());
19319        self
19320    }
19321
19322    /// Sets or clears the value of [insecure_kubelet_readonly_port_enabled][crate::model::AutoprovisioningNodePoolDefaults::insecure_kubelet_readonly_port_enabled].
19323    pub fn set_or_clear_insecure_kubelet_readonly_port_enabled<T>(
19324        mut self,
19325        v: std::option::Option<T>,
19326    ) -> Self
19327    where
19328        T: std::convert::Into<bool>,
19329    {
19330        self.insecure_kubelet_readonly_port_enabled = v.map(|x| x.into());
19331        self
19332    }
19333}
19334
19335impl wkt::message::Message for AutoprovisioningNodePoolDefaults {
19336    fn typename() -> &'static str {
19337        "type.googleapis.com/google.container.v1.AutoprovisioningNodePoolDefaults"
19338    }
19339}
19340
19341/// Contains information about amount of some resource in the cluster.
19342/// For memory, value should be in GB.
19343#[derive(Clone, Default, PartialEq)]
19344#[non_exhaustive]
19345pub struct ResourceLimit {
19346    /// Resource name "cpu", "memory" or gpu-specific string.
19347    pub resource_type: std::string::String,
19348
19349    /// Minimum amount of the resource in the cluster.
19350    pub minimum: i64,
19351
19352    /// Maximum amount of the resource in the cluster.
19353    pub maximum: i64,
19354
19355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19356}
19357
19358impl ResourceLimit {
19359    pub fn new() -> Self {
19360        std::default::Default::default()
19361    }
19362
19363    /// Sets the value of [resource_type][crate::model::ResourceLimit::resource_type].
19364    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19365        self.resource_type = v.into();
19366        self
19367    }
19368
19369    /// Sets the value of [minimum][crate::model::ResourceLimit::minimum].
19370    pub fn set_minimum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19371        self.minimum = v.into();
19372        self
19373    }
19374
19375    /// Sets the value of [maximum][crate::model::ResourceLimit::maximum].
19376    pub fn set_maximum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19377        self.maximum = v.into();
19378        self
19379    }
19380}
19381
19382impl wkt::message::Message for ResourceLimit {
19383    fn typename() -> &'static str {
19384        "type.googleapis.com/google.container.v1.ResourceLimit"
19385    }
19386}
19387
19388/// DefaultComputeClassConfig defines default compute class
19389/// configuration.
19390#[derive(Clone, Default, PartialEq)]
19391#[non_exhaustive]
19392pub struct DefaultComputeClassConfig {
19393    /// Enables default compute class.
19394    pub enabled: bool,
19395
19396    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19397}
19398
19399impl DefaultComputeClassConfig {
19400    pub fn new() -> Self {
19401        std::default::Default::default()
19402    }
19403
19404    /// Sets the value of [enabled][crate::model::DefaultComputeClassConfig::enabled].
19405    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19406        self.enabled = v.into();
19407        self
19408    }
19409}
19410
19411impl wkt::message::Message for DefaultComputeClassConfig {
19412    fn typename() -> &'static str {
19413        "type.googleapis.com/google.container.v1.DefaultComputeClassConfig"
19414    }
19415}
19416
19417/// NodePoolAutoscaling contains information required by cluster autoscaler to
19418/// adjust the size of the node pool to the current cluster usage.
19419#[derive(Clone, Default, PartialEq)]
19420#[non_exhaustive]
19421pub struct NodePoolAutoscaling {
19422    /// Is autoscaling enabled for this node pool.
19423    pub enabled: bool,
19424
19425    /// Minimum number of nodes for one location in the node pool. Must be greater
19426    /// than or equal to 0 and less than or equal to max_node_count.
19427    pub min_node_count: i32,
19428
19429    /// Maximum number of nodes for one location in the node pool. Must be >=
19430    /// min_node_count. There has to be enough quota to scale up the cluster.
19431    pub max_node_count: i32,
19432
19433    /// Can this node pool be deleted automatically.
19434    pub autoprovisioned: bool,
19435
19436    /// Location policy used when scaling up a nodepool.
19437    pub location_policy: crate::model::node_pool_autoscaling::LocationPolicy,
19438
19439    /// Minimum number of nodes in the node pool. Must be greater than or equal
19440    /// to 0 and less than or equal to total_max_node_count.
19441    /// The total_*_node_count fields are mutually exclusive with the *_node_count
19442    /// fields.
19443    pub total_min_node_count: i32,
19444
19445    /// Maximum number of nodes in the node pool. Must be greater than or equal to
19446    /// total_min_node_count. There has to be enough quota to scale up the cluster.
19447    /// The total_*_node_count fields are mutually exclusive with the *_node_count
19448    /// fields.
19449    pub total_max_node_count: i32,
19450
19451    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19452}
19453
19454impl NodePoolAutoscaling {
19455    pub fn new() -> Self {
19456        std::default::Default::default()
19457    }
19458
19459    /// Sets the value of [enabled][crate::model::NodePoolAutoscaling::enabled].
19460    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19461        self.enabled = v.into();
19462        self
19463    }
19464
19465    /// Sets the value of [min_node_count][crate::model::NodePoolAutoscaling::min_node_count].
19466    pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19467        self.min_node_count = v.into();
19468        self
19469    }
19470
19471    /// Sets the value of [max_node_count][crate::model::NodePoolAutoscaling::max_node_count].
19472    pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19473        self.max_node_count = v.into();
19474        self
19475    }
19476
19477    /// Sets the value of [autoprovisioned][crate::model::NodePoolAutoscaling::autoprovisioned].
19478    pub fn set_autoprovisioned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19479        self.autoprovisioned = v.into();
19480        self
19481    }
19482
19483    /// Sets the value of [location_policy][crate::model::NodePoolAutoscaling::location_policy].
19484    pub fn set_location_policy<
19485        T: std::convert::Into<crate::model::node_pool_autoscaling::LocationPolicy>,
19486    >(
19487        mut self,
19488        v: T,
19489    ) -> Self {
19490        self.location_policy = v.into();
19491        self
19492    }
19493
19494    /// Sets the value of [total_min_node_count][crate::model::NodePoolAutoscaling::total_min_node_count].
19495    pub fn set_total_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19496        self.total_min_node_count = v.into();
19497        self
19498    }
19499
19500    /// Sets the value of [total_max_node_count][crate::model::NodePoolAutoscaling::total_max_node_count].
19501    pub fn set_total_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19502        self.total_max_node_count = v.into();
19503        self
19504    }
19505}
19506
19507impl wkt::message::Message for NodePoolAutoscaling {
19508    fn typename() -> &'static str {
19509        "type.googleapis.com/google.container.v1.NodePoolAutoscaling"
19510    }
19511}
19512
19513/// Defines additional types related to [NodePoolAutoscaling].
19514pub mod node_pool_autoscaling {
19515    #[allow(unused_imports)]
19516    use super::*;
19517
19518    /// Location policy specifies how zones are picked when scaling up the
19519    /// nodepool.
19520    ///
19521    /// # Working with unknown values
19522    ///
19523    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19524    /// additional enum variants at any time. Adding new variants is not considered
19525    /// a breaking change. Applications should write their code in anticipation of:
19526    ///
19527    /// - New values appearing in future releases of the client library, **and**
19528    /// - New values received dynamically, without application changes.
19529    ///
19530    /// Please consult the [Working with enums] section in the user guide for some
19531    /// guidelines.
19532    ///
19533    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19534    #[derive(Clone, Debug, PartialEq)]
19535    #[non_exhaustive]
19536    pub enum LocationPolicy {
19537        /// Not set.
19538        Unspecified,
19539        /// BALANCED is a best effort policy that aims to balance the sizes of
19540        /// different zones.
19541        Balanced,
19542        /// ANY policy picks zones that have the highest capacity available.
19543        Any,
19544        /// If set, the enum was initialized with an unknown value.
19545        ///
19546        /// Applications can examine the value using [LocationPolicy::value] or
19547        /// [LocationPolicy::name].
19548        UnknownValue(location_policy::UnknownValue),
19549    }
19550
19551    #[doc(hidden)]
19552    pub mod location_policy {
19553        #[allow(unused_imports)]
19554        use super::*;
19555        #[derive(Clone, Debug, PartialEq)]
19556        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19557    }
19558
19559    impl LocationPolicy {
19560        /// Gets the enum value.
19561        ///
19562        /// Returns `None` if the enum contains an unknown value deserialized from
19563        /// the string representation of enums.
19564        pub fn value(&self) -> std::option::Option<i32> {
19565            match self {
19566                Self::Unspecified => std::option::Option::Some(0),
19567                Self::Balanced => std::option::Option::Some(1),
19568                Self::Any => std::option::Option::Some(2),
19569                Self::UnknownValue(u) => u.0.value(),
19570            }
19571        }
19572
19573        /// Gets the enum value as a string.
19574        ///
19575        /// Returns `None` if the enum contains an unknown value deserialized from
19576        /// the integer representation of enums.
19577        pub fn name(&self) -> std::option::Option<&str> {
19578            match self {
19579                Self::Unspecified => std::option::Option::Some("LOCATION_POLICY_UNSPECIFIED"),
19580                Self::Balanced => std::option::Option::Some("BALANCED"),
19581                Self::Any => std::option::Option::Some("ANY"),
19582                Self::UnknownValue(u) => u.0.name(),
19583            }
19584        }
19585    }
19586
19587    impl std::default::Default for LocationPolicy {
19588        fn default() -> Self {
19589            use std::convert::From;
19590            Self::from(0)
19591        }
19592    }
19593
19594    impl std::fmt::Display for LocationPolicy {
19595        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19596            wkt::internal::display_enum(f, self.name(), self.value())
19597        }
19598    }
19599
19600    impl std::convert::From<i32> for LocationPolicy {
19601        fn from(value: i32) -> Self {
19602            match value {
19603                0 => Self::Unspecified,
19604                1 => Self::Balanced,
19605                2 => Self::Any,
19606                _ => Self::UnknownValue(location_policy::UnknownValue(
19607                    wkt::internal::UnknownEnumValue::Integer(value),
19608                )),
19609            }
19610        }
19611    }
19612
19613    impl std::convert::From<&str> for LocationPolicy {
19614        fn from(value: &str) -> Self {
19615            use std::string::ToString;
19616            match value {
19617                "LOCATION_POLICY_UNSPECIFIED" => Self::Unspecified,
19618                "BALANCED" => Self::Balanced,
19619                "ANY" => Self::Any,
19620                _ => Self::UnknownValue(location_policy::UnknownValue(
19621                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19622                )),
19623            }
19624        }
19625    }
19626
19627    impl serde::ser::Serialize for LocationPolicy {
19628        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19629        where
19630            S: serde::Serializer,
19631        {
19632            match self {
19633                Self::Unspecified => serializer.serialize_i32(0),
19634                Self::Balanced => serializer.serialize_i32(1),
19635                Self::Any => serializer.serialize_i32(2),
19636                Self::UnknownValue(u) => u.0.serialize(serializer),
19637            }
19638        }
19639    }
19640
19641    impl<'de> serde::de::Deserialize<'de> for LocationPolicy {
19642        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19643        where
19644            D: serde::Deserializer<'de>,
19645        {
19646            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationPolicy>::new(
19647                ".google.container.v1.NodePoolAutoscaling.LocationPolicy",
19648            ))
19649        }
19650    }
19651}
19652
19653/// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container
19654/// Engine cluster, which will in turn set them for Google Compute Engine
19655/// resources used by that cluster
19656#[derive(Clone, Default, PartialEq)]
19657#[non_exhaustive]
19658pub struct SetLabelsRequest {
19659    /// Deprecated. The Google Developers Console [project ID or project
19660    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
19661    /// This field has been deprecated and replaced by the name field.
19662    #[deprecated]
19663    pub project_id: std::string::String,
19664
19665    /// Deprecated. The name of the Google Compute Engine
19666    /// [zone](https://cloud.google.com/compute/docs/zones#available)
19667    /// in which the cluster resides. This field has been deprecated and replaced
19668    /// by the name field.
19669    #[deprecated]
19670    pub zone: std::string::String,
19671
19672    /// Deprecated. The name of the cluster.
19673    /// This field has been deprecated and replaced by the name field.
19674    #[deprecated]
19675    pub cluster_id: std::string::String,
19676
19677    /// Required. The labels to set for that cluster.
19678    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
19679
19680    /// Required. The fingerprint of the previous set of labels for this resource,
19681    /// used to detect conflicts. The fingerprint is initially generated by
19682    /// Kubernetes Engine and changes after every request to modify or update
19683    /// labels. You must always provide an up-to-date fingerprint hash when
19684    /// updating or changing labels. Make a `get()` request to the
19685    /// resource to get the latest fingerprint.
19686    pub label_fingerprint: std::string::String,
19687
19688    /// The name (project, location, cluster name) of the cluster to set labels.
19689    /// Specified in the format `projects/*/locations/*/clusters/*`.
19690    pub name: std::string::String,
19691
19692    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19693}
19694
19695impl SetLabelsRequest {
19696    pub fn new() -> Self {
19697        std::default::Default::default()
19698    }
19699
19700    /// Sets the value of [project_id][crate::model::SetLabelsRequest::project_id].
19701    #[deprecated]
19702    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19703        self.project_id = v.into();
19704        self
19705    }
19706
19707    /// Sets the value of [zone][crate::model::SetLabelsRequest::zone].
19708    #[deprecated]
19709    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19710        self.zone = v.into();
19711        self
19712    }
19713
19714    /// Sets the value of [cluster_id][crate::model::SetLabelsRequest::cluster_id].
19715    #[deprecated]
19716    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19717        self.cluster_id = v.into();
19718        self
19719    }
19720
19721    /// Sets the value of [resource_labels][crate::model::SetLabelsRequest::resource_labels].
19722    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
19723    where
19724        T: std::iter::IntoIterator<Item = (K, V)>,
19725        K: std::convert::Into<std::string::String>,
19726        V: std::convert::Into<std::string::String>,
19727    {
19728        use std::iter::Iterator;
19729        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19730        self
19731    }
19732
19733    /// Sets the value of [label_fingerprint][crate::model::SetLabelsRequest::label_fingerprint].
19734    pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
19735        mut self,
19736        v: T,
19737    ) -> Self {
19738        self.label_fingerprint = v.into();
19739        self
19740    }
19741
19742    /// Sets the value of [name][crate::model::SetLabelsRequest::name].
19743    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19744        self.name = v.into();
19745        self
19746    }
19747}
19748
19749impl wkt::message::Message for SetLabelsRequest {
19750    fn typename() -> &'static str {
19751        "type.googleapis.com/google.container.v1.SetLabelsRequest"
19752    }
19753}
19754
19755/// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for
19756/// a cluster.
19757#[derive(Clone, Default, PartialEq)]
19758#[non_exhaustive]
19759pub struct SetLegacyAbacRequest {
19760    /// Deprecated. The Google Developers Console [project ID or project
19761    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
19762    /// This field has been deprecated and replaced by the name field.
19763    #[deprecated]
19764    pub project_id: std::string::String,
19765
19766    /// Deprecated. The name of the Google Compute Engine
19767    /// [zone](https://cloud.google.com/compute/docs/zones#available)
19768    /// in which the cluster resides. This field has been deprecated and replaced
19769    /// by the name field.
19770    #[deprecated]
19771    pub zone: std::string::String,
19772
19773    /// Deprecated. The name of the cluster to update.
19774    /// This field has been deprecated and replaced by the name field.
19775    #[deprecated]
19776    pub cluster_id: std::string::String,
19777
19778    /// Required. Whether ABAC authorization will be enabled in the cluster.
19779    pub enabled: bool,
19780
19781    /// The name (project, location, cluster name) of the cluster to set legacy
19782    /// abac. Specified in the format `projects/*/locations/*/clusters/*`.
19783    pub name: std::string::String,
19784
19785    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19786}
19787
19788impl SetLegacyAbacRequest {
19789    pub fn new() -> Self {
19790        std::default::Default::default()
19791    }
19792
19793    /// Sets the value of [project_id][crate::model::SetLegacyAbacRequest::project_id].
19794    #[deprecated]
19795    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19796        self.project_id = v.into();
19797        self
19798    }
19799
19800    /// Sets the value of [zone][crate::model::SetLegacyAbacRequest::zone].
19801    #[deprecated]
19802    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19803        self.zone = v.into();
19804        self
19805    }
19806
19807    /// Sets the value of [cluster_id][crate::model::SetLegacyAbacRequest::cluster_id].
19808    #[deprecated]
19809    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19810        self.cluster_id = v.into();
19811        self
19812    }
19813
19814    /// Sets the value of [enabled][crate::model::SetLegacyAbacRequest::enabled].
19815    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19816        self.enabled = v.into();
19817        self
19818    }
19819
19820    /// Sets the value of [name][crate::model::SetLegacyAbacRequest::name].
19821    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19822        self.name = v.into();
19823        self
19824    }
19825}
19826
19827impl wkt::message::Message for SetLegacyAbacRequest {
19828    fn typename() -> &'static str {
19829        "type.googleapis.com/google.container.v1.SetLegacyAbacRequest"
19830    }
19831}
19832
19833/// StartIPRotationRequest creates a new IP for the cluster and then performs
19834/// a node upgrade on each node pool to point to the new IP.
19835#[derive(Clone, Default, PartialEq)]
19836#[non_exhaustive]
19837pub struct StartIPRotationRequest {
19838    /// Deprecated. The Google Developers Console [project ID or project
19839    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
19840    /// This field has been deprecated and replaced by the name field.
19841    #[deprecated]
19842    pub project_id: std::string::String,
19843
19844    /// Deprecated. The name of the Google Compute Engine
19845    /// [zone](https://cloud.google.com/compute/docs/zones#available)
19846    /// in which the cluster resides. This field has been deprecated and replaced
19847    /// by the name field.
19848    #[deprecated]
19849    pub zone: std::string::String,
19850
19851    /// Deprecated. The name of the cluster.
19852    /// This field has been deprecated and replaced by the name field.
19853    #[deprecated]
19854    pub cluster_id: std::string::String,
19855
19856    /// The name (project, location, cluster name) of the cluster to start IP
19857    /// rotation. Specified in the format `projects/*/locations/*/clusters/*`.
19858    pub name: std::string::String,
19859
19860    /// Whether to rotate credentials during IP rotation.
19861    pub rotate_credentials: bool,
19862
19863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19864}
19865
19866impl StartIPRotationRequest {
19867    pub fn new() -> Self {
19868        std::default::Default::default()
19869    }
19870
19871    /// Sets the value of [project_id][crate::model::StartIPRotationRequest::project_id].
19872    #[deprecated]
19873    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19874        self.project_id = v.into();
19875        self
19876    }
19877
19878    /// Sets the value of [zone][crate::model::StartIPRotationRequest::zone].
19879    #[deprecated]
19880    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19881        self.zone = v.into();
19882        self
19883    }
19884
19885    /// Sets the value of [cluster_id][crate::model::StartIPRotationRequest::cluster_id].
19886    #[deprecated]
19887    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19888        self.cluster_id = v.into();
19889        self
19890    }
19891
19892    /// Sets the value of [name][crate::model::StartIPRotationRequest::name].
19893    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19894        self.name = v.into();
19895        self
19896    }
19897
19898    /// Sets the value of [rotate_credentials][crate::model::StartIPRotationRequest::rotate_credentials].
19899    pub fn set_rotate_credentials<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19900        self.rotate_credentials = v.into();
19901        self
19902    }
19903}
19904
19905impl wkt::message::Message for StartIPRotationRequest {
19906    fn typename() -> &'static str {
19907        "type.googleapis.com/google.container.v1.StartIPRotationRequest"
19908    }
19909}
19910
19911/// CompleteIPRotationRequest moves the cluster master back into single-IP mode.
19912#[derive(Clone, Default, PartialEq)]
19913#[non_exhaustive]
19914pub struct CompleteIPRotationRequest {
19915    /// Deprecated. The Google Developers Console [project ID or project
19916    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
19917    /// This field has been deprecated and replaced by the name field.
19918    #[deprecated]
19919    pub project_id: std::string::String,
19920
19921    /// Deprecated. The name of the Google Compute Engine
19922    /// [zone](https://cloud.google.com/compute/docs/zones#available)
19923    /// in which the cluster resides. This field has been deprecated and replaced
19924    /// by the name field.
19925    #[deprecated]
19926    pub zone: std::string::String,
19927
19928    /// Deprecated. The name of the cluster.
19929    /// This field has been deprecated and replaced by the name field.
19930    #[deprecated]
19931    pub cluster_id: std::string::String,
19932
19933    /// The name (project, location, cluster name) of the cluster to complete IP
19934    /// rotation. Specified in the format `projects/*/locations/*/clusters/*`.
19935    pub name: std::string::String,
19936
19937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19938}
19939
19940impl CompleteIPRotationRequest {
19941    pub fn new() -> Self {
19942        std::default::Default::default()
19943    }
19944
19945    /// Sets the value of [project_id][crate::model::CompleteIPRotationRequest::project_id].
19946    #[deprecated]
19947    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19948        self.project_id = v.into();
19949        self
19950    }
19951
19952    /// Sets the value of [zone][crate::model::CompleteIPRotationRequest::zone].
19953    #[deprecated]
19954    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19955        self.zone = v.into();
19956        self
19957    }
19958
19959    /// Sets the value of [cluster_id][crate::model::CompleteIPRotationRequest::cluster_id].
19960    #[deprecated]
19961    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19962        self.cluster_id = v.into();
19963        self
19964    }
19965
19966    /// Sets the value of [name][crate::model::CompleteIPRotationRequest::name].
19967    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19968        self.name = v.into();
19969        self
19970    }
19971}
19972
19973impl wkt::message::Message for CompleteIPRotationRequest {
19974    fn typename() -> &'static str {
19975        "type.googleapis.com/google.container.v1.CompleteIPRotationRequest"
19976    }
19977}
19978
19979/// AcceleratorConfig represents a Hardware Accelerator request.
19980#[derive(Clone, Default, PartialEq)]
19981#[non_exhaustive]
19982pub struct AcceleratorConfig {
19983    /// The number of the accelerator cards exposed to an instance.
19984    pub accelerator_count: i64,
19985
19986    /// The accelerator type resource name. List of supported accelerators
19987    /// [here](https://cloud.google.com/compute/docs/gpus)
19988    pub accelerator_type: std::string::String,
19989
19990    /// Size of partitions to create on the GPU. Valid values are described in the
19991    /// NVIDIA [mig user
19992    /// guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).
19993    pub gpu_partition_size: std::string::String,
19994
19995    /// The configuration for GPU sharing options.
19996    pub gpu_sharing_config: std::option::Option<crate::model::GPUSharingConfig>,
19997
19998    /// The configuration for auto installation of GPU driver.
19999    pub gpu_driver_installation_config:
20000        std::option::Option<crate::model::GPUDriverInstallationConfig>,
20001
20002    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20003}
20004
20005impl AcceleratorConfig {
20006    pub fn new() -> Self {
20007        std::default::Default::default()
20008    }
20009
20010    /// Sets the value of [accelerator_count][crate::model::AcceleratorConfig::accelerator_count].
20011    pub fn set_accelerator_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
20012        self.accelerator_count = v.into();
20013        self
20014    }
20015
20016    /// Sets the value of [accelerator_type][crate::model::AcceleratorConfig::accelerator_type].
20017    pub fn set_accelerator_type<T: std::convert::Into<std::string::String>>(
20018        mut self,
20019        v: T,
20020    ) -> Self {
20021        self.accelerator_type = v.into();
20022        self
20023    }
20024
20025    /// Sets the value of [gpu_partition_size][crate::model::AcceleratorConfig::gpu_partition_size].
20026    pub fn set_gpu_partition_size<T: std::convert::Into<std::string::String>>(
20027        mut self,
20028        v: T,
20029    ) -> Self {
20030        self.gpu_partition_size = v.into();
20031        self
20032    }
20033
20034    /// Sets the value of [gpu_sharing_config][crate::model::AcceleratorConfig::gpu_sharing_config].
20035    pub fn set_gpu_sharing_config<T>(mut self, v: T) -> Self
20036    where
20037        T: std::convert::Into<crate::model::GPUSharingConfig>,
20038    {
20039        self.gpu_sharing_config = std::option::Option::Some(v.into());
20040        self
20041    }
20042
20043    /// Sets or clears the value of [gpu_sharing_config][crate::model::AcceleratorConfig::gpu_sharing_config].
20044    pub fn set_or_clear_gpu_sharing_config<T>(mut self, v: std::option::Option<T>) -> Self
20045    where
20046        T: std::convert::Into<crate::model::GPUSharingConfig>,
20047    {
20048        self.gpu_sharing_config = v.map(|x| x.into());
20049        self
20050    }
20051
20052    /// Sets the value of [gpu_driver_installation_config][crate::model::AcceleratorConfig::gpu_driver_installation_config].
20053    pub fn set_gpu_driver_installation_config<T>(mut self, v: T) -> Self
20054    where
20055        T: std::convert::Into<crate::model::GPUDriverInstallationConfig>,
20056    {
20057        self.gpu_driver_installation_config = std::option::Option::Some(v.into());
20058        self
20059    }
20060
20061    /// Sets or clears the value of [gpu_driver_installation_config][crate::model::AcceleratorConfig::gpu_driver_installation_config].
20062    pub fn set_or_clear_gpu_driver_installation_config<T>(
20063        mut self,
20064        v: std::option::Option<T>,
20065    ) -> Self
20066    where
20067        T: std::convert::Into<crate::model::GPUDriverInstallationConfig>,
20068    {
20069        self.gpu_driver_installation_config = v.map(|x| x.into());
20070        self
20071    }
20072}
20073
20074impl wkt::message::Message for AcceleratorConfig {
20075    fn typename() -> &'static str {
20076        "type.googleapis.com/google.container.v1.AcceleratorConfig"
20077    }
20078}
20079
20080/// GPUSharingConfig represents the GPU sharing configuration for Hardware
20081/// Accelerators.
20082#[derive(Clone, Default, PartialEq)]
20083#[non_exhaustive]
20084pub struct GPUSharingConfig {
20085    /// The max number of containers that can share a physical GPU.
20086    pub max_shared_clients_per_gpu: i64,
20087
20088    /// The type of GPU sharing strategy to enable on the GPU node.
20089    pub gpu_sharing_strategy:
20090        std::option::Option<crate::model::gpu_sharing_config::GPUSharingStrategy>,
20091
20092    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20093}
20094
20095impl GPUSharingConfig {
20096    pub fn new() -> Self {
20097        std::default::Default::default()
20098    }
20099
20100    /// Sets the value of [max_shared_clients_per_gpu][crate::model::GPUSharingConfig::max_shared_clients_per_gpu].
20101    pub fn set_max_shared_clients_per_gpu<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
20102        self.max_shared_clients_per_gpu = v.into();
20103        self
20104    }
20105
20106    /// Sets the value of [gpu_sharing_strategy][crate::model::GPUSharingConfig::gpu_sharing_strategy].
20107    pub fn set_gpu_sharing_strategy<T>(mut self, v: T) -> Self
20108    where
20109        T: std::convert::Into<crate::model::gpu_sharing_config::GPUSharingStrategy>,
20110    {
20111        self.gpu_sharing_strategy = std::option::Option::Some(v.into());
20112        self
20113    }
20114
20115    /// Sets or clears the value of [gpu_sharing_strategy][crate::model::GPUSharingConfig::gpu_sharing_strategy].
20116    pub fn set_or_clear_gpu_sharing_strategy<T>(mut self, v: std::option::Option<T>) -> Self
20117    where
20118        T: std::convert::Into<crate::model::gpu_sharing_config::GPUSharingStrategy>,
20119    {
20120        self.gpu_sharing_strategy = v.map(|x| x.into());
20121        self
20122    }
20123}
20124
20125impl wkt::message::Message for GPUSharingConfig {
20126    fn typename() -> &'static str {
20127        "type.googleapis.com/google.container.v1.GPUSharingConfig"
20128    }
20129}
20130
20131/// Defines additional types related to [GPUSharingConfig].
20132pub mod gpu_sharing_config {
20133    #[allow(unused_imports)]
20134    use super::*;
20135
20136    /// The type of GPU sharing strategy currently provided.
20137    ///
20138    /// # Working with unknown values
20139    ///
20140    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20141    /// additional enum variants at any time. Adding new variants is not considered
20142    /// a breaking change. Applications should write their code in anticipation of:
20143    ///
20144    /// - New values appearing in future releases of the client library, **and**
20145    /// - New values received dynamically, without application changes.
20146    ///
20147    /// Please consult the [Working with enums] section in the user guide for some
20148    /// guidelines.
20149    ///
20150    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20151    #[derive(Clone, Debug, PartialEq)]
20152    #[non_exhaustive]
20153    pub enum GPUSharingStrategy {
20154        /// Default value.
20155        Unspecified,
20156        /// GPUs are time-shared between containers.
20157        TimeSharing,
20158        /// GPUs are shared between containers with NVIDIA MPS.
20159        Mps,
20160        /// If set, the enum was initialized with an unknown value.
20161        ///
20162        /// Applications can examine the value using [GPUSharingStrategy::value] or
20163        /// [GPUSharingStrategy::name].
20164        UnknownValue(gpu_sharing_strategy::UnknownValue),
20165    }
20166
20167    #[doc(hidden)]
20168    pub mod gpu_sharing_strategy {
20169        #[allow(unused_imports)]
20170        use super::*;
20171        #[derive(Clone, Debug, PartialEq)]
20172        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20173    }
20174
20175    impl GPUSharingStrategy {
20176        /// Gets the enum value.
20177        ///
20178        /// Returns `None` if the enum contains an unknown value deserialized from
20179        /// the string representation of enums.
20180        pub fn value(&self) -> std::option::Option<i32> {
20181            match self {
20182                Self::Unspecified => std::option::Option::Some(0),
20183                Self::TimeSharing => std::option::Option::Some(1),
20184                Self::Mps => std::option::Option::Some(2),
20185                Self::UnknownValue(u) => u.0.value(),
20186            }
20187        }
20188
20189        /// Gets the enum value as a string.
20190        ///
20191        /// Returns `None` if the enum contains an unknown value deserialized from
20192        /// the integer representation of enums.
20193        pub fn name(&self) -> std::option::Option<&str> {
20194            match self {
20195                Self::Unspecified => std::option::Option::Some("GPU_SHARING_STRATEGY_UNSPECIFIED"),
20196                Self::TimeSharing => std::option::Option::Some("TIME_SHARING"),
20197                Self::Mps => std::option::Option::Some("MPS"),
20198                Self::UnknownValue(u) => u.0.name(),
20199            }
20200        }
20201    }
20202
20203    impl std::default::Default for GPUSharingStrategy {
20204        fn default() -> Self {
20205            use std::convert::From;
20206            Self::from(0)
20207        }
20208    }
20209
20210    impl std::fmt::Display for GPUSharingStrategy {
20211        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20212            wkt::internal::display_enum(f, self.name(), self.value())
20213        }
20214    }
20215
20216    impl std::convert::From<i32> for GPUSharingStrategy {
20217        fn from(value: i32) -> Self {
20218            match value {
20219                0 => Self::Unspecified,
20220                1 => Self::TimeSharing,
20221                2 => Self::Mps,
20222                _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
20223                    wkt::internal::UnknownEnumValue::Integer(value),
20224                )),
20225            }
20226        }
20227    }
20228
20229    impl std::convert::From<&str> for GPUSharingStrategy {
20230        fn from(value: &str) -> Self {
20231            use std::string::ToString;
20232            match value {
20233                "GPU_SHARING_STRATEGY_UNSPECIFIED" => Self::Unspecified,
20234                "TIME_SHARING" => Self::TimeSharing,
20235                "MPS" => Self::Mps,
20236                _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
20237                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20238                )),
20239            }
20240        }
20241    }
20242
20243    impl serde::ser::Serialize for GPUSharingStrategy {
20244        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20245        where
20246            S: serde::Serializer,
20247        {
20248            match self {
20249                Self::Unspecified => serializer.serialize_i32(0),
20250                Self::TimeSharing => serializer.serialize_i32(1),
20251                Self::Mps => serializer.serialize_i32(2),
20252                Self::UnknownValue(u) => u.0.serialize(serializer),
20253            }
20254        }
20255    }
20256
20257    impl<'de> serde::de::Deserialize<'de> for GPUSharingStrategy {
20258        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20259        where
20260            D: serde::Deserializer<'de>,
20261        {
20262            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUSharingStrategy>::new(
20263                ".google.container.v1.GPUSharingConfig.GPUSharingStrategy",
20264            ))
20265        }
20266    }
20267}
20268
20269/// GPUDriverInstallationConfig specifies the version of GPU driver to be auto
20270/// installed.
20271#[derive(Clone, Default, PartialEq)]
20272#[non_exhaustive]
20273pub struct GPUDriverInstallationConfig {
20274    /// Mode for how the GPU driver is installed.
20275    pub gpu_driver_version:
20276        std::option::Option<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
20277
20278    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20279}
20280
20281impl GPUDriverInstallationConfig {
20282    pub fn new() -> Self {
20283        std::default::Default::default()
20284    }
20285
20286    /// Sets the value of [gpu_driver_version][crate::model::GPUDriverInstallationConfig::gpu_driver_version].
20287    pub fn set_gpu_driver_version<T>(mut self, v: T) -> Self
20288    where
20289        T: std::convert::Into<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
20290    {
20291        self.gpu_driver_version = std::option::Option::Some(v.into());
20292        self
20293    }
20294
20295    /// Sets or clears the value of [gpu_driver_version][crate::model::GPUDriverInstallationConfig::gpu_driver_version].
20296    pub fn set_or_clear_gpu_driver_version<T>(mut self, v: std::option::Option<T>) -> Self
20297    where
20298        T: std::convert::Into<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
20299    {
20300        self.gpu_driver_version = v.map(|x| x.into());
20301        self
20302    }
20303}
20304
20305impl wkt::message::Message for GPUDriverInstallationConfig {
20306    fn typename() -> &'static str {
20307        "type.googleapis.com/google.container.v1.GPUDriverInstallationConfig"
20308    }
20309}
20310
20311/// Defines additional types related to [GPUDriverInstallationConfig].
20312pub mod gpu_driver_installation_config {
20313    #[allow(unused_imports)]
20314    use super::*;
20315
20316    /// The GPU driver version to install.
20317    ///
20318    /// # Working with unknown values
20319    ///
20320    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20321    /// additional enum variants at any time. Adding new variants is not considered
20322    /// a breaking change. Applications should write their code in anticipation of:
20323    ///
20324    /// - New values appearing in future releases of the client library, **and**
20325    /// - New values received dynamically, without application changes.
20326    ///
20327    /// Please consult the [Working with enums] section in the user guide for some
20328    /// guidelines.
20329    ///
20330    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20331    #[derive(Clone, Debug, PartialEq)]
20332    #[non_exhaustive]
20333    pub enum GPUDriverVersion {
20334        /// Default value is to not install any GPU driver.
20335        Unspecified,
20336        /// Disable GPU driver auto installation and needs manual installation
20337        InstallationDisabled,
20338        /// "Default" GPU driver in COS and Ubuntu.
20339        Default,
20340        /// "Latest" GPU driver in COS.
20341        Latest,
20342        /// If set, the enum was initialized with an unknown value.
20343        ///
20344        /// Applications can examine the value using [GPUDriverVersion::value] or
20345        /// [GPUDriverVersion::name].
20346        UnknownValue(gpu_driver_version::UnknownValue),
20347    }
20348
20349    #[doc(hidden)]
20350    pub mod gpu_driver_version {
20351        #[allow(unused_imports)]
20352        use super::*;
20353        #[derive(Clone, Debug, PartialEq)]
20354        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20355    }
20356
20357    impl GPUDriverVersion {
20358        /// Gets the enum value.
20359        ///
20360        /// Returns `None` if the enum contains an unknown value deserialized from
20361        /// the string representation of enums.
20362        pub fn value(&self) -> std::option::Option<i32> {
20363            match self {
20364                Self::Unspecified => std::option::Option::Some(0),
20365                Self::InstallationDisabled => std::option::Option::Some(1),
20366                Self::Default => std::option::Option::Some(2),
20367                Self::Latest => std::option::Option::Some(3),
20368                Self::UnknownValue(u) => u.0.value(),
20369            }
20370        }
20371
20372        /// Gets the enum value as a string.
20373        ///
20374        /// Returns `None` if the enum contains an unknown value deserialized from
20375        /// the integer representation of enums.
20376        pub fn name(&self) -> std::option::Option<&str> {
20377            match self {
20378                Self::Unspecified => std::option::Option::Some("GPU_DRIVER_VERSION_UNSPECIFIED"),
20379                Self::InstallationDisabled => std::option::Option::Some("INSTALLATION_DISABLED"),
20380                Self::Default => std::option::Option::Some("DEFAULT"),
20381                Self::Latest => std::option::Option::Some("LATEST"),
20382                Self::UnknownValue(u) => u.0.name(),
20383            }
20384        }
20385    }
20386
20387    impl std::default::Default for GPUDriverVersion {
20388        fn default() -> Self {
20389            use std::convert::From;
20390            Self::from(0)
20391        }
20392    }
20393
20394    impl std::fmt::Display for GPUDriverVersion {
20395        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20396            wkt::internal::display_enum(f, self.name(), self.value())
20397        }
20398    }
20399
20400    impl std::convert::From<i32> for GPUDriverVersion {
20401        fn from(value: i32) -> Self {
20402            match value {
20403                0 => Self::Unspecified,
20404                1 => Self::InstallationDisabled,
20405                2 => Self::Default,
20406                3 => Self::Latest,
20407                _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
20408                    wkt::internal::UnknownEnumValue::Integer(value),
20409                )),
20410            }
20411        }
20412    }
20413
20414    impl std::convert::From<&str> for GPUDriverVersion {
20415        fn from(value: &str) -> Self {
20416            use std::string::ToString;
20417            match value {
20418                "GPU_DRIVER_VERSION_UNSPECIFIED" => Self::Unspecified,
20419                "INSTALLATION_DISABLED" => Self::InstallationDisabled,
20420                "DEFAULT" => Self::Default,
20421                "LATEST" => Self::Latest,
20422                _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
20423                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20424                )),
20425            }
20426        }
20427    }
20428
20429    impl serde::ser::Serialize for GPUDriverVersion {
20430        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20431        where
20432            S: serde::Serializer,
20433        {
20434            match self {
20435                Self::Unspecified => serializer.serialize_i32(0),
20436                Self::InstallationDisabled => serializer.serialize_i32(1),
20437                Self::Default => serializer.serialize_i32(2),
20438                Self::Latest => serializer.serialize_i32(3),
20439                Self::UnknownValue(u) => u.0.serialize(serializer),
20440            }
20441        }
20442    }
20443
20444    impl<'de> serde::de::Deserialize<'de> for GPUDriverVersion {
20445        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20446        where
20447            D: serde::Deserializer<'de>,
20448        {
20449            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUDriverVersion>::new(
20450                ".google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion",
20451            ))
20452        }
20453    }
20454}
20455
20456/// WorkloadMetadataConfig defines the metadata configuration to expose to
20457/// workloads on the node pool.
20458#[derive(Clone, Default, PartialEq)]
20459#[non_exhaustive]
20460pub struct WorkloadMetadataConfig {
20461    /// Mode is the configuration for how to expose metadata to workloads running
20462    /// on the node pool.
20463    pub mode: crate::model::workload_metadata_config::Mode,
20464
20465    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20466}
20467
20468impl WorkloadMetadataConfig {
20469    pub fn new() -> Self {
20470        std::default::Default::default()
20471    }
20472
20473    /// Sets the value of [mode][crate::model::WorkloadMetadataConfig::mode].
20474    pub fn set_mode<T: std::convert::Into<crate::model::workload_metadata_config::Mode>>(
20475        mut self,
20476        v: T,
20477    ) -> Self {
20478        self.mode = v.into();
20479        self
20480    }
20481}
20482
20483impl wkt::message::Message for WorkloadMetadataConfig {
20484    fn typename() -> &'static str {
20485        "type.googleapis.com/google.container.v1.WorkloadMetadataConfig"
20486    }
20487}
20488
20489/// Defines additional types related to [WorkloadMetadataConfig].
20490pub mod workload_metadata_config {
20491    #[allow(unused_imports)]
20492    use super::*;
20493
20494    /// Mode is the configuration for how to expose metadata to workloads running
20495    /// on the node.
20496    ///
20497    /// # Working with unknown values
20498    ///
20499    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20500    /// additional enum variants at any time. Adding new variants is not considered
20501    /// a breaking change. Applications should write their code in anticipation of:
20502    ///
20503    /// - New values appearing in future releases of the client library, **and**
20504    /// - New values received dynamically, without application changes.
20505    ///
20506    /// Please consult the [Working with enums] section in the user guide for some
20507    /// guidelines.
20508    ///
20509    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20510    #[derive(Clone, Debug, PartialEq)]
20511    #[non_exhaustive]
20512    pub enum Mode {
20513        /// Not set.
20514        Unspecified,
20515        /// Expose all Compute Engine metadata to pods.
20516        GceMetadata,
20517        /// Run the GKE Metadata Server on this node. The GKE Metadata Server exposes
20518        /// a metadata API to workloads that is compatible with the V1 Compute
20519        /// Metadata APIs exposed by the Compute Engine and App Engine Metadata
20520        /// Servers. This feature can only be enabled if Workload Identity is enabled
20521        /// at the cluster level.
20522        GkeMetadata,
20523        /// If set, the enum was initialized with an unknown value.
20524        ///
20525        /// Applications can examine the value using [Mode::value] or
20526        /// [Mode::name].
20527        UnknownValue(mode::UnknownValue),
20528    }
20529
20530    #[doc(hidden)]
20531    pub mod mode {
20532        #[allow(unused_imports)]
20533        use super::*;
20534        #[derive(Clone, Debug, PartialEq)]
20535        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20536    }
20537
20538    impl Mode {
20539        /// Gets the enum value.
20540        ///
20541        /// Returns `None` if the enum contains an unknown value deserialized from
20542        /// the string representation of enums.
20543        pub fn value(&self) -> std::option::Option<i32> {
20544            match self {
20545                Self::Unspecified => std::option::Option::Some(0),
20546                Self::GceMetadata => std::option::Option::Some(1),
20547                Self::GkeMetadata => std::option::Option::Some(2),
20548                Self::UnknownValue(u) => u.0.value(),
20549            }
20550        }
20551
20552        /// Gets the enum value as a string.
20553        ///
20554        /// Returns `None` if the enum contains an unknown value deserialized from
20555        /// the integer representation of enums.
20556        pub fn name(&self) -> std::option::Option<&str> {
20557            match self {
20558                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
20559                Self::GceMetadata => std::option::Option::Some("GCE_METADATA"),
20560                Self::GkeMetadata => std::option::Option::Some("GKE_METADATA"),
20561                Self::UnknownValue(u) => u.0.name(),
20562            }
20563        }
20564    }
20565
20566    impl std::default::Default for Mode {
20567        fn default() -> Self {
20568            use std::convert::From;
20569            Self::from(0)
20570        }
20571    }
20572
20573    impl std::fmt::Display for Mode {
20574        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20575            wkt::internal::display_enum(f, self.name(), self.value())
20576        }
20577    }
20578
20579    impl std::convert::From<i32> for Mode {
20580        fn from(value: i32) -> Self {
20581            match value {
20582                0 => Self::Unspecified,
20583                1 => Self::GceMetadata,
20584                2 => Self::GkeMetadata,
20585                _ => Self::UnknownValue(mode::UnknownValue(
20586                    wkt::internal::UnknownEnumValue::Integer(value),
20587                )),
20588            }
20589        }
20590    }
20591
20592    impl std::convert::From<&str> for Mode {
20593        fn from(value: &str) -> Self {
20594            use std::string::ToString;
20595            match value {
20596                "MODE_UNSPECIFIED" => Self::Unspecified,
20597                "GCE_METADATA" => Self::GceMetadata,
20598                "GKE_METADATA" => Self::GkeMetadata,
20599                _ => Self::UnknownValue(mode::UnknownValue(
20600                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20601                )),
20602            }
20603        }
20604    }
20605
20606    impl serde::ser::Serialize for Mode {
20607        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20608        where
20609            S: serde::Serializer,
20610        {
20611            match self {
20612                Self::Unspecified => serializer.serialize_i32(0),
20613                Self::GceMetadata => serializer.serialize_i32(1),
20614                Self::GkeMetadata => serializer.serialize_i32(2),
20615                Self::UnknownValue(u) => u.0.serialize(serializer),
20616            }
20617        }
20618    }
20619
20620    impl<'de> serde::de::Deserialize<'de> for Mode {
20621        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20622        where
20623            D: serde::Deserializer<'de>,
20624        {
20625            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
20626                ".google.container.v1.WorkloadMetadataConfig.Mode",
20627            ))
20628        }
20629    }
20630}
20631
20632/// SetNetworkPolicyRequest enables/disables network policy for a cluster.
20633#[derive(Clone, Default, PartialEq)]
20634#[non_exhaustive]
20635pub struct SetNetworkPolicyRequest {
20636    /// Deprecated. The Google Developers Console [project ID or project
20637    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
20638    /// This field has been deprecated and replaced by the name field.
20639    #[deprecated]
20640    pub project_id: std::string::String,
20641
20642    /// Deprecated. The name of the Google Compute Engine
20643    /// [zone](https://cloud.google.com/compute/docs/zones#available)
20644    /// in which the cluster resides. This field has been deprecated and replaced
20645    /// by the name field.
20646    #[deprecated]
20647    pub zone: std::string::String,
20648
20649    /// Deprecated. The name of the cluster.
20650    /// This field has been deprecated and replaced by the name field.
20651    #[deprecated]
20652    pub cluster_id: std::string::String,
20653
20654    /// Required. Configuration options for the NetworkPolicy feature.
20655    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
20656
20657    /// The name (project, location, cluster name) of the cluster to set networking
20658    /// policy. Specified in the format `projects/*/locations/*/clusters/*`.
20659    pub name: std::string::String,
20660
20661    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20662}
20663
20664impl SetNetworkPolicyRequest {
20665    pub fn new() -> Self {
20666        std::default::Default::default()
20667    }
20668
20669    /// Sets the value of [project_id][crate::model::SetNetworkPolicyRequest::project_id].
20670    #[deprecated]
20671    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20672        self.project_id = v.into();
20673        self
20674    }
20675
20676    /// Sets the value of [zone][crate::model::SetNetworkPolicyRequest::zone].
20677    #[deprecated]
20678    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20679        self.zone = v.into();
20680        self
20681    }
20682
20683    /// Sets the value of [cluster_id][crate::model::SetNetworkPolicyRequest::cluster_id].
20684    #[deprecated]
20685    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20686        self.cluster_id = v.into();
20687        self
20688    }
20689
20690    /// Sets the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
20691    pub fn set_network_policy<T>(mut self, v: T) -> Self
20692    where
20693        T: std::convert::Into<crate::model::NetworkPolicy>,
20694    {
20695        self.network_policy = std::option::Option::Some(v.into());
20696        self
20697    }
20698
20699    /// Sets or clears the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
20700    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
20701    where
20702        T: std::convert::Into<crate::model::NetworkPolicy>,
20703    {
20704        self.network_policy = v.map(|x| x.into());
20705        self
20706    }
20707
20708    /// Sets the value of [name][crate::model::SetNetworkPolicyRequest::name].
20709    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20710        self.name = v.into();
20711        self
20712    }
20713}
20714
20715impl wkt::message::Message for SetNetworkPolicyRequest {
20716    fn typename() -> &'static str {
20717        "type.googleapis.com/google.container.v1.SetNetworkPolicyRequest"
20718    }
20719}
20720
20721/// SetMaintenancePolicyRequest sets the maintenance policy for a cluster.
20722#[derive(Clone, Default, PartialEq)]
20723#[non_exhaustive]
20724pub struct SetMaintenancePolicyRequest {
20725    /// Required. The Google Developers Console [project ID or project
20726    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
20727    pub project_id: std::string::String,
20728
20729    /// Required. The name of the Google Compute Engine
20730    /// [zone](https://cloud.google.com/compute/docs/zones#available)
20731    /// in which the cluster resides.
20732    pub zone: std::string::String,
20733
20734    /// Required. The name of the cluster to update.
20735    pub cluster_id: std::string::String,
20736
20737    /// Required. The maintenance policy to be set for the cluster. An empty field
20738    /// clears the existing maintenance policy.
20739    pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
20740
20741    /// The name (project, location, cluster name) of the cluster to set
20742    /// maintenance policy.
20743    /// Specified in the format `projects/*/locations/*/clusters/*`.
20744    pub name: std::string::String,
20745
20746    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20747}
20748
20749impl SetMaintenancePolicyRequest {
20750    pub fn new() -> Self {
20751        std::default::Default::default()
20752    }
20753
20754    /// Sets the value of [project_id][crate::model::SetMaintenancePolicyRequest::project_id].
20755    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20756        self.project_id = v.into();
20757        self
20758    }
20759
20760    /// Sets the value of [zone][crate::model::SetMaintenancePolicyRequest::zone].
20761    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20762        self.zone = v.into();
20763        self
20764    }
20765
20766    /// Sets the value of [cluster_id][crate::model::SetMaintenancePolicyRequest::cluster_id].
20767    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20768        self.cluster_id = v.into();
20769        self
20770    }
20771
20772    /// Sets the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
20773    pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
20774    where
20775        T: std::convert::Into<crate::model::MaintenancePolicy>,
20776    {
20777        self.maintenance_policy = std::option::Option::Some(v.into());
20778        self
20779    }
20780
20781    /// Sets or clears the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
20782    pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
20783    where
20784        T: std::convert::Into<crate::model::MaintenancePolicy>,
20785    {
20786        self.maintenance_policy = v.map(|x| x.into());
20787        self
20788    }
20789
20790    /// Sets the value of [name][crate::model::SetMaintenancePolicyRequest::name].
20791    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20792        self.name = v.into();
20793        self
20794    }
20795}
20796
20797impl wkt::message::Message for SetMaintenancePolicyRequest {
20798    fn typename() -> &'static str {
20799        "type.googleapis.com/google.container.v1.SetMaintenancePolicyRequest"
20800    }
20801}
20802
20803/// StatusCondition describes why a cluster or a node pool has a certain status
20804/// (e.g., ERROR or DEGRADED).
20805#[derive(Clone, Default, PartialEq)]
20806#[non_exhaustive]
20807pub struct StatusCondition {
20808    /// Machine-friendly representation of the condition
20809    /// Deprecated. Use canonical_code instead.
20810    #[deprecated]
20811    pub code: crate::model::status_condition::Code,
20812
20813    /// Human-friendly representation of the condition
20814    pub message: std::string::String,
20815
20816    /// Canonical code of the condition.
20817    pub canonical_code: rpc::model::Code,
20818
20819    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20820}
20821
20822impl StatusCondition {
20823    pub fn new() -> Self {
20824        std::default::Default::default()
20825    }
20826
20827    /// Sets the value of [code][crate::model::StatusCondition::code].
20828    #[deprecated]
20829    pub fn set_code<T: std::convert::Into<crate::model::status_condition::Code>>(
20830        mut self,
20831        v: T,
20832    ) -> Self {
20833        self.code = v.into();
20834        self
20835    }
20836
20837    /// Sets the value of [message][crate::model::StatusCondition::message].
20838    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20839        self.message = v.into();
20840        self
20841    }
20842
20843    /// Sets the value of [canonical_code][crate::model::StatusCondition::canonical_code].
20844    pub fn set_canonical_code<T: std::convert::Into<rpc::model::Code>>(mut self, v: T) -> Self {
20845        self.canonical_code = v.into();
20846        self
20847    }
20848}
20849
20850impl wkt::message::Message for StatusCondition {
20851    fn typename() -> &'static str {
20852        "type.googleapis.com/google.container.v1.StatusCondition"
20853    }
20854}
20855
20856/// Defines additional types related to [StatusCondition].
20857pub mod status_condition {
20858    #[allow(unused_imports)]
20859    use super::*;
20860
20861    /// Code for each condition
20862    ///
20863    /// # Working with unknown values
20864    ///
20865    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20866    /// additional enum variants at any time. Adding new variants is not considered
20867    /// a breaking change. Applications should write their code in anticipation of:
20868    ///
20869    /// - New values appearing in future releases of the client library, **and**
20870    /// - New values received dynamically, without application changes.
20871    ///
20872    /// Please consult the [Working with enums] section in the user guide for some
20873    /// guidelines.
20874    ///
20875    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20876    #[derive(Clone, Debug, PartialEq)]
20877    #[non_exhaustive]
20878    pub enum Code {
20879        /// UNKNOWN indicates a generic condition.
20880        Unknown,
20881        /// GCE_STOCKOUT indicates that Google Compute Engine resources are
20882        /// temporarily unavailable.
20883        GceStockout,
20884        /// GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot
20885        /// service account.
20886        GkeServiceAccountDeleted,
20887        /// Google Compute Engine quota was exceeded.
20888        GceQuotaExceeded,
20889        /// Cluster state was manually changed by an SRE due to a system logic error.
20890        SetByOperator,
20891        /// Unable to perform an encrypt operation against the CloudKMS key used for
20892        /// etcd level encryption.
20893        CloudKmsKeyError,
20894        /// Cluster CA is expiring soon.
20895        CaExpiring,
20896        /// Node service account is missing permissions.
20897        NodeServiceAccountMissingPermissions,
20898        /// Cloud KMS key version used for etcd level encryption has been destroyed.
20899        /// This is a permanent error.
20900        CloudKmsKeyDestroyed,
20901        /// If set, the enum was initialized with an unknown value.
20902        ///
20903        /// Applications can examine the value using [Code::value] or
20904        /// [Code::name].
20905        UnknownValue(code::UnknownValue),
20906    }
20907
20908    #[doc(hidden)]
20909    pub mod code {
20910        #[allow(unused_imports)]
20911        use super::*;
20912        #[derive(Clone, Debug, PartialEq)]
20913        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20914    }
20915
20916    impl Code {
20917        /// Gets the enum value.
20918        ///
20919        /// Returns `None` if the enum contains an unknown value deserialized from
20920        /// the string representation of enums.
20921        pub fn value(&self) -> std::option::Option<i32> {
20922            match self {
20923                Self::Unknown => std::option::Option::Some(0),
20924                Self::GceStockout => std::option::Option::Some(1),
20925                Self::GkeServiceAccountDeleted => std::option::Option::Some(2),
20926                Self::GceQuotaExceeded => std::option::Option::Some(3),
20927                Self::SetByOperator => std::option::Option::Some(4),
20928                Self::CloudKmsKeyError => std::option::Option::Some(7),
20929                Self::CaExpiring => std::option::Option::Some(9),
20930                Self::NodeServiceAccountMissingPermissions => std::option::Option::Some(10),
20931                Self::CloudKmsKeyDestroyed => std::option::Option::Some(11),
20932                Self::UnknownValue(u) => u.0.value(),
20933            }
20934        }
20935
20936        /// Gets the enum value as a string.
20937        ///
20938        /// Returns `None` if the enum contains an unknown value deserialized from
20939        /// the integer representation of enums.
20940        pub fn name(&self) -> std::option::Option<&str> {
20941            match self {
20942                Self::Unknown => std::option::Option::Some("UNKNOWN"),
20943                Self::GceStockout => std::option::Option::Some("GCE_STOCKOUT"),
20944                Self::GkeServiceAccountDeleted => {
20945                    std::option::Option::Some("GKE_SERVICE_ACCOUNT_DELETED")
20946                }
20947                Self::GceQuotaExceeded => std::option::Option::Some("GCE_QUOTA_EXCEEDED"),
20948                Self::SetByOperator => std::option::Option::Some("SET_BY_OPERATOR"),
20949                Self::CloudKmsKeyError => std::option::Option::Some("CLOUD_KMS_KEY_ERROR"),
20950                Self::CaExpiring => std::option::Option::Some("CA_EXPIRING"),
20951                Self::NodeServiceAccountMissingPermissions => {
20952                    std::option::Option::Some("NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS")
20953                }
20954                Self::CloudKmsKeyDestroyed => std::option::Option::Some("CLOUD_KMS_KEY_DESTROYED"),
20955                Self::UnknownValue(u) => u.0.name(),
20956            }
20957        }
20958    }
20959
20960    impl std::default::Default for Code {
20961        fn default() -> Self {
20962            use std::convert::From;
20963            Self::from(0)
20964        }
20965    }
20966
20967    impl std::fmt::Display for Code {
20968        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20969            wkt::internal::display_enum(f, self.name(), self.value())
20970        }
20971    }
20972
20973    impl std::convert::From<i32> for Code {
20974        fn from(value: i32) -> Self {
20975            match value {
20976                0 => Self::Unknown,
20977                1 => Self::GceStockout,
20978                2 => Self::GkeServiceAccountDeleted,
20979                3 => Self::GceQuotaExceeded,
20980                4 => Self::SetByOperator,
20981                7 => Self::CloudKmsKeyError,
20982                9 => Self::CaExpiring,
20983                10 => Self::NodeServiceAccountMissingPermissions,
20984                11 => Self::CloudKmsKeyDestroyed,
20985                _ => Self::UnknownValue(code::UnknownValue(
20986                    wkt::internal::UnknownEnumValue::Integer(value),
20987                )),
20988            }
20989        }
20990    }
20991
20992    impl std::convert::From<&str> for Code {
20993        fn from(value: &str) -> Self {
20994            use std::string::ToString;
20995            match value {
20996                "UNKNOWN" => Self::Unknown,
20997                "GCE_STOCKOUT" => Self::GceStockout,
20998                "GKE_SERVICE_ACCOUNT_DELETED" => Self::GkeServiceAccountDeleted,
20999                "GCE_QUOTA_EXCEEDED" => Self::GceQuotaExceeded,
21000                "SET_BY_OPERATOR" => Self::SetByOperator,
21001                "CLOUD_KMS_KEY_ERROR" => Self::CloudKmsKeyError,
21002                "CA_EXPIRING" => Self::CaExpiring,
21003                "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS" => {
21004                    Self::NodeServiceAccountMissingPermissions
21005                }
21006                "CLOUD_KMS_KEY_DESTROYED" => Self::CloudKmsKeyDestroyed,
21007                _ => Self::UnknownValue(code::UnknownValue(
21008                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21009                )),
21010            }
21011        }
21012    }
21013
21014    impl serde::ser::Serialize for Code {
21015        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21016        where
21017            S: serde::Serializer,
21018        {
21019            match self {
21020                Self::Unknown => serializer.serialize_i32(0),
21021                Self::GceStockout => serializer.serialize_i32(1),
21022                Self::GkeServiceAccountDeleted => serializer.serialize_i32(2),
21023                Self::GceQuotaExceeded => serializer.serialize_i32(3),
21024                Self::SetByOperator => serializer.serialize_i32(4),
21025                Self::CloudKmsKeyError => serializer.serialize_i32(7),
21026                Self::CaExpiring => serializer.serialize_i32(9),
21027                Self::NodeServiceAccountMissingPermissions => serializer.serialize_i32(10),
21028                Self::CloudKmsKeyDestroyed => serializer.serialize_i32(11),
21029                Self::UnknownValue(u) => u.0.serialize(serializer),
21030            }
21031        }
21032    }
21033
21034    impl<'de> serde::de::Deserialize<'de> for Code {
21035        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21036        where
21037            D: serde::Deserializer<'de>,
21038        {
21039            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Code>::new(
21040                ".google.container.v1.StatusCondition.Code",
21041            ))
21042        }
21043    }
21044}
21045
21046/// NetworkConfig reports the relative names of network & subnetwork.
21047#[derive(Clone, Default, PartialEq)]
21048#[non_exhaustive]
21049pub struct NetworkConfig {
21050    /// Output only. The relative name of the Google Compute Engine
21051    /// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
21052    /// to which the cluster is connected. Example:
21053    /// projects/my-project/global/networks/my-network
21054    pub network: std::string::String,
21055
21056    /// Output only. The relative name of the Google Compute Engine
21057    /// [subnetwork](https://cloud.google.com/compute/docs/vpc)
21058    /// to which the cluster is connected. Example:
21059    /// projects/my-project/regions/us-central1/subnetworks/my-subnet
21060    pub subnetwork: std::string::String,
21061
21062    /// Whether Intra-node visibility is enabled for this cluster.
21063    /// This makes same node pod to pod traffic visible for VPC network.
21064    pub enable_intra_node_visibility: bool,
21065
21066    /// Whether the cluster disables default in-node sNAT rules. In-node sNAT rules
21067    /// will be disabled when default_snat_status is disabled. When disabled is set
21068    /// to false, default IP masquerade rules will be applied to the nodes to
21069    /// prevent sNAT on cluster internal traffic.
21070    pub default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
21071
21072    /// Whether L4ILB Subsetting is enabled for this cluster.
21073    pub enable_l4ilb_subsetting: bool,
21074
21075    /// The desired datapath provider for this cluster. By default, uses the
21076    /// IPTables-based kube-proxy implementation.
21077    pub datapath_provider: crate::model::DatapathProvider,
21078
21079    /// The desired state of IPv6 connectivity to Google Services.
21080    /// By default, no private IPv6 access to or from Google Services (all access
21081    /// will be via IPv4)
21082    pub private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
21083
21084    /// DNSConfig contains clusterDNS config for this cluster.
21085    pub dns_config: std::option::Option<crate::model::DNSConfig>,
21086
21087    /// ServiceExternalIPsConfig specifies if services with externalIPs field are
21088    /// blocked or not.
21089    pub service_external_ips_config: std::option::Option<crate::model::ServiceExternalIPsConfig>,
21090
21091    /// GatewayAPIConfig contains the desired config of Gateway API on this
21092    /// cluster.
21093    pub gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
21094
21095    /// Whether multi-networking is enabled for this cluster.
21096    pub enable_multi_networking: bool,
21097
21098    /// Network bandwidth tier configuration.
21099    pub network_performance_config:
21100        std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
21101
21102    /// Whether FQDN Network Policy is enabled on this cluster.
21103    pub enable_fqdn_network_policy: std::option::Option<bool>,
21104
21105    /// Specify the details of in-transit encryption.
21106    /// Now named inter-node transparent encryption.
21107    pub in_transit_encryption_config: std::option::Option<crate::model::InTransitEncryptionConfig>,
21108
21109    /// Whether CiliumClusterwideNetworkPolicy is enabled on this cluster.
21110    pub enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
21111
21112    /// Controls whether by default nodes have private IP addresses only.
21113    /// It is invalid to specify both [PrivateClusterConfig.enablePrivateNodes][]
21114    /// and this field at the same time.
21115    /// To update the default setting, use
21116    /// [ClusterUpdate.desired_default_enable_private_nodes][google.container.v1.ClusterUpdate.desired_default_enable_private_nodes]
21117    ///
21118    /// [google.container.v1.ClusterUpdate.desired_default_enable_private_nodes]: crate::model::ClusterUpdate::desired_default_enable_private_nodes
21119    pub default_enable_private_nodes: std::option::Option<bool>,
21120
21121    /// Disable L4 load balancer VPC firewalls to enable firewall policies.
21122    pub disable_l4_lb_firewall_reconciliation: std::option::Option<bool>,
21123
21124    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21125}
21126
21127impl NetworkConfig {
21128    pub fn new() -> Self {
21129        std::default::Default::default()
21130    }
21131
21132    /// Sets the value of [network][crate::model::NetworkConfig::network].
21133    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21134        self.network = v.into();
21135        self
21136    }
21137
21138    /// Sets the value of [subnetwork][crate::model::NetworkConfig::subnetwork].
21139    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21140        self.subnetwork = v.into();
21141        self
21142    }
21143
21144    /// Sets the value of [enable_intra_node_visibility][crate::model::NetworkConfig::enable_intra_node_visibility].
21145    pub fn set_enable_intra_node_visibility<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21146        self.enable_intra_node_visibility = v.into();
21147        self
21148    }
21149
21150    /// Sets the value of [default_snat_status][crate::model::NetworkConfig::default_snat_status].
21151    pub fn set_default_snat_status<T>(mut self, v: T) -> Self
21152    where
21153        T: std::convert::Into<crate::model::DefaultSnatStatus>,
21154    {
21155        self.default_snat_status = std::option::Option::Some(v.into());
21156        self
21157    }
21158
21159    /// Sets or clears the value of [default_snat_status][crate::model::NetworkConfig::default_snat_status].
21160    pub fn set_or_clear_default_snat_status<T>(mut self, v: std::option::Option<T>) -> Self
21161    where
21162        T: std::convert::Into<crate::model::DefaultSnatStatus>,
21163    {
21164        self.default_snat_status = v.map(|x| x.into());
21165        self
21166    }
21167
21168    /// Sets the value of [enable_l4ilb_subsetting][crate::model::NetworkConfig::enable_l4ilb_subsetting].
21169    pub fn set_enable_l4ilb_subsetting<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21170        self.enable_l4ilb_subsetting = v.into();
21171        self
21172    }
21173
21174    /// Sets the value of [datapath_provider][crate::model::NetworkConfig::datapath_provider].
21175    pub fn set_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
21176        mut self,
21177        v: T,
21178    ) -> Self {
21179        self.datapath_provider = v.into();
21180        self
21181    }
21182
21183    /// Sets the value of [private_ipv6_google_access][crate::model::NetworkConfig::private_ipv6_google_access].
21184    pub fn set_private_ipv6_google_access<
21185        T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
21186    >(
21187        mut self,
21188        v: T,
21189    ) -> Self {
21190        self.private_ipv6_google_access = v.into();
21191        self
21192    }
21193
21194    /// Sets the value of [dns_config][crate::model::NetworkConfig::dns_config].
21195    pub fn set_dns_config<T>(mut self, v: T) -> Self
21196    where
21197        T: std::convert::Into<crate::model::DNSConfig>,
21198    {
21199        self.dns_config = std::option::Option::Some(v.into());
21200        self
21201    }
21202
21203    /// Sets or clears the value of [dns_config][crate::model::NetworkConfig::dns_config].
21204    pub fn set_or_clear_dns_config<T>(mut self, v: std::option::Option<T>) -> Self
21205    where
21206        T: std::convert::Into<crate::model::DNSConfig>,
21207    {
21208        self.dns_config = v.map(|x| x.into());
21209        self
21210    }
21211
21212    /// Sets the value of [service_external_ips_config][crate::model::NetworkConfig::service_external_ips_config].
21213    pub fn set_service_external_ips_config<T>(mut self, v: T) -> Self
21214    where
21215        T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
21216    {
21217        self.service_external_ips_config = std::option::Option::Some(v.into());
21218        self
21219    }
21220
21221    /// Sets or clears the value of [service_external_ips_config][crate::model::NetworkConfig::service_external_ips_config].
21222    pub fn set_or_clear_service_external_ips_config<T>(mut self, v: std::option::Option<T>) -> Self
21223    where
21224        T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
21225    {
21226        self.service_external_ips_config = v.map(|x| x.into());
21227        self
21228    }
21229
21230    /// Sets the value of [gateway_api_config][crate::model::NetworkConfig::gateway_api_config].
21231    pub fn set_gateway_api_config<T>(mut self, v: T) -> Self
21232    where
21233        T: std::convert::Into<crate::model::GatewayAPIConfig>,
21234    {
21235        self.gateway_api_config = std::option::Option::Some(v.into());
21236        self
21237    }
21238
21239    /// Sets or clears the value of [gateway_api_config][crate::model::NetworkConfig::gateway_api_config].
21240    pub fn set_or_clear_gateway_api_config<T>(mut self, v: std::option::Option<T>) -> Self
21241    where
21242        T: std::convert::Into<crate::model::GatewayAPIConfig>,
21243    {
21244        self.gateway_api_config = v.map(|x| x.into());
21245        self
21246    }
21247
21248    /// Sets the value of [enable_multi_networking][crate::model::NetworkConfig::enable_multi_networking].
21249    pub fn set_enable_multi_networking<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21250        self.enable_multi_networking = v.into();
21251        self
21252    }
21253
21254    /// Sets the value of [network_performance_config][crate::model::NetworkConfig::network_performance_config].
21255    pub fn set_network_performance_config<T>(mut self, v: T) -> Self
21256    where
21257        T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
21258    {
21259        self.network_performance_config = std::option::Option::Some(v.into());
21260        self
21261    }
21262
21263    /// Sets or clears the value of [network_performance_config][crate::model::NetworkConfig::network_performance_config].
21264    pub fn set_or_clear_network_performance_config<T>(mut self, v: std::option::Option<T>) -> Self
21265    where
21266        T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
21267    {
21268        self.network_performance_config = v.map(|x| x.into());
21269        self
21270    }
21271
21272    /// Sets the value of [enable_fqdn_network_policy][crate::model::NetworkConfig::enable_fqdn_network_policy].
21273    pub fn set_enable_fqdn_network_policy<T>(mut self, v: T) -> Self
21274    where
21275        T: std::convert::Into<bool>,
21276    {
21277        self.enable_fqdn_network_policy = std::option::Option::Some(v.into());
21278        self
21279    }
21280
21281    /// Sets or clears the value of [enable_fqdn_network_policy][crate::model::NetworkConfig::enable_fqdn_network_policy].
21282    pub fn set_or_clear_enable_fqdn_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
21283    where
21284        T: std::convert::Into<bool>,
21285    {
21286        self.enable_fqdn_network_policy = v.map(|x| x.into());
21287        self
21288    }
21289
21290    /// Sets the value of [in_transit_encryption_config][crate::model::NetworkConfig::in_transit_encryption_config].
21291    pub fn set_in_transit_encryption_config<T>(mut self, v: T) -> Self
21292    where
21293        T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
21294    {
21295        self.in_transit_encryption_config = std::option::Option::Some(v.into());
21296        self
21297    }
21298
21299    /// Sets or clears the value of [in_transit_encryption_config][crate::model::NetworkConfig::in_transit_encryption_config].
21300    pub fn set_or_clear_in_transit_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
21301    where
21302        T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
21303    {
21304        self.in_transit_encryption_config = v.map(|x| x.into());
21305        self
21306    }
21307
21308    /// Sets the value of [enable_cilium_clusterwide_network_policy][crate::model::NetworkConfig::enable_cilium_clusterwide_network_policy].
21309    pub fn set_enable_cilium_clusterwide_network_policy<T>(mut self, v: T) -> Self
21310    where
21311        T: std::convert::Into<bool>,
21312    {
21313        self.enable_cilium_clusterwide_network_policy = std::option::Option::Some(v.into());
21314        self
21315    }
21316
21317    /// Sets or clears the value of [enable_cilium_clusterwide_network_policy][crate::model::NetworkConfig::enable_cilium_clusterwide_network_policy].
21318    pub fn set_or_clear_enable_cilium_clusterwide_network_policy<T>(
21319        mut self,
21320        v: std::option::Option<T>,
21321    ) -> Self
21322    where
21323        T: std::convert::Into<bool>,
21324    {
21325        self.enable_cilium_clusterwide_network_policy = v.map(|x| x.into());
21326        self
21327    }
21328
21329    /// Sets the value of [default_enable_private_nodes][crate::model::NetworkConfig::default_enable_private_nodes].
21330    pub fn set_default_enable_private_nodes<T>(mut self, v: T) -> Self
21331    where
21332        T: std::convert::Into<bool>,
21333    {
21334        self.default_enable_private_nodes = std::option::Option::Some(v.into());
21335        self
21336    }
21337
21338    /// Sets or clears the value of [default_enable_private_nodes][crate::model::NetworkConfig::default_enable_private_nodes].
21339    pub fn set_or_clear_default_enable_private_nodes<T>(mut self, v: std::option::Option<T>) -> Self
21340    where
21341        T: std::convert::Into<bool>,
21342    {
21343        self.default_enable_private_nodes = v.map(|x| x.into());
21344        self
21345    }
21346
21347    /// Sets the value of [disable_l4_lb_firewall_reconciliation][crate::model::NetworkConfig::disable_l4_lb_firewall_reconciliation].
21348    pub fn set_disable_l4_lb_firewall_reconciliation<T>(mut self, v: T) -> Self
21349    where
21350        T: std::convert::Into<bool>,
21351    {
21352        self.disable_l4_lb_firewall_reconciliation = std::option::Option::Some(v.into());
21353        self
21354    }
21355
21356    /// Sets or clears the value of [disable_l4_lb_firewall_reconciliation][crate::model::NetworkConfig::disable_l4_lb_firewall_reconciliation].
21357    pub fn set_or_clear_disable_l4_lb_firewall_reconciliation<T>(
21358        mut self,
21359        v: std::option::Option<T>,
21360    ) -> Self
21361    where
21362        T: std::convert::Into<bool>,
21363    {
21364        self.disable_l4_lb_firewall_reconciliation = v.map(|x| x.into());
21365        self
21366    }
21367}
21368
21369impl wkt::message::Message for NetworkConfig {
21370    fn typename() -> &'static str {
21371        "type.googleapis.com/google.container.v1.NetworkConfig"
21372    }
21373}
21374
21375/// Defines additional types related to [NetworkConfig].
21376pub mod network_config {
21377    #[allow(unused_imports)]
21378    use super::*;
21379
21380    /// Configuration of network bandwidth tiers
21381    #[derive(Clone, Default, PartialEq)]
21382    #[non_exhaustive]
21383    pub struct ClusterNetworkPerformanceConfig {
21384        /// Specifies the total network bandwidth tier for NodePools in the cluster.
21385        pub total_egress_bandwidth_tier: std::option::Option<
21386            crate::model::network_config::cluster_network_performance_config::Tier,
21387        >,
21388
21389        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21390    }
21391
21392    impl ClusterNetworkPerformanceConfig {
21393        pub fn new() -> Self {
21394            std::default::Default::default()
21395        }
21396
21397        /// Sets the value of [total_egress_bandwidth_tier][crate::model::network_config::ClusterNetworkPerformanceConfig::total_egress_bandwidth_tier].
21398        pub fn set_total_egress_bandwidth_tier<T>(mut self, v: T) -> Self
21399        where
21400            T: std::convert::Into<
21401                    crate::model::network_config::cluster_network_performance_config::Tier,
21402                >,
21403        {
21404            self.total_egress_bandwidth_tier = std::option::Option::Some(v.into());
21405            self
21406        }
21407
21408        /// Sets or clears the value of [total_egress_bandwidth_tier][crate::model::network_config::ClusterNetworkPerformanceConfig::total_egress_bandwidth_tier].
21409        pub fn set_or_clear_total_egress_bandwidth_tier<T>(
21410            mut self,
21411            v: std::option::Option<T>,
21412        ) -> Self
21413        where
21414            T: std::convert::Into<
21415                    crate::model::network_config::cluster_network_performance_config::Tier,
21416                >,
21417        {
21418            self.total_egress_bandwidth_tier = v.map(|x| x.into());
21419            self
21420        }
21421    }
21422
21423    impl wkt::message::Message for ClusterNetworkPerformanceConfig {
21424        fn typename() -> &'static str {
21425            "type.googleapis.com/google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig"
21426        }
21427    }
21428
21429    /// Defines additional types related to [ClusterNetworkPerformanceConfig].
21430    pub mod cluster_network_performance_config {
21431        #[allow(unused_imports)]
21432        use super::*;
21433
21434        /// Node network tier
21435        ///
21436        /// # Working with unknown values
21437        ///
21438        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21439        /// additional enum variants at any time. Adding new variants is not considered
21440        /// a breaking change. Applications should write their code in anticipation of:
21441        ///
21442        /// - New values appearing in future releases of the client library, **and**
21443        /// - New values received dynamically, without application changes.
21444        ///
21445        /// Please consult the [Working with enums] section in the user guide for some
21446        /// guidelines.
21447        ///
21448        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21449        #[derive(Clone, Debug, PartialEq)]
21450        #[non_exhaustive]
21451        pub enum Tier {
21452            /// Default value
21453            Unspecified,
21454            /// Higher bandwidth, actual values based on VM size.
21455            Tier1,
21456            /// If set, the enum was initialized with an unknown value.
21457            ///
21458            /// Applications can examine the value using [Tier::value] or
21459            /// [Tier::name].
21460            UnknownValue(tier::UnknownValue),
21461        }
21462
21463        #[doc(hidden)]
21464        pub mod tier {
21465            #[allow(unused_imports)]
21466            use super::*;
21467            #[derive(Clone, Debug, PartialEq)]
21468            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21469        }
21470
21471        impl Tier {
21472            /// Gets the enum value.
21473            ///
21474            /// Returns `None` if the enum contains an unknown value deserialized from
21475            /// the string representation of enums.
21476            pub fn value(&self) -> std::option::Option<i32> {
21477                match self {
21478                    Self::Unspecified => std::option::Option::Some(0),
21479                    Self::Tier1 => std::option::Option::Some(1),
21480                    Self::UnknownValue(u) => u.0.value(),
21481                }
21482            }
21483
21484            /// Gets the enum value as a string.
21485            ///
21486            /// Returns `None` if the enum contains an unknown value deserialized from
21487            /// the integer representation of enums.
21488            pub fn name(&self) -> std::option::Option<&str> {
21489                match self {
21490                    Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
21491                    Self::Tier1 => std::option::Option::Some("TIER_1"),
21492                    Self::UnknownValue(u) => u.0.name(),
21493                }
21494            }
21495        }
21496
21497        impl std::default::Default for Tier {
21498            fn default() -> Self {
21499                use std::convert::From;
21500                Self::from(0)
21501            }
21502        }
21503
21504        impl std::fmt::Display for Tier {
21505            fn fmt(
21506                &self,
21507                f: &mut std::fmt::Formatter<'_>,
21508            ) -> std::result::Result<(), std::fmt::Error> {
21509                wkt::internal::display_enum(f, self.name(), self.value())
21510            }
21511        }
21512
21513        impl std::convert::From<i32> for Tier {
21514            fn from(value: i32) -> Self {
21515                match value {
21516                    0 => Self::Unspecified,
21517                    1 => Self::Tier1,
21518                    _ => Self::UnknownValue(tier::UnknownValue(
21519                        wkt::internal::UnknownEnumValue::Integer(value),
21520                    )),
21521                }
21522            }
21523        }
21524
21525        impl std::convert::From<&str> for Tier {
21526            fn from(value: &str) -> Self {
21527                use std::string::ToString;
21528                match value {
21529                    "TIER_UNSPECIFIED" => Self::Unspecified,
21530                    "TIER_1" => Self::Tier1,
21531                    _ => Self::UnknownValue(tier::UnknownValue(
21532                        wkt::internal::UnknownEnumValue::String(value.to_string()),
21533                    )),
21534                }
21535            }
21536        }
21537
21538        impl serde::ser::Serialize for Tier {
21539            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21540            where
21541                S: serde::Serializer,
21542            {
21543                match self {
21544                    Self::Unspecified => serializer.serialize_i32(0),
21545                    Self::Tier1 => serializer.serialize_i32(1),
21546                    Self::UnknownValue(u) => u.0.serialize(serializer),
21547                }
21548            }
21549        }
21550
21551        impl<'de> serde::de::Deserialize<'de> for Tier {
21552            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21553            where
21554                D: serde::Deserializer<'de>,
21555            {
21556                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
21557                    ".google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier",
21558                ))
21559            }
21560        }
21561    }
21562}
21563
21564/// GatewayAPIConfig contains the desired config of Gateway API on this cluster.
21565#[derive(Clone, Default, PartialEq)]
21566#[non_exhaustive]
21567pub struct GatewayAPIConfig {
21568    /// The Gateway API release channel to use for Gateway API.
21569    pub channel: crate::model::gateway_api_config::Channel,
21570
21571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21572}
21573
21574impl GatewayAPIConfig {
21575    pub fn new() -> Self {
21576        std::default::Default::default()
21577    }
21578
21579    /// Sets the value of [channel][crate::model::GatewayAPIConfig::channel].
21580    pub fn set_channel<T: std::convert::Into<crate::model::gateway_api_config::Channel>>(
21581        mut self,
21582        v: T,
21583    ) -> Self {
21584        self.channel = v.into();
21585        self
21586    }
21587}
21588
21589impl wkt::message::Message for GatewayAPIConfig {
21590    fn typename() -> &'static str {
21591        "type.googleapis.com/google.container.v1.GatewayAPIConfig"
21592    }
21593}
21594
21595/// Defines additional types related to [GatewayAPIConfig].
21596pub mod gateway_api_config {
21597    #[allow(unused_imports)]
21598    use super::*;
21599
21600    /// Channel describes if/how Gateway API should be installed and implemented in
21601    /// a cluster.
21602    ///
21603    /// # Working with unknown values
21604    ///
21605    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21606    /// additional enum variants at any time. Adding new variants is not considered
21607    /// a breaking change. Applications should write their code in anticipation of:
21608    ///
21609    /// - New values appearing in future releases of the client library, **and**
21610    /// - New values received dynamically, without application changes.
21611    ///
21612    /// Please consult the [Working with enums] section in the user guide for some
21613    /// guidelines.
21614    ///
21615    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21616    #[derive(Clone, Debug, PartialEq)]
21617    #[non_exhaustive]
21618    pub enum Channel {
21619        /// Default value.
21620        Unspecified,
21621        /// Gateway API support is disabled
21622        Disabled,
21623        /// Deprecated: use CHANNEL_STANDARD instead.
21624        /// Gateway API support is enabled, experimental CRDs are installed
21625        #[deprecated]
21626        Experimental,
21627        /// Gateway API support is enabled, standard CRDs are installed
21628        Standard,
21629        /// If set, the enum was initialized with an unknown value.
21630        ///
21631        /// Applications can examine the value using [Channel::value] or
21632        /// [Channel::name].
21633        UnknownValue(channel::UnknownValue),
21634    }
21635
21636    #[doc(hidden)]
21637    pub mod channel {
21638        #[allow(unused_imports)]
21639        use super::*;
21640        #[derive(Clone, Debug, PartialEq)]
21641        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21642    }
21643
21644    impl Channel {
21645        /// Gets the enum value.
21646        ///
21647        /// Returns `None` if the enum contains an unknown value deserialized from
21648        /// the string representation of enums.
21649        pub fn value(&self) -> std::option::Option<i32> {
21650            match self {
21651                Self::Unspecified => std::option::Option::Some(0),
21652                Self::Disabled => std::option::Option::Some(1),
21653                Self::Experimental => std::option::Option::Some(3),
21654                Self::Standard => std::option::Option::Some(4),
21655                Self::UnknownValue(u) => u.0.value(),
21656            }
21657        }
21658
21659        /// Gets the enum value as a string.
21660        ///
21661        /// Returns `None` if the enum contains an unknown value deserialized from
21662        /// the integer representation of enums.
21663        pub fn name(&self) -> std::option::Option<&str> {
21664            match self {
21665                Self::Unspecified => std::option::Option::Some("CHANNEL_UNSPECIFIED"),
21666                Self::Disabled => std::option::Option::Some("CHANNEL_DISABLED"),
21667                Self::Experimental => std::option::Option::Some("CHANNEL_EXPERIMENTAL"),
21668                Self::Standard => std::option::Option::Some("CHANNEL_STANDARD"),
21669                Self::UnknownValue(u) => u.0.name(),
21670            }
21671        }
21672    }
21673
21674    impl std::default::Default for Channel {
21675        fn default() -> Self {
21676            use std::convert::From;
21677            Self::from(0)
21678        }
21679    }
21680
21681    impl std::fmt::Display for Channel {
21682        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21683            wkt::internal::display_enum(f, self.name(), self.value())
21684        }
21685    }
21686
21687    impl std::convert::From<i32> for Channel {
21688        fn from(value: i32) -> Self {
21689            match value {
21690                0 => Self::Unspecified,
21691                1 => Self::Disabled,
21692                3 => Self::Experimental,
21693                4 => Self::Standard,
21694                _ => Self::UnknownValue(channel::UnknownValue(
21695                    wkt::internal::UnknownEnumValue::Integer(value),
21696                )),
21697            }
21698        }
21699    }
21700
21701    impl std::convert::From<&str> for Channel {
21702        fn from(value: &str) -> Self {
21703            use std::string::ToString;
21704            match value {
21705                "CHANNEL_UNSPECIFIED" => Self::Unspecified,
21706                "CHANNEL_DISABLED" => Self::Disabled,
21707                "CHANNEL_EXPERIMENTAL" => Self::Experimental,
21708                "CHANNEL_STANDARD" => Self::Standard,
21709                _ => Self::UnknownValue(channel::UnknownValue(
21710                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21711                )),
21712            }
21713        }
21714    }
21715
21716    impl serde::ser::Serialize for Channel {
21717        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21718        where
21719            S: serde::Serializer,
21720        {
21721            match self {
21722                Self::Unspecified => serializer.serialize_i32(0),
21723                Self::Disabled => serializer.serialize_i32(1),
21724                Self::Experimental => serializer.serialize_i32(3),
21725                Self::Standard => serializer.serialize_i32(4),
21726                Self::UnknownValue(u) => u.0.serialize(serializer),
21727            }
21728        }
21729    }
21730
21731    impl<'de> serde::de::Deserialize<'de> for Channel {
21732        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21733        where
21734            D: serde::Deserializer<'de>,
21735        {
21736            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
21737                ".google.container.v1.GatewayAPIConfig.Channel",
21738            ))
21739        }
21740    }
21741}
21742
21743/// Config to block services with externalIPs field.
21744#[derive(Clone, Default, PartialEq)]
21745#[non_exhaustive]
21746pub struct ServiceExternalIPsConfig {
21747    /// Whether Services with ExternalIPs field are allowed or not.
21748    pub enabled: bool,
21749
21750    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21751}
21752
21753impl ServiceExternalIPsConfig {
21754    pub fn new() -> Self {
21755        std::default::Default::default()
21756    }
21757
21758    /// Sets the value of [enabled][crate::model::ServiceExternalIPsConfig::enabled].
21759    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21760        self.enabled = v.into();
21761        self
21762    }
21763}
21764
21765impl wkt::message::Message for ServiceExternalIPsConfig {
21766    fn typename() -> &'static str {
21767        "type.googleapis.com/google.container.v1.ServiceExternalIPsConfig"
21768    }
21769}
21770
21771/// GetOpenIDConfigRequest gets the OIDC discovery document for the
21772/// cluster. See the OpenID Connect Discovery 1.0 specification for details.
21773#[derive(Clone, Default, PartialEq)]
21774#[non_exhaustive]
21775pub struct GetOpenIDConfigRequest {
21776    /// The cluster (project, location, cluster name) to get the discovery document
21777    /// for. Specified in the format `projects/*/locations/*/clusters/*`.
21778    pub parent: std::string::String,
21779
21780    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21781}
21782
21783impl GetOpenIDConfigRequest {
21784    pub fn new() -> Self {
21785        std::default::Default::default()
21786    }
21787
21788    /// Sets the value of [parent][crate::model::GetOpenIDConfigRequest::parent].
21789    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21790        self.parent = v.into();
21791        self
21792    }
21793}
21794
21795impl wkt::message::Message for GetOpenIDConfigRequest {
21796    fn typename() -> &'static str {
21797        "type.googleapis.com/google.container.v1.GetOpenIDConfigRequest"
21798    }
21799}
21800
21801/// GetOpenIDConfigResponse is an OIDC discovery document for the cluster.
21802/// See the OpenID Connect Discovery 1.0 specification for details.
21803#[derive(Clone, Default, PartialEq)]
21804#[non_exhaustive]
21805pub struct GetOpenIDConfigResponse {
21806    /// OIDC Issuer.
21807    pub issuer: std::string::String,
21808
21809    /// JSON Web Key uri.
21810    pub jwks_uri: std::string::String,
21811
21812    /// Supported response types.
21813    pub response_types_supported: std::vec::Vec<std::string::String>,
21814
21815    /// Supported subject types.
21816    pub subject_types_supported: std::vec::Vec<std::string::String>,
21817
21818    /// supported ID Token signing Algorithms.
21819    pub id_token_signing_alg_values_supported: std::vec::Vec<std::string::String>,
21820
21821    /// Supported claims.
21822    pub claims_supported: std::vec::Vec<std::string::String>,
21823
21824    /// Supported grant types.
21825    pub grant_types: std::vec::Vec<std::string::String>,
21826
21827    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21828}
21829
21830impl GetOpenIDConfigResponse {
21831    pub fn new() -> Self {
21832        std::default::Default::default()
21833    }
21834
21835    /// Sets the value of [issuer][crate::model::GetOpenIDConfigResponse::issuer].
21836    pub fn set_issuer<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21837        self.issuer = v.into();
21838        self
21839    }
21840
21841    /// Sets the value of [jwks_uri][crate::model::GetOpenIDConfigResponse::jwks_uri].
21842    pub fn set_jwks_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21843        self.jwks_uri = v.into();
21844        self
21845    }
21846
21847    /// Sets the value of [response_types_supported][crate::model::GetOpenIDConfigResponse::response_types_supported].
21848    pub fn set_response_types_supported<T, V>(mut self, v: T) -> Self
21849    where
21850        T: std::iter::IntoIterator<Item = V>,
21851        V: std::convert::Into<std::string::String>,
21852    {
21853        use std::iter::Iterator;
21854        self.response_types_supported = v.into_iter().map(|i| i.into()).collect();
21855        self
21856    }
21857
21858    /// Sets the value of [subject_types_supported][crate::model::GetOpenIDConfigResponse::subject_types_supported].
21859    pub fn set_subject_types_supported<T, V>(mut self, v: T) -> Self
21860    where
21861        T: std::iter::IntoIterator<Item = V>,
21862        V: std::convert::Into<std::string::String>,
21863    {
21864        use std::iter::Iterator;
21865        self.subject_types_supported = v.into_iter().map(|i| i.into()).collect();
21866        self
21867    }
21868
21869    /// Sets the value of [id_token_signing_alg_values_supported][crate::model::GetOpenIDConfigResponse::id_token_signing_alg_values_supported].
21870    pub fn set_id_token_signing_alg_values_supported<T, V>(mut self, v: T) -> Self
21871    where
21872        T: std::iter::IntoIterator<Item = V>,
21873        V: std::convert::Into<std::string::String>,
21874    {
21875        use std::iter::Iterator;
21876        self.id_token_signing_alg_values_supported = v.into_iter().map(|i| i.into()).collect();
21877        self
21878    }
21879
21880    /// Sets the value of [claims_supported][crate::model::GetOpenIDConfigResponse::claims_supported].
21881    pub fn set_claims_supported<T, V>(mut self, v: T) -> Self
21882    where
21883        T: std::iter::IntoIterator<Item = V>,
21884        V: std::convert::Into<std::string::String>,
21885    {
21886        use std::iter::Iterator;
21887        self.claims_supported = v.into_iter().map(|i| i.into()).collect();
21888        self
21889    }
21890
21891    /// Sets the value of [grant_types][crate::model::GetOpenIDConfigResponse::grant_types].
21892    pub fn set_grant_types<T, V>(mut self, v: T) -> Self
21893    where
21894        T: std::iter::IntoIterator<Item = V>,
21895        V: std::convert::Into<std::string::String>,
21896    {
21897        use std::iter::Iterator;
21898        self.grant_types = v.into_iter().map(|i| i.into()).collect();
21899        self
21900    }
21901}
21902
21903impl wkt::message::Message for GetOpenIDConfigResponse {
21904    fn typename() -> &'static str {
21905        "type.googleapis.com/google.container.v1.GetOpenIDConfigResponse"
21906    }
21907}
21908
21909/// GetJSONWebKeysRequest gets the public component of the keys used by the
21910/// cluster to sign token requests. This will be the jwks_uri for the discover
21911/// document returned by getOpenIDConfig. See the OpenID Connect
21912/// Discovery 1.0 specification for details.
21913#[derive(Clone, Default, PartialEq)]
21914#[non_exhaustive]
21915pub struct GetJSONWebKeysRequest {
21916    /// The cluster (project, location, cluster name) to get keys for. Specified in
21917    /// the format `projects/*/locations/*/clusters/*`.
21918    pub parent: std::string::String,
21919
21920    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21921}
21922
21923impl GetJSONWebKeysRequest {
21924    pub fn new() -> Self {
21925        std::default::Default::default()
21926    }
21927
21928    /// Sets the value of [parent][crate::model::GetJSONWebKeysRequest::parent].
21929    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21930        self.parent = v.into();
21931        self
21932    }
21933}
21934
21935impl wkt::message::Message for GetJSONWebKeysRequest {
21936    fn typename() -> &'static str {
21937        "type.googleapis.com/google.container.v1.GetJSONWebKeysRequest"
21938    }
21939}
21940
21941/// Jwk is a JSON Web Key as specified in RFC 7517
21942#[derive(Clone, Default, PartialEq)]
21943#[non_exhaustive]
21944pub struct Jwk {
21945    /// Key Type.
21946    pub kty: std::string::String,
21947
21948    /// Algorithm.
21949    pub alg: std::string::String,
21950
21951    /// Permitted uses for the public keys.
21952    pub r#use: std::string::String,
21953
21954    /// Key ID.
21955    pub kid: std::string::String,
21956
21957    /// Used for RSA keys.
21958    pub n: std::string::String,
21959
21960    /// Used for RSA keys.
21961    pub e: std::string::String,
21962
21963    /// Used for ECDSA keys.
21964    pub x: std::string::String,
21965
21966    /// Used for ECDSA keys.
21967    pub y: std::string::String,
21968
21969    /// Used for ECDSA keys.
21970    pub crv: std::string::String,
21971
21972    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21973}
21974
21975impl Jwk {
21976    pub fn new() -> Self {
21977        std::default::Default::default()
21978    }
21979
21980    /// Sets the value of [kty][crate::model::Jwk::kty].
21981    pub fn set_kty<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21982        self.kty = v.into();
21983        self
21984    }
21985
21986    /// Sets the value of [alg][crate::model::Jwk::alg].
21987    pub fn set_alg<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21988        self.alg = v.into();
21989        self
21990    }
21991
21992    /// Sets the value of [r#use][crate::model::Jwk::use].
21993    pub fn set_use<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21994        self.r#use = v.into();
21995        self
21996    }
21997
21998    /// Sets the value of [kid][crate::model::Jwk::kid].
21999    pub fn set_kid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22000        self.kid = v.into();
22001        self
22002    }
22003
22004    /// Sets the value of [n][crate::model::Jwk::n].
22005    pub fn set_n<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22006        self.n = v.into();
22007        self
22008    }
22009
22010    /// Sets the value of [e][crate::model::Jwk::e].
22011    pub fn set_e<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22012        self.e = v.into();
22013        self
22014    }
22015
22016    /// Sets the value of [x][crate::model::Jwk::x].
22017    pub fn set_x<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22018        self.x = v.into();
22019        self
22020    }
22021
22022    /// Sets the value of [y][crate::model::Jwk::y].
22023    pub fn set_y<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22024        self.y = v.into();
22025        self
22026    }
22027
22028    /// Sets the value of [crv][crate::model::Jwk::crv].
22029    pub fn set_crv<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22030        self.crv = v.into();
22031        self
22032    }
22033}
22034
22035impl wkt::message::Message for Jwk {
22036    fn typename() -> &'static str {
22037        "type.googleapis.com/google.container.v1.Jwk"
22038    }
22039}
22040
22041/// GetJSONWebKeysResponse is a valid JSON Web Key Set as specified in rfc 7517
22042#[derive(Clone, Default, PartialEq)]
22043#[non_exhaustive]
22044pub struct GetJSONWebKeysResponse {
22045    /// The public component of the keys used by the cluster to sign token
22046    /// requests.
22047    pub keys: std::vec::Vec<crate::model::Jwk>,
22048
22049    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22050}
22051
22052impl GetJSONWebKeysResponse {
22053    pub fn new() -> Self {
22054        std::default::Default::default()
22055    }
22056
22057    /// Sets the value of [keys][crate::model::GetJSONWebKeysResponse::keys].
22058    pub fn set_keys<T, V>(mut self, v: T) -> Self
22059    where
22060        T: std::iter::IntoIterator<Item = V>,
22061        V: std::convert::Into<crate::model::Jwk>,
22062    {
22063        use std::iter::Iterator;
22064        self.keys = v.into_iter().map(|i| i.into()).collect();
22065        self
22066    }
22067}
22068
22069impl wkt::message::Message for GetJSONWebKeysResponse {
22070    fn typename() -> &'static str {
22071        "type.googleapis.com/google.container.v1.GetJSONWebKeysResponse"
22072    }
22073}
22074
22075/// CheckAutopilotCompatibilityRequest requests getting the blockers for the
22076/// given operation in the cluster.
22077#[derive(Clone, Default, PartialEq)]
22078#[non_exhaustive]
22079pub struct CheckAutopilotCompatibilityRequest {
22080    /// The name (project, location, cluster) of the cluster to retrieve.
22081    /// Specified in the format `projects/*/locations/*/clusters/*`.
22082    pub name: std::string::String,
22083
22084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22085}
22086
22087impl CheckAutopilotCompatibilityRequest {
22088    pub fn new() -> Self {
22089        std::default::Default::default()
22090    }
22091
22092    /// Sets the value of [name][crate::model::CheckAutopilotCompatibilityRequest::name].
22093    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22094        self.name = v.into();
22095        self
22096    }
22097}
22098
22099impl wkt::message::Message for CheckAutopilotCompatibilityRequest {
22100    fn typename() -> &'static str {
22101        "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityRequest"
22102    }
22103}
22104
22105/// AutopilotCompatibilityIssue contains information about a specific
22106/// compatibility issue with Autopilot mode.
22107#[derive(Clone, Default, PartialEq)]
22108#[non_exhaustive]
22109pub struct AutopilotCompatibilityIssue {
22110    /// The last time when this issue was observed.
22111    pub last_observation: std::option::Option<wkt::Timestamp>,
22112
22113    /// The constraint type of the issue.
22114    pub constraint_type: std::string::String,
22115
22116    /// The incompatibility type of this issue.
22117    pub incompatibility_type: crate::model::autopilot_compatibility_issue::IssueType,
22118
22119    /// The name of the resources which are subject to this issue.
22120    pub subjects: std::vec::Vec<std::string::String>,
22121
22122    /// A URL to a public documentation, which addresses resolving this issue.
22123    pub documentation_url: std::string::String,
22124
22125    /// The description of the issue.
22126    pub description: std::string::String,
22127
22128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22129}
22130
22131impl AutopilotCompatibilityIssue {
22132    pub fn new() -> Self {
22133        std::default::Default::default()
22134    }
22135
22136    /// Sets the value of [last_observation][crate::model::AutopilotCompatibilityIssue::last_observation].
22137    pub fn set_last_observation<T>(mut self, v: T) -> Self
22138    where
22139        T: std::convert::Into<wkt::Timestamp>,
22140    {
22141        self.last_observation = std::option::Option::Some(v.into());
22142        self
22143    }
22144
22145    /// Sets or clears the value of [last_observation][crate::model::AutopilotCompatibilityIssue::last_observation].
22146    pub fn set_or_clear_last_observation<T>(mut self, v: std::option::Option<T>) -> Self
22147    where
22148        T: std::convert::Into<wkt::Timestamp>,
22149    {
22150        self.last_observation = v.map(|x| x.into());
22151        self
22152    }
22153
22154    /// Sets the value of [constraint_type][crate::model::AutopilotCompatibilityIssue::constraint_type].
22155    pub fn set_constraint_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22156        self.constraint_type = v.into();
22157        self
22158    }
22159
22160    /// Sets the value of [incompatibility_type][crate::model::AutopilotCompatibilityIssue::incompatibility_type].
22161    pub fn set_incompatibility_type<
22162        T: std::convert::Into<crate::model::autopilot_compatibility_issue::IssueType>,
22163    >(
22164        mut self,
22165        v: T,
22166    ) -> Self {
22167        self.incompatibility_type = v.into();
22168        self
22169    }
22170
22171    /// Sets the value of [subjects][crate::model::AutopilotCompatibilityIssue::subjects].
22172    pub fn set_subjects<T, V>(mut self, v: T) -> Self
22173    where
22174        T: std::iter::IntoIterator<Item = V>,
22175        V: std::convert::Into<std::string::String>,
22176    {
22177        use std::iter::Iterator;
22178        self.subjects = v.into_iter().map(|i| i.into()).collect();
22179        self
22180    }
22181
22182    /// Sets the value of [documentation_url][crate::model::AutopilotCompatibilityIssue::documentation_url].
22183    pub fn set_documentation_url<T: std::convert::Into<std::string::String>>(
22184        mut self,
22185        v: T,
22186    ) -> Self {
22187        self.documentation_url = v.into();
22188        self
22189    }
22190
22191    /// Sets the value of [description][crate::model::AutopilotCompatibilityIssue::description].
22192    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22193        self.description = v.into();
22194        self
22195    }
22196}
22197
22198impl wkt::message::Message for AutopilotCompatibilityIssue {
22199    fn typename() -> &'static str {
22200        "type.googleapis.com/google.container.v1.AutopilotCompatibilityIssue"
22201    }
22202}
22203
22204/// Defines additional types related to [AutopilotCompatibilityIssue].
22205pub mod autopilot_compatibility_issue {
22206    #[allow(unused_imports)]
22207    use super::*;
22208
22209    /// The type of the reported issue.
22210    ///
22211    /// # Working with unknown values
22212    ///
22213    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22214    /// additional enum variants at any time. Adding new variants is not considered
22215    /// a breaking change. Applications should write their code in anticipation of:
22216    ///
22217    /// - New values appearing in future releases of the client library, **and**
22218    /// - New values received dynamically, without application changes.
22219    ///
22220    /// Please consult the [Working with enums] section in the user guide for some
22221    /// guidelines.
22222    ///
22223    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22224    #[derive(Clone, Debug, PartialEq)]
22225    #[non_exhaustive]
22226    pub enum IssueType {
22227        /// Default value, should not be used.
22228        Unspecified,
22229        /// Indicates that the issue is a known incompatibility between the
22230        /// cluster and Autopilot mode.
22231        Incompatibility,
22232        /// Indicates the issue is an incompatibility if customers take no further
22233        /// action to resolve.
22234        AdditionalConfigRequired,
22235        /// Indicates the issue is not an incompatibility, but depending on the
22236        /// workloads business logic, there is a potential that they won't work on
22237        /// Autopilot.
22238        PassedWithOptionalConfig,
22239        /// If set, the enum was initialized with an unknown value.
22240        ///
22241        /// Applications can examine the value using [IssueType::value] or
22242        /// [IssueType::name].
22243        UnknownValue(issue_type::UnknownValue),
22244    }
22245
22246    #[doc(hidden)]
22247    pub mod issue_type {
22248        #[allow(unused_imports)]
22249        use super::*;
22250        #[derive(Clone, Debug, PartialEq)]
22251        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22252    }
22253
22254    impl IssueType {
22255        /// Gets the enum value.
22256        ///
22257        /// Returns `None` if the enum contains an unknown value deserialized from
22258        /// the string representation of enums.
22259        pub fn value(&self) -> std::option::Option<i32> {
22260            match self {
22261                Self::Unspecified => std::option::Option::Some(0),
22262                Self::Incompatibility => std::option::Option::Some(1),
22263                Self::AdditionalConfigRequired => std::option::Option::Some(2),
22264                Self::PassedWithOptionalConfig => std::option::Option::Some(3),
22265                Self::UnknownValue(u) => u.0.value(),
22266            }
22267        }
22268
22269        /// Gets the enum value as a string.
22270        ///
22271        /// Returns `None` if the enum contains an unknown value deserialized from
22272        /// the integer representation of enums.
22273        pub fn name(&self) -> std::option::Option<&str> {
22274            match self {
22275                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
22276                Self::Incompatibility => std::option::Option::Some("INCOMPATIBILITY"),
22277                Self::AdditionalConfigRequired => {
22278                    std::option::Option::Some("ADDITIONAL_CONFIG_REQUIRED")
22279                }
22280                Self::PassedWithOptionalConfig => {
22281                    std::option::Option::Some("PASSED_WITH_OPTIONAL_CONFIG")
22282                }
22283                Self::UnknownValue(u) => u.0.name(),
22284            }
22285        }
22286    }
22287
22288    impl std::default::Default for IssueType {
22289        fn default() -> Self {
22290            use std::convert::From;
22291            Self::from(0)
22292        }
22293    }
22294
22295    impl std::fmt::Display for IssueType {
22296        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22297            wkt::internal::display_enum(f, self.name(), self.value())
22298        }
22299    }
22300
22301    impl std::convert::From<i32> for IssueType {
22302        fn from(value: i32) -> Self {
22303            match value {
22304                0 => Self::Unspecified,
22305                1 => Self::Incompatibility,
22306                2 => Self::AdditionalConfigRequired,
22307                3 => Self::PassedWithOptionalConfig,
22308                _ => Self::UnknownValue(issue_type::UnknownValue(
22309                    wkt::internal::UnknownEnumValue::Integer(value),
22310                )),
22311            }
22312        }
22313    }
22314
22315    impl std::convert::From<&str> for IssueType {
22316        fn from(value: &str) -> Self {
22317            use std::string::ToString;
22318            match value {
22319                "UNSPECIFIED" => Self::Unspecified,
22320                "INCOMPATIBILITY" => Self::Incompatibility,
22321                "ADDITIONAL_CONFIG_REQUIRED" => Self::AdditionalConfigRequired,
22322                "PASSED_WITH_OPTIONAL_CONFIG" => Self::PassedWithOptionalConfig,
22323                _ => Self::UnknownValue(issue_type::UnknownValue(
22324                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22325                )),
22326            }
22327        }
22328    }
22329
22330    impl serde::ser::Serialize for IssueType {
22331        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22332        where
22333            S: serde::Serializer,
22334        {
22335            match self {
22336                Self::Unspecified => serializer.serialize_i32(0),
22337                Self::Incompatibility => serializer.serialize_i32(1),
22338                Self::AdditionalConfigRequired => serializer.serialize_i32(2),
22339                Self::PassedWithOptionalConfig => serializer.serialize_i32(3),
22340                Self::UnknownValue(u) => u.0.serialize(serializer),
22341            }
22342        }
22343    }
22344
22345    impl<'de> serde::de::Deserialize<'de> for IssueType {
22346        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22347        where
22348            D: serde::Deserializer<'de>,
22349        {
22350            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IssueType>::new(
22351                ".google.container.v1.AutopilotCompatibilityIssue.IssueType",
22352            ))
22353        }
22354    }
22355}
22356
22357/// CheckAutopilotCompatibilityResponse has a list of compatibility issues.
22358#[derive(Clone, Default, PartialEq)]
22359#[non_exhaustive]
22360pub struct CheckAutopilotCompatibilityResponse {
22361    /// The list of issues for the given operation.
22362    pub issues: std::vec::Vec<crate::model::AutopilotCompatibilityIssue>,
22363
22364    /// The summary of the autopilot compatibility response.
22365    pub summary: std::string::String,
22366
22367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22368}
22369
22370impl CheckAutopilotCompatibilityResponse {
22371    pub fn new() -> Self {
22372        std::default::Default::default()
22373    }
22374
22375    /// Sets the value of [issues][crate::model::CheckAutopilotCompatibilityResponse::issues].
22376    pub fn set_issues<T, V>(mut self, v: T) -> Self
22377    where
22378        T: std::iter::IntoIterator<Item = V>,
22379        V: std::convert::Into<crate::model::AutopilotCompatibilityIssue>,
22380    {
22381        use std::iter::Iterator;
22382        self.issues = v.into_iter().map(|i| i.into()).collect();
22383        self
22384    }
22385
22386    /// Sets the value of [summary][crate::model::CheckAutopilotCompatibilityResponse::summary].
22387    pub fn set_summary<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22388        self.summary = v.into();
22389        self
22390    }
22391}
22392
22393impl wkt::message::Message for CheckAutopilotCompatibilityResponse {
22394    fn typename() -> &'static str {
22395        "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityResponse"
22396    }
22397}
22398
22399/// ReleaseChannel indicates which release channel a cluster is
22400/// subscribed to. Release channels are arranged in order of risk.
22401///
22402/// When a cluster is subscribed to a release channel, Google maintains
22403/// both the master version and the node version. Node auto-upgrade
22404/// defaults to true and cannot be disabled.
22405#[derive(Clone, Default, PartialEq)]
22406#[non_exhaustive]
22407pub struct ReleaseChannel {
22408    /// channel specifies which release channel the cluster is subscribed to.
22409    pub channel: crate::model::release_channel::Channel,
22410
22411    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22412}
22413
22414impl ReleaseChannel {
22415    pub fn new() -> Self {
22416        std::default::Default::default()
22417    }
22418
22419    /// Sets the value of [channel][crate::model::ReleaseChannel::channel].
22420    pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
22421        mut self,
22422        v: T,
22423    ) -> Self {
22424        self.channel = v.into();
22425        self
22426    }
22427}
22428
22429impl wkt::message::Message for ReleaseChannel {
22430    fn typename() -> &'static str {
22431        "type.googleapis.com/google.container.v1.ReleaseChannel"
22432    }
22433}
22434
22435/// Defines additional types related to [ReleaseChannel].
22436pub mod release_channel {
22437    #[allow(unused_imports)]
22438    use super::*;
22439
22440    /// Possible values for 'channel'.
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 Channel {
22458        /// No channel specified.
22459        Unspecified,
22460        /// RAPID channel is offered on an early access basis for customers who want
22461        /// to test new releases.
22462        ///
22463        /// WARNING: Versions available in the RAPID Channel may be subject to
22464        /// unresolved issues with no known workaround and are not subject to any
22465        /// SLAs.
22466        Rapid,
22467        /// Clusters subscribed to REGULAR receive versions that are considered GA
22468        /// quality. REGULAR is intended for production users who want to take
22469        /// advantage of new features.
22470        Regular,
22471        /// Clusters subscribed to STABLE receive versions that are known to be
22472        /// stable and reliable in production.
22473        Stable,
22474        /// Clusters subscribed to EXTENDED receive extended support and availability
22475        /// for versions which are known to be stable and reliable in production.
22476        Extended,
22477        /// If set, the enum was initialized with an unknown value.
22478        ///
22479        /// Applications can examine the value using [Channel::value] or
22480        /// [Channel::name].
22481        UnknownValue(channel::UnknownValue),
22482    }
22483
22484    #[doc(hidden)]
22485    pub mod channel {
22486        #[allow(unused_imports)]
22487        use super::*;
22488        #[derive(Clone, Debug, PartialEq)]
22489        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22490    }
22491
22492    impl Channel {
22493        /// Gets the enum value.
22494        ///
22495        /// Returns `None` if the enum contains an unknown value deserialized from
22496        /// the string representation of enums.
22497        pub fn value(&self) -> std::option::Option<i32> {
22498            match self {
22499                Self::Unspecified => std::option::Option::Some(0),
22500                Self::Rapid => std::option::Option::Some(1),
22501                Self::Regular => std::option::Option::Some(2),
22502                Self::Stable => std::option::Option::Some(3),
22503                Self::Extended => std::option::Option::Some(4),
22504                Self::UnknownValue(u) => u.0.value(),
22505            }
22506        }
22507
22508        /// Gets the enum value as a string.
22509        ///
22510        /// Returns `None` if the enum contains an unknown value deserialized from
22511        /// the integer representation of enums.
22512        pub fn name(&self) -> std::option::Option<&str> {
22513            match self {
22514                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
22515                Self::Rapid => std::option::Option::Some("RAPID"),
22516                Self::Regular => std::option::Option::Some("REGULAR"),
22517                Self::Stable => std::option::Option::Some("STABLE"),
22518                Self::Extended => std::option::Option::Some("EXTENDED"),
22519                Self::UnknownValue(u) => u.0.name(),
22520            }
22521        }
22522    }
22523
22524    impl std::default::Default for Channel {
22525        fn default() -> Self {
22526            use std::convert::From;
22527            Self::from(0)
22528        }
22529    }
22530
22531    impl std::fmt::Display for Channel {
22532        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22533            wkt::internal::display_enum(f, self.name(), self.value())
22534        }
22535    }
22536
22537    impl std::convert::From<i32> for Channel {
22538        fn from(value: i32) -> Self {
22539            match value {
22540                0 => Self::Unspecified,
22541                1 => Self::Rapid,
22542                2 => Self::Regular,
22543                3 => Self::Stable,
22544                4 => Self::Extended,
22545                _ => Self::UnknownValue(channel::UnknownValue(
22546                    wkt::internal::UnknownEnumValue::Integer(value),
22547                )),
22548            }
22549        }
22550    }
22551
22552    impl std::convert::From<&str> for Channel {
22553        fn from(value: &str) -> Self {
22554            use std::string::ToString;
22555            match value {
22556                "UNSPECIFIED" => Self::Unspecified,
22557                "RAPID" => Self::Rapid,
22558                "REGULAR" => Self::Regular,
22559                "STABLE" => Self::Stable,
22560                "EXTENDED" => Self::Extended,
22561                _ => Self::UnknownValue(channel::UnknownValue(
22562                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22563                )),
22564            }
22565        }
22566    }
22567
22568    impl serde::ser::Serialize for Channel {
22569        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22570        where
22571            S: serde::Serializer,
22572        {
22573            match self {
22574                Self::Unspecified => serializer.serialize_i32(0),
22575                Self::Rapid => serializer.serialize_i32(1),
22576                Self::Regular => serializer.serialize_i32(2),
22577                Self::Stable => serializer.serialize_i32(3),
22578                Self::Extended => serializer.serialize_i32(4),
22579                Self::UnknownValue(u) => u.0.serialize(serializer),
22580            }
22581        }
22582    }
22583
22584    impl<'de> serde::de::Deserialize<'de> for Channel {
22585        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22586        where
22587            D: serde::Deserializer<'de>,
22588        {
22589            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
22590                ".google.container.v1.ReleaseChannel.Channel",
22591            ))
22592        }
22593    }
22594}
22595
22596/// Configuration for fine-grained cost management feature.
22597#[derive(Clone, Default, PartialEq)]
22598#[non_exhaustive]
22599pub struct CostManagementConfig {
22600    /// Whether the feature is enabled or not.
22601    pub enabled: bool,
22602
22603    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22604}
22605
22606impl CostManagementConfig {
22607    pub fn new() -> Self {
22608        std::default::Default::default()
22609    }
22610
22611    /// Sets the value of [enabled][crate::model::CostManagementConfig::enabled].
22612    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22613        self.enabled = v.into();
22614        self
22615    }
22616}
22617
22618impl wkt::message::Message for CostManagementConfig {
22619    fn typename() -> &'static str {
22620        "type.googleapis.com/google.container.v1.CostManagementConfig"
22621    }
22622}
22623
22624/// IntraNodeVisibilityConfig contains the desired config of the intra-node
22625/// visibility on this cluster.
22626#[derive(Clone, Default, PartialEq)]
22627#[non_exhaustive]
22628pub struct IntraNodeVisibilityConfig {
22629    /// Enables intra node visibility for this cluster.
22630    pub enabled: bool,
22631
22632    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22633}
22634
22635impl IntraNodeVisibilityConfig {
22636    pub fn new() -> Self {
22637        std::default::Default::default()
22638    }
22639
22640    /// Sets the value of [enabled][crate::model::IntraNodeVisibilityConfig::enabled].
22641    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22642        self.enabled = v.into();
22643        self
22644    }
22645}
22646
22647impl wkt::message::Message for IntraNodeVisibilityConfig {
22648    fn typename() -> &'static str {
22649        "type.googleapis.com/google.container.v1.IntraNodeVisibilityConfig"
22650    }
22651}
22652
22653/// ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer
22654/// subsetting on this cluster.
22655#[derive(Clone, Default, PartialEq)]
22656#[non_exhaustive]
22657pub struct ILBSubsettingConfig {
22658    /// Enables l4 ILB subsetting for this cluster.
22659    pub enabled: bool,
22660
22661    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22662}
22663
22664impl ILBSubsettingConfig {
22665    pub fn new() -> Self {
22666        std::default::Default::default()
22667    }
22668
22669    /// Sets the value of [enabled][crate::model::ILBSubsettingConfig::enabled].
22670    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22671        self.enabled = v.into();
22672        self
22673    }
22674}
22675
22676impl wkt::message::Message for ILBSubsettingConfig {
22677    fn typename() -> &'static str {
22678        "type.googleapis.com/google.container.v1.ILBSubsettingConfig"
22679    }
22680}
22681
22682/// DNSConfig contains the desired set of options for configuring clusterDNS.
22683#[derive(Clone, Default, PartialEq)]
22684#[non_exhaustive]
22685pub struct DNSConfig {
22686    /// cluster_dns indicates which in-cluster DNS provider should be used.
22687    pub cluster_dns: crate::model::dns_config::Provider,
22688
22689    /// cluster_dns_scope indicates the scope of access to cluster DNS records.
22690    pub cluster_dns_scope: crate::model::dns_config::DNSScope,
22691
22692    /// cluster_dns_domain is the suffix used for all cluster service records.
22693    pub cluster_dns_domain: std::string::String,
22694
22695    /// Optional. The domain used in Additive VPC scope.
22696    pub additive_vpc_scope_dns_domain: std::string::String,
22697
22698    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22699}
22700
22701impl DNSConfig {
22702    pub fn new() -> Self {
22703        std::default::Default::default()
22704    }
22705
22706    /// Sets the value of [cluster_dns][crate::model::DNSConfig::cluster_dns].
22707    pub fn set_cluster_dns<T: std::convert::Into<crate::model::dns_config::Provider>>(
22708        mut self,
22709        v: T,
22710    ) -> Self {
22711        self.cluster_dns = v.into();
22712        self
22713    }
22714
22715    /// Sets the value of [cluster_dns_scope][crate::model::DNSConfig::cluster_dns_scope].
22716    pub fn set_cluster_dns_scope<T: std::convert::Into<crate::model::dns_config::DNSScope>>(
22717        mut self,
22718        v: T,
22719    ) -> Self {
22720        self.cluster_dns_scope = v.into();
22721        self
22722    }
22723
22724    /// Sets the value of [cluster_dns_domain][crate::model::DNSConfig::cluster_dns_domain].
22725    pub fn set_cluster_dns_domain<T: std::convert::Into<std::string::String>>(
22726        mut self,
22727        v: T,
22728    ) -> Self {
22729        self.cluster_dns_domain = v.into();
22730        self
22731    }
22732
22733    /// Sets the value of [additive_vpc_scope_dns_domain][crate::model::DNSConfig::additive_vpc_scope_dns_domain].
22734    pub fn set_additive_vpc_scope_dns_domain<T: std::convert::Into<std::string::String>>(
22735        mut self,
22736        v: T,
22737    ) -> Self {
22738        self.additive_vpc_scope_dns_domain = v.into();
22739        self
22740    }
22741}
22742
22743impl wkt::message::Message for DNSConfig {
22744    fn typename() -> &'static str {
22745        "type.googleapis.com/google.container.v1.DNSConfig"
22746    }
22747}
22748
22749/// Defines additional types related to [DNSConfig].
22750pub mod dns_config {
22751    #[allow(unused_imports)]
22752    use super::*;
22753
22754    /// Provider lists the various in-cluster DNS providers.
22755    ///
22756    /// # Working with unknown values
22757    ///
22758    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22759    /// additional enum variants at any time. Adding new variants is not considered
22760    /// a breaking change. Applications should write their code in anticipation of:
22761    ///
22762    /// - New values appearing in future releases of the client library, **and**
22763    /// - New values received dynamically, without application changes.
22764    ///
22765    /// Please consult the [Working with enums] section in the user guide for some
22766    /// guidelines.
22767    ///
22768    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22769    #[derive(Clone, Debug, PartialEq)]
22770    #[non_exhaustive]
22771    pub enum Provider {
22772        /// Default value
22773        Unspecified,
22774        /// Use GKE default DNS provider(kube-dns) for DNS resolution.
22775        PlatformDefault,
22776        /// Use CloudDNS for DNS resolution.
22777        CloudDns,
22778        /// Use KubeDNS for DNS resolution.
22779        KubeDns,
22780        /// If set, the enum was initialized with an unknown value.
22781        ///
22782        /// Applications can examine the value using [Provider::value] or
22783        /// [Provider::name].
22784        UnknownValue(provider::UnknownValue),
22785    }
22786
22787    #[doc(hidden)]
22788    pub mod provider {
22789        #[allow(unused_imports)]
22790        use super::*;
22791        #[derive(Clone, Debug, PartialEq)]
22792        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22793    }
22794
22795    impl Provider {
22796        /// Gets the enum value.
22797        ///
22798        /// Returns `None` if the enum contains an unknown value deserialized from
22799        /// the string representation of enums.
22800        pub fn value(&self) -> std::option::Option<i32> {
22801            match self {
22802                Self::Unspecified => std::option::Option::Some(0),
22803                Self::PlatformDefault => std::option::Option::Some(1),
22804                Self::CloudDns => std::option::Option::Some(2),
22805                Self::KubeDns => std::option::Option::Some(3),
22806                Self::UnknownValue(u) => u.0.value(),
22807            }
22808        }
22809
22810        /// Gets the enum value as a string.
22811        ///
22812        /// Returns `None` if the enum contains an unknown value deserialized from
22813        /// the integer representation of enums.
22814        pub fn name(&self) -> std::option::Option<&str> {
22815            match self {
22816                Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
22817                Self::PlatformDefault => std::option::Option::Some("PLATFORM_DEFAULT"),
22818                Self::CloudDns => std::option::Option::Some("CLOUD_DNS"),
22819                Self::KubeDns => std::option::Option::Some("KUBE_DNS"),
22820                Self::UnknownValue(u) => u.0.name(),
22821            }
22822        }
22823    }
22824
22825    impl std::default::Default for Provider {
22826        fn default() -> Self {
22827            use std::convert::From;
22828            Self::from(0)
22829        }
22830    }
22831
22832    impl std::fmt::Display for Provider {
22833        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22834            wkt::internal::display_enum(f, self.name(), self.value())
22835        }
22836    }
22837
22838    impl std::convert::From<i32> for Provider {
22839        fn from(value: i32) -> Self {
22840            match value {
22841                0 => Self::Unspecified,
22842                1 => Self::PlatformDefault,
22843                2 => Self::CloudDns,
22844                3 => Self::KubeDns,
22845                _ => Self::UnknownValue(provider::UnknownValue(
22846                    wkt::internal::UnknownEnumValue::Integer(value),
22847                )),
22848            }
22849        }
22850    }
22851
22852    impl std::convert::From<&str> for Provider {
22853        fn from(value: &str) -> Self {
22854            use std::string::ToString;
22855            match value {
22856                "PROVIDER_UNSPECIFIED" => Self::Unspecified,
22857                "PLATFORM_DEFAULT" => Self::PlatformDefault,
22858                "CLOUD_DNS" => Self::CloudDns,
22859                "KUBE_DNS" => Self::KubeDns,
22860                _ => Self::UnknownValue(provider::UnknownValue(
22861                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22862                )),
22863            }
22864        }
22865    }
22866
22867    impl serde::ser::Serialize for Provider {
22868        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22869        where
22870            S: serde::Serializer,
22871        {
22872            match self {
22873                Self::Unspecified => serializer.serialize_i32(0),
22874                Self::PlatformDefault => serializer.serialize_i32(1),
22875                Self::CloudDns => serializer.serialize_i32(2),
22876                Self::KubeDns => serializer.serialize_i32(3),
22877                Self::UnknownValue(u) => u.0.serialize(serializer),
22878            }
22879        }
22880    }
22881
22882    impl<'de> serde::de::Deserialize<'de> for Provider {
22883        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22884        where
22885            D: serde::Deserializer<'de>,
22886        {
22887            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
22888                ".google.container.v1.DNSConfig.Provider",
22889            ))
22890        }
22891    }
22892
22893    /// DNSScope lists the various scopes of access to cluster DNS records.
22894    ///
22895    /// # Working with unknown values
22896    ///
22897    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22898    /// additional enum variants at any time. Adding new variants is not considered
22899    /// a breaking change. Applications should write their code in anticipation of:
22900    ///
22901    /// - New values appearing in future releases of the client library, **and**
22902    /// - New values received dynamically, without application changes.
22903    ///
22904    /// Please consult the [Working with enums] section in the user guide for some
22905    /// guidelines.
22906    ///
22907    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22908    #[derive(Clone, Debug, PartialEq)]
22909    #[non_exhaustive]
22910    pub enum DNSScope {
22911        /// Default value, will be inferred as cluster scope.
22912        Unspecified,
22913        /// DNS records are accessible from within the cluster.
22914        ClusterScope,
22915        /// DNS records are accessible from within the VPC.
22916        VpcScope,
22917        /// If set, the enum was initialized with an unknown value.
22918        ///
22919        /// Applications can examine the value using [DNSScope::value] or
22920        /// [DNSScope::name].
22921        UnknownValue(dns_scope::UnknownValue),
22922    }
22923
22924    #[doc(hidden)]
22925    pub mod dns_scope {
22926        #[allow(unused_imports)]
22927        use super::*;
22928        #[derive(Clone, Debug, PartialEq)]
22929        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22930    }
22931
22932    impl DNSScope {
22933        /// Gets the enum value.
22934        ///
22935        /// Returns `None` if the enum contains an unknown value deserialized from
22936        /// the string representation of enums.
22937        pub fn value(&self) -> std::option::Option<i32> {
22938            match self {
22939                Self::Unspecified => std::option::Option::Some(0),
22940                Self::ClusterScope => std::option::Option::Some(1),
22941                Self::VpcScope => std::option::Option::Some(2),
22942                Self::UnknownValue(u) => u.0.value(),
22943            }
22944        }
22945
22946        /// Gets the enum value as a string.
22947        ///
22948        /// Returns `None` if the enum contains an unknown value deserialized from
22949        /// the integer representation of enums.
22950        pub fn name(&self) -> std::option::Option<&str> {
22951            match self {
22952                Self::Unspecified => std::option::Option::Some("DNS_SCOPE_UNSPECIFIED"),
22953                Self::ClusterScope => std::option::Option::Some("CLUSTER_SCOPE"),
22954                Self::VpcScope => std::option::Option::Some("VPC_SCOPE"),
22955                Self::UnknownValue(u) => u.0.name(),
22956            }
22957        }
22958    }
22959
22960    impl std::default::Default for DNSScope {
22961        fn default() -> Self {
22962            use std::convert::From;
22963            Self::from(0)
22964        }
22965    }
22966
22967    impl std::fmt::Display for DNSScope {
22968        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22969            wkt::internal::display_enum(f, self.name(), self.value())
22970        }
22971    }
22972
22973    impl std::convert::From<i32> for DNSScope {
22974        fn from(value: i32) -> Self {
22975            match value {
22976                0 => Self::Unspecified,
22977                1 => Self::ClusterScope,
22978                2 => Self::VpcScope,
22979                _ => Self::UnknownValue(dns_scope::UnknownValue(
22980                    wkt::internal::UnknownEnumValue::Integer(value),
22981                )),
22982            }
22983        }
22984    }
22985
22986    impl std::convert::From<&str> for DNSScope {
22987        fn from(value: &str) -> Self {
22988            use std::string::ToString;
22989            match value {
22990                "DNS_SCOPE_UNSPECIFIED" => Self::Unspecified,
22991                "CLUSTER_SCOPE" => Self::ClusterScope,
22992                "VPC_SCOPE" => Self::VpcScope,
22993                _ => Self::UnknownValue(dns_scope::UnknownValue(
22994                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22995                )),
22996            }
22997        }
22998    }
22999
23000    impl serde::ser::Serialize for DNSScope {
23001        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23002        where
23003            S: serde::Serializer,
23004        {
23005            match self {
23006                Self::Unspecified => serializer.serialize_i32(0),
23007                Self::ClusterScope => serializer.serialize_i32(1),
23008                Self::VpcScope => serializer.serialize_i32(2),
23009                Self::UnknownValue(u) => u.0.serialize(serializer),
23010            }
23011        }
23012    }
23013
23014    impl<'de> serde::de::Deserialize<'de> for DNSScope {
23015        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23016        where
23017            D: serde::Deserializer<'de>,
23018        {
23019            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DNSScope>::new(
23020                ".google.container.v1.DNSConfig.DNSScope",
23021            ))
23022        }
23023    }
23024}
23025
23026/// Constraints applied to pods.
23027#[derive(Clone, Default, PartialEq)]
23028#[non_exhaustive]
23029pub struct MaxPodsConstraint {
23030    /// Constraint enforced on the max num of pods per node.
23031    pub max_pods_per_node: i64,
23032
23033    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23034}
23035
23036impl MaxPodsConstraint {
23037    pub fn new() -> Self {
23038        std::default::Default::default()
23039    }
23040
23041    /// Sets the value of [max_pods_per_node][crate::model::MaxPodsConstraint::max_pods_per_node].
23042    pub fn set_max_pods_per_node<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23043        self.max_pods_per_node = v.into();
23044        self
23045    }
23046}
23047
23048impl wkt::message::Message for MaxPodsConstraint {
23049    fn typename() -> &'static str {
23050        "type.googleapis.com/google.container.v1.MaxPodsConstraint"
23051    }
23052}
23053
23054/// Configuration for the use of Kubernetes Service Accounts in IAM policies.
23055#[derive(Clone, Default, PartialEq)]
23056#[non_exhaustive]
23057pub struct WorkloadIdentityConfig {
23058    /// The workload pool to attach all Kubernetes service accounts to.
23059    pub workload_pool: std::string::String,
23060
23061    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23062}
23063
23064impl WorkloadIdentityConfig {
23065    pub fn new() -> Self {
23066        std::default::Default::default()
23067    }
23068
23069    /// Sets the value of [workload_pool][crate::model::WorkloadIdentityConfig::workload_pool].
23070    pub fn set_workload_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23071        self.workload_pool = v.into();
23072        self
23073    }
23074}
23075
23076impl wkt::message::Message for WorkloadIdentityConfig {
23077    fn typename() -> &'static str {
23078        "type.googleapis.com/google.container.v1.WorkloadIdentityConfig"
23079    }
23080}
23081
23082/// IdentityServiceConfig is configuration for Identity Service which allows
23083/// customers to use external identity providers with the K8S API
23084#[derive(Clone, Default, PartialEq)]
23085#[non_exhaustive]
23086pub struct IdentityServiceConfig {
23087    /// Whether to enable the Identity Service component
23088    pub enabled: bool,
23089
23090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23091}
23092
23093impl IdentityServiceConfig {
23094    pub fn new() -> Self {
23095        std::default::Default::default()
23096    }
23097
23098    /// Sets the value of [enabled][crate::model::IdentityServiceConfig::enabled].
23099    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23100        self.enabled = v.into();
23101        self
23102    }
23103}
23104
23105impl wkt::message::Message for IdentityServiceConfig {
23106    fn typename() -> &'static str {
23107        "type.googleapis.com/google.container.v1.IdentityServiceConfig"
23108    }
23109}
23110
23111/// Configuration for issuance of mTLS keys and certificates to Kubernetes pods.
23112#[derive(Clone, Default, PartialEq)]
23113#[non_exhaustive]
23114pub struct MeshCertificates {
23115    /// enable_certificates controls issuance of workload mTLS certificates.
23116    ///
23117    /// If set, the GKE Workload Identity Certificates controller and node agent
23118    /// will be deployed in the cluster, which can then be configured by creating a
23119    /// WorkloadCertificateConfig Custom Resource.
23120    ///
23121    /// Requires Workload Identity
23122    /// ([workload_pool][google.container.v1.WorkloadIdentityConfig.workload_pool]
23123    /// must be non-empty).
23124    ///
23125    /// [google.container.v1.WorkloadIdentityConfig.workload_pool]: crate::model::WorkloadIdentityConfig::workload_pool
23126    pub enable_certificates: std::option::Option<wkt::BoolValue>,
23127
23128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23129}
23130
23131impl MeshCertificates {
23132    pub fn new() -> Self {
23133        std::default::Default::default()
23134    }
23135
23136    /// Sets the value of [enable_certificates][crate::model::MeshCertificates::enable_certificates].
23137    pub fn set_enable_certificates<T>(mut self, v: T) -> Self
23138    where
23139        T: std::convert::Into<wkt::BoolValue>,
23140    {
23141        self.enable_certificates = std::option::Option::Some(v.into());
23142        self
23143    }
23144
23145    /// Sets or clears the value of [enable_certificates][crate::model::MeshCertificates::enable_certificates].
23146    pub fn set_or_clear_enable_certificates<T>(mut self, v: std::option::Option<T>) -> Self
23147    where
23148        T: std::convert::Into<wkt::BoolValue>,
23149    {
23150        self.enable_certificates = v.map(|x| x.into());
23151        self
23152    }
23153}
23154
23155impl wkt::message::Message for MeshCertificates {
23156    fn typename() -> &'static str {
23157        "type.googleapis.com/google.container.v1.MeshCertificates"
23158    }
23159}
23160
23161/// Configuration of etcd encryption.
23162#[derive(Clone, Default, PartialEq)]
23163#[non_exhaustive]
23164pub struct DatabaseEncryption {
23165    /// Name of CloudKMS key to use for the encryption of secrets in etcd.
23166    /// Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key
23167    pub key_name: std::string::String,
23168
23169    /// The desired state of etcd encryption.
23170    pub state: crate::model::database_encryption::State,
23171
23172    /// Output only. The current state of etcd encryption.
23173    pub current_state: std::option::Option<crate::model::database_encryption::CurrentState>,
23174
23175    /// Output only. Keys in use by the cluster for decrypting
23176    /// existing objects, in addition to the key in `key_name`.
23177    ///
23178    /// Each item is a CloudKMS key resource.
23179    pub decryption_keys: std::vec::Vec<std::string::String>,
23180
23181    /// Output only. Records errors seen during DatabaseEncryption update
23182    /// operations.
23183    pub last_operation_errors: std::vec::Vec<crate::model::database_encryption::OperationError>,
23184
23185    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23186}
23187
23188impl DatabaseEncryption {
23189    pub fn new() -> Self {
23190        std::default::Default::default()
23191    }
23192
23193    /// Sets the value of [key_name][crate::model::DatabaseEncryption::key_name].
23194    pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23195        self.key_name = v.into();
23196        self
23197    }
23198
23199    /// Sets the value of [state][crate::model::DatabaseEncryption::state].
23200    pub fn set_state<T: std::convert::Into<crate::model::database_encryption::State>>(
23201        mut self,
23202        v: T,
23203    ) -> Self {
23204        self.state = v.into();
23205        self
23206    }
23207
23208    /// Sets the value of [current_state][crate::model::DatabaseEncryption::current_state].
23209    pub fn set_current_state<T>(mut self, v: T) -> Self
23210    where
23211        T: std::convert::Into<crate::model::database_encryption::CurrentState>,
23212    {
23213        self.current_state = std::option::Option::Some(v.into());
23214        self
23215    }
23216
23217    /// Sets or clears the value of [current_state][crate::model::DatabaseEncryption::current_state].
23218    pub fn set_or_clear_current_state<T>(mut self, v: std::option::Option<T>) -> Self
23219    where
23220        T: std::convert::Into<crate::model::database_encryption::CurrentState>,
23221    {
23222        self.current_state = v.map(|x| x.into());
23223        self
23224    }
23225
23226    /// Sets the value of [decryption_keys][crate::model::DatabaseEncryption::decryption_keys].
23227    pub fn set_decryption_keys<T, V>(mut self, v: T) -> Self
23228    where
23229        T: std::iter::IntoIterator<Item = V>,
23230        V: std::convert::Into<std::string::String>,
23231    {
23232        use std::iter::Iterator;
23233        self.decryption_keys = v.into_iter().map(|i| i.into()).collect();
23234        self
23235    }
23236
23237    /// Sets the value of [last_operation_errors][crate::model::DatabaseEncryption::last_operation_errors].
23238    pub fn set_last_operation_errors<T, V>(mut self, v: T) -> Self
23239    where
23240        T: std::iter::IntoIterator<Item = V>,
23241        V: std::convert::Into<crate::model::database_encryption::OperationError>,
23242    {
23243        use std::iter::Iterator;
23244        self.last_operation_errors = v.into_iter().map(|i| i.into()).collect();
23245        self
23246    }
23247}
23248
23249impl wkt::message::Message for DatabaseEncryption {
23250    fn typename() -> &'static str {
23251        "type.googleapis.com/google.container.v1.DatabaseEncryption"
23252    }
23253}
23254
23255/// Defines additional types related to [DatabaseEncryption].
23256pub mod database_encryption {
23257    #[allow(unused_imports)]
23258    use super::*;
23259
23260    /// OperationError records errors seen from CloudKMS keys
23261    /// encountered during updates to DatabaseEncryption configuration.
23262    #[derive(Clone, Default, PartialEq)]
23263    #[non_exhaustive]
23264    pub struct OperationError {
23265        /// CloudKMS key resource that had the error.
23266        pub key_name: std::string::String,
23267
23268        /// Description of the error seen during the operation.
23269        pub error_message: std::string::String,
23270
23271        /// Time when the CloudKMS error was seen.
23272        pub timestamp: std::option::Option<wkt::Timestamp>,
23273
23274        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23275    }
23276
23277    impl OperationError {
23278        pub fn new() -> Self {
23279            std::default::Default::default()
23280        }
23281
23282        /// Sets the value of [key_name][crate::model::database_encryption::OperationError::key_name].
23283        pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23284            self.key_name = v.into();
23285            self
23286        }
23287
23288        /// Sets the value of [error_message][crate::model::database_encryption::OperationError::error_message].
23289        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
23290            mut self,
23291            v: T,
23292        ) -> Self {
23293            self.error_message = v.into();
23294            self
23295        }
23296
23297        /// Sets the value of [timestamp][crate::model::database_encryption::OperationError::timestamp].
23298        pub fn set_timestamp<T>(mut self, v: T) -> Self
23299        where
23300            T: std::convert::Into<wkt::Timestamp>,
23301        {
23302            self.timestamp = std::option::Option::Some(v.into());
23303            self
23304        }
23305
23306        /// Sets or clears the value of [timestamp][crate::model::database_encryption::OperationError::timestamp].
23307        pub fn set_or_clear_timestamp<T>(mut self, v: std::option::Option<T>) -> Self
23308        where
23309            T: std::convert::Into<wkt::Timestamp>,
23310        {
23311            self.timestamp = v.map(|x| x.into());
23312            self
23313        }
23314    }
23315
23316    impl wkt::message::Message for OperationError {
23317        fn typename() -> &'static str {
23318            "type.googleapis.com/google.container.v1.DatabaseEncryption.OperationError"
23319        }
23320    }
23321
23322    /// State of etcd encryption.
23323    ///
23324    /// # Working with unknown values
23325    ///
23326    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23327    /// additional enum variants at any time. Adding new variants is not considered
23328    /// a breaking change. Applications should write their code in anticipation of:
23329    ///
23330    /// - New values appearing in future releases of the client library, **and**
23331    /// - New values received dynamically, without application changes.
23332    ///
23333    /// Please consult the [Working with enums] section in the user guide for some
23334    /// guidelines.
23335    ///
23336    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23337    #[derive(Clone, Debug, PartialEq)]
23338    #[non_exhaustive]
23339    pub enum State {
23340        /// Should never be set
23341        Unknown,
23342        /// Secrets in etcd are encrypted.
23343        Encrypted,
23344        /// Secrets in etcd are stored in plain text (at etcd level) - this is
23345        /// unrelated to Compute Engine level full disk encryption.
23346        Decrypted,
23347        /// If set, the enum was initialized with an unknown value.
23348        ///
23349        /// Applications can examine the value using [State::value] or
23350        /// [State::name].
23351        UnknownValue(state::UnknownValue),
23352    }
23353
23354    #[doc(hidden)]
23355    pub mod state {
23356        #[allow(unused_imports)]
23357        use super::*;
23358        #[derive(Clone, Debug, PartialEq)]
23359        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23360    }
23361
23362    impl State {
23363        /// Gets the enum value.
23364        ///
23365        /// Returns `None` if the enum contains an unknown value deserialized from
23366        /// the string representation of enums.
23367        pub fn value(&self) -> std::option::Option<i32> {
23368            match self {
23369                Self::Unknown => std::option::Option::Some(0),
23370                Self::Encrypted => std::option::Option::Some(1),
23371                Self::Decrypted => std::option::Option::Some(2),
23372                Self::UnknownValue(u) => u.0.value(),
23373            }
23374        }
23375
23376        /// Gets the enum value as a string.
23377        ///
23378        /// Returns `None` if the enum contains an unknown value deserialized from
23379        /// the integer representation of enums.
23380        pub fn name(&self) -> std::option::Option<&str> {
23381            match self {
23382                Self::Unknown => std::option::Option::Some("UNKNOWN"),
23383                Self::Encrypted => std::option::Option::Some("ENCRYPTED"),
23384                Self::Decrypted => std::option::Option::Some("DECRYPTED"),
23385                Self::UnknownValue(u) => u.0.name(),
23386            }
23387        }
23388    }
23389
23390    impl std::default::Default for State {
23391        fn default() -> Self {
23392            use std::convert::From;
23393            Self::from(0)
23394        }
23395    }
23396
23397    impl std::fmt::Display for State {
23398        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23399            wkt::internal::display_enum(f, self.name(), self.value())
23400        }
23401    }
23402
23403    impl std::convert::From<i32> for State {
23404        fn from(value: i32) -> Self {
23405            match value {
23406                0 => Self::Unknown,
23407                1 => Self::Encrypted,
23408                2 => Self::Decrypted,
23409                _ => Self::UnknownValue(state::UnknownValue(
23410                    wkt::internal::UnknownEnumValue::Integer(value),
23411                )),
23412            }
23413        }
23414    }
23415
23416    impl std::convert::From<&str> for State {
23417        fn from(value: &str) -> Self {
23418            use std::string::ToString;
23419            match value {
23420                "UNKNOWN" => Self::Unknown,
23421                "ENCRYPTED" => Self::Encrypted,
23422                "DECRYPTED" => Self::Decrypted,
23423                _ => Self::UnknownValue(state::UnknownValue(
23424                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23425                )),
23426            }
23427        }
23428    }
23429
23430    impl serde::ser::Serialize for State {
23431        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23432        where
23433            S: serde::Serializer,
23434        {
23435            match self {
23436                Self::Unknown => serializer.serialize_i32(0),
23437                Self::Encrypted => serializer.serialize_i32(1),
23438                Self::Decrypted => serializer.serialize_i32(2),
23439                Self::UnknownValue(u) => u.0.serialize(serializer),
23440            }
23441        }
23442    }
23443
23444    impl<'de> serde::de::Deserialize<'de> for State {
23445        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23446        where
23447            D: serde::Deserializer<'de>,
23448        {
23449            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
23450                ".google.container.v1.DatabaseEncryption.State",
23451            ))
23452        }
23453    }
23454
23455    /// Current State of etcd encryption.
23456    ///
23457    /// # Working with unknown values
23458    ///
23459    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23460    /// additional enum variants at any time. Adding new variants is not considered
23461    /// a breaking change. Applications should write their code in anticipation of:
23462    ///
23463    /// - New values appearing in future releases of the client library, **and**
23464    /// - New values received dynamically, without application changes.
23465    ///
23466    /// Please consult the [Working with enums] section in the user guide for some
23467    /// guidelines.
23468    ///
23469    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23470    #[derive(Clone, Debug, PartialEq)]
23471    #[non_exhaustive]
23472    pub enum CurrentState {
23473        /// Should never be set
23474        Unspecified,
23475        /// Secrets in etcd are encrypted.
23476        Encrypted,
23477        /// Secrets in etcd are stored in plain text (at etcd level) - this is
23478        /// unrelated to Compute Engine level full disk encryption.
23479        Decrypted,
23480        /// Encryption (or re-encryption with a different CloudKMS key)
23481        /// of Secrets is in progress.
23482        EncryptionPending,
23483        /// Encryption (or re-encryption with a different CloudKMS key) of Secrets in
23484        /// etcd encountered an error.
23485        EncryptionError,
23486        /// De-crypting Secrets to plain text in etcd is in progress.
23487        DecryptionPending,
23488        /// De-crypting Secrets to plain text in etcd encountered an error.
23489        DecryptionError,
23490        /// If set, the enum was initialized with an unknown value.
23491        ///
23492        /// Applications can examine the value using [CurrentState::value] or
23493        /// [CurrentState::name].
23494        UnknownValue(current_state::UnknownValue),
23495    }
23496
23497    #[doc(hidden)]
23498    pub mod current_state {
23499        #[allow(unused_imports)]
23500        use super::*;
23501        #[derive(Clone, Debug, PartialEq)]
23502        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23503    }
23504
23505    impl CurrentState {
23506        /// Gets the enum value.
23507        ///
23508        /// Returns `None` if the enum contains an unknown value deserialized from
23509        /// the string representation of enums.
23510        pub fn value(&self) -> std::option::Option<i32> {
23511            match self {
23512                Self::Unspecified => std::option::Option::Some(0),
23513                Self::Encrypted => std::option::Option::Some(7),
23514                Self::Decrypted => std::option::Option::Some(2),
23515                Self::EncryptionPending => std::option::Option::Some(3),
23516                Self::EncryptionError => std::option::Option::Some(4),
23517                Self::DecryptionPending => std::option::Option::Some(5),
23518                Self::DecryptionError => std::option::Option::Some(6),
23519                Self::UnknownValue(u) => u.0.value(),
23520            }
23521        }
23522
23523        /// Gets the enum value as a string.
23524        ///
23525        /// Returns `None` if the enum contains an unknown value deserialized from
23526        /// the integer representation of enums.
23527        pub fn name(&self) -> std::option::Option<&str> {
23528            match self {
23529                Self::Unspecified => std::option::Option::Some("CURRENT_STATE_UNSPECIFIED"),
23530                Self::Encrypted => std::option::Option::Some("CURRENT_STATE_ENCRYPTED"),
23531                Self::Decrypted => std::option::Option::Some("CURRENT_STATE_DECRYPTED"),
23532                Self::EncryptionPending => {
23533                    std::option::Option::Some("CURRENT_STATE_ENCRYPTION_PENDING")
23534                }
23535                Self::EncryptionError => {
23536                    std::option::Option::Some("CURRENT_STATE_ENCRYPTION_ERROR")
23537                }
23538                Self::DecryptionPending => {
23539                    std::option::Option::Some("CURRENT_STATE_DECRYPTION_PENDING")
23540                }
23541                Self::DecryptionError => {
23542                    std::option::Option::Some("CURRENT_STATE_DECRYPTION_ERROR")
23543                }
23544                Self::UnknownValue(u) => u.0.name(),
23545            }
23546        }
23547    }
23548
23549    impl std::default::Default for CurrentState {
23550        fn default() -> Self {
23551            use std::convert::From;
23552            Self::from(0)
23553        }
23554    }
23555
23556    impl std::fmt::Display for CurrentState {
23557        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23558            wkt::internal::display_enum(f, self.name(), self.value())
23559        }
23560    }
23561
23562    impl std::convert::From<i32> for CurrentState {
23563        fn from(value: i32) -> Self {
23564            match value {
23565                0 => Self::Unspecified,
23566                2 => Self::Decrypted,
23567                3 => Self::EncryptionPending,
23568                4 => Self::EncryptionError,
23569                5 => Self::DecryptionPending,
23570                6 => Self::DecryptionError,
23571                7 => Self::Encrypted,
23572                _ => Self::UnknownValue(current_state::UnknownValue(
23573                    wkt::internal::UnknownEnumValue::Integer(value),
23574                )),
23575            }
23576        }
23577    }
23578
23579    impl std::convert::From<&str> for CurrentState {
23580        fn from(value: &str) -> Self {
23581            use std::string::ToString;
23582            match value {
23583                "CURRENT_STATE_UNSPECIFIED" => Self::Unspecified,
23584                "CURRENT_STATE_ENCRYPTED" => Self::Encrypted,
23585                "CURRENT_STATE_DECRYPTED" => Self::Decrypted,
23586                "CURRENT_STATE_ENCRYPTION_PENDING" => Self::EncryptionPending,
23587                "CURRENT_STATE_ENCRYPTION_ERROR" => Self::EncryptionError,
23588                "CURRENT_STATE_DECRYPTION_PENDING" => Self::DecryptionPending,
23589                "CURRENT_STATE_DECRYPTION_ERROR" => Self::DecryptionError,
23590                _ => Self::UnknownValue(current_state::UnknownValue(
23591                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23592                )),
23593            }
23594        }
23595    }
23596
23597    impl serde::ser::Serialize for CurrentState {
23598        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23599        where
23600            S: serde::Serializer,
23601        {
23602            match self {
23603                Self::Unspecified => serializer.serialize_i32(0),
23604                Self::Encrypted => serializer.serialize_i32(7),
23605                Self::Decrypted => serializer.serialize_i32(2),
23606                Self::EncryptionPending => serializer.serialize_i32(3),
23607                Self::EncryptionError => serializer.serialize_i32(4),
23608                Self::DecryptionPending => serializer.serialize_i32(5),
23609                Self::DecryptionError => serializer.serialize_i32(6),
23610                Self::UnknownValue(u) => u.0.serialize(serializer),
23611            }
23612        }
23613    }
23614
23615    impl<'de> serde::de::Deserialize<'de> for CurrentState {
23616        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23617        where
23618            D: serde::Deserializer<'de>,
23619        {
23620            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CurrentState>::new(
23621                ".google.container.v1.DatabaseEncryption.CurrentState",
23622            ))
23623        }
23624    }
23625}
23626
23627/// ListUsableSubnetworksRequest requests the list of usable subnetworks
23628/// available to a user for creating clusters.
23629#[derive(Clone, Default, PartialEq)]
23630#[non_exhaustive]
23631pub struct ListUsableSubnetworksRequest {
23632    /// The parent project where subnetworks are usable.
23633    /// Specified in the format `projects/*`.
23634    pub parent: std::string::String,
23635
23636    /// Filtering currently only supports equality on the networkProjectId and must
23637    /// be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
23638    /// is the project which owns the listed subnetworks. This defaults to the
23639    /// parent project ID.
23640    pub filter: std::string::String,
23641
23642    /// The max number of results per page that should be returned. If the number
23643    /// of available results is larger than `page_size`, a `next_page_token` is
23644    /// returned which can be used to get the next page of results in subsequent
23645    /// requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
23646    pub page_size: i32,
23647
23648    /// Specifies a page token to use. Set this to the nextPageToken returned by
23649    /// previous list requests to get the next page of results.
23650    pub page_token: std::string::String,
23651
23652    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23653}
23654
23655impl ListUsableSubnetworksRequest {
23656    pub fn new() -> Self {
23657        std::default::Default::default()
23658    }
23659
23660    /// Sets the value of [parent][crate::model::ListUsableSubnetworksRequest::parent].
23661    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23662        self.parent = v.into();
23663        self
23664    }
23665
23666    /// Sets the value of [filter][crate::model::ListUsableSubnetworksRequest::filter].
23667    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23668        self.filter = v.into();
23669        self
23670    }
23671
23672    /// Sets the value of [page_size][crate::model::ListUsableSubnetworksRequest::page_size].
23673    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23674        self.page_size = v.into();
23675        self
23676    }
23677
23678    /// Sets the value of [page_token][crate::model::ListUsableSubnetworksRequest::page_token].
23679    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23680        self.page_token = v.into();
23681        self
23682    }
23683}
23684
23685impl wkt::message::Message for ListUsableSubnetworksRequest {
23686    fn typename() -> &'static str {
23687        "type.googleapis.com/google.container.v1.ListUsableSubnetworksRequest"
23688    }
23689}
23690
23691/// ListUsableSubnetworksResponse is the response of
23692/// ListUsableSubnetworksRequest.
23693#[derive(Clone, Default, PartialEq)]
23694#[non_exhaustive]
23695pub struct ListUsableSubnetworksResponse {
23696    /// A list of usable subnetworks in the specified network project.
23697    pub subnetworks: std::vec::Vec<crate::model::UsableSubnetwork>,
23698
23699    /// This token allows you to get the next page of results for list requests.
23700    /// If the number of results is larger than `page_size`, use the
23701    /// `next_page_token` as a value for the query parameter `page_token` in the
23702    /// next request. The value will become empty when there are no more pages.
23703    pub next_page_token: std::string::String,
23704
23705    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23706}
23707
23708impl ListUsableSubnetworksResponse {
23709    pub fn new() -> Self {
23710        std::default::Default::default()
23711    }
23712
23713    /// Sets the value of [subnetworks][crate::model::ListUsableSubnetworksResponse::subnetworks].
23714    pub fn set_subnetworks<T, V>(mut self, v: T) -> Self
23715    where
23716        T: std::iter::IntoIterator<Item = V>,
23717        V: std::convert::Into<crate::model::UsableSubnetwork>,
23718    {
23719        use std::iter::Iterator;
23720        self.subnetworks = v.into_iter().map(|i| i.into()).collect();
23721        self
23722    }
23723
23724    /// Sets the value of [next_page_token][crate::model::ListUsableSubnetworksResponse::next_page_token].
23725    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23726        self.next_page_token = v.into();
23727        self
23728    }
23729}
23730
23731impl wkt::message::Message for ListUsableSubnetworksResponse {
23732    fn typename() -> &'static str {
23733        "type.googleapis.com/google.container.v1.ListUsableSubnetworksResponse"
23734    }
23735}
23736
23737#[doc(hidden)]
23738impl gax::paginator::internal::PageableResponse for ListUsableSubnetworksResponse {
23739    type PageItem = crate::model::UsableSubnetwork;
23740
23741    fn items(self) -> std::vec::Vec<Self::PageItem> {
23742        self.subnetworks
23743    }
23744
23745    fn next_page_token(&self) -> std::string::String {
23746        use std::clone::Clone;
23747        self.next_page_token.clone()
23748    }
23749}
23750
23751/// Secondary IP range of a usable subnetwork.
23752#[derive(Clone, Default, PartialEq)]
23753#[non_exhaustive]
23754pub struct UsableSubnetworkSecondaryRange {
23755    /// The name associated with this subnetwork secondary range, used when adding
23756    /// an alias IP range to a VM instance.
23757    pub range_name: std::string::String,
23758
23759    /// The range of IP addresses belonging to this subnetwork secondary range.
23760    pub ip_cidr_range: std::string::String,
23761
23762    /// This field is to determine the status of the secondary range programmably.
23763    pub status: crate::model::usable_subnetwork_secondary_range::Status,
23764
23765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23766}
23767
23768impl UsableSubnetworkSecondaryRange {
23769    pub fn new() -> Self {
23770        std::default::Default::default()
23771    }
23772
23773    /// Sets the value of [range_name][crate::model::UsableSubnetworkSecondaryRange::range_name].
23774    pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23775        self.range_name = v.into();
23776        self
23777    }
23778
23779    /// Sets the value of [ip_cidr_range][crate::model::UsableSubnetworkSecondaryRange::ip_cidr_range].
23780    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23781        self.ip_cidr_range = v.into();
23782        self
23783    }
23784
23785    /// Sets the value of [status][crate::model::UsableSubnetworkSecondaryRange::status].
23786    pub fn set_status<
23787        T: std::convert::Into<crate::model::usable_subnetwork_secondary_range::Status>,
23788    >(
23789        mut self,
23790        v: T,
23791    ) -> Self {
23792        self.status = v.into();
23793        self
23794    }
23795}
23796
23797impl wkt::message::Message for UsableSubnetworkSecondaryRange {
23798    fn typename() -> &'static str {
23799        "type.googleapis.com/google.container.v1.UsableSubnetworkSecondaryRange"
23800    }
23801}
23802
23803/// Defines additional types related to [UsableSubnetworkSecondaryRange].
23804pub mod usable_subnetwork_secondary_range {
23805    #[allow(unused_imports)]
23806    use super::*;
23807
23808    /// Status shows the current usage of a secondary IP range.
23809    ///
23810    /// # Working with unknown values
23811    ///
23812    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23813    /// additional enum variants at any time. Adding new variants is not considered
23814    /// a breaking change. Applications should write their code in anticipation of:
23815    ///
23816    /// - New values appearing in future releases of the client library, **and**
23817    /// - New values received dynamically, without application changes.
23818    ///
23819    /// Please consult the [Working with enums] section in the user guide for some
23820    /// guidelines.
23821    ///
23822    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23823    #[derive(Clone, Debug, PartialEq)]
23824    #[non_exhaustive]
23825    pub enum Status {
23826        /// UNKNOWN is the zero value of the Status enum. It's not a valid status.
23827        Unknown,
23828        /// UNUSED denotes that this range is unclaimed by any cluster.
23829        Unused,
23830        /// IN_USE_SERVICE denotes that this range is claimed by cluster(s) for
23831        /// services. User-managed services range can be shared between clusters
23832        /// within the same subnetwork.
23833        InUseService,
23834        /// IN_USE_SHAREABLE_POD denotes this range was created by the network admin
23835        /// and is currently claimed by a cluster for pods. It can only be used by
23836        /// other clusters as a pod range.
23837        InUseShareablePod,
23838        /// IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed
23839        /// for pods. It cannot be used for other clusters.
23840        InUseManagedPod,
23841        /// If set, the enum was initialized with an unknown value.
23842        ///
23843        /// Applications can examine the value using [Status::value] or
23844        /// [Status::name].
23845        UnknownValue(status::UnknownValue),
23846    }
23847
23848    #[doc(hidden)]
23849    pub mod status {
23850        #[allow(unused_imports)]
23851        use super::*;
23852        #[derive(Clone, Debug, PartialEq)]
23853        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23854    }
23855
23856    impl Status {
23857        /// Gets the enum value.
23858        ///
23859        /// Returns `None` if the enum contains an unknown value deserialized from
23860        /// the string representation of enums.
23861        pub fn value(&self) -> std::option::Option<i32> {
23862            match self {
23863                Self::Unknown => std::option::Option::Some(0),
23864                Self::Unused => std::option::Option::Some(1),
23865                Self::InUseService => std::option::Option::Some(2),
23866                Self::InUseShareablePod => std::option::Option::Some(3),
23867                Self::InUseManagedPod => std::option::Option::Some(4),
23868                Self::UnknownValue(u) => u.0.value(),
23869            }
23870        }
23871
23872        /// Gets the enum value as a string.
23873        ///
23874        /// Returns `None` if the enum contains an unknown value deserialized from
23875        /// the integer representation of enums.
23876        pub fn name(&self) -> std::option::Option<&str> {
23877            match self {
23878                Self::Unknown => std::option::Option::Some("UNKNOWN"),
23879                Self::Unused => std::option::Option::Some("UNUSED"),
23880                Self::InUseService => std::option::Option::Some("IN_USE_SERVICE"),
23881                Self::InUseShareablePod => std::option::Option::Some("IN_USE_SHAREABLE_POD"),
23882                Self::InUseManagedPod => std::option::Option::Some("IN_USE_MANAGED_POD"),
23883                Self::UnknownValue(u) => u.0.name(),
23884            }
23885        }
23886    }
23887
23888    impl std::default::Default for Status {
23889        fn default() -> Self {
23890            use std::convert::From;
23891            Self::from(0)
23892        }
23893    }
23894
23895    impl std::fmt::Display for Status {
23896        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23897            wkt::internal::display_enum(f, self.name(), self.value())
23898        }
23899    }
23900
23901    impl std::convert::From<i32> for Status {
23902        fn from(value: i32) -> Self {
23903            match value {
23904                0 => Self::Unknown,
23905                1 => Self::Unused,
23906                2 => Self::InUseService,
23907                3 => Self::InUseShareablePod,
23908                4 => Self::InUseManagedPod,
23909                _ => Self::UnknownValue(status::UnknownValue(
23910                    wkt::internal::UnknownEnumValue::Integer(value),
23911                )),
23912            }
23913        }
23914    }
23915
23916    impl std::convert::From<&str> for Status {
23917        fn from(value: &str) -> Self {
23918            use std::string::ToString;
23919            match value {
23920                "UNKNOWN" => Self::Unknown,
23921                "UNUSED" => Self::Unused,
23922                "IN_USE_SERVICE" => Self::InUseService,
23923                "IN_USE_SHAREABLE_POD" => Self::InUseShareablePod,
23924                "IN_USE_MANAGED_POD" => Self::InUseManagedPod,
23925                _ => Self::UnknownValue(status::UnknownValue(
23926                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23927                )),
23928            }
23929        }
23930    }
23931
23932    impl serde::ser::Serialize for Status {
23933        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23934        where
23935            S: serde::Serializer,
23936        {
23937            match self {
23938                Self::Unknown => serializer.serialize_i32(0),
23939                Self::Unused => serializer.serialize_i32(1),
23940                Self::InUseService => serializer.serialize_i32(2),
23941                Self::InUseShareablePod => serializer.serialize_i32(3),
23942                Self::InUseManagedPod => serializer.serialize_i32(4),
23943                Self::UnknownValue(u) => u.0.serialize(serializer),
23944            }
23945        }
23946    }
23947
23948    impl<'de> serde::de::Deserialize<'de> for Status {
23949        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23950        where
23951            D: serde::Deserializer<'de>,
23952        {
23953            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
23954                ".google.container.v1.UsableSubnetworkSecondaryRange.Status",
23955            ))
23956        }
23957    }
23958}
23959
23960/// UsableSubnetwork resource returns the subnetwork name, its associated network
23961/// and the primary CIDR range.
23962#[derive(Clone, Default, PartialEq)]
23963#[non_exhaustive]
23964pub struct UsableSubnetwork {
23965    /// Subnetwork Name.
23966    /// Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
23967    pub subnetwork: std::string::String,
23968
23969    /// Network Name.
23970    /// Example: projects/my-project/global/networks/my-network
23971    pub network: std::string::String,
23972
23973    /// The range of internal addresses that are owned by this subnetwork.
23974    pub ip_cidr_range: std::string::String,
23975
23976    /// Secondary IP ranges.
23977    pub secondary_ip_ranges: std::vec::Vec<crate::model::UsableSubnetworkSecondaryRange>,
23978
23979    /// A human readable status message representing the reasons for cases where
23980    /// the caller cannot use the secondary ranges under the subnet. For example if
23981    /// the secondary_ip_ranges is empty due to a permission issue, an insufficient
23982    /// permission message will be given by status_message.
23983    pub status_message: std::string::String,
23984
23985    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23986}
23987
23988impl UsableSubnetwork {
23989    pub fn new() -> Self {
23990        std::default::Default::default()
23991    }
23992
23993    /// Sets the value of [subnetwork][crate::model::UsableSubnetwork::subnetwork].
23994    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23995        self.subnetwork = v.into();
23996        self
23997    }
23998
23999    /// Sets the value of [network][crate::model::UsableSubnetwork::network].
24000    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24001        self.network = v.into();
24002        self
24003    }
24004
24005    /// Sets the value of [ip_cidr_range][crate::model::UsableSubnetwork::ip_cidr_range].
24006    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24007        self.ip_cidr_range = v.into();
24008        self
24009    }
24010
24011    /// Sets the value of [secondary_ip_ranges][crate::model::UsableSubnetwork::secondary_ip_ranges].
24012    pub fn set_secondary_ip_ranges<T, V>(mut self, v: T) -> Self
24013    where
24014        T: std::iter::IntoIterator<Item = V>,
24015        V: std::convert::Into<crate::model::UsableSubnetworkSecondaryRange>,
24016    {
24017        use std::iter::Iterator;
24018        self.secondary_ip_ranges = v.into_iter().map(|i| i.into()).collect();
24019        self
24020    }
24021
24022    /// Sets the value of [status_message][crate::model::UsableSubnetwork::status_message].
24023    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24024        self.status_message = v.into();
24025        self
24026    }
24027}
24028
24029impl wkt::message::Message for UsableSubnetwork {
24030    fn typename() -> &'static str {
24031        "type.googleapis.com/google.container.v1.UsableSubnetwork"
24032    }
24033}
24034
24035/// Configuration for exporting cluster resource usages.
24036#[derive(Clone, Default, PartialEq)]
24037#[non_exhaustive]
24038pub struct ResourceUsageExportConfig {
24039    /// Configuration to use BigQuery as usage export destination.
24040    pub bigquery_destination:
24041        std::option::Option<crate::model::resource_usage_export_config::BigQueryDestination>,
24042
24043    /// Whether to enable network egress metering for this cluster. If enabled, a
24044    /// daemonset will be created in the cluster to meter network egress traffic.
24045    pub enable_network_egress_metering: bool,
24046
24047    /// Configuration to enable resource consumption metering.
24048    pub consumption_metering_config:
24049        std::option::Option<crate::model::resource_usage_export_config::ConsumptionMeteringConfig>,
24050
24051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24052}
24053
24054impl ResourceUsageExportConfig {
24055    pub fn new() -> Self {
24056        std::default::Default::default()
24057    }
24058
24059    /// Sets the value of [bigquery_destination][crate::model::ResourceUsageExportConfig::bigquery_destination].
24060    pub fn set_bigquery_destination<T>(mut self, v: T) -> Self
24061    where
24062        T: std::convert::Into<crate::model::resource_usage_export_config::BigQueryDestination>,
24063    {
24064        self.bigquery_destination = std::option::Option::Some(v.into());
24065        self
24066    }
24067
24068    /// Sets or clears the value of [bigquery_destination][crate::model::ResourceUsageExportConfig::bigquery_destination].
24069    pub fn set_or_clear_bigquery_destination<T>(mut self, v: std::option::Option<T>) -> Self
24070    where
24071        T: std::convert::Into<crate::model::resource_usage_export_config::BigQueryDestination>,
24072    {
24073        self.bigquery_destination = v.map(|x| x.into());
24074        self
24075    }
24076
24077    /// Sets the value of [enable_network_egress_metering][crate::model::ResourceUsageExportConfig::enable_network_egress_metering].
24078    pub fn set_enable_network_egress_metering<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24079        self.enable_network_egress_metering = v.into();
24080        self
24081    }
24082
24083    /// Sets the value of [consumption_metering_config][crate::model::ResourceUsageExportConfig::consumption_metering_config].
24084    pub fn set_consumption_metering_config<T>(mut self, v: T) -> Self
24085    where
24086        T: std::convert::Into<
24087                crate::model::resource_usage_export_config::ConsumptionMeteringConfig,
24088            >,
24089    {
24090        self.consumption_metering_config = std::option::Option::Some(v.into());
24091        self
24092    }
24093
24094    /// Sets or clears the value of [consumption_metering_config][crate::model::ResourceUsageExportConfig::consumption_metering_config].
24095    pub fn set_or_clear_consumption_metering_config<T>(mut self, v: std::option::Option<T>) -> Self
24096    where
24097        T: std::convert::Into<
24098                crate::model::resource_usage_export_config::ConsumptionMeteringConfig,
24099            >,
24100    {
24101        self.consumption_metering_config = v.map(|x| x.into());
24102        self
24103    }
24104}
24105
24106impl wkt::message::Message for ResourceUsageExportConfig {
24107    fn typename() -> &'static str {
24108        "type.googleapis.com/google.container.v1.ResourceUsageExportConfig"
24109    }
24110}
24111
24112/// Defines additional types related to [ResourceUsageExportConfig].
24113pub mod resource_usage_export_config {
24114    #[allow(unused_imports)]
24115    use super::*;
24116
24117    /// Parameters for using BigQuery as the destination of resource usage export.
24118    #[derive(Clone, Default, PartialEq)]
24119    #[non_exhaustive]
24120    pub struct BigQueryDestination {
24121        /// The ID of a BigQuery Dataset.
24122        pub dataset_id: std::string::String,
24123
24124        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24125    }
24126
24127    impl BigQueryDestination {
24128        pub fn new() -> Self {
24129            std::default::Default::default()
24130        }
24131
24132        /// Sets the value of [dataset_id][crate::model::resource_usage_export_config::BigQueryDestination::dataset_id].
24133        pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24134            self.dataset_id = v.into();
24135            self
24136        }
24137    }
24138
24139    impl wkt::message::Message for BigQueryDestination {
24140        fn typename() -> &'static str {
24141            "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.BigQueryDestination"
24142        }
24143    }
24144
24145    /// Parameters for controlling consumption metering.
24146    #[derive(Clone, Default, PartialEq)]
24147    #[non_exhaustive]
24148    pub struct ConsumptionMeteringConfig {
24149        /// Whether to enable consumption metering for this cluster. If enabled, a
24150        /// second BigQuery table will be created to hold resource consumption
24151        /// records.
24152        pub enabled: bool,
24153
24154        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24155    }
24156
24157    impl ConsumptionMeteringConfig {
24158        pub fn new() -> Self {
24159            std::default::Default::default()
24160        }
24161
24162        /// Sets the value of [enabled][crate::model::resource_usage_export_config::ConsumptionMeteringConfig::enabled].
24163        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24164            self.enabled = v.into();
24165            self
24166        }
24167    }
24168
24169    impl wkt::message::Message for ConsumptionMeteringConfig {
24170        fn typename() -> &'static str {
24171            "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig"
24172        }
24173    }
24174}
24175
24176/// VerticalPodAutoscaling contains global, per-cluster information
24177/// required by Vertical Pod Autoscaler to automatically adjust
24178/// the resources of pods controlled by it.
24179#[derive(Clone, Default, PartialEq)]
24180#[non_exhaustive]
24181pub struct VerticalPodAutoscaling {
24182    /// Enables vertical pod autoscaling.
24183    pub enabled: bool,
24184
24185    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24186}
24187
24188impl VerticalPodAutoscaling {
24189    pub fn new() -> Self {
24190        std::default::Default::default()
24191    }
24192
24193    /// Sets the value of [enabled][crate::model::VerticalPodAutoscaling::enabled].
24194    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24195        self.enabled = v.into();
24196        self
24197    }
24198}
24199
24200impl wkt::message::Message for VerticalPodAutoscaling {
24201    fn typename() -> &'static str {
24202        "type.googleapis.com/google.container.v1.VerticalPodAutoscaling"
24203    }
24204}
24205
24206/// DefaultSnatStatus contains the desired state of whether default sNAT should
24207/// be disabled on the cluster.
24208#[derive(Clone, Default, PartialEq)]
24209#[non_exhaustive]
24210pub struct DefaultSnatStatus {
24211    /// Disables cluster default sNAT rules.
24212    pub disabled: bool,
24213
24214    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24215}
24216
24217impl DefaultSnatStatus {
24218    pub fn new() -> Self {
24219        std::default::Default::default()
24220    }
24221
24222    /// Sets the value of [disabled][crate::model::DefaultSnatStatus::disabled].
24223    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24224        self.disabled = v.into();
24225        self
24226    }
24227}
24228
24229impl wkt::message::Message for DefaultSnatStatus {
24230    fn typename() -> &'static str {
24231        "type.googleapis.com/google.container.v1.DefaultSnatStatus"
24232    }
24233}
24234
24235/// Configuration of Shielded Nodes feature.
24236#[derive(Clone, Default, PartialEq)]
24237#[non_exhaustive]
24238pub struct ShieldedNodes {
24239    /// Whether Shielded Nodes features are enabled on all nodes in this cluster.
24240    pub enabled: bool,
24241
24242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24243}
24244
24245impl ShieldedNodes {
24246    pub fn new() -> Self {
24247        std::default::Default::default()
24248    }
24249
24250    /// Sets the value of [enabled][crate::model::ShieldedNodes::enabled].
24251    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24252        self.enabled = v.into();
24253        self
24254    }
24255}
24256
24257impl wkt::message::Message for ShieldedNodes {
24258    fn typename() -> &'static str {
24259        "type.googleapis.com/google.container.v1.ShieldedNodes"
24260    }
24261}
24262
24263/// Configuration of gVNIC feature.
24264#[derive(Clone, Default, PartialEq)]
24265#[non_exhaustive]
24266pub struct VirtualNIC {
24267    /// Whether gVNIC features are enabled in the node pool.
24268    pub enabled: bool,
24269
24270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24271}
24272
24273impl VirtualNIC {
24274    pub fn new() -> Self {
24275        std::default::Default::default()
24276    }
24277
24278    /// Sets the value of [enabled][crate::model::VirtualNIC::enabled].
24279    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24280        self.enabled = v.into();
24281        self
24282    }
24283}
24284
24285impl wkt::message::Message for VirtualNIC {
24286    fn typename() -> &'static str {
24287        "type.googleapis.com/google.container.v1.VirtualNIC"
24288    }
24289}
24290
24291/// Configuration of Fast Socket feature.
24292#[derive(Clone, Default, PartialEq)]
24293#[non_exhaustive]
24294pub struct FastSocket {
24295    /// Whether Fast Socket features are enabled in the node pool.
24296    pub enabled: bool,
24297
24298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24299}
24300
24301impl FastSocket {
24302    pub fn new() -> Self {
24303        std::default::Default::default()
24304    }
24305
24306    /// Sets the value of [enabled][crate::model::FastSocket::enabled].
24307    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24308        self.enabled = v.into();
24309        self
24310    }
24311}
24312
24313impl wkt::message::Message for FastSocket {
24314    fn typename() -> &'static str {
24315        "type.googleapis.com/google.container.v1.FastSocket"
24316    }
24317}
24318
24319/// NotificationConfig is the configuration of notifications.
24320#[derive(Clone, Default, PartialEq)]
24321#[non_exhaustive]
24322pub struct NotificationConfig {
24323    /// Notification config for Pub/Sub.
24324    pub pubsub: std::option::Option<crate::model::notification_config::PubSub>,
24325
24326    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24327}
24328
24329impl NotificationConfig {
24330    pub fn new() -> Self {
24331        std::default::Default::default()
24332    }
24333
24334    /// Sets the value of [pubsub][crate::model::NotificationConfig::pubsub].
24335    pub fn set_pubsub<T>(mut self, v: T) -> Self
24336    where
24337        T: std::convert::Into<crate::model::notification_config::PubSub>,
24338    {
24339        self.pubsub = std::option::Option::Some(v.into());
24340        self
24341    }
24342
24343    /// Sets or clears the value of [pubsub][crate::model::NotificationConfig::pubsub].
24344    pub fn set_or_clear_pubsub<T>(mut self, v: std::option::Option<T>) -> Self
24345    where
24346        T: std::convert::Into<crate::model::notification_config::PubSub>,
24347    {
24348        self.pubsub = v.map(|x| x.into());
24349        self
24350    }
24351}
24352
24353impl wkt::message::Message for NotificationConfig {
24354    fn typename() -> &'static str {
24355        "type.googleapis.com/google.container.v1.NotificationConfig"
24356    }
24357}
24358
24359/// Defines additional types related to [NotificationConfig].
24360pub mod notification_config {
24361    #[allow(unused_imports)]
24362    use super::*;
24363
24364    /// Pub/Sub specific notification config.
24365    #[derive(Clone, Default, PartialEq)]
24366    #[non_exhaustive]
24367    pub struct PubSub {
24368        /// Enable notifications for Pub/Sub.
24369        pub enabled: bool,
24370
24371        /// The desired Pub/Sub topic to which notifications will be
24372        /// sent by GKE. Format is `projects/{project}/topics/{topic}`.
24373        pub topic: std::string::String,
24374
24375        /// Allows filtering to one or more specific event types. If no filter is
24376        /// specified, or if a filter is specified with no event types, all event
24377        /// types will be sent
24378        pub filter: std::option::Option<crate::model::notification_config::Filter>,
24379
24380        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24381    }
24382
24383    impl PubSub {
24384        pub fn new() -> Self {
24385            std::default::Default::default()
24386        }
24387
24388        /// Sets the value of [enabled][crate::model::notification_config::PubSub::enabled].
24389        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24390            self.enabled = v.into();
24391            self
24392        }
24393
24394        /// Sets the value of [topic][crate::model::notification_config::PubSub::topic].
24395        pub fn set_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24396            self.topic = v.into();
24397            self
24398        }
24399
24400        /// Sets the value of [filter][crate::model::notification_config::PubSub::filter].
24401        pub fn set_filter<T>(mut self, v: T) -> Self
24402        where
24403            T: std::convert::Into<crate::model::notification_config::Filter>,
24404        {
24405            self.filter = std::option::Option::Some(v.into());
24406            self
24407        }
24408
24409        /// Sets or clears the value of [filter][crate::model::notification_config::PubSub::filter].
24410        pub fn set_or_clear_filter<T>(mut self, v: std::option::Option<T>) -> Self
24411        where
24412            T: std::convert::Into<crate::model::notification_config::Filter>,
24413        {
24414            self.filter = v.map(|x| x.into());
24415            self
24416        }
24417    }
24418
24419    impl wkt::message::Message for PubSub {
24420        fn typename() -> &'static str {
24421            "type.googleapis.com/google.container.v1.NotificationConfig.PubSub"
24422        }
24423    }
24424
24425    /// Allows filtering to one or more specific event types. If event types are
24426    /// present, those and only those event types will be transmitted to the
24427    /// cluster. Other types will be skipped. If no filter is specified, or no
24428    /// event types are present, all event types will be sent
24429    #[derive(Clone, Default, PartialEq)]
24430    #[non_exhaustive]
24431    pub struct Filter {
24432        /// Event types to allowlist.
24433        pub event_type: std::vec::Vec<crate::model::notification_config::EventType>,
24434
24435        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24436    }
24437
24438    impl Filter {
24439        pub fn new() -> Self {
24440            std::default::Default::default()
24441        }
24442
24443        /// Sets the value of [event_type][crate::model::notification_config::Filter::event_type].
24444        pub fn set_event_type<T, V>(mut self, v: T) -> Self
24445        where
24446            T: std::iter::IntoIterator<Item = V>,
24447            V: std::convert::Into<crate::model::notification_config::EventType>,
24448        {
24449            use std::iter::Iterator;
24450            self.event_type = v.into_iter().map(|i| i.into()).collect();
24451            self
24452        }
24453    }
24454
24455    impl wkt::message::Message for Filter {
24456        fn typename() -> &'static str {
24457            "type.googleapis.com/google.container.v1.NotificationConfig.Filter"
24458        }
24459    }
24460
24461    /// Types of notifications currently supported. Can be used to filter what
24462    /// notifications are sent.
24463    ///
24464    /// # Working with unknown values
24465    ///
24466    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24467    /// additional enum variants at any time. Adding new variants is not considered
24468    /// a breaking change. Applications should write their code in anticipation of:
24469    ///
24470    /// - New values appearing in future releases of the client library, **and**
24471    /// - New values received dynamically, without application changes.
24472    ///
24473    /// Please consult the [Working with enums] section in the user guide for some
24474    /// guidelines.
24475    ///
24476    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24477    #[derive(Clone, Debug, PartialEq)]
24478    #[non_exhaustive]
24479    pub enum EventType {
24480        /// Not set, will be ignored.
24481        Unspecified,
24482        /// Corresponds with UpgradeAvailableEvent.
24483        UpgradeAvailableEvent,
24484        /// Corresponds with UpgradeEvent.
24485        UpgradeEvent,
24486        /// Corresponds with SecurityBulletinEvent.
24487        SecurityBulletinEvent,
24488        /// Corresponds with UpgradeInfoEvent.
24489        UpgradeInfoEvent,
24490        /// If set, the enum was initialized with an unknown value.
24491        ///
24492        /// Applications can examine the value using [EventType::value] or
24493        /// [EventType::name].
24494        UnknownValue(event_type::UnknownValue),
24495    }
24496
24497    #[doc(hidden)]
24498    pub mod event_type {
24499        #[allow(unused_imports)]
24500        use super::*;
24501        #[derive(Clone, Debug, PartialEq)]
24502        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24503    }
24504
24505    impl EventType {
24506        /// Gets the enum value.
24507        ///
24508        /// Returns `None` if the enum contains an unknown value deserialized from
24509        /// the string representation of enums.
24510        pub fn value(&self) -> std::option::Option<i32> {
24511            match self {
24512                Self::Unspecified => std::option::Option::Some(0),
24513                Self::UpgradeAvailableEvent => std::option::Option::Some(1),
24514                Self::UpgradeEvent => std::option::Option::Some(2),
24515                Self::SecurityBulletinEvent => std::option::Option::Some(3),
24516                Self::UpgradeInfoEvent => std::option::Option::Some(4),
24517                Self::UnknownValue(u) => u.0.value(),
24518            }
24519        }
24520
24521        /// Gets the enum value as a string.
24522        ///
24523        /// Returns `None` if the enum contains an unknown value deserialized from
24524        /// the integer representation of enums.
24525        pub fn name(&self) -> std::option::Option<&str> {
24526            match self {
24527                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
24528                Self::UpgradeAvailableEvent => std::option::Option::Some("UPGRADE_AVAILABLE_EVENT"),
24529                Self::UpgradeEvent => std::option::Option::Some("UPGRADE_EVENT"),
24530                Self::SecurityBulletinEvent => std::option::Option::Some("SECURITY_BULLETIN_EVENT"),
24531                Self::UpgradeInfoEvent => std::option::Option::Some("UPGRADE_INFO_EVENT"),
24532                Self::UnknownValue(u) => u.0.name(),
24533            }
24534        }
24535    }
24536
24537    impl std::default::Default for EventType {
24538        fn default() -> Self {
24539            use std::convert::From;
24540            Self::from(0)
24541        }
24542    }
24543
24544    impl std::fmt::Display for EventType {
24545        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24546            wkt::internal::display_enum(f, self.name(), self.value())
24547        }
24548    }
24549
24550    impl std::convert::From<i32> for EventType {
24551        fn from(value: i32) -> Self {
24552            match value {
24553                0 => Self::Unspecified,
24554                1 => Self::UpgradeAvailableEvent,
24555                2 => Self::UpgradeEvent,
24556                3 => Self::SecurityBulletinEvent,
24557                4 => Self::UpgradeInfoEvent,
24558                _ => Self::UnknownValue(event_type::UnknownValue(
24559                    wkt::internal::UnknownEnumValue::Integer(value),
24560                )),
24561            }
24562        }
24563    }
24564
24565    impl std::convert::From<&str> for EventType {
24566        fn from(value: &str) -> Self {
24567            use std::string::ToString;
24568            match value {
24569                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
24570                "UPGRADE_AVAILABLE_EVENT" => Self::UpgradeAvailableEvent,
24571                "UPGRADE_EVENT" => Self::UpgradeEvent,
24572                "SECURITY_BULLETIN_EVENT" => Self::SecurityBulletinEvent,
24573                "UPGRADE_INFO_EVENT" => Self::UpgradeInfoEvent,
24574                _ => Self::UnknownValue(event_type::UnknownValue(
24575                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24576                )),
24577            }
24578        }
24579    }
24580
24581    impl serde::ser::Serialize for EventType {
24582        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24583        where
24584            S: serde::Serializer,
24585        {
24586            match self {
24587                Self::Unspecified => serializer.serialize_i32(0),
24588                Self::UpgradeAvailableEvent => serializer.serialize_i32(1),
24589                Self::UpgradeEvent => serializer.serialize_i32(2),
24590                Self::SecurityBulletinEvent => serializer.serialize_i32(3),
24591                Self::UpgradeInfoEvent => serializer.serialize_i32(4),
24592                Self::UnknownValue(u) => u.0.serialize(serializer),
24593            }
24594        }
24595    }
24596
24597    impl<'de> serde::de::Deserialize<'de> for EventType {
24598        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24599        where
24600            D: serde::Deserializer<'de>,
24601        {
24602            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
24603                ".google.container.v1.NotificationConfig.EventType",
24604            ))
24605        }
24606    }
24607}
24608
24609/// ConfidentialNodes is configuration for the confidential nodes feature, which
24610/// makes nodes run on confidential VMs.
24611#[derive(Clone, Default, PartialEq)]
24612#[non_exhaustive]
24613pub struct ConfidentialNodes {
24614    /// Whether Confidential Nodes feature is enabled.
24615    pub enabled: bool,
24616
24617    /// Defines the type of technology used by the confidential node.
24618    pub confidential_instance_type: crate::model::confidential_nodes::ConfidentialInstanceType,
24619
24620    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24621}
24622
24623impl ConfidentialNodes {
24624    pub fn new() -> Self {
24625        std::default::Default::default()
24626    }
24627
24628    /// Sets the value of [enabled][crate::model::ConfidentialNodes::enabled].
24629    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24630        self.enabled = v.into();
24631        self
24632    }
24633
24634    /// Sets the value of [confidential_instance_type][crate::model::ConfidentialNodes::confidential_instance_type].
24635    pub fn set_confidential_instance_type<
24636        T: std::convert::Into<crate::model::confidential_nodes::ConfidentialInstanceType>,
24637    >(
24638        mut self,
24639        v: T,
24640    ) -> Self {
24641        self.confidential_instance_type = v.into();
24642        self
24643    }
24644}
24645
24646impl wkt::message::Message for ConfidentialNodes {
24647    fn typename() -> &'static str {
24648        "type.googleapis.com/google.container.v1.ConfidentialNodes"
24649    }
24650}
24651
24652/// Defines additional types related to [ConfidentialNodes].
24653pub mod confidential_nodes {
24654    #[allow(unused_imports)]
24655    use super::*;
24656
24657    /// The type of technology used by the confidential node.
24658    ///
24659    /// # Working with unknown values
24660    ///
24661    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24662    /// additional enum variants at any time. Adding new variants is not considered
24663    /// a breaking change. Applications should write their code in anticipation of:
24664    ///
24665    /// - New values appearing in future releases of the client library, **and**
24666    /// - New values received dynamically, without application changes.
24667    ///
24668    /// Please consult the [Working with enums] section in the user guide for some
24669    /// guidelines.
24670    ///
24671    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24672    #[derive(Clone, Debug, PartialEq)]
24673    #[non_exhaustive]
24674    pub enum ConfidentialInstanceType {
24675        /// No type specified. Do not use this value.
24676        Unspecified,
24677        /// AMD Secure Encrypted Virtualization.
24678        Sev,
24679        /// AMD Secure Encrypted Virtualization - Secure Nested Paging.
24680        SevSnp,
24681        /// Intel Trust Domain eXtension.
24682        Tdx,
24683        /// If set, the enum was initialized with an unknown value.
24684        ///
24685        /// Applications can examine the value using [ConfidentialInstanceType::value] or
24686        /// [ConfidentialInstanceType::name].
24687        UnknownValue(confidential_instance_type::UnknownValue),
24688    }
24689
24690    #[doc(hidden)]
24691    pub mod confidential_instance_type {
24692        #[allow(unused_imports)]
24693        use super::*;
24694        #[derive(Clone, Debug, PartialEq)]
24695        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24696    }
24697
24698    impl ConfidentialInstanceType {
24699        /// Gets the enum value.
24700        ///
24701        /// Returns `None` if the enum contains an unknown value deserialized from
24702        /// the string representation of enums.
24703        pub fn value(&self) -> std::option::Option<i32> {
24704            match self {
24705                Self::Unspecified => std::option::Option::Some(0),
24706                Self::Sev => std::option::Option::Some(1),
24707                Self::SevSnp => std::option::Option::Some(2),
24708                Self::Tdx => std::option::Option::Some(3),
24709                Self::UnknownValue(u) => u.0.value(),
24710            }
24711        }
24712
24713        /// Gets the enum value as a string.
24714        ///
24715        /// Returns `None` if the enum contains an unknown value deserialized from
24716        /// the integer representation of enums.
24717        pub fn name(&self) -> std::option::Option<&str> {
24718            match self {
24719                Self::Unspecified => {
24720                    std::option::Option::Some("CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED")
24721                }
24722                Self::Sev => std::option::Option::Some("SEV"),
24723                Self::SevSnp => std::option::Option::Some("SEV_SNP"),
24724                Self::Tdx => std::option::Option::Some("TDX"),
24725                Self::UnknownValue(u) => u.0.name(),
24726            }
24727        }
24728    }
24729
24730    impl std::default::Default for ConfidentialInstanceType {
24731        fn default() -> Self {
24732            use std::convert::From;
24733            Self::from(0)
24734        }
24735    }
24736
24737    impl std::fmt::Display for ConfidentialInstanceType {
24738        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24739            wkt::internal::display_enum(f, self.name(), self.value())
24740        }
24741    }
24742
24743    impl std::convert::From<i32> for ConfidentialInstanceType {
24744        fn from(value: i32) -> Self {
24745            match value {
24746                0 => Self::Unspecified,
24747                1 => Self::Sev,
24748                2 => Self::SevSnp,
24749                3 => Self::Tdx,
24750                _ => Self::UnknownValue(confidential_instance_type::UnknownValue(
24751                    wkt::internal::UnknownEnumValue::Integer(value),
24752                )),
24753            }
24754        }
24755    }
24756
24757    impl std::convert::From<&str> for ConfidentialInstanceType {
24758        fn from(value: &str) -> Self {
24759            use std::string::ToString;
24760            match value {
24761                "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" => Self::Unspecified,
24762                "SEV" => Self::Sev,
24763                "SEV_SNP" => Self::SevSnp,
24764                "TDX" => Self::Tdx,
24765                _ => Self::UnknownValue(confidential_instance_type::UnknownValue(
24766                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24767                )),
24768            }
24769        }
24770    }
24771
24772    impl serde::ser::Serialize for ConfidentialInstanceType {
24773        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24774        where
24775            S: serde::Serializer,
24776        {
24777            match self {
24778                Self::Unspecified => serializer.serialize_i32(0),
24779                Self::Sev => serializer.serialize_i32(1),
24780                Self::SevSnp => serializer.serialize_i32(2),
24781                Self::Tdx => serializer.serialize_i32(3),
24782                Self::UnknownValue(u) => u.0.serialize(serializer),
24783            }
24784        }
24785    }
24786
24787    impl<'de> serde::de::Deserialize<'de> for ConfidentialInstanceType {
24788        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24789        where
24790            D: serde::Deserializer<'de>,
24791        {
24792            deserializer.deserialize_any(
24793                wkt::internal::EnumVisitor::<ConfidentialInstanceType>::new(
24794                    ".google.container.v1.ConfidentialNodes.ConfidentialInstanceType",
24795                ),
24796            )
24797        }
24798    }
24799}
24800
24801/// UpgradeEvent is a notification sent to customers by the cluster server when
24802/// a resource is upgrading.
24803#[derive(Clone, Default, PartialEq)]
24804#[non_exhaustive]
24805pub struct UpgradeEvent {
24806    /// The resource type that is upgrading.
24807    pub resource_type: crate::model::UpgradeResourceType,
24808
24809    /// The operation associated with this upgrade.
24810    pub operation: std::string::String,
24811
24812    /// The time when the operation was started.
24813    pub operation_start_time: std::option::Option<wkt::Timestamp>,
24814
24815    /// The current version before the upgrade.
24816    pub current_version: std::string::String,
24817
24818    /// The target version for the upgrade.
24819    pub target_version: std::string::String,
24820
24821    /// Optional relative path to the resource. For example in node pool upgrades,
24822    /// the relative path of the node pool.
24823    pub resource: std::string::String,
24824
24825    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24826}
24827
24828impl UpgradeEvent {
24829    pub fn new() -> Self {
24830        std::default::Default::default()
24831    }
24832
24833    /// Sets the value of [resource_type][crate::model::UpgradeEvent::resource_type].
24834    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
24835        mut self,
24836        v: T,
24837    ) -> Self {
24838        self.resource_type = v.into();
24839        self
24840    }
24841
24842    /// Sets the value of [operation][crate::model::UpgradeEvent::operation].
24843    pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24844        self.operation = v.into();
24845        self
24846    }
24847
24848    /// Sets the value of [operation_start_time][crate::model::UpgradeEvent::operation_start_time].
24849    pub fn set_operation_start_time<T>(mut self, v: T) -> Self
24850    where
24851        T: std::convert::Into<wkt::Timestamp>,
24852    {
24853        self.operation_start_time = std::option::Option::Some(v.into());
24854        self
24855    }
24856
24857    /// Sets or clears the value of [operation_start_time][crate::model::UpgradeEvent::operation_start_time].
24858    pub fn set_or_clear_operation_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24859    where
24860        T: std::convert::Into<wkt::Timestamp>,
24861    {
24862        self.operation_start_time = v.map(|x| x.into());
24863        self
24864    }
24865
24866    /// Sets the value of [current_version][crate::model::UpgradeEvent::current_version].
24867    pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24868        self.current_version = v.into();
24869        self
24870    }
24871
24872    /// Sets the value of [target_version][crate::model::UpgradeEvent::target_version].
24873    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24874        self.target_version = v.into();
24875        self
24876    }
24877
24878    /// Sets the value of [resource][crate::model::UpgradeEvent::resource].
24879    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24880        self.resource = v.into();
24881        self
24882    }
24883}
24884
24885impl wkt::message::Message for UpgradeEvent {
24886    fn typename() -> &'static str {
24887        "type.googleapis.com/google.container.v1.UpgradeEvent"
24888    }
24889}
24890
24891/// UpgradeInfoEvent is a notification sent to customers about the upgrade
24892/// information of a resource.
24893#[derive(Clone, Default, PartialEq)]
24894#[non_exhaustive]
24895pub struct UpgradeInfoEvent {
24896    /// The resource type associated with the upgrade.
24897    pub resource_type: crate::model::UpgradeResourceType,
24898
24899    /// The operation associated with this upgrade.
24900    pub operation: std::string::String,
24901
24902    /// The time when the operation was started.
24903    pub start_time: std::option::Option<wkt::Timestamp>,
24904
24905    /// The time when the operation ended.
24906    pub end_time: std::option::Option<wkt::Timestamp>,
24907
24908    /// The current version before the upgrade.
24909    pub current_version: std::string::String,
24910
24911    /// The target version for the upgrade.
24912    pub target_version: std::string::String,
24913
24914    /// Optional relative path to the resource. For example in node pool upgrades,
24915    /// the relative path of the node pool.
24916    pub resource: std::string::String,
24917
24918    /// Output only. The state of the upgrade.
24919    pub state: crate::model::upgrade_info_event::State,
24920
24921    /// The end of standard support timestamp.
24922    pub standard_support_end_time: std::option::Option<wkt::Timestamp>,
24923
24924    /// The end of extended support timestamp.
24925    pub extended_support_end_time: std::option::Option<wkt::Timestamp>,
24926
24927    /// A brief description of the event.
24928    pub description: std::string::String,
24929
24930    /// The type of the event.
24931    pub event_type: crate::model::upgrade_info_event::EventType,
24932
24933    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24934}
24935
24936impl UpgradeInfoEvent {
24937    pub fn new() -> Self {
24938        std::default::Default::default()
24939    }
24940
24941    /// Sets the value of [resource_type][crate::model::UpgradeInfoEvent::resource_type].
24942    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
24943        mut self,
24944        v: T,
24945    ) -> Self {
24946        self.resource_type = v.into();
24947        self
24948    }
24949
24950    /// Sets the value of [operation][crate::model::UpgradeInfoEvent::operation].
24951    pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24952        self.operation = v.into();
24953        self
24954    }
24955
24956    /// Sets the value of [start_time][crate::model::UpgradeInfoEvent::start_time].
24957    pub fn set_start_time<T>(mut self, v: T) -> Self
24958    where
24959        T: std::convert::Into<wkt::Timestamp>,
24960    {
24961        self.start_time = std::option::Option::Some(v.into());
24962        self
24963    }
24964
24965    /// Sets or clears the value of [start_time][crate::model::UpgradeInfoEvent::start_time].
24966    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24967    where
24968        T: std::convert::Into<wkt::Timestamp>,
24969    {
24970        self.start_time = v.map(|x| x.into());
24971        self
24972    }
24973
24974    /// Sets the value of [end_time][crate::model::UpgradeInfoEvent::end_time].
24975    pub fn set_end_time<T>(mut self, v: T) -> Self
24976    where
24977        T: std::convert::Into<wkt::Timestamp>,
24978    {
24979        self.end_time = std::option::Option::Some(v.into());
24980        self
24981    }
24982
24983    /// Sets or clears the value of [end_time][crate::model::UpgradeInfoEvent::end_time].
24984    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24985    where
24986        T: std::convert::Into<wkt::Timestamp>,
24987    {
24988        self.end_time = v.map(|x| x.into());
24989        self
24990    }
24991
24992    /// Sets the value of [current_version][crate::model::UpgradeInfoEvent::current_version].
24993    pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24994        self.current_version = v.into();
24995        self
24996    }
24997
24998    /// Sets the value of [target_version][crate::model::UpgradeInfoEvent::target_version].
24999    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25000        self.target_version = v.into();
25001        self
25002    }
25003
25004    /// Sets the value of [resource][crate::model::UpgradeInfoEvent::resource].
25005    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25006        self.resource = v.into();
25007        self
25008    }
25009
25010    /// Sets the value of [state][crate::model::UpgradeInfoEvent::state].
25011    pub fn set_state<T: std::convert::Into<crate::model::upgrade_info_event::State>>(
25012        mut self,
25013        v: T,
25014    ) -> Self {
25015        self.state = v.into();
25016        self
25017    }
25018
25019    /// Sets the value of [standard_support_end_time][crate::model::UpgradeInfoEvent::standard_support_end_time].
25020    pub fn set_standard_support_end_time<T>(mut self, v: T) -> Self
25021    where
25022        T: std::convert::Into<wkt::Timestamp>,
25023    {
25024        self.standard_support_end_time = std::option::Option::Some(v.into());
25025        self
25026    }
25027
25028    /// Sets or clears the value of [standard_support_end_time][crate::model::UpgradeInfoEvent::standard_support_end_time].
25029    pub fn set_or_clear_standard_support_end_time<T>(mut self, v: std::option::Option<T>) -> Self
25030    where
25031        T: std::convert::Into<wkt::Timestamp>,
25032    {
25033        self.standard_support_end_time = v.map(|x| x.into());
25034        self
25035    }
25036
25037    /// Sets the value of [extended_support_end_time][crate::model::UpgradeInfoEvent::extended_support_end_time].
25038    pub fn set_extended_support_end_time<T>(mut self, v: T) -> Self
25039    where
25040        T: std::convert::Into<wkt::Timestamp>,
25041    {
25042        self.extended_support_end_time = std::option::Option::Some(v.into());
25043        self
25044    }
25045
25046    /// Sets or clears the value of [extended_support_end_time][crate::model::UpgradeInfoEvent::extended_support_end_time].
25047    pub fn set_or_clear_extended_support_end_time<T>(mut self, v: std::option::Option<T>) -> Self
25048    where
25049        T: std::convert::Into<wkt::Timestamp>,
25050    {
25051        self.extended_support_end_time = v.map(|x| x.into());
25052        self
25053    }
25054
25055    /// Sets the value of [description][crate::model::UpgradeInfoEvent::description].
25056    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25057        self.description = v.into();
25058        self
25059    }
25060
25061    /// Sets the value of [event_type][crate::model::UpgradeInfoEvent::event_type].
25062    pub fn set_event_type<T: std::convert::Into<crate::model::upgrade_info_event::EventType>>(
25063        mut self,
25064        v: T,
25065    ) -> Self {
25066        self.event_type = v.into();
25067        self
25068    }
25069}
25070
25071impl wkt::message::Message for UpgradeInfoEvent {
25072    fn typename() -> &'static str {
25073        "type.googleapis.com/google.container.v1.UpgradeInfoEvent"
25074    }
25075}
25076
25077/// Defines additional types related to [UpgradeInfoEvent].
25078pub mod upgrade_info_event {
25079    #[allow(unused_imports)]
25080    use super::*;
25081
25082    /// The state of the upgrade.
25083    ///
25084    /// # Working with unknown values
25085    ///
25086    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25087    /// additional enum variants at any time. Adding new variants is not considered
25088    /// a breaking change. Applications should write their code in anticipation of:
25089    ///
25090    /// - New values appearing in future releases of the client library, **and**
25091    /// - New values received dynamically, without application changes.
25092    ///
25093    /// Please consult the [Working with enums] section in the user guide for some
25094    /// guidelines.
25095    ///
25096    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25097    #[derive(Clone, Debug, PartialEq)]
25098    #[non_exhaustive]
25099    pub enum State {
25100        /// STATE_UNSPECIFIED indicates the state is unspecified.
25101        Unspecified,
25102        /// STARTED indicates the upgrade has started.
25103        Started,
25104        /// SUCCEEDED indicates the upgrade has completed successfully.
25105        Succeeded,
25106        /// FAILED indicates the upgrade has failed.
25107        Failed,
25108        /// CANCELED indicates the upgrade has canceled.
25109        Canceled,
25110        /// If set, the enum was initialized with an unknown value.
25111        ///
25112        /// Applications can examine the value using [State::value] or
25113        /// [State::name].
25114        UnknownValue(state::UnknownValue),
25115    }
25116
25117    #[doc(hidden)]
25118    pub mod state {
25119        #[allow(unused_imports)]
25120        use super::*;
25121        #[derive(Clone, Debug, PartialEq)]
25122        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25123    }
25124
25125    impl State {
25126        /// Gets the enum value.
25127        ///
25128        /// Returns `None` if the enum contains an unknown value deserialized from
25129        /// the string representation of enums.
25130        pub fn value(&self) -> std::option::Option<i32> {
25131            match self {
25132                Self::Unspecified => std::option::Option::Some(0),
25133                Self::Started => std::option::Option::Some(3),
25134                Self::Succeeded => std::option::Option::Some(4),
25135                Self::Failed => std::option::Option::Some(5),
25136                Self::Canceled => std::option::Option::Some(6),
25137                Self::UnknownValue(u) => u.0.value(),
25138            }
25139        }
25140
25141        /// Gets the enum value as a string.
25142        ///
25143        /// Returns `None` if the enum contains an unknown value deserialized from
25144        /// the integer representation of enums.
25145        pub fn name(&self) -> std::option::Option<&str> {
25146            match self {
25147                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
25148                Self::Started => std::option::Option::Some("STARTED"),
25149                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
25150                Self::Failed => std::option::Option::Some("FAILED"),
25151                Self::Canceled => std::option::Option::Some("CANCELED"),
25152                Self::UnknownValue(u) => u.0.name(),
25153            }
25154        }
25155    }
25156
25157    impl std::default::Default for State {
25158        fn default() -> Self {
25159            use std::convert::From;
25160            Self::from(0)
25161        }
25162    }
25163
25164    impl std::fmt::Display for State {
25165        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25166            wkt::internal::display_enum(f, self.name(), self.value())
25167        }
25168    }
25169
25170    impl std::convert::From<i32> for State {
25171        fn from(value: i32) -> Self {
25172            match value {
25173                0 => Self::Unspecified,
25174                3 => Self::Started,
25175                4 => Self::Succeeded,
25176                5 => Self::Failed,
25177                6 => Self::Canceled,
25178                _ => Self::UnknownValue(state::UnknownValue(
25179                    wkt::internal::UnknownEnumValue::Integer(value),
25180                )),
25181            }
25182        }
25183    }
25184
25185    impl std::convert::From<&str> for State {
25186        fn from(value: &str) -> Self {
25187            use std::string::ToString;
25188            match value {
25189                "STATE_UNSPECIFIED" => Self::Unspecified,
25190                "STARTED" => Self::Started,
25191                "SUCCEEDED" => Self::Succeeded,
25192                "FAILED" => Self::Failed,
25193                "CANCELED" => Self::Canceled,
25194                _ => Self::UnknownValue(state::UnknownValue(
25195                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25196                )),
25197            }
25198        }
25199    }
25200
25201    impl serde::ser::Serialize for State {
25202        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25203        where
25204            S: serde::Serializer,
25205        {
25206            match self {
25207                Self::Unspecified => serializer.serialize_i32(0),
25208                Self::Started => serializer.serialize_i32(3),
25209                Self::Succeeded => serializer.serialize_i32(4),
25210                Self::Failed => serializer.serialize_i32(5),
25211                Self::Canceled => serializer.serialize_i32(6),
25212                Self::UnknownValue(u) => u.0.serialize(serializer),
25213            }
25214        }
25215    }
25216
25217    impl<'de> serde::de::Deserialize<'de> for State {
25218        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25219        where
25220            D: serde::Deserializer<'de>,
25221        {
25222            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
25223                ".google.container.v1.UpgradeInfoEvent.State",
25224            ))
25225        }
25226    }
25227
25228    /// The type of the event.
25229    ///
25230    /// # Working with unknown values
25231    ///
25232    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25233    /// additional enum variants at any time. Adding new variants is not considered
25234    /// a breaking change. Applications should write their code in anticipation of:
25235    ///
25236    /// - New values appearing in future releases of the client library, **and**
25237    /// - New values received dynamically, without application changes.
25238    ///
25239    /// Please consult the [Working with enums] section in the user guide for some
25240    /// guidelines.
25241    ///
25242    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25243    #[derive(Clone, Debug, PartialEq)]
25244    #[non_exhaustive]
25245    pub enum EventType {
25246        /// EVENT_TYPE_UNSPECIFIED indicates the event type is unspecified.
25247        Unspecified,
25248        /// END_OF_SUPPORT indicates GKE version reaches end of support, check
25249        /// standard_support_end_time and extended_support_end_time for more details.
25250        EndOfSupport,
25251        /// COS_MILESTONE_VERSION_UPDATE indicates that the COS node image will
25252        /// update COS milestone version for new patch versions starting with
25253        /// the one in the description.
25254        CosMilestoneVersionUpdate,
25255        /// UPGRADE_LIFECYCLE indicates the event is about the upgrade lifecycle.
25256        UpgradeLifecycle,
25257        /// If set, the enum was initialized with an unknown value.
25258        ///
25259        /// Applications can examine the value using [EventType::value] or
25260        /// [EventType::name].
25261        UnknownValue(event_type::UnknownValue),
25262    }
25263
25264    #[doc(hidden)]
25265    pub mod event_type {
25266        #[allow(unused_imports)]
25267        use super::*;
25268        #[derive(Clone, Debug, PartialEq)]
25269        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25270    }
25271
25272    impl EventType {
25273        /// Gets the enum value.
25274        ///
25275        /// Returns `None` if the enum contains an unknown value deserialized from
25276        /// the string representation of enums.
25277        pub fn value(&self) -> std::option::Option<i32> {
25278            match self {
25279                Self::Unspecified => std::option::Option::Some(0),
25280                Self::EndOfSupport => std::option::Option::Some(1),
25281                Self::CosMilestoneVersionUpdate => std::option::Option::Some(2),
25282                Self::UpgradeLifecycle => std::option::Option::Some(3),
25283                Self::UnknownValue(u) => u.0.value(),
25284            }
25285        }
25286
25287        /// Gets the enum value as a string.
25288        ///
25289        /// Returns `None` if the enum contains an unknown value deserialized from
25290        /// the integer representation of enums.
25291        pub fn name(&self) -> std::option::Option<&str> {
25292            match self {
25293                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
25294                Self::EndOfSupport => std::option::Option::Some("END_OF_SUPPORT"),
25295                Self::CosMilestoneVersionUpdate => {
25296                    std::option::Option::Some("COS_MILESTONE_VERSION_UPDATE")
25297                }
25298                Self::UpgradeLifecycle => std::option::Option::Some("UPGRADE_LIFECYCLE"),
25299                Self::UnknownValue(u) => u.0.name(),
25300            }
25301        }
25302    }
25303
25304    impl std::default::Default for EventType {
25305        fn default() -> Self {
25306            use std::convert::From;
25307            Self::from(0)
25308        }
25309    }
25310
25311    impl std::fmt::Display for EventType {
25312        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25313            wkt::internal::display_enum(f, self.name(), self.value())
25314        }
25315    }
25316
25317    impl std::convert::From<i32> for EventType {
25318        fn from(value: i32) -> Self {
25319            match value {
25320                0 => Self::Unspecified,
25321                1 => Self::EndOfSupport,
25322                2 => Self::CosMilestoneVersionUpdate,
25323                3 => Self::UpgradeLifecycle,
25324                _ => Self::UnknownValue(event_type::UnknownValue(
25325                    wkt::internal::UnknownEnumValue::Integer(value),
25326                )),
25327            }
25328        }
25329    }
25330
25331    impl std::convert::From<&str> for EventType {
25332        fn from(value: &str) -> Self {
25333            use std::string::ToString;
25334            match value {
25335                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
25336                "END_OF_SUPPORT" => Self::EndOfSupport,
25337                "COS_MILESTONE_VERSION_UPDATE" => Self::CosMilestoneVersionUpdate,
25338                "UPGRADE_LIFECYCLE" => Self::UpgradeLifecycle,
25339                _ => Self::UnknownValue(event_type::UnknownValue(
25340                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25341                )),
25342            }
25343        }
25344    }
25345
25346    impl serde::ser::Serialize for EventType {
25347        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25348        where
25349            S: serde::Serializer,
25350        {
25351            match self {
25352                Self::Unspecified => serializer.serialize_i32(0),
25353                Self::EndOfSupport => serializer.serialize_i32(1),
25354                Self::CosMilestoneVersionUpdate => serializer.serialize_i32(2),
25355                Self::UpgradeLifecycle => serializer.serialize_i32(3),
25356                Self::UnknownValue(u) => u.0.serialize(serializer),
25357            }
25358        }
25359    }
25360
25361    impl<'de> serde::de::Deserialize<'de> for EventType {
25362        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25363        where
25364            D: serde::Deserializer<'de>,
25365        {
25366            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
25367                ".google.container.v1.UpgradeInfoEvent.EventType",
25368            ))
25369        }
25370    }
25371}
25372
25373/// UpgradeAvailableEvent is a notification sent to customers when a new
25374/// available version is released.
25375#[derive(Clone, Default, PartialEq)]
25376#[non_exhaustive]
25377pub struct UpgradeAvailableEvent {
25378    /// The release version available for upgrade.
25379    pub version: std::string::String,
25380
25381    /// The resource type of the release version.
25382    pub resource_type: crate::model::UpgradeResourceType,
25383
25384    /// The release channel of the version. If empty, it means a non-channel
25385    /// release.
25386    pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
25387
25388    /// Optional relative path to the resource. For example, the relative path of
25389    /// the node pool.
25390    pub resource: std::string::String,
25391
25392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25393}
25394
25395impl UpgradeAvailableEvent {
25396    pub fn new() -> Self {
25397        std::default::Default::default()
25398    }
25399
25400    /// Sets the value of [version][crate::model::UpgradeAvailableEvent::version].
25401    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25402        self.version = v.into();
25403        self
25404    }
25405
25406    /// Sets the value of [resource_type][crate::model::UpgradeAvailableEvent::resource_type].
25407    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
25408        mut self,
25409        v: T,
25410    ) -> Self {
25411        self.resource_type = v.into();
25412        self
25413    }
25414
25415    /// Sets the value of [release_channel][crate::model::UpgradeAvailableEvent::release_channel].
25416    pub fn set_release_channel<T>(mut self, v: T) -> Self
25417    where
25418        T: std::convert::Into<crate::model::ReleaseChannel>,
25419    {
25420        self.release_channel = std::option::Option::Some(v.into());
25421        self
25422    }
25423
25424    /// Sets or clears the value of [release_channel][crate::model::UpgradeAvailableEvent::release_channel].
25425    pub fn set_or_clear_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
25426    where
25427        T: std::convert::Into<crate::model::ReleaseChannel>,
25428    {
25429        self.release_channel = v.map(|x| x.into());
25430        self
25431    }
25432
25433    /// Sets the value of [resource][crate::model::UpgradeAvailableEvent::resource].
25434    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25435        self.resource = v.into();
25436        self
25437    }
25438}
25439
25440impl wkt::message::Message for UpgradeAvailableEvent {
25441    fn typename() -> &'static str {
25442        "type.googleapis.com/google.container.v1.UpgradeAvailableEvent"
25443    }
25444}
25445
25446/// SecurityBulletinEvent is a notification sent to customers when a security
25447/// bulletin has been posted that they are vulnerable to.
25448#[derive(Clone, Default, PartialEq)]
25449#[non_exhaustive]
25450pub struct SecurityBulletinEvent {
25451    /// The resource type (node/control plane) that has the vulnerability. Multiple
25452    /// notifications (1 notification per resource type) will be sent for a
25453    /// vulnerability that affects > 1 resource type.
25454    pub resource_type_affected: std::string::String,
25455
25456    /// The ID of the bulletin corresponding to the vulnerability.
25457    pub bulletin_id: std::string::String,
25458
25459    /// The CVEs associated with this bulletin.
25460    pub cve_ids: std::vec::Vec<std::string::String>,
25461
25462    /// The severity of this bulletin as it relates to GKE.
25463    pub severity: std::string::String,
25464
25465    /// The URI link to the bulletin on the website for more information.
25466    pub bulletin_uri: std::string::String,
25467
25468    /// A brief description of the bulletin. See the bulletin pointed to by the
25469    /// bulletin_uri field for an expanded description.
25470    pub brief_description: std::string::String,
25471
25472    /// The GKE minor versions affected by this vulnerability.
25473    pub affected_supported_minors: std::vec::Vec<std::string::String>,
25474
25475    /// The GKE versions where this vulnerability is patched.
25476    pub patched_versions: std::vec::Vec<std::string::String>,
25477
25478    /// This represents a version selected from the patched_versions field that
25479    /// the cluster receiving this notification should most likely want to upgrade
25480    /// to based on its current version. Note that if this notification is being
25481    /// received by a given cluster, it means that this version is currently
25482    /// available as an upgrade target in that cluster's location.
25483    pub suggested_upgrade_target: std::string::String,
25484
25485    /// If this field is specified, it means there are manual steps that the user
25486    /// must take to make their clusters safe.
25487    pub manual_steps_required: bool,
25488
25489    /// The GKE versions where this vulnerability is mitigated.
25490    pub mitigated_versions: std::vec::Vec<std::string::String>,
25491
25492    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25493}
25494
25495impl SecurityBulletinEvent {
25496    pub fn new() -> Self {
25497        std::default::Default::default()
25498    }
25499
25500    /// Sets the value of [resource_type_affected][crate::model::SecurityBulletinEvent::resource_type_affected].
25501    pub fn set_resource_type_affected<T: std::convert::Into<std::string::String>>(
25502        mut self,
25503        v: T,
25504    ) -> Self {
25505        self.resource_type_affected = v.into();
25506        self
25507    }
25508
25509    /// Sets the value of [bulletin_id][crate::model::SecurityBulletinEvent::bulletin_id].
25510    pub fn set_bulletin_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25511        self.bulletin_id = v.into();
25512        self
25513    }
25514
25515    /// Sets the value of [cve_ids][crate::model::SecurityBulletinEvent::cve_ids].
25516    pub fn set_cve_ids<T, V>(mut self, v: T) -> Self
25517    where
25518        T: std::iter::IntoIterator<Item = V>,
25519        V: std::convert::Into<std::string::String>,
25520    {
25521        use std::iter::Iterator;
25522        self.cve_ids = v.into_iter().map(|i| i.into()).collect();
25523        self
25524    }
25525
25526    /// Sets the value of [severity][crate::model::SecurityBulletinEvent::severity].
25527    pub fn set_severity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25528        self.severity = v.into();
25529        self
25530    }
25531
25532    /// Sets the value of [bulletin_uri][crate::model::SecurityBulletinEvent::bulletin_uri].
25533    pub fn set_bulletin_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25534        self.bulletin_uri = v.into();
25535        self
25536    }
25537
25538    /// Sets the value of [brief_description][crate::model::SecurityBulletinEvent::brief_description].
25539    pub fn set_brief_description<T: std::convert::Into<std::string::String>>(
25540        mut self,
25541        v: T,
25542    ) -> Self {
25543        self.brief_description = v.into();
25544        self
25545    }
25546
25547    /// Sets the value of [affected_supported_minors][crate::model::SecurityBulletinEvent::affected_supported_minors].
25548    pub fn set_affected_supported_minors<T, V>(mut self, v: T) -> Self
25549    where
25550        T: std::iter::IntoIterator<Item = V>,
25551        V: std::convert::Into<std::string::String>,
25552    {
25553        use std::iter::Iterator;
25554        self.affected_supported_minors = v.into_iter().map(|i| i.into()).collect();
25555        self
25556    }
25557
25558    /// Sets the value of [patched_versions][crate::model::SecurityBulletinEvent::patched_versions].
25559    pub fn set_patched_versions<T, V>(mut self, v: T) -> Self
25560    where
25561        T: std::iter::IntoIterator<Item = V>,
25562        V: std::convert::Into<std::string::String>,
25563    {
25564        use std::iter::Iterator;
25565        self.patched_versions = v.into_iter().map(|i| i.into()).collect();
25566        self
25567    }
25568
25569    /// Sets the value of [suggested_upgrade_target][crate::model::SecurityBulletinEvent::suggested_upgrade_target].
25570    pub fn set_suggested_upgrade_target<T: std::convert::Into<std::string::String>>(
25571        mut self,
25572        v: T,
25573    ) -> Self {
25574        self.suggested_upgrade_target = v.into();
25575        self
25576    }
25577
25578    /// Sets the value of [manual_steps_required][crate::model::SecurityBulletinEvent::manual_steps_required].
25579    pub fn set_manual_steps_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25580        self.manual_steps_required = v.into();
25581        self
25582    }
25583
25584    /// Sets the value of [mitigated_versions][crate::model::SecurityBulletinEvent::mitigated_versions].
25585    pub fn set_mitigated_versions<T, V>(mut self, v: T) -> Self
25586    where
25587        T: std::iter::IntoIterator<Item = V>,
25588        V: std::convert::Into<std::string::String>,
25589    {
25590        use std::iter::Iterator;
25591        self.mitigated_versions = v.into_iter().map(|i| i.into()).collect();
25592        self
25593    }
25594}
25595
25596impl wkt::message::Message for SecurityBulletinEvent {
25597    fn typename() -> &'static str {
25598        "type.googleapis.com/google.container.v1.SecurityBulletinEvent"
25599    }
25600}
25601
25602/// Autopilot is the configuration for Autopilot settings on the cluster.
25603#[derive(Clone, Default, PartialEq)]
25604#[non_exhaustive]
25605pub struct Autopilot {
25606    /// Enable Autopilot
25607    pub enabled: bool,
25608
25609    /// WorkloadPolicyConfig is the configuration related to GCW workload policy
25610    pub workload_policy_config: std::option::Option<crate::model::WorkloadPolicyConfig>,
25611
25612    /// PrivilegedAdmissionConfig is the configuration related to privileged
25613    /// admission control.
25614    pub privileged_admission_config: std::option::Option<crate::model::PrivilegedAdmissionConfig>,
25615
25616    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25617}
25618
25619impl Autopilot {
25620    pub fn new() -> Self {
25621        std::default::Default::default()
25622    }
25623
25624    /// Sets the value of [enabled][crate::model::Autopilot::enabled].
25625    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25626        self.enabled = v.into();
25627        self
25628    }
25629
25630    /// Sets the value of [workload_policy_config][crate::model::Autopilot::workload_policy_config].
25631    pub fn set_workload_policy_config<T>(mut self, v: T) -> Self
25632    where
25633        T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
25634    {
25635        self.workload_policy_config = std::option::Option::Some(v.into());
25636        self
25637    }
25638
25639    /// Sets or clears the value of [workload_policy_config][crate::model::Autopilot::workload_policy_config].
25640    pub fn set_or_clear_workload_policy_config<T>(mut self, v: std::option::Option<T>) -> Self
25641    where
25642        T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
25643    {
25644        self.workload_policy_config = v.map(|x| x.into());
25645        self
25646    }
25647
25648    /// Sets the value of [privileged_admission_config][crate::model::Autopilot::privileged_admission_config].
25649    pub fn set_privileged_admission_config<T>(mut self, v: T) -> Self
25650    where
25651        T: std::convert::Into<crate::model::PrivilegedAdmissionConfig>,
25652    {
25653        self.privileged_admission_config = std::option::Option::Some(v.into());
25654        self
25655    }
25656
25657    /// Sets or clears the value of [privileged_admission_config][crate::model::Autopilot::privileged_admission_config].
25658    pub fn set_or_clear_privileged_admission_config<T>(mut self, v: std::option::Option<T>) -> Self
25659    where
25660        T: std::convert::Into<crate::model::PrivilegedAdmissionConfig>,
25661    {
25662        self.privileged_admission_config = v.map(|x| x.into());
25663        self
25664    }
25665}
25666
25667impl wkt::message::Message for Autopilot {
25668    fn typename() -> &'static str {
25669        "type.googleapis.com/google.container.v1.Autopilot"
25670    }
25671}
25672
25673/// PrivilegedAdmissionConfig stores the list of authorized allowlist
25674/// paths for the cluster.
25675#[derive(Clone, Default, PartialEq)]
25676#[non_exhaustive]
25677pub struct PrivilegedAdmissionConfig {
25678    /// The customer allowlist Cloud Storage paths for the cluster. These paths are
25679    /// used with the `--autopilot-privileged-admission` flag to authorize
25680    /// privileged workloads in Autopilot clusters.
25681    ///
25682    /// Paths can be GKE-owned, in the format
25683    /// `gke://<partner_name>/<app_name>/<allowlist_path>`, or customer-owned, in
25684    /// the format `gs://<bucket_name>/<allowlist_path>`.
25685    ///
25686    /// Wildcards (`*`) are supported to authorize all allowlists under specific
25687    /// paths or directories. Example: `gs://my-bucket/*` will authorize all
25688    /// allowlists under the `my-bucket` bucket.
25689    pub allowlist_paths: std::vec::Vec<std::string::String>,
25690
25691    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25692}
25693
25694impl PrivilegedAdmissionConfig {
25695    pub fn new() -> Self {
25696        std::default::Default::default()
25697    }
25698
25699    /// Sets the value of [allowlist_paths][crate::model::PrivilegedAdmissionConfig::allowlist_paths].
25700    pub fn set_allowlist_paths<T, V>(mut self, v: T) -> Self
25701    where
25702        T: std::iter::IntoIterator<Item = V>,
25703        V: std::convert::Into<std::string::String>,
25704    {
25705        use std::iter::Iterator;
25706        self.allowlist_paths = v.into_iter().map(|i| i.into()).collect();
25707        self
25708    }
25709}
25710
25711impl wkt::message::Message for PrivilegedAdmissionConfig {
25712    fn typename() -> &'static str {
25713        "type.googleapis.com/google.container.v1.PrivilegedAdmissionConfig"
25714    }
25715}
25716
25717/// WorkloadPolicyConfig is the configuration related to GCW workload policy
25718#[derive(Clone, Default, PartialEq)]
25719#[non_exhaustive]
25720pub struct WorkloadPolicyConfig {
25721    /// If true, workloads can use NET_ADMIN capability.
25722    pub allow_net_admin: std::option::Option<bool>,
25723
25724    /// If true, enables the GCW Auditor that audits workloads on
25725    /// standard clusters.
25726    pub autopilot_compatibility_auditing_enabled: std::option::Option<bool>,
25727
25728    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25729}
25730
25731impl WorkloadPolicyConfig {
25732    pub fn new() -> Self {
25733        std::default::Default::default()
25734    }
25735
25736    /// Sets the value of [allow_net_admin][crate::model::WorkloadPolicyConfig::allow_net_admin].
25737    pub fn set_allow_net_admin<T>(mut self, v: T) -> Self
25738    where
25739        T: std::convert::Into<bool>,
25740    {
25741        self.allow_net_admin = std::option::Option::Some(v.into());
25742        self
25743    }
25744
25745    /// Sets or clears the value of [allow_net_admin][crate::model::WorkloadPolicyConfig::allow_net_admin].
25746    pub fn set_or_clear_allow_net_admin<T>(mut self, v: std::option::Option<T>) -> Self
25747    where
25748        T: std::convert::Into<bool>,
25749    {
25750        self.allow_net_admin = v.map(|x| x.into());
25751        self
25752    }
25753
25754    /// Sets the value of [autopilot_compatibility_auditing_enabled][crate::model::WorkloadPolicyConfig::autopilot_compatibility_auditing_enabled].
25755    pub fn set_autopilot_compatibility_auditing_enabled<T>(mut self, v: T) -> Self
25756    where
25757        T: std::convert::Into<bool>,
25758    {
25759        self.autopilot_compatibility_auditing_enabled = std::option::Option::Some(v.into());
25760        self
25761    }
25762
25763    /// Sets or clears the value of [autopilot_compatibility_auditing_enabled][crate::model::WorkloadPolicyConfig::autopilot_compatibility_auditing_enabled].
25764    pub fn set_or_clear_autopilot_compatibility_auditing_enabled<T>(
25765        mut self,
25766        v: std::option::Option<T>,
25767    ) -> Self
25768    where
25769        T: std::convert::Into<bool>,
25770    {
25771        self.autopilot_compatibility_auditing_enabled = v.map(|x| x.into());
25772        self
25773    }
25774}
25775
25776impl wkt::message::Message for WorkloadPolicyConfig {
25777    fn typename() -> &'static str {
25778        "type.googleapis.com/google.container.v1.WorkloadPolicyConfig"
25779    }
25780}
25781
25782/// LoggingConfig is cluster logging configuration.
25783#[derive(Clone, Default, PartialEq)]
25784#[non_exhaustive]
25785pub struct LoggingConfig {
25786    /// Logging components configuration
25787    pub component_config: std::option::Option<crate::model::LoggingComponentConfig>,
25788
25789    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25790}
25791
25792impl LoggingConfig {
25793    pub fn new() -> Self {
25794        std::default::Default::default()
25795    }
25796
25797    /// Sets the value of [component_config][crate::model::LoggingConfig::component_config].
25798    pub fn set_component_config<T>(mut self, v: T) -> Self
25799    where
25800        T: std::convert::Into<crate::model::LoggingComponentConfig>,
25801    {
25802        self.component_config = std::option::Option::Some(v.into());
25803        self
25804    }
25805
25806    /// Sets or clears the value of [component_config][crate::model::LoggingConfig::component_config].
25807    pub fn set_or_clear_component_config<T>(mut self, v: std::option::Option<T>) -> Self
25808    where
25809        T: std::convert::Into<crate::model::LoggingComponentConfig>,
25810    {
25811        self.component_config = v.map(|x| x.into());
25812        self
25813    }
25814}
25815
25816impl wkt::message::Message for LoggingConfig {
25817    fn typename() -> &'static str {
25818        "type.googleapis.com/google.container.v1.LoggingConfig"
25819    }
25820}
25821
25822/// LoggingComponentConfig is cluster logging component configuration.
25823#[derive(Clone, Default, PartialEq)]
25824#[non_exhaustive]
25825pub struct LoggingComponentConfig {
25826    /// Select components to collect logs. An empty set would disable all logging.
25827    pub enable_components: std::vec::Vec<crate::model::logging_component_config::Component>,
25828
25829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25830}
25831
25832impl LoggingComponentConfig {
25833    pub fn new() -> Self {
25834        std::default::Default::default()
25835    }
25836
25837    /// Sets the value of [enable_components][crate::model::LoggingComponentConfig::enable_components].
25838    pub fn set_enable_components<T, V>(mut self, v: T) -> Self
25839    where
25840        T: std::iter::IntoIterator<Item = V>,
25841        V: std::convert::Into<crate::model::logging_component_config::Component>,
25842    {
25843        use std::iter::Iterator;
25844        self.enable_components = v.into_iter().map(|i| i.into()).collect();
25845        self
25846    }
25847}
25848
25849impl wkt::message::Message for LoggingComponentConfig {
25850    fn typename() -> &'static str {
25851        "type.googleapis.com/google.container.v1.LoggingComponentConfig"
25852    }
25853}
25854
25855/// Defines additional types related to [LoggingComponentConfig].
25856pub mod logging_component_config {
25857    #[allow(unused_imports)]
25858    use super::*;
25859
25860    /// GKE components exposing logs
25861    ///
25862    /// # Working with unknown values
25863    ///
25864    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25865    /// additional enum variants at any time. Adding new variants is not considered
25866    /// a breaking change. Applications should write their code in anticipation of:
25867    ///
25868    /// - New values appearing in future releases of the client library, **and**
25869    /// - New values received dynamically, without application changes.
25870    ///
25871    /// Please consult the [Working with enums] section in the user guide for some
25872    /// guidelines.
25873    ///
25874    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25875    #[derive(Clone, Debug, PartialEq)]
25876    #[non_exhaustive]
25877    pub enum Component {
25878        /// Default value. This shouldn't be used.
25879        Unspecified,
25880        /// system components
25881        SystemComponents,
25882        /// workloads
25883        Workloads,
25884        /// kube-apiserver
25885        Apiserver,
25886        /// kube-scheduler
25887        Scheduler,
25888        /// kube-controller-manager
25889        ControllerManager,
25890        /// kcp-sshd
25891        KcpSshd,
25892        /// kcp connection logs
25893        KcpConnection,
25894        /// horizontal pod autoscaler decision logs
25895        KcpHpa,
25896        /// If set, the enum was initialized with an unknown value.
25897        ///
25898        /// Applications can examine the value using [Component::value] or
25899        /// [Component::name].
25900        UnknownValue(component::UnknownValue),
25901    }
25902
25903    #[doc(hidden)]
25904    pub mod component {
25905        #[allow(unused_imports)]
25906        use super::*;
25907        #[derive(Clone, Debug, PartialEq)]
25908        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25909    }
25910
25911    impl Component {
25912        /// Gets the enum value.
25913        ///
25914        /// Returns `None` if the enum contains an unknown value deserialized from
25915        /// the string representation of enums.
25916        pub fn value(&self) -> std::option::Option<i32> {
25917            match self {
25918                Self::Unspecified => std::option::Option::Some(0),
25919                Self::SystemComponents => std::option::Option::Some(1),
25920                Self::Workloads => std::option::Option::Some(2),
25921                Self::Apiserver => std::option::Option::Some(3),
25922                Self::Scheduler => std::option::Option::Some(4),
25923                Self::ControllerManager => std::option::Option::Some(5),
25924                Self::KcpSshd => std::option::Option::Some(7),
25925                Self::KcpConnection => std::option::Option::Some(8),
25926                Self::KcpHpa => std::option::Option::Some(9),
25927                Self::UnknownValue(u) => u.0.value(),
25928            }
25929        }
25930
25931        /// Gets the enum value as a string.
25932        ///
25933        /// Returns `None` if the enum contains an unknown value deserialized from
25934        /// the integer representation of enums.
25935        pub fn name(&self) -> std::option::Option<&str> {
25936            match self {
25937                Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
25938                Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
25939                Self::Workloads => std::option::Option::Some("WORKLOADS"),
25940                Self::Apiserver => std::option::Option::Some("APISERVER"),
25941                Self::Scheduler => std::option::Option::Some("SCHEDULER"),
25942                Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
25943                Self::KcpSshd => std::option::Option::Some("KCP_SSHD"),
25944                Self::KcpConnection => std::option::Option::Some("KCP_CONNECTION"),
25945                Self::KcpHpa => std::option::Option::Some("KCP_HPA"),
25946                Self::UnknownValue(u) => u.0.name(),
25947            }
25948        }
25949    }
25950
25951    impl std::default::Default for Component {
25952        fn default() -> Self {
25953            use std::convert::From;
25954            Self::from(0)
25955        }
25956    }
25957
25958    impl std::fmt::Display for Component {
25959        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25960            wkt::internal::display_enum(f, self.name(), self.value())
25961        }
25962    }
25963
25964    impl std::convert::From<i32> for Component {
25965        fn from(value: i32) -> Self {
25966            match value {
25967                0 => Self::Unspecified,
25968                1 => Self::SystemComponents,
25969                2 => Self::Workloads,
25970                3 => Self::Apiserver,
25971                4 => Self::Scheduler,
25972                5 => Self::ControllerManager,
25973                7 => Self::KcpSshd,
25974                8 => Self::KcpConnection,
25975                9 => Self::KcpHpa,
25976                _ => Self::UnknownValue(component::UnknownValue(
25977                    wkt::internal::UnknownEnumValue::Integer(value),
25978                )),
25979            }
25980        }
25981    }
25982
25983    impl std::convert::From<&str> for Component {
25984        fn from(value: &str) -> Self {
25985            use std::string::ToString;
25986            match value {
25987                "COMPONENT_UNSPECIFIED" => Self::Unspecified,
25988                "SYSTEM_COMPONENTS" => Self::SystemComponents,
25989                "WORKLOADS" => Self::Workloads,
25990                "APISERVER" => Self::Apiserver,
25991                "SCHEDULER" => Self::Scheduler,
25992                "CONTROLLER_MANAGER" => Self::ControllerManager,
25993                "KCP_SSHD" => Self::KcpSshd,
25994                "KCP_CONNECTION" => Self::KcpConnection,
25995                "KCP_HPA" => Self::KcpHpa,
25996                _ => Self::UnknownValue(component::UnknownValue(
25997                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25998                )),
25999            }
26000        }
26001    }
26002
26003    impl serde::ser::Serialize for Component {
26004        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26005        where
26006            S: serde::Serializer,
26007        {
26008            match self {
26009                Self::Unspecified => serializer.serialize_i32(0),
26010                Self::SystemComponents => serializer.serialize_i32(1),
26011                Self::Workloads => serializer.serialize_i32(2),
26012                Self::Apiserver => serializer.serialize_i32(3),
26013                Self::Scheduler => serializer.serialize_i32(4),
26014                Self::ControllerManager => serializer.serialize_i32(5),
26015                Self::KcpSshd => serializer.serialize_i32(7),
26016                Self::KcpConnection => serializer.serialize_i32(8),
26017                Self::KcpHpa => serializer.serialize_i32(9),
26018                Self::UnknownValue(u) => u.0.serialize(serializer),
26019            }
26020        }
26021    }
26022
26023    impl<'de> serde::de::Deserialize<'de> for Component {
26024        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26025        where
26026            D: serde::Deserializer<'de>,
26027        {
26028            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
26029                ".google.container.v1.LoggingComponentConfig.Component",
26030            ))
26031        }
26032    }
26033}
26034
26035/// RayClusterLoggingConfig specifies configuration of Ray logging.
26036#[derive(Clone, Default, PartialEq)]
26037#[non_exhaustive]
26038pub struct RayClusterLoggingConfig {
26039    /// Enable log collection for Ray clusters.
26040    pub enabled: bool,
26041
26042    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26043}
26044
26045impl RayClusterLoggingConfig {
26046    pub fn new() -> Self {
26047        std::default::Default::default()
26048    }
26049
26050    /// Sets the value of [enabled][crate::model::RayClusterLoggingConfig::enabled].
26051    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26052        self.enabled = v.into();
26053        self
26054    }
26055}
26056
26057impl wkt::message::Message for RayClusterLoggingConfig {
26058    fn typename() -> &'static str {
26059        "type.googleapis.com/google.container.v1.RayClusterLoggingConfig"
26060    }
26061}
26062
26063/// MonitoringConfig is cluster monitoring configuration.
26064#[derive(Clone, Default, PartialEq)]
26065#[non_exhaustive]
26066pub struct MonitoringConfig {
26067    /// Monitoring components configuration
26068    pub component_config: std::option::Option<crate::model::MonitoringComponentConfig>,
26069
26070    /// Enable Google Cloud Managed Service for Prometheus
26071    /// in the cluster.
26072    pub managed_prometheus_config: std::option::Option<crate::model::ManagedPrometheusConfig>,
26073
26074    /// Configuration of Advanced Datapath Observability features.
26075    pub advanced_datapath_observability_config:
26076        std::option::Option<crate::model::AdvancedDatapathObservabilityConfig>,
26077
26078    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26079}
26080
26081impl MonitoringConfig {
26082    pub fn new() -> Self {
26083        std::default::Default::default()
26084    }
26085
26086    /// Sets the value of [component_config][crate::model::MonitoringConfig::component_config].
26087    pub fn set_component_config<T>(mut self, v: T) -> Self
26088    where
26089        T: std::convert::Into<crate::model::MonitoringComponentConfig>,
26090    {
26091        self.component_config = std::option::Option::Some(v.into());
26092        self
26093    }
26094
26095    /// Sets or clears the value of [component_config][crate::model::MonitoringConfig::component_config].
26096    pub fn set_or_clear_component_config<T>(mut self, v: std::option::Option<T>) -> Self
26097    where
26098        T: std::convert::Into<crate::model::MonitoringComponentConfig>,
26099    {
26100        self.component_config = v.map(|x| x.into());
26101        self
26102    }
26103
26104    /// Sets the value of [managed_prometheus_config][crate::model::MonitoringConfig::managed_prometheus_config].
26105    pub fn set_managed_prometheus_config<T>(mut self, v: T) -> Self
26106    where
26107        T: std::convert::Into<crate::model::ManagedPrometheusConfig>,
26108    {
26109        self.managed_prometheus_config = std::option::Option::Some(v.into());
26110        self
26111    }
26112
26113    /// Sets or clears the value of [managed_prometheus_config][crate::model::MonitoringConfig::managed_prometheus_config].
26114    pub fn set_or_clear_managed_prometheus_config<T>(mut self, v: std::option::Option<T>) -> Self
26115    where
26116        T: std::convert::Into<crate::model::ManagedPrometheusConfig>,
26117    {
26118        self.managed_prometheus_config = v.map(|x| x.into());
26119        self
26120    }
26121
26122    /// Sets the value of [advanced_datapath_observability_config][crate::model::MonitoringConfig::advanced_datapath_observability_config].
26123    pub fn set_advanced_datapath_observability_config<T>(mut self, v: T) -> Self
26124    where
26125        T: std::convert::Into<crate::model::AdvancedDatapathObservabilityConfig>,
26126    {
26127        self.advanced_datapath_observability_config = std::option::Option::Some(v.into());
26128        self
26129    }
26130
26131    /// Sets or clears the value of [advanced_datapath_observability_config][crate::model::MonitoringConfig::advanced_datapath_observability_config].
26132    pub fn set_or_clear_advanced_datapath_observability_config<T>(
26133        mut self,
26134        v: std::option::Option<T>,
26135    ) -> Self
26136    where
26137        T: std::convert::Into<crate::model::AdvancedDatapathObservabilityConfig>,
26138    {
26139        self.advanced_datapath_observability_config = v.map(|x| x.into());
26140        self
26141    }
26142}
26143
26144impl wkt::message::Message for MonitoringConfig {
26145    fn typename() -> &'static str {
26146        "type.googleapis.com/google.container.v1.MonitoringConfig"
26147    }
26148}
26149
26150/// AdvancedDatapathObservabilityConfig specifies configuration of observability
26151/// features of advanced datapath.
26152#[derive(Clone, Default, PartialEq)]
26153#[non_exhaustive]
26154pub struct AdvancedDatapathObservabilityConfig {
26155    /// Expose flow metrics on nodes
26156    pub enable_metrics: bool,
26157
26158    /// Method used to make Relay available
26159    pub relay_mode: crate::model::advanced_datapath_observability_config::RelayMode,
26160
26161    /// Enable Relay component
26162    pub enable_relay: std::option::Option<bool>,
26163
26164    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26165}
26166
26167impl AdvancedDatapathObservabilityConfig {
26168    pub fn new() -> Self {
26169        std::default::Default::default()
26170    }
26171
26172    /// Sets the value of [enable_metrics][crate::model::AdvancedDatapathObservabilityConfig::enable_metrics].
26173    pub fn set_enable_metrics<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26174        self.enable_metrics = v.into();
26175        self
26176    }
26177
26178    /// Sets the value of [relay_mode][crate::model::AdvancedDatapathObservabilityConfig::relay_mode].
26179    pub fn set_relay_mode<
26180        T: std::convert::Into<crate::model::advanced_datapath_observability_config::RelayMode>,
26181    >(
26182        mut self,
26183        v: T,
26184    ) -> Self {
26185        self.relay_mode = v.into();
26186        self
26187    }
26188
26189    /// Sets the value of [enable_relay][crate::model::AdvancedDatapathObservabilityConfig::enable_relay].
26190    pub fn set_enable_relay<T>(mut self, v: T) -> Self
26191    where
26192        T: std::convert::Into<bool>,
26193    {
26194        self.enable_relay = std::option::Option::Some(v.into());
26195        self
26196    }
26197
26198    /// Sets or clears the value of [enable_relay][crate::model::AdvancedDatapathObservabilityConfig::enable_relay].
26199    pub fn set_or_clear_enable_relay<T>(mut self, v: std::option::Option<T>) -> Self
26200    where
26201        T: std::convert::Into<bool>,
26202    {
26203        self.enable_relay = v.map(|x| x.into());
26204        self
26205    }
26206}
26207
26208impl wkt::message::Message for AdvancedDatapathObservabilityConfig {
26209    fn typename() -> &'static str {
26210        "type.googleapis.com/google.container.v1.AdvancedDatapathObservabilityConfig"
26211    }
26212}
26213
26214/// Defines additional types related to [AdvancedDatapathObservabilityConfig].
26215pub mod advanced_datapath_observability_config {
26216    #[allow(unused_imports)]
26217    use super::*;
26218
26219    /// Supported Relay modes
26220    ///
26221    /// # Working with unknown values
26222    ///
26223    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26224    /// additional enum variants at any time. Adding new variants is not considered
26225    /// a breaking change. Applications should write their code in anticipation of:
26226    ///
26227    /// - New values appearing in future releases of the client library, **and**
26228    /// - New values received dynamically, without application changes.
26229    ///
26230    /// Please consult the [Working with enums] section in the user guide for some
26231    /// guidelines.
26232    ///
26233    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26234    #[derive(Clone, Debug, PartialEq)]
26235    #[non_exhaustive]
26236    pub enum RelayMode {
26237        /// Default value. This shouldn't be used.
26238        Unspecified,
26239        /// disabled
26240        Disabled,
26241        /// exposed via internal load balancer
26242        InternalVpcLb,
26243        /// exposed via external load balancer
26244        ExternalLb,
26245        /// If set, the enum was initialized with an unknown value.
26246        ///
26247        /// Applications can examine the value using [RelayMode::value] or
26248        /// [RelayMode::name].
26249        UnknownValue(relay_mode::UnknownValue),
26250    }
26251
26252    #[doc(hidden)]
26253    pub mod relay_mode {
26254        #[allow(unused_imports)]
26255        use super::*;
26256        #[derive(Clone, Debug, PartialEq)]
26257        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26258    }
26259
26260    impl RelayMode {
26261        /// Gets the enum value.
26262        ///
26263        /// Returns `None` if the enum contains an unknown value deserialized from
26264        /// the string representation of enums.
26265        pub fn value(&self) -> std::option::Option<i32> {
26266            match self {
26267                Self::Unspecified => std::option::Option::Some(0),
26268                Self::Disabled => std::option::Option::Some(1),
26269                Self::InternalVpcLb => std::option::Option::Some(3),
26270                Self::ExternalLb => std::option::Option::Some(4),
26271                Self::UnknownValue(u) => u.0.value(),
26272            }
26273        }
26274
26275        /// Gets the enum value as a string.
26276        ///
26277        /// Returns `None` if the enum contains an unknown value deserialized from
26278        /// the integer representation of enums.
26279        pub fn name(&self) -> std::option::Option<&str> {
26280            match self {
26281                Self::Unspecified => std::option::Option::Some("RELAY_MODE_UNSPECIFIED"),
26282                Self::Disabled => std::option::Option::Some("DISABLED"),
26283                Self::InternalVpcLb => std::option::Option::Some("INTERNAL_VPC_LB"),
26284                Self::ExternalLb => std::option::Option::Some("EXTERNAL_LB"),
26285                Self::UnknownValue(u) => u.0.name(),
26286            }
26287        }
26288    }
26289
26290    impl std::default::Default for RelayMode {
26291        fn default() -> Self {
26292            use std::convert::From;
26293            Self::from(0)
26294        }
26295    }
26296
26297    impl std::fmt::Display for RelayMode {
26298        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26299            wkt::internal::display_enum(f, self.name(), self.value())
26300        }
26301    }
26302
26303    impl std::convert::From<i32> for RelayMode {
26304        fn from(value: i32) -> Self {
26305            match value {
26306                0 => Self::Unspecified,
26307                1 => Self::Disabled,
26308                3 => Self::InternalVpcLb,
26309                4 => Self::ExternalLb,
26310                _ => Self::UnknownValue(relay_mode::UnknownValue(
26311                    wkt::internal::UnknownEnumValue::Integer(value),
26312                )),
26313            }
26314        }
26315    }
26316
26317    impl std::convert::From<&str> for RelayMode {
26318        fn from(value: &str) -> Self {
26319            use std::string::ToString;
26320            match value {
26321                "RELAY_MODE_UNSPECIFIED" => Self::Unspecified,
26322                "DISABLED" => Self::Disabled,
26323                "INTERNAL_VPC_LB" => Self::InternalVpcLb,
26324                "EXTERNAL_LB" => Self::ExternalLb,
26325                _ => Self::UnknownValue(relay_mode::UnknownValue(
26326                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26327                )),
26328            }
26329        }
26330    }
26331
26332    impl serde::ser::Serialize for RelayMode {
26333        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26334        where
26335            S: serde::Serializer,
26336        {
26337            match self {
26338                Self::Unspecified => serializer.serialize_i32(0),
26339                Self::Disabled => serializer.serialize_i32(1),
26340                Self::InternalVpcLb => serializer.serialize_i32(3),
26341                Self::ExternalLb => serializer.serialize_i32(4),
26342                Self::UnknownValue(u) => u.0.serialize(serializer),
26343            }
26344        }
26345    }
26346
26347    impl<'de> serde::de::Deserialize<'de> for RelayMode {
26348        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26349        where
26350            D: serde::Deserializer<'de>,
26351        {
26352            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelayMode>::new(
26353                ".google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode",
26354            ))
26355        }
26356    }
26357}
26358
26359/// RayClusterMonitoringConfig specifies monitoring configuration for Ray
26360/// clusters.
26361#[derive(Clone, Default, PartialEq)]
26362#[non_exhaustive]
26363pub struct RayClusterMonitoringConfig {
26364    /// Enable metrics collection for Ray clusters.
26365    pub enabled: bool,
26366
26367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26368}
26369
26370impl RayClusterMonitoringConfig {
26371    pub fn new() -> Self {
26372        std::default::Default::default()
26373    }
26374
26375    /// Sets the value of [enabled][crate::model::RayClusterMonitoringConfig::enabled].
26376    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26377        self.enabled = v.into();
26378        self
26379    }
26380}
26381
26382impl wkt::message::Message for RayClusterMonitoringConfig {
26383    fn typename() -> &'static str {
26384        "type.googleapis.com/google.container.v1.RayClusterMonitoringConfig"
26385    }
26386}
26387
26388/// NodePoolLoggingConfig specifies logging configuration for nodepools.
26389#[derive(Clone, Default, PartialEq)]
26390#[non_exhaustive]
26391pub struct NodePoolLoggingConfig {
26392    /// Logging variant configuration.
26393    pub variant_config: std::option::Option<crate::model::LoggingVariantConfig>,
26394
26395    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26396}
26397
26398impl NodePoolLoggingConfig {
26399    pub fn new() -> Self {
26400        std::default::Default::default()
26401    }
26402
26403    /// Sets the value of [variant_config][crate::model::NodePoolLoggingConfig::variant_config].
26404    pub fn set_variant_config<T>(mut self, v: T) -> Self
26405    where
26406        T: std::convert::Into<crate::model::LoggingVariantConfig>,
26407    {
26408        self.variant_config = std::option::Option::Some(v.into());
26409        self
26410    }
26411
26412    /// Sets or clears the value of [variant_config][crate::model::NodePoolLoggingConfig::variant_config].
26413    pub fn set_or_clear_variant_config<T>(mut self, v: std::option::Option<T>) -> Self
26414    where
26415        T: std::convert::Into<crate::model::LoggingVariantConfig>,
26416    {
26417        self.variant_config = v.map(|x| x.into());
26418        self
26419    }
26420}
26421
26422impl wkt::message::Message for NodePoolLoggingConfig {
26423    fn typename() -> &'static str {
26424        "type.googleapis.com/google.container.v1.NodePoolLoggingConfig"
26425    }
26426}
26427
26428/// LoggingVariantConfig specifies the behaviour of the logging component.
26429#[derive(Clone, Default, PartialEq)]
26430#[non_exhaustive]
26431pub struct LoggingVariantConfig {
26432    /// Logging variant deployed on nodes.
26433    pub variant: crate::model::logging_variant_config::Variant,
26434
26435    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26436}
26437
26438impl LoggingVariantConfig {
26439    pub fn new() -> Self {
26440        std::default::Default::default()
26441    }
26442
26443    /// Sets the value of [variant][crate::model::LoggingVariantConfig::variant].
26444    pub fn set_variant<T: std::convert::Into<crate::model::logging_variant_config::Variant>>(
26445        mut self,
26446        v: T,
26447    ) -> Self {
26448        self.variant = v.into();
26449        self
26450    }
26451}
26452
26453impl wkt::message::Message for LoggingVariantConfig {
26454    fn typename() -> &'static str {
26455        "type.googleapis.com/google.container.v1.LoggingVariantConfig"
26456    }
26457}
26458
26459/// Defines additional types related to [LoggingVariantConfig].
26460pub mod logging_variant_config {
26461    #[allow(unused_imports)]
26462    use super::*;
26463
26464    /// Logging component variants.
26465    ///
26466    /// # Working with unknown values
26467    ///
26468    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26469    /// additional enum variants at any time. Adding new variants is not considered
26470    /// a breaking change. Applications should write their code in anticipation of:
26471    ///
26472    /// - New values appearing in future releases of the client library, **and**
26473    /// - New values received dynamically, without application changes.
26474    ///
26475    /// Please consult the [Working with enums] section in the user guide for some
26476    /// guidelines.
26477    ///
26478    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26479    #[derive(Clone, Debug, PartialEq)]
26480    #[non_exhaustive]
26481    pub enum Variant {
26482        /// Default value. This shouldn't be used.
26483        Unspecified,
26484        /// default logging variant.
26485        Default,
26486        /// maximum logging throughput variant.
26487        MaxThroughput,
26488        /// If set, the enum was initialized with an unknown value.
26489        ///
26490        /// Applications can examine the value using [Variant::value] or
26491        /// [Variant::name].
26492        UnknownValue(variant::UnknownValue),
26493    }
26494
26495    #[doc(hidden)]
26496    pub mod variant {
26497        #[allow(unused_imports)]
26498        use super::*;
26499        #[derive(Clone, Debug, PartialEq)]
26500        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26501    }
26502
26503    impl Variant {
26504        /// Gets the enum value.
26505        ///
26506        /// Returns `None` if the enum contains an unknown value deserialized from
26507        /// the string representation of enums.
26508        pub fn value(&self) -> std::option::Option<i32> {
26509            match self {
26510                Self::Unspecified => std::option::Option::Some(0),
26511                Self::Default => std::option::Option::Some(1),
26512                Self::MaxThroughput => std::option::Option::Some(2),
26513                Self::UnknownValue(u) => u.0.value(),
26514            }
26515        }
26516
26517        /// Gets the enum value as a string.
26518        ///
26519        /// Returns `None` if the enum contains an unknown value deserialized from
26520        /// the integer representation of enums.
26521        pub fn name(&self) -> std::option::Option<&str> {
26522            match self {
26523                Self::Unspecified => std::option::Option::Some("VARIANT_UNSPECIFIED"),
26524                Self::Default => std::option::Option::Some("DEFAULT"),
26525                Self::MaxThroughput => std::option::Option::Some("MAX_THROUGHPUT"),
26526                Self::UnknownValue(u) => u.0.name(),
26527            }
26528        }
26529    }
26530
26531    impl std::default::Default for Variant {
26532        fn default() -> Self {
26533            use std::convert::From;
26534            Self::from(0)
26535        }
26536    }
26537
26538    impl std::fmt::Display for Variant {
26539        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26540            wkt::internal::display_enum(f, self.name(), self.value())
26541        }
26542    }
26543
26544    impl std::convert::From<i32> for Variant {
26545        fn from(value: i32) -> Self {
26546            match value {
26547                0 => Self::Unspecified,
26548                1 => Self::Default,
26549                2 => Self::MaxThroughput,
26550                _ => Self::UnknownValue(variant::UnknownValue(
26551                    wkt::internal::UnknownEnumValue::Integer(value),
26552                )),
26553            }
26554        }
26555    }
26556
26557    impl std::convert::From<&str> for Variant {
26558        fn from(value: &str) -> Self {
26559            use std::string::ToString;
26560            match value {
26561                "VARIANT_UNSPECIFIED" => Self::Unspecified,
26562                "DEFAULT" => Self::Default,
26563                "MAX_THROUGHPUT" => Self::MaxThroughput,
26564                _ => Self::UnknownValue(variant::UnknownValue(
26565                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26566                )),
26567            }
26568        }
26569    }
26570
26571    impl serde::ser::Serialize for Variant {
26572        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26573        where
26574            S: serde::Serializer,
26575        {
26576            match self {
26577                Self::Unspecified => serializer.serialize_i32(0),
26578                Self::Default => serializer.serialize_i32(1),
26579                Self::MaxThroughput => serializer.serialize_i32(2),
26580                Self::UnknownValue(u) => u.0.serialize(serializer),
26581            }
26582        }
26583    }
26584
26585    impl<'de> serde::de::Deserialize<'de> for Variant {
26586        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26587        where
26588            D: serde::Deserializer<'de>,
26589        {
26590            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Variant>::new(
26591                ".google.container.v1.LoggingVariantConfig.Variant",
26592            ))
26593        }
26594    }
26595}
26596
26597/// MonitoringComponentConfig is cluster monitoring component configuration.
26598#[derive(Clone, Default, PartialEq)]
26599#[non_exhaustive]
26600pub struct MonitoringComponentConfig {
26601    /// Select components to collect metrics. An empty set would disable all
26602    /// monitoring.
26603    pub enable_components: std::vec::Vec<crate::model::monitoring_component_config::Component>,
26604
26605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26606}
26607
26608impl MonitoringComponentConfig {
26609    pub fn new() -> Self {
26610        std::default::Default::default()
26611    }
26612
26613    /// Sets the value of [enable_components][crate::model::MonitoringComponentConfig::enable_components].
26614    pub fn set_enable_components<T, V>(mut self, v: T) -> Self
26615    where
26616        T: std::iter::IntoIterator<Item = V>,
26617        V: std::convert::Into<crate::model::monitoring_component_config::Component>,
26618    {
26619        use std::iter::Iterator;
26620        self.enable_components = v.into_iter().map(|i| i.into()).collect();
26621        self
26622    }
26623}
26624
26625impl wkt::message::Message for MonitoringComponentConfig {
26626    fn typename() -> &'static str {
26627        "type.googleapis.com/google.container.v1.MonitoringComponentConfig"
26628    }
26629}
26630
26631/// Defines additional types related to [MonitoringComponentConfig].
26632pub mod monitoring_component_config {
26633    #[allow(unused_imports)]
26634    use super::*;
26635
26636    /// GKE components exposing metrics
26637    ///
26638    /// # Working with unknown values
26639    ///
26640    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26641    /// additional enum variants at any time. Adding new variants is not considered
26642    /// a breaking change. Applications should write their code in anticipation of:
26643    ///
26644    /// - New values appearing in future releases of the client library, **and**
26645    /// - New values received dynamically, without application changes.
26646    ///
26647    /// Please consult the [Working with enums] section in the user guide for some
26648    /// guidelines.
26649    ///
26650    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26651    #[derive(Clone, Debug, PartialEq)]
26652    #[non_exhaustive]
26653    pub enum Component {
26654        /// Default value. This shouldn't be used.
26655        Unspecified,
26656        /// system components
26657        SystemComponents,
26658        /// kube-apiserver
26659        Apiserver,
26660        /// kube-scheduler
26661        Scheduler,
26662        /// kube-controller-manager
26663        ControllerManager,
26664        /// Storage
26665        Storage,
26666        /// Horizontal Pod Autoscaling
26667        Hpa,
26668        /// Pod
26669        Pod,
26670        /// DaemonSet
26671        Daemonset,
26672        /// Deployment
26673        Deployment,
26674        /// Statefulset
26675        Statefulset,
26676        /// CADVISOR
26677        Cadvisor,
26678        /// KUBELET
26679        Kubelet,
26680        /// NVIDIA Data Center GPU Manager (DCGM)
26681        Dcgm,
26682        /// JobSet
26683        Jobset,
26684        /// If set, the enum was initialized with an unknown value.
26685        ///
26686        /// Applications can examine the value using [Component::value] or
26687        /// [Component::name].
26688        UnknownValue(component::UnknownValue),
26689    }
26690
26691    #[doc(hidden)]
26692    pub mod component {
26693        #[allow(unused_imports)]
26694        use super::*;
26695        #[derive(Clone, Debug, PartialEq)]
26696        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26697    }
26698
26699    impl Component {
26700        /// Gets the enum value.
26701        ///
26702        /// Returns `None` if the enum contains an unknown value deserialized from
26703        /// the string representation of enums.
26704        pub fn value(&self) -> std::option::Option<i32> {
26705            match self {
26706                Self::Unspecified => std::option::Option::Some(0),
26707                Self::SystemComponents => std::option::Option::Some(1),
26708                Self::Apiserver => std::option::Option::Some(3),
26709                Self::Scheduler => std::option::Option::Some(4),
26710                Self::ControllerManager => std::option::Option::Some(5),
26711                Self::Storage => std::option::Option::Some(7),
26712                Self::Hpa => std::option::Option::Some(8),
26713                Self::Pod => std::option::Option::Some(9),
26714                Self::Daemonset => std::option::Option::Some(10),
26715                Self::Deployment => std::option::Option::Some(11),
26716                Self::Statefulset => std::option::Option::Some(12),
26717                Self::Cadvisor => std::option::Option::Some(13),
26718                Self::Kubelet => std::option::Option::Some(14),
26719                Self::Dcgm => std::option::Option::Some(15),
26720                Self::Jobset => std::option::Option::Some(16),
26721                Self::UnknownValue(u) => u.0.value(),
26722            }
26723        }
26724
26725        /// Gets the enum value as a string.
26726        ///
26727        /// Returns `None` if the enum contains an unknown value deserialized from
26728        /// the integer representation of enums.
26729        pub fn name(&self) -> std::option::Option<&str> {
26730            match self {
26731                Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
26732                Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
26733                Self::Apiserver => std::option::Option::Some("APISERVER"),
26734                Self::Scheduler => std::option::Option::Some("SCHEDULER"),
26735                Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
26736                Self::Storage => std::option::Option::Some("STORAGE"),
26737                Self::Hpa => std::option::Option::Some("HPA"),
26738                Self::Pod => std::option::Option::Some("POD"),
26739                Self::Daemonset => std::option::Option::Some("DAEMONSET"),
26740                Self::Deployment => std::option::Option::Some("DEPLOYMENT"),
26741                Self::Statefulset => std::option::Option::Some("STATEFULSET"),
26742                Self::Cadvisor => std::option::Option::Some("CADVISOR"),
26743                Self::Kubelet => std::option::Option::Some("KUBELET"),
26744                Self::Dcgm => std::option::Option::Some("DCGM"),
26745                Self::Jobset => std::option::Option::Some("JOBSET"),
26746                Self::UnknownValue(u) => u.0.name(),
26747            }
26748        }
26749    }
26750
26751    impl std::default::Default for Component {
26752        fn default() -> Self {
26753            use std::convert::From;
26754            Self::from(0)
26755        }
26756    }
26757
26758    impl std::fmt::Display for Component {
26759        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26760            wkt::internal::display_enum(f, self.name(), self.value())
26761        }
26762    }
26763
26764    impl std::convert::From<i32> for Component {
26765        fn from(value: i32) -> Self {
26766            match value {
26767                0 => Self::Unspecified,
26768                1 => Self::SystemComponents,
26769                3 => Self::Apiserver,
26770                4 => Self::Scheduler,
26771                5 => Self::ControllerManager,
26772                7 => Self::Storage,
26773                8 => Self::Hpa,
26774                9 => Self::Pod,
26775                10 => Self::Daemonset,
26776                11 => Self::Deployment,
26777                12 => Self::Statefulset,
26778                13 => Self::Cadvisor,
26779                14 => Self::Kubelet,
26780                15 => Self::Dcgm,
26781                16 => Self::Jobset,
26782                _ => Self::UnknownValue(component::UnknownValue(
26783                    wkt::internal::UnknownEnumValue::Integer(value),
26784                )),
26785            }
26786        }
26787    }
26788
26789    impl std::convert::From<&str> for Component {
26790        fn from(value: &str) -> Self {
26791            use std::string::ToString;
26792            match value {
26793                "COMPONENT_UNSPECIFIED" => Self::Unspecified,
26794                "SYSTEM_COMPONENTS" => Self::SystemComponents,
26795                "APISERVER" => Self::Apiserver,
26796                "SCHEDULER" => Self::Scheduler,
26797                "CONTROLLER_MANAGER" => Self::ControllerManager,
26798                "STORAGE" => Self::Storage,
26799                "HPA" => Self::Hpa,
26800                "POD" => Self::Pod,
26801                "DAEMONSET" => Self::Daemonset,
26802                "DEPLOYMENT" => Self::Deployment,
26803                "STATEFULSET" => Self::Statefulset,
26804                "CADVISOR" => Self::Cadvisor,
26805                "KUBELET" => Self::Kubelet,
26806                "DCGM" => Self::Dcgm,
26807                "JOBSET" => Self::Jobset,
26808                _ => Self::UnknownValue(component::UnknownValue(
26809                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26810                )),
26811            }
26812        }
26813    }
26814
26815    impl serde::ser::Serialize for Component {
26816        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26817        where
26818            S: serde::Serializer,
26819        {
26820            match self {
26821                Self::Unspecified => serializer.serialize_i32(0),
26822                Self::SystemComponents => serializer.serialize_i32(1),
26823                Self::Apiserver => serializer.serialize_i32(3),
26824                Self::Scheduler => serializer.serialize_i32(4),
26825                Self::ControllerManager => serializer.serialize_i32(5),
26826                Self::Storage => serializer.serialize_i32(7),
26827                Self::Hpa => serializer.serialize_i32(8),
26828                Self::Pod => serializer.serialize_i32(9),
26829                Self::Daemonset => serializer.serialize_i32(10),
26830                Self::Deployment => serializer.serialize_i32(11),
26831                Self::Statefulset => serializer.serialize_i32(12),
26832                Self::Cadvisor => serializer.serialize_i32(13),
26833                Self::Kubelet => serializer.serialize_i32(14),
26834                Self::Dcgm => serializer.serialize_i32(15),
26835                Self::Jobset => serializer.serialize_i32(16),
26836                Self::UnknownValue(u) => u.0.serialize(serializer),
26837            }
26838        }
26839    }
26840
26841    impl<'de> serde::de::Deserialize<'de> for Component {
26842        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26843        where
26844            D: serde::Deserializer<'de>,
26845        {
26846            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
26847                ".google.container.v1.MonitoringComponentConfig.Component",
26848            ))
26849        }
26850    }
26851}
26852
26853/// ManagedPrometheusConfig defines the configuration for
26854/// Google Cloud Managed Service for Prometheus.
26855#[derive(Clone, Default, PartialEq)]
26856#[non_exhaustive]
26857pub struct ManagedPrometheusConfig {
26858    /// Enable Managed Collection.
26859    pub enabled: bool,
26860
26861    /// GKE Workload Auto-Monitoring Configuration.
26862    pub auto_monitoring_config: std::option::Option<crate::model::AutoMonitoringConfig>,
26863
26864    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26865}
26866
26867impl ManagedPrometheusConfig {
26868    pub fn new() -> Self {
26869        std::default::Default::default()
26870    }
26871
26872    /// Sets the value of [enabled][crate::model::ManagedPrometheusConfig::enabled].
26873    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26874        self.enabled = v.into();
26875        self
26876    }
26877
26878    /// Sets the value of [auto_monitoring_config][crate::model::ManagedPrometheusConfig::auto_monitoring_config].
26879    pub fn set_auto_monitoring_config<T>(mut self, v: T) -> Self
26880    where
26881        T: std::convert::Into<crate::model::AutoMonitoringConfig>,
26882    {
26883        self.auto_monitoring_config = std::option::Option::Some(v.into());
26884        self
26885    }
26886
26887    /// Sets or clears the value of [auto_monitoring_config][crate::model::ManagedPrometheusConfig::auto_monitoring_config].
26888    pub fn set_or_clear_auto_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
26889    where
26890        T: std::convert::Into<crate::model::AutoMonitoringConfig>,
26891    {
26892        self.auto_monitoring_config = v.map(|x| x.into());
26893        self
26894    }
26895}
26896
26897impl wkt::message::Message for ManagedPrometheusConfig {
26898    fn typename() -> &'static str {
26899        "type.googleapis.com/google.container.v1.ManagedPrometheusConfig"
26900    }
26901}
26902
26903/// AutoMonitoringConfig defines the configuration for GKE Workload
26904/// Auto-Monitoring.
26905#[derive(Clone, Default, PartialEq)]
26906#[non_exhaustive]
26907pub struct AutoMonitoringConfig {
26908    /// Scope for GKE Workload Auto-Monitoring.
26909    pub scope: crate::model::auto_monitoring_config::Scope,
26910
26911    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26912}
26913
26914impl AutoMonitoringConfig {
26915    pub fn new() -> Self {
26916        std::default::Default::default()
26917    }
26918
26919    /// Sets the value of [scope][crate::model::AutoMonitoringConfig::scope].
26920    pub fn set_scope<T: std::convert::Into<crate::model::auto_monitoring_config::Scope>>(
26921        mut self,
26922        v: T,
26923    ) -> Self {
26924        self.scope = v.into();
26925        self
26926    }
26927}
26928
26929impl wkt::message::Message for AutoMonitoringConfig {
26930    fn typename() -> &'static str {
26931        "type.googleapis.com/google.container.v1.AutoMonitoringConfig"
26932    }
26933}
26934
26935/// Defines additional types related to [AutoMonitoringConfig].
26936pub mod auto_monitoring_config {
26937    #[allow(unused_imports)]
26938    use super::*;
26939
26940    /// Scope for applications monitored by Auto-Monitoring
26941    ///
26942    /// # Working with unknown values
26943    ///
26944    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26945    /// additional enum variants at any time. Adding new variants is not considered
26946    /// a breaking change. Applications should write their code in anticipation of:
26947    ///
26948    /// - New values appearing in future releases of the client library, **and**
26949    /// - New values received dynamically, without application changes.
26950    ///
26951    /// Please consult the [Working with enums] section in the user guide for some
26952    /// guidelines.
26953    ///
26954    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26955    #[derive(Clone, Debug, PartialEq)]
26956    #[non_exhaustive]
26957    pub enum Scope {
26958        /// Not set.
26959        Unspecified,
26960        /// Auto-Monitoring is enabled for all supported applications.
26961        All,
26962        /// Disable Auto-Monitoring.
26963        None,
26964        /// If set, the enum was initialized with an unknown value.
26965        ///
26966        /// Applications can examine the value using [Scope::value] or
26967        /// [Scope::name].
26968        UnknownValue(scope::UnknownValue),
26969    }
26970
26971    #[doc(hidden)]
26972    pub mod scope {
26973        #[allow(unused_imports)]
26974        use super::*;
26975        #[derive(Clone, Debug, PartialEq)]
26976        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26977    }
26978
26979    impl Scope {
26980        /// Gets the enum value.
26981        ///
26982        /// Returns `None` if the enum contains an unknown value deserialized from
26983        /// the string representation of enums.
26984        pub fn value(&self) -> std::option::Option<i32> {
26985            match self {
26986                Self::Unspecified => std::option::Option::Some(0),
26987                Self::All => std::option::Option::Some(1),
26988                Self::None => std::option::Option::Some(2),
26989                Self::UnknownValue(u) => u.0.value(),
26990            }
26991        }
26992
26993        /// Gets the enum value as a string.
26994        ///
26995        /// Returns `None` if the enum contains an unknown value deserialized from
26996        /// the integer representation of enums.
26997        pub fn name(&self) -> std::option::Option<&str> {
26998            match self {
26999                Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
27000                Self::All => std::option::Option::Some("ALL"),
27001                Self::None => std::option::Option::Some("NONE"),
27002                Self::UnknownValue(u) => u.0.name(),
27003            }
27004        }
27005    }
27006
27007    impl std::default::Default for Scope {
27008        fn default() -> Self {
27009            use std::convert::From;
27010            Self::from(0)
27011        }
27012    }
27013
27014    impl std::fmt::Display for Scope {
27015        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27016            wkt::internal::display_enum(f, self.name(), self.value())
27017        }
27018    }
27019
27020    impl std::convert::From<i32> for Scope {
27021        fn from(value: i32) -> Self {
27022            match value {
27023                0 => Self::Unspecified,
27024                1 => Self::All,
27025                2 => Self::None,
27026                _ => Self::UnknownValue(scope::UnknownValue(
27027                    wkt::internal::UnknownEnumValue::Integer(value),
27028                )),
27029            }
27030        }
27031    }
27032
27033    impl std::convert::From<&str> for Scope {
27034        fn from(value: &str) -> Self {
27035            use std::string::ToString;
27036            match value {
27037                "SCOPE_UNSPECIFIED" => Self::Unspecified,
27038                "ALL" => Self::All,
27039                "NONE" => Self::None,
27040                _ => Self::UnknownValue(scope::UnknownValue(
27041                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27042                )),
27043            }
27044        }
27045    }
27046
27047    impl serde::ser::Serialize for Scope {
27048        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27049        where
27050            S: serde::Serializer,
27051        {
27052            match self {
27053                Self::Unspecified => serializer.serialize_i32(0),
27054                Self::All => serializer.serialize_i32(1),
27055                Self::None => serializer.serialize_i32(2),
27056                Self::UnknownValue(u) => u.0.serialize(serializer),
27057            }
27058        }
27059    }
27060
27061    impl<'de> serde::de::Deserialize<'de> for Scope {
27062        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27063        where
27064            D: serde::Deserializer<'de>,
27065        {
27066            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
27067                ".google.container.v1.AutoMonitoringConfig.Scope",
27068            ))
27069        }
27070    }
27071}
27072
27073/// PodAutoscaling is used for configuration of parameters
27074/// for workload autoscaling.
27075#[derive(Clone, Default, PartialEq)]
27076#[non_exhaustive]
27077pub struct PodAutoscaling {
27078    /// Selected Horizontal Pod Autoscaling profile.
27079    pub hpa_profile: std::option::Option<crate::model::pod_autoscaling::HPAProfile>,
27080
27081    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27082}
27083
27084impl PodAutoscaling {
27085    pub fn new() -> Self {
27086        std::default::Default::default()
27087    }
27088
27089    /// Sets the value of [hpa_profile][crate::model::PodAutoscaling::hpa_profile].
27090    pub fn set_hpa_profile<T>(mut self, v: T) -> Self
27091    where
27092        T: std::convert::Into<crate::model::pod_autoscaling::HPAProfile>,
27093    {
27094        self.hpa_profile = std::option::Option::Some(v.into());
27095        self
27096    }
27097
27098    /// Sets or clears the value of [hpa_profile][crate::model::PodAutoscaling::hpa_profile].
27099    pub fn set_or_clear_hpa_profile<T>(mut self, v: std::option::Option<T>) -> Self
27100    where
27101        T: std::convert::Into<crate::model::pod_autoscaling::HPAProfile>,
27102    {
27103        self.hpa_profile = v.map(|x| x.into());
27104        self
27105    }
27106}
27107
27108impl wkt::message::Message for PodAutoscaling {
27109    fn typename() -> &'static str {
27110        "type.googleapis.com/google.container.v1.PodAutoscaling"
27111    }
27112}
27113
27114/// Defines additional types related to [PodAutoscaling].
27115pub mod pod_autoscaling {
27116    #[allow(unused_imports)]
27117    use super::*;
27118
27119    /// Possible types of Horizontal Pod Autoscaling profile.
27120    ///
27121    /// # Working with unknown values
27122    ///
27123    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27124    /// additional enum variants at any time. Adding new variants is not considered
27125    /// a breaking change. Applications should write their code in anticipation of:
27126    ///
27127    /// - New values appearing in future releases of the client library, **and**
27128    /// - New values received dynamically, without application changes.
27129    ///
27130    /// Please consult the [Working with enums] section in the user guide for some
27131    /// guidelines.
27132    ///
27133    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27134    #[derive(Clone, Debug, PartialEq)]
27135    #[non_exhaustive]
27136    pub enum HPAProfile {
27137        /// HPA_PROFILE_UNSPECIFIED is used when no custom HPA profile is set.
27138        Unspecified,
27139        /// Customers explicitly opt-out of HPA profiles.
27140        None,
27141        /// PERFORMANCE is used when customers opt-in to the performance HPA profile.
27142        /// In this profile we support a higher number of HPAs per cluster and faster
27143        /// metrics collection for workload autoscaling.
27144        Performance,
27145        /// If set, the enum was initialized with an unknown value.
27146        ///
27147        /// Applications can examine the value using [HPAProfile::value] or
27148        /// [HPAProfile::name].
27149        UnknownValue(hpa_profile::UnknownValue),
27150    }
27151
27152    #[doc(hidden)]
27153    pub mod hpa_profile {
27154        #[allow(unused_imports)]
27155        use super::*;
27156        #[derive(Clone, Debug, PartialEq)]
27157        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27158    }
27159
27160    impl HPAProfile {
27161        /// Gets the enum value.
27162        ///
27163        /// Returns `None` if the enum contains an unknown value deserialized from
27164        /// the string representation of enums.
27165        pub fn value(&self) -> std::option::Option<i32> {
27166            match self {
27167                Self::Unspecified => std::option::Option::Some(0),
27168                Self::None => std::option::Option::Some(1),
27169                Self::Performance => std::option::Option::Some(2),
27170                Self::UnknownValue(u) => u.0.value(),
27171            }
27172        }
27173
27174        /// Gets the enum value as a string.
27175        ///
27176        /// Returns `None` if the enum contains an unknown value deserialized from
27177        /// the integer representation of enums.
27178        pub fn name(&self) -> std::option::Option<&str> {
27179            match self {
27180                Self::Unspecified => std::option::Option::Some("HPA_PROFILE_UNSPECIFIED"),
27181                Self::None => std::option::Option::Some("NONE"),
27182                Self::Performance => std::option::Option::Some("PERFORMANCE"),
27183                Self::UnknownValue(u) => u.0.name(),
27184            }
27185        }
27186    }
27187
27188    impl std::default::Default for HPAProfile {
27189        fn default() -> Self {
27190            use std::convert::From;
27191            Self::from(0)
27192        }
27193    }
27194
27195    impl std::fmt::Display for HPAProfile {
27196        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27197            wkt::internal::display_enum(f, self.name(), self.value())
27198        }
27199    }
27200
27201    impl std::convert::From<i32> for HPAProfile {
27202        fn from(value: i32) -> Self {
27203            match value {
27204                0 => Self::Unspecified,
27205                1 => Self::None,
27206                2 => Self::Performance,
27207                _ => Self::UnknownValue(hpa_profile::UnknownValue(
27208                    wkt::internal::UnknownEnumValue::Integer(value),
27209                )),
27210            }
27211        }
27212    }
27213
27214    impl std::convert::From<&str> for HPAProfile {
27215        fn from(value: &str) -> Self {
27216            use std::string::ToString;
27217            match value {
27218                "HPA_PROFILE_UNSPECIFIED" => Self::Unspecified,
27219                "NONE" => Self::None,
27220                "PERFORMANCE" => Self::Performance,
27221                _ => Self::UnknownValue(hpa_profile::UnknownValue(
27222                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27223                )),
27224            }
27225        }
27226    }
27227
27228    impl serde::ser::Serialize for HPAProfile {
27229        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27230        where
27231            S: serde::Serializer,
27232        {
27233            match self {
27234                Self::Unspecified => serializer.serialize_i32(0),
27235                Self::None => serializer.serialize_i32(1),
27236                Self::Performance => serializer.serialize_i32(2),
27237                Self::UnknownValue(u) => u.0.serialize(serializer),
27238            }
27239        }
27240    }
27241
27242    impl<'de> serde::de::Deserialize<'de> for HPAProfile {
27243        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27244        where
27245            D: serde::Deserializer<'de>,
27246        {
27247            deserializer.deserialize_any(wkt::internal::EnumVisitor::<HPAProfile>::new(
27248                ".google.container.v1.PodAutoscaling.HPAProfile",
27249            ))
27250        }
27251    }
27252}
27253
27254/// Fleet is the fleet configuration for the cluster.
27255#[derive(Clone, Default, PartialEq)]
27256#[non_exhaustive]
27257pub struct Fleet {
27258    /// The Fleet host project(project ID or project number) where this cluster
27259    /// will be registered to. This field cannot be changed after the cluster has
27260    /// been registered.
27261    pub project: std::string::String,
27262
27263    /// Output only. The full resource name of the registered fleet membership of
27264    /// the cluster, in the format
27265    /// `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.
27266    pub membership: std::string::String,
27267
27268    /// Output only. Whether the cluster has been registered through the fleet
27269    /// API.
27270    pub pre_registered: bool,
27271
27272    /// The type of the cluster's fleet membership.
27273    pub membership_type: crate::model::fleet::MembershipType,
27274
27275    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27276}
27277
27278impl Fleet {
27279    pub fn new() -> Self {
27280        std::default::Default::default()
27281    }
27282
27283    /// Sets the value of [project][crate::model::Fleet::project].
27284    pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27285        self.project = v.into();
27286        self
27287    }
27288
27289    /// Sets the value of [membership][crate::model::Fleet::membership].
27290    pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27291        self.membership = v.into();
27292        self
27293    }
27294
27295    /// Sets the value of [pre_registered][crate::model::Fleet::pre_registered].
27296    pub fn set_pre_registered<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
27297        self.pre_registered = v.into();
27298        self
27299    }
27300
27301    /// Sets the value of [membership_type][crate::model::Fleet::membership_type].
27302    pub fn set_membership_type<T: std::convert::Into<crate::model::fleet::MembershipType>>(
27303        mut self,
27304        v: T,
27305    ) -> Self {
27306        self.membership_type = v.into();
27307        self
27308    }
27309}
27310
27311impl wkt::message::Message for Fleet {
27312    fn typename() -> &'static str {
27313        "type.googleapis.com/google.container.v1.Fleet"
27314    }
27315}
27316
27317/// Defines additional types related to [Fleet].
27318pub mod fleet {
27319    #[allow(unused_imports)]
27320    use super::*;
27321
27322    /// MembershipType describes if the membership supports all features or only
27323    /// lightweight compatible ones.
27324    ///
27325    /// # Working with unknown values
27326    ///
27327    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27328    /// additional enum variants at any time. Adding new variants is not considered
27329    /// a breaking change. Applications should write their code in anticipation of:
27330    ///
27331    /// - New values appearing in future releases of the client library, **and**
27332    /// - New values received dynamically, without application changes.
27333    ///
27334    /// Please consult the [Working with enums] section in the user guide for some
27335    /// guidelines.
27336    ///
27337    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27338    #[derive(Clone, Debug, PartialEq)]
27339    #[non_exhaustive]
27340    pub enum MembershipType {
27341        /// The MembershipType is not set.
27342        Unspecified,
27343        /// The membership supports only lightweight compatible features.
27344        Lightweight,
27345        /// If set, the enum was initialized with an unknown value.
27346        ///
27347        /// Applications can examine the value using [MembershipType::value] or
27348        /// [MembershipType::name].
27349        UnknownValue(membership_type::UnknownValue),
27350    }
27351
27352    #[doc(hidden)]
27353    pub mod membership_type {
27354        #[allow(unused_imports)]
27355        use super::*;
27356        #[derive(Clone, Debug, PartialEq)]
27357        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27358    }
27359
27360    impl MembershipType {
27361        /// Gets the enum value.
27362        ///
27363        /// Returns `None` if the enum contains an unknown value deserialized from
27364        /// the string representation of enums.
27365        pub fn value(&self) -> std::option::Option<i32> {
27366            match self {
27367                Self::Unspecified => std::option::Option::Some(0),
27368                Self::Lightweight => std::option::Option::Some(1),
27369                Self::UnknownValue(u) => u.0.value(),
27370            }
27371        }
27372
27373        /// Gets the enum value as a string.
27374        ///
27375        /// Returns `None` if the enum contains an unknown value deserialized from
27376        /// the integer representation of enums.
27377        pub fn name(&self) -> std::option::Option<&str> {
27378            match self {
27379                Self::Unspecified => std::option::Option::Some("MEMBERSHIP_TYPE_UNSPECIFIED"),
27380                Self::Lightweight => std::option::Option::Some("LIGHTWEIGHT"),
27381                Self::UnknownValue(u) => u.0.name(),
27382            }
27383        }
27384    }
27385
27386    impl std::default::Default for MembershipType {
27387        fn default() -> Self {
27388            use std::convert::From;
27389            Self::from(0)
27390        }
27391    }
27392
27393    impl std::fmt::Display for MembershipType {
27394        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27395            wkt::internal::display_enum(f, self.name(), self.value())
27396        }
27397    }
27398
27399    impl std::convert::From<i32> for MembershipType {
27400        fn from(value: i32) -> Self {
27401            match value {
27402                0 => Self::Unspecified,
27403                1 => Self::Lightweight,
27404                _ => Self::UnknownValue(membership_type::UnknownValue(
27405                    wkt::internal::UnknownEnumValue::Integer(value),
27406                )),
27407            }
27408        }
27409    }
27410
27411    impl std::convert::From<&str> for MembershipType {
27412        fn from(value: &str) -> Self {
27413            use std::string::ToString;
27414            match value {
27415                "MEMBERSHIP_TYPE_UNSPECIFIED" => Self::Unspecified,
27416                "LIGHTWEIGHT" => Self::Lightweight,
27417                _ => Self::UnknownValue(membership_type::UnknownValue(
27418                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27419                )),
27420            }
27421        }
27422    }
27423
27424    impl serde::ser::Serialize for MembershipType {
27425        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27426        where
27427            S: serde::Serializer,
27428        {
27429            match self {
27430                Self::Unspecified => serializer.serialize_i32(0),
27431                Self::Lightweight => serializer.serialize_i32(1),
27432                Self::UnknownValue(u) => u.0.serialize(serializer),
27433            }
27434        }
27435    }
27436
27437    impl<'de> serde::de::Deserialize<'de> for MembershipType {
27438        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27439        where
27440            D: serde::Deserializer<'de>,
27441        {
27442            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MembershipType>::new(
27443                ".google.container.v1.Fleet.MembershipType",
27444            ))
27445        }
27446    }
27447}
27448
27449/// Configuration for all of the cluster's control plane endpoints.
27450#[derive(Clone, Default, PartialEq)]
27451#[non_exhaustive]
27452pub struct ControlPlaneEndpointsConfig {
27453    /// DNS endpoint configuration.
27454    pub dns_endpoint_config:
27455        std::option::Option<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
27456
27457    /// IP endpoints configuration.
27458    pub ip_endpoints_config:
27459        std::option::Option<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
27460
27461    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27462}
27463
27464impl ControlPlaneEndpointsConfig {
27465    pub fn new() -> Self {
27466        std::default::Default::default()
27467    }
27468
27469    /// Sets the value of [dns_endpoint_config][crate::model::ControlPlaneEndpointsConfig::dns_endpoint_config].
27470    pub fn set_dns_endpoint_config<T>(mut self, v: T) -> Self
27471    where
27472        T: std::convert::Into<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
27473    {
27474        self.dns_endpoint_config = std::option::Option::Some(v.into());
27475        self
27476    }
27477
27478    /// Sets or clears the value of [dns_endpoint_config][crate::model::ControlPlaneEndpointsConfig::dns_endpoint_config].
27479    pub fn set_or_clear_dns_endpoint_config<T>(mut self, v: std::option::Option<T>) -> Self
27480    where
27481        T: std::convert::Into<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
27482    {
27483        self.dns_endpoint_config = v.map(|x| x.into());
27484        self
27485    }
27486
27487    /// Sets the value of [ip_endpoints_config][crate::model::ControlPlaneEndpointsConfig::ip_endpoints_config].
27488    pub fn set_ip_endpoints_config<T>(mut self, v: T) -> Self
27489    where
27490        T: std::convert::Into<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
27491    {
27492        self.ip_endpoints_config = std::option::Option::Some(v.into());
27493        self
27494    }
27495
27496    /// Sets or clears the value of [ip_endpoints_config][crate::model::ControlPlaneEndpointsConfig::ip_endpoints_config].
27497    pub fn set_or_clear_ip_endpoints_config<T>(mut self, v: std::option::Option<T>) -> Self
27498    where
27499        T: std::convert::Into<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
27500    {
27501        self.ip_endpoints_config = v.map(|x| x.into());
27502        self
27503    }
27504}
27505
27506impl wkt::message::Message for ControlPlaneEndpointsConfig {
27507    fn typename() -> &'static str {
27508        "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig"
27509    }
27510}
27511
27512/// Defines additional types related to [ControlPlaneEndpointsConfig].
27513pub mod control_plane_endpoints_config {
27514    #[allow(unused_imports)]
27515    use super::*;
27516
27517    /// Describes the configuration of a DNS endpoint.
27518    #[derive(Clone, Default, PartialEq)]
27519    #[non_exhaustive]
27520    pub struct DNSEndpointConfig {
27521        /// Output only. The cluster's DNS endpoint configuration.
27522        /// A DNS format address. This is accessible from the public internet.
27523        /// Ex: uid.us-central1.gke.goog.
27524        /// Always present, but the behavior may change according to the value of
27525        /// [DNSEndpointConfig.allow_external_traffic][google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic].
27526        ///
27527        /// [google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic]: crate::model::control_plane_endpoints_config::DNSEndpointConfig::allow_external_traffic
27528        pub endpoint: std::string::String,
27529
27530        /// Controls whether user traffic is allowed over this endpoint. Note that
27531        /// Google-managed services may still use the endpoint even if this is false.
27532        pub allow_external_traffic: std::option::Option<bool>,
27533
27534        /// Controls whether the k8s token auth is allowed via DNS.
27535        pub enable_k8s_tokens_via_dns: std::option::Option<bool>,
27536
27537        /// Controls whether the k8s certs auth is allowed via DNS.
27538        pub enable_k8s_certs_via_dns: std::option::Option<bool>,
27539
27540        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27541    }
27542
27543    impl DNSEndpointConfig {
27544        pub fn new() -> Self {
27545            std::default::Default::default()
27546        }
27547
27548        /// Sets the value of [endpoint][crate::model::control_plane_endpoints_config::DNSEndpointConfig::endpoint].
27549        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27550            self.endpoint = v.into();
27551            self
27552        }
27553
27554        /// Sets the value of [allow_external_traffic][crate::model::control_plane_endpoints_config::DNSEndpointConfig::allow_external_traffic].
27555        pub fn set_allow_external_traffic<T>(mut self, v: T) -> Self
27556        where
27557            T: std::convert::Into<bool>,
27558        {
27559            self.allow_external_traffic = std::option::Option::Some(v.into());
27560            self
27561        }
27562
27563        /// Sets or clears the value of [allow_external_traffic][crate::model::control_plane_endpoints_config::DNSEndpointConfig::allow_external_traffic].
27564        pub fn set_or_clear_allow_external_traffic<T>(mut self, v: std::option::Option<T>) -> Self
27565        where
27566            T: std::convert::Into<bool>,
27567        {
27568            self.allow_external_traffic = v.map(|x| x.into());
27569            self
27570        }
27571
27572        /// Sets the value of [enable_k8s_tokens_via_dns][crate::model::control_plane_endpoints_config::DNSEndpointConfig::enable_k8s_tokens_via_dns].
27573        pub fn set_enable_k8s_tokens_via_dns<T>(mut self, v: T) -> Self
27574        where
27575            T: std::convert::Into<bool>,
27576        {
27577            self.enable_k8s_tokens_via_dns = std::option::Option::Some(v.into());
27578            self
27579        }
27580
27581        /// Sets or clears the value of [enable_k8s_tokens_via_dns][crate::model::control_plane_endpoints_config::DNSEndpointConfig::enable_k8s_tokens_via_dns].
27582        pub fn set_or_clear_enable_k8s_tokens_via_dns<T>(
27583            mut self,
27584            v: std::option::Option<T>,
27585        ) -> Self
27586        where
27587            T: std::convert::Into<bool>,
27588        {
27589            self.enable_k8s_tokens_via_dns = v.map(|x| x.into());
27590            self
27591        }
27592
27593        /// Sets the value of [enable_k8s_certs_via_dns][crate::model::control_plane_endpoints_config::DNSEndpointConfig::enable_k8s_certs_via_dns].
27594        pub fn set_enable_k8s_certs_via_dns<T>(mut self, v: T) -> Self
27595        where
27596            T: std::convert::Into<bool>,
27597        {
27598            self.enable_k8s_certs_via_dns = std::option::Option::Some(v.into());
27599            self
27600        }
27601
27602        /// Sets or clears the value of [enable_k8s_certs_via_dns][crate::model::control_plane_endpoints_config::DNSEndpointConfig::enable_k8s_certs_via_dns].
27603        pub fn set_or_clear_enable_k8s_certs_via_dns<T>(mut self, v: std::option::Option<T>) -> Self
27604        where
27605            T: std::convert::Into<bool>,
27606        {
27607            self.enable_k8s_certs_via_dns = v.map(|x| x.into());
27608            self
27609        }
27610    }
27611
27612    impl wkt::message::Message for DNSEndpointConfig {
27613        fn typename() -> &'static str {
27614            "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig"
27615        }
27616    }
27617
27618    /// IP endpoints configuration.
27619    #[derive(Clone, Default, PartialEq)]
27620    #[non_exhaustive]
27621    pub struct IPEndpointsConfig {
27622        /// Controls whether to allow direct IP access.
27623        pub enabled: std::option::Option<bool>,
27624
27625        /// Controls whether the control plane allows access through a public IP.
27626        /// It is invalid to specify both
27627        /// [PrivateClusterConfig.enablePrivateEndpoint][] and this field at the same
27628        /// time.
27629        pub enable_public_endpoint: std::option::Option<bool>,
27630
27631        /// Controls whether the control plane's private endpoint is accessible from
27632        /// sources in other regions.
27633        /// It is invalid to specify both
27634        /// [PrivateClusterMasterGlobalAccessConfig.enabled][google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled]
27635        /// and this field at the same time.
27636        ///
27637        /// [google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled]: crate::model::PrivateClusterMasterGlobalAccessConfig::enabled
27638        pub global_access: std::option::Option<bool>,
27639
27640        /// Configuration of authorized networks. If enabled, restricts access to the
27641        /// control plane based on source IP.
27642        /// It is invalid to specify both
27643        /// [Cluster.masterAuthorizedNetworksConfig][] and this field at the same
27644        /// time.
27645        pub authorized_networks_config:
27646            std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
27647
27648        /// Output only. The external IP address of this cluster's control plane.
27649        /// Only populated if enabled.
27650        pub public_endpoint: std::string::String,
27651
27652        /// Output only. The internal IP address of this cluster's control plane.
27653        /// Only populated if enabled.
27654        pub private_endpoint: std::string::String,
27655
27656        /// Subnet to provision the master's private endpoint during cluster
27657        /// creation. Specified in projects/*/regions/*/subnetworks/* format. It is
27658        /// invalid to specify both
27659        /// [PrivateClusterConfig.privateEndpointSubnetwork][] and this field at the
27660        /// same time.
27661        pub private_endpoint_subnetwork: std::string::String,
27662
27663        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27664    }
27665
27666    impl IPEndpointsConfig {
27667        pub fn new() -> Self {
27668            std::default::Default::default()
27669        }
27670
27671        /// Sets the value of [enabled][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enabled].
27672        pub fn set_enabled<T>(mut self, v: T) -> Self
27673        where
27674            T: std::convert::Into<bool>,
27675        {
27676            self.enabled = std::option::Option::Some(v.into());
27677            self
27678        }
27679
27680        /// Sets or clears the value of [enabled][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enabled].
27681        pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
27682        where
27683            T: std::convert::Into<bool>,
27684        {
27685            self.enabled = v.map(|x| x.into());
27686            self
27687        }
27688
27689        /// Sets the value of [enable_public_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enable_public_endpoint].
27690        pub fn set_enable_public_endpoint<T>(mut self, v: T) -> Self
27691        where
27692            T: std::convert::Into<bool>,
27693        {
27694            self.enable_public_endpoint = std::option::Option::Some(v.into());
27695            self
27696        }
27697
27698        /// Sets or clears the value of [enable_public_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enable_public_endpoint].
27699        pub fn set_or_clear_enable_public_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
27700        where
27701            T: std::convert::Into<bool>,
27702        {
27703            self.enable_public_endpoint = v.map(|x| x.into());
27704            self
27705        }
27706
27707        /// Sets the value of [global_access][crate::model::control_plane_endpoints_config::IPEndpointsConfig::global_access].
27708        pub fn set_global_access<T>(mut self, v: T) -> Self
27709        where
27710            T: std::convert::Into<bool>,
27711        {
27712            self.global_access = std::option::Option::Some(v.into());
27713            self
27714        }
27715
27716        /// Sets or clears the value of [global_access][crate::model::control_plane_endpoints_config::IPEndpointsConfig::global_access].
27717        pub fn set_or_clear_global_access<T>(mut self, v: std::option::Option<T>) -> Self
27718        where
27719            T: std::convert::Into<bool>,
27720        {
27721            self.global_access = v.map(|x| x.into());
27722            self
27723        }
27724
27725        /// Sets the value of [authorized_networks_config][crate::model::control_plane_endpoints_config::IPEndpointsConfig::authorized_networks_config].
27726        pub fn set_authorized_networks_config<T>(mut self, v: T) -> Self
27727        where
27728            T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
27729        {
27730            self.authorized_networks_config = std::option::Option::Some(v.into());
27731            self
27732        }
27733
27734        /// Sets or clears the value of [authorized_networks_config][crate::model::control_plane_endpoints_config::IPEndpointsConfig::authorized_networks_config].
27735        pub fn set_or_clear_authorized_networks_config<T>(
27736            mut self,
27737            v: std::option::Option<T>,
27738        ) -> Self
27739        where
27740            T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
27741        {
27742            self.authorized_networks_config = v.map(|x| x.into());
27743            self
27744        }
27745
27746        /// Sets the value of [public_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::public_endpoint].
27747        pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(
27748            mut self,
27749            v: T,
27750        ) -> Self {
27751            self.public_endpoint = v.into();
27752            self
27753        }
27754
27755        /// Sets the value of [private_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint].
27756        pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
27757            mut self,
27758            v: T,
27759        ) -> Self {
27760            self.private_endpoint = v.into();
27761            self
27762        }
27763
27764        /// Sets the value of [private_endpoint_subnetwork][crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint_subnetwork].
27765        pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
27766            mut self,
27767            v: T,
27768        ) -> Self {
27769            self.private_endpoint_subnetwork = v.into();
27770            self
27771        }
27772    }
27773
27774    impl wkt::message::Message for IPEndpointsConfig {
27775        fn typename() -> &'static str {
27776            "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig"
27777        }
27778    }
27779}
27780
27781/// LocalNvmeSsdBlockConfig contains configuration for using raw-block local
27782/// NVMe SSDs
27783#[derive(Clone, Default, PartialEq)]
27784#[non_exhaustive]
27785pub struct LocalNvmeSsdBlockConfig {
27786    /// Number of local NVMe SSDs to use.  The limit for this value is dependent
27787    /// upon the maximum number of disk available on a machine per zone. See:
27788    /// <https://cloud.google.com/compute/docs/disks/local-ssd>
27789    /// for more information.
27790    ///
27791    /// A zero (or unset) value has different meanings depending on machine type
27792    /// being used:
27793    ///
27794    /// 1. For pre-Gen3 machines, which support flexible numbers of local ssds,
27795    ///    zero (or unset) means to disable using local SSDs as ephemeral storage.
27796    /// 1. For Gen3 machines which dictate a specific number of local ssds, zero
27797    ///    (or unset) means to use the default number of local ssds that goes with
27798    ///    that machine type. For example, for a c3-standard-8-lssd machine, 2 local
27799    ///    ssds would be provisioned. For c3-standard-8 (which doesn't support local
27800    ///    ssds), 0 will be provisioned. See
27801    ///    <https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds>
27802    ///    for more info.
27803    pub local_ssd_count: i32,
27804
27805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27806}
27807
27808impl LocalNvmeSsdBlockConfig {
27809    pub fn new() -> Self {
27810        std::default::Default::default()
27811    }
27812
27813    /// Sets the value of [local_ssd_count][crate::model::LocalNvmeSsdBlockConfig::local_ssd_count].
27814    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27815        self.local_ssd_count = v.into();
27816        self
27817    }
27818}
27819
27820impl wkt::message::Message for LocalNvmeSsdBlockConfig {
27821    fn typename() -> &'static str {
27822        "type.googleapis.com/google.container.v1.LocalNvmeSsdBlockConfig"
27823    }
27824}
27825
27826/// EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral
27827/// storage using Local SSDs.
27828#[derive(Clone, Default, PartialEq)]
27829#[non_exhaustive]
27830pub struct EphemeralStorageLocalSsdConfig {
27831    /// Number of local SSDs to use to back ephemeral storage. Uses NVMe
27832    /// interfaces.
27833    ///
27834    /// A zero (or unset) value has different meanings depending on machine type
27835    /// being used:
27836    ///
27837    /// 1. For pre-Gen3 machines, which support flexible numbers of local ssds,
27838    ///    zero (or unset) means to disable using local SSDs as ephemeral storage. The
27839    ///    limit for this value is dependent upon the maximum number of disk
27840    ///    available on a machine per zone. See:
27841    ///    <https://cloud.google.com/compute/docs/disks/local-ssd>
27842    ///    for more information.
27843    /// 1. For Gen3 machines which dictate a specific number of local ssds, zero
27844    ///    (or unset) means to use the default number of local ssds that goes with
27845    ///    that machine type. For example, for a c3-standard-8-lssd machine, 2 local
27846    ///    ssds would be provisioned. For c3-standard-8 (which doesn't support local
27847    ///    ssds), 0 will be provisioned. See
27848    ///    <https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds>
27849    ///    for more info.
27850    pub local_ssd_count: i32,
27851
27852    /// Number of local SSDs to use for GKE Data Cache.
27853    pub data_cache_count: i32,
27854
27855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27856}
27857
27858impl EphemeralStorageLocalSsdConfig {
27859    pub fn new() -> Self {
27860        std::default::Default::default()
27861    }
27862
27863    /// Sets the value of [local_ssd_count][crate::model::EphemeralStorageLocalSsdConfig::local_ssd_count].
27864    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27865        self.local_ssd_count = v.into();
27866        self
27867    }
27868
27869    /// Sets the value of [data_cache_count][crate::model::EphemeralStorageLocalSsdConfig::data_cache_count].
27870    pub fn set_data_cache_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27871        self.data_cache_count = v.into();
27872        self
27873    }
27874}
27875
27876impl wkt::message::Message for EphemeralStorageLocalSsdConfig {
27877    fn typename() -> &'static str {
27878        "type.googleapis.com/google.container.v1.EphemeralStorageLocalSsdConfig"
27879    }
27880}
27881
27882/// A map of resource manager tag keys and values to be attached to the nodes
27883/// for managing Compute Engine firewalls using Network Firewall Policies.
27884/// Tags must be according to specifications in
27885/// <https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications>.
27886/// A maximum of 5 tag key-value pairs can be specified.
27887/// Existing tags will be replaced with new values.
27888#[derive(Clone, Default, PartialEq)]
27889#[non_exhaustive]
27890pub struct ResourceManagerTags {
27891    /// TagKeyValue must be in one of the following formats ([KEY]=[VALUE])
27892    ///
27893    /// 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}`
27894    /// 1. `{org_id}/{tag_key_name}={tag_value_name}`
27895    /// 1. `{project_id}/{tag_key_name}={tag_value_name}`
27896    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
27897
27898    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27899}
27900
27901impl ResourceManagerTags {
27902    pub fn new() -> Self {
27903        std::default::Default::default()
27904    }
27905
27906    /// Sets the value of [tags][crate::model::ResourceManagerTags::tags].
27907    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
27908    where
27909        T: std::iter::IntoIterator<Item = (K, V)>,
27910        K: std::convert::Into<std::string::String>,
27911        V: std::convert::Into<std::string::String>,
27912    {
27913        use std::iter::Iterator;
27914        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
27915        self
27916    }
27917}
27918
27919impl wkt::message::Message for ResourceManagerTags {
27920    fn typename() -> &'static str {
27921        "type.googleapis.com/google.container.v1.ResourceManagerTags"
27922    }
27923}
27924
27925/// EnterpriseConfig is the cluster enterprise configuration.
27926///
27927/// Deprecated: GKE Enterprise features are now available without an Enterprise
27928/// tier.
27929#[derive(Clone, Default, PartialEq)]
27930#[non_exhaustive]
27931#[deprecated]
27932pub struct EnterpriseConfig {
27933    /// Output only. cluster_tier indicates the effective tier of the cluster.
27934    pub cluster_tier: crate::model::enterprise_config::ClusterTier,
27935
27936    /// desired_tier specifies the desired tier of the cluster.
27937    pub desired_tier: crate::model::enterprise_config::ClusterTier,
27938
27939    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27940}
27941
27942impl EnterpriseConfig {
27943    pub fn new() -> Self {
27944        std::default::Default::default()
27945    }
27946
27947    /// Sets the value of [cluster_tier][crate::model::EnterpriseConfig::cluster_tier].
27948    pub fn set_cluster_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
27949        mut self,
27950        v: T,
27951    ) -> Self {
27952        self.cluster_tier = v.into();
27953        self
27954    }
27955
27956    /// Sets the value of [desired_tier][crate::model::EnterpriseConfig::desired_tier].
27957    pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
27958        mut self,
27959        v: T,
27960    ) -> Self {
27961        self.desired_tier = v.into();
27962        self
27963    }
27964}
27965
27966impl wkt::message::Message for EnterpriseConfig {
27967    fn typename() -> &'static str {
27968        "type.googleapis.com/google.container.v1.EnterpriseConfig"
27969    }
27970}
27971
27972/// Defines additional types related to [EnterpriseConfig].
27973pub mod enterprise_config {
27974    #[allow(unused_imports)]
27975    use super::*;
27976
27977    /// Premium tiers for GKE Cluster.
27978    ///
27979    /// Deprecated: GKE Enterprise features are now available without an Enterprise
27980    /// tier.
27981    ///
27982    /// # Working with unknown values
27983    ///
27984    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27985    /// additional enum variants at any time. Adding new variants is not considered
27986    /// a breaking change. Applications should write their code in anticipation of:
27987    ///
27988    /// - New values appearing in future releases of the client library, **and**
27989    /// - New values received dynamically, without application changes.
27990    ///
27991    /// Please consult the [Working with enums] section in the user guide for some
27992    /// guidelines.
27993    ///
27994    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27995    #[derive(Clone, Debug, PartialEq)]
27996    #[non_exhaustive]
27997    #[deprecated]
27998    pub enum ClusterTier {
27999        /// CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set.
28000        Unspecified,
28001        /// STANDARD indicates a standard GKE cluster.
28002        Standard,
28003        /// ENTERPRISE indicates a GKE Enterprise cluster.
28004        Enterprise,
28005        /// If set, the enum was initialized with an unknown value.
28006        ///
28007        /// Applications can examine the value using [ClusterTier::value] or
28008        /// [ClusterTier::name].
28009        UnknownValue(cluster_tier::UnknownValue),
28010    }
28011
28012    #[doc(hidden)]
28013    pub mod cluster_tier {
28014        #[allow(unused_imports)]
28015        use super::*;
28016        #[derive(Clone, Debug, PartialEq)]
28017        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28018    }
28019
28020    impl ClusterTier {
28021        /// Gets the enum value.
28022        ///
28023        /// Returns `None` if the enum contains an unknown value deserialized from
28024        /// the string representation of enums.
28025        pub fn value(&self) -> std::option::Option<i32> {
28026            match self {
28027                Self::Unspecified => std::option::Option::Some(0),
28028                Self::Standard => std::option::Option::Some(1),
28029                Self::Enterprise => std::option::Option::Some(2),
28030                Self::UnknownValue(u) => u.0.value(),
28031            }
28032        }
28033
28034        /// Gets the enum value as a string.
28035        ///
28036        /// Returns `None` if the enum contains an unknown value deserialized from
28037        /// the integer representation of enums.
28038        pub fn name(&self) -> std::option::Option<&str> {
28039            match self {
28040                Self::Unspecified => std::option::Option::Some("CLUSTER_TIER_UNSPECIFIED"),
28041                Self::Standard => std::option::Option::Some("STANDARD"),
28042                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
28043                Self::UnknownValue(u) => u.0.name(),
28044            }
28045        }
28046    }
28047
28048    impl std::default::Default for ClusterTier {
28049        fn default() -> Self {
28050            use std::convert::From;
28051            Self::from(0)
28052        }
28053    }
28054
28055    impl std::fmt::Display for ClusterTier {
28056        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28057            wkt::internal::display_enum(f, self.name(), self.value())
28058        }
28059    }
28060
28061    impl std::convert::From<i32> for ClusterTier {
28062        fn from(value: i32) -> Self {
28063            match value {
28064                0 => Self::Unspecified,
28065                1 => Self::Standard,
28066                2 => Self::Enterprise,
28067                _ => Self::UnknownValue(cluster_tier::UnknownValue(
28068                    wkt::internal::UnknownEnumValue::Integer(value),
28069                )),
28070            }
28071        }
28072    }
28073
28074    impl std::convert::From<&str> for ClusterTier {
28075        fn from(value: &str) -> Self {
28076            use std::string::ToString;
28077            match value {
28078                "CLUSTER_TIER_UNSPECIFIED" => Self::Unspecified,
28079                "STANDARD" => Self::Standard,
28080                "ENTERPRISE" => Self::Enterprise,
28081                _ => Self::UnknownValue(cluster_tier::UnknownValue(
28082                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28083                )),
28084            }
28085        }
28086    }
28087
28088    impl serde::ser::Serialize for ClusterTier {
28089        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28090        where
28091            S: serde::Serializer,
28092        {
28093            match self {
28094                Self::Unspecified => serializer.serialize_i32(0),
28095                Self::Standard => serializer.serialize_i32(1),
28096                Self::Enterprise => serializer.serialize_i32(2),
28097                Self::UnknownValue(u) => u.0.serialize(serializer),
28098            }
28099        }
28100    }
28101
28102    impl<'de> serde::de::Deserialize<'de> for ClusterTier {
28103        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28104        where
28105            D: serde::Deserializer<'de>,
28106        {
28107            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ClusterTier>::new(
28108                ".google.container.v1.EnterpriseConfig.ClusterTier",
28109            ))
28110        }
28111    }
28112}
28113
28114/// SecretManagerConfig is config for secret manager enablement.
28115#[derive(Clone, Default, PartialEq)]
28116#[non_exhaustive]
28117pub struct SecretManagerConfig {
28118    /// Enable/Disable Secret Manager Config.
28119    pub enabled: std::option::Option<bool>,
28120
28121    /// Rotation config for secret manager.
28122    pub rotation_config: std::option::Option<crate::model::secret_manager_config::RotationConfig>,
28123
28124    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28125}
28126
28127impl SecretManagerConfig {
28128    pub fn new() -> Self {
28129        std::default::Default::default()
28130    }
28131
28132    /// Sets the value of [enabled][crate::model::SecretManagerConfig::enabled].
28133    pub fn set_enabled<T>(mut self, v: T) -> Self
28134    where
28135        T: std::convert::Into<bool>,
28136    {
28137        self.enabled = std::option::Option::Some(v.into());
28138        self
28139    }
28140
28141    /// Sets or clears the value of [enabled][crate::model::SecretManagerConfig::enabled].
28142    pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
28143    where
28144        T: std::convert::Into<bool>,
28145    {
28146        self.enabled = v.map(|x| x.into());
28147        self
28148    }
28149
28150    /// Sets the value of [rotation_config][crate::model::SecretManagerConfig::rotation_config].
28151    pub fn set_rotation_config<T>(mut self, v: T) -> Self
28152    where
28153        T: std::convert::Into<crate::model::secret_manager_config::RotationConfig>,
28154    {
28155        self.rotation_config = std::option::Option::Some(v.into());
28156        self
28157    }
28158
28159    /// Sets or clears the value of [rotation_config][crate::model::SecretManagerConfig::rotation_config].
28160    pub fn set_or_clear_rotation_config<T>(mut self, v: std::option::Option<T>) -> Self
28161    where
28162        T: std::convert::Into<crate::model::secret_manager_config::RotationConfig>,
28163    {
28164        self.rotation_config = v.map(|x| x.into());
28165        self
28166    }
28167}
28168
28169impl wkt::message::Message for SecretManagerConfig {
28170    fn typename() -> &'static str {
28171        "type.googleapis.com/google.container.v1.SecretManagerConfig"
28172    }
28173}
28174
28175/// Defines additional types related to [SecretManagerConfig].
28176pub mod secret_manager_config {
28177    #[allow(unused_imports)]
28178    use super::*;
28179
28180    /// RotationConfig is config for secret manager auto rotation.
28181    #[derive(Clone, Default, PartialEq)]
28182    #[non_exhaustive]
28183    pub struct RotationConfig {
28184        /// Whether the rotation is enabled.
28185        pub enabled: std::option::Option<bool>,
28186
28187        /// The interval between two consecutive rotations. Default rotation interval
28188        /// is 2 minutes.
28189        pub rotation_interval: std::option::Option<wkt::Duration>,
28190
28191        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28192    }
28193
28194    impl RotationConfig {
28195        pub fn new() -> Self {
28196            std::default::Default::default()
28197        }
28198
28199        /// Sets the value of [enabled][crate::model::secret_manager_config::RotationConfig::enabled].
28200        pub fn set_enabled<T>(mut self, v: T) -> Self
28201        where
28202            T: std::convert::Into<bool>,
28203        {
28204            self.enabled = std::option::Option::Some(v.into());
28205            self
28206        }
28207
28208        /// Sets or clears the value of [enabled][crate::model::secret_manager_config::RotationConfig::enabled].
28209        pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
28210        where
28211            T: std::convert::Into<bool>,
28212        {
28213            self.enabled = v.map(|x| x.into());
28214            self
28215        }
28216
28217        /// Sets the value of [rotation_interval][crate::model::secret_manager_config::RotationConfig::rotation_interval].
28218        pub fn set_rotation_interval<T>(mut self, v: T) -> Self
28219        where
28220            T: std::convert::Into<wkt::Duration>,
28221        {
28222            self.rotation_interval = std::option::Option::Some(v.into());
28223            self
28224        }
28225
28226        /// Sets or clears the value of [rotation_interval][crate::model::secret_manager_config::RotationConfig::rotation_interval].
28227        pub fn set_or_clear_rotation_interval<T>(mut self, v: std::option::Option<T>) -> Self
28228        where
28229            T: std::convert::Into<wkt::Duration>,
28230        {
28231            self.rotation_interval = v.map(|x| x.into());
28232            self
28233        }
28234    }
28235
28236    impl wkt::message::Message for RotationConfig {
28237        fn typename() -> &'static str {
28238            "type.googleapis.com/google.container.v1.SecretManagerConfig.RotationConfig"
28239        }
28240    }
28241}
28242
28243/// BootDisk specifies the boot disk configuration for nodepools.
28244#[derive(Clone, Default, PartialEq)]
28245#[non_exhaustive]
28246pub struct BootDisk {
28247    /// Disk type of the boot disk.
28248    /// (i.e. Hyperdisk-Balanced, PD-Balanced, etc.)
28249    pub disk_type: std::string::String,
28250
28251    /// Disk size in GB. Replaces NodeConfig.disk_size_gb
28252    pub size_gb: i64,
28253
28254    /// For Hyperdisk-Balanced only, the provisioned IOPS config value.
28255    pub provisioned_iops: i64,
28256
28257    /// For Hyperdisk-Balanced only, the provisioned throughput config value.
28258    pub provisioned_throughput: i64,
28259
28260    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28261}
28262
28263impl BootDisk {
28264    pub fn new() -> Self {
28265        std::default::Default::default()
28266    }
28267
28268    /// Sets the value of [disk_type][crate::model::BootDisk::disk_type].
28269    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28270        self.disk_type = v.into();
28271        self
28272    }
28273
28274    /// Sets the value of [size_gb][crate::model::BootDisk::size_gb].
28275    pub fn set_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
28276        self.size_gb = v.into();
28277        self
28278    }
28279
28280    /// Sets the value of [provisioned_iops][crate::model::BootDisk::provisioned_iops].
28281    pub fn set_provisioned_iops<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
28282        self.provisioned_iops = v.into();
28283        self
28284    }
28285
28286    /// Sets the value of [provisioned_throughput][crate::model::BootDisk::provisioned_throughput].
28287    pub fn set_provisioned_throughput<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
28288        self.provisioned_throughput = v.into();
28289        self
28290    }
28291}
28292
28293impl wkt::message::Message for BootDisk {
28294    fn typename() -> &'static str {
28295        "type.googleapis.com/google.container.v1.BootDisk"
28296    }
28297}
28298
28299/// SecondaryBootDisk represents a persistent disk attached to a node
28300/// with special configurations based on its mode.
28301#[derive(Clone, Default, PartialEq)]
28302#[non_exhaustive]
28303pub struct SecondaryBootDisk {
28304    /// Disk mode (container image cache, etc.)
28305    pub mode: crate::model::secondary_boot_disk::Mode,
28306
28307    /// Fully-qualified resource ID for an existing disk image.
28308    pub disk_image: std::string::String,
28309
28310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28311}
28312
28313impl SecondaryBootDisk {
28314    pub fn new() -> Self {
28315        std::default::Default::default()
28316    }
28317
28318    /// Sets the value of [mode][crate::model::SecondaryBootDisk::mode].
28319    pub fn set_mode<T: std::convert::Into<crate::model::secondary_boot_disk::Mode>>(
28320        mut self,
28321        v: T,
28322    ) -> Self {
28323        self.mode = v.into();
28324        self
28325    }
28326
28327    /// Sets the value of [disk_image][crate::model::SecondaryBootDisk::disk_image].
28328    pub fn set_disk_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28329        self.disk_image = v.into();
28330        self
28331    }
28332}
28333
28334impl wkt::message::Message for SecondaryBootDisk {
28335    fn typename() -> &'static str {
28336        "type.googleapis.com/google.container.v1.SecondaryBootDisk"
28337    }
28338}
28339
28340/// Defines additional types related to [SecondaryBootDisk].
28341pub mod secondary_boot_disk {
28342    #[allow(unused_imports)]
28343    use super::*;
28344
28345    /// Mode specifies how the secondary boot disk will be used.
28346    /// This triggers mode-specified logic in the control plane.
28347    ///
28348    /// # Working with unknown values
28349    ///
28350    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28351    /// additional enum variants at any time. Adding new variants is not considered
28352    /// a breaking change. Applications should write their code in anticipation of:
28353    ///
28354    /// - New values appearing in future releases of the client library, **and**
28355    /// - New values received dynamically, without application changes.
28356    ///
28357    /// Please consult the [Working with enums] section in the user guide for some
28358    /// guidelines.
28359    ///
28360    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28361    #[derive(Clone, Debug, PartialEq)]
28362    #[non_exhaustive]
28363    pub enum Mode {
28364        /// MODE_UNSPECIFIED is when mode is not set.
28365        Unspecified,
28366        /// CONTAINER_IMAGE_CACHE is for using the secondary boot disk as
28367        /// a container image cache.
28368        ContainerImageCache,
28369        /// If set, the enum was initialized with an unknown value.
28370        ///
28371        /// Applications can examine the value using [Mode::value] or
28372        /// [Mode::name].
28373        UnknownValue(mode::UnknownValue),
28374    }
28375
28376    #[doc(hidden)]
28377    pub mod mode {
28378        #[allow(unused_imports)]
28379        use super::*;
28380        #[derive(Clone, Debug, PartialEq)]
28381        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28382    }
28383
28384    impl Mode {
28385        /// Gets the enum value.
28386        ///
28387        /// Returns `None` if the enum contains an unknown value deserialized from
28388        /// the string representation of enums.
28389        pub fn value(&self) -> std::option::Option<i32> {
28390            match self {
28391                Self::Unspecified => std::option::Option::Some(0),
28392                Self::ContainerImageCache => std::option::Option::Some(1),
28393                Self::UnknownValue(u) => u.0.value(),
28394            }
28395        }
28396
28397        /// Gets the enum value as a string.
28398        ///
28399        /// Returns `None` if the enum contains an unknown value deserialized from
28400        /// the integer representation of enums.
28401        pub fn name(&self) -> std::option::Option<&str> {
28402            match self {
28403                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
28404                Self::ContainerImageCache => std::option::Option::Some("CONTAINER_IMAGE_CACHE"),
28405                Self::UnknownValue(u) => u.0.name(),
28406            }
28407        }
28408    }
28409
28410    impl std::default::Default for Mode {
28411        fn default() -> Self {
28412            use std::convert::From;
28413            Self::from(0)
28414        }
28415    }
28416
28417    impl std::fmt::Display for Mode {
28418        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28419            wkt::internal::display_enum(f, self.name(), self.value())
28420        }
28421    }
28422
28423    impl std::convert::From<i32> for Mode {
28424        fn from(value: i32) -> Self {
28425            match value {
28426                0 => Self::Unspecified,
28427                1 => Self::ContainerImageCache,
28428                _ => Self::UnknownValue(mode::UnknownValue(
28429                    wkt::internal::UnknownEnumValue::Integer(value),
28430                )),
28431            }
28432        }
28433    }
28434
28435    impl std::convert::From<&str> for Mode {
28436        fn from(value: &str) -> Self {
28437            use std::string::ToString;
28438            match value {
28439                "MODE_UNSPECIFIED" => Self::Unspecified,
28440                "CONTAINER_IMAGE_CACHE" => Self::ContainerImageCache,
28441                _ => Self::UnknownValue(mode::UnknownValue(
28442                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28443                )),
28444            }
28445        }
28446    }
28447
28448    impl serde::ser::Serialize for Mode {
28449        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28450        where
28451            S: serde::Serializer,
28452        {
28453            match self {
28454                Self::Unspecified => serializer.serialize_i32(0),
28455                Self::ContainerImageCache => serializer.serialize_i32(1),
28456                Self::UnknownValue(u) => u.0.serialize(serializer),
28457            }
28458        }
28459    }
28460
28461    impl<'de> serde::de::Deserialize<'de> for Mode {
28462        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28463        where
28464            D: serde::Deserializer<'de>,
28465        {
28466            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
28467                ".google.container.v1.SecondaryBootDisk.Mode",
28468            ))
28469        }
28470    }
28471}
28472
28473/// SecondaryBootDiskUpdateStrategy is a placeholder which will be extended
28474/// in the future to define different options for updating secondary boot disks.
28475#[derive(Clone, Default, PartialEq)]
28476#[non_exhaustive]
28477pub struct SecondaryBootDiskUpdateStrategy {
28478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28479}
28480
28481impl SecondaryBootDiskUpdateStrategy {
28482    pub fn new() -> Self {
28483        std::default::Default::default()
28484    }
28485}
28486
28487impl wkt::message::Message for SecondaryBootDiskUpdateStrategy {
28488    fn typename() -> &'static str {
28489        "type.googleapis.com/google.container.v1.SecondaryBootDiskUpdateStrategy"
28490    }
28491}
28492
28493/// FetchClusterUpgradeInfoRequest fetches the upgrade information of a cluster.
28494#[derive(Clone, Default, PartialEq)]
28495#[non_exhaustive]
28496pub struct FetchClusterUpgradeInfoRequest {
28497    /// Required. The name (project, location, cluster) of the cluster to get.
28498    /// Specified in the format `projects/*/locations/*/clusters/*` or
28499    /// `projects/*/zones/*/clusters/*`.
28500    pub name: std::string::String,
28501
28502    /// API request version that initiates this operation.
28503    pub version: std::string::String,
28504
28505    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28506}
28507
28508impl FetchClusterUpgradeInfoRequest {
28509    pub fn new() -> Self {
28510        std::default::Default::default()
28511    }
28512
28513    /// Sets the value of [name][crate::model::FetchClusterUpgradeInfoRequest::name].
28514    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28515        self.name = v.into();
28516        self
28517    }
28518
28519    /// Sets the value of [version][crate::model::FetchClusterUpgradeInfoRequest::version].
28520    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28521        self.version = v.into();
28522        self
28523    }
28524}
28525
28526impl wkt::message::Message for FetchClusterUpgradeInfoRequest {
28527    fn typename() -> &'static str {
28528        "type.googleapis.com/google.container.v1.FetchClusterUpgradeInfoRequest"
28529    }
28530}
28531
28532/// ClusterUpgradeInfo contains the upgrade information of a cluster.
28533#[derive(Clone, Default, PartialEq)]
28534#[non_exhaustive]
28535pub struct ClusterUpgradeInfo {
28536    /// minor_target_version indicates the target version for minor upgrade.
28537    pub minor_target_version: std::option::Option<std::string::String>,
28538
28539    /// patch_target_version indicates the target version for patch upgrade.
28540    pub patch_target_version: std::option::Option<std::string::String>,
28541
28542    /// The auto upgrade status.
28543    pub auto_upgrade_status: std::vec::Vec<crate::model::cluster_upgrade_info::AutoUpgradeStatus>,
28544
28545    /// The auto upgrade paused reason.
28546    pub paused_reason: std::vec::Vec<crate::model::cluster_upgrade_info::AutoUpgradePausedReason>,
28547
28548    /// The list of past auto upgrades.
28549    pub upgrade_details: std::vec::Vec<crate::model::UpgradeDetails>,
28550
28551    /// The cluster's current minor version's end of standard support timestamp.
28552    pub end_of_standard_support_timestamp: std::option::Option<std::string::String>,
28553
28554    /// The cluster's current minor version's end of extended support timestamp.
28555    pub end_of_extended_support_timestamp: std::option::Option<std::string::String>,
28556
28557    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28558}
28559
28560impl ClusterUpgradeInfo {
28561    pub fn new() -> Self {
28562        std::default::Default::default()
28563    }
28564
28565    /// Sets the value of [minor_target_version][crate::model::ClusterUpgradeInfo::minor_target_version].
28566    pub fn set_minor_target_version<T>(mut self, v: T) -> Self
28567    where
28568        T: std::convert::Into<std::string::String>,
28569    {
28570        self.minor_target_version = std::option::Option::Some(v.into());
28571        self
28572    }
28573
28574    /// Sets or clears the value of [minor_target_version][crate::model::ClusterUpgradeInfo::minor_target_version].
28575    pub fn set_or_clear_minor_target_version<T>(mut self, v: std::option::Option<T>) -> Self
28576    where
28577        T: std::convert::Into<std::string::String>,
28578    {
28579        self.minor_target_version = v.map(|x| x.into());
28580        self
28581    }
28582
28583    /// Sets the value of [patch_target_version][crate::model::ClusterUpgradeInfo::patch_target_version].
28584    pub fn set_patch_target_version<T>(mut self, v: T) -> Self
28585    where
28586        T: std::convert::Into<std::string::String>,
28587    {
28588        self.patch_target_version = std::option::Option::Some(v.into());
28589        self
28590    }
28591
28592    /// Sets or clears the value of [patch_target_version][crate::model::ClusterUpgradeInfo::patch_target_version].
28593    pub fn set_or_clear_patch_target_version<T>(mut self, v: std::option::Option<T>) -> Self
28594    where
28595        T: std::convert::Into<std::string::String>,
28596    {
28597        self.patch_target_version = v.map(|x| x.into());
28598        self
28599    }
28600
28601    /// Sets the value of [auto_upgrade_status][crate::model::ClusterUpgradeInfo::auto_upgrade_status].
28602    pub fn set_auto_upgrade_status<T, V>(mut self, v: T) -> Self
28603    where
28604        T: std::iter::IntoIterator<Item = V>,
28605        V: std::convert::Into<crate::model::cluster_upgrade_info::AutoUpgradeStatus>,
28606    {
28607        use std::iter::Iterator;
28608        self.auto_upgrade_status = v.into_iter().map(|i| i.into()).collect();
28609        self
28610    }
28611
28612    /// Sets the value of [paused_reason][crate::model::ClusterUpgradeInfo::paused_reason].
28613    pub fn set_paused_reason<T, V>(mut self, v: T) -> Self
28614    where
28615        T: std::iter::IntoIterator<Item = V>,
28616        V: std::convert::Into<crate::model::cluster_upgrade_info::AutoUpgradePausedReason>,
28617    {
28618        use std::iter::Iterator;
28619        self.paused_reason = v.into_iter().map(|i| i.into()).collect();
28620        self
28621    }
28622
28623    /// Sets the value of [upgrade_details][crate::model::ClusterUpgradeInfo::upgrade_details].
28624    pub fn set_upgrade_details<T, V>(mut self, v: T) -> Self
28625    where
28626        T: std::iter::IntoIterator<Item = V>,
28627        V: std::convert::Into<crate::model::UpgradeDetails>,
28628    {
28629        use std::iter::Iterator;
28630        self.upgrade_details = v.into_iter().map(|i| i.into()).collect();
28631        self
28632    }
28633
28634    /// Sets the value of [end_of_standard_support_timestamp][crate::model::ClusterUpgradeInfo::end_of_standard_support_timestamp].
28635    pub fn set_end_of_standard_support_timestamp<T>(mut self, v: T) -> Self
28636    where
28637        T: std::convert::Into<std::string::String>,
28638    {
28639        self.end_of_standard_support_timestamp = std::option::Option::Some(v.into());
28640        self
28641    }
28642
28643    /// Sets or clears the value of [end_of_standard_support_timestamp][crate::model::ClusterUpgradeInfo::end_of_standard_support_timestamp].
28644    pub fn set_or_clear_end_of_standard_support_timestamp<T>(
28645        mut self,
28646        v: std::option::Option<T>,
28647    ) -> Self
28648    where
28649        T: std::convert::Into<std::string::String>,
28650    {
28651        self.end_of_standard_support_timestamp = v.map(|x| x.into());
28652        self
28653    }
28654
28655    /// Sets the value of [end_of_extended_support_timestamp][crate::model::ClusterUpgradeInfo::end_of_extended_support_timestamp].
28656    pub fn set_end_of_extended_support_timestamp<T>(mut self, v: T) -> Self
28657    where
28658        T: std::convert::Into<std::string::String>,
28659    {
28660        self.end_of_extended_support_timestamp = std::option::Option::Some(v.into());
28661        self
28662    }
28663
28664    /// Sets or clears the value of [end_of_extended_support_timestamp][crate::model::ClusterUpgradeInfo::end_of_extended_support_timestamp].
28665    pub fn set_or_clear_end_of_extended_support_timestamp<T>(
28666        mut self,
28667        v: std::option::Option<T>,
28668    ) -> Self
28669    where
28670        T: std::convert::Into<std::string::String>,
28671    {
28672        self.end_of_extended_support_timestamp = v.map(|x| x.into());
28673        self
28674    }
28675}
28676
28677impl wkt::message::Message for ClusterUpgradeInfo {
28678    fn typename() -> &'static str {
28679        "type.googleapis.com/google.container.v1.ClusterUpgradeInfo"
28680    }
28681}
28682
28683/// Defines additional types related to [ClusterUpgradeInfo].
28684pub mod cluster_upgrade_info {
28685    #[allow(unused_imports)]
28686    use super::*;
28687
28688    /// AutoUpgradeStatus indicates the status of auto upgrade.
28689    ///
28690    /// # Working with unknown values
28691    ///
28692    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28693    /// additional enum variants at any time. Adding new variants is not considered
28694    /// a breaking change. Applications should write their code in anticipation of:
28695    ///
28696    /// - New values appearing in future releases of the client library, **and**
28697    /// - New values received dynamically, without application changes.
28698    ///
28699    /// Please consult the [Working with enums] section in the user guide for some
28700    /// guidelines.
28701    ///
28702    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28703    #[derive(Clone, Debug, PartialEq)]
28704    #[non_exhaustive]
28705    pub enum AutoUpgradeStatus {
28706        /// UNKNOWN indicates an unknown status.
28707        Unknown,
28708        /// ACTIVE indicates an active status.
28709        Active,
28710        /// MINOR_UPGRADE_PAUSED indicates the minor version upgrade is
28711        /// paused.
28712        MinorUpgradePaused,
28713        /// UPGRADE_PAUSED indicates the upgrade is paused.
28714        UpgradePaused,
28715        /// If set, the enum was initialized with an unknown value.
28716        ///
28717        /// Applications can examine the value using [AutoUpgradeStatus::value] or
28718        /// [AutoUpgradeStatus::name].
28719        UnknownValue(auto_upgrade_status::UnknownValue),
28720    }
28721
28722    #[doc(hidden)]
28723    pub mod auto_upgrade_status {
28724        #[allow(unused_imports)]
28725        use super::*;
28726        #[derive(Clone, Debug, PartialEq)]
28727        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28728    }
28729
28730    impl AutoUpgradeStatus {
28731        /// Gets the enum value.
28732        ///
28733        /// Returns `None` if the enum contains an unknown value deserialized from
28734        /// the string representation of enums.
28735        pub fn value(&self) -> std::option::Option<i32> {
28736            match self {
28737                Self::Unknown => std::option::Option::Some(0),
28738                Self::Active => std::option::Option::Some(1),
28739                Self::MinorUpgradePaused => std::option::Option::Some(4),
28740                Self::UpgradePaused => std::option::Option::Some(5),
28741                Self::UnknownValue(u) => u.0.value(),
28742            }
28743        }
28744
28745        /// Gets the enum value as a string.
28746        ///
28747        /// Returns `None` if the enum contains an unknown value deserialized from
28748        /// the integer representation of enums.
28749        pub fn name(&self) -> std::option::Option<&str> {
28750            match self {
28751                Self::Unknown => std::option::Option::Some("UNKNOWN"),
28752                Self::Active => std::option::Option::Some("ACTIVE"),
28753                Self::MinorUpgradePaused => std::option::Option::Some("MINOR_UPGRADE_PAUSED"),
28754                Self::UpgradePaused => std::option::Option::Some("UPGRADE_PAUSED"),
28755                Self::UnknownValue(u) => u.0.name(),
28756            }
28757        }
28758    }
28759
28760    impl std::default::Default for AutoUpgradeStatus {
28761        fn default() -> Self {
28762            use std::convert::From;
28763            Self::from(0)
28764        }
28765    }
28766
28767    impl std::fmt::Display for AutoUpgradeStatus {
28768        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28769            wkt::internal::display_enum(f, self.name(), self.value())
28770        }
28771    }
28772
28773    impl std::convert::From<i32> for AutoUpgradeStatus {
28774        fn from(value: i32) -> Self {
28775            match value {
28776                0 => Self::Unknown,
28777                1 => Self::Active,
28778                4 => Self::MinorUpgradePaused,
28779                5 => Self::UpgradePaused,
28780                _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
28781                    wkt::internal::UnknownEnumValue::Integer(value),
28782                )),
28783            }
28784        }
28785    }
28786
28787    impl std::convert::From<&str> for AutoUpgradeStatus {
28788        fn from(value: &str) -> Self {
28789            use std::string::ToString;
28790            match value {
28791                "UNKNOWN" => Self::Unknown,
28792                "ACTIVE" => Self::Active,
28793                "MINOR_UPGRADE_PAUSED" => Self::MinorUpgradePaused,
28794                "UPGRADE_PAUSED" => Self::UpgradePaused,
28795                _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
28796                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28797                )),
28798            }
28799        }
28800    }
28801
28802    impl serde::ser::Serialize for AutoUpgradeStatus {
28803        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28804        where
28805            S: serde::Serializer,
28806        {
28807            match self {
28808                Self::Unknown => serializer.serialize_i32(0),
28809                Self::Active => serializer.serialize_i32(1),
28810                Self::MinorUpgradePaused => serializer.serialize_i32(4),
28811                Self::UpgradePaused => serializer.serialize_i32(5),
28812                Self::UnknownValue(u) => u.0.serialize(serializer),
28813            }
28814        }
28815    }
28816
28817    impl<'de> serde::de::Deserialize<'de> for AutoUpgradeStatus {
28818        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28819        where
28820            D: serde::Deserializer<'de>,
28821        {
28822            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoUpgradeStatus>::new(
28823                ".google.container.v1.ClusterUpgradeInfo.AutoUpgradeStatus",
28824            ))
28825        }
28826    }
28827
28828    /// AutoUpgradePausedReason indicates the reason for auto upgrade paused
28829    /// status.
28830    ///
28831    /// # Working with unknown values
28832    ///
28833    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28834    /// additional enum variants at any time. Adding new variants is not considered
28835    /// a breaking change. Applications should write their code in anticipation of:
28836    ///
28837    /// - New values appearing in future releases of the client library, **and**
28838    /// - New values received dynamically, without application changes.
28839    ///
28840    /// Please consult the [Working with enums] section in the user guide for some
28841    /// guidelines.
28842    ///
28843    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28844    #[derive(Clone, Debug, PartialEq)]
28845    #[non_exhaustive]
28846    pub enum AutoUpgradePausedReason {
28847        /// AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason.
28848        Unspecified,
28849        /// MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance
28850        /// window.
28851        MaintenanceWindow,
28852        /// MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a
28853        /// maintenance exclusion with scope NO_UPGRADES.
28854        MaintenanceExclusionNoUpgrades,
28855        /// MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a
28856        /// maintenance exclusion with scope NO_MINOR_UPGRADES.
28857        MaintenanceExclusionNoMinorUpgrades,
28858        /// CLUSTER_DISRUPTION_BUDGET indicates the cluster is outside the cluster
28859        /// disruption budget.
28860        ClusterDisruptionBudget,
28861        /// CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE indicates the cluster is outside
28862        /// the cluster disruption budget for minor version upgrade.
28863        ClusterDisruptionBudgetMinorUpgrade,
28864        /// SYSTEM_CONFIG indicates the cluster upgrade is paused  by system config.
28865        SystemConfig,
28866        /// If set, the enum was initialized with an unknown value.
28867        ///
28868        /// Applications can examine the value using [AutoUpgradePausedReason::value] or
28869        /// [AutoUpgradePausedReason::name].
28870        UnknownValue(auto_upgrade_paused_reason::UnknownValue),
28871    }
28872
28873    #[doc(hidden)]
28874    pub mod auto_upgrade_paused_reason {
28875        #[allow(unused_imports)]
28876        use super::*;
28877        #[derive(Clone, Debug, PartialEq)]
28878        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28879    }
28880
28881    impl AutoUpgradePausedReason {
28882        /// Gets the enum value.
28883        ///
28884        /// Returns `None` if the enum contains an unknown value deserialized from
28885        /// the string representation of enums.
28886        pub fn value(&self) -> std::option::Option<i32> {
28887            match self {
28888                Self::Unspecified => std::option::Option::Some(0),
28889                Self::MaintenanceWindow => std::option::Option::Some(1),
28890                Self::MaintenanceExclusionNoUpgrades => std::option::Option::Some(5),
28891                Self::MaintenanceExclusionNoMinorUpgrades => std::option::Option::Some(6),
28892                Self::ClusterDisruptionBudget => std::option::Option::Some(4),
28893                Self::ClusterDisruptionBudgetMinorUpgrade => std::option::Option::Some(7),
28894                Self::SystemConfig => std::option::Option::Some(8),
28895                Self::UnknownValue(u) => u.0.value(),
28896            }
28897        }
28898
28899        /// Gets the enum value as a string.
28900        ///
28901        /// Returns `None` if the enum contains an unknown value deserialized from
28902        /// the integer representation of enums.
28903        pub fn name(&self) -> std::option::Option<&str> {
28904            match self {
28905                Self::Unspecified => {
28906                    std::option::Option::Some("AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED")
28907                }
28908                Self::MaintenanceWindow => std::option::Option::Some("MAINTENANCE_WINDOW"),
28909                Self::MaintenanceExclusionNoUpgrades => {
28910                    std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_UPGRADES")
28911                }
28912                Self::MaintenanceExclusionNoMinorUpgrades => {
28913                    std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES")
28914                }
28915                Self::ClusterDisruptionBudget => {
28916                    std::option::Option::Some("CLUSTER_DISRUPTION_BUDGET")
28917                }
28918                Self::ClusterDisruptionBudgetMinorUpgrade => {
28919                    std::option::Option::Some("CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE")
28920                }
28921                Self::SystemConfig => std::option::Option::Some("SYSTEM_CONFIG"),
28922                Self::UnknownValue(u) => u.0.name(),
28923            }
28924        }
28925    }
28926
28927    impl std::default::Default for AutoUpgradePausedReason {
28928        fn default() -> Self {
28929            use std::convert::From;
28930            Self::from(0)
28931        }
28932    }
28933
28934    impl std::fmt::Display for AutoUpgradePausedReason {
28935        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28936            wkt::internal::display_enum(f, self.name(), self.value())
28937        }
28938    }
28939
28940    impl std::convert::From<i32> for AutoUpgradePausedReason {
28941        fn from(value: i32) -> Self {
28942            match value {
28943                0 => Self::Unspecified,
28944                1 => Self::MaintenanceWindow,
28945                4 => Self::ClusterDisruptionBudget,
28946                5 => Self::MaintenanceExclusionNoUpgrades,
28947                6 => Self::MaintenanceExclusionNoMinorUpgrades,
28948                7 => Self::ClusterDisruptionBudgetMinorUpgrade,
28949                8 => Self::SystemConfig,
28950                _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
28951                    wkt::internal::UnknownEnumValue::Integer(value),
28952                )),
28953            }
28954        }
28955    }
28956
28957    impl std::convert::From<&str> for AutoUpgradePausedReason {
28958        fn from(value: &str) -> Self {
28959            use std::string::ToString;
28960            match value {
28961                "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED" => Self::Unspecified,
28962                "MAINTENANCE_WINDOW" => Self::MaintenanceWindow,
28963                "MAINTENANCE_EXCLUSION_NO_UPGRADES" => Self::MaintenanceExclusionNoUpgrades,
28964                "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES" => {
28965                    Self::MaintenanceExclusionNoMinorUpgrades
28966                }
28967                "CLUSTER_DISRUPTION_BUDGET" => Self::ClusterDisruptionBudget,
28968                "CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE" => {
28969                    Self::ClusterDisruptionBudgetMinorUpgrade
28970                }
28971                "SYSTEM_CONFIG" => Self::SystemConfig,
28972                _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
28973                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28974                )),
28975            }
28976        }
28977    }
28978
28979    impl serde::ser::Serialize for AutoUpgradePausedReason {
28980        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28981        where
28982            S: serde::Serializer,
28983        {
28984            match self {
28985                Self::Unspecified => serializer.serialize_i32(0),
28986                Self::MaintenanceWindow => serializer.serialize_i32(1),
28987                Self::MaintenanceExclusionNoUpgrades => serializer.serialize_i32(5),
28988                Self::MaintenanceExclusionNoMinorUpgrades => serializer.serialize_i32(6),
28989                Self::ClusterDisruptionBudget => serializer.serialize_i32(4),
28990                Self::ClusterDisruptionBudgetMinorUpgrade => serializer.serialize_i32(7),
28991                Self::SystemConfig => serializer.serialize_i32(8),
28992                Self::UnknownValue(u) => u.0.serialize(serializer),
28993            }
28994        }
28995    }
28996
28997    impl<'de> serde::de::Deserialize<'de> for AutoUpgradePausedReason {
28998        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28999        where
29000            D: serde::Deserializer<'de>,
29001        {
29002            deserializer.deserialize_any(
29003                wkt::internal::EnumVisitor::<AutoUpgradePausedReason>::new(
29004                    ".google.container.v1.ClusterUpgradeInfo.AutoUpgradePausedReason",
29005                ),
29006            )
29007        }
29008    }
29009}
29010
29011/// UpgradeDetails contains detailed information of each individual upgrade
29012/// operation.
29013#[derive(Clone, Default, PartialEq)]
29014#[non_exhaustive]
29015pub struct UpgradeDetails {
29016    /// Output only. The state of the upgrade.
29017    pub state: crate::model::upgrade_details::State,
29018
29019    /// The start timestamp of the upgrade.
29020    pub start_time: std::option::Option<wkt::Timestamp>,
29021
29022    /// The end timestamp of the upgrade.
29023    pub end_time: std::option::Option<wkt::Timestamp>,
29024
29025    /// The version before the upgrade.
29026    pub initial_version: std::string::String,
29027
29028    /// The version after the upgrade.
29029    pub target_version: std::string::String,
29030
29031    /// The start type of the upgrade.
29032    pub start_type: crate::model::upgrade_details::StartType,
29033
29034    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29035}
29036
29037impl UpgradeDetails {
29038    pub fn new() -> Self {
29039        std::default::Default::default()
29040    }
29041
29042    /// Sets the value of [state][crate::model::UpgradeDetails::state].
29043    pub fn set_state<T: std::convert::Into<crate::model::upgrade_details::State>>(
29044        mut self,
29045        v: T,
29046    ) -> Self {
29047        self.state = v.into();
29048        self
29049    }
29050
29051    /// Sets the value of [start_time][crate::model::UpgradeDetails::start_time].
29052    pub fn set_start_time<T>(mut self, v: T) -> Self
29053    where
29054        T: std::convert::Into<wkt::Timestamp>,
29055    {
29056        self.start_time = std::option::Option::Some(v.into());
29057        self
29058    }
29059
29060    /// Sets or clears the value of [start_time][crate::model::UpgradeDetails::start_time].
29061    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
29062    where
29063        T: std::convert::Into<wkt::Timestamp>,
29064    {
29065        self.start_time = v.map(|x| x.into());
29066        self
29067    }
29068
29069    /// Sets the value of [end_time][crate::model::UpgradeDetails::end_time].
29070    pub fn set_end_time<T>(mut self, v: T) -> Self
29071    where
29072        T: std::convert::Into<wkt::Timestamp>,
29073    {
29074        self.end_time = std::option::Option::Some(v.into());
29075        self
29076    }
29077
29078    /// Sets or clears the value of [end_time][crate::model::UpgradeDetails::end_time].
29079    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
29080    where
29081        T: std::convert::Into<wkt::Timestamp>,
29082    {
29083        self.end_time = v.map(|x| x.into());
29084        self
29085    }
29086
29087    /// Sets the value of [initial_version][crate::model::UpgradeDetails::initial_version].
29088    pub fn set_initial_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29089        self.initial_version = v.into();
29090        self
29091    }
29092
29093    /// Sets the value of [target_version][crate::model::UpgradeDetails::target_version].
29094    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29095        self.target_version = v.into();
29096        self
29097    }
29098
29099    /// Sets the value of [start_type][crate::model::UpgradeDetails::start_type].
29100    pub fn set_start_type<T: std::convert::Into<crate::model::upgrade_details::StartType>>(
29101        mut self,
29102        v: T,
29103    ) -> Self {
29104        self.start_type = v.into();
29105        self
29106    }
29107}
29108
29109impl wkt::message::Message for UpgradeDetails {
29110    fn typename() -> &'static str {
29111        "type.googleapis.com/google.container.v1.UpgradeDetails"
29112    }
29113}
29114
29115/// Defines additional types related to [UpgradeDetails].
29116pub mod upgrade_details {
29117    #[allow(unused_imports)]
29118    use super::*;
29119
29120    /// State indicates the state of the upgrade.
29121    ///
29122    /// # Working with unknown values
29123    ///
29124    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29125    /// additional enum variants at any time. Adding new variants is not considered
29126    /// a breaking change. Applications should write their code in anticipation of:
29127    ///
29128    /// - New values appearing in future releases of the client library, **and**
29129    /// - New values received dynamically, without application changes.
29130    ///
29131    /// Please consult the [Working with enums] section in the user guide for some
29132    /// guidelines.
29133    ///
29134    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29135    #[derive(Clone, Debug, PartialEq)]
29136    #[non_exhaustive]
29137    pub enum State {
29138        /// Upgrade state is unknown.
29139        Unknown,
29140        /// Upgrade has failed with an error.
29141        Failed,
29142        /// Upgrade has succeeded.
29143        Succeeded,
29144        /// Upgrade has been canceled.
29145        Canceled,
29146        /// Upgrade is running.
29147        Running,
29148        /// If set, the enum was initialized with an unknown value.
29149        ///
29150        /// Applications can examine the value using [State::value] or
29151        /// [State::name].
29152        UnknownValue(state::UnknownValue),
29153    }
29154
29155    #[doc(hidden)]
29156    pub mod state {
29157        #[allow(unused_imports)]
29158        use super::*;
29159        #[derive(Clone, Debug, PartialEq)]
29160        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29161    }
29162
29163    impl State {
29164        /// Gets the enum value.
29165        ///
29166        /// Returns `None` if the enum contains an unknown value deserialized from
29167        /// the string representation of enums.
29168        pub fn value(&self) -> std::option::Option<i32> {
29169            match self {
29170                Self::Unknown => std::option::Option::Some(0),
29171                Self::Failed => std::option::Option::Some(1),
29172                Self::Succeeded => std::option::Option::Some(2),
29173                Self::Canceled => std::option::Option::Some(3),
29174                Self::Running => std::option::Option::Some(4),
29175                Self::UnknownValue(u) => u.0.value(),
29176            }
29177        }
29178
29179        /// Gets the enum value as a string.
29180        ///
29181        /// Returns `None` if the enum contains an unknown value deserialized from
29182        /// the integer representation of enums.
29183        pub fn name(&self) -> std::option::Option<&str> {
29184            match self {
29185                Self::Unknown => std::option::Option::Some("UNKNOWN"),
29186                Self::Failed => std::option::Option::Some("FAILED"),
29187                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
29188                Self::Canceled => std::option::Option::Some("CANCELED"),
29189                Self::Running => std::option::Option::Some("RUNNING"),
29190                Self::UnknownValue(u) => u.0.name(),
29191            }
29192        }
29193    }
29194
29195    impl std::default::Default for State {
29196        fn default() -> Self {
29197            use std::convert::From;
29198            Self::from(0)
29199        }
29200    }
29201
29202    impl std::fmt::Display for State {
29203        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29204            wkt::internal::display_enum(f, self.name(), self.value())
29205        }
29206    }
29207
29208    impl std::convert::From<i32> for State {
29209        fn from(value: i32) -> Self {
29210            match value {
29211                0 => Self::Unknown,
29212                1 => Self::Failed,
29213                2 => Self::Succeeded,
29214                3 => Self::Canceled,
29215                4 => Self::Running,
29216                _ => Self::UnknownValue(state::UnknownValue(
29217                    wkt::internal::UnknownEnumValue::Integer(value),
29218                )),
29219            }
29220        }
29221    }
29222
29223    impl std::convert::From<&str> for State {
29224        fn from(value: &str) -> Self {
29225            use std::string::ToString;
29226            match value {
29227                "UNKNOWN" => Self::Unknown,
29228                "FAILED" => Self::Failed,
29229                "SUCCEEDED" => Self::Succeeded,
29230                "CANCELED" => Self::Canceled,
29231                "RUNNING" => Self::Running,
29232                _ => Self::UnknownValue(state::UnknownValue(
29233                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29234                )),
29235            }
29236        }
29237    }
29238
29239    impl serde::ser::Serialize for State {
29240        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29241        where
29242            S: serde::Serializer,
29243        {
29244            match self {
29245                Self::Unknown => serializer.serialize_i32(0),
29246                Self::Failed => serializer.serialize_i32(1),
29247                Self::Succeeded => serializer.serialize_i32(2),
29248                Self::Canceled => serializer.serialize_i32(3),
29249                Self::Running => serializer.serialize_i32(4),
29250                Self::UnknownValue(u) => u.0.serialize(serializer),
29251            }
29252        }
29253    }
29254
29255    impl<'de> serde::de::Deserialize<'de> for State {
29256        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29257        where
29258            D: serde::Deserializer<'de>,
29259        {
29260            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
29261                ".google.container.v1.UpgradeDetails.State",
29262            ))
29263        }
29264    }
29265
29266    /// StartType indicates the type of starting the upgrade.
29267    ///
29268    /// # Working with unknown values
29269    ///
29270    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29271    /// additional enum variants at any time. Adding new variants is not considered
29272    /// a breaking change. Applications should write their code in anticipation of:
29273    ///
29274    /// - New values appearing in future releases of the client library, **and**
29275    /// - New values received dynamically, without application changes.
29276    ///
29277    /// Please consult the [Working with enums] section in the user guide for some
29278    /// guidelines.
29279    ///
29280    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29281    #[derive(Clone, Debug, PartialEq)]
29282    #[non_exhaustive]
29283    pub enum StartType {
29284        /// Upgrade start type is unspecified.
29285        Unspecified,
29286        /// Upgrade started automatically.
29287        Automatic,
29288        /// Upgrade started manually.
29289        Manual,
29290        /// If set, the enum was initialized with an unknown value.
29291        ///
29292        /// Applications can examine the value using [StartType::value] or
29293        /// [StartType::name].
29294        UnknownValue(start_type::UnknownValue),
29295    }
29296
29297    #[doc(hidden)]
29298    pub mod start_type {
29299        #[allow(unused_imports)]
29300        use super::*;
29301        #[derive(Clone, Debug, PartialEq)]
29302        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29303    }
29304
29305    impl StartType {
29306        /// Gets the enum value.
29307        ///
29308        /// Returns `None` if the enum contains an unknown value deserialized from
29309        /// the string representation of enums.
29310        pub fn value(&self) -> std::option::Option<i32> {
29311            match self {
29312                Self::Unspecified => std::option::Option::Some(0),
29313                Self::Automatic => std::option::Option::Some(1),
29314                Self::Manual => std::option::Option::Some(2),
29315                Self::UnknownValue(u) => u.0.value(),
29316            }
29317        }
29318
29319        /// Gets the enum value as a string.
29320        ///
29321        /// Returns `None` if the enum contains an unknown value deserialized from
29322        /// the integer representation of enums.
29323        pub fn name(&self) -> std::option::Option<&str> {
29324            match self {
29325                Self::Unspecified => std::option::Option::Some("START_TYPE_UNSPECIFIED"),
29326                Self::Automatic => std::option::Option::Some("AUTOMATIC"),
29327                Self::Manual => std::option::Option::Some("MANUAL"),
29328                Self::UnknownValue(u) => u.0.name(),
29329            }
29330        }
29331    }
29332
29333    impl std::default::Default for StartType {
29334        fn default() -> Self {
29335            use std::convert::From;
29336            Self::from(0)
29337        }
29338    }
29339
29340    impl std::fmt::Display for StartType {
29341        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29342            wkt::internal::display_enum(f, self.name(), self.value())
29343        }
29344    }
29345
29346    impl std::convert::From<i32> for StartType {
29347        fn from(value: i32) -> Self {
29348            match value {
29349                0 => Self::Unspecified,
29350                1 => Self::Automatic,
29351                2 => Self::Manual,
29352                _ => Self::UnknownValue(start_type::UnknownValue(
29353                    wkt::internal::UnknownEnumValue::Integer(value),
29354                )),
29355            }
29356        }
29357    }
29358
29359    impl std::convert::From<&str> for StartType {
29360        fn from(value: &str) -> Self {
29361            use std::string::ToString;
29362            match value {
29363                "START_TYPE_UNSPECIFIED" => Self::Unspecified,
29364                "AUTOMATIC" => Self::Automatic,
29365                "MANUAL" => Self::Manual,
29366                _ => Self::UnknownValue(start_type::UnknownValue(
29367                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29368                )),
29369            }
29370        }
29371    }
29372
29373    impl serde::ser::Serialize for StartType {
29374        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29375        where
29376            S: serde::Serializer,
29377        {
29378            match self {
29379                Self::Unspecified => serializer.serialize_i32(0),
29380                Self::Automatic => serializer.serialize_i32(1),
29381                Self::Manual => serializer.serialize_i32(2),
29382                Self::UnknownValue(u) => u.0.serialize(serializer),
29383            }
29384        }
29385    }
29386
29387    impl<'de> serde::de::Deserialize<'de> for StartType {
29388        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29389        where
29390            D: serde::Deserializer<'de>,
29391        {
29392            deserializer.deserialize_any(wkt::internal::EnumVisitor::<StartType>::new(
29393                ".google.container.v1.UpgradeDetails.StartType",
29394            ))
29395        }
29396    }
29397}
29398
29399/// FetchNodePoolUpgradeInfoRequest fetches the upgrade information of a
29400/// nodepool.
29401#[derive(Clone, Default, PartialEq)]
29402#[non_exhaustive]
29403pub struct FetchNodePoolUpgradeInfoRequest {
29404    /// Required. The name (project, location, cluster, nodepool) of the nodepool
29405    /// to get. Specified in the format
29406    /// `projects/*/locations/*/clusters/*/nodePools/*` or
29407    /// `projects/*/zones/*/clusters/*/nodePools/*`.
29408    pub name: std::string::String,
29409
29410    /// API request version that initiates this operation.
29411    pub version: std::string::String,
29412
29413    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29414}
29415
29416impl FetchNodePoolUpgradeInfoRequest {
29417    pub fn new() -> Self {
29418        std::default::Default::default()
29419    }
29420
29421    /// Sets the value of [name][crate::model::FetchNodePoolUpgradeInfoRequest::name].
29422    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29423        self.name = v.into();
29424        self
29425    }
29426
29427    /// Sets the value of [version][crate::model::FetchNodePoolUpgradeInfoRequest::version].
29428    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29429        self.version = v.into();
29430        self
29431    }
29432}
29433
29434impl wkt::message::Message for FetchNodePoolUpgradeInfoRequest {
29435    fn typename() -> &'static str {
29436        "type.googleapis.com/google.container.v1.FetchNodePoolUpgradeInfoRequest"
29437    }
29438}
29439
29440/// NodePoolUpgradeInfo contains the upgrade information of a nodepool.
29441#[derive(Clone, Default, PartialEq)]
29442#[non_exhaustive]
29443pub struct NodePoolUpgradeInfo {
29444    /// minor_target_version indicates the target version for minor upgrade.
29445    pub minor_target_version: std::option::Option<std::string::String>,
29446
29447    /// patch_target_version indicates the target version for patch upgrade.
29448    pub patch_target_version: std::option::Option<std::string::String>,
29449
29450    /// The auto upgrade status.
29451    pub auto_upgrade_status: std::vec::Vec<crate::model::node_pool_upgrade_info::AutoUpgradeStatus>,
29452
29453    /// The auto upgrade paused reason.
29454    pub paused_reason: std::vec::Vec<crate::model::node_pool_upgrade_info::AutoUpgradePausedReason>,
29455
29456    /// The list of past auto upgrades.
29457    pub upgrade_details: std::vec::Vec<crate::model::UpgradeDetails>,
29458
29459    /// The nodepool's current minor version's end of standard support timestamp.
29460    pub end_of_standard_support_timestamp: std::option::Option<std::string::String>,
29461
29462    /// The nodepool's current minor version's end of extended support timestamp.
29463    pub end_of_extended_support_timestamp: std::option::Option<std::string::String>,
29464
29465    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29466}
29467
29468impl NodePoolUpgradeInfo {
29469    pub fn new() -> Self {
29470        std::default::Default::default()
29471    }
29472
29473    /// Sets the value of [minor_target_version][crate::model::NodePoolUpgradeInfo::minor_target_version].
29474    pub fn set_minor_target_version<T>(mut self, v: T) -> Self
29475    where
29476        T: std::convert::Into<std::string::String>,
29477    {
29478        self.minor_target_version = std::option::Option::Some(v.into());
29479        self
29480    }
29481
29482    /// Sets or clears the value of [minor_target_version][crate::model::NodePoolUpgradeInfo::minor_target_version].
29483    pub fn set_or_clear_minor_target_version<T>(mut self, v: std::option::Option<T>) -> Self
29484    where
29485        T: std::convert::Into<std::string::String>,
29486    {
29487        self.minor_target_version = v.map(|x| x.into());
29488        self
29489    }
29490
29491    /// Sets the value of [patch_target_version][crate::model::NodePoolUpgradeInfo::patch_target_version].
29492    pub fn set_patch_target_version<T>(mut self, v: T) -> Self
29493    where
29494        T: std::convert::Into<std::string::String>,
29495    {
29496        self.patch_target_version = std::option::Option::Some(v.into());
29497        self
29498    }
29499
29500    /// Sets or clears the value of [patch_target_version][crate::model::NodePoolUpgradeInfo::patch_target_version].
29501    pub fn set_or_clear_patch_target_version<T>(mut self, v: std::option::Option<T>) -> Self
29502    where
29503        T: std::convert::Into<std::string::String>,
29504    {
29505        self.patch_target_version = v.map(|x| x.into());
29506        self
29507    }
29508
29509    /// Sets the value of [auto_upgrade_status][crate::model::NodePoolUpgradeInfo::auto_upgrade_status].
29510    pub fn set_auto_upgrade_status<T, V>(mut self, v: T) -> Self
29511    where
29512        T: std::iter::IntoIterator<Item = V>,
29513        V: std::convert::Into<crate::model::node_pool_upgrade_info::AutoUpgradeStatus>,
29514    {
29515        use std::iter::Iterator;
29516        self.auto_upgrade_status = v.into_iter().map(|i| i.into()).collect();
29517        self
29518    }
29519
29520    /// Sets the value of [paused_reason][crate::model::NodePoolUpgradeInfo::paused_reason].
29521    pub fn set_paused_reason<T, V>(mut self, v: T) -> Self
29522    where
29523        T: std::iter::IntoIterator<Item = V>,
29524        V: std::convert::Into<crate::model::node_pool_upgrade_info::AutoUpgradePausedReason>,
29525    {
29526        use std::iter::Iterator;
29527        self.paused_reason = v.into_iter().map(|i| i.into()).collect();
29528        self
29529    }
29530
29531    /// Sets the value of [upgrade_details][crate::model::NodePoolUpgradeInfo::upgrade_details].
29532    pub fn set_upgrade_details<T, V>(mut self, v: T) -> Self
29533    where
29534        T: std::iter::IntoIterator<Item = V>,
29535        V: std::convert::Into<crate::model::UpgradeDetails>,
29536    {
29537        use std::iter::Iterator;
29538        self.upgrade_details = v.into_iter().map(|i| i.into()).collect();
29539        self
29540    }
29541
29542    /// Sets the value of [end_of_standard_support_timestamp][crate::model::NodePoolUpgradeInfo::end_of_standard_support_timestamp].
29543    pub fn set_end_of_standard_support_timestamp<T>(mut self, v: T) -> Self
29544    where
29545        T: std::convert::Into<std::string::String>,
29546    {
29547        self.end_of_standard_support_timestamp = std::option::Option::Some(v.into());
29548        self
29549    }
29550
29551    /// Sets or clears the value of [end_of_standard_support_timestamp][crate::model::NodePoolUpgradeInfo::end_of_standard_support_timestamp].
29552    pub fn set_or_clear_end_of_standard_support_timestamp<T>(
29553        mut self,
29554        v: std::option::Option<T>,
29555    ) -> Self
29556    where
29557        T: std::convert::Into<std::string::String>,
29558    {
29559        self.end_of_standard_support_timestamp = v.map(|x| x.into());
29560        self
29561    }
29562
29563    /// Sets the value of [end_of_extended_support_timestamp][crate::model::NodePoolUpgradeInfo::end_of_extended_support_timestamp].
29564    pub fn set_end_of_extended_support_timestamp<T>(mut self, v: T) -> Self
29565    where
29566        T: std::convert::Into<std::string::String>,
29567    {
29568        self.end_of_extended_support_timestamp = std::option::Option::Some(v.into());
29569        self
29570    }
29571
29572    /// Sets or clears the value of [end_of_extended_support_timestamp][crate::model::NodePoolUpgradeInfo::end_of_extended_support_timestamp].
29573    pub fn set_or_clear_end_of_extended_support_timestamp<T>(
29574        mut self,
29575        v: std::option::Option<T>,
29576    ) -> Self
29577    where
29578        T: std::convert::Into<std::string::String>,
29579    {
29580        self.end_of_extended_support_timestamp = v.map(|x| x.into());
29581        self
29582    }
29583}
29584
29585impl wkt::message::Message for NodePoolUpgradeInfo {
29586    fn typename() -> &'static str {
29587        "type.googleapis.com/google.container.v1.NodePoolUpgradeInfo"
29588    }
29589}
29590
29591/// Defines additional types related to [NodePoolUpgradeInfo].
29592pub mod node_pool_upgrade_info {
29593    #[allow(unused_imports)]
29594    use super::*;
29595
29596    /// AutoUpgradeStatus indicates the status of auto upgrade.
29597    ///
29598    /// # Working with unknown values
29599    ///
29600    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29601    /// additional enum variants at any time. Adding new variants is not considered
29602    /// a breaking change. Applications should write their code in anticipation of:
29603    ///
29604    /// - New values appearing in future releases of the client library, **and**
29605    /// - New values received dynamically, without application changes.
29606    ///
29607    /// Please consult the [Working with enums] section in the user guide for some
29608    /// guidelines.
29609    ///
29610    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29611    #[derive(Clone, Debug, PartialEq)]
29612    #[non_exhaustive]
29613    pub enum AutoUpgradeStatus {
29614        /// UNKNOWN indicates an unknown status.
29615        Unknown,
29616        /// ACTIVE indicates an active status.
29617        Active,
29618        /// MINOR_UPGRADE_PAUSED indicates the minor version upgrade is
29619        /// paused.
29620        MinorUpgradePaused,
29621        /// UPGRADE_PAUSED indicates the upgrade is paused.
29622        UpgradePaused,
29623        /// If set, the enum was initialized with an unknown value.
29624        ///
29625        /// Applications can examine the value using [AutoUpgradeStatus::value] or
29626        /// [AutoUpgradeStatus::name].
29627        UnknownValue(auto_upgrade_status::UnknownValue),
29628    }
29629
29630    #[doc(hidden)]
29631    pub mod auto_upgrade_status {
29632        #[allow(unused_imports)]
29633        use super::*;
29634        #[derive(Clone, Debug, PartialEq)]
29635        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29636    }
29637
29638    impl AutoUpgradeStatus {
29639        /// Gets the enum value.
29640        ///
29641        /// Returns `None` if the enum contains an unknown value deserialized from
29642        /// the string representation of enums.
29643        pub fn value(&self) -> std::option::Option<i32> {
29644            match self {
29645                Self::Unknown => std::option::Option::Some(0),
29646                Self::Active => std::option::Option::Some(1),
29647                Self::MinorUpgradePaused => std::option::Option::Some(2),
29648                Self::UpgradePaused => std::option::Option::Some(3),
29649                Self::UnknownValue(u) => u.0.value(),
29650            }
29651        }
29652
29653        /// Gets the enum value as a string.
29654        ///
29655        /// Returns `None` if the enum contains an unknown value deserialized from
29656        /// the integer representation of enums.
29657        pub fn name(&self) -> std::option::Option<&str> {
29658            match self {
29659                Self::Unknown => std::option::Option::Some("UNKNOWN"),
29660                Self::Active => std::option::Option::Some("ACTIVE"),
29661                Self::MinorUpgradePaused => std::option::Option::Some("MINOR_UPGRADE_PAUSED"),
29662                Self::UpgradePaused => std::option::Option::Some("UPGRADE_PAUSED"),
29663                Self::UnknownValue(u) => u.0.name(),
29664            }
29665        }
29666    }
29667
29668    impl std::default::Default for AutoUpgradeStatus {
29669        fn default() -> Self {
29670            use std::convert::From;
29671            Self::from(0)
29672        }
29673    }
29674
29675    impl std::fmt::Display for AutoUpgradeStatus {
29676        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29677            wkt::internal::display_enum(f, self.name(), self.value())
29678        }
29679    }
29680
29681    impl std::convert::From<i32> for AutoUpgradeStatus {
29682        fn from(value: i32) -> Self {
29683            match value {
29684                0 => Self::Unknown,
29685                1 => Self::Active,
29686                2 => Self::MinorUpgradePaused,
29687                3 => Self::UpgradePaused,
29688                _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
29689                    wkt::internal::UnknownEnumValue::Integer(value),
29690                )),
29691            }
29692        }
29693    }
29694
29695    impl std::convert::From<&str> for AutoUpgradeStatus {
29696        fn from(value: &str) -> Self {
29697            use std::string::ToString;
29698            match value {
29699                "UNKNOWN" => Self::Unknown,
29700                "ACTIVE" => Self::Active,
29701                "MINOR_UPGRADE_PAUSED" => Self::MinorUpgradePaused,
29702                "UPGRADE_PAUSED" => Self::UpgradePaused,
29703                _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
29704                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29705                )),
29706            }
29707        }
29708    }
29709
29710    impl serde::ser::Serialize for AutoUpgradeStatus {
29711        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29712        where
29713            S: serde::Serializer,
29714        {
29715            match self {
29716                Self::Unknown => serializer.serialize_i32(0),
29717                Self::Active => serializer.serialize_i32(1),
29718                Self::MinorUpgradePaused => serializer.serialize_i32(2),
29719                Self::UpgradePaused => serializer.serialize_i32(3),
29720                Self::UnknownValue(u) => u.0.serialize(serializer),
29721            }
29722        }
29723    }
29724
29725    impl<'de> serde::de::Deserialize<'de> for AutoUpgradeStatus {
29726        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29727        where
29728            D: serde::Deserializer<'de>,
29729        {
29730            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoUpgradeStatus>::new(
29731                ".google.container.v1.NodePoolUpgradeInfo.AutoUpgradeStatus",
29732            ))
29733        }
29734    }
29735
29736    /// AutoUpgradePausedReason indicates the reason for auto upgrade paused
29737    /// status.
29738    ///
29739    /// # Working with unknown values
29740    ///
29741    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29742    /// additional enum variants at any time. Adding new variants is not considered
29743    /// a breaking change. Applications should write their code in anticipation of:
29744    ///
29745    /// - New values appearing in future releases of the client library, **and**
29746    /// - New values received dynamically, without application changes.
29747    ///
29748    /// Please consult the [Working with enums] section in the user guide for some
29749    /// guidelines.
29750    ///
29751    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29752    #[derive(Clone, Debug, PartialEq)]
29753    #[non_exhaustive]
29754    pub enum AutoUpgradePausedReason {
29755        /// AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason.
29756        Unspecified,
29757        /// MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance
29758        /// window.
29759        MaintenanceWindow,
29760        /// MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a
29761        /// maintenance exclusion with scope NO_UPGRADES.
29762        MaintenanceExclusionNoUpgrades,
29763        /// MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a
29764        /// maintenance exclusion with scope NO_MINOR_UPGRADES.
29765        MaintenanceExclusionNoMinorUpgrades,
29766        /// SYSTEM_CONFIG indicates the cluster upgrade is paused by system config.
29767        SystemConfig,
29768        /// If set, the enum was initialized with an unknown value.
29769        ///
29770        /// Applications can examine the value using [AutoUpgradePausedReason::value] or
29771        /// [AutoUpgradePausedReason::name].
29772        UnknownValue(auto_upgrade_paused_reason::UnknownValue),
29773    }
29774
29775    #[doc(hidden)]
29776    pub mod auto_upgrade_paused_reason {
29777        #[allow(unused_imports)]
29778        use super::*;
29779        #[derive(Clone, Debug, PartialEq)]
29780        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29781    }
29782
29783    impl AutoUpgradePausedReason {
29784        /// Gets the enum value.
29785        ///
29786        /// Returns `None` if the enum contains an unknown value deserialized from
29787        /// the string representation of enums.
29788        pub fn value(&self) -> std::option::Option<i32> {
29789            match self {
29790                Self::Unspecified => std::option::Option::Some(0),
29791                Self::MaintenanceWindow => std::option::Option::Some(1),
29792                Self::MaintenanceExclusionNoUpgrades => std::option::Option::Some(2),
29793                Self::MaintenanceExclusionNoMinorUpgrades => std::option::Option::Some(3),
29794                Self::SystemConfig => std::option::Option::Some(4),
29795                Self::UnknownValue(u) => u.0.value(),
29796            }
29797        }
29798
29799        /// Gets the enum value as a string.
29800        ///
29801        /// Returns `None` if the enum contains an unknown value deserialized from
29802        /// the integer representation of enums.
29803        pub fn name(&self) -> std::option::Option<&str> {
29804            match self {
29805                Self::Unspecified => {
29806                    std::option::Option::Some("AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED")
29807                }
29808                Self::MaintenanceWindow => std::option::Option::Some("MAINTENANCE_WINDOW"),
29809                Self::MaintenanceExclusionNoUpgrades => {
29810                    std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_UPGRADES")
29811                }
29812                Self::MaintenanceExclusionNoMinorUpgrades => {
29813                    std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES")
29814                }
29815                Self::SystemConfig => std::option::Option::Some("SYSTEM_CONFIG"),
29816                Self::UnknownValue(u) => u.0.name(),
29817            }
29818        }
29819    }
29820
29821    impl std::default::Default for AutoUpgradePausedReason {
29822        fn default() -> Self {
29823            use std::convert::From;
29824            Self::from(0)
29825        }
29826    }
29827
29828    impl std::fmt::Display for AutoUpgradePausedReason {
29829        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29830            wkt::internal::display_enum(f, self.name(), self.value())
29831        }
29832    }
29833
29834    impl std::convert::From<i32> for AutoUpgradePausedReason {
29835        fn from(value: i32) -> Self {
29836            match value {
29837                0 => Self::Unspecified,
29838                1 => Self::MaintenanceWindow,
29839                2 => Self::MaintenanceExclusionNoUpgrades,
29840                3 => Self::MaintenanceExclusionNoMinorUpgrades,
29841                4 => Self::SystemConfig,
29842                _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
29843                    wkt::internal::UnknownEnumValue::Integer(value),
29844                )),
29845            }
29846        }
29847    }
29848
29849    impl std::convert::From<&str> for AutoUpgradePausedReason {
29850        fn from(value: &str) -> Self {
29851            use std::string::ToString;
29852            match value {
29853                "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED" => Self::Unspecified,
29854                "MAINTENANCE_WINDOW" => Self::MaintenanceWindow,
29855                "MAINTENANCE_EXCLUSION_NO_UPGRADES" => Self::MaintenanceExclusionNoUpgrades,
29856                "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES" => {
29857                    Self::MaintenanceExclusionNoMinorUpgrades
29858                }
29859                "SYSTEM_CONFIG" => Self::SystemConfig,
29860                _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
29861                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29862                )),
29863            }
29864        }
29865    }
29866
29867    impl serde::ser::Serialize for AutoUpgradePausedReason {
29868        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29869        where
29870            S: serde::Serializer,
29871        {
29872            match self {
29873                Self::Unspecified => serializer.serialize_i32(0),
29874                Self::MaintenanceWindow => serializer.serialize_i32(1),
29875                Self::MaintenanceExclusionNoUpgrades => serializer.serialize_i32(2),
29876                Self::MaintenanceExclusionNoMinorUpgrades => serializer.serialize_i32(3),
29877                Self::SystemConfig => serializer.serialize_i32(4),
29878                Self::UnknownValue(u) => u.0.serialize(serializer),
29879            }
29880        }
29881    }
29882
29883    impl<'de> serde::de::Deserialize<'de> for AutoUpgradePausedReason {
29884        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29885        where
29886            D: serde::Deserializer<'de>,
29887        {
29888            deserializer.deserialize_any(
29889                wkt::internal::EnumVisitor::<AutoUpgradePausedReason>::new(
29890                    ".google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReason",
29891                ),
29892            )
29893        }
29894    }
29895}
29896
29897/// GkeAutoUpgradeConfig is the configuration for GKE auto upgrades.
29898#[derive(Clone, Default, PartialEq)]
29899#[non_exhaustive]
29900pub struct GkeAutoUpgradeConfig {
29901    /// PatchMode specifies how auto upgrade patch builds should be
29902    /// selected.
29903    pub patch_mode: crate::model::gke_auto_upgrade_config::PatchMode,
29904
29905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29906}
29907
29908impl GkeAutoUpgradeConfig {
29909    pub fn new() -> Self {
29910        std::default::Default::default()
29911    }
29912
29913    /// Sets the value of [patch_mode][crate::model::GkeAutoUpgradeConfig::patch_mode].
29914    pub fn set_patch_mode<
29915        T: std::convert::Into<crate::model::gke_auto_upgrade_config::PatchMode>,
29916    >(
29917        mut self,
29918        v: T,
29919    ) -> Self {
29920        self.patch_mode = v.into();
29921        self
29922    }
29923}
29924
29925impl wkt::message::Message for GkeAutoUpgradeConfig {
29926    fn typename() -> &'static str {
29927        "type.googleapis.com/google.container.v1.GkeAutoUpgradeConfig"
29928    }
29929}
29930
29931/// Defines additional types related to [GkeAutoUpgradeConfig].
29932pub mod gke_auto_upgrade_config {
29933    #[allow(unused_imports)]
29934    use super::*;
29935
29936    /// PatchMode specifies how auto upgrade patch builds should be
29937    /// selected.
29938    ///
29939    /// # Working with unknown values
29940    ///
29941    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29942    /// additional enum variants at any time. Adding new variants is not considered
29943    /// a breaking change. Applications should write their code in anticipation of:
29944    ///
29945    /// - New values appearing in future releases of the client library, **and**
29946    /// - New values received dynamically, without application changes.
29947    ///
29948    /// Please consult the [Working with enums] section in the user guide for some
29949    /// guidelines.
29950    ///
29951    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29952    #[derive(Clone, Debug, PartialEq)]
29953    #[non_exhaustive]
29954    pub enum PatchMode {
29955        /// PATCH_MODE_UNSPECIFIED defaults to using the upgrade target from the
29956        /// channel's patch upgrade targets as the upgrade target for the
29957        /// version.
29958        Unspecified,
29959        /// ACCELERATED denotes that the latest patch build in the channel should be
29960        /// used as the upgrade target for the version.
29961        Accelerated,
29962        /// If set, the enum was initialized with an unknown value.
29963        ///
29964        /// Applications can examine the value using [PatchMode::value] or
29965        /// [PatchMode::name].
29966        UnknownValue(patch_mode::UnknownValue),
29967    }
29968
29969    #[doc(hidden)]
29970    pub mod patch_mode {
29971        #[allow(unused_imports)]
29972        use super::*;
29973        #[derive(Clone, Debug, PartialEq)]
29974        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29975    }
29976
29977    impl PatchMode {
29978        /// Gets the enum value.
29979        ///
29980        /// Returns `None` if the enum contains an unknown value deserialized from
29981        /// the string representation of enums.
29982        pub fn value(&self) -> std::option::Option<i32> {
29983            match self {
29984                Self::Unspecified => std::option::Option::Some(0),
29985                Self::Accelerated => std::option::Option::Some(1),
29986                Self::UnknownValue(u) => u.0.value(),
29987            }
29988        }
29989
29990        /// Gets the enum value as a string.
29991        ///
29992        /// Returns `None` if the enum contains an unknown value deserialized from
29993        /// the integer representation of enums.
29994        pub fn name(&self) -> std::option::Option<&str> {
29995            match self {
29996                Self::Unspecified => std::option::Option::Some("PATCH_MODE_UNSPECIFIED"),
29997                Self::Accelerated => std::option::Option::Some("ACCELERATED"),
29998                Self::UnknownValue(u) => u.0.name(),
29999            }
30000        }
30001    }
30002
30003    impl std::default::Default for PatchMode {
30004        fn default() -> Self {
30005            use std::convert::From;
30006            Self::from(0)
30007        }
30008    }
30009
30010    impl std::fmt::Display for PatchMode {
30011        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30012            wkt::internal::display_enum(f, self.name(), self.value())
30013        }
30014    }
30015
30016    impl std::convert::From<i32> for PatchMode {
30017        fn from(value: i32) -> Self {
30018            match value {
30019                0 => Self::Unspecified,
30020                1 => Self::Accelerated,
30021                _ => Self::UnknownValue(patch_mode::UnknownValue(
30022                    wkt::internal::UnknownEnumValue::Integer(value),
30023                )),
30024            }
30025        }
30026    }
30027
30028    impl std::convert::From<&str> for PatchMode {
30029        fn from(value: &str) -> Self {
30030            use std::string::ToString;
30031            match value {
30032                "PATCH_MODE_UNSPECIFIED" => Self::Unspecified,
30033                "ACCELERATED" => Self::Accelerated,
30034                _ => Self::UnknownValue(patch_mode::UnknownValue(
30035                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30036                )),
30037            }
30038        }
30039    }
30040
30041    impl serde::ser::Serialize for PatchMode {
30042        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30043        where
30044            S: serde::Serializer,
30045        {
30046            match self {
30047                Self::Unspecified => serializer.serialize_i32(0),
30048                Self::Accelerated => serializer.serialize_i32(1),
30049                Self::UnknownValue(u) => u.0.serialize(serializer),
30050            }
30051        }
30052    }
30053
30054    impl<'de> serde::de::Deserialize<'de> for PatchMode {
30055        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30056        where
30057            D: serde::Deserializer<'de>,
30058        {
30059            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PatchMode>::new(
30060                ".google.container.v1.GkeAutoUpgradeConfig.PatchMode",
30061            ))
30062        }
30063    }
30064}
30065
30066/// NetworkTierConfig contains network tier information.
30067#[derive(Clone, Default, PartialEq)]
30068#[non_exhaustive]
30069pub struct NetworkTierConfig {
30070    /// Network tier configuration.
30071    pub network_tier: crate::model::network_tier_config::NetworkTier,
30072
30073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30074}
30075
30076impl NetworkTierConfig {
30077    pub fn new() -> Self {
30078        std::default::Default::default()
30079    }
30080
30081    /// Sets the value of [network_tier][crate::model::NetworkTierConfig::network_tier].
30082    pub fn set_network_tier<
30083        T: std::convert::Into<crate::model::network_tier_config::NetworkTier>,
30084    >(
30085        mut self,
30086        v: T,
30087    ) -> Self {
30088        self.network_tier = v.into();
30089        self
30090    }
30091}
30092
30093impl wkt::message::Message for NetworkTierConfig {
30094    fn typename() -> &'static str {
30095        "type.googleapis.com/google.container.v1.NetworkTierConfig"
30096    }
30097}
30098
30099/// Defines additional types related to [NetworkTierConfig].
30100pub mod network_tier_config {
30101    #[allow(unused_imports)]
30102    use super::*;
30103
30104    /// Network tier configuration.
30105    ///
30106    /// # Working with unknown values
30107    ///
30108    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30109    /// additional enum variants at any time. Adding new variants is not considered
30110    /// a breaking change. Applications should write their code in anticipation of:
30111    ///
30112    /// - New values appearing in future releases of the client library, **and**
30113    /// - New values received dynamically, without application changes.
30114    ///
30115    /// Please consult the [Working with enums] section in the user guide for some
30116    /// guidelines.
30117    ///
30118    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30119    #[derive(Clone, Debug, PartialEq)]
30120    #[non_exhaustive]
30121    pub enum NetworkTier {
30122        /// By default, use project-level configuration. When unspecified, the
30123        /// behavior defaults to NETWORK_TIER_DEFAULT. For cluster updates, this
30124        /// implies no action (no-op).
30125        Unspecified,
30126        /// Default network tier. Use project-level configuration. User can specify
30127        /// this value, meaning they want to keep the same behaviour as before
30128        /// cluster level network tier configuration is introduced. This field
30129        /// ensures backward compatibility for the network tier of cluster resources,
30130        /// such as node pools and load balancers, for their external IP addresses.
30131        Default,
30132        /// Premium network tier.
30133        Premium,
30134        /// Standard network tier.
30135        Standard,
30136        /// If set, the enum was initialized with an unknown value.
30137        ///
30138        /// Applications can examine the value using [NetworkTier::value] or
30139        /// [NetworkTier::name].
30140        UnknownValue(network_tier::UnknownValue),
30141    }
30142
30143    #[doc(hidden)]
30144    pub mod network_tier {
30145        #[allow(unused_imports)]
30146        use super::*;
30147        #[derive(Clone, Debug, PartialEq)]
30148        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30149    }
30150
30151    impl NetworkTier {
30152        /// Gets the enum value.
30153        ///
30154        /// Returns `None` if the enum contains an unknown value deserialized from
30155        /// the string representation of enums.
30156        pub fn value(&self) -> std::option::Option<i32> {
30157            match self {
30158                Self::Unspecified => std::option::Option::Some(0),
30159                Self::Default => std::option::Option::Some(1),
30160                Self::Premium => std::option::Option::Some(2),
30161                Self::Standard => std::option::Option::Some(3),
30162                Self::UnknownValue(u) => u.0.value(),
30163            }
30164        }
30165
30166        /// Gets the enum value as a string.
30167        ///
30168        /// Returns `None` if the enum contains an unknown value deserialized from
30169        /// the integer representation of enums.
30170        pub fn name(&self) -> std::option::Option<&str> {
30171            match self {
30172                Self::Unspecified => std::option::Option::Some("NETWORK_TIER_UNSPECIFIED"),
30173                Self::Default => std::option::Option::Some("NETWORK_TIER_DEFAULT"),
30174                Self::Premium => std::option::Option::Some("NETWORK_TIER_PREMIUM"),
30175                Self::Standard => std::option::Option::Some("NETWORK_TIER_STANDARD"),
30176                Self::UnknownValue(u) => u.0.name(),
30177            }
30178        }
30179    }
30180
30181    impl std::default::Default for NetworkTier {
30182        fn default() -> Self {
30183            use std::convert::From;
30184            Self::from(0)
30185        }
30186    }
30187
30188    impl std::fmt::Display for NetworkTier {
30189        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30190            wkt::internal::display_enum(f, self.name(), self.value())
30191        }
30192    }
30193
30194    impl std::convert::From<i32> for NetworkTier {
30195        fn from(value: i32) -> Self {
30196            match value {
30197                0 => Self::Unspecified,
30198                1 => Self::Default,
30199                2 => Self::Premium,
30200                3 => Self::Standard,
30201                _ => Self::UnknownValue(network_tier::UnknownValue(
30202                    wkt::internal::UnknownEnumValue::Integer(value),
30203                )),
30204            }
30205        }
30206    }
30207
30208    impl std::convert::From<&str> for NetworkTier {
30209        fn from(value: &str) -> Self {
30210            use std::string::ToString;
30211            match value {
30212                "NETWORK_TIER_UNSPECIFIED" => Self::Unspecified,
30213                "NETWORK_TIER_DEFAULT" => Self::Default,
30214                "NETWORK_TIER_PREMIUM" => Self::Premium,
30215                "NETWORK_TIER_STANDARD" => Self::Standard,
30216                _ => Self::UnknownValue(network_tier::UnknownValue(
30217                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30218                )),
30219            }
30220        }
30221    }
30222
30223    impl serde::ser::Serialize for NetworkTier {
30224        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30225        where
30226            S: serde::Serializer,
30227        {
30228            match self {
30229                Self::Unspecified => serializer.serialize_i32(0),
30230                Self::Default => serializer.serialize_i32(1),
30231                Self::Premium => serializer.serialize_i32(2),
30232                Self::Standard => serializer.serialize_i32(3),
30233                Self::UnknownValue(u) => u.0.serialize(serializer),
30234            }
30235        }
30236    }
30237
30238    impl<'de> serde::de::Deserialize<'de> for NetworkTier {
30239        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30240        where
30241            D: serde::Deserializer<'de>,
30242        {
30243            deserializer.deserialize_any(wkt::internal::EnumVisitor::<NetworkTier>::new(
30244                ".google.container.v1.NetworkTierConfig.NetworkTier",
30245            ))
30246        }
30247    }
30248}
30249
30250/// PrivateIPv6GoogleAccess controls whether and how the pods can communicate
30251/// with Google Services through gRPC over IPv6.
30252///
30253/// # Working with unknown values
30254///
30255/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30256/// additional enum variants at any time. Adding new variants is not considered
30257/// a breaking change. Applications should write their code in anticipation of:
30258///
30259/// - New values appearing in future releases of the client library, **and**
30260/// - New values received dynamically, without application changes.
30261///
30262/// Please consult the [Working with enums] section in the user guide for some
30263/// guidelines.
30264///
30265/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30266#[derive(Clone, Debug, PartialEq)]
30267#[non_exhaustive]
30268pub enum PrivateIPv6GoogleAccess {
30269    /// Default value. Same as DISABLED
30270    PrivateIpv6GoogleAccessUnspecified,
30271    /// No private access to or from Google Services
30272    PrivateIpv6GoogleAccessDisabled,
30273    /// Enables private IPv6 access to Google Services from GKE
30274    PrivateIpv6GoogleAccessToGoogle,
30275    /// Enables private IPv6 access to and from Google Services
30276    PrivateIpv6GoogleAccessBidirectional,
30277    /// If set, the enum was initialized with an unknown value.
30278    ///
30279    /// Applications can examine the value using [PrivateIPv6GoogleAccess::value] or
30280    /// [PrivateIPv6GoogleAccess::name].
30281    UnknownValue(private_i_pv_6_google_access::UnknownValue),
30282}
30283
30284#[doc(hidden)]
30285pub mod private_i_pv_6_google_access {
30286    #[allow(unused_imports)]
30287    use super::*;
30288    #[derive(Clone, Debug, PartialEq)]
30289    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30290}
30291
30292impl PrivateIPv6GoogleAccess {
30293    /// Gets the enum value.
30294    ///
30295    /// Returns `None` if the enum contains an unknown value deserialized from
30296    /// the string representation of enums.
30297    pub fn value(&self) -> std::option::Option<i32> {
30298        match self {
30299            Self::PrivateIpv6GoogleAccessUnspecified => std::option::Option::Some(0),
30300            Self::PrivateIpv6GoogleAccessDisabled => std::option::Option::Some(1),
30301            Self::PrivateIpv6GoogleAccessToGoogle => std::option::Option::Some(2),
30302            Self::PrivateIpv6GoogleAccessBidirectional => std::option::Option::Some(3),
30303            Self::UnknownValue(u) => u.0.value(),
30304        }
30305    }
30306
30307    /// Gets the enum value as a string.
30308    ///
30309    /// Returns `None` if the enum contains an unknown value deserialized from
30310    /// the integer representation of enums.
30311    pub fn name(&self) -> std::option::Option<&str> {
30312        match self {
30313            Self::PrivateIpv6GoogleAccessUnspecified => {
30314                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED")
30315            }
30316            Self::PrivateIpv6GoogleAccessDisabled => {
30317                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED")
30318            }
30319            Self::PrivateIpv6GoogleAccessToGoogle => {
30320                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE")
30321            }
30322            Self::PrivateIpv6GoogleAccessBidirectional => {
30323                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL")
30324            }
30325            Self::UnknownValue(u) => u.0.name(),
30326        }
30327    }
30328}
30329
30330impl std::default::Default for PrivateIPv6GoogleAccess {
30331    fn default() -> Self {
30332        use std::convert::From;
30333        Self::from(0)
30334    }
30335}
30336
30337impl std::fmt::Display for PrivateIPv6GoogleAccess {
30338    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30339        wkt::internal::display_enum(f, self.name(), self.value())
30340    }
30341}
30342
30343impl std::convert::From<i32> for PrivateIPv6GoogleAccess {
30344    fn from(value: i32) -> Self {
30345        match value {
30346            0 => Self::PrivateIpv6GoogleAccessUnspecified,
30347            1 => Self::PrivateIpv6GoogleAccessDisabled,
30348            2 => Self::PrivateIpv6GoogleAccessToGoogle,
30349            3 => Self::PrivateIpv6GoogleAccessBidirectional,
30350            _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
30351                wkt::internal::UnknownEnumValue::Integer(value),
30352            )),
30353        }
30354    }
30355}
30356
30357impl std::convert::From<&str> for PrivateIPv6GoogleAccess {
30358    fn from(value: &str) -> Self {
30359        use std::string::ToString;
30360        match value {
30361            "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" => Self::PrivateIpv6GoogleAccessUnspecified,
30362            "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" => Self::PrivateIpv6GoogleAccessDisabled,
30363            "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" => Self::PrivateIpv6GoogleAccessToGoogle,
30364            "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" => {
30365                Self::PrivateIpv6GoogleAccessBidirectional
30366            }
30367            _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
30368                wkt::internal::UnknownEnumValue::String(value.to_string()),
30369            )),
30370        }
30371    }
30372}
30373
30374impl serde::ser::Serialize for PrivateIPv6GoogleAccess {
30375    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30376    where
30377        S: serde::Serializer,
30378    {
30379        match self {
30380            Self::PrivateIpv6GoogleAccessUnspecified => serializer.serialize_i32(0),
30381            Self::PrivateIpv6GoogleAccessDisabled => serializer.serialize_i32(1),
30382            Self::PrivateIpv6GoogleAccessToGoogle => serializer.serialize_i32(2),
30383            Self::PrivateIpv6GoogleAccessBidirectional => serializer.serialize_i32(3),
30384            Self::UnknownValue(u) => u.0.serialize(serializer),
30385        }
30386    }
30387}
30388
30389impl<'de> serde::de::Deserialize<'de> for PrivateIPv6GoogleAccess {
30390    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30391    where
30392        D: serde::Deserializer<'de>,
30393    {
30394        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PrivateIPv6GoogleAccess>::new(
30395            ".google.container.v1.PrivateIPv6GoogleAccess",
30396        ))
30397    }
30398}
30399
30400/// UpgradeResourceType is the resource type that is upgrading. It is used
30401/// in upgrade notifications.
30402///
30403/// # Working with unknown values
30404///
30405/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30406/// additional enum variants at any time. Adding new variants is not considered
30407/// a breaking change. Applications should write their code in anticipation of:
30408///
30409/// - New values appearing in future releases of the client library, **and**
30410/// - New values received dynamically, without application changes.
30411///
30412/// Please consult the [Working with enums] section in the user guide for some
30413/// guidelines.
30414///
30415/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30416#[derive(Clone, Debug, PartialEq)]
30417#[non_exhaustive]
30418pub enum UpgradeResourceType {
30419    /// Default value. This shouldn't be used.
30420    Unspecified,
30421    /// Master / control plane
30422    Master,
30423    /// Node pool
30424    NodePool,
30425    /// If set, the enum was initialized with an unknown value.
30426    ///
30427    /// Applications can examine the value using [UpgradeResourceType::value] or
30428    /// [UpgradeResourceType::name].
30429    UnknownValue(upgrade_resource_type::UnknownValue),
30430}
30431
30432#[doc(hidden)]
30433pub mod upgrade_resource_type {
30434    #[allow(unused_imports)]
30435    use super::*;
30436    #[derive(Clone, Debug, PartialEq)]
30437    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30438}
30439
30440impl UpgradeResourceType {
30441    /// Gets the enum value.
30442    ///
30443    /// Returns `None` if the enum contains an unknown value deserialized from
30444    /// the string representation of enums.
30445    pub fn value(&self) -> std::option::Option<i32> {
30446        match self {
30447            Self::Unspecified => std::option::Option::Some(0),
30448            Self::Master => std::option::Option::Some(1),
30449            Self::NodePool => std::option::Option::Some(2),
30450            Self::UnknownValue(u) => u.0.value(),
30451        }
30452    }
30453
30454    /// Gets the enum value as a string.
30455    ///
30456    /// Returns `None` if the enum contains an unknown value deserialized from
30457    /// the integer representation of enums.
30458    pub fn name(&self) -> std::option::Option<&str> {
30459        match self {
30460            Self::Unspecified => std::option::Option::Some("UPGRADE_RESOURCE_TYPE_UNSPECIFIED"),
30461            Self::Master => std::option::Option::Some("MASTER"),
30462            Self::NodePool => std::option::Option::Some("NODE_POOL"),
30463            Self::UnknownValue(u) => u.0.name(),
30464        }
30465    }
30466}
30467
30468impl std::default::Default for UpgradeResourceType {
30469    fn default() -> Self {
30470        use std::convert::From;
30471        Self::from(0)
30472    }
30473}
30474
30475impl std::fmt::Display for UpgradeResourceType {
30476    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30477        wkt::internal::display_enum(f, self.name(), self.value())
30478    }
30479}
30480
30481impl std::convert::From<i32> for UpgradeResourceType {
30482    fn from(value: i32) -> Self {
30483        match value {
30484            0 => Self::Unspecified,
30485            1 => Self::Master,
30486            2 => Self::NodePool,
30487            _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
30488                wkt::internal::UnknownEnumValue::Integer(value),
30489            )),
30490        }
30491    }
30492}
30493
30494impl std::convert::From<&str> for UpgradeResourceType {
30495    fn from(value: &str) -> Self {
30496        use std::string::ToString;
30497        match value {
30498            "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
30499            "MASTER" => Self::Master,
30500            "NODE_POOL" => Self::NodePool,
30501            _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
30502                wkt::internal::UnknownEnumValue::String(value.to_string()),
30503            )),
30504        }
30505    }
30506}
30507
30508impl serde::ser::Serialize for UpgradeResourceType {
30509    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30510    where
30511        S: serde::Serializer,
30512    {
30513        match self {
30514            Self::Unspecified => serializer.serialize_i32(0),
30515            Self::Master => serializer.serialize_i32(1),
30516            Self::NodePool => serializer.serialize_i32(2),
30517            Self::UnknownValue(u) => u.0.serialize(serializer),
30518        }
30519    }
30520}
30521
30522impl<'de> serde::de::Deserialize<'de> for UpgradeResourceType {
30523    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30524    where
30525        D: serde::Deserializer<'de>,
30526    {
30527        deserializer.deserialize_any(wkt::internal::EnumVisitor::<UpgradeResourceType>::new(
30528            ".google.container.v1.UpgradeResourceType",
30529        ))
30530    }
30531}
30532
30533/// The datapath provider selects the implementation of the Kubernetes networking
30534/// model for service resolution and network policy enforcement.
30535///
30536/// # Working with unknown values
30537///
30538/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30539/// additional enum variants at any time. Adding new variants is not considered
30540/// a breaking change. Applications should write their code in anticipation of:
30541///
30542/// - New values appearing in future releases of the client library, **and**
30543/// - New values received dynamically, without application changes.
30544///
30545/// Please consult the [Working with enums] section in the user guide for some
30546/// guidelines.
30547///
30548/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30549#[derive(Clone, Debug, PartialEq)]
30550#[non_exhaustive]
30551pub enum DatapathProvider {
30552    /// Default value.
30553    Unspecified,
30554    /// Use the IPTables implementation based on kube-proxy.
30555    LegacyDatapath,
30556    /// Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE
30557    /// Dataplane V2
30558    /// documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2)
30559    /// for more.
30560    AdvancedDatapath,
30561    /// If set, the enum was initialized with an unknown value.
30562    ///
30563    /// Applications can examine the value using [DatapathProvider::value] or
30564    /// [DatapathProvider::name].
30565    UnknownValue(datapath_provider::UnknownValue),
30566}
30567
30568#[doc(hidden)]
30569pub mod datapath_provider {
30570    #[allow(unused_imports)]
30571    use super::*;
30572    #[derive(Clone, Debug, PartialEq)]
30573    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30574}
30575
30576impl DatapathProvider {
30577    /// Gets the enum value.
30578    ///
30579    /// Returns `None` if the enum contains an unknown value deserialized from
30580    /// the string representation of enums.
30581    pub fn value(&self) -> std::option::Option<i32> {
30582        match self {
30583            Self::Unspecified => std::option::Option::Some(0),
30584            Self::LegacyDatapath => std::option::Option::Some(1),
30585            Self::AdvancedDatapath => std::option::Option::Some(2),
30586            Self::UnknownValue(u) => u.0.value(),
30587        }
30588    }
30589
30590    /// Gets the enum value as a string.
30591    ///
30592    /// Returns `None` if the enum contains an unknown value deserialized from
30593    /// the integer representation of enums.
30594    pub fn name(&self) -> std::option::Option<&str> {
30595        match self {
30596            Self::Unspecified => std::option::Option::Some("DATAPATH_PROVIDER_UNSPECIFIED"),
30597            Self::LegacyDatapath => std::option::Option::Some("LEGACY_DATAPATH"),
30598            Self::AdvancedDatapath => std::option::Option::Some("ADVANCED_DATAPATH"),
30599            Self::UnknownValue(u) => u.0.name(),
30600        }
30601    }
30602}
30603
30604impl std::default::Default for DatapathProvider {
30605    fn default() -> Self {
30606        use std::convert::From;
30607        Self::from(0)
30608    }
30609}
30610
30611impl std::fmt::Display for DatapathProvider {
30612    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30613        wkt::internal::display_enum(f, self.name(), self.value())
30614    }
30615}
30616
30617impl std::convert::From<i32> for DatapathProvider {
30618    fn from(value: i32) -> Self {
30619        match value {
30620            0 => Self::Unspecified,
30621            1 => Self::LegacyDatapath,
30622            2 => Self::AdvancedDatapath,
30623            _ => Self::UnknownValue(datapath_provider::UnknownValue(
30624                wkt::internal::UnknownEnumValue::Integer(value),
30625            )),
30626        }
30627    }
30628}
30629
30630impl std::convert::From<&str> for DatapathProvider {
30631    fn from(value: &str) -> Self {
30632        use std::string::ToString;
30633        match value {
30634            "DATAPATH_PROVIDER_UNSPECIFIED" => Self::Unspecified,
30635            "LEGACY_DATAPATH" => Self::LegacyDatapath,
30636            "ADVANCED_DATAPATH" => Self::AdvancedDatapath,
30637            _ => Self::UnknownValue(datapath_provider::UnknownValue(
30638                wkt::internal::UnknownEnumValue::String(value.to_string()),
30639            )),
30640        }
30641    }
30642}
30643
30644impl serde::ser::Serialize for DatapathProvider {
30645    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30646    where
30647        S: serde::Serializer,
30648    {
30649        match self {
30650            Self::Unspecified => serializer.serialize_i32(0),
30651            Self::LegacyDatapath => serializer.serialize_i32(1),
30652            Self::AdvancedDatapath => serializer.serialize_i32(2),
30653            Self::UnknownValue(u) => u.0.serialize(serializer),
30654        }
30655    }
30656}
30657
30658impl<'de> serde::de::Deserialize<'de> for DatapathProvider {
30659    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30660    where
30661        D: serde::Deserializer<'de>,
30662    {
30663        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatapathProvider>::new(
30664            ".google.container.v1.DatapathProvider",
30665        ))
30666    }
30667}
30668
30669/// Strategy used for node pool update.
30670///
30671/// # Working with unknown values
30672///
30673/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30674/// additional enum variants at any time. Adding new variants is not considered
30675/// a breaking change. Applications should write their code in anticipation of:
30676///
30677/// - New values appearing in future releases of the client library, **and**
30678/// - New values received dynamically, without application changes.
30679///
30680/// Please consult the [Working with enums] section in the user guide for some
30681/// guidelines.
30682///
30683/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30684#[derive(Clone, Debug, PartialEq)]
30685#[non_exhaustive]
30686pub enum NodePoolUpdateStrategy {
30687    /// Default value if unset. GKE internally defaults the update strategy to
30688    /// SURGE for unspecified strategies.
30689    Unspecified,
30690    /// blue-green upgrade.
30691    BlueGreen,
30692    /// SURGE is the traditional way of upgrade a node pool.
30693    /// max_surge and max_unavailable determines the level of upgrade parallelism.
30694    Surge,
30695    /// If set, the enum was initialized with an unknown value.
30696    ///
30697    /// Applications can examine the value using [NodePoolUpdateStrategy::value] or
30698    /// [NodePoolUpdateStrategy::name].
30699    UnknownValue(node_pool_update_strategy::UnknownValue),
30700}
30701
30702#[doc(hidden)]
30703pub mod node_pool_update_strategy {
30704    #[allow(unused_imports)]
30705    use super::*;
30706    #[derive(Clone, Debug, PartialEq)]
30707    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30708}
30709
30710impl NodePoolUpdateStrategy {
30711    /// Gets the enum value.
30712    ///
30713    /// Returns `None` if the enum contains an unknown value deserialized from
30714    /// the string representation of enums.
30715    pub fn value(&self) -> std::option::Option<i32> {
30716        match self {
30717            Self::Unspecified => std::option::Option::Some(0),
30718            Self::BlueGreen => std::option::Option::Some(2),
30719            Self::Surge => std::option::Option::Some(3),
30720            Self::UnknownValue(u) => u.0.value(),
30721        }
30722    }
30723
30724    /// Gets the enum value as a string.
30725    ///
30726    /// Returns `None` if the enum contains an unknown value deserialized from
30727    /// the integer representation of enums.
30728    pub fn name(&self) -> std::option::Option<&str> {
30729        match self {
30730            Self::Unspecified => std::option::Option::Some("NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"),
30731            Self::BlueGreen => std::option::Option::Some("BLUE_GREEN"),
30732            Self::Surge => std::option::Option::Some("SURGE"),
30733            Self::UnknownValue(u) => u.0.name(),
30734        }
30735    }
30736}
30737
30738impl std::default::Default for NodePoolUpdateStrategy {
30739    fn default() -> Self {
30740        use std::convert::From;
30741        Self::from(0)
30742    }
30743}
30744
30745impl std::fmt::Display for NodePoolUpdateStrategy {
30746    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30747        wkt::internal::display_enum(f, self.name(), self.value())
30748    }
30749}
30750
30751impl std::convert::From<i32> for NodePoolUpdateStrategy {
30752    fn from(value: i32) -> Self {
30753        match value {
30754            0 => Self::Unspecified,
30755            2 => Self::BlueGreen,
30756            3 => Self::Surge,
30757            _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
30758                wkt::internal::UnknownEnumValue::Integer(value),
30759            )),
30760        }
30761    }
30762}
30763
30764impl std::convert::From<&str> for NodePoolUpdateStrategy {
30765    fn from(value: &str) -> Self {
30766        use std::string::ToString;
30767        match value {
30768            "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED" => Self::Unspecified,
30769            "BLUE_GREEN" => Self::BlueGreen,
30770            "SURGE" => Self::Surge,
30771            _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
30772                wkt::internal::UnknownEnumValue::String(value.to_string()),
30773            )),
30774        }
30775    }
30776}
30777
30778impl serde::ser::Serialize for NodePoolUpdateStrategy {
30779    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30780    where
30781        S: serde::Serializer,
30782    {
30783        match self {
30784            Self::Unspecified => serializer.serialize_i32(0),
30785            Self::BlueGreen => serializer.serialize_i32(2),
30786            Self::Surge => serializer.serialize_i32(3),
30787            Self::UnknownValue(u) => u.0.serialize(serializer),
30788        }
30789    }
30790}
30791
30792impl<'de> serde::de::Deserialize<'de> for NodePoolUpdateStrategy {
30793    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30794    where
30795        D: serde::Deserializer<'de>,
30796    {
30797        deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodePoolUpdateStrategy>::new(
30798            ".google.container.v1.NodePoolUpdateStrategy",
30799        ))
30800    }
30801}
30802
30803/// Possible values for IP stack type
30804///
30805/// # Working with unknown values
30806///
30807/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30808/// additional enum variants at any time. Adding new variants is not considered
30809/// a breaking change. Applications should write their code in anticipation of:
30810///
30811/// - New values appearing in future releases of the client library, **and**
30812/// - New values received dynamically, without application changes.
30813///
30814/// Please consult the [Working with enums] section in the user guide for some
30815/// guidelines.
30816///
30817/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30818#[derive(Clone, Debug, PartialEq)]
30819#[non_exhaustive]
30820pub enum StackType {
30821    /// Default value, will be defaulted as IPV4 only
30822    Unspecified,
30823    /// Cluster is IPV4 only
30824    Ipv4,
30825    /// Cluster can use both IPv4 and IPv6
30826    Ipv4Ipv6,
30827    /// If set, the enum was initialized with an unknown value.
30828    ///
30829    /// Applications can examine the value using [StackType::value] or
30830    /// [StackType::name].
30831    UnknownValue(stack_type::UnknownValue),
30832}
30833
30834#[doc(hidden)]
30835pub mod stack_type {
30836    #[allow(unused_imports)]
30837    use super::*;
30838    #[derive(Clone, Debug, PartialEq)]
30839    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30840}
30841
30842impl StackType {
30843    /// Gets the enum value.
30844    ///
30845    /// Returns `None` if the enum contains an unknown value deserialized from
30846    /// the string representation of enums.
30847    pub fn value(&self) -> std::option::Option<i32> {
30848        match self {
30849            Self::Unspecified => std::option::Option::Some(0),
30850            Self::Ipv4 => std::option::Option::Some(1),
30851            Self::Ipv4Ipv6 => std::option::Option::Some(2),
30852            Self::UnknownValue(u) => u.0.value(),
30853        }
30854    }
30855
30856    /// Gets the enum value as a string.
30857    ///
30858    /// Returns `None` if the enum contains an unknown value deserialized from
30859    /// the integer representation of enums.
30860    pub fn name(&self) -> std::option::Option<&str> {
30861        match self {
30862            Self::Unspecified => std::option::Option::Some("STACK_TYPE_UNSPECIFIED"),
30863            Self::Ipv4 => std::option::Option::Some("IPV4"),
30864            Self::Ipv4Ipv6 => std::option::Option::Some("IPV4_IPV6"),
30865            Self::UnknownValue(u) => u.0.name(),
30866        }
30867    }
30868}
30869
30870impl std::default::Default for StackType {
30871    fn default() -> Self {
30872        use std::convert::From;
30873        Self::from(0)
30874    }
30875}
30876
30877impl std::fmt::Display for StackType {
30878    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30879        wkt::internal::display_enum(f, self.name(), self.value())
30880    }
30881}
30882
30883impl std::convert::From<i32> for StackType {
30884    fn from(value: i32) -> Self {
30885        match value {
30886            0 => Self::Unspecified,
30887            1 => Self::Ipv4,
30888            2 => Self::Ipv4Ipv6,
30889            _ => Self::UnknownValue(stack_type::UnknownValue(
30890                wkt::internal::UnknownEnumValue::Integer(value),
30891            )),
30892        }
30893    }
30894}
30895
30896impl std::convert::From<&str> for StackType {
30897    fn from(value: &str) -> Self {
30898        use std::string::ToString;
30899        match value {
30900            "STACK_TYPE_UNSPECIFIED" => Self::Unspecified,
30901            "IPV4" => Self::Ipv4,
30902            "IPV4_IPV6" => Self::Ipv4Ipv6,
30903            _ => Self::UnknownValue(stack_type::UnknownValue(
30904                wkt::internal::UnknownEnumValue::String(value.to_string()),
30905            )),
30906        }
30907    }
30908}
30909
30910impl serde::ser::Serialize for StackType {
30911    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30912    where
30913        S: serde::Serializer,
30914    {
30915        match self {
30916            Self::Unspecified => serializer.serialize_i32(0),
30917            Self::Ipv4 => serializer.serialize_i32(1),
30918            Self::Ipv4Ipv6 => serializer.serialize_i32(2),
30919            Self::UnknownValue(u) => u.0.serialize(serializer),
30920        }
30921    }
30922}
30923
30924impl<'de> serde::de::Deserialize<'de> for StackType {
30925    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30926    where
30927        D: serde::Deserializer<'de>,
30928    {
30929        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StackType>::new(
30930            ".google.container.v1.StackType",
30931        ))
30932    }
30933}
30934
30935/// Possible values for IPv6 access type
30936///
30937/// # Working with unknown values
30938///
30939/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30940/// additional enum variants at any time. Adding new variants is not considered
30941/// a breaking change. Applications should write their code in anticipation of:
30942///
30943/// - New values appearing in future releases of the client library, **and**
30944/// - New values received dynamically, without application changes.
30945///
30946/// Please consult the [Working with enums] section in the user guide for some
30947/// guidelines.
30948///
30949/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30950#[derive(Clone, Debug, PartialEq)]
30951#[non_exhaustive]
30952pub enum IPv6AccessType {
30953    /// Default value, will be defaulted as type external.
30954    Ipv6AccessTypeUnspecified,
30955    /// Access type internal (all v6 addresses are internal IPs)
30956    Internal,
30957    /// Access type external (all v6 addresses are external IPs)
30958    External,
30959    /// If set, the enum was initialized with an unknown value.
30960    ///
30961    /// Applications can examine the value using [IPv6AccessType::value] or
30962    /// [IPv6AccessType::name].
30963    UnknownValue(i_pv_6_access_type::UnknownValue),
30964}
30965
30966#[doc(hidden)]
30967pub mod i_pv_6_access_type {
30968    #[allow(unused_imports)]
30969    use super::*;
30970    #[derive(Clone, Debug, PartialEq)]
30971    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30972}
30973
30974impl IPv6AccessType {
30975    /// Gets the enum value.
30976    ///
30977    /// Returns `None` if the enum contains an unknown value deserialized from
30978    /// the string representation of enums.
30979    pub fn value(&self) -> std::option::Option<i32> {
30980        match self {
30981            Self::Ipv6AccessTypeUnspecified => std::option::Option::Some(0),
30982            Self::Internal => std::option::Option::Some(1),
30983            Self::External => std::option::Option::Some(2),
30984            Self::UnknownValue(u) => u.0.value(),
30985        }
30986    }
30987
30988    /// Gets the enum value as a string.
30989    ///
30990    /// Returns `None` if the enum contains an unknown value deserialized from
30991    /// the integer representation of enums.
30992    pub fn name(&self) -> std::option::Option<&str> {
30993        match self {
30994            Self::Ipv6AccessTypeUnspecified => {
30995                std::option::Option::Some("IPV6_ACCESS_TYPE_UNSPECIFIED")
30996            }
30997            Self::Internal => std::option::Option::Some("INTERNAL"),
30998            Self::External => std::option::Option::Some("EXTERNAL"),
30999            Self::UnknownValue(u) => u.0.name(),
31000        }
31001    }
31002}
31003
31004impl std::default::Default for IPv6AccessType {
31005    fn default() -> Self {
31006        use std::convert::From;
31007        Self::from(0)
31008    }
31009}
31010
31011impl std::fmt::Display for IPv6AccessType {
31012    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31013        wkt::internal::display_enum(f, self.name(), self.value())
31014    }
31015}
31016
31017impl std::convert::From<i32> for IPv6AccessType {
31018    fn from(value: i32) -> Self {
31019        match value {
31020            0 => Self::Ipv6AccessTypeUnspecified,
31021            1 => Self::Internal,
31022            2 => Self::External,
31023            _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
31024                wkt::internal::UnknownEnumValue::Integer(value),
31025            )),
31026        }
31027    }
31028}
31029
31030impl std::convert::From<&str> for IPv6AccessType {
31031    fn from(value: &str) -> Self {
31032        use std::string::ToString;
31033        match value {
31034            "IPV6_ACCESS_TYPE_UNSPECIFIED" => Self::Ipv6AccessTypeUnspecified,
31035            "INTERNAL" => Self::Internal,
31036            "EXTERNAL" => Self::External,
31037            _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
31038                wkt::internal::UnknownEnumValue::String(value.to_string()),
31039            )),
31040        }
31041    }
31042}
31043
31044impl serde::ser::Serialize for IPv6AccessType {
31045    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31046    where
31047        S: serde::Serializer,
31048    {
31049        match self {
31050            Self::Ipv6AccessTypeUnspecified => serializer.serialize_i32(0),
31051            Self::Internal => serializer.serialize_i32(1),
31052            Self::External => serializer.serialize_i32(2),
31053            Self::UnknownValue(u) => u.0.serialize(serializer),
31054        }
31055    }
31056}
31057
31058impl<'de> serde::de::Deserialize<'de> for IPv6AccessType {
31059    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31060    where
31061        D: serde::Deserializer<'de>,
31062    {
31063        deserializer.deserialize_any(wkt::internal::EnumVisitor::<IPv6AccessType>::new(
31064            ".google.container.v1.IPv6AccessType",
31065        ))
31066    }
31067}
31068
31069/// Options for in-transit encryption.
31070///
31071/// # Working with unknown values
31072///
31073/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31074/// additional enum variants at any time. Adding new variants is not considered
31075/// a breaking change. Applications should write their code in anticipation of:
31076///
31077/// - New values appearing in future releases of the client library, **and**
31078/// - New values received dynamically, without application changes.
31079///
31080/// Please consult the [Working with enums] section in the user guide for some
31081/// guidelines.
31082///
31083/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31084#[derive(Clone, Debug, PartialEq)]
31085#[non_exhaustive]
31086pub enum InTransitEncryptionConfig {
31087    /// Unspecified, will be inferred as default -
31088    /// IN_TRANSIT_ENCRYPTION_UNSPECIFIED.
31089    Unspecified,
31090    /// In-transit encryption is disabled.
31091    InTransitEncryptionDisabled,
31092    /// Data in-transit is encrypted using inter-node transparent encryption.
31093    InTransitEncryptionInterNodeTransparent,
31094    /// If set, the enum was initialized with an unknown value.
31095    ///
31096    /// Applications can examine the value using [InTransitEncryptionConfig::value] or
31097    /// [InTransitEncryptionConfig::name].
31098    UnknownValue(in_transit_encryption_config::UnknownValue),
31099}
31100
31101#[doc(hidden)]
31102pub mod in_transit_encryption_config {
31103    #[allow(unused_imports)]
31104    use super::*;
31105    #[derive(Clone, Debug, PartialEq)]
31106    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31107}
31108
31109impl InTransitEncryptionConfig {
31110    /// Gets the enum value.
31111    ///
31112    /// Returns `None` if the enum contains an unknown value deserialized from
31113    /// the string representation of enums.
31114    pub fn value(&self) -> std::option::Option<i32> {
31115        match self {
31116            Self::Unspecified => std::option::Option::Some(0),
31117            Self::InTransitEncryptionDisabled => std::option::Option::Some(1),
31118            Self::InTransitEncryptionInterNodeTransparent => std::option::Option::Some(2),
31119            Self::UnknownValue(u) => u.0.value(),
31120        }
31121    }
31122
31123    /// Gets the enum value as a string.
31124    ///
31125    /// Returns `None` if the enum contains an unknown value deserialized from
31126    /// the integer representation of enums.
31127    pub fn name(&self) -> std::option::Option<&str> {
31128        match self {
31129            Self::Unspecified => {
31130                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED")
31131            }
31132            Self::InTransitEncryptionDisabled => {
31133                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_DISABLED")
31134            }
31135            Self::InTransitEncryptionInterNodeTransparent => {
31136                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT")
31137            }
31138            Self::UnknownValue(u) => u.0.name(),
31139        }
31140    }
31141}
31142
31143impl std::default::Default for InTransitEncryptionConfig {
31144    fn default() -> Self {
31145        use std::convert::From;
31146        Self::from(0)
31147    }
31148}
31149
31150impl std::fmt::Display for InTransitEncryptionConfig {
31151    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31152        wkt::internal::display_enum(f, self.name(), self.value())
31153    }
31154}
31155
31156impl std::convert::From<i32> for InTransitEncryptionConfig {
31157    fn from(value: i32) -> Self {
31158        match value {
31159            0 => Self::Unspecified,
31160            1 => Self::InTransitEncryptionDisabled,
31161            2 => Self::InTransitEncryptionInterNodeTransparent,
31162            _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
31163                wkt::internal::UnknownEnumValue::Integer(value),
31164            )),
31165        }
31166    }
31167}
31168
31169impl std::convert::From<&str> for InTransitEncryptionConfig {
31170    fn from(value: &str) -> Self {
31171        use std::string::ToString;
31172        match value {
31173            "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" => Self::Unspecified,
31174            "IN_TRANSIT_ENCRYPTION_DISABLED" => Self::InTransitEncryptionDisabled,
31175            "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" => {
31176                Self::InTransitEncryptionInterNodeTransparent
31177            }
31178            _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
31179                wkt::internal::UnknownEnumValue::String(value.to_string()),
31180            )),
31181        }
31182    }
31183}
31184
31185impl serde::ser::Serialize for InTransitEncryptionConfig {
31186    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31187    where
31188        S: serde::Serializer,
31189    {
31190        match self {
31191            Self::Unspecified => serializer.serialize_i32(0),
31192            Self::InTransitEncryptionDisabled => serializer.serialize_i32(1),
31193            Self::InTransitEncryptionInterNodeTransparent => serializer.serialize_i32(2),
31194            Self::UnknownValue(u) => u.0.serialize(serializer),
31195        }
31196    }
31197}
31198
31199impl<'de> serde::de::Deserialize<'de> for InTransitEncryptionConfig {
31200    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31201    where
31202        D: serde::Deserializer<'de>,
31203    {
31204        deserializer.deserialize_any(
31205            wkt::internal::EnumVisitor::<InTransitEncryptionConfig>::new(
31206                ".google.container.v1.InTransitEncryptionConfig",
31207            ),
31208        )
31209    }
31210}