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    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
112}
113
114impl LinuxNodeConfig {
115    pub fn new() -> Self {
116        std::default::Default::default()
117    }
118
119    /// Sets the value of [sysctls][crate::model::LinuxNodeConfig::sysctls].
120    pub fn set_sysctls<T, K, V>(mut self, v: T) -> Self
121    where
122        T: std::iter::IntoIterator<Item = (K, V)>,
123        K: std::convert::Into<std::string::String>,
124        V: std::convert::Into<std::string::String>,
125    {
126        use std::iter::Iterator;
127        self.sysctls = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
128        self
129    }
130
131    /// Sets the value of [cgroup_mode][crate::model::LinuxNodeConfig::cgroup_mode].
132    pub fn set_cgroup_mode<T: std::convert::Into<crate::model::linux_node_config::CgroupMode>>(
133        mut self,
134        v: T,
135    ) -> Self {
136        self.cgroup_mode = v.into();
137        self
138    }
139
140    /// Sets the value of [hugepages][crate::model::LinuxNodeConfig::hugepages].
141    pub fn set_hugepages<T>(mut self, v: T) -> Self
142    where
143        T: std::convert::Into<crate::model::linux_node_config::HugepagesConfig>,
144    {
145        self.hugepages = std::option::Option::Some(v.into());
146        self
147    }
148
149    /// Sets or clears the value of [hugepages][crate::model::LinuxNodeConfig::hugepages].
150    pub fn set_or_clear_hugepages<T>(mut self, v: std::option::Option<T>) -> Self
151    where
152        T: std::convert::Into<crate::model::linux_node_config::HugepagesConfig>,
153    {
154        self.hugepages = v.map(|x| x.into());
155        self
156    }
157
158    /// Sets the value of [transparent_hugepage_enabled][crate::model::LinuxNodeConfig::transparent_hugepage_enabled].
159    pub fn set_transparent_hugepage_enabled<
160        T: std::convert::Into<crate::model::linux_node_config::TransparentHugepageEnabled>,
161    >(
162        mut self,
163        v: T,
164    ) -> Self {
165        self.transparent_hugepage_enabled = v.into();
166        self
167    }
168
169    /// Sets the value of [transparent_hugepage_defrag][crate::model::LinuxNodeConfig::transparent_hugepage_defrag].
170    pub fn set_transparent_hugepage_defrag<
171        T: std::convert::Into<crate::model::linux_node_config::TransparentHugepageDefrag>,
172    >(
173        mut self,
174        v: T,
175    ) -> Self {
176        self.transparent_hugepage_defrag = v.into();
177        self
178    }
179}
180
181impl wkt::message::Message for LinuxNodeConfig {
182    fn typename() -> &'static str {
183        "type.googleapis.com/google.container.v1.LinuxNodeConfig"
184    }
185}
186
187/// Defines additional types related to [LinuxNodeConfig].
188pub mod linux_node_config {
189    #[allow(unused_imports)]
190    use super::*;
191
192    /// Hugepages amount in both 2m and 1g size
193    #[derive(Clone, Default, PartialEq)]
194    #[non_exhaustive]
195    pub struct HugepagesConfig {
196        /// Optional. Amount of 2M hugepages
197        pub hugepage_size2m: std::option::Option<i32>,
198
199        /// Optional. Amount of 1G hugepages
200        pub hugepage_size1g: std::option::Option<i32>,
201
202        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
203    }
204
205    impl HugepagesConfig {
206        pub fn new() -> Self {
207            std::default::Default::default()
208        }
209
210        /// Sets the value of [hugepage_size2m][crate::model::linux_node_config::HugepagesConfig::hugepage_size2m].
211        pub fn set_hugepage_size2m<T>(mut self, v: T) -> Self
212        where
213            T: std::convert::Into<i32>,
214        {
215            self.hugepage_size2m = std::option::Option::Some(v.into());
216            self
217        }
218
219        /// Sets or clears the value of [hugepage_size2m][crate::model::linux_node_config::HugepagesConfig::hugepage_size2m].
220        pub fn set_or_clear_hugepage_size2m<T>(mut self, v: std::option::Option<T>) -> Self
221        where
222            T: std::convert::Into<i32>,
223        {
224            self.hugepage_size2m = v.map(|x| x.into());
225            self
226        }
227
228        /// Sets the value of [hugepage_size1g][crate::model::linux_node_config::HugepagesConfig::hugepage_size1g].
229        pub fn set_hugepage_size1g<T>(mut self, v: T) -> Self
230        where
231            T: std::convert::Into<i32>,
232        {
233            self.hugepage_size1g = std::option::Option::Some(v.into());
234            self
235        }
236
237        /// Sets or clears the value of [hugepage_size1g][crate::model::linux_node_config::HugepagesConfig::hugepage_size1g].
238        pub fn set_or_clear_hugepage_size1g<T>(mut self, v: std::option::Option<T>) -> Self
239        where
240            T: std::convert::Into<i32>,
241        {
242            self.hugepage_size1g = v.map(|x| x.into());
243            self
244        }
245    }
246
247    impl wkt::message::Message for HugepagesConfig {
248        fn typename() -> &'static str {
249            "type.googleapis.com/google.container.v1.LinuxNodeConfig.HugepagesConfig"
250        }
251    }
252
253    /// Possible cgroup modes that can be used.
254    ///
255    /// # Working with unknown values
256    ///
257    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
258    /// additional enum variants at any time. Adding new variants is not considered
259    /// a breaking change. Applications should write their code in anticipation of:
260    ///
261    /// - New values appearing in future releases of the client library, **and**
262    /// - New values received dynamically, without application changes.
263    ///
264    /// Please consult the [Working with enums] section in the user guide for some
265    /// guidelines.
266    ///
267    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
268    #[derive(Clone, Debug, PartialEq)]
269    #[non_exhaustive]
270    pub enum CgroupMode {
271        /// CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used.
272        /// The default for the GKE node OS image will be used.
273        Unspecified,
274        /// CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on
275        /// the node image.
276        V1,
277        /// CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on
278        /// the node image.
279        V2,
280        /// If set, the enum was initialized with an unknown value.
281        ///
282        /// Applications can examine the value using [CgroupMode::value] or
283        /// [CgroupMode::name].
284        UnknownValue(cgroup_mode::UnknownValue),
285    }
286
287    #[doc(hidden)]
288    pub mod cgroup_mode {
289        #[allow(unused_imports)]
290        use super::*;
291        #[derive(Clone, Debug, PartialEq)]
292        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
293    }
294
295    impl CgroupMode {
296        /// Gets the enum value.
297        ///
298        /// Returns `None` if the enum contains an unknown value deserialized from
299        /// the string representation of enums.
300        pub fn value(&self) -> std::option::Option<i32> {
301            match self {
302                Self::Unspecified => std::option::Option::Some(0),
303                Self::V1 => std::option::Option::Some(1),
304                Self::V2 => std::option::Option::Some(2),
305                Self::UnknownValue(u) => u.0.value(),
306            }
307        }
308
309        /// Gets the enum value as a string.
310        ///
311        /// Returns `None` if the enum contains an unknown value deserialized from
312        /// the integer representation of enums.
313        pub fn name(&self) -> std::option::Option<&str> {
314            match self {
315                Self::Unspecified => std::option::Option::Some("CGROUP_MODE_UNSPECIFIED"),
316                Self::V1 => std::option::Option::Some("CGROUP_MODE_V1"),
317                Self::V2 => std::option::Option::Some("CGROUP_MODE_V2"),
318                Self::UnknownValue(u) => u.0.name(),
319            }
320        }
321    }
322
323    impl std::default::Default for CgroupMode {
324        fn default() -> Self {
325            use std::convert::From;
326            Self::from(0)
327        }
328    }
329
330    impl std::fmt::Display for CgroupMode {
331        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
332            wkt::internal::display_enum(f, self.name(), self.value())
333        }
334    }
335
336    impl std::convert::From<i32> for CgroupMode {
337        fn from(value: i32) -> Self {
338            match value {
339                0 => Self::Unspecified,
340                1 => Self::V1,
341                2 => Self::V2,
342                _ => Self::UnknownValue(cgroup_mode::UnknownValue(
343                    wkt::internal::UnknownEnumValue::Integer(value),
344                )),
345            }
346        }
347    }
348
349    impl std::convert::From<&str> for CgroupMode {
350        fn from(value: &str) -> Self {
351            use std::string::ToString;
352            match value {
353                "CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
354                "CGROUP_MODE_V1" => Self::V1,
355                "CGROUP_MODE_V2" => Self::V2,
356                _ => Self::UnknownValue(cgroup_mode::UnknownValue(
357                    wkt::internal::UnknownEnumValue::String(value.to_string()),
358                )),
359            }
360        }
361    }
362
363    impl serde::ser::Serialize for CgroupMode {
364        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
365        where
366            S: serde::Serializer,
367        {
368            match self {
369                Self::Unspecified => serializer.serialize_i32(0),
370                Self::V1 => serializer.serialize_i32(1),
371                Self::V2 => serializer.serialize_i32(2),
372                Self::UnknownValue(u) => u.0.serialize(serializer),
373            }
374        }
375    }
376
377    impl<'de> serde::de::Deserialize<'de> for CgroupMode {
378        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
379        where
380            D: serde::Deserializer<'de>,
381        {
382            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CgroupMode>::new(
383                ".google.container.v1.LinuxNodeConfig.CgroupMode",
384            ))
385        }
386    }
387
388    /// Possible values for transparent hugepage enabled support.
389    ///
390    /// # Working with unknown values
391    ///
392    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
393    /// additional enum variants at any time. Adding new variants is not considered
394    /// a breaking change. Applications should write their code in anticipation of:
395    ///
396    /// - New values appearing in future releases of the client library, **and**
397    /// - New values received dynamically, without application changes.
398    ///
399    /// Please consult the [Working with enums] section in the user guide for some
400    /// guidelines.
401    ///
402    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
403    #[derive(Clone, Debug, PartialEq)]
404    #[non_exhaustive]
405    pub enum TransparentHugepageEnabled {
406        /// Default value. GKE will not modify the kernel configuration.
407        Unspecified,
408        /// Transparent hugepage support for anonymous memory is enabled system wide.
409        Always,
410        /// Transparent hugepage support for anonymous memory is enabled inside
411        /// MADV_HUGEPAGE regions. This is the default kernel configuration.
412        Madvise,
413        /// Transparent hugepage support for anonymous memory is disabled.
414        Never,
415        /// If set, the enum was initialized with an unknown value.
416        ///
417        /// Applications can examine the value using [TransparentHugepageEnabled::value] or
418        /// [TransparentHugepageEnabled::name].
419        UnknownValue(transparent_hugepage_enabled::UnknownValue),
420    }
421
422    #[doc(hidden)]
423    pub mod transparent_hugepage_enabled {
424        #[allow(unused_imports)]
425        use super::*;
426        #[derive(Clone, Debug, PartialEq)]
427        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
428    }
429
430    impl TransparentHugepageEnabled {
431        /// Gets the enum value.
432        ///
433        /// Returns `None` if the enum contains an unknown value deserialized from
434        /// the string representation of enums.
435        pub fn value(&self) -> std::option::Option<i32> {
436            match self {
437                Self::Unspecified => std::option::Option::Some(0),
438                Self::Always => std::option::Option::Some(1),
439                Self::Madvise => std::option::Option::Some(2),
440                Self::Never => std::option::Option::Some(3),
441                Self::UnknownValue(u) => u.0.value(),
442            }
443        }
444
445        /// Gets the enum value as a string.
446        ///
447        /// Returns `None` if the enum contains an unknown value deserialized from
448        /// the integer representation of enums.
449        pub fn name(&self) -> std::option::Option<&str> {
450            match self {
451                Self::Unspecified => {
452                    std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED")
453                }
454                Self::Always => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS"),
455                Self::Madvise => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_MADVISE"),
456                Self::Never => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_NEVER"),
457                Self::UnknownValue(u) => u.0.name(),
458            }
459        }
460    }
461
462    impl std::default::Default for TransparentHugepageEnabled {
463        fn default() -> Self {
464            use std::convert::From;
465            Self::from(0)
466        }
467    }
468
469    impl std::fmt::Display for TransparentHugepageEnabled {
470        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
471            wkt::internal::display_enum(f, self.name(), self.value())
472        }
473    }
474
475    impl std::convert::From<i32> for TransparentHugepageEnabled {
476        fn from(value: i32) -> Self {
477            match value {
478                0 => Self::Unspecified,
479                1 => Self::Always,
480                2 => Self::Madvise,
481                3 => Self::Never,
482                _ => Self::UnknownValue(transparent_hugepage_enabled::UnknownValue(
483                    wkt::internal::UnknownEnumValue::Integer(value),
484                )),
485            }
486        }
487    }
488
489    impl std::convert::From<&str> for TransparentHugepageEnabled {
490        fn from(value: &str) -> Self {
491            use std::string::ToString;
492            match value {
493                "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED" => Self::Unspecified,
494                "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS" => Self::Always,
495                "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE" => Self::Madvise,
496                "TRANSPARENT_HUGEPAGE_ENABLED_NEVER" => Self::Never,
497                _ => Self::UnknownValue(transparent_hugepage_enabled::UnknownValue(
498                    wkt::internal::UnknownEnumValue::String(value.to_string()),
499                )),
500            }
501        }
502    }
503
504    impl serde::ser::Serialize for TransparentHugepageEnabled {
505        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
506        where
507            S: serde::Serializer,
508        {
509            match self {
510                Self::Unspecified => serializer.serialize_i32(0),
511                Self::Always => serializer.serialize_i32(1),
512                Self::Madvise => serializer.serialize_i32(2),
513                Self::Never => serializer.serialize_i32(3),
514                Self::UnknownValue(u) => u.0.serialize(serializer),
515            }
516        }
517    }
518
519    impl<'de> serde::de::Deserialize<'de> for TransparentHugepageEnabled {
520        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
521        where
522            D: serde::Deserializer<'de>,
523        {
524            deserializer.deserialize_any(
525                wkt::internal::EnumVisitor::<TransparentHugepageEnabled>::new(
526                    ".google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled",
527                ),
528            )
529        }
530    }
531
532    /// Possible values for transparent hugepage defrag support.
533    ///
534    /// # Working with unknown values
535    ///
536    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
537    /// additional enum variants at any time. Adding new variants is not considered
538    /// a breaking change. Applications should write their code in anticipation of:
539    ///
540    /// - New values appearing in future releases of the client library, **and**
541    /// - New values received dynamically, without application changes.
542    ///
543    /// Please consult the [Working with enums] section in the user guide for some
544    /// guidelines.
545    ///
546    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
547    #[derive(Clone, Debug, PartialEq)]
548    #[non_exhaustive]
549    pub enum TransparentHugepageDefrag {
550        /// Default value. GKE will not modify the kernel configuration.
551        Unspecified,
552        /// It means that an application requesting THP will stall on allocation
553        /// failure and directly reclaim pages and compact memory in an effort to
554        /// allocate a THP immediately.
555        Always,
556        /// It means that an application will wake kswapd in the background to
557        /// reclaim pages and wake kcompactd to compact memory so that THP is
558        /// available in the near future. It’s the responsibility of khugepaged to
559        /// then install the THP pages later.
560        Defer,
561        /// It means that an application will enter direct reclaim and compaction
562        /// like always, but only for regions that have used madvise(MADV_HUGEPAGE);
563        /// all other regions will wake kswapd in the background to reclaim pages and
564        /// wake kcompactd to compact memory so that THP is available in the near
565        /// future.
566        DeferWithMadvise,
567        /// It means that an application will enter direct reclaim like always but
568        /// only for regions that are have used madvise(MADV_HUGEPAGE). This is the
569        /// default kernel configuration.
570        Madvise,
571        /// It means that an application will never enter direct reclaim or
572        /// compaction.
573        Never,
574        /// If set, the enum was initialized with an unknown value.
575        ///
576        /// Applications can examine the value using [TransparentHugepageDefrag::value] or
577        /// [TransparentHugepageDefrag::name].
578        UnknownValue(transparent_hugepage_defrag::UnknownValue),
579    }
580
581    #[doc(hidden)]
582    pub mod transparent_hugepage_defrag {
583        #[allow(unused_imports)]
584        use super::*;
585        #[derive(Clone, Debug, PartialEq)]
586        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
587    }
588
589    impl TransparentHugepageDefrag {
590        /// Gets the enum value.
591        ///
592        /// Returns `None` if the enum contains an unknown value deserialized from
593        /// the string representation of enums.
594        pub fn value(&self) -> std::option::Option<i32> {
595            match self {
596                Self::Unspecified => std::option::Option::Some(0),
597                Self::Always => std::option::Option::Some(1),
598                Self::Defer => std::option::Option::Some(2),
599                Self::DeferWithMadvise => std::option::Option::Some(3),
600                Self::Madvise => std::option::Option::Some(4),
601                Self::Never => std::option::Option::Some(5),
602                Self::UnknownValue(u) => u.0.value(),
603            }
604        }
605
606        /// Gets the enum value as a string.
607        ///
608        /// Returns `None` if the enum contains an unknown value deserialized from
609        /// the integer representation of enums.
610        pub fn name(&self) -> std::option::Option<&str> {
611            match self {
612                Self::Unspecified => {
613                    std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED")
614                }
615                Self::Always => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS"),
616                Self::Defer => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_DEFER"),
617                Self::DeferWithMadvise => {
618                    std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE")
619                }
620                Self::Madvise => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE"),
621                Self::Never => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_NEVER"),
622                Self::UnknownValue(u) => u.0.name(),
623            }
624        }
625    }
626
627    impl std::default::Default for TransparentHugepageDefrag {
628        fn default() -> Self {
629            use std::convert::From;
630            Self::from(0)
631        }
632    }
633
634    impl std::fmt::Display for TransparentHugepageDefrag {
635        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
636            wkt::internal::display_enum(f, self.name(), self.value())
637        }
638    }
639
640    impl std::convert::From<i32> for TransparentHugepageDefrag {
641        fn from(value: i32) -> Self {
642            match value {
643                0 => Self::Unspecified,
644                1 => Self::Always,
645                2 => Self::Defer,
646                3 => Self::DeferWithMadvise,
647                4 => Self::Madvise,
648                5 => Self::Never,
649                _ => Self::UnknownValue(transparent_hugepage_defrag::UnknownValue(
650                    wkt::internal::UnknownEnumValue::Integer(value),
651                )),
652            }
653        }
654    }
655
656    impl std::convert::From<&str> for TransparentHugepageDefrag {
657        fn from(value: &str) -> Self {
658            use std::string::ToString;
659            match value {
660                "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED" => Self::Unspecified,
661                "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS" => Self::Always,
662                "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER" => Self::Defer,
663                "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE" => Self::DeferWithMadvise,
664                "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE" => Self::Madvise,
665                "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER" => Self::Never,
666                _ => Self::UnknownValue(transparent_hugepage_defrag::UnknownValue(
667                    wkt::internal::UnknownEnumValue::String(value.to_string()),
668                )),
669            }
670        }
671    }
672
673    impl serde::ser::Serialize for TransparentHugepageDefrag {
674        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
675        where
676            S: serde::Serializer,
677        {
678            match self {
679                Self::Unspecified => serializer.serialize_i32(0),
680                Self::Always => serializer.serialize_i32(1),
681                Self::Defer => serializer.serialize_i32(2),
682                Self::DeferWithMadvise => serializer.serialize_i32(3),
683                Self::Madvise => serializer.serialize_i32(4),
684                Self::Never => serializer.serialize_i32(5),
685                Self::UnknownValue(u) => u.0.serialize(serializer),
686            }
687        }
688    }
689
690    impl<'de> serde::de::Deserialize<'de> for TransparentHugepageDefrag {
691        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
692        where
693            D: serde::Deserializer<'de>,
694        {
695            deserializer.deserialize_any(
696                wkt::internal::EnumVisitor::<TransparentHugepageDefrag>::new(
697                    ".google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag",
698                ),
699            )
700        }
701    }
702}
703
704/// Parameters that can be configured on Windows nodes.
705/// Windows Node Config that define the parameters that will be used to
706/// configure the Windows node pool settings.
707#[derive(Clone, Default, PartialEq)]
708#[non_exhaustive]
709pub struct WindowsNodeConfig {
710    /// OSVersion specifies the Windows node config to be used on the node.
711    pub os_version: crate::model::windows_node_config::OSVersion,
712
713    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
714}
715
716impl WindowsNodeConfig {
717    pub fn new() -> Self {
718        std::default::Default::default()
719    }
720
721    /// Sets the value of [os_version][crate::model::WindowsNodeConfig::os_version].
722    pub fn set_os_version<T: std::convert::Into<crate::model::windows_node_config::OSVersion>>(
723        mut self,
724        v: T,
725    ) -> Self {
726        self.os_version = v.into();
727        self
728    }
729}
730
731impl wkt::message::Message for WindowsNodeConfig {
732    fn typename() -> &'static str {
733        "type.googleapis.com/google.container.v1.WindowsNodeConfig"
734    }
735}
736
737/// Defines additional types related to [WindowsNodeConfig].
738pub mod windows_node_config {
739    #[allow(unused_imports)]
740    use super::*;
741
742    /// Possible OS version that can be used.
743    ///
744    /// # Working with unknown values
745    ///
746    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
747    /// additional enum variants at any time. Adding new variants is not considered
748    /// a breaking change. Applications should write their code in anticipation of:
749    ///
750    /// - New values appearing in future releases of the client library, **and**
751    /// - New values received dynamically, without application changes.
752    ///
753    /// Please consult the [Working with enums] section in the user guide for some
754    /// guidelines.
755    ///
756    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
757    #[derive(Clone, Debug, PartialEq)]
758    #[non_exhaustive]
759    pub enum OSVersion {
760        /// When OSVersion is not specified.
761        Unspecified,
762        /// LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image.
763        Ltsc2019,
764        /// LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image.
765        Ltsc2022,
766        /// If set, the enum was initialized with an unknown value.
767        ///
768        /// Applications can examine the value using [OSVersion::value] or
769        /// [OSVersion::name].
770        UnknownValue(os_version::UnknownValue),
771    }
772
773    #[doc(hidden)]
774    pub mod os_version {
775        #[allow(unused_imports)]
776        use super::*;
777        #[derive(Clone, Debug, PartialEq)]
778        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
779    }
780
781    impl OSVersion {
782        /// Gets the enum value.
783        ///
784        /// Returns `None` if the enum contains an unknown value deserialized from
785        /// the string representation of enums.
786        pub fn value(&self) -> std::option::Option<i32> {
787            match self {
788                Self::Unspecified => std::option::Option::Some(0),
789                Self::Ltsc2019 => std::option::Option::Some(1),
790                Self::Ltsc2022 => std::option::Option::Some(2),
791                Self::UnknownValue(u) => u.0.value(),
792            }
793        }
794
795        /// Gets the enum value as a string.
796        ///
797        /// Returns `None` if the enum contains an unknown value deserialized from
798        /// the integer representation of enums.
799        pub fn name(&self) -> std::option::Option<&str> {
800            match self {
801                Self::Unspecified => std::option::Option::Some("OS_VERSION_UNSPECIFIED"),
802                Self::Ltsc2019 => std::option::Option::Some("OS_VERSION_LTSC2019"),
803                Self::Ltsc2022 => std::option::Option::Some("OS_VERSION_LTSC2022"),
804                Self::UnknownValue(u) => u.0.name(),
805            }
806        }
807    }
808
809    impl std::default::Default for OSVersion {
810        fn default() -> Self {
811            use std::convert::From;
812            Self::from(0)
813        }
814    }
815
816    impl std::fmt::Display for OSVersion {
817        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
818            wkt::internal::display_enum(f, self.name(), self.value())
819        }
820    }
821
822    impl std::convert::From<i32> for OSVersion {
823        fn from(value: i32) -> Self {
824            match value {
825                0 => Self::Unspecified,
826                1 => Self::Ltsc2019,
827                2 => Self::Ltsc2022,
828                _ => Self::UnknownValue(os_version::UnknownValue(
829                    wkt::internal::UnknownEnumValue::Integer(value),
830                )),
831            }
832        }
833    }
834
835    impl std::convert::From<&str> for OSVersion {
836        fn from(value: &str) -> Self {
837            use std::string::ToString;
838            match value {
839                "OS_VERSION_UNSPECIFIED" => Self::Unspecified,
840                "OS_VERSION_LTSC2019" => Self::Ltsc2019,
841                "OS_VERSION_LTSC2022" => Self::Ltsc2022,
842                _ => Self::UnknownValue(os_version::UnknownValue(
843                    wkt::internal::UnknownEnumValue::String(value.to_string()),
844                )),
845            }
846        }
847    }
848
849    impl serde::ser::Serialize for OSVersion {
850        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
851        where
852            S: serde::Serializer,
853        {
854            match self {
855                Self::Unspecified => serializer.serialize_i32(0),
856                Self::Ltsc2019 => serializer.serialize_i32(1),
857                Self::Ltsc2022 => serializer.serialize_i32(2),
858                Self::UnknownValue(u) => u.0.serialize(serializer),
859            }
860        }
861    }
862
863    impl<'de> serde::de::Deserialize<'de> for OSVersion {
864        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
865        where
866            D: serde::Deserializer<'de>,
867        {
868            deserializer.deserialize_any(wkt::internal::EnumVisitor::<OSVersion>::new(
869                ".google.container.v1.WindowsNodeConfig.OSVersion",
870            ))
871        }
872    }
873}
874
875/// Node kubelet configs.
876#[derive(Clone, Default, PartialEq)]
877#[non_exhaustive]
878pub struct NodeKubeletConfig {
879    /// Control the CPU management policy on the node.
880    /// See
881    /// <https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/>
882    ///
883    /// The following values are allowed.
884    ///
885    /// * "none": the default, which represents the existing scheduling behavior.
886    /// * "static": allows pods with certain resource characteristics to be granted
887    ///   increased CPU affinity and exclusivity on the node.
888    ///   The default value is 'none' if unspecified.
889    pub cpu_manager_policy: std::string::String,
890
891    /// Optional. Controls Topology Manager configuration on the node.
892    /// For more information, see:
893    /// <https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/>
894    pub topology_manager: std::option::Option<crate::model::TopologyManager>,
895
896    /// Optional. Controls NUMA-aware Memory Manager configuration on the
897    /// node. For more information, see:
898    /// <https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/>
899    pub memory_manager: std::option::Option<crate::model::MemoryManager>,
900
901    /// Enable CPU CFS quota enforcement for containers that specify CPU limits.
902    ///
903    /// This option is enabled by default which makes kubelet use CFS quota
904    /// (<https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt>) to
905    /// enforce container CPU limits. Otherwise, CPU limits will not be enforced at
906    /// all.
907    ///
908    /// Disable this option to mitigate CPU throttling problems while still having
909    /// your pods to be in Guaranteed QoS class by specifying the CPU limits.
910    ///
911    /// The default value is 'true' if unspecified.
912    pub cpu_cfs_quota: std::option::Option<wkt::BoolValue>,
913
914    /// Set the CPU CFS quota period value 'cpu.cfs_period_us'.
915    ///
916    /// The string must be a sequence of decimal numbers, each with optional
917    /// fraction and a unit suffix, such as "300ms".
918    /// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
919    /// The value must be a positive duration.
920    pub cpu_cfs_quota_period: std::string::String,
921
922    /// Set the Pod PID limits. See
923    /// <https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits>
924    ///
925    /// Controls the maximum number of processes allowed to run in a pod. The value
926    /// must be greater than or equal to 1024 and less than 4194304.
927    pub pod_pids_limit: i64,
928
929    /// Enable or disable Kubelet read only port.
930    pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
931
932    /// Optional. Defines the percent of disk usage before which image garbage
933    /// collection is never run. Lowest disk usage to garbage collect to. The
934    /// percent is calculated as this field value out of 100.
935    ///
936    /// The value must be between 10 and 85, inclusive and smaller than
937    /// image_gc_high_threshold_percent.
938    ///
939    /// The default value is 80 if unspecified.
940    pub image_gc_low_threshold_percent: i32,
941
942    /// Optional. Defines the percent of disk usage after which image garbage
943    /// collection is always run. The percent is calculated as this field value out
944    /// of 100.
945    ///
946    /// The value must be between 10 and 85, inclusive and greater than
947    /// image_gc_low_threshold_percent.
948    ///
949    /// The default value is 85 if unspecified.
950    pub image_gc_high_threshold_percent: i32,
951
952    /// Optional. Defines the minimum age for an unused image before it is garbage
953    /// collected.
954    ///
955    /// The string must be a sequence of decimal numbers, each with optional
956    /// fraction and a unit suffix, such as "300s", "1.5h", and "2h45m". Valid time
957    /// units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
958    ///
959    /// The value must be a positive duration less than or equal to 2 minutes.
960    ///
961    /// The default value is "2m0s" if unspecified.
962    pub image_minimum_gc_age: std::string::String,
963
964    /// Optional. Defines the maximum age an image can be unused before it is
965    /// garbage collected. The string must be a sequence of decimal numbers, each
966    /// with optional fraction and a unit suffix, such as "300s", "1.5h", and
967    /// "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
968    ///
969    /// The value must be a positive duration greater than image_minimum_gc_age
970    /// or "0s".
971    ///
972    /// The default value is "0s" if unspecified, which disables this field,
973    /// meaning images won't be garbage collected based on being unused for too
974    /// long.
975    pub image_maximum_gc_age: std::string::String,
976
977    /// Optional. Defines the maximum size of the container log file before it is
978    /// rotated. See
979    /// <https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation>
980    ///
981    /// Valid format is positive number + unit, e.g. 100Ki, 10Mi. Valid units are
982    /// Ki, Mi, Gi.
983    /// The value must be between 10Mi and 500Mi, inclusive.
984    ///
985    /// Note that the total container log size (container_log_max_size *
986    /// container_log_max_files) cannot exceed 1% of the total
987    /// storage of the node, to avoid disk pressure caused by log files.
988    ///
989    /// The default value is 10Mi if unspecified.
990    pub container_log_max_size: std::string::String,
991
992    /// Optional. Defines the maximum number of container log files that can be
993    /// present for a container. See
994    /// <https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation>
995    ///
996    /// The value must be an integer between 2 and 10, inclusive.
997    /// The default value is 5 if unspecified.
998    pub container_log_max_files: i32,
999
1000    /// Optional. Defines a comma-separated allowlist of unsafe sysctls or sysctl
1001    /// patterns (ending in `*`).
1002    ///
1003    /// The unsafe namespaced sysctl groups are `kernel.shm*`, `kernel.msg*`,
1004    /// `kernel.sem`, `fs.mqueue.*`, and `net.*`. Leaving this allowlist empty
1005    /// means they cannot be set on Pods.
1006    ///
1007    /// To allow certain sysctls or sysctl patterns to be set on Pods, list them
1008    /// separated by commas.
1009    /// For example: `kernel.msg*,net.ipv4.route.min_pmtu`.
1010    ///
1011    /// See <https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/>
1012    /// for more details.
1013    pub allowed_unsafe_sysctls: std::vec::Vec<std::string::String>,
1014
1015    /// Optional. eviction_soft is a map of signal names to quantities that defines
1016    /// soft eviction thresholds. Each signal is compared to its corresponding
1017    /// threshold to determine if a pod eviction should occur.
1018    pub eviction_soft: std::option::Option<crate::model::EvictionSignals>,
1019
1020    /// Optional. eviction_soft_grace_period is a map of signal names to quantities
1021    /// that defines grace periods for each soft eviction signal. The grace period
1022    /// is the amount of time that a pod must be under pressure before an eviction
1023    /// occurs.
1024    pub eviction_soft_grace_period: std::option::Option<crate::model::EvictionGracePeriod>,
1025
1026    /// Optional. eviction_minimum_reclaim is a map of signal names to quantities
1027    /// that defines minimum reclaims, which describe the minimum amount of a given
1028    /// resource the kubelet will reclaim when performing a pod eviction while that
1029    /// resource is under pressure.
1030    pub eviction_minimum_reclaim: std::option::Option<crate::model::EvictionMinimumReclaim>,
1031
1032    /// Optional. eviction_max_pod_grace_period_seconds is the maximum allowed
1033    /// grace period (in seconds) to use when terminating pods in response to a
1034    /// soft eviction threshold being met. This value effectively caps the Pod's
1035    /// terminationGracePeriodSeconds value during soft evictions. Default: 0.
1036    /// Range: [0, 300].
1037    pub eviction_max_pod_grace_period_seconds: i32,
1038
1039    /// Optional. Defines the maximum number of image pulls in parallel.
1040    /// The range is 2 to 5, inclusive.
1041    /// The default value is 2 or 3 depending on the disk type.
1042    ///
1043    /// See
1044    /// <https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls>
1045    /// for more details.
1046    pub max_parallel_image_pulls: i32,
1047
1048    /// Optional. Defines whether to enable single process OOM killer.
1049    /// If true, will prevent the memory.oom.group flag from being set for
1050    /// container cgroups in cgroups v2. This causes processes in the container to
1051    /// be OOM killed individually instead of as a group.
1052    pub single_process_oom_kill: std::option::Option<bool>,
1053
1054    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1055}
1056
1057impl NodeKubeletConfig {
1058    pub fn new() -> Self {
1059        std::default::Default::default()
1060    }
1061
1062    /// Sets the value of [cpu_manager_policy][crate::model::NodeKubeletConfig::cpu_manager_policy].
1063    pub fn set_cpu_manager_policy<T: std::convert::Into<std::string::String>>(
1064        mut self,
1065        v: T,
1066    ) -> Self {
1067        self.cpu_manager_policy = v.into();
1068        self
1069    }
1070
1071    /// Sets the value of [topology_manager][crate::model::NodeKubeletConfig::topology_manager].
1072    pub fn set_topology_manager<T>(mut self, v: T) -> Self
1073    where
1074        T: std::convert::Into<crate::model::TopologyManager>,
1075    {
1076        self.topology_manager = std::option::Option::Some(v.into());
1077        self
1078    }
1079
1080    /// Sets or clears the value of [topology_manager][crate::model::NodeKubeletConfig::topology_manager].
1081    pub fn set_or_clear_topology_manager<T>(mut self, v: std::option::Option<T>) -> Self
1082    where
1083        T: std::convert::Into<crate::model::TopologyManager>,
1084    {
1085        self.topology_manager = v.map(|x| x.into());
1086        self
1087    }
1088
1089    /// Sets the value of [memory_manager][crate::model::NodeKubeletConfig::memory_manager].
1090    pub fn set_memory_manager<T>(mut self, v: T) -> Self
1091    where
1092        T: std::convert::Into<crate::model::MemoryManager>,
1093    {
1094        self.memory_manager = std::option::Option::Some(v.into());
1095        self
1096    }
1097
1098    /// Sets or clears the value of [memory_manager][crate::model::NodeKubeletConfig::memory_manager].
1099    pub fn set_or_clear_memory_manager<T>(mut self, v: std::option::Option<T>) -> Self
1100    where
1101        T: std::convert::Into<crate::model::MemoryManager>,
1102    {
1103        self.memory_manager = v.map(|x| x.into());
1104        self
1105    }
1106
1107    /// Sets the value of [cpu_cfs_quota][crate::model::NodeKubeletConfig::cpu_cfs_quota].
1108    pub fn set_cpu_cfs_quota<T>(mut self, v: T) -> Self
1109    where
1110        T: std::convert::Into<wkt::BoolValue>,
1111    {
1112        self.cpu_cfs_quota = std::option::Option::Some(v.into());
1113        self
1114    }
1115
1116    /// Sets or clears the value of [cpu_cfs_quota][crate::model::NodeKubeletConfig::cpu_cfs_quota].
1117    pub fn set_or_clear_cpu_cfs_quota<T>(mut self, v: std::option::Option<T>) -> Self
1118    where
1119        T: std::convert::Into<wkt::BoolValue>,
1120    {
1121        self.cpu_cfs_quota = v.map(|x| x.into());
1122        self
1123    }
1124
1125    /// Sets the value of [cpu_cfs_quota_period][crate::model::NodeKubeletConfig::cpu_cfs_quota_period].
1126    pub fn set_cpu_cfs_quota_period<T: std::convert::Into<std::string::String>>(
1127        mut self,
1128        v: T,
1129    ) -> Self {
1130        self.cpu_cfs_quota_period = v.into();
1131        self
1132    }
1133
1134    /// Sets the value of [pod_pids_limit][crate::model::NodeKubeletConfig::pod_pids_limit].
1135    pub fn set_pod_pids_limit<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1136        self.pod_pids_limit = v.into();
1137        self
1138    }
1139
1140    /// Sets the value of [insecure_kubelet_readonly_port_enabled][crate::model::NodeKubeletConfig::insecure_kubelet_readonly_port_enabled].
1141    pub fn set_insecure_kubelet_readonly_port_enabled<T>(mut self, v: T) -> Self
1142    where
1143        T: std::convert::Into<bool>,
1144    {
1145        self.insecure_kubelet_readonly_port_enabled = std::option::Option::Some(v.into());
1146        self
1147    }
1148
1149    /// Sets or clears the value of [insecure_kubelet_readonly_port_enabled][crate::model::NodeKubeletConfig::insecure_kubelet_readonly_port_enabled].
1150    pub fn set_or_clear_insecure_kubelet_readonly_port_enabled<T>(
1151        mut self,
1152        v: std::option::Option<T>,
1153    ) -> Self
1154    where
1155        T: std::convert::Into<bool>,
1156    {
1157        self.insecure_kubelet_readonly_port_enabled = v.map(|x| x.into());
1158        self
1159    }
1160
1161    /// Sets the value of [image_gc_low_threshold_percent][crate::model::NodeKubeletConfig::image_gc_low_threshold_percent].
1162    pub fn set_image_gc_low_threshold_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1163        self.image_gc_low_threshold_percent = v.into();
1164        self
1165    }
1166
1167    /// Sets the value of [image_gc_high_threshold_percent][crate::model::NodeKubeletConfig::image_gc_high_threshold_percent].
1168    pub fn set_image_gc_high_threshold_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1169        self.image_gc_high_threshold_percent = v.into();
1170        self
1171    }
1172
1173    /// Sets the value of [image_minimum_gc_age][crate::model::NodeKubeletConfig::image_minimum_gc_age].
1174    pub fn set_image_minimum_gc_age<T: std::convert::Into<std::string::String>>(
1175        mut self,
1176        v: T,
1177    ) -> Self {
1178        self.image_minimum_gc_age = v.into();
1179        self
1180    }
1181
1182    /// Sets the value of [image_maximum_gc_age][crate::model::NodeKubeletConfig::image_maximum_gc_age].
1183    pub fn set_image_maximum_gc_age<T: std::convert::Into<std::string::String>>(
1184        mut self,
1185        v: T,
1186    ) -> Self {
1187        self.image_maximum_gc_age = v.into();
1188        self
1189    }
1190
1191    /// Sets the value of [container_log_max_size][crate::model::NodeKubeletConfig::container_log_max_size].
1192    pub fn set_container_log_max_size<T: std::convert::Into<std::string::String>>(
1193        mut self,
1194        v: T,
1195    ) -> Self {
1196        self.container_log_max_size = v.into();
1197        self
1198    }
1199
1200    /// Sets the value of [container_log_max_files][crate::model::NodeKubeletConfig::container_log_max_files].
1201    pub fn set_container_log_max_files<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1202        self.container_log_max_files = v.into();
1203        self
1204    }
1205
1206    /// Sets the value of [allowed_unsafe_sysctls][crate::model::NodeKubeletConfig::allowed_unsafe_sysctls].
1207    pub fn set_allowed_unsafe_sysctls<T, V>(mut self, v: T) -> Self
1208    where
1209        T: std::iter::IntoIterator<Item = V>,
1210        V: std::convert::Into<std::string::String>,
1211    {
1212        use std::iter::Iterator;
1213        self.allowed_unsafe_sysctls = v.into_iter().map(|i| i.into()).collect();
1214        self
1215    }
1216
1217    /// Sets the value of [eviction_soft][crate::model::NodeKubeletConfig::eviction_soft].
1218    pub fn set_eviction_soft<T>(mut self, v: T) -> Self
1219    where
1220        T: std::convert::Into<crate::model::EvictionSignals>,
1221    {
1222        self.eviction_soft = std::option::Option::Some(v.into());
1223        self
1224    }
1225
1226    /// Sets or clears the value of [eviction_soft][crate::model::NodeKubeletConfig::eviction_soft].
1227    pub fn set_or_clear_eviction_soft<T>(mut self, v: std::option::Option<T>) -> Self
1228    where
1229        T: std::convert::Into<crate::model::EvictionSignals>,
1230    {
1231        self.eviction_soft = v.map(|x| x.into());
1232        self
1233    }
1234
1235    /// Sets the value of [eviction_soft_grace_period][crate::model::NodeKubeletConfig::eviction_soft_grace_period].
1236    pub fn set_eviction_soft_grace_period<T>(mut self, v: T) -> Self
1237    where
1238        T: std::convert::Into<crate::model::EvictionGracePeriod>,
1239    {
1240        self.eviction_soft_grace_period = std::option::Option::Some(v.into());
1241        self
1242    }
1243
1244    /// Sets or clears the value of [eviction_soft_grace_period][crate::model::NodeKubeletConfig::eviction_soft_grace_period].
1245    pub fn set_or_clear_eviction_soft_grace_period<T>(mut self, v: std::option::Option<T>) -> Self
1246    where
1247        T: std::convert::Into<crate::model::EvictionGracePeriod>,
1248    {
1249        self.eviction_soft_grace_period = v.map(|x| x.into());
1250        self
1251    }
1252
1253    /// Sets the value of [eviction_minimum_reclaim][crate::model::NodeKubeletConfig::eviction_minimum_reclaim].
1254    pub fn set_eviction_minimum_reclaim<T>(mut self, v: T) -> Self
1255    where
1256        T: std::convert::Into<crate::model::EvictionMinimumReclaim>,
1257    {
1258        self.eviction_minimum_reclaim = std::option::Option::Some(v.into());
1259        self
1260    }
1261
1262    /// Sets or clears the value of [eviction_minimum_reclaim][crate::model::NodeKubeletConfig::eviction_minimum_reclaim].
1263    pub fn set_or_clear_eviction_minimum_reclaim<T>(mut self, v: std::option::Option<T>) -> Self
1264    where
1265        T: std::convert::Into<crate::model::EvictionMinimumReclaim>,
1266    {
1267        self.eviction_minimum_reclaim = v.map(|x| x.into());
1268        self
1269    }
1270
1271    /// Sets the value of [eviction_max_pod_grace_period_seconds][crate::model::NodeKubeletConfig::eviction_max_pod_grace_period_seconds].
1272    pub fn set_eviction_max_pod_grace_period_seconds<T: std::convert::Into<i32>>(
1273        mut self,
1274        v: T,
1275    ) -> Self {
1276        self.eviction_max_pod_grace_period_seconds = v.into();
1277        self
1278    }
1279
1280    /// Sets the value of [max_parallel_image_pulls][crate::model::NodeKubeletConfig::max_parallel_image_pulls].
1281    pub fn set_max_parallel_image_pulls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1282        self.max_parallel_image_pulls = v.into();
1283        self
1284    }
1285
1286    /// Sets the value of [single_process_oom_kill][crate::model::NodeKubeletConfig::single_process_oom_kill].
1287    pub fn set_single_process_oom_kill<T>(mut self, v: T) -> Self
1288    where
1289        T: std::convert::Into<bool>,
1290    {
1291        self.single_process_oom_kill = std::option::Option::Some(v.into());
1292        self
1293    }
1294
1295    /// Sets or clears the value of [single_process_oom_kill][crate::model::NodeKubeletConfig::single_process_oom_kill].
1296    pub fn set_or_clear_single_process_oom_kill<T>(mut self, v: std::option::Option<T>) -> Self
1297    where
1298        T: std::convert::Into<bool>,
1299    {
1300        self.single_process_oom_kill = v.map(|x| x.into());
1301        self
1302    }
1303}
1304
1305impl wkt::message::Message for NodeKubeletConfig {
1306    fn typename() -> &'static str {
1307        "type.googleapis.com/google.container.v1.NodeKubeletConfig"
1308    }
1309}
1310
1311/// TopologyManager defines the configuration options for Topology Manager
1312/// feature. See
1313/// <https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/>
1314#[derive(Clone, Default, PartialEq)]
1315#[non_exhaustive]
1316pub struct TopologyManager {
1317    /// Configures the strategy for resource alignment.
1318    /// Allowed values are:
1319    ///
1320    /// * none: the default policy, and does not perform any topology alignment.
1321    /// * restricted: the topology manager stores the preferred NUMA node affinity
1322    ///   for the container, and will reject the pod if the affinity if not
1323    ///   preferred.
1324    /// * best-effort: the topology manager stores the preferred NUMA node affinity
1325    ///   for the container. If the affinity is not preferred, the topology manager
1326    ///   will admit the pod to the node anyway.
1327    /// * single-numa-node: the topology manager determines if the single NUMA node
1328    ///   affinity is possible. If it is, Topology Manager will store this and the
1329    ///   Hint Providers can then use this information when making the resource
1330    ///   allocation decision. If, however, this is not possible then the
1331    ///   Topology Manager will reject the pod from the node. This will result in a
1332    ///   pod in a Terminated state with a pod admission failure.
1333    ///
1334    /// The default policy value is 'none' if unspecified.
1335    /// Details about each strategy can be found
1336    /// [here](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies).
1337    pub policy: std::string::String,
1338
1339    /// The Topology Manager aligns resources in following scopes:
1340    ///
1341    /// * container
1342    /// * pod
1343    ///
1344    /// The default scope is 'container' if unspecified.
1345    /// See
1346    /// <https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes>
1347    pub scope: std::string::String,
1348
1349    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1350}
1351
1352impl TopologyManager {
1353    pub fn new() -> Self {
1354        std::default::Default::default()
1355    }
1356
1357    /// Sets the value of [policy][crate::model::TopologyManager::policy].
1358    pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1359        self.policy = v.into();
1360        self
1361    }
1362
1363    /// Sets the value of [scope][crate::model::TopologyManager::scope].
1364    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1365        self.scope = v.into();
1366        self
1367    }
1368}
1369
1370impl wkt::message::Message for TopologyManager {
1371    fn typename() -> &'static str {
1372        "type.googleapis.com/google.container.v1.TopologyManager"
1373    }
1374}
1375
1376/// The option enables the Kubernetes NUMA-aware Memory Manager feature.
1377/// Detailed description about the feature can be found
1378/// [here](https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/).
1379#[derive(Clone, Default, PartialEq)]
1380#[non_exhaustive]
1381pub struct MemoryManager {
1382    /// Controls the memory management policy on the Node.
1383    /// See
1384    /// <https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#policies>
1385    ///
1386    /// The following values are allowed.
1387    ///
1388    /// * "none"
1389    /// * "static"
1390    ///   The default value is 'none' if unspecified.
1391    pub policy: std::string::String,
1392
1393    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1394}
1395
1396impl MemoryManager {
1397    pub fn new() -> Self {
1398        std::default::Default::default()
1399    }
1400
1401    /// Sets the value of [policy][crate::model::MemoryManager::policy].
1402    pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1403        self.policy = v.into();
1404        self
1405    }
1406}
1407
1408impl wkt::message::Message for MemoryManager {
1409    fn typename() -> &'static str {
1410        "type.googleapis.com/google.container.v1.MemoryManager"
1411    }
1412}
1413
1414/// Eviction signals are the current state of a particular resource at a specific
1415/// point in time. The kubelet uses eviction signals to make eviction decisions
1416/// by comparing the signals to eviction thresholds, which are the minimum amount
1417/// of the resource that should be available on the node.
1418#[derive(Clone, Default, PartialEq)]
1419#[non_exhaustive]
1420pub struct EvictionSignals {
1421    /// Optional. Memory available (i.e. capacity - workingSet), in bytes. Defines
1422    /// the amount of "memory.available" signal in kubelet. Default is unset, if
1423    /// not specified in the kubelet config. Format: positive number + unit, e.g.
1424    /// 100Ki, 10Mi, 5Gi. Valid units are Ki, Mi, Gi. Must be >= 100Mi and <= 50%
1425    /// of the node's memory. See
1426    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1427    pub memory_available: std::string::String,
1428
1429    /// Optional. Amount of storage available on filesystem that kubelet uses for
1430    /// volumes, daemon logs, etc. Defines the amount of "nodefs.available" signal
1431    /// in kubelet. Default is unset, if not specified in the kubelet config. It
1432    /// takses percentage value for now. Sample format: "30%". Must be >= 10% and
1433    /// <= 50%. See
1434    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1435    pub nodefs_available: std::string::String,
1436
1437    /// Optional. Amount of inodes available on filesystem that kubelet uses for
1438    /// volumes, daemon logs, etc. Defines the amount of "nodefs.inodesFree" signal
1439    /// in kubelet. Default is unset, if not specified in the kubelet config. Linux
1440    /// only. It takses percentage value for now. Sample format: "30%". Must be >=
1441    /// 5% and <= 50%. See
1442    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1443    pub nodefs_inodes_free: std::string::String,
1444
1445    /// Optional. Amount of storage available on filesystem that container runtime
1446    /// uses for storing images layers. If the container filesystem and image
1447    /// filesystem are not separate, then imagefs can store both image layers and
1448    /// writeable layers. Defines the amount of "imagefs.available" signal in
1449    /// kubelet. Default is unset, if not specified in the kubelet config. It
1450    /// takses percentage value for now. Sample format: "30%". Must be >= 15% and
1451    /// <= 50%. See
1452    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1453    pub imagefs_available: std::string::String,
1454
1455    /// Optional. Amount of inodes available on filesystem that container runtime
1456    /// uses for storing images layers. Defines the amount of "imagefs.inodesFree"
1457    /// signal in kubelet. Default is unset, if not specified in the kubelet
1458    /// config. Linux only. It takses percentage value for now. Sample format:
1459    /// "30%". Must be >= 5% and <= 50%. See
1460    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1461    pub imagefs_inodes_free: std::string::String,
1462
1463    /// Optional. Amount of PID available for pod allocation. Defines the amount of
1464    /// "pid.available" signal in kubelet. Default is unset, if not specified in
1465    /// the kubelet config. It takses percentage value for now. Sample format:
1466    /// "30%". Must be >= 10% and <= 50%. See
1467    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1468    pub pid_available: std::string::String,
1469
1470    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1471}
1472
1473impl EvictionSignals {
1474    pub fn new() -> Self {
1475        std::default::Default::default()
1476    }
1477
1478    /// Sets the value of [memory_available][crate::model::EvictionSignals::memory_available].
1479    pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1480        mut self,
1481        v: T,
1482    ) -> Self {
1483        self.memory_available = v.into();
1484        self
1485    }
1486
1487    /// Sets the value of [nodefs_available][crate::model::EvictionSignals::nodefs_available].
1488    pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1489        mut self,
1490        v: T,
1491    ) -> Self {
1492        self.nodefs_available = v.into();
1493        self
1494    }
1495
1496    /// Sets the value of [nodefs_inodes_free][crate::model::EvictionSignals::nodefs_inodes_free].
1497    pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1498        mut self,
1499        v: T,
1500    ) -> Self {
1501        self.nodefs_inodes_free = v.into();
1502        self
1503    }
1504
1505    /// Sets the value of [imagefs_available][crate::model::EvictionSignals::imagefs_available].
1506    pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1507        mut self,
1508        v: T,
1509    ) -> Self {
1510        self.imagefs_available = v.into();
1511        self
1512    }
1513
1514    /// Sets the value of [imagefs_inodes_free][crate::model::EvictionSignals::imagefs_inodes_free].
1515    pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1516        mut self,
1517        v: T,
1518    ) -> Self {
1519        self.imagefs_inodes_free = v.into();
1520        self
1521    }
1522
1523    /// Sets the value of [pid_available][crate::model::EvictionSignals::pid_available].
1524    pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1525        self.pid_available = v.into();
1526        self
1527    }
1528}
1529
1530impl wkt::message::Message for EvictionSignals {
1531    fn typename() -> &'static str {
1532        "type.googleapis.com/google.container.v1.EvictionSignals"
1533    }
1534}
1535
1536/// Eviction grace periods are grace periods for each eviction signal.
1537#[derive(Clone, Default, PartialEq)]
1538#[non_exhaustive]
1539pub struct EvictionGracePeriod {
1540    /// Optional. Grace period for eviction due to memory available signal. Sample
1541    /// format: "10s". Must be >= 0. See
1542    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1543    pub memory_available: std::string::String,
1544
1545    /// Optional. Grace period for eviction due to nodefs available signal. Sample
1546    /// format: "10s". Must be >= 0. See
1547    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1548    pub nodefs_available: std::string::String,
1549
1550    /// Optional. Grace period for eviction due to nodefs inodes free signal.
1551    /// Sample format: "10s". Must be >= 0. See
1552    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1553    pub nodefs_inodes_free: std::string::String,
1554
1555    /// Optional. Grace period for eviction due to imagefs available signal. Sample
1556    /// format: "10s". Must be >= 0. See
1557    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1558    pub imagefs_available: std::string::String,
1559
1560    /// Optional. Grace period for eviction due to imagefs inodes free signal.
1561    /// Sample format: "10s". Must be >= 0. See
1562    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1563    pub imagefs_inodes_free: std::string::String,
1564
1565    /// Optional. Grace period for eviction due to pid available signal. Sample
1566    /// format: "10s". Must be >= 0. See
1567    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1568    pub pid_available: std::string::String,
1569
1570    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1571}
1572
1573impl EvictionGracePeriod {
1574    pub fn new() -> Self {
1575        std::default::Default::default()
1576    }
1577
1578    /// Sets the value of [memory_available][crate::model::EvictionGracePeriod::memory_available].
1579    pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1580        mut self,
1581        v: T,
1582    ) -> Self {
1583        self.memory_available = v.into();
1584        self
1585    }
1586
1587    /// Sets the value of [nodefs_available][crate::model::EvictionGracePeriod::nodefs_available].
1588    pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1589        mut self,
1590        v: T,
1591    ) -> Self {
1592        self.nodefs_available = v.into();
1593        self
1594    }
1595
1596    /// Sets the value of [nodefs_inodes_free][crate::model::EvictionGracePeriod::nodefs_inodes_free].
1597    pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1598        mut self,
1599        v: T,
1600    ) -> Self {
1601        self.nodefs_inodes_free = v.into();
1602        self
1603    }
1604
1605    /// Sets the value of [imagefs_available][crate::model::EvictionGracePeriod::imagefs_available].
1606    pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1607        mut self,
1608        v: T,
1609    ) -> Self {
1610        self.imagefs_available = v.into();
1611        self
1612    }
1613
1614    /// Sets the value of [imagefs_inodes_free][crate::model::EvictionGracePeriod::imagefs_inodes_free].
1615    pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1616        mut self,
1617        v: T,
1618    ) -> Self {
1619        self.imagefs_inodes_free = v.into();
1620        self
1621    }
1622
1623    /// Sets the value of [pid_available][crate::model::EvictionGracePeriod::pid_available].
1624    pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1625        self.pid_available = v.into();
1626        self
1627    }
1628}
1629
1630impl wkt::message::Message for EvictionGracePeriod {
1631    fn typename() -> &'static str {
1632        "type.googleapis.com/google.container.v1.EvictionGracePeriod"
1633    }
1634}
1635
1636/// Eviction minimum reclaims are the resource amounts of minimum reclaims for
1637/// each eviction signal.
1638#[derive(Clone, Default, PartialEq)]
1639#[non_exhaustive]
1640pub struct EvictionMinimumReclaim {
1641    /// Optional. Minimum reclaim for eviction due to memory available signal. Only
1642    /// take percentage value for now. Sample format: "10%". Must be <=10%. See
1643    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1644    pub memory_available: std::string::String,
1645
1646    /// Optional. Minimum reclaim for eviction due to nodefs available signal. Only
1647    /// take percentage value for now. Sample format: "10%". Must be <=10%. See
1648    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1649    pub nodefs_available: std::string::String,
1650
1651    /// Optional. Minimum reclaim for eviction due to nodefs inodes free signal.
1652    /// Only take percentage value for now. Sample format: "10%". Must be <=10%.
1653    /// See
1654    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1655    pub nodefs_inodes_free: std::string::String,
1656
1657    /// Optional. Minimum reclaim for eviction due to imagefs available signal.
1658    /// Only take percentage value for now. Sample format: "10%". Must be <=10%.
1659    /// See
1660    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1661    pub imagefs_available: std::string::String,
1662
1663    /// Optional. Minimum reclaim for eviction due to imagefs inodes free signal.
1664    /// Only take percentage value for now. Sample format: "10%". Must be <=10%.
1665    /// See
1666    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1667    pub imagefs_inodes_free: std::string::String,
1668
1669    /// Optional. Minimum reclaim for eviction due to pid available signal. Only
1670    /// take percentage value for now. Sample format: "10%". Must be <=10%. See
1671    /// <https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals>
1672    pub pid_available: std::string::String,
1673
1674    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1675}
1676
1677impl EvictionMinimumReclaim {
1678    pub fn new() -> Self {
1679        std::default::Default::default()
1680    }
1681
1682    /// Sets the value of [memory_available][crate::model::EvictionMinimumReclaim::memory_available].
1683    pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1684        mut self,
1685        v: T,
1686    ) -> Self {
1687        self.memory_available = v.into();
1688        self
1689    }
1690
1691    /// Sets the value of [nodefs_available][crate::model::EvictionMinimumReclaim::nodefs_available].
1692    pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1693        mut self,
1694        v: T,
1695    ) -> Self {
1696        self.nodefs_available = v.into();
1697        self
1698    }
1699
1700    /// Sets the value of [nodefs_inodes_free][crate::model::EvictionMinimumReclaim::nodefs_inodes_free].
1701    pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1702        mut self,
1703        v: T,
1704    ) -> Self {
1705        self.nodefs_inodes_free = v.into();
1706        self
1707    }
1708
1709    /// Sets the value of [imagefs_available][crate::model::EvictionMinimumReclaim::imagefs_available].
1710    pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1711        mut self,
1712        v: T,
1713    ) -> Self {
1714        self.imagefs_available = v.into();
1715        self
1716    }
1717
1718    /// Sets the value of [imagefs_inodes_free][crate::model::EvictionMinimumReclaim::imagefs_inodes_free].
1719    pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1720        mut self,
1721        v: T,
1722    ) -> Self {
1723        self.imagefs_inodes_free = v.into();
1724        self
1725    }
1726
1727    /// Sets the value of [pid_available][crate::model::EvictionMinimumReclaim::pid_available].
1728    pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1729        self.pid_available = v.into();
1730        self
1731    }
1732}
1733
1734impl wkt::message::Message for EvictionMinimumReclaim {
1735    fn typename() -> &'static str {
1736        "type.googleapis.com/google.container.v1.EvictionMinimumReclaim"
1737    }
1738}
1739
1740/// Parameters that describe the nodes in a cluster.
1741///
1742/// GKE Autopilot clusters do not
1743/// recognize parameters in `NodeConfig`. Use
1744/// [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults]
1745/// instead.
1746///
1747/// [google.container.v1.AutoprovisioningNodePoolDefaults]: crate::model::AutoprovisioningNodePoolDefaults
1748#[derive(Clone, Default, PartialEq)]
1749#[non_exhaustive]
1750pub struct NodeConfig {
1751    /// The name of a Google Compute Engine [machine
1752    /// type](https://cloud.google.com/compute/docs/machine-types)
1753    ///
1754    /// If unspecified, the default machine type is `e2-medium`.
1755    pub machine_type: std::string::String,
1756
1757    /// Size of the disk attached to each node, specified in GB.
1758    /// The smallest allowed disk size is 10GB.
1759    ///
1760    /// If unspecified, the default disk size is 100GB.
1761    pub disk_size_gb: i32,
1762
1763    /// The set of Google API scopes to be made available on all of the
1764    /// node VMs under the "default" service account.
1765    ///
1766    /// The following scopes are recommended, but not required, and by default are
1767    /// not included:
1768    ///
1769    /// * `<https://www.googleapis.com/auth/compute>` is required for mounting
1770    ///   persistent storage on your nodes.
1771    /// * `<https://www.googleapis.com/auth/devstorage.read_only>` is required for
1772    ///   communicating with **gcr.io**
1773    ///   (the [Google Container
1774    ///   Registry](https://cloud.google.com/container-registry/)).
1775    ///
1776    /// If unspecified, no scopes are added, unless Cloud Logging or Cloud
1777    /// Monitoring are enabled, in which case their required scopes will be added.
1778    pub oauth_scopes: std::vec::Vec<std::string::String>,
1779
1780    /// The Google Cloud Platform Service Account to be used by the node VMs.
1781    /// Specify the email address of the Service Account; otherwise, if no Service
1782    /// Account is specified, the "default" service account is used.
1783    pub service_account: std::string::String,
1784
1785    /// The metadata key/value pairs assigned to instances in the cluster.
1786    ///
1787    /// Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes
1788    /// in length. These are reflected as part of a URL in the metadata server.
1789    /// Additionally, to avoid ambiguity, keys must not conflict with any other
1790    /// metadata keys for the project or be one of the reserved keys:
1791    ///
1792    /// - "cluster-location"
1793    /// - "cluster-name"
1794    /// - "cluster-uid"
1795    /// - "configure-sh"
1796    /// - "containerd-configure-sh"
1797    /// - "enable-os-login"
1798    /// - "gci-ensure-gke-docker"
1799    /// - "gci-metrics-enabled"
1800    /// - "gci-update-strategy"
1801    /// - "instance-template"
1802    /// - "kube-env"
1803    /// - "startup-script"
1804    /// - "user-data"
1805    /// - "disable-address-manager"
1806    /// - "windows-startup-script-ps1"
1807    /// - "common-psm1"
1808    /// - "k8s-node-setup-psm1"
1809    /// - "install-ssh-psm1"
1810    /// - "user-profile-psm1"
1811    ///
1812    /// Values are free-form strings, and only have meaning as interpreted by
1813    /// the image running in the instance. The only restriction placed on them is
1814    /// that each value's size must be less than or equal to 32 KB.
1815    ///
1816    /// The total size of all keys and values must be less than 512 KB.
1817    pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
1818
1819    /// The image type to use for this node. Note that for a given image type,
1820    /// the latest version of it will be used. Please see
1821    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images>
1822    /// for available image types.
1823    pub image_type: std::string::String,
1824
1825    /// The map of Kubernetes labels (key/value pairs) to be applied to each node.
1826    /// These will added in addition to any default label(s) that
1827    /// Kubernetes may apply to the node.
1828    /// In case of conflict in label keys, the applied set may differ depending on
1829    /// the Kubernetes version -- it's best to assume the behavior is undefined
1830    /// and conflicts should be avoided.
1831    /// For more information, including usage and the valid values, see:
1832    /// <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/>
1833    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1834
1835    /// The number of local SSD disks to be attached to the node.
1836    ///
1837    /// The limit for this value is dependent upon the maximum number of
1838    /// disks available on a machine per zone. See:
1839    /// <https://cloud.google.com/compute/docs/disks/local-ssd>
1840    /// for more information.
1841    pub local_ssd_count: i32,
1842
1843    /// The list of instance tags applied to all nodes. Tags are used to identify
1844    /// valid sources or targets for network firewalls and are specified by
1845    /// the client during cluster or node pool creation. Each tag within the list
1846    /// must comply with RFC1035.
1847    pub tags: std::vec::Vec<std::string::String>,
1848
1849    /// Whether the nodes are created as preemptible VM instances. See:
1850    /// <https://cloud.google.com/compute/docs/instances/preemptible>
1851    /// for more information about preemptible VM instances.
1852    pub preemptible: bool,
1853
1854    /// A list of hardware accelerators to be attached to each node.
1855    /// See
1856    /// <https://cloud.google.com/compute/docs/gpus>
1857    /// for more information about support for GPUs.
1858    pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
1859
1860    /// Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or
1861    /// 'pd-balanced')
1862    ///
1863    /// If unspecified, the default disk type is 'pd-standard'
1864    pub disk_type: std::string::String,
1865
1866    /// Minimum CPU platform to be used by this instance. The instance may be
1867    /// scheduled on the specified or newer CPU platform. Applicable values are the
1868    /// friendly names of CPU platforms, such as
1869    /// `minCpuPlatform: "Intel Haswell"` or
1870    /// `minCpuPlatform: "Intel Sandy Bridge"`. For more
1871    /// information, read [how to specify min CPU
1872    /// platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
1873    pub min_cpu_platform: std::string::String,
1874
1875    /// The workload metadata configuration for this node.
1876    pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
1877
1878    /// List of kubernetes taints to be applied to each node.
1879    ///
1880    /// For more information, including usage and the valid values, see:
1881    /// <https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/>
1882    pub taints: std::vec::Vec<crate::model::NodeTaint>,
1883
1884    /// Sandbox configuration for this node.
1885    pub sandbox_config: std::option::Option<crate::model::SandboxConfig>,
1886
1887    /// Setting this field will assign instances of this
1888    /// pool to run on the specified node group. This is useful for running
1889    /// workloads on [sole tenant
1890    /// nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes).
1891    pub node_group: std::string::String,
1892
1893    /// The optional reservation affinity. Setting this field will apply
1894    /// the specified [Zonal Compute
1895    /// Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
1896    /// to this node pool.
1897    pub reservation_affinity: std::option::Option<crate::model::ReservationAffinity>,
1898
1899    /// Shielded Instance options.
1900    pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
1901
1902    /// Parameters that can be configured on Linux nodes.
1903    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
1904
1905    /// Node kubelet configs.
1906    pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
1907
1908    /// The Customer Managed Encryption Key used to encrypt the boot disk attached
1909    /// to each node in the node pool. This should be of the form
1910    /// projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME].
1911    /// For more information about protecting resources with Cloud KMS Keys please
1912    /// see:
1913    /// <https://cloud.google.com/compute/docs/disks/customer-managed-encryption>
1914    pub boot_disk_kms_key: std::string::String,
1915
1916    /// Google Container File System (image streaming) configs.
1917    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
1918
1919    /// Advanced features for the Compute Engine VM.
1920    pub advanced_machine_features: std::option::Option<crate::model::AdvancedMachineFeatures>,
1921
1922    /// Enable or disable gvnic in the node pool.
1923    pub gvnic: std::option::Option<crate::model::VirtualNIC>,
1924
1925    /// Spot flag for enabling Spot VM, which is a rebrand of
1926    /// the existing preemptible flag.
1927    pub spot: bool,
1928
1929    /// Confidential nodes config.
1930    /// All the nodes in the node pool will be Confidential VM once enabled.
1931    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
1932
1933    /// Enable or disable NCCL fast socket for the node pool.
1934    pub fast_socket: std::option::Option<crate::model::FastSocket>,
1935
1936    /// The resource labels for the node pool to use to annotate any related
1937    /// Google Compute Engine resources.
1938    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
1939
1940    /// Logging configuration.
1941    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
1942
1943    /// Parameters that can be configured on Windows nodes.
1944    pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
1945
1946    /// Parameters for using raw-block Local NVMe SSDs.
1947    pub local_nvme_ssd_block_config: std::option::Option<crate::model::LocalNvmeSsdBlockConfig>,
1948
1949    /// Parameters for the node ephemeral storage using Local SSDs.
1950    /// If unspecified, ephemeral storage is backed by the boot disk.
1951    pub ephemeral_storage_local_ssd_config:
1952        std::option::Option<crate::model::EphemeralStorageLocalSsdConfig>,
1953
1954    /// Parameters for node pools to be backed by shared sole tenant node groups.
1955    pub sole_tenant_config: std::option::Option<crate::model::SoleTenantConfig>,
1956
1957    /// Parameters for containerd customization.
1958    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
1959
1960    /// A map of resource manager tag keys and values to be attached to the nodes.
1961    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
1962
1963    /// Optional. Reserved for future use.
1964    pub enable_confidential_storage: bool,
1965
1966    /// List of secondary boot disks attached to the nodes.
1967    pub secondary_boot_disks: std::vec::Vec<crate::model::SecondaryBootDisk>,
1968
1969    /// List of Storage Pools where boot disks are provisioned.
1970    pub storage_pools: std::vec::Vec<std::string::String>,
1971
1972    /// Secondary boot disk update strategy.
1973    pub secondary_boot_disk_update_strategy:
1974        std::option::Option<crate::model::SecondaryBootDiskUpdateStrategy>,
1975
1976    /// The maximum duration for the nodes to exist.
1977    /// If unspecified, the nodes can exist indefinitely.
1978    pub max_run_duration: std::option::Option<wkt::Duration>,
1979
1980    /// Specifies which method should be used for encrypting the
1981    /// Local SSDs attached to the node.
1982    pub local_ssd_encryption_mode:
1983        std::option::Option<crate::model::node_config::LocalSsdEncryptionMode>,
1984
1985    /// Output only. effective_cgroup_mode is the cgroup mode actually used by the
1986    /// node pool. It is determined by the cgroup mode specified in the
1987    /// LinuxNodeConfig or the default cgroup mode based on the cluster creation
1988    /// version.
1989    pub effective_cgroup_mode: crate::model::node_config::EffectiveCgroupMode,
1990
1991    /// Flex Start flag for enabling Flex Start VM.
1992    pub flex_start: std::option::Option<bool>,
1993
1994    /// The boot disk configuration for the node pool.
1995    pub boot_disk: std::option::Option<crate::model::BootDisk>,
1996
1997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1998}
1999
2000impl NodeConfig {
2001    pub fn new() -> Self {
2002        std::default::Default::default()
2003    }
2004
2005    /// Sets the value of [machine_type][crate::model::NodeConfig::machine_type].
2006    pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2007        self.machine_type = v.into();
2008        self
2009    }
2010
2011    /// Sets the value of [disk_size_gb][crate::model::NodeConfig::disk_size_gb].
2012    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2013        self.disk_size_gb = v.into();
2014        self
2015    }
2016
2017    /// Sets the value of [oauth_scopes][crate::model::NodeConfig::oauth_scopes].
2018    pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
2019    where
2020        T: std::iter::IntoIterator<Item = V>,
2021        V: std::convert::Into<std::string::String>,
2022    {
2023        use std::iter::Iterator;
2024        self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
2025        self
2026    }
2027
2028    /// Sets the value of [service_account][crate::model::NodeConfig::service_account].
2029    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2030        self.service_account = v.into();
2031        self
2032    }
2033
2034    /// Sets the value of [metadata][crate::model::NodeConfig::metadata].
2035    pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
2036    where
2037        T: std::iter::IntoIterator<Item = (K, V)>,
2038        K: std::convert::Into<std::string::String>,
2039        V: std::convert::Into<std::string::String>,
2040    {
2041        use std::iter::Iterator;
2042        self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2043        self
2044    }
2045
2046    /// Sets the value of [image_type][crate::model::NodeConfig::image_type].
2047    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2048        self.image_type = v.into();
2049        self
2050    }
2051
2052    /// Sets the value of [labels][crate::model::NodeConfig::labels].
2053    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2054    where
2055        T: std::iter::IntoIterator<Item = (K, V)>,
2056        K: std::convert::Into<std::string::String>,
2057        V: std::convert::Into<std::string::String>,
2058    {
2059        use std::iter::Iterator;
2060        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2061        self
2062    }
2063
2064    /// Sets the value of [local_ssd_count][crate::model::NodeConfig::local_ssd_count].
2065    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2066        self.local_ssd_count = v.into();
2067        self
2068    }
2069
2070    /// Sets the value of [tags][crate::model::NodeConfig::tags].
2071    pub fn set_tags<T, V>(mut self, v: T) -> Self
2072    where
2073        T: std::iter::IntoIterator<Item = V>,
2074        V: std::convert::Into<std::string::String>,
2075    {
2076        use std::iter::Iterator;
2077        self.tags = v.into_iter().map(|i| i.into()).collect();
2078        self
2079    }
2080
2081    /// Sets the value of [preemptible][crate::model::NodeConfig::preemptible].
2082    pub fn set_preemptible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2083        self.preemptible = v.into();
2084        self
2085    }
2086
2087    /// Sets the value of [accelerators][crate::model::NodeConfig::accelerators].
2088    pub fn set_accelerators<T, V>(mut self, v: T) -> Self
2089    where
2090        T: std::iter::IntoIterator<Item = V>,
2091        V: std::convert::Into<crate::model::AcceleratorConfig>,
2092    {
2093        use std::iter::Iterator;
2094        self.accelerators = v.into_iter().map(|i| i.into()).collect();
2095        self
2096    }
2097
2098    /// Sets the value of [disk_type][crate::model::NodeConfig::disk_type].
2099    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2100        self.disk_type = v.into();
2101        self
2102    }
2103
2104    /// Sets the value of [min_cpu_platform][crate::model::NodeConfig::min_cpu_platform].
2105    pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
2106        mut self,
2107        v: T,
2108    ) -> Self {
2109        self.min_cpu_platform = v.into();
2110        self
2111    }
2112
2113    /// Sets the value of [workload_metadata_config][crate::model::NodeConfig::workload_metadata_config].
2114    pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
2115    where
2116        T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
2117    {
2118        self.workload_metadata_config = std::option::Option::Some(v.into());
2119        self
2120    }
2121
2122    /// Sets or clears the value of [workload_metadata_config][crate::model::NodeConfig::workload_metadata_config].
2123    pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
2124    where
2125        T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
2126    {
2127        self.workload_metadata_config = v.map(|x| x.into());
2128        self
2129    }
2130
2131    /// Sets the value of [taints][crate::model::NodeConfig::taints].
2132    pub fn set_taints<T, V>(mut self, v: T) -> Self
2133    where
2134        T: std::iter::IntoIterator<Item = V>,
2135        V: std::convert::Into<crate::model::NodeTaint>,
2136    {
2137        use std::iter::Iterator;
2138        self.taints = v.into_iter().map(|i| i.into()).collect();
2139        self
2140    }
2141
2142    /// Sets the value of [sandbox_config][crate::model::NodeConfig::sandbox_config].
2143    pub fn set_sandbox_config<T>(mut self, v: T) -> Self
2144    where
2145        T: std::convert::Into<crate::model::SandboxConfig>,
2146    {
2147        self.sandbox_config = std::option::Option::Some(v.into());
2148        self
2149    }
2150
2151    /// Sets or clears the value of [sandbox_config][crate::model::NodeConfig::sandbox_config].
2152    pub fn set_or_clear_sandbox_config<T>(mut self, v: std::option::Option<T>) -> Self
2153    where
2154        T: std::convert::Into<crate::model::SandboxConfig>,
2155    {
2156        self.sandbox_config = v.map(|x| x.into());
2157        self
2158    }
2159
2160    /// Sets the value of [node_group][crate::model::NodeConfig::node_group].
2161    pub fn set_node_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2162        self.node_group = v.into();
2163        self
2164    }
2165
2166    /// Sets the value of [reservation_affinity][crate::model::NodeConfig::reservation_affinity].
2167    pub fn set_reservation_affinity<T>(mut self, v: T) -> Self
2168    where
2169        T: std::convert::Into<crate::model::ReservationAffinity>,
2170    {
2171        self.reservation_affinity = std::option::Option::Some(v.into());
2172        self
2173    }
2174
2175    /// Sets or clears the value of [reservation_affinity][crate::model::NodeConfig::reservation_affinity].
2176    pub fn set_or_clear_reservation_affinity<T>(mut self, v: std::option::Option<T>) -> Self
2177    where
2178        T: std::convert::Into<crate::model::ReservationAffinity>,
2179    {
2180        self.reservation_affinity = v.map(|x| x.into());
2181        self
2182    }
2183
2184    /// Sets the value of [shielded_instance_config][crate::model::NodeConfig::shielded_instance_config].
2185    pub fn set_shielded_instance_config<T>(mut self, v: T) -> Self
2186    where
2187        T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
2188    {
2189        self.shielded_instance_config = std::option::Option::Some(v.into());
2190        self
2191    }
2192
2193    /// Sets or clears the value of [shielded_instance_config][crate::model::NodeConfig::shielded_instance_config].
2194    pub fn set_or_clear_shielded_instance_config<T>(mut self, v: std::option::Option<T>) -> Self
2195    where
2196        T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
2197    {
2198        self.shielded_instance_config = v.map(|x| x.into());
2199        self
2200    }
2201
2202    /// Sets the value of [linux_node_config][crate::model::NodeConfig::linux_node_config].
2203    pub fn set_linux_node_config<T>(mut self, v: T) -> Self
2204    where
2205        T: std::convert::Into<crate::model::LinuxNodeConfig>,
2206    {
2207        self.linux_node_config = std::option::Option::Some(v.into());
2208        self
2209    }
2210
2211    /// Sets or clears the value of [linux_node_config][crate::model::NodeConfig::linux_node_config].
2212    pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
2213    where
2214        T: std::convert::Into<crate::model::LinuxNodeConfig>,
2215    {
2216        self.linux_node_config = v.map(|x| x.into());
2217        self
2218    }
2219
2220    /// Sets the value of [kubelet_config][crate::model::NodeConfig::kubelet_config].
2221    pub fn set_kubelet_config<T>(mut self, v: T) -> Self
2222    where
2223        T: std::convert::Into<crate::model::NodeKubeletConfig>,
2224    {
2225        self.kubelet_config = std::option::Option::Some(v.into());
2226        self
2227    }
2228
2229    /// Sets or clears the value of [kubelet_config][crate::model::NodeConfig::kubelet_config].
2230    pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
2231    where
2232        T: std::convert::Into<crate::model::NodeKubeletConfig>,
2233    {
2234        self.kubelet_config = v.map(|x| x.into());
2235        self
2236    }
2237
2238    /// Sets the value of [boot_disk_kms_key][crate::model::NodeConfig::boot_disk_kms_key].
2239    pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
2240        mut self,
2241        v: T,
2242    ) -> Self {
2243        self.boot_disk_kms_key = v.into();
2244        self
2245    }
2246
2247    /// Sets the value of [gcfs_config][crate::model::NodeConfig::gcfs_config].
2248    pub fn set_gcfs_config<T>(mut self, v: T) -> Self
2249    where
2250        T: std::convert::Into<crate::model::GcfsConfig>,
2251    {
2252        self.gcfs_config = std::option::Option::Some(v.into());
2253        self
2254    }
2255
2256    /// Sets or clears the value of [gcfs_config][crate::model::NodeConfig::gcfs_config].
2257    pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
2258    where
2259        T: std::convert::Into<crate::model::GcfsConfig>,
2260    {
2261        self.gcfs_config = v.map(|x| x.into());
2262        self
2263    }
2264
2265    /// Sets the value of [advanced_machine_features][crate::model::NodeConfig::advanced_machine_features].
2266    pub fn set_advanced_machine_features<T>(mut self, v: T) -> Self
2267    where
2268        T: std::convert::Into<crate::model::AdvancedMachineFeatures>,
2269    {
2270        self.advanced_machine_features = std::option::Option::Some(v.into());
2271        self
2272    }
2273
2274    /// Sets or clears the value of [advanced_machine_features][crate::model::NodeConfig::advanced_machine_features].
2275    pub fn set_or_clear_advanced_machine_features<T>(mut self, v: std::option::Option<T>) -> Self
2276    where
2277        T: std::convert::Into<crate::model::AdvancedMachineFeatures>,
2278    {
2279        self.advanced_machine_features = v.map(|x| x.into());
2280        self
2281    }
2282
2283    /// Sets the value of [gvnic][crate::model::NodeConfig::gvnic].
2284    pub fn set_gvnic<T>(mut self, v: T) -> Self
2285    where
2286        T: std::convert::Into<crate::model::VirtualNIC>,
2287    {
2288        self.gvnic = std::option::Option::Some(v.into());
2289        self
2290    }
2291
2292    /// Sets or clears the value of [gvnic][crate::model::NodeConfig::gvnic].
2293    pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
2294    where
2295        T: std::convert::Into<crate::model::VirtualNIC>,
2296    {
2297        self.gvnic = v.map(|x| x.into());
2298        self
2299    }
2300
2301    /// Sets the value of [spot][crate::model::NodeConfig::spot].
2302    pub fn set_spot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2303        self.spot = v.into();
2304        self
2305    }
2306
2307    /// Sets the value of [confidential_nodes][crate::model::NodeConfig::confidential_nodes].
2308    pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
2309    where
2310        T: std::convert::Into<crate::model::ConfidentialNodes>,
2311    {
2312        self.confidential_nodes = std::option::Option::Some(v.into());
2313        self
2314    }
2315
2316    /// Sets or clears the value of [confidential_nodes][crate::model::NodeConfig::confidential_nodes].
2317    pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
2318    where
2319        T: std::convert::Into<crate::model::ConfidentialNodes>,
2320    {
2321        self.confidential_nodes = v.map(|x| x.into());
2322        self
2323    }
2324
2325    /// Sets the value of [fast_socket][crate::model::NodeConfig::fast_socket].
2326    pub fn set_fast_socket<T>(mut self, v: T) -> Self
2327    where
2328        T: std::convert::Into<crate::model::FastSocket>,
2329    {
2330        self.fast_socket = std::option::Option::Some(v.into());
2331        self
2332    }
2333
2334    /// Sets or clears the value of [fast_socket][crate::model::NodeConfig::fast_socket].
2335    pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
2336    where
2337        T: std::convert::Into<crate::model::FastSocket>,
2338    {
2339        self.fast_socket = v.map(|x| x.into());
2340        self
2341    }
2342
2343    /// Sets the value of [resource_labels][crate::model::NodeConfig::resource_labels].
2344    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2345    where
2346        T: std::iter::IntoIterator<Item = (K, V)>,
2347        K: std::convert::Into<std::string::String>,
2348        V: std::convert::Into<std::string::String>,
2349    {
2350        use std::iter::Iterator;
2351        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2352        self
2353    }
2354
2355    /// Sets the value of [logging_config][crate::model::NodeConfig::logging_config].
2356    pub fn set_logging_config<T>(mut self, v: T) -> Self
2357    where
2358        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
2359    {
2360        self.logging_config = std::option::Option::Some(v.into());
2361        self
2362    }
2363
2364    /// Sets or clears the value of [logging_config][crate::model::NodeConfig::logging_config].
2365    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
2366    where
2367        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
2368    {
2369        self.logging_config = v.map(|x| x.into());
2370        self
2371    }
2372
2373    /// Sets the value of [windows_node_config][crate::model::NodeConfig::windows_node_config].
2374    pub fn set_windows_node_config<T>(mut self, v: T) -> Self
2375    where
2376        T: std::convert::Into<crate::model::WindowsNodeConfig>,
2377    {
2378        self.windows_node_config = std::option::Option::Some(v.into());
2379        self
2380    }
2381
2382    /// Sets or clears the value of [windows_node_config][crate::model::NodeConfig::windows_node_config].
2383    pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
2384    where
2385        T: std::convert::Into<crate::model::WindowsNodeConfig>,
2386    {
2387        self.windows_node_config = v.map(|x| x.into());
2388        self
2389    }
2390
2391    /// Sets the value of [local_nvme_ssd_block_config][crate::model::NodeConfig::local_nvme_ssd_block_config].
2392    pub fn set_local_nvme_ssd_block_config<T>(mut self, v: T) -> Self
2393    where
2394        T: std::convert::Into<crate::model::LocalNvmeSsdBlockConfig>,
2395    {
2396        self.local_nvme_ssd_block_config = std::option::Option::Some(v.into());
2397        self
2398    }
2399
2400    /// Sets or clears the value of [local_nvme_ssd_block_config][crate::model::NodeConfig::local_nvme_ssd_block_config].
2401    pub fn set_or_clear_local_nvme_ssd_block_config<T>(mut self, v: std::option::Option<T>) -> Self
2402    where
2403        T: std::convert::Into<crate::model::LocalNvmeSsdBlockConfig>,
2404    {
2405        self.local_nvme_ssd_block_config = v.map(|x| x.into());
2406        self
2407    }
2408
2409    /// Sets the value of [ephemeral_storage_local_ssd_config][crate::model::NodeConfig::ephemeral_storage_local_ssd_config].
2410    pub fn set_ephemeral_storage_local_ssd_config<T>(mut self, v: T) -> Self
2411    where
2412        T: std::convert::Into<crate::model::EphemeralStorageLocalSsdConfig>,
2413    {
2414        self.ephemeral_storage_local_ssd_config = std::option::Option::Some(v.into());
2415        self
2416    }
2417
2418    /// Sets or clears the value of [ephemeral_storage_local_ssd_config][crate::model::NodeConfig::ephemeral_storage_local_ssd_config].
2419    pub fn set_or_clear_ephemeral_storage_local_ssd_config<T>(
2420        mut self,
2421        v: std::option::Option<T>,
2422    ) -> Self
2423    where
2424        T: std::convert::Into<crate::model::EphemeralStorageLocalSsdConfig>,
2425    {
2426        self.ephemeral_storage_local_ssd_config = v.map(|x| x.into());
2427        self
2428    }
2429
2430    /// Sets the value of [sole_tenant_config][crate::model::NodeConfig::sole_tenant_config].
2431    pub fn set_sole_tenant_config<T>(mut self, v: T) -> Self
2432    where
2433        T: std::convert::Into<crate::model::SoleTenantConfig>,
2434    {
2435        self.sole_tenant_config = std::option::Option::Some(v.into());
2436        self
2437    }
2438
2439    /// Sets or clears the value of [sole_tenant_config][crate::model::NodeConfig::sole_tenant_config].
2440    pub fn set_or_clear_sole_tenant_config<T>(mut self, v: std::option::Option<T>) -> Self
2441    where
2442        T: std::convert::Into<crate::model::SoleTenantConfig>,
2443    {
2444        self.sole_tenant_config = v.map(|x| x.into());
2445        self
2446    }
2447
2448    /// Sets the value of [containerd_config][crate::model::NodeConfig::containerd_config].
2449    pub fn set_containerd_config<T>(mut self, v: T) -> Self
2450    where
2451        T: std::convert::Into<crate::model::ContainerdConfig>,
2452    {
2453        self.containerd_config = std::option::Option::Some(v.into());
2454        self
2455    }
2456
2457    /// Sets or clears the value of [containerd_config][crate::model::NodeConfig::containerd_config].
2458    pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
2459    where
2460        T: std::convert::Into<crate::model::ContainerdConfig>,
2461    {
2462        self.containerd_config = v.map(|x| x.into());
2463        self
2464    }
2465
2466    /// Sets the value of [resource_manager_tags][crate::model::NodeConfig::resource_manager_tags].
2467    pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
2468    where
2469        T: std::convert::Into<crate::model::ResourceManagerTags>,
2470    {
2471        self.resource_manager_tags = std::option::Option::Some(v.into());
2472        self
2473    }
2474
2475    /// Sets or clears the value of [resource_manager_tags][crate::model::NodeConfig::resource_manager_tags].
2476    pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
2477    where
2478        T: std::convert::Into<crate::model::ResourceManagerTags>,
2479    {
2480        self.resource_manager_tags = v.map(|x| x.into());
2481        self
2482    }
2483
2484    /// Sets the value of [enable_confidential_storage][crate::model::NodeConfig::enable_confidential_storage].
2485    pub fn set_enable_confidential_storage<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2486        self.enable_confidential_storage = v.into();
2487        self
2488    }
2489
2490    /// Sets the value of [secondary_boot_disks][crate::model::NodeConfig::secondary_boot_disks].
2491    pub fn set_secondary_boot_disks<T, V>(mut self, v: T) -> Self
2492    where
2493        T: std::iter::IntoIterator<Item = V>,
2494        V: std::convert::Into<crate::model::SecondaryBootDisk>,
2495    {
2496        use std::iter::Iterator;
2497        self.secondary_boot_disks = v.into_iter().map(|i| i.into()).collect();
2498        self
2499    }
2500
2501    /// Sets the value of [storage_pools][crate::model::NodeConfig::storage_pools].
2502    pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
2503    where
2504        T: std::iter::IntoIterator<Item = V>,
2505        V: std::convert::Into<std::string::String>,
2506    {
2507        use std::iter::Iterator;
2508        self.storage_pools = v.into_iter().map(|i| i.into()).collect();
2509        self
2510    }
2511
2512    /// Sets the value of [secondary_boot_disk_update_strategy][crate::model::NodeConfig::secondary_boot_disk_update_strategy].
2513    pub fn set_secondary_boot_disk_update_strategy<T>(mut self, v: T) -> Self
2514    where
2515        T: std::convert::Into<crate::model::SecondaryBootDiskUpdateStrategy>,
2516    {
2517        self.secondary_boot_disk_update_strategy = std::option::Option::Some(v.into());
2518        self
2519    }
2520
2521    /// Sets or clears the value of [secondary_boot_disk_update_strategy][crate::model::NodeConfig::secondary_boot_disk_update_strategy].
2522    pub fn set_or_clear_secondary_boot_disk_update_strategy<T>(
2523        mut self,
2524        v: std::option::Option<T>,
2525    ) -> Self
2526    where
2527        T: std::convert::Into<crate::model::SecondaryBootDiskUpdateStrategy>,
2528    {
2529        self.secondary_boot_disk_update_strategy = v.map(|x| x.into());
2530        self
2531    }
2532
2533    /// Sets the value of [max_run_duration][crate::model::NodeConfig::max_run_duration].
2534    pub fn set_max_run_duration<T>(mut self, v: T) -> Self
2535    where
2536        T: std::convert::Into<wkt::Duration>,
2537    {
2538        self.max_run_duration = std::option::Option::Some(v.into());
2539        self
2540    }
2541
2542    /// Sets or clears the value of [max_run_duration][crate::model::NodeConfig::max_run_duration].
2543    pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
2544    where
2545        T: std::convert::Into<wkt::Duration>,
2546    {
2547        self.max_run_duration = v.map(|x| x.into());
2548        self
2549    }
2550
2551    /// Sets the value of [local_ssd_encryption_mode][crate::model::NodeConfig::local_ssd_encryption_mode].
2552    pub fn set_local_ssd_encryption_mode<T>(mut self, v: T) -> Self
2553    where
2554        T: std::convert::Into<crate::model::node_config::LocalSsdEncryptionMode>,
2555    {
2556        self.local_ssd_encryption_mode = std::option::Option::Some(v.into());
2557        self
2558    }
2559
2560    /// Sets or clears the value of [local_ssd_encryption_mode][crate::model::NodeConfig::local_ssd_encryption_mode].
2561    pub fn set_or_clear_local_ssd_encryption_mode<T>(mut self, v: std::option::Option<T>) -> Self
2562    where
2563        T: std::convert::Into<crate::model::node_config::LocalSsdEncryptionMode>,
2564    {
2565        self.local_ssd_encryption_mode = v.map(|x| x.into());
2566        self
2567    }
2568
2569    /// Sets the value of [effective_cgroup_mode][crate::model::NodeConfig::effective_cgroup_mode].
2570    pub fn set_effective_cgroup_mode<
2571        T: std::convert::Into<crate::model::node_config::EffectiveCgroupMode>,
2572    >(
2573        mut self,
2574        v: T,
2575    ) -> Self {
2576        self.effective_cgroup_mode = v.into();
2577        self
2578    }
2579
2580    /// Sets the value of [flex_start][crate::model::NodeConfig::flex_start].
2581    pub fn set_flex_start<T>(mut self, v: T) -> Self
2582    where
2583        T: std::convert::Into<bool>,
2584    {
2585        self.flex_start = std::option::Option::Some(v.into());
2586        self
2587    }
2588
2589    /// Sets or clears the value of [flex_start][crate::model::NodeConfig::flex_start].
2590    pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
2591    where
2592        T: std::convert::Into<bool>,
2593    {
2594        self.flex_start = v.map(|x| x.into());
2595        self
2596    }
2597
2598    /// Sets the value of [boot_disk][crate::model::NodeConfig::boot_disk].
2599    pub fn set_boot_disk<T>(mut self, v: T) -> Self
2600    where
2601        T: std::convert::Into<crate::model::BootDisk>,
2602    {
2603        self.boot_disk = std::option::Option::Some(v.into());
2604        self
2605    }
2606
2607    /// Sets or clears the value of [boot_disk][crate::model::NodeConfig::boot_disk].
2608    pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
2609    where
2610        T: std::convert::Into<crate::model::BootDisk>,
2611    {
2612        self.boot_disk = v.map(|x| x.into());
2613        self
2614    }
2615}
2616
2617impl wkt::message::Message for NodeConfig {
2618    fn typename() -> &'static str {
2619        "type.googleapis.com/google.container.v1.NodeConfig"
2620    }
2621}
2622
2623/// Defines additional types related to [NodeConfig].
2624pub mod node_config {
2625    #[allow(unused_imports)]
2626    use super::*;
2627
2628    /// LocalSsdEncryptionMode specifies the method used for encrypting the Local
2629    /// SSDs attached to the node.
2630    ///
2631    /// # Working with unknown values
2632    ///
2633    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2634    /// additional enum variants at any time. Adding new variants is not considered
2635    /// a breaking change. Applications should write their code in anticipation of:
2636    ///
2637    /// - New values appearing in future releases of the client library, **and**
2638    /// - New values received dynamically, without application changes.
2639    ///
2640    /// Please consult the [Working with enums] section in the user guide for some
2641    /// guidelines.
2642    ///
2643    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2644    #[derive(Clone, Debug, PartialEq)]
2645    #[non_exhaustive]
2646    pub enum LocalSsdEncryptionMode {
2647        /// The given node will be encrypted using keys managed by Google
2648        /// infrastructure and the keys will be deleted when the node is
2649        /// deleted.
2650        Unspecified,
2651        /// The given node will be encrypted using keys managed by Google
2652        /// infrastructure and the keys will be deleted when the node is
2653        /// deleted.
2654        StandardEncryption,
2655        /// The given node will opt-in for using ephemeral key for
2656        /// encryption of Local SSDs.
2657        /// The Local SSDs will not be able to recover data in case of node
2658        /// crash.
2659        EphemeralKeyEncryption,
2660        /// If set, the enum was initialized with an unknown value.
2661        ///
2662        /// Applications can examine the value using [LocalSsdEncryptionMode::value] or
2663        /// [LocalSsdEncryptionMode::name].
2664        UnknownValue(local_ssd_encryption_mode::UnknownValue),
2665    }
2666
2667    #[doc(hidden)]
2668    pub mod local_ssd_encryption_mode {
2669        #[allow(unused_imports)]
2670        use super::*;
2671        #[derive(Clone, Debug, PartialEq)]
2672        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2673    }
2674
2675    impl LocalSsdEncryptionMode {
2676        /// Gets the enum value.
2677        ///
2678        /// Returns `None` if the enum contains an unknown value deserialized from
2679        /// the string representation of enums.
2680        pub fn value(&self) -> std::option::Option<i32> {
2681            match self {
2682                Self::Unspecified => std::option::Option::Some(0),
2683                Self::StandardEncryption => std::option::Option::Some(1),
2684                Self::EphemeralKeyEncryption => std::option::Option::Some(2),
2685                Self::UnknownValue(u) => u.0.value(),
2686            }
2687        }
2688
2689        /// Gets the enum value as a string.
2690        ///
2691        /// Returns `None` if the enum contains an unknown value deserialized from
2692        /// the integer representation of enums.
2693        pub fn name(&self) -> std::option::Option<&str> {
2694            match self {
2695                Self::Unspecified => {
2696                    std::option::Option::Some("LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED")
2697                }
2698                Self::StandardEncryption => std::option::Option::Some("STANDARD_ENCRYPTION"),
2699                Self::EphemeralKeyEncryption => {
2700                    std::option::Option::Some("EPHEMERAL_KEY_ENCRYPTION")
2701                }
2702                Self::UnknownValue(u) => u.0.name(),
2703            }
2704        }
2705    }
2706
2707    impl std::default::Default for LocalSsdEncryptionMode {
2708        fn default() -> Self {
2709            use std::convert::From;
2710            Self::from(0)
2711        }
2712    }
2713
2714    impl std::fmt::Display for LocalSsdEncryptionMode {
2715        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2716            wkt::internal::display_enum(f, self.name(), self.value())
2717        }
2718    }
2719
2720    impl std::convert::From<i32> for LocalSsdEncryptionMode {
2721        fn from(value: i32) -> Self {
2722            match value {
2723                0 => Self::Unspecified,
2724                1 => Self::StandardEncryption,
2725                2 => Self::EphemeralKeyEncryption,
2726                _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
2727                    wkt::internal::UnknownEnumValue::Integer(value),
2728                )),
2729            }
2730        }
2731    }
2732
2733    impl std::convert::From<&str> for LocalSsdEncryptionMode {
2734        fn from(value: &str) -> Self {
2735            use std::string::ToString;
2736            match value {
2737                "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED" => Self::Unspecified,
2738                "STANDARD_ENCRYPTION" => Self::StandardEncryption,
2739                "EPHEMERAL_KEY_ENCRYPTION" => Self::EphemeralKeyEncryption,
2740                _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
2741                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2742                )),
2743            }
2744        }
2745    }
2746
2747    impl serde::ser::Serialize for LocalSsdEncryptionMode {
2748        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2749        where
2750            S: serde::Serializer,
2751        {
2752            match self {
2753                Self::Unspecified => serializer.serialize_i32(0),
2754                Self::StandardEncryption => serializer.serialize_i32(1),
2755                Self::EphemeralKeyEncryption => serializer.serialize_i32(2),
2756                Self::UnknownValue(u) => u.0.serialize(serializer),
2757            }
2758        }
2759    }
2760
2761    impl<'de> serde::de::Deserialize<'de> for LocalSsdEncryptionMode {
2762        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2763        where
2764            D: serde::Deserializer<'de>,
2765        {
2766            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocalSsdEncryptionMode>::new(
2767                ".google.container.v1.NodeConfig.LocalSsdEncryptionMode",
2768            ))
2769        }
2770    }
2771
2772    /// Possible effective cgroup modes for the node.
2773    ///
2774    /// # Working with unknown values
2775    ///
2776    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2777    /// additional enum variants at any time. Adding new variants is not considered
2778    /// a breaking change. Applications should write their code in anticipation of:
2779    ///
2780    /// - New values appearing in future releases of the client library, **and**
2781    /// - New values received dynamically, without application changes.
2782    ///
2783    /// Please consult the [Working with enums] section in the user guide for some
2784    /// guidelines.
2785    ///
2786    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2787    #[derive(Clone, Debug, PartialEq)]
2788    #[non_exhaustive]
2789    pub enum EffectiveCgroupMode {
2790        /// EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the
2791        /// node pool is unspecified, i.e. the node pool is a Windows node pool.
2792        Unspecified,
2793        /// CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the
2794        /// cgroup configuration.
2795        V1,
2796        /// CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the
2797        /// cgroup configuration.
2798        V2,
2799        /// If set, the enum was initialized with an unknown value.
2800        ///
2801        /// Applications can examine the value using [EffectiveCgroupMode::value] or
2802        /// [EffectiveCgroupMode::name].
2803        UnknownValue(effective_cgroup_mode::UnknownValue),
2804    }
2805
2806    #[doc(hidden)]
2807    pub mod effective_cgroup_mode {
2808        #[allow(unused_imports)]
2809        use super::*;
2810        #[derive(Clone, Debug, PartialEq)]
2811        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2812    }
2813
2814    impl EffectiveCgroupMode {
2815        /// Gets the enum value.
2816        ///
2817        /// Returns `None` if the enum contains an unknown value deserialized from
2818        /// the string representation of enums.
2819        pub fn value(&self) -> std::option::Option<i32> {
2820            match self {
2821                Self::Unspecified => std::option::Option::Some(0),
2822                Self::V1 => std::option::Option::Some(1),
2823                Self::V2 => std::option::Option::Some(2),
2824                Self::UnknownValue(u) => u.0.value(),
2825            }
2826        }
2827
2828        /// Gets the enum value as a string.
2829        ///
2830        /// Returns `None` if the enum contains an unknown value deserialized from
2831        /// the integer representation of enums.
2832        pub fn name(&self) -> std::option::Option<&str> {
2833            match self {
2834                Self::Unspecified => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_UNSPECIFIED"),
2835                Self::V1 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V1"),
2836                Self::V2 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V2"),
2837                Self::UnknownValue(u) => u.0.name(),
2838            }
2839        }
2840    }
2841
2842    impl std::default::Default for EffectiveCgroupMode {
2843        fn default() -> Self {
2844            use std::convert::From;
2845            Self::from(0)
2846        }
2847    }
2848
2849    impl std::fmt::Display for EffectiveCgroupMode {
2850        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2851            wkt::internal::display_enum(f, self.name(), self.value())
2852        }
2853    }
2854
2855    impl std::convert::From<i32> for EffectiveCgroupMode {
2856        fn from(value: i32) -> Self {
2857            match value {
2858                0 => Self::Unspecified,
2859                1 => Self::V1,
2860                2 => Self::V2,
2861                _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
2862                    wkt::internal::UnknownEnumValue::Integer(value),
2863                )),
2864            }
2865        }
2866    }
2867
2868    impl std::convert::From<&str> for EffectiveCgroupMode {
2869        fn from(value: &str) -> Self {
2870            use std::string::ToString;
2871            match value {
2872                "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
2873                "EFFECTIVE_CGROUP_MODE_V1" => Self::V1,
2874                "EFFECTIVE_CGROUP_MODE_V2" => Self::V2,
2875                _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
2876                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2877                )),
2878            }
2879        }
2880    }
2881
2882    impl serde::ser::Serialize for EffectiveCgroupMode {
2883        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2884        where
2885            S: serde::Serializer,
2886        {
2887            match self {
2888                Self::Unspecified => serializer.serialize_i32(0),
2889                Self::V1 => serializer.serialize_i32(1),
2890                Self::V2 => serializer.serialize_i32(2),
2891                Self::UnknownValue(u) => u.0.serialize(serializer),
2892            }
2893        }
2894    }
2895
2896    impl<'de> serde::de::Deserialize<'de> for EffectiveCgroupMode {
2897        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2898        where
2899            D: serde::Deserializer<'de>,
2900        {
2901            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EffectiveCgroupMode>::new(
2902                ".google.container.v1.NodeConfig.EffectiveCgroupMode",
2903            ))
2904        }
2905    }
2906}
2907
2908/// Specifies options for controlling advanced machine features.
2909#[derive(Clone, Default, PartialEq)]
2910#[non_exhaustive]
2911pub struct AdvancedMachineFeatures {
2912    /// The number of threads per physical core. To disable simultaneous
2913    /// multithreading (SMT) set this to 1. If unset, the maximum number of threads
2914    /// supported per core by the underlying processor is assumed.
2915    pub threads_per_core: std::option::Option<i64>,
2916
2917    /// Whether or not to enable nested virtualization (defaults to false).
2918    pub enable_nested_virtualization: std::option::Option<bool>,
2919
2920    /// Type of Performance Monitoring Unit (PMU) requested on node pool instances.
2921    /// If unset, PMU will not be available to the node.
2922    pub performance_monitoring_unit:
2923        std::option::Option<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
2924
2925    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2926}
2927
2928impl AdvancedMachineFeatures {
2929    pub fn new() -> Self {
2930        std::default::Default::default()
2931    }
2932
2933    /// Sets the value of [threads_per_core][crate::model::AdvancedMachineFeatures::threads_per_core].
2934    pub fn set_threads_per_core<T>(mut self, v: T) -> Self
2935    where
2936        T: std::convert::Into<i64>,
2937    {
2938        self.threads_per_core = std::option::Option::Some(v.into());
2939        self
2940    }
2941
2942    /// Sets or clears the value of [threads_per_core][crate::model::AdvancedMachineFeatures::threads_per_core].
2943    pub fn set_or_clear_threads_per_core<T>(mut self, v: std::option::Option<T>) -> Self
2944    where
2945        T: std::convert::Into<i64>,
2946    {
2947        self.threads_per_core = v.map(|x| x.into());
2948        self
2949    }
2950
2951    /// Sets the value of [enable_nested_virtualization][crate::model::AdvancedMachineFeatures::enable_nested_virtualization].
2952    pub fn set_enable_nested_virtualization<T>(mut self, v: T) -> Self
2953    where
2954        T: std::convert::Into<bool>,
2955    {
2956        self.enable_nested_virtualization = std::option::Option::Some(v.into());
2957        self
2958    }
2959
2960    /// Sets or clears the value of [enable_nested_virtualization][crate::model::AdvancedMachineFeatures::enable_nested_virtualization].
2961    pub fn set_or_clear_enable_nested_virtualization<T>(mut self, v: std::option::Option<T>) -> Self
2962    where
2963        T: std::convert::Into<bool>,
2964    {
2965        self.enable_nested_virtualization = v.map(|x| x.into());
2966        self
2967    }
2968
2969    /// Sets the value of [performance_monitoring_unit][crate::model::AdvancedMachineFeatures::performance_monitoring_unit].
2970    pub fn set_performance_monitoring_unit<T>(mut self, v: T) -> Self
2971    where
2972        T: std::convert::Into<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
2973    {
2974        self.performance_monitoring_unit = std::option::Option::Some(v.into());
2975        self
2976    }
2977
2978    /// Sets or clears the value of [performance_monitoring_unit][crate::model::AdvancedMachineFeatures::performance_monitoring_unit].
2979    pub fn set_or_clear_performance_monitoring_unit<T>(mut self, v: std::option::Option<T>) -> Self
2980    where
2981        T: std::convert::Into<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
2982    {
2983        self.performance_monitoring_unit = v.map(|x| x.into());
2984        self
2985    }
2986}
2987
2988impl wkt::message::Message for AdvancedMachineFeatures {
2989    fn typename() -> &'static str {
2990        "type.googleapis.com/google.container.v1.AdvancedMachineFeatures"
2991    }
2992}
2993
2994/// Defines additional types related to [AdvancedMachineFeatures].
2995pub mod advanced_machine_features {
2996    #[allow(unused_imports)]
2997    use super::*;
2998
2999    /// Level of PMU access.
3000    ///
3001    /// # Working with unknown values
3002    ///
3003    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3004    /// additional enum variants at any time. Adding new variants is not considered
3005    /// a breaking change. Applications should write their code in anticipation of:
3006    ///
3007    /// - New values appearing in future releases of the client library, **and**
3008    /// - New values received dynamically, without application changes.
3009    ///
3010    /// Please consult the [Working with enums] section in the user guide for some
3011    /// guidelines.
3012    ///
3013    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3014    #[derive(Clone, Debug, PartialEq)]
3015    #[non_exhaustive]
3016    pub enum PerformanceMonitoringUnit {
3017        /// PMU not enabled.
3018        Unspecified,
3019        /// Architecturally defined non-LLC events.
3020        Architectural,
3021        /// Most documented core/L2 events.
3022        Standard,
3023        /// Most documented core/L2 and LLC events.
3024        Enhanced,
3025        /// If set, the enum was initialized with an unknown value.
3026        ///
3027        /// Applications can examine the value using [PerformanceMonitoringUnit::value] or
3028        /// [PerformanceMonitoringUnit::name].
3029        UnknownValue(performance_monitoring_unit::UnknownValue),
3030    }
3031
3032    #[doc(hidden)]
3033    pub mod performance_monitoring_unit {
3034        #[allow(unused_imports)]
3035        use super::*;
3036        #[derive(Clone, Debug, PartialEq)]
3037        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3038    }
3039
3040    impl PerformanceMonitoringUnit {
3041        /// Gets the enum value.
3042        ///
3043        /// Returns `None` if the enum contains an unknown value deserialized from
3044        /// the string representation of enums.
3045        pub fn value(&self) -> std::option::Option<i32> {
3046            match self {
3047                Self::Unspecified => std::option::Option::Some(0),
3048                Self::Architectural => std::option::Option::Some(1),
3049                Self::Standard => std::option::Option::Some(2),
3050                Self::Enhanced => std::option::Option::Some(3),
3051                Self::UnknownValue(u) => u.0.value(),
3052            }
3053        }
3054
3055        /// Gets the enum value as a string.
3056        ///
3057        /// Returns `None` if the enum contains an unknown value deserialized from
3058        /// the integer representation of enums.
3059        pub fn name(&self) -> std::option::Option<&str> {
3060            match self {
3061                Self::Unspecified => {
3062                    std::option::Option::Some("PERFORMANCE_MONITORING_UNIT_UNSPECIFIED")
3063                }
3064                Self::Architectural => std::option::Option::Some("ARCHITECTURAL"),
3065                Self::Standard => std::option::Option::Some("STANDARD"),
3066                Self::Enhanced => std::option::Option::Some("ENHANCED"),
3067                Self::UnknownValue(u) => u.0.name(),
3068            }
3069        }
3070    }
3071
3072    impl std::default::Default for PerformanceMonitoringUnit {
3073        fn default() -> Self {
3074            use std::convert::From;
3075            Self::from(0)
3076        }
3077    }
3078
3079    impl std::fmt::Display for PerformanceMonitoringUnit {
3080        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3081            wkt::internal::display_enum(f, self.name(), self.value())
3082        }
3083    }
3084
3085    impl std::convert::From<i32> for PerformanceMonitoringUnit {
3086        fn from(value: i32) -> Self {
3087            match value {
3088                0 => Self::Unspecified,
3089                1 => Self::Architectural,
3090                2 => Self::Standard,
3091                3 => Self::Enhanced,
3092                _ => Self::UnknownValue(performance_monitoring_unit::UnknownValue(
3093                    wkt::internal::UnknownEnumValue::Integer(value),
3094                )),
3095            }
3096        }
3097    }
3098
3099    impl std::convert::From<&str> for PerformanceMonitoringUnit {
3100        fn from(value: &str) -> Self {
3101            use std::string::ToString;
3102            match value {
3103                "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED" => Self::Unspecified,
3104                "ARCHITECTURAL" => Self::Architectural,
3105                "STANDARD" => Self::Standard,
3106                "ENHANCED" => Self::Enhanced,
3107                _ => Self::UnknownValue(performance_monitoring_unit::UnknownValue(
3108                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3109                )),
3110            }
3111        }
3112    }
3113
3114    impl serde::ser::Serialize for PerformanceMonitoringUnit {
3115        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3116        where
3117            S: serde::Serializer,
3118        {
3119            match self {
3120                Self::Unspecified => serializer.serialize_i32(0),
3121                Self::Architectural => serializer.serialize_i32(1),
3122                Self::Standard => serializer.serialize_i32(2),
3123                Self::Enhanced => serializer.serialize_i32(3),
3124                Self::UnknownValue(u) => u.0.serialize(serializer),
3125            }
3126        }
3127    }
3128
3129    impl<'de> serde::de::Deserialize<'de> for PerformanceMonitoringUnit {
3130        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3131        where
3132            D: serde::Deserializer<'de>,
3133        {
3134            deserializer.deserialize_any(
3135                wkt::internal::EnumVisitor::<PerformanceMonitoringUnit>::new(
3136                    ".google.container.v1.AdvancedMachineFeatures.PerformanceMonitoringUnit",
3137                ),
3138            )
3139        }
3140    }
3141}
3142
3143/// Parameters for node pool-level network config.
3144#[derive(Clone, Default, PartialEq)]
3145#[non_exhaustive]
3146pub struct NodeNetworkConfig {
3147    /// Input only. Whether to create a new range for pod IPs in this node pool.
3148    /// Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they
3149    /// are not specified.
3150    ///
3151    /// If neither `create_pod_range` or `pod_range` are specified, the
3152    /// cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is
3153    /// used.
3154    ///
3155    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
3156    ///
3157    /// This field cannot be changed after the node pool has been created.
3158    pub create_pod_range: bool,
3159
3160    /// The ID of the secondary range for pod IPs.
3161    /// If `create_pod_range` is true, this ID is used for the new range.
3162    /// If `create_pod_range` is false, uses an existing secondary range with this
3163    /// ID.
3164    ///
3165    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
3166    ///
3167    /// This field cannot be changed after the node pool has been created.
3168    pub pod_range: std::string::String,
3169
3170    /// The IP address range for pod IPs in this node pool.
3171    ///
3172    /// Only applicable if `create_pod_range` is true.
3173    ///
3174    /// Set to blank to have a range chosen with the default size.
3175    ///
3176    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
3177    /// netmask.
3178    ///
3179    /// Set to a
3180    /// [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
3181    /// notation (e.g. `10.96.0.0/14`) to pick a specific range to use.
3182    ///
3183    /// Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
3184    ///
3185    /// This field cannot be changed after the node pool has been created.
3186    pub pod_ipv4_cidr_block: std::string::String,
3187
3188    /// Whether nodes have internal IP addresses only.
3189    /// If enable_private_nodes is not specified, then the value is derived from
3190    /// [Cluster.NetworkConfig.default_enable_private_nodes][]
3191    pub enable_private_nodes: std::option::Option<bool>,
3192
3193    /// Network bandwidth tier configuration.
3194    pub network_performance_config:
3195        std::option::Option<crate::model::node_network_config::NetworkPerformanceConfig>,
3196
3197    /// [PRIVATE FIELD]
3198    /// Pod CIDR size overprovisioning config for the nodepool.
3199    ///
3200    /// Pod CIDR size per node depends on max_pods_per_node. By default, the value
3201    /// of max_pods_per_node is rounded off to next power of 2 and we then double
3202    /// that to get the size of pod CIDR block per node.
3203    /// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
3204    ///
3205    /// This config can disable the doubling of IPs (we still round off to next
3206    /// power of 2)
3207    /// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
3208    /// overprovisioning is disabled.
3209    pub pod_cidr_overprovision_config:
3210        std::option::Option<crate::model::PodCIDROverprovisionConfig>,
3211
3212    /// We specify the additional node networks for this node pool using this list.
3213    /// Each node network corresponds to an additional interface
3214    pub additional_node_network_configs: std::vec::Vec<crate::model::AdditionalNodeNetworkConfig>,
3215
3216    /// We specify the additional pod networks for this node pool using this list.
3217    /// Each pod network corresponds to an additional alias IP range for the node
3218    pub additional_pod_network_configs: std::vec::Vec<crate::model::AdditionalPodNetworkConfig>,
3219
3220    /// Output only. The utilization of the IPv4 range for the pod.
3221    /// The ratio is Usage/[Total number of IPs in the secondary range],
3222    /// Usage=numNodes*numZones*podIPsPerNode.
3223    pub pod_ipv4_range_utilization: f64,
3224
3225    /// Output only. The subnetwork path for the node pool.
3226    /// Format: projects/{project}/regions/{region}/subnetworks/{subnetwork}
3227    /// If the cluster is associated with multiple subnetworks, the subnetwork for
3228    /// the node pool is picked based on the IP utilization during node pool
3229    /// creation and is immutable.
3230    pub subnetwork: std::string::String,
3231
3232    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3233}
3234
3235impl NodeNetworkConfig {
3236    pub fn new() -> Self {
3237        std::default::Default::default()
3238    }
3239
3240    /// Sets the value of [create_pod_range][crate::model::NodeNetworkConfig::create_pod_range].
3241    pub fn set_create_pod_range<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3242        self.create_pod_range = v.into();
3243        self
3244    }
3245
3246    /// Sets the value of [pod_range][crate::model::NodeNetworkConfig::pod_range].
3247    pub fn set_pod_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3248        self.pod_range = v.into();
3249        self
3250    }
3251
3252    /// Sets the value of [pod_ipv4_cidr_block][crate::model::NodeNetworkConfig::pod_ipv4_cidr_block].
3253    pub fn set_pod_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
3254        mut self,
3255        v: T,
3256    ) -> Self {
3257        self.pod_ipv4_cidr_block = v.into();
3258        self
3259    }
3260
3261    /// Sets the value of [enable_private_nodes][crate::model::NodeNetworkConfig::enable_private_nodes].
3262    pub fn set_enable_private_nodes<T>(mut self, v: T) -> Self
3263    where
3264        T: std::convert::Into<bool>,
3265    {
3266        self.enable_private_nodes = std::option::Option::Some(v.into());
3267        self
3268    }
3269
3270    /// Sets or clears the value of [enable_private_nodes][crate::model::NodeNetworkConfig::enable_private_nodes].
3271    pub fn set_or_clear_enable_private_nodes<T>(mut self, v: std::option::Option<T>) -> Self
3272    where
3273        T: std::convert::Into<bool>,
3274    {
3275        self.enable_private_nodes = v.map(|x| x.into());
3276        self
3277    }
3278
3279    /// Sets the value of [network_performance_config][crate::model::NodeNetworkConfig::network_performance_config].
3280    pub fn set_network_performance_config<T>(mut self, v: T) -> Self
3281    where
3282        T: std::convert::Into<crate::model::node_network_config::NetworkPerformanceConfig>,
3283    {
3284        self.network_performance_config = std::option::Option::Some(v.into());
3285        self
3286    }
3287
3288    /// Sets or clears the value of [network_performance_config][crate::model::NodeNetworkConfig::network_performance_config].
3289    pub fn set_or_clear_network_performance_config<T>(mut self, v: std::option::Option<T>) -> Self
3290    where
3291        T: std::convert::Into<crate::model::node_network_config::NetworkPerformanceConfig>,
3292    {
3293        self.network_performance_config = v.map(|x| x.into());
3294        self
3295    }
3296
3297    /// Sets the value of [pod_cidr_overprovision_config][crate::model::NodeNetworkConfig::pod_cidr_overprovision_config].
3298    pub fn set_pod_cidr_overprovision_config<T>(mut self, v: T) -> Self
3299    where
3300        T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
3301    {
3302        self.pod_cidr_overprovision_config = std::option::Option::Some(v.into());
3303        self
3304    }
3305
3306    /// Sets or clears the value of [pod_cidr_overprovision_config][crate::model::NodeNetworkConfig::pod_cidr_overprovision_config].
3307    pub fn set_or_clear_pod_cidr_overprovision_config<T>(
3308        mut self,
3309        v: std::option::Option<T>,
3310    ) -> Self
3311    where
3312        T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
3313    {
3314        self.pod_cidr_overprovision_config = v.map(|x| x.into());
3315        self
3316    }
3317
3318    /// Sets the value of [additional_node_network_configs][crate::model::NodeNetworkConfig::additional_node_network_configs].
3319    pub fn set_additional_node_network_configs<T, V>(mut self, v: T) -> Self
3320    where
3321        T: std::iter::IntoIterator<Item = V>,
3322        V: std::convert::Into<crate::model::AdditionalNodeNetworkConfig>,
3323    {
3324        use std::iter::Iterator;
3325        self.additional_node_network_configs = v.into_iter().map(|i| i.into()).collect();
3326        self
3327    }
3328
3329    /// Sets the value of [additional_pod_network_configs][crate::model::NodeNetworkConfig::additional_pod_network_configs].
3330    pub fn set_additional_pod_network_configs<T, V>(mut self, v: T) -> Self
3331    where
3332        T: std::iter::IntoIterator<Item = V>,
3333        V: std::convert::Into<crate::model::AdditionalPodNetworkConfig>,
3334    {
3335        use std::iter::Iterator;
3336        self.additional_pod_network_configs = v.into_iter().map(|i| i.into()).collect();
3337        self
3338    }
3339
3340    /// Sets the value of [pod_ipv4_range_utilization][crate::model::NodeNetworkConfig::pod_ipv4_range_utilization].
3341    pub fn set_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3342        self.pod_ipv4_range_utilization = v.into();
3343        self
3344    }
3345
3346    /// Sets the value of [subnetwork][crate::model::NodeNetworkConfig::subnetwork].
3347    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3348        self.subnetwork = v.into();
3349        self
3350    }
3351}
3352
3353impl wkt::message::Message for NodeNetworkConfig {
3354    fn typename() -> &'static str {
3355        "type.googleapis.com/google.container.v1.NodeNetworkConfig"
3356    }
3357}
3358
3359/// Defines additional types related to [NodeNetworkConfig].
3360pub mod node_network_config {
3361    #[allow(unused_imports)]
3362    use super::*;
3363
3364    /// Configuration of all network bandwidth tiers
3365    #[derive(Clone, Default, PartialEq)]
3366    #[non_exhaustive]
3367    pub struct NetworkPerformanceConfig {
3368        /// Specifies the total network bandwidth tier for the NodePool.
3369        pub total_egress_bandwidth_tier: std::option::Option<
3370            crate::model::node_network_config::network_performance_config::Tier,
3371        >,
3372
3373        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3374    }
3375
3376    impl NetworkPerformanceConfig {
3377        pub fn new() -> Self {
3378            std::default::Default::default()
3379        }
3380
3381        /// Sets the value of [total_egress_bandwidth_tier][crate::model::node_network_config::NetworkPerformanceConfig::total_egress_bandwidth_tier].
3382        pub fn set_total_egress_bandwidth_tier<T>(mut self, v: T) -> Self
3383        where
3384            T: std::convert::Into<
3385                    crate::model::node_network_config::network_performance_config::Tier,
3386                >,
3387        {
3388            self.total_egress_bandwidth_tier = std::option::Option::Some(v.into());
3389            self
3390        }
3391
3392        /// Sets or clears the value of [total_egress_bandwidth_tier][crate::model::node_network_config::NetworkPerformanceConfig::total_egress_bandwidth_tier].
3393        pub fn set_or_clear_total_egress_bandwidth_tier<T>(
3394            mut self,
3395            v: std::option::Option<T>,
3396        ) -> Self
3397        where
3398            T: std::convert::Into<
3399                    crate::model::node_network_config::network_performance_config::Tier,
3400                >,
3401        {
3402            self.total_egress_bandwidth_tier = v.map(|x| x.into());
3403            self
3404        }
3405    }
3406
3407    impl wkt::message::Message for NetworkPerformanceConfig {
3408        fn typename() -> &'static str {
3409            "type.googleapis.com/google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig"
3410        }
3411    }
3412
3413    /// Defines additional types related to [NetworkPerformanceConfig].
3414    pub mod network_performance_config {
3415        #[allow(unused_imports)]
3416        use super::*;
3417
3418        /// Node network tier
3419        ///
3420        /// # Working with unknown values
3421        ///
3422        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3423        /// additional enum variants at any time. Adding new variants is not considered
3424        /// a breaking change. Applications should write their code in anticipation of:
3425        ///
3426        /// - New values appearing in future releases of the client library, **and**
3427        /// - New values received dynamically, without application changes.
3428        ///
3429        /// Please consult the [Working with enums] section in the user guide for some
3430        /// guidelines.
3431        ///
3432        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3433        #[derive(Clone, Debug, PartialEq)]
3434        #[non_exhaustive]
3435        pub enum Tier {
3436            /// Default value
3437            Unspecified,
3438            /// Higher bandwidth, actual values based on VM size.
3439            Tier1,
3440            /// If set, the enum was initialized with an unknown value.
3441            ///
3442            /// Applications can examine the value using [Tier::value] or
3443            /// [Tier::name].
3444            UnknownValue(tier::UnknownValue),
3445        }
3446
3447        #[doc(hidden)]
3448        pub mod tier {
3449            #[allow(unused_imports)]
3450            use super::*;
3451            #[derive(Clone, Debug, PartialEq)]
3452            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3453        }
3454
3455        impl Tier {
3456            /// Gets the enum value.
3457            ///
3458            /// Returns `None` if the enum contains an unknown value deserialized from
3459            /// the string representation of enums.
3460            pub fn value(&self) -> std::option::Option<i32> {
3461                match self {
3462                    Self::Unspecified => std::option::Option::Some(0),
3463                    Self::Tier1 => std::option::Option::Some(1),
3464                    Self::UnknownValue(u) => u.0.value(),
3465                }
3466            }
3467
3468            /// Gets the enum value as a string.
3469            ///
3470            /// Returns `None` if the enum contains an unknown value deserialized from
3471            /// the integer representation of enums.
3472            pub fn name(&self) -> std::option::Option<&str> {
3473                match self {
3474                    Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
3475                    Self::Tier1 => std::option::Option::Some("TIER_1"),
3476                    Self::UnknownValue(u) => u.0.name(),
3477                }
3478            }
3479        }
3480
3481        impl std::default::Default for Tier {
3482            fn default() -> Self {
3483                use std::convert::From;
3484                Self::from(0)
3485            }
3486        }
3487
3488        impl std::fmt::Display for Tier {
3489            fn fmt(
3490                &self,
3491                f: &mut std::fmt::Formatter<'_>,
3492            ) -> std::result::Result<(), std::fmt::Error> {
3493                wkt::internal::display_enum(f, self.name(), self.value())
3494            }
3495        }
3496
3497        impl std::convert::From<i32> for Tier {
3498            fn from(value: i32) -> Self {
3499                match value {
3500                    0 => Self::Unspecified,
3501                    1 => Self::Tier1,
3502                    _ => Self::UnknownValue(tier::UnknownValue(
3503                        wkt::internal::UnknownEnumValue::Integer(value),
3504                    )),
3505                }
3506            }
3507        }
3508
3509        impl std::convert::From<&str> for Tier {
3510            fn from(value: &str) -> Self {
3511                use std::string::ToString;
3512                match value {
3513                    "TIER_UNSPECIFIED" => Self::Unspecified,
3514                    "TIER_1" => Self::Tier1,
3515                    _ => Self::UnknownValue(tier::UnknownValue(
3516                        wkt::internal::UnknownEnumValue::String(value.to_string()),
3517                    )),
3518                }
3519            }
3520        }
3521
3522        impl serde::ser::Serialize for Tier {
3523            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3524            where
3525                S: serde::Serializer,
3526            {
3527                match self {
3528                    Self::Unspecified => serializer.serialize_i32(0),
3529                    Self::Tier1 => serializer.serialize_i32(1),
3530                    Self::UnknownValue(u) => u.0.serialize(serializer),
3531                }
3532            }
3533        }
3534
3535        impl<'de> serde::de::Deserialize<'de> for Tier {
3536            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3537            where
3538                D: serde::Deserializer<'de>,
3539            {
3540                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
3541                    ".google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier",
3542                ))
3543            }
3544        }
3545    }
3546}
3547
3548/// AdditionalNodeNetworkConfig is the configuration for additional node networks
3549/// within the NodeNetworkConfig message
3550#[derive(Clone, Default, PartialEq)]
3551#[non_exhaustive]
3552pub struct AdditionalNodeNetworkConfig {
3553    /// Name of the VPC where the additional interface belongs
3554    pub network: std::string::String,
3555
3556    /// Name of the subnetwork where the additional interface belongs
3557    pub subnetwork: std::string::String,
3558
3559    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3560}
3561
3562impl AdditionalNodeNetworkConfig {
3563    pub fn new() -> Self {
3564        std::default::Default::default()
3565    }
3566
3567    /// Sets the value of [network][crate::model::AdditionalNodeNetworkConfig::network].
3568    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3569        self.network = v.into();
3570        self
3571    }
3572
3573    /// Sets the value of [subnetwork][crate::model::AdditionalNodeNetworkConfig::subnetwork].
3574    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3575        self.subnetwork = v.into();
3576        self
3577    }
3578}
3579
3580impl wkt::message::Message for AdditionalNodeNetworkConfig {
3581    fn typename() -> &'static str {
3582        "type.googleapis.com/google.container.v1.AdditionalNodeNetworkConfig"
3583    }
3584}
3585
3586/// AdditionalPodNetworkConfig is the configuration for additional pod networks
3587/// within the NodeNetworkConfig message
3588#[derive(Clone, Default, PartialEq)]
3589#[non_exhaustive]
3590pub struct AdditionalPodNetworkConfig {
3591    /// Name of the subnetwork where the additional pod network belongs.
3592    pub subnetwork: std::string::String,
3593
3594    /// The name of the secondary range on the subnet which provides IP address for
3595    /// this pod range.
3596    pub secondary_pod_range: std::string::String,
3597
3598    /// The maximum number of pods per node which use this pod network.
3599    pub max_pods_per_node: std::option::Option<crate::model::MaxPodsConstraint>,
3600
3601    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3602}
3603
3604impl AdditionalPodNetworkConfig {
3605    pub fn new() -> Self {
3606        std::default::Default::default()
3607    }
3608
3609    /// Sets the value of [subnetwork][crate::model::AdditionalPodNetworkConfig::subnetwork].
3610    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3611        self.subnetwork = v.into();
3612        self
3613    }
3614
3615    /// Sets the value of [secondary_pod_range][crate::model::AdditionalPodNetworkConfig::secondary_pod_range].
3616    pub fn set_secondary_pod_range<T: std::convert::Into<std::string::String>>(
3617        mut self,
3618        v: T,
3619    ) -> Self {
3620        self.secondary_pod_range = v.into();
3621        self
3622    }
3623
3624    /// Sets the value of [max_pods_per_node][crate::model::AdditionalPodNetworkConfig::max_pods_per_node].
3625    pub fn set_max_pods_per_node<T>(mut self, v: T) -> Self
3626    where
3627        T: std::convert::Into<crate::model::MaxPodsConstraint>,
3628    {
3629        self.max_pods_per_node = std::option::Option::Some(v.into());
3630        self
3631    }
3632
3633    /// Sets or clears the value of [max_pods_per_node][crate::model::AdditionalPodNetworkConfig::max_pods_per_node].
3634    pub fn set_or_clear_max_pods_per_node<T>(mut self, v: std::option::Option<T>) -> Self
3635    where
3636        T: std::convert::Into<crate::model::MaxPodsConstraint>,
3637    {
3638        self.max_pods_per_node = v.map(|x| x.into());
3639        self
3640    }
3641}
3642
3643impl wkt::message::Message for AdditionalPodNetworkConfig {
3644    fn typename() -> &'static str {
3645        "type.googleapis.com/google.container.v1.AdditionalPodNetworkConfig"
3646    }
3647}
3648
3649/// A set of Shielded Instance options.
3650#[derive(Clone, Default, PartialEq)]
3651#[non_exhaustive]
3652pub struct ShieldedInstanceConfig {
3653    /// Defines whether the instance has Secure Boot enabled.
3654    ///
3655    /// Secure Boot helps ensure that the system only runs authentic software by
3656    /// verifying the digital signature of all boot components, and halting the
3657    /// boot process if signature verification fails.
3658    pub enable_secure_boot: bool,
3659
3660    /// Defines whether the instance has integrity monitoring enabled.
3661    ///
3662    /// Enables monitoring and attestation of the boot integrity of the instance.
3663    /// The attestation is performed against the integrity policy baseline. This
3664    /// baseline is initially derived from the implicitly trusted boot image when
3665    /// the instance is created.
3666    pub enable_integrity_monitoring: bool,
3667
3668    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3669}
3670
3671impl ShieldedInstanceConfig {
3672    pub fn new() -> Self {
3673        std::default::Default::default()
3674    }
3675
3676    /// Sets the value of [enable_secure_boot][crate::model::ShieldedInstanceConfig::enable_secure_boot].
3677    pub fn set_enable_secure_boot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3678        self.enable_secure_boot = v.into();
3679        self
3680    }
3681
3682    /// Sets the value of [enable_integrity_monitoring][crate::model::ShieldedInstanceConfig::enable_integrity_monitoring].
3683    pub fn set_enable_integrity_monitoring<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3684        self.enable_integrity_monitoring = v.into();
3685        self
3686    }
3687}
3688
3689impl wkt::message::Message for ShieldedInstanceConfig {
3690    fn typename() -> &'static str {
3691        "type.googleapis.com/google.container.v1.ShieldedInstanceConfig"
3692    }
3693}
3694
3695/// SandboxConfig contains configurations of the sandbox to use for the node.
3696#[derive(Clone, Default, PartialEq)]
3697#[non_exhaustive]
3698pub struct SandboxConfig {
3699    /// Type of the sandbox to use for the node.
3700    pub r#type: crate::model::sandbox_config::Type,
3701
3702    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3703}
3704
3705impl SandboxConfig {
3706    pub fn new() -> Self {
3707        std::default::Default::default()
3708    }
3709
3710    /// Sets the value of [r#type][crate::model::SandboxConfig::type].
3711    pub fn set_type<T: std::convert::Into<crate::model::sandbox_config::Type>>(
3712        mut self,
3713        v: T,
3714    ) -> Self {
3715        self.r#type = v.into();
3716        self
3717    }
3718}
3719
3720impl wkt::message::Message for SandboxConfig {
3721    fn typename() -> &'static str {
3722        "type.googleapis.com/google.container.v1.SandboxConfig"
3723    }
3724}
3725
3726/// Defines additional types related to [SandboxConfig].
3727pub mod sandbox_config {
3728    #[allow(unused_imports)]
3729    use super::*;
3730
3731    /// Possible types of sandboxes.
3732    ///
3733    /// # Working with unknown values
3734    ///
3735    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3736    /// additional enum variants at any time. Adding new variants is not considered
3737    /// a breaking change. Applications should write their code in anticipation of:
3738    ///
3739    /// - New values appearing in future releases of the client library, **and**
3740    /// - New values received dynamically, without application changes.
3741    ///
3742    /// Please consult the [Working with enums] section in the user guide for some
3743    /// guidelines.
3744    ///
3745    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3746    #[derive(Clone, Debug, PartialEq)]
3747    #[non_exhaustive]
3748    pub enum Type {
3749        /// Default value. This should not be used.
3750        Unspecified,
3751        /// Run sandbox using gvisor.
3752        Gvisor,
3753        /// If set, the enum was initialized with an unknown value.
3754        ///
3755        /// Applications can examine the value using [Type::value] or
3756        /// [Type::name].
3757        UnknownValue(r#type::UnknownValue),
3758    }
3759
3760    #[doc(hidden)]
3761    pub mod r#type {
3762        #[allow(unused_imports)]
3763        use super::*;
3764        #[derive(Clone, Debug, PartialEq)]
3765        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3766    }
3767
3768    impl Type {
3769        /// Gets the enum value.
3770        ///
3771        /// Returns `None` if the enum contains an unknown value deserialized from
3772        /// the string representation of enums.
3773        pub fn value(&self) -> std::option::Option<i32> {
3774            match self {
3775                Self::Unspecified => std::option::Option::Some(0),
3776                Self::Gvisor => std::option::Option::Some(1),
3777                Self::UnknownValue(u) => u.0.value(),
3778            }
3779        }
3780
3781        /// Gets the enum value as a string.
3782        ///
3783        /// Returns `None` if the enum contains an unknown value deserialized from
3784        /// the integer representation of enums.
3785        pub fn name(&self) -> std::option::Option<&str> {
3786            match self {
3787                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
3788                Self::Gvisor => std::option::Option::Some("GVISOR"),
3789                Self::UnknownValue(u) => u.0.name(),
3790            }
3791        }
3792    }
3793
3794    impl std::default::Default for Type {
3795        fn default() -> Self {
3796            use std::convert::From;
3797            Self::from(0)
3798        }
3799    }
3800
3801    impl std::fmt::Display for Type {
3802        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3803            wkt::internal::display_enum(f, self.name(), self.value())
3804        }
3805    }
3806
3807    impl std::convert::From<i32> for Type {
3808        fn from(value: i32) -> Self {
3809            match value {
3810                0 => Self::Unspecified,
3811                1 => Self::Gvisor,
3812                _ => Self::UnknownValue(r#type::UnknownValue(
3813                    wkt::internal::UnknownEnumValue::Integer(value),
3814                )),
3815            }
3816        }
3817    }
3818
3819    impl std::convert::From<&str> for Type {
3820        fn from(value: &str) -> Self {
3821            use std::string::ToString;
3822            match value {
3823                "UNSPECIFIED" => Self::Unspecified,
3824                "GVISOR" => Self::Gvisor,
3825                _ => Self::UnknownValue(r#type::UnknownValue(
3826                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3827                )),
3828            }
3829        }
3830    }
3831
3832    impl serde::ser::Serialize for Type {
3833        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3834        where
3835            S: serde::Serializer,
3836        {
3837            match self {
3838                Self::Unspecified => serializer.serialize_i32(0),
3839                Self::Gvisor => serializer.serialize_i32(1),
3840                Self::UnknownValue(u) => u.0.serialize(serializer),
3841            }
3842        }
3843    }
3844
3845    impl<'de> serde::de::Deserialize<'de> for Type {
3846        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3847        where
3848            D: serde::Deserializer<'de>,
3849        {
3850            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
3851                ".google.container.v1.SandboxConfig.Type",
3852            ))
3853        }
3854    }
3855}
3856
3857/// GcfsConfig contains configurations of Google Container File System
3858/// (image streaming).
3859#[derive(Clone, Default, PartialEq)]
3860#[non_exhaustive]
3861pub struct GcfsConfig {
3862    /// Whether to use GCFS.
3863    pub enabled: bool,
3864
3865    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3866}
3867
3868impl GcfsConfig {
3869    pub fn new() -> Self {
3870        std::default::Default::default()
3871    }
3872
3873    /// Sets the value of [enabled][crate::model::GcfsConfig::enabled].
3874    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3875        self.enabled = v.into();
3876        self
3877    }
3878}
3879
3880impl wkt::message::Message for GcfsConfig {
3881    fn typename() -> &'static str {
3882        "type.googleapis.com/google.container.v1.GcfsConfig"
3883    }
3884}
3885
3886/// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
3887/// is the configuration of desired reservation which instances could take
3888/// capacity from.
3889#[derive(Clone, Default, PartialEq)]
3890#[non_exhaustive]
3891pub struct ReservationAffinity {
3892    /// Corresponds to the type of reservation consumption.
3893    pub consume_reservation_type: crate::model::reservation_affinity::Type,
3894
3895    /// Corresponds to the label key of a reservation resource. To target a
3896    /// SPECIFIC_RESERVATION by name, specify
3897    /// "compute.googleapis.com/reservation-name" as the key and specify the name
3898    /// of your reservation as its value.
3899    pub key: std::string::String,
3900
3901    /// Corresponds to the label value(s) of reservation resource(s).
3902    pub values: std::vec::Vec<std::string::String>,
3903
3904    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3905}
3906
3907impl ReservationAffinity {
3908    pub fn new() -> Self {
3909        std::default::Default::default()
3910    }
3911
3912    /// Sets the value of [consume_reservation_type][crate::model::ReservationAffinity::consume_reservation_type].
3913    pub fn set_consume_reservation_type<
3914        T: std::convert::Into<crate::model::reservation_affinity::Type>,
3915    >(
3916        mut self,
3917        v: T,
3918    ) -> Self {
3919        self.consume_reservation_type = v.into();
3920        self
3921    }
3922
3923    /// Sets the value of [key][crate::model::ReservationAffinity::key].
3924    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3925        self.key = v.into();
3926        self
3927    }
3928
3929    /// Sets the value of [values][crate::model::ReservationAffinity::values].
3930    pub fn set_values<T, V>(mut self, v: T) -> Self
3931    where
3932        T: std::iter::IntoIterator<Item = V>,
3933        V: std::convert::Into<std::string::String>,
3934    {
3935        use std::iter::Iterator;
3936        self.values = v.into_iter().map(|i| i.into()).collect();
3937        self
3938    }
3939}
3940
3941impl wkt::message::Message for ReservationAffinity {
3942    fn typename() -> &'static str {
3943        "type.googleapis.com/google.container.v1.ReservationAffinity"
3944    }
3945}
3946
3947/// Defines additional types related to [ReservationAffinity].
3948pub mod reservation_affinity {
3949    #[allow(unused_imports)]
3950    use super::*;
3951
3952    /// Indicates whether to consume capacity from a reservation or not.
3953    ///
3954    /// # Working with unknown values
3955    ///
3956    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3957    /// additional enum variants at any time. Adding new variants is not considered
3958    /// a breaking change. Applications should write their code in anticipation of:
3959    ///
3960    /// - New values appearing in future releases of the client library, **and**
3961    /// - New values received dynamically, without application changes.
3962    ///
3963    /// Please consult the [Working with enums] section in the user guide for some
3964    /// guidelines.
3965    ///
3966    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3967    #[derive(Clone, Debug, PartialEq)]
3968    #[non_exhaustive]
3969    pub enum Type {
3970        /// Default value. This should not be used.
3971        Unspecified,
3972        /// Do not consume from any reserved capacity.
3973        NoReservation,
3974        /// Consume any reservation available.
3975        AnyReservation,
3976        /// Must consume from a specific reservation. Must specify key value fields
3977        /// for specifying the reservations.
3978        SpecificReservation,
3979        /// If set, the enum was initialized with an unknown value.
3980        ///
3981        /// Applications can examine the value using [Type::value] or
3982        /// [Type::name].
3983        UnknownValue(r#type::UnknownValue),
3984    }
3985
3986    #[doc(hidden)]
3987    pub mod r#type {
3988        #[allow(unused_imports)]
3989        use super::*;
3990        #[derive(Clone, Debug, PartialEq)]
3991        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3992    }
3993
3994    impl Type {
3995        /// Gets the enum value.
3996        ///
3997        /// Returns `None` if the enum contains an unknown value deserialized from
3998        /// the string representation of enums.
3999        pub fn value(&self) -> std::option::Option<i32> {
4000            match self {
4001                Self::Unspecified => std::option::Option::Some(0),
4002                Self::NoReservation => std::option::Option::Some(1),
4003                Self::AnyReservation => std::option::Option::Some(2),
4004                Self::SpecificReservation => std::option::Option::Some(3),
4005                Self::UnknownValue(u) => u.0.value(),
4006            }
4007        }
4008
4009        /// Gets the enum value as a string.
4010        ///
4011        /// Returns `None` if the enum contains an unknown value deserialized from
4012        /// the integer representation of enums.
4013        pub fn name(&self) -> std::option::Option<&str> {
4014            match self {
4015                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
4016                Self::NoReservation => std::option::Option::Some("NO_RESERVATION"),
4017                Self::AnyReservation => std::option::Option::Some("ANY_RESERVATION"),
4018                Self::SpecificReservation => std::option::Option::Some("SPECIFIC_RESERVATION"),
4019                Self::UnknownValue(u) => u.0.name(),
4020            }
4021        }
4022    }
4023
4024    impl std::default::Default for Type {
4025        fn default() -> Self {
4026            use std::convert::From;
4027            Self::from(0)
4028        }
4029    }
4030
4031    impl std::fmt::Display for Type {
4032        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4033            wkt::internal::display_enum(f, self.name(), self.value())
4034        }
4035    }
4036
4037    impl std::convert::From<i32> for Type {
4038        fn from(value: i32) -> Self {
4039            match value {
4040                0 => Self::Unspecified,
4041                1 => Self::NoReservation,
4042                2 => Self::AnyReservation,
4043                3 => Self::SpecificReservation,
4044                _ => Self::UnknownValue(r#type::UnknownValue(
4045                    wkt::internal::UnknownEnumValue::Integer(value),
4046                )),
4047            }
4048        }
4049    }
4050
4051    impl std::convert::From<&str> for Type {
4052        fn from(value: &str) -> Self {
4053            use std::string::ToString;
4054            match value {
4055                "UNSPECIFIED" => Self::Unspecified,
4056                "NO_RESERVATION" => Self::NoReservation,
4057                "ANY_RESERVATION" => Self::AnyReservation,
4058                "SPECIFIC_RESERVATION" => Self::SpecificReservation,
4059                _ => Self::UnknownValue(r#type::UnknownValue(
4060                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4061                )),
4062            }
4063        }
4064    }
4065
4066    impl serde::ser::Serialize for Type {
4067        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4068        where
4069            S: serde::Serializer,
4070        {
4071            match self {
4072                Self::Unspecified => serializer.serialize_i32(0),
4073                Self::NoReservation => serializer.serialize_i32(1),
4074                Self::AnyReservation => serializer.serialize_i32(2),
4075                Self::SpecificReservation => serializer.serialize_i32(3),
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.ReservationAffinity.Type",
4088            ))
4089        }
4090    }
4091}
4092
4093/// SoleTenantConfig contains the NodeAffinities to specify what shared sole
4094/// tenant node groups should back the node pool.
4095#[derive(Clone, Default, PartialEq)]
4096#[non_exhaustive]
4097pub struct SoleTenantConfig {
4098    /// NodeAffinities used to match to a shared sole tenant node group.
4099    pub node_affinities: std::vec::Vec<crate::model::sole_tenant_config::NodeAffinity>,
4100
4101    /// Optional. The minimum number of virtual CPUs this instance will consume
4102    /// when running on a sole-tenant node. This field can only be set if the node
4103    /// pool is created in a shared sole-tenant node group.
4104    pub min_node_cpus: std::option::Option<i32>,
4105
4106    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4107}
4108
4109impl SoleTenantConfig {
4110    pub fn new() -> Self {
4111        std::default::Default::default()
4112    }
4113
4114    /// Sets the value of [node_affinities][crate::model::SoleTenantConfig::node_affinities].
4115    pub fn set_node_affinities<T, V>(mut self, v: T) -> Self
4116    where
4117        T: std::iter::IntoIterator<Item = V>,
4118        V: std::convert::Into<crate::model::sole_tenant_config::NodeAffinity>,
4119    {
4120        use std::iter::Iterator;
4121        self.node_affinities = v.into_iter().map(|i| i.into()).collect();
4122        self
4123    }
4124
4125    /// Sets the value of [min_node_cpus][crate::model::SoleTenantConfig::min_node_cpus].
4126    pub fn set_min_node_cpus<T>(mut self, v: T) -> Self
4127    where
4128        T: std::convert::Into<i32>,
4129    {
4130        self.min_node_cpus = std::option::Option::Some(v.into());
4131        self
4132    }
4133
4134    /// Sets or clears the value of [min_node_cpus][crate::model::SoleTenantConfig::min_node_cpus].
4135    pub fn set_or_clear_min_node_cpus<T>(mut self, v: std::option::Option<T>) -> Self
4136    where
4137        T: std::convert::Into<i32>,
4138    {
4139        self.min_node_cpus = v.map(|x| x.into());
4140        self
4141    }
4142}
4143
4144impl wkt::message::Message for SoleTenantConfig {
4145    fn typename() -> &'static str {
4146        "type.googleapis.com/google.container.v1.SoleTenantConfig"
4147    }
4148}
4149
4150/// Defines additional types related to [SoleTenantConfig].
4151pub mod sole_tenant_config {
4152    #[allow(unused_imports)]
4153    use super::*;
4154
4155    /// Specifies the NodeAffinity key, values, and affinity operator according to
4156    /// [shared sole tenant node group
4157    /// affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity).
4158    #[derive(Clone, Default, PartialEq)]
4159    #[non_exhaustive]
4160    pub struct NodeAffinity {
4161        /// Key for NodeAffinity.
4162        pub key: std::string::String,
4163
4164        /// Operator for NodeAffinity.
4165        pub operator: crate::model::sole_tenant_config::node_affinity::Operator,
4166
4167        /// Values for NodeAffinity.
4168        pub values: std::vec::Vec<std::string::String>,
4169
4170        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4171    }
4172
4173    impl NodeAffinity {
4174        pub fn new() -> Self {
4175            std::default::Default::default()
4176        }
4177
4178        /// Sets the value of [key][crate::model::sole_tenant_config::NodeAffinity::key].
4179        pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4180            self.key = v.into();
4181            self
4182        }
4183
4184        /// Sets the value of [operator][crate::model::sole_tenant_config::NodeAffinity::operator].
4185        pub fn set_operator<
4186            T: std::convert::Into<crate::model::sole_tenant_config::node_affinity::Operator>,
4187        >(
4188            mut self,
4189            v: T,
4190        ) -> Self {
4191            self.operator = v.into();
4192            self
4193        }
4194
4195        /// Sets the value of [values][crate::model::sole_tenant_config::NodeAffinity::values].
4196        pub fn set_values<T, V>(mut self, v: T) -> Self
4197        where
4198            T: std::iter::IntoIterator<Item = V>,
4199            V: std::convert::Into<std::string::String>,
4200        {
4201            use std::iter::Iterator;
4202            self.values = v.into_iter().map(|i| i.into()).collect();
4203            self
4204        }
4205    }
4206
4207    impl wkt::message::Message for NodeAffinity {
4208        fn typename() -> &'static str {
4209            "type.googleapis.com/google.container.v1.SoleTenantConfig.NodeAffinity"
4210        }
4211    }
4212
4213    /// Defines additional types related to [NodeAffinity].
4214    pub mod node_affinity {
4215        #[allow(unused_imports)]
4216        use super::*;
4217
4218        /// Operator allows user to specify affinity or anti-affinity for the
4219        /// given key values.
4220        ///
4221        /// # Working with unknown values
4222        ///
4223        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4224        /// additional enum variants at any time. Adding new variants is not considered
4225        /// a breaking change. Applications should write their code in anticipation of:
4226        ///
4227        /// - New values appearing in future releases of the client library, **and**
4228        /// - New values received dynamically, without application changes.
4229        ///
4230        /// Please consult the [Working with enums] section in the user guide for some
4231        /// guidelines.
4232        ///
4233        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4234        #[derive(Clone, Debug, PartialEq)]
4235        #[non_exhaustive]
4236        pub enum Operator {
4237            /// Invalid or unspecified affinity operator.
4238            Unspecified,
4239            /// Affinity operator.
4240            In,
4241            /// Anti-affinity operator.
4242            NotIn,
4243            /// If set, the enum was initialized with an unknown value.
4244            ///
4245            /// Applications can examine the value using [Operator::value] or
4246            /// [Operator::name].
4247            UnknownValue(operator::UnknownValue),
4248        }
4249
4250        #[doc(hidden)]
4251        pub mod operator {
4252            #[allow(unused_imports)]
4253            use super::*;
4254            #[derive(Clone, Debug, PartialEq)]
4255            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4256        }
4257
4258        impl Operator {
4259            /// Gets the enum value.
4260            ///
4261            /// Returns `None` if the enum contains an unknown value deserialized from
4262            /// the string representation of enums.
4263            pub fn value(&self) -> std::option::Option<i32> {
4264                match self {
4265                    Self::Unspecified => std::option::Option::Some(0),
4266                    Self::In => std::option::Option::Some(1),
4267                    Self::NotIn => std::option::Option::Some(2),
4268                    Self::UnknownValue(u) => u.0.value(),
4269                }
4270            }
4271
4272            /// Gets the enum value as a string.
4273            ///
4274            /// Returns `None` if the enum contains an unknown value deserialized from
4275            /// the integer representation of enums.
4276            pub fn name(&self) -> std::option::Option<&str> {
4277                match self {
4278                    Self::Unspecified => std::option::Option::Some("OPERATOR_UNSPECIFIED"),
4279                    Self::In => std::option::Option::Some("IN"),
4280                    Self::NotIn => std::option::Option::Some("NOT_IN"),
4281                    Self::UnknownValue(u) => u.0.name(),
4282                }
4283            }
4284        }
4285
4286        impl std::default::Default for Operator {
4287            fn default() -> Self {
4288                use std::convert::From;
4289                Self::from(0)
4290            }
4291        }
4292
4293        impl std::fmt::Display for Operator {
4294            fn fmt(
4295                &self,
4296                f: &mut std::fmt::Formatter<'_>,
4297            ) -> std::result::Result<(), std::fmt::Error> {
4298                wkt::internal::display_enum(f, self.name(), self.value())
4299            }
4300        }
4301
4302        impl std::convert::From<i32> for Operator {
4303            fn from(value: i32) -> Self {
4304                match value {
4305                    0 => Self::Unspecified,
4306                    1 => Self::In,
4307                    2 => Self::NotIn,
4308                    _ => Self::UnknownValue(operator::UnknownValue(
4309                        wkt::internal::UnknownEnumValue::Integer(value),
4310                    )),
4311                }
4312            }
4313        }
4314
4315        impl std::convert::From<&str> for Operator {
4316            fn from(value: &str) -> Self {
4317                use std::string::ToString;
4318                match value {
4319                    "OPERATOR_UNSPECIFIED" => Self::Unspecified,
4320                    "IN" => Self::In,
4321                    "NOT_IN" => Self::NotIn,
4322                    _ => Self::UnknownValue(operator::UnknownValue(
4323                        wkt::internal::UnknownEnumValue::String(value.to_string()),
4324                    )),
4325                }
4326            }
4327        }
4328
4329        impl serde::ser::Serialize for Operator {
4330            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4331            where
4332                S: serde::Serializer,
4333            {
4334                match self {
4335                    Self::Unspecified => serializer.serialize_i32(0),
4336                    Self::In => serializer.serialize_i32(1),
4337                    Self::NotIn => serializer.serialize_i32(2),
4338                    Self::UnknownValue(u) => u.0.serialize(serializer),
4339                }
4340            }
4341        }
4342
4343        impl<'de> serde::de::Deserialize<'de> for Operator {
4344            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4345            where
4346                D: serde::Deserializer<'de>,
4347            {
4348                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operator>::new(
4349                    ".google.container.v1.SoleTenantConfig.NodeAffinity.Operator",
4350                ))
4351            }
4352        }
4353    }
4354}
4355
4356/// ContainerdConfig contains configuration to customize containerd.
4357#[derive(Clone, Default, PartialEq)]
4358#[non_exhaustive]
4359pub struct ContainerdConfig {
4360    /// PrivateRegistryAccessConfig is used to configure access configuration
4361    /// for private container registries.
4362    pub private_registry_access_config:
4363        std::option::Option<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4364
4365    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4366}
4367
4368impl ContainerdConfig {
4369    pub fn new() -> Self {
4370        std::default::Default::default()
4371    }
4372
4373    /// Sets the value of [private_registry_access_config][crate::model::ContainerdConfig::private_registry_access_config].
4374    pub fn set_private_registry_access_config<T>(mut self, v: T) -> Self
4375    where
4376        T: std::convert::Into<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4377    {
4378        self.private_registry_access_config = std::option::Option::Some(v.into());
4379        self
4380    }
4381
4382    /// Sets or clears the value of [private_registry_access_config][crate::model::ContainerdConfig::private_registry_access_config].
4383    pub fn set_or_clear_private_registry_access_config<T>(
4384        mut self,
4385        v: std::option::Option<T>,
4386    ) -> Self
4387    where
4388        T: std::convert::Into<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4389    {
4390        self.private_registry_access_config = v.map(|x| x.into());
4391        self
4392    }
4393}
4394
4395impl wkt::message::Message for ContainerdConfig {
4396    fn typename() -> &'static str {
4397        "type.googleapis.com/google.container.v1.ContainerdConfig"
4398    }
4399}
4400
4401/// Defines additional types related to [ContainerdConfig].
4402pub mod containerd_config {
4403    #[allow(unused_imports)]
4404    use super::*;
4405
4406    /// PrivateRegistryAccessConfig contains access configuration for
4407    /// private container registries.
4408    #[derive(Clone, Default, PartialEq)]
4409    #[non_exhaustive]
4410    pub struct PrivateRegistryAccessConfig {
4411
4412        /// Private registry access is enabled.
4413        pub enabled: bool,
4414
4415        /// Private registry access configuration.
4416        pub certificate_authority_domain_config: std::vec::Vec<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>,
4417
4418        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4419    }
4420
4421    impl PrivateRegistryAccessConfig {
4422        pub fn new() -> Self {
4423            std::default::Default::default()
4424        }
4425
4426        /// Sets the value of [enabled][crate::model::containerd_config::PrivateRegistryAccessConfig::enabled].
4427        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4428            self.enabled = v.into();
4429            self
4430        }
4431
4432        /// Sets the value of [certificate_authority_domain_config][crate::model::containerd_config::PrivateRegistryAccessConfig::certificate_authority_domain_config].
4433        pub fn set_certificate_authority_domain_config<T, V>(mut self, v: T) -> Self
4434        where
4435            T: std::iter::IntoIterator<Item = V>,
4436            V: std::convert::Into<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>
4437        {
4438            use std::iter::Iterator;
4439            self.certificate_authority_domain_config = v.into_iter().map(|i| i.into()).collect();
4440            self
4441        }
4442    }
4443
4444    impl wkt::message::Message for PrivateRegistryAccessConfig {
4445        fn typename() -> &'static str {
4446            "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig"
4447        }
4448    }
4449
4450    /// Defines additional types related to [PrivateRegistryAccessConfig].
4451    pub mod private_registry_access_config {
4452        #[allow(unused_imports)]
4453        use super::*;
4454
4455        /// CertificateAuthorityDomainConfig configures one or more fully qualified
4456        /// domain names (FQDN) to a specific certificate.
4457        #[derive(Clone, Default, PartialEq)]
4458        #[non_exhaustive]
4459        pub struct CertificateAuthorityDomainConfig {
4460
4461            /// List of fully qualified domain names (FQDN).
4462            /// Specifying port is supported.
4463            /// Wildcards are NOT supported.
4464            /// Examples:
4465            ///
4466            /// - my.customdomain.com
4467            /// - 10.0.1.2:5000
4468            pub fqdns: std::vec::Vec<std::string::String>,
4469
4470            /// Certificate access config. The following are supported:
4471            ///
4472            /// - GCPSecretManagerCertificateConfig
4473            pub certificate_config: std::option::Option<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig>,
4474
4475            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4476        }
4477
4478        impl CertificateAuthorityDomainConfig {
4479            pub fn new() -> Self {
4480                std::default::Default::default()
4481            }
4482
4483            /// Sets the value of [fqdns][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::fqdns].
4484            pub fn set_fqdns<T, V>(mut self, v: T) -> Self
4485            where
4486                T: std::iter::IntoIterator<Item = V>,
4487                V: std::convert::Into<std::string::String>,
4488            {
4489                use std::iter::Iterator;
4490                self.fqdns = v.into_iter().map(|i| i.into()).collect();
4491                self
4492            }
4493
4494            /// Sets the value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config].
4495            ///
4496            /// Note that all the setters affecting `certificate_config` are mutually
4497            /// exclusive.
4498            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
4499            {
4500                self.certificate_config = v.into();
4501                self
4502            }
4503
4504            /// The value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config]
4505            /// if it holds a `GcpSecretManagerCertificateConfig`, `None` if the field is not set or
4506            /// holds a different branch.
4507            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>>{
4508                #[allow(unreachable_patterns)]
4509                self.certificate_config.as_ref().and_then(|v| match v {
4510                    crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(v) => std::option::Option::Some(v),
4511                    _ => std::option::Option::None,
4512                })
4513            }
4514
4515            /// Sets the value of [certificate_config][crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig::certificate_config]
4516            /// to hold a `GcpSecretManagerCertificateConfig`.
4517            ///
4518            /// Note that all the setters affecting `certificate_config` are
4519            /// mutually exclusive.
4520            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{
4521                self.certificate_config = std::option::Option::Some(
4522                    crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(
4523                        v.into()
4524                    )
4525                );
4526                self
4527            }
4528        }
4529
4530        impl wkt::message::Message for CertificateAuthorityDomainConfig {
4531            fn typename() -> &'static str {
4532                "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"
4533            }
4534        }
4535
4536        /// Defines additional types related to [CertificateAuthorityDomainConfig].
4537        pub mod certificate_authority_domain_config {
4538            #[allow(unused_imports)]
4539            use super::*;
4540
4541            /// GCPSecretManagerCertificateConfig configures a secret from
4542            /// [Google Secret
4543            /// Manager](https://cloud.google.com/secret-manager).
4544            #[derive(Clone, Default, PartialEq)]
4545            #[non_exhaustive]
4546            pub struct GCPSecretManagerCertificateConfig {
4547                /// Secret URI, in the form
4548                /// "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
4549                /// Version can be fixed (e.g. "2") or "latest"
4550                pub secret_uri: std::string::String,
4551
4552                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4553            }
4554
4555            impl GCPSecretManagerCertificateConfig {
4556                pub fn new() -> Self {
4557                    std::default::Default::default()
4558                }
4559
4560                /// Sets the value of [secret_uri][crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig::secret_uri].
4561                pub fn set_secret_uri<T: std::convert::Into<std::string::String>>(
4562                    mut self,
4563                    v: T,
4564                ) -> Self {
4565                    self.secret_uri = v.into();
4566                    self
4567                }
4568            }
4569
4570            impl wkt::message::Message for GCPSecretManagerCertificateConfig {
4571                fn typename() -> &'static str {
4572                    "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"
4573                }
4574            }
4575
4576            /// Certificate access config. The following are supported:
4577            ///
4578            /// - GCPSecretManagerCertificateConfig
4579            #[derive(Clone, Debug, PartialEq)]
4580            #[non_exhaustive]
4581            pub enum CertificateConfig {
4582                /// Google Secret Manager (GCP) certificate configuration.
4583                GcpSecretManagerCertificateConfig(std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>),
4584            }
4585        }
4586    }
4587}
4588
4589/// Kubernetes taint is composed of three fields: key, value, and effect. Effect
4590/// can only be one of three types:  NoSchedule, PreferNoSchedule or NoExecute.
4591///
4592/// See
4593/// [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration)
4594/// for more information, including usage and the valid values.
4595#[derive(Clone, Default, PartialEq)]
4596#[non_exhaustive]
4597pub struct NodeTaint {
4598    /// Key for taint.
4599    pub key: std::string::String,
4600
4601    /// Value for taint.
4602    pub value: std::string::String,
4603
4604    /// Effect for taint.
4605    pub effect: crate::model::node_taint::Effect,
4606
4607    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4608}
4609
4610impl NodeTaint {
4611    pub fn new() -> Self {
4612        std::default::Default::default()
4613    }
4614
4615    /// Sets the value of [key][crate::model::NodeTaint::key].
4616    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4617        self.key = v.into();
4618        self
4619    }
4620
4621    /// Sets the value of [value][crate::model::NodeTaint::value].
4622    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4623        self.value = v.into();
4624        self
4625    }
4626
4627    /// Sets the value of [effect][crate::model::NodeTaint::effect].
4628    pub fn set_effect<T: std::convert::Into<crate::model::node_taint::Effect>>(
4629        mut self,
4630        v: T,
4631    ) -> Self {
4632        self.effect = v.into();
4633        self
4634    }
4635}
4636
4637impl wkt::message::Message for NodeTaint {
4638    fn typename() -> &'static str {
4639        "type.googleapis.com/google.container.v1.NodeTaint"
4640    }
4641}
4642
4643/// Defines additional types related to [NodeTaint].
4644pub mod node_taint {
4645    #[allow(unused_imports)]
4646    use super::*;
4647
4648    /// Possible values for Effect in taint.
4649    ///
4650    /// # Working with unknown values
4651    ///
4652    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4653    /// additional enum variants at any time. Adding new variants is not considered
4654    /// a breaking change. Applications should write their code in anticipation of:
4655    ///
4656    /// - New values appearing in future releases of the client library, **and**
4657    /// - New values received dynamically, without application changes.
4658    ///
4659    /// Please consult the [Working with enums] section in the user guide for some
4660    /// guidelines.
4661    ///
4662    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4663    #[derive(Clone, Debug, PartialEq)]
4664    #[non_exhaustive]
4665    pub enum Effect {
4666        /// Not set
4667        Unspecified,
4668        /// NoSchedule
4669        NoSchedule,
4670        /// PreferNoSchedule
4671        PreferNoSchedule,
4672        /// NoExecute
4673        NoExecute,
4674        /// If set, the enum was initialized with an unknown value.
4675        ///
4676        /// Applications can examine the value using [Effect::value] or
4677        /// [Effect::name].
4678        UnknownValue(effect::UnknownValue),
4679    }
4680
4681    #[doc(hidden)]
4682    pub mod effect {
4683        #[allow(unused_imports)]
4684        use super::*;
4685        #[derive(Clone, Debug, PartialEq)]
4686        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4687    }
4688
4689    impl Effect {
4690        /// Gets the enum value.
4691        ///
4692        /// Returns `None` if the enum contains an unknown value deserialized from
4693        /// the string representation of enums.
4694        pub fn value(&self) -> std::option::Option<i32> {
4695            match self {
4696                Self::Unspecified => std::option::Option::Some(0),
4697                Self::NoSchedule => std::option::Option::Some(1),
4698                Self::PreferNoSchedule => std::option::Option::Some(2),
4699                Self::NoExecute => std::option::Option::Some(3),
4700                Self::UnknownValue(u) => u.0.value(),
4701            }
4702        }
4703
4704        /// Gets the enum value as a string.
4705        ///
4706        /// Returns `None` if the enum contains an unknown value deserialized from
4707        /// the integer representation of enums.
4708        pub fn name(&self) -> std::option::Option<&str> {
4709            match self {
4710                Self::Unspecified => std::option::Option::Some("EFFECT_UNSPECIFIED"),
4711                Self::NoSchedule => std::option::Option::Some("NO_SCHEDULE"),
4712                Self::PreferNoSchedule => std::option::Option::Some("PREFER_NO_SCHEDULE"),
4713                Self::NoExecute => std::option::Option::Some("NO_EXECUTE"),
4714                Self::UnknownValue(u) => u.0.name(),
4715            }
4716        }
4717    }
4718
4719    impl std::default::Default for Effect {
4720        fn default() -> Self {
4721            use std::convert::From;
4722            Self::from(0)
4723        }
4724    }
4725
4726    impl std::fmt::Display for Effect {
4727        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4728            wkt::internal::display_enum(f, self.name(), self.value())
4729        }
4730    }
4731
4732    impl std::convert::From<i32> for Effect {
4733        fn from(value: i32) -> Self {
4734            match value {
4735                0 => Self::Unspecified,
4736                1 => Self::NoSchedule,
4737                2 => Self::PreferNoSchedule,
4738                3 => Self::NoExecute,
4739                _ => Self::UnknownValue(effect::UnknownValue(
4740                    wkt::internal::UnknownEnumValue::Integer(value),
4741                )),
4742            }
4743        }
4744    }
4745
4746    impl std::convert::From<&str> for Effect {
4747        fn from(value: &str) -> Self {
4748            use std::string::ToString;
4749            match value {
4750                "EFFECT_UNSPECIFIED" => Self::Unspecified,
4751                "NO_SCHEDULE" => Self::NoSchedule,
4752                "PREFER_NO_SCHEDULE" => Self::PreferNoSchedule,
4753                "NO_EXECUTE" => Self::NoExecute,
4754                _ => Self::UnknownValue(effect::UnknownValue(
4755                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4756                )),
4757            }
4758        }
4759    }
4760
4761    impl serde::ser::Serialize for Effect {
4762        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4763        where
4764            S: serde::Serializer,
4765        {
4766            match self {
4767                Self::Unspecified => serializer.serialize_i32(0),
4768                Self::NoSchedule => serializer.serialize_i32(1),
4769                Self::PreferNoSchedule => serializer.serialize_i32(2),
4770                Self::NoExecute => serializer.serialize_i32(3),
4771                Self::UnknownValue(u) => u.0.serialize(serializer),
4772            }
4773        }
4774    }
4775
4776    impl<'de> serde::de::Deserialize<'de> for Effect {
4777        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4778        where
4779            D: serde::Deserializer<'de>,
4780        {
4781            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Effect>::new(
4782                ".google.container.v1.NodeTaint.Effect",
4783            ))
4784        }
4785    }
4786}
4787
4788/// Collection of Kubernetes [node
4789/// taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration).
4790#[derive(Clone, Default, PartialEq)]
4791#[non_exhaustive]
4792pub struct NodeTaints {
4793    /// List of node taints.
4794    pub taints: std::vec::Vec<crate::model::NodeTaint>,
4795
4796    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4797}
4798
4799impl NodeTaints {
4800    pub fn new() -> Self {
4801        std::default::Default::default()
4802    }
4803
4804    /// Sets the value of [taints][crate::model::NodeTaints::taints].
4805    pub fn set_taints<T, V>(mut self, v: T) -> Self
4806    where
4807        T: std::iter::IntoIterator<Item = V>,
4808        V: std::convert::Into<crate::model::NodeTaint>,
4809    {
4810        use std::iter::Iterator;
4811        self.taints = v.into_iter().map(|i| i.into()).collect();
4812        self
4813    }
4814}
4815
4816impl wkt::message::Message for NodeTaints {
4817    fn typename() -> &'static str {
4818        "type.googleapis.com/google.container.v1.NodeTaints"
4819    }
4820}
4821
4822/// Collection of node-level [Kubernetes
4823/// labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels).
4824#[derive(Clone, Default, PartialEq)]
4825#[non_exhaustive]
4826pub struct NodeLabels {
4827    /// Map of node label keys and node label values.
4828    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4829
4830    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4831}
4832
4833impl NodeLabels {
4834    pub fn new() -> Self {
4835        std::default::Default::default()
4836    }
4837
4838    /// Sets the value of [labels][crate::model::NodeLabels::labels].
4839    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4840    where
4841        T: std::iter::IntoIterator<Item = (K, V)>,
4842        K: std::convert::Into<std::string::String>,
4843        V: std::convert::Into<std::string::String>,
4844    {
4845        use std::iter::Iterator;
4846        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4847        self
4848    }
4849}
4850
4851impl wkt::message::Message for NodeLabels {
4852    fn typename() -> &'static str {
4853        "type.googleapis.com/google.container.v1.NodeLabels"
4854    }
4855}
4856
4857/// Collection of [GCP
4858/// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
4859#[derive(Clone, Default, PartialEq)]
4860#[non_exhaustive]
4861pub struct ResourceLabels {
4862    /// Map of node label keys and node label values.
4863    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4864
4865    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4866}
4867
4868impl ResourceLabels {
4869    pub fn new() -> Self {
4870        std::default::Default::default()
4871    }
4872
4873    /// Sets the value of [labels][crate::model::ResourceLabels::labels].
4874    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4875    where
4876        T: std::iter::IntoIterator<Item = (K, V)>,
4877        K: std::convert::Into<std::string::String>,
4878        V: std::convert::Into<std::string::String>,
4879    {
4880        use std::iter::Iterator;
4881        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4882        self
4883    }
4884}
4885
4886impl wkt::message::Message for ResourceLabels {
4887    fn typename() -> &'static str {
4888        "type.googleapis.com/google.container.v1.ResourceLabels"
4889    }
4890}
4891
4892/// Collection of Compute Engine network tags that can be applied to a node's
4893/// underlying VM instance.
4894#[derive(Clone, Default, PartialEq)]
4895#[non_exhaustive]
4896pub struct NetworkTags {
4897    /// List of network tags.
4898    pub tags: std::vec::Vec<std::string::String>,
4899
4900    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4901}
4902
4903impl NetworkTags {
4904    pub fn new() -> Self {
4905        std::default::Default::default()
4906    }
4907
4908    /// Sets the value of [tags][crate::model::NetworkTags::tags].
4909    pub fn set_tags<T, V>(mut self, v: T) -> Self
4910    where
4911        T: std::iter::IntoIterator<Item = V>,
4912        V: std::convert::Into<std::string::String>,
4913    {
4914        use std::iter::Iterator;
4915        self.tags = v.into_iter().map(|i| i.into()).collect();
4916        self
4917    }
4918}
4919
4920impl wkt::message::Message for NetworkTags {
4921    fn typename() -> &'static str {
4922        "type.googleapis.com/google.container.v1.NetworkTags"
4923    }
4924}
4925
4926/// The authentication information for accessing the master endpoint.
4927/// Authentication can be done using HTTP basic auth or using client
4928/// certificates.
4929#[derive(Clone, Default, PartialEq)]
4930#[non_exhaustive]
4931pub struct MasterAuth {
4932    /// The username to use for HTTP basic authentication to the master endpoint.
4933    /// For clusters v1.6.0 and later, basic authentication can be disabled by
4934    /// leaving username unspecified (or setting it to the empty string).
4935    ///
4936    /// Warning: basic authentication is deprecated, and will be removed in GKE
4937    /// control plane versions 1.19 and newer. For a list of recommended
4938    /// authentication methods, see:
4939    /// <https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication>
4940    #[deprecated]
4941    pub username: std::string::String,
4942
4943    /// The password to use for HTTP basic authentication to the master endpoint.
4944    /// Because the master endpoint is open to the Internet, you should create a
4945    /// strong password.  If a password is provided for cluster creation, username
4946    /// must be non-empty.
4947    ///
4948    /// Warning: basic authentication is deprecated, and will be removed in GKE
4949    /// control plane versions 1.19 and newer. For a list of recommended
4950    /// authentication methods, see:
4951    /// <https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication>
4952    #[deprecated]
4953    pub password: std::string::String,
4954
4955    /// Configuration for client certificate authentication on the cluster. For
4956    /// clusters before v1.12, if no configuration is specified, a client
4957    /// certificate is issued.
4958    pub client_certificate_config: std::option::Option<crate::model::ClientCertificateConfig>,
4959
4960    /// Output only. Base64-encoded public certificate that is the root of
4961    /// trust for the cluster.
4962    pub cluster_ca_certificate: std::string::String,
4963
4964    /// Output only. Base64-encoded public certificate used by clients to
4965    /// authenticate to the cluster endpoint. Issued only if
4966    /// client_certificate_config is set.
4967    pub client_certificate: std::string::String,
4968
4969    /// Output only. Base64-encoded private key used by clients to authenticate
4970    /// to the cluster endpoint.
4971    pub client_key: std::string::String,
4972
4973    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4974}
4975
4976impl MasterAuth {
4977    pub fn new() -> Self {
4978        std::default::Default::default()
4979    }
4980
4981    /// Sets the value of [username][crate::model::MasterAuth::username].
4982    #[deprecated]
4983    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4984        self.username = v.into();
4985        self
4986    }
4987
4988    /// Sets the value of [password][crate::model::MasterAuth::password].
4989    #[deprecated]
4990    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4991        self.password = v.into();
4992        self
4993    }
4994
4995    /// Sets the value of [client_certificate_config][crate::model::MasterAuth::client_certificate_config].
4996    pub fn set_client_certificate_config<T>(mut self, v: T) -> Self
4997    where
4998        T: std::convert::Into<crate::model::ClientCertificateConfig>,
4999    {
5000        self.client_certificate_config = std::option::Option::Some(v.into());
5001        self
5002    }
5003
5004    /// Sets or clears the value of [client_certificate_config][crate::model::MasterAuth::client_certificate_config].
5005    pub fn set_or_clear_client_certificate_config<T>(mut self, v: std::option::Option<T>) -> Self
5006    where
5007        T: std::convert::Into<crate::model::ClientCertificateConfig>,
5008    {
5009        self.client_certificate_config = v.map(|x| x.into());
5010        self
5011    }
5012
5013    /// Sets the value of [cluster_ca_certificate][crate::model::MasterAuth::cluster_ca_certificate].
5014    pub fn set_cluster_ca_certificate<T: std::convert::Into<std::string::String>>(
5015        mut self,
5016        v: T,
5017    ) -> Self {
5018        self.cluster_ca_certificate = v.into();
5019        self
5020    }
5021
5022    /// Sets the value of [client_certificate][crate::model::MasterAuth::client_certificate].
5023    pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
5024        mut self,
5025        v: T,
5026    ) -> Self {
5027        self.client_certificate = v.into();
5028        self
5029    }
5030
5031    /// Sets the value of [client_key][crate::model::MasterAuth::client_key].
5032    pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5033        self.client_key = v.into();
5034        self
5035    }
5036}
5037
5038impl wkt::message::Message for MasterAuth {
5039    fn typename() -> &'static str {
5040        "type.googleapis.com/google.container.v1.MasterAuth"
5041    }
5042}
5043
5044/// Configuration for client certificates on the cluster.
5045#[derive(Clone, Default, PartialEq)]
5046#[non_exhaustive]
5047pub struct ClientCertificateConfig {
5048    /// Issue a client certificate.
5049    pub issue_client_certificate: bool,
5050
5051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5052}
5053
5054impl ClientCertificateConfig {
5055    pub fn new() -> Self {
5056        std::default::Default::default()
5057    }
5058
5059    /// Sets the value of [issue_client_certificate][crate::model::ClientCertificateConfig::issue_client_certificate].
5060    pub fn set_issue_client_certificate<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5061        self.issue_client_certificate = v.into();
5062        self
5063    }
5064}
5065
5066impl wkt::message::Message for ClientCertificateConfig {
5067    fn typename() -> &'static str {
5068        "type.googleapis.com/google.container.v1.ClientCertificateConfig"
5069    }
5070}
5071
5072/// Configuration for the addons that can be automatically spun up in the
5073/// cluster, enabling additional functionality.
5074#[derive(Clone, Default, PartialEq)]
5075#[non_exhaustive]
5076pub struct AddonsConfig {
5077    /// Configuration for the HTTP (L7) load balancing controller addon, which
5078    /// makes it easy to set up HTTP load balancers for services in a cluster.
5079    pub http_load_balancing: std::option::Option<crate::model::HttpLoadBalancing>,
5080
5081    /// Configuration for the horizontal pod autoscaling feature, which
5082    /// increases or decreases the number of replica pods a replication controller
5083    /// has based on the resource usage of the existing pods.
5084    pub horizontal_pod_autoscaling: std::option::Option<crate::model::HorizontalPodAutoscaling>,
5085
5086    /// Configuration for the Kubernetes Dashboard.
5087    /// This addon is deprecated, and will be disabled in 1.15. It is recommended
5088    /// to use the Cloud Console to manage and monitor your Kubernetes clusters,
5089    /// workloads and applications. For more information, see:
5090    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards>
5091    #[deprecated]
5092    pub kubernetes_dashboard: std::option::Option<crate::model::KubernetesDashboard>,
5093
5094    /// Configuration for NetworkPolicy. This only tracks whether the addon
5095    /// is enabled or not on the Master, it does not track whether network policy
5096    /// is enabled for the nodes.
5097    pub network_policy_config: std::option::Option<crate::model::NetworkPolicyConfig>,
5098
5099    /// Configuration for the Cloud Run addon, which allows the user to use a
5100    /// managed Knative service.
5101    pub cloud_run_config: std::option::Option<crate::model::CloudRunConfig>,
5102
5103    /// Configuration for NodeLocalDNS, a dns cache running on cluster nodes
5104    pub dns_cache_config: std::option::Option<crate::model::DnsCacheConfig>,
5105
5106    /// Configuration for the ConfigConnector add-on, a Kubernetes
5107    /// extension to manage hosted GCP services through the Kubernetes API
5108    pub config_connector_config: std::option::Option<crate::model::ConfigConnectorConfig>,
5109
5110    /// Configuration for the Compute Engine Persistent Disk CSI driver.
5111    pub gce_persistent_disk_csi_driver_config:
5112        std::option::Option<crate::model::GcePersistentDiskCsiDriverConfig>,
5113
5114    /// Configuration for the GCP Filestore CSI driver.
5115    pub gcp_filestore_csi_driver_config:
5116        std::option::Option<crate::model::GcpFilestoreCsiDriverConfig>,
5117
5118    /// Configuration for the Backup for GKE agent addon.
5119    pub gke_backup_agent_config: std::option::Option<crate::model::GkeBackupAgentConfig>,
5120
5121    /// Configuration for the Cloud Storage Fuse CSI driver.
5122    pub gcs_fuse_csi_driver_config: std::option::Option<crate::model::GcsFuseCsiDriverConfig>,
5123
5124    /// Optional. Configuration for the StatefulHA add-on.
5125    pub stateful_ha_config: std::option::Option<crate::model::StatefulHAConfig>,
5126
5127    /// Configuration for the Cloud Storage Parallelstore CSI driver.
5128    pub parallelstore_csi_driver_config:
5129        std::option::Option<crate::model::ParallelstoreCsiDriverConfig>,
5130
5131    /// Optional. Configuration for Ray Operator addon.
5132    pub ray_operator_config: std::option::Option<crate::model::RayOperatorConfig>,
5133
5134    /// Configuration for the High Scale Checkpointing add-on.
5135    pub high_scale_checkpointing_config:
5136        std::option::Option<crate::model::HighScaleCheckpointingConfig>,
5137
5138    /// Configuration for the Lustre CSI driver.
5139    pub lustre_csi_driver_config: std::option::Option<crate::model::LustreCsiDriverConfig>,
5140
5141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5142}
5143
5144impl AddonsConfig {
5145    pub fn new() -> Self {
5146        std::default::Default::default()
5147    }
5148
5149    /// Sets the value of [http_load_balancing][crate::model::AddonsConfig::http_load_balancing].
5150    pub fn set_http_load_balancing<T>(mut self, v: T) -> Self
5151    where
5152        T: std::convert::Into<crate::model::HttpLoadBalancing>,
5153    {
5154        self.http_load_balancing = std::option::Option::Some(v.into());
5155        self
5156    }
5157
5158    /// Sets or clears the value of [http_load_balancing][crate::model::AddonsConfig::http_load_balancing].
5159    pub fn set_or_clear_http_load_balancing<T>(mut self, v: std::option::Option<T>) -> Self
5160    where
5161        T: std::convert::Into<crate::model::HttpLoadBalancing>,
5162    {
5163        self.http_load_balancing = v.map(|x| x.into());
5164        self
5165    }
5166
5167    /// Sets the value of [horizontal_pod_autoscaling][crate::model::AddonsConfig::horizontal_pod_autoscaling].
5168    pub fn set_horizontal_pod_autoscaling<T>(mut self, v: T) -> Self
5169    where
5170        T: std::convert::Into<crate::model::HorizontalPodAutoscaling>,
5171    {
5172        self.horizontal_pod_autoscaling = std::option::Option::Some(v.into());
5173        self
5174    }
5175
5176    /// Sets or clears the value of [horizontal_pod_autoscaling][crate::model::AddonsConfig::horizontal_pod_autoscaling].
5177    pub fn set_or_clear_horizontal_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
5178    where
5179        T: std::convert::Into<crate::model::HorizontalPodAutoscaling>,
5180    {
5181        self.horizontal_pod_autoscaling = v.map(|x| x.into());
5182        self
5183    }
5184
5185    /// Sets the value of [kubernetes_dashboard][crate::model::AddonsConfig::kubernetes_dashboard].
5186    #[deprecated]
5187    pub fn set_kubernetes_dashboard<T>(mut self, v: T) -> Self
5188    where
5189        T: std::convert::Into<crate::model::KubernetesDashboard>,
5190    {
5191        self.kubernetes_dashboard = std::option::Option::Some(v.into());
5192        self
5193    }
5194
5195    /// Sets or clears the value of [kubernetes_dashboard][crate::model::AddonsConfig::kubernetes_dashboard].
5196    #[deprecated]
5197    pub fn set_or_clear_kubernetes_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
5198    where
5199        T: std::convert::Into<crate::model::KubernetesDashboard>,
5200    {
5201        self.kubernetes_dashboard = v.map(|x| x.into());
5202        self
5203    }
5204
5205    /// Sets the value of [network_policy_config][crate::model::AddonsConfig::network_policy_config].
5206    pub fn set_network_policy_config<T>(mut self, v: T) -> Self
5207    where
5208        T: std::convert::Into<crate::model::NetworkPolicyConfig>,
5209    {
5210        self.network_policy_config = std::option::Option::Some(v.into());
5211        self
5212    }
5213
5214    /// Sets or clears the value of [network_policy_config][crate::model::AddonsConfig::network_policy_config].
5215    pub fn set_or_clear_network_policy_config<T>(mut self, v: std::option::Option<T>) -> Self
5216    where
5217        T: std::convert::Into<crate::model::NetworkPolicyConfig>,
5218    {
5219        self.network_policy_config = v.map(|x| x.into());
5220        self
5221    }
5222
5223    /// Sets the value of [cloud_run_config][crate::model::AddonsConfig::cloud_run_config].
5224    pub fn set_cloud_run_config<T>(mut self, v: T) -> Self
5225    where
5226        T: std::convert::Into<crate::model::CloudRunConfig>,
5227    {
5228        self.cloud_run_config = std::option::Option::Some(v.into());
5229        self
5230    }
5231
5232    /// Sets or clears the value of [cloud_run_config][crate::model::AddonsConfig::cloud_run_config].
5233    pub fn set_or_clear_cloud_run_config<T>(mut self, v: std::option::Option<T>) -> Self
5234    where
5235        T: std::convert::Into<crate::model::CloudRunConfig>,
5236    {
5237        self.cloud_run_config = v.map(|x| x.into());
5238        self
5239    }
5240
5241    /// Sets the value of [dns_cache_config][crate::model::AddonsConfig::dns_cache_config].
5242    pub fn set_dns_cache_config<T>(mut self, v: T) -> Self
5243    where
5244        T: std::convert::Into<crate::model::DnsCacheConfig>,
5245    {
5246        self.dns_cache_config = std::option::Option::Some(v.into());
5247        self
5248    }
5249
5250    /// Sets or clears the value of [dns_cache_config][crate::model::AddonsConfig::dns_cache_config].
5251    pub fn set_or_clear_dns_cache_config<T>(mut self, v: std::option::Option<T>) -> Self
5252    where
5253        T: std::convert::Into<crate::model::DnsCacheConfig>,
5254    {
5255        self.dns_cache_config = v.map(|x| x.into());
5256        self
5257    }
5258
5259    /// Sets the value of [config_connector_config][crate::model::AddonsConfig::config_connector_config].
5260    pub fn set_config_connector_config<T>(mut self, v: T) -> Self
5261    where
5262        T: std::convert::Into<crate::model::ConfigConnectorConfig>,
5263    {
5264        self.config_connector_config = std::option::Option::Some(v.into());
5265        self
5266    }
5267
5268    /// Sets or clears the value of [config_connector_config][crate::model::AddonsConfig::config_connector_config].
5269    pub fn set_or_clear_config_connector_config<T>(mut self, v: std::option::Option<T>) -> Self
5270    where
5271        T: std::convert::Into<crate::model::ConfigConnectorConfig>,
5272    {
5273        self.config_connector_config = v.map(|x| x.into());
5274        self
5275    }
5276
5277    /// Sets the value of [gce_persistent_disk_csi_driver_config][crate::model::AddonsConfig::gce_persistent_disk_csi_driver_config].
5278    pub fn set_gce_persistent_disk_csi_driver_config<T>(mut self, v: T) -> Self
5279    where
5280        T: std::convert::Into<crate::model::GcePersistentDiskCsiDriverConfig>,
5281    {
5282        self.gce_persistent_disk_csi_driver_config = std::option::Option::Some(v.into());
5283        self
5284    }
5285
5286    /// Sets or clears the value of [gce_persistent_disk_csi_driver_config][crate::model::AddonsConfig::gce_persistent_disk_csi_driver_config].
5287    pub fn set_or_clear_gce_persistent_disk_csi_driver_config<T>(
5288        mut self,
5289        v: std::option::Option<T>,
5290    ) -> Self
5291    where
5292        T: std::convert::Into<crate::model::GcePersistentDiskCsiDriverConfig>,
5293    {
5294        self.gce_persistent_disk_csi_driver_config = v.map(|x| x.into());
5295        self
5296    }
5297
5298    /// Sets the value of [gcp_filestore_csi_driver_config][crate::model::AddonsConfig::gcp_filestore_csi_driver_config].
5299    pub fn set_gcp_filestore_csi_driver_config<T>(mut self, v: T) -> Self
5300    where
5301        T: std::convert::Into<crate::model::GcpFilestoreCsiDriverConfig>,
5302    {
5303        self.gcp_filestore_csi_driver_config = std::option::Option::Some(v.into());
5304        self
5305    }
5306
5307    /// Sets or clears the value of [gcp_filestore_csi_driver_config][crate::model::AddonsConfig::gcp_filestore_csi_driver_config].
5308    pub fn set_or_clear_gcp_filestore_csi_driver_config<T>(
5309        mut self,
5310        v: std::option::Option<T>,
5311    ) -> Self
5312    where
5313        T: std::convert::Into<crate::model::GcpFilestoreCsiDriverConfig>,
5314    {
5315        self.gcp_filestore_csi_driver_config = v.map(|x| x.into());
5316        self
5317    }
5318
5319    /// Sets the value of [gke_backup_agent_config][crate::model::AddonsConfig::gke_backup_agent_config].
5320    pub fn set_gke_backup_agent_config<T>(mut self, v: T) -> Self
5321    where
5322        T: std::convert::Into<crate::model::GkeBackupAgentConfig>,
5323    {
5324        self.gke_backup_agent_config = std::option::Option::Some(v.into());
5325        self
5326    }
5327
5328    /// Sets or clears the value of [gke_backup_agent_config][crate::model::AddonsConfig::gke_backup_agent_config].
5329    pub fn set_or_clear_gke_backup_agent_config<T>(mut self, v: std::option::Option<T>) -> Self
5330    where
5331        T: std::convert::Into<crate::model::GkeBackupAgentConfig>,
5332    {
5333        self.gke_backup_agent_config = v.map(|x| x.into());
5334        self
5335    }
5336
5337    /// Sets the value of [gcs_fuse_csi_driver_config][crate::model::AddonsConfig::gcs_fuse_csi_driver_config].
5338    pub fn set_gcs_fuse_csi_driver_config<T>(mut self, v: T) -> Self
5339    where
5340        T: std::convert::Into<crate::model::GcsFuseCsiDriverConfig>,
5341    {
5342        self.gcs_fuse_csi_driver_config = std::option::Option::Some(v.into());
5343        self
5344    }
5345
5346    /// Sets or clears the value of [gcs_fuse_csi_driver_config][crate::model::AddonsConfig::gcs_fuse_csi_driver_config].
5347    pub fn set_or_clear_gcs_fuse_csi_driver_config<T>(mut self, v: std::option::Option<T>) -> Self
5348    where
5349        T: std::convert::Into<crate::model::GcsFuseCsiDriverConfig>,
5350    {
5351        self.gcs_fuse_csi_driver_config = v.map(|x| x.into());
5352        self
5353    }
5354
5355    /// Sets the value of [stateful_ha_config][crate::model::AddonsConfig::stateful_ha_config].
5356    pub fn set_stateful_ha_config<T>(mut self, v: T) -> Self
5357    where
5358        T: std::convert::Into<crate::model::StatefulHAConfig>,
5359    {
5360        self.stateful_ha_config = std::option::Option::Some(v.into());
5361        self
5362    }
5363
5364    /// Sets or clears the value of [stateful_ha_config][crate::model::AddonsConfig::stateful_ha_config].
5365    pub fn set_or_clear_stateful_ha_config<T>(mut self, v: std::option::Option<T>) -> Self
5366    where
5367        T: std::convert::Into<crate::model::StatefulHAConfig>,
5368    {
5369        self.stateful_ha_config = v.map(|x| x.into());
5370        self
5371    }
5372
5373    /// Sets the value of [parallelstore_csi_driver_config][crate::model::AddonsConfig::parallelstore_csi_driver_config].
5374    pub fn set_parallelstore_csi_driver_config<T>(mut self, v: T) -> Self
5375    where
5376        T: std::convert::Into<crate::model::ParallelstoreCsiDriverConfig>,
5377    {
5378        self.parallelstore_csi_driver_config = std::option::Option::Some(v.into());
5379        self
5380    }
5381
5382    /// Sets or clears the value of [parallelstore_csi_driver_config][crate::model::AddonsConfig::parallelstore_csi_driver_config].
5383    pub fn set_or_clear_parallelstore_csi_driver_config<T>(
5384        mut self,
5385        v: std::option::Option<T>,
5386    ) -> Self
5387    where
5388        T: std::convert::Into<crate::model::ParallelstoreCsiDriverConfig>,
5389    {
5390        self.parallelstore_csi_driver_config = v.map(|x| x.into());
5391        self
5392    }
5393
5394    /// Sets the value of [ray_operator_config][crate::model::AddonsConfig::ray_operator_config].
5395    pub fn set_ray_operator_config<T>(mut self, v: T) -> Self
5396    where
5397        T: std::convert::Into<crate::model::RayOperatorConfig>,
5398    {
5399        self.ray_operator_config = std::option::Option::Some(v.into());
5400        self
5401    }
5402
5403    /// Sets or clears the value of [ray_operator_config][crate::model::AddonsConfig::ray_operator_config].
5404    pub fn set_or_clear_ray_operator_config<T>(mut self, v: std::option::Option<T>) -> Self
5405    where
5406        T: std::convert::Into<crate::model::RayOperatorConfig>,
5407    {
5408        self.ray_operator_config = v.map(|x| x.into());
5409        self
5410    }
5411
5412    /// Sets the value of [high_scale_checkpointing_config][crate::model::AddonsConfig::high_scale_checkpointing_config].
5413    pub fn set_high_scale_checkpointing_config<T>(mut self, v: T) -> Self
5414    where
5415        T: std::convert::Into<crate::model::HighScaleCheckpointingConfig>,
5416    {
5417        self.high_scale_checkpointing_config = std::option::Option::Some(v.into());
5418        self
5419    }
5420
5421    /// Sets or clears the value of [high_scale_checkpointing_config][crate::model::AddonsConfig::high_scale_checkpointing_config].
5422    pub fn set_or_clear_high_scale_checkpointing_config<T>(
5423        mut self,
5424        v: std::option::Option<T>,
5425    ) -> Self
5426    where
5427        T: std::convert::Into<crate::model::HighScaleCheckpointingConfig>,
5428    {
5429        self.high_scale_checkpointing_config = v.map(|x| x.into());
5430        self
5431    }
5432
5433    /// Sets the value of [lustre_csi_driver_config][crate::model::AddonsConfig::lustre_csi_driver_config].
5434    pub fn set_lustre_csi_driver_config<T>(mut self, v: T) -> Self
5435    where
5436        T: std::convert::Into<crate::model::LustreCsiDriverConfig>,
5437    {
5438        self.lustre_csi_driver_config = std::option::Option::Some(v.into());
5439        self
5440    }
5441
5442    /// Sets or clears the value of [lustre_csi_driver_config][crate::model::AddonsConfig::lustre_csi_driver_config].
5443    pub fn set_or_clear_lustre_csi_driver_config<T>(mut self, v: std::option::Option<T>) -> Self
5444    where
5445        T: std::convert::Into<crate::model::LustreCsiDriverConfig>,
5446    {
5447        self.lustre_csi_driver_config = v.map(|x| x.into());
5448        self
5449    }
5450}
5451
5452impl wkt::message::Message for AddonsConfig {
5453    fn typename() -> &'static str {
5454        "type.googleapis.com/google.container.v1.AddonsConfig"
5455    }
5456}
5457
5458/// Configuration options for the HTTP (L7) load balancing controller addon,
5459/// which makes it easy to set up HTTP load balancers for services in a cluster.
5460#[derive(Clone, Default, PartialEq)]
5461#[non_exhaustive]
5462pub struct HttpLoadBalancing {
5463    /// Whether the HTTP Load Balancing controller is enabled in the cluster.
5464    /// When enabled, it runs a small pod in the cluster that manages the load
5465    /// balancers.
5466    pub disabled: bool,
5467
5468    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5469}
5470
5471impl HttpLoadBalancing {
5472    pub fn new() -> Self {
5473        std::default::Default::default()
5474    }
5475
5476    /// Sets the value of [disabled][crate::model::HttpLoadBalancing::disabled].
5477    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5478        self.disabled = v.into();
5479        self
5480    }
5481}
5482
5483impl wkt::message::Message for HttpLoadBalancing {
5484    fn typename() -> &'static str {
5485        "type.googleapis.com/google.container.v1.HttpLoadBalancing"
5486    }
5487}
5488
5489/// Configuration options for the horizontal pod autoscaling feature, which
5490/// increases or decreases the number of replica pods a replication controller
5491/// has based on the resource usage of the existing pods.
5492#[derive(Clone, Default, PartialEq)]
5493#[non_exhaustive]
5494pub struct HorizontalPodAutoscaling {
5495    /// Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
5496    /// When enabled, it ensures that metrics are collected into Stackdriver
5497    /// Monitoring.
5498    pub disabled: bool,
5499
5500    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5501}
5502
5503impl HorizontalPodAutoscaling {
5504    pub fn new() -> Self {
5505        std::default::Default::default()
5506    }
5507
5508    /// Sets the value of [disabled][crate::model::HorizontalPodAutoscaling::disabled].
5509    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5510        self.disabled = v.into();
5511        self
5512    }
5513}
5514
5515impl wkt::message::Message for HorizontalPodAutoscaling {
5516    fn typename() -> &'static str {
5517        "type.googleapis.com/google.container.v1.HorizontalPodAutoscaling"
5518    }
5519}
5520
5521/// Configuration for the Kubernetes Dashboard.
5522#[derive(Clone, Default, PartialEq)]
5523#[non_exhaustive]
5524pub struct KubernetesDashboard {
5525    /// Whether the Kubernetes Dashboard is enabled for this cluster.
5526    pub disabled: bool,
5527
5528    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5529}
5530
5531impl KubernetesDashboard {
5532    pub fn new() -> Self {
5533        std::default::Default::default()
5534    }
5535
5536    /// Sets the value of [disabled][crate::model::KubernetesDashboard::disabled].
5537    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5538        self.disabled = v.into();
5539        self
5540    }
5541}
5542
5543impl wkt::message::Message for KubernetesDashboard {
5544    fn typename() -> &'static str {
5545        "type.googleapis.com/google.container.v1.KubernetesDashboard"
5546    }
5547}
5548
5549/// Configuration for NetworkPolicy. This only tracks whether the addon
5550/// is enabled or not on the Master, it does not track whether network policy
5551/// is enabled for the nodes.
5552#[derive(Clone, Default, PartialEq)]
5553#[non_exhaustive]
5554pub struct NetworkPolicyConfig {
5555    /// Whether NetworkPolicy is enabled for this cluster.
5556    pub disabled: bool,
5557
5558    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5559}
5560
5561impl NetworkPolicyConfig {
5562    pub fn new() -> Self {
5563        std::default::Default::default()
5564    }
5565
5566    /// Sets the value of [disabled][crate::model::NetworkPolicyConfig::disabled].
5567    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5568        self.disabled = v.into();
5569        self
5570    }
5571}
5572
5573impl wkt::message::Message for NetworkPolicyConfig {
5574    fn typename() -> &'static str {
5575        "type.googleapis.com/google.container.v1.NetworkPolicyConfig"
5576    }
5577}
5578
5579/// Configuration for NodeLocal DNSCache
5580#[derive(Clone, Default, PartialEq)]
5581#[non_exhaustive]
5582pub struct DnsCacheConfig {
5583    /// Whether NodeLocal DNSCache is enabled for this cluster.
5584    pub enabled: bool,
5585
5586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5587}
5588
5589impl DnsCacheConfig {
5590    pub fn new() -> Self {
5591        std::default::Default::default()
5592    }
5593
5594    /// Sets the value of [enabled][crate::model::DnsCacheConfig::enabled].
5595    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5596        self.enabled = v.into();
5597        self
5598    }
5599}
5600
5601impl wkt::message::Message for DnsCacheConfig {
5602    fn typename() -> &'static str {
5603        "type.googleapis.com/google.container.v1.DnsCacheConfig"
5604    }
5605}
5606
5607/// Configuration for controlling master global access settings.
5608#[derive(Clone, Default, PartialEq)]
5609#[non_exhaustive]
5610pub struct PrivateClusterMasterGlobalAccessConfig {
5611    /// Whenever master is accessible globally or not.
5612    pub enabled: bool,
5613
5614    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5615}
5616
5617impl PrivateClusterMasterGlobalAccessConfig {
5618    pub fn new() -> Self {
5619        std::default::Default::default()
5620    }
5621
5622    /// Sets the value of [enabled][crate::model::PrivateClusterMasterGlobalAccessConfig::enabled].
5623    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5624        self.enabled = v.into();
5625        self
5626    }
5627}
5628
5629impl wkt::message::Message for PrivateClusterMasterGlobalAccessConfig {
5630    fn typename() -> &'static str {
5631        "type.googleapis.com/google.container.v1.PrivateClusterMasterGlobalAccessConfig"
5632    }
5633}
5634
5635/// Configuration options for private clusters.
5636#[derive(Clone, Default, PartialEq)]
5637#[non_exhaustive]
5638pub struct PrivateClusterConfig {
5639    /// Whether nodes have internal IP addresses only. If enabled, all nodes are
5640    /// given only RFC 1918 private addresses and communicate with the master via
5641    /// private networking.
5642    ///
5643    /// Deprecated: Use
5644    /// [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes]
5645    /// instead.
5646    ///
5647    /// [google.container.v1.NetworkConfig.default_enable_private_nodes]: crate::model::NetworkConfig::default_enable_private_nodes
5648    #[deprecated]
5649    pub enable_private_nodes: bool,
5650
5651    /// Whether the master's internal IP address is used as the cluster endpoint.
5652    ///
5653    /// Deprecated: Use
5654    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint]
5655    /// instead. Note that the value of enable_public_endpoint is reversed: if
5656    /// enable_private_endpoint is false, then enable_public_endpoint will be true.
5657    ///
5658    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::enable_public_endpoint
5659    #[deprecated]
5660    pub enable_private_endpoint: bool,
5661
5662    /// The IP range in CIDR notation to use for the hosted master network. This
5663    /// range will be used for assigning internal IP addresses to the master or
5664    /// set of masters, as well as the ILB VIP. This range must not overlap with
5665    /// any other ranges in use within the cluster's network.
5666    pub master_ipv4_cidr_block: std::string::String,
5667
5668    /// Output only. The internal IP address of this cluster's master endpoint.
5669    ///
5670    /// Deprecated: Use
5671    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint]
5672    /// instead.
5673    ///
5674    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint
5675    #[deprecated]
5676    pub private_endpoint: std::string::String,
5677
5678    /// Output only. The external IP address of this cluster's master endpoint.
5679    ///
5680    /// Deprecated:Use
5681    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint]
5682    /// instead.
5683    ///
5684    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::public_endpoint
5685    #[deprecated]
5686    pub public_endpoint: std::string::String,
5687
5688    /// Output only. The peering name in the customer VPC used by this cluster.
5689    pub peering_name: std::string::String,
5690
5691    /// Controls master global access settings.
5692    ///
5693    /// Deprecated: Use
5694    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][]
5695    /// instead.
5696    #[deprecated]
5697    pub master_global_access_config:
5698        std::option::Option<crate::model::PrivateClusterMasterGlobalAccessConfig>,
5699
5700    /// Subnet to provision the master's private endpoint during cluster creation.
5701    /// Specified in projects/*/regions/*/subnetworks/* format.
5702    ///
5703    /// Deprecated: Use
5704    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork]
5705    /// instead.
5706    ///
5707    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint_subnetwork
5708    #[deprecated]
5709    pub private_endpoint_subnetwork: std::string::String,
5710
5711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5712}
5713
5714impl PrivateClusterConfig {
5715    pub fn new() -> Self {
5716        std::default::Default::default()
5717    }
5718
5719    /// Sets the value of [enable_private_nodes][crate::model::PrivateClusterConfig::enable_private_nodes].
5720    #[deprecated]
5721    pub fn set_enable_private_nodes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5722        self.enable_private_nodes = v.into();
5723        self
5724    }
5725
5726    /// Sets the value of [enable_private_endpoint][crate::model::PrivateClusterConfig::enable_private_endpoint].
5727    #[deprecated]
5728    pub fn set_enable_private_endpoint<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5729        self.enable_private_endpoint = v.into();
5730        self
5731    }
5732
5733    /// Sets the value of [master_ipv4_cidr_block][crate::model::PrivateClusterConfig::master_ipv4_cidr_block].
5734    pub fn set_master_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5735        mut self,
5736        v: T,
5737    ) -> Self {
5738        self.master_ipv4_cidr_block = v.into();
5739        self
5740    }
5741
5742    /// Sets the value of [private_endpoint][crate::model::PrivateClusterConfig::private_endpoint].
5743    #[deprecated]
5744    pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
5745        mut self,
5746        v: T,
5747    ) -> Self {
5748        self.private_endpoint = v.into();
5749        self
5750    }
5751
5752    /// Sets the value of [public_endpoint][crate::model::PrivateClusterConfig::public_endpoint].
5753    #[deprecated]
5754    pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5755        self.public_endpoint = v.into();
5756        self
5757    }
5758
5759    /// Sets the value of [peering_name][crate::model::PrivateClusterConfig::peering_name].
5760    pub fn set_peering_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5761        self.peering_name = v.into();
5762        self
5763    }
5764
5765    /// Sets the value of [master_global_access_config][crate::model::PrivateClusterConfig::master_global_access_config].
5766    #[deprecated]
5767    pub fn set_master_global_access_config<T>(mut self, v: T) -> Self
5768    where
5769        T: std::convert::Into<crate::model::PrivateClusterMasterGlobalAccessConfig>,
5770    {
5771        self.master_global_access_config = std::option::Option::Some(v.into());
5772        self
5773    }
5774
5775    /// Sets or clears the value of [master_global_access_config][crate::model::PrivateClusterConfig::master_global_access_config].
5776    #[deprecated]
5777    pub fn set_or_clear_master_global_access_config<T>(mut self, v: std::option::Option<T>) -> Self
5778    where
5779        T: std::convert::Into<crate::model::PrivateClusterMasterGlobalAccessConfig>,
5780    {
5781        self.master_global_access_config = v.map(|x| x.into());
5782        self
5783    }
5784
5785    /// Sets the value of [private_endpoint_subnetwork][crate::model::PrivateClusterConfig::private_endpoint_subnetwork].
5786    #[deprecated]
5787    pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
5788        mut self,
5789        v: T,
5790    ) -> Self {
5791        self.private_endpoint_subnetwork = v.into();
5792        self
5793    }
5794}
5795
5796impl wkt::message::Message for PrivateClusterConfig {
5797    fn typename() -> &'static str {
5798        "type.googleapis.com/google.container.v1.PrivateClusterConfig"
5799    }
5800}
5801
5802/// Configuration for returning group information from authenticators.
5803#[derive(Clone, Default, PartialEq)]
5804#[non_exhaustive]
5805pub struct AuthenticatorGroupsConfig {
5806    /// Whether this cluster should return group membership lookups
5807    /// during authentication using a group of security groups.
5808    pub enabled: bool,
5809
5810    /// The name of the security group-of-groups to be used. Only relevant
5811    /// if enabled = true.
5812    pub security_group: std::string::String,
5813
5814    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5815}
5816
5817impl AuthenticatorGroupsConfig {
5818    pub fn new() -> Self {
5819        std::default::Default::default()
5820    }
5821
5822    /// Sets the value of [enabled][crate::model::AuthenticatorGroupsConfig::enabled].
5823    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5824        self.enabled = v.into();
5825        self
5826    }
5827
5828    /// Sets the value of [security_group][crate::model::AuthenticatorGroupsConfig::security_group].
5829    pub fn set_security_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5830        self.security_group = v.into();
5831        self
5832    }
5833}
5834
5835impl wkt::message::Message for AuthenticatorGroupsConfig {
5836    fn typename() -> &'static str {
5837        "type.googleapis.com/google.container.v1.AuthenticatorGroupsConfig"
5838    }
5839}
5840
5841/// Configuration options for the Cloud Run feature.
5842#[derive(Clone, Default, PartialEq)]
5843#[non_exhaustive]
5844pub struct CloudRunConfig {
5845    /// Whether Cloud Run addon is enabled for this cluster.
5846    pub disabled: bool,
5847
5848    /// Which load balancer type is installed for Cloud Run.
5849    pub load_balancer_type: crate::model::cloud_run_config::LoadBalancerType,
5850
5851    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5852}
5853
5854impl CloudRunConfig {
5855    pub fn new() -> Self {
5856        std::default::Default::default()
5857    }
5858
5859    /// Sets the value of [disabled][crate::model::CloudRunConfig::disabled].
5860    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5861        self.disabled = v.into();
5862        self
5863    }
5864
5865    /// Sets the value of [load_balancer_type][crate::model::CloudRunConfig::load_balancer_type].
5866    pub fn set_load_balancer_type<
5867        T: std::convert::Into<crate::model::cloud_run_config::LoadBalancerType>,
5868    >(
5869        mut self,
5870        v: T,
5871    ) -> Self {
5872        self.load_balancer_type = v.into();
5873        self
5874    }
5875}
5876
5877impl wkt::message::Message for CloudRunConfig {
5878    fn typename() -> &'static str {
5879        "type.googleapis.com/google.container.v1.CloudRunConfig"
5880    }
5881}
5882
5883/// Defines additional types related to [CloudRunConfig].
5884pub mod cloud_run_config {
5885    #[allow(unused_imports)]
5886    use super::*;
5887
5888    /// Load balancer type of ingress service of Cloud Run.
5889    ///
5890    /// # Working with unknown values
5891    ///
5892    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5893    /// additional enum variants at any time. Adding new variants is not considered
5894    /// a breaking change. Applications should write their code in anticipation of:
5895    ///
5896    /// - New values appearing in future releases of the client library, **and**
5897    /// - New values received dynamically, without application changes.
5898    ///
5899    /// Please consult the [Working with enums] section in the user guide for some
5900    /// guidelines.
5901    ///
5902    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5903    #[derive(Clone, Debug, PartialEq)]
5904    #[non_exhaustive]
5905    pub enum LoadBalancerType {
5906        /// Load balancer type for Cloud Run is unspecified.
5907        Unspecified,
5908        /// Install external load balancer for Cloud Run.
5909        External,
5910        /// Install internal load balancer for Cloud Run.
5911        Internal,
5912        /// If set, the enum was initialized with an unknown value.
5913        ///
5914        /// Applications can examine the value using [LoadBalancerType::value] or
5915        /// [LoadBalancerType::name].
5916        UnknownValue(load_balancer_type::UnknownValue),
5917    }
5918
5919    #[doc(hidden)]
5920    pub mod load_balancer_type {
5921        #[allow(unused_imports)]
5922        use super::*;
5923        #[derive(Clone, Debug, PartialEq)]
5924        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5925    }
5926
5927    impl LoadBalancerType {
5928        /// Gets the enum value.
5929        ///
5930        /// Returns `None` if the enum contains an unknown value deserialized from
5931        /// the string representation of enums.
5932        pub fn value(&self) -> std::option::Option<i32> {
5933            match self {
5934                Self::Unspecified => std::option::Option::Some(0),
5935                Self::External => std::option::Option::Some(1),
5936                Self::Internal => std::option::Option::Some(2),
5937                Self::UnknownValue(u) => u.0.value(),
5938            }
5939        }
5940
5941        /// Gets the enum value as a string.
5942        ///
5943        /// Returns `None` if the enum contains an unknown value deserialized from
5944        /// the integer representation of enums.
5945        pub fn name(&self) -> std::option::Option<&str> {
5946            match self {
5947                Self::Unspecified => std::option::Option::Some("LOAD_BALANCER_TYPE_UNSPECIFIED"),
5948                Self::External => std::option::Option::Some("LOAD_BALANCER_TYPE_EXTERNAL"),
5949                Self::Internal => std::option::Option::Some("LOAD_BALANCER_TYPE_INTERNAL"),
5950                Self::UnknownValue(u) => u.0.name(),
5951            }
5952        }
5953    }
5954
5955    impl std::default::Default for LoadBalancerType {
5956        fn default() -> Self {
5957            use std::convert::From;
5958            Self::from(0)
5959        }
5960    }
5961
5962    impl std::fmt::Display for LoadBalancerType {
5963        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5964            wkt::internal::display_enum(f, self.name(), self.value())
5965        }
5966    }
5967
5968    impl std::convert::From<i32> for LoadBalancerType {
5969        fn from(value: i32) -> Self {
5970            match value {
5971                0 => Self::Unspecified,
5972                1 => Self::External,
5973                2 => Self::Internal,
5974                _ => Self::UnknownValue(load_balancer_type::UnknownValue(
5975                    wkt::internal::UnknownEnumValue::Integer(value),
5976                )),
5977            }
5978        }
5979    }
5980
5981    impl std::convert::From<&str> for LoadBalancerType {
5982        fn from(value: &str) -> Self {
5983            use std::string::ToString;
5984            match value {
5985                "LOAD_BALANCER_TYPE_UNSPECIFIED" => Self::Unspecified,
5986                "LOAD_BALANCER_TYPE_EXTERNAL" => Self::External,
5987                "LOAD_BALANCER_TYPE_INTERNAL" => Self::Internal,
5988                _ => Self::UnknownValue(load_balancer_type::UnknownValue(
5989                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5990                )),
5991            }
5992        }
5993    }
5994
5995    impl serde::ser::Serialize for LoadBalancerType {
5996        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5997        where
5998            S: serde::Serializer,
5999        {
6000            match self {
6001                Self::Unspecified => serializer.serialize_i32(0),
6002                Self::External => serializer.serialize_i32(1),
6003                Self::Internal => serializer.serialize_i32(2),
6004                Self::UnknownValue(u) => u.0.serialize(serializer),
6005            }
6006        }
6007    }
6008
6009    impl<'de> serde::de::Deserialize<'de> for LoadBalancerType {
6010        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6011        where
6012            D: serde::Deserializer<'de>,
6013        {
6014            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoadBalancerType>::new(
6015                ".google.container.v1.CloudRunConfig.LoadBalancerType",
6016            ))
6017        }
6018    }
6019}
6020
6021/// Configuration options for the Config Connector add-on.
6022#[derive(Clone, Default, PartialEq)]
6023#[non_exhaustive]
6024pub struct ConfigConnectorConfig {
6025    /// Whether Cloud Connector is enabled for this cluster.
6026    pub enabled: bool,
6027
6028    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6029}
6030
6031impl ConfigConnectorConfig {
6032    pub fn new() -> Self {
6033        std::default::Default::default()
6034    }
6035
6036    /// Sets the value of [enabled][crate::model::ConfigConnectorConfig::enabled].
6037    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6038        self.enabled = v.into();
6039        self
6040    }
6041}
6042
6043impl wkt::message::Message for ConfigConnectorConfig {
6044    fn typename() -> &'static str {
6045        "type.googleapis.com/google.container.v1.ConfigConnectorConfig"
6046    }
6047}
6048
6049/// Configuration for the Compute Engine PD CSI driver.
6050#[derive(Clone, Default, PartialEq)]
6051#[non_exhaustive]
6052pub struct GcePersistentDiskCsiDriverConfig {
6053    /// Whether the Compute Engine PD CSI driver is enabled for this cluster.
6054    pub enabled: bool,
6055
6056    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6057}
6058
6059impl GcePersistentDiskCsiDriverConfig {
6060    pub fn new() -> Self {
6061        std::default::Default::default()
6062    }
6063
6064    /// Sets the value of [enabled][crate::model::GcePersistentDiskCsiDriverConfig::enabled].
6065    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6066        self.enabled = v.into();
6067        self
6068    }
6069}
6070
6071impl wkt::message::Message for GcePersistentDiskCsiDriverConfig {
6072    fn typename() -> &'static str {
6073        "type.googleapis.com/google.container.v1.GcePersistentDiskCsiDriverConfig"
6074    }
6075}
6076
6077/// Configuration for the GCP Filestore CSI driver.
6078#[derive(Clone, Default, PartialEq)]
6079#[non_exhaustive]
6080pub struct GcpFilestoreCsiDriverConfig {
6081    /// Whether the GCP Filestore CSI driver is enabled for this cluster.
6082    pub enabled: bool,
6083
6084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6085}
6086
6087impl GcpFilestoreCsiDriverConfig {
6088    pub fn new() -> Self {
6089        std::default::Default::default()
6090    }
6091
6092    /// Sets the value of [enabled][crate::model::GcpFilestoreCsiDriverConfig::enabled].
6093    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6094        self.enabled = v.into();
6095        self
6096    }
6097}
6098
6099impl wkt::message::Message for GcpFilestoreCsiDriverConfig {
6100    fn typename() -> &'static str {
6101        "type.googleapis.com/google.container.v1.GcpFilestoreCsiDriverConfig"
6102    }
6103}
6104
6105/// Configuration for the Cloud Storage Fuse CSI driver.
6106#[derive(Clone, Default, PartialEq)]
6107#[non_exhaustive]
6108pub struct GcsFuseCsiDriverConfig {
6109    /// Whether the Cloud Storage Fuse CSI driver is enabled for this cluster.
6110    pub enabled: bool,
6111
6112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6113}
6114
6115impl GcsFuseCsiDriverConfig {
6116    pub fn new() -> Self {
6117        std::default::Default::default()
6118    }
6119
6120    /// Sets the value of [enabled][crate::model::GcsFuseCsiDriverConfig::enabled].
6121    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6122        self.enabled = v.into();
6123        self
6124    }
6125}
6126
6127impl wkt::message::Message for GcsFuseCsiDriverConfig {
6128    fn typename() -> &'static str {
6129        "type.googleapis.com/google.container.v1.GcsFuseCsiDriverConfig"
6130    }
6131}
6132
6133/// Configuration for the Cloud Storage Parallelstore CSI driver.
6134#[derive(Clone, Default, PartialEq)]
6135#[non_exhaustive]
6136pub struct ParallelstoreCsiDriverConfig {
6137    /// Whether the Cloud Storage Parallelstore CSI driver is enabled for this
6138    /// cluster.
6139    pub enabled: bool,
6140
6141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6142}
6143
6144impl ParallelstoreCsiDriverConfig {
6145    pub fn new() -> Self {
6146        std::default::Default::default()
6147    }
6148
6149    /// Sets the value of [enabled][crate::model::ParallelstoreCsiDriverConfig::enabled].
6150    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6151        self.enabled = v.into();
6152        self
6153    }
6154}
6155
6156impl wkt::message::Message for ParallelstoreCsiDriverConfig {
6157    fn typename() -> &'static str {
6158        "type.googleapis.com/google.container.v1.ParallelstoreCsiDriverConfig"
6159    }
6160}
6161
6162/// Configuration for the High Scale Checkpointing.
6163#[derive(Clone, Default, PartialEq)]
6164#[non_exhaustive]
6165pub struct HighScaleCheckpointingConfig {
6166    /// Whether the High Scale Checkpointing is enabled for this
6167    /// cluster.
6168    pub enabled: bool,
6169
6170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6171}
6172
6173impl HighScaleCheckpointingConfig {
6174    pub fn new() -> Self {
6175        std::default::Default::default()
6176    }
6177
6178    /// Sets the value of [enabled][crate::model::HighScaleCheckpointingConfig::enabled].
6179    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6180        self.enabled = v.into();
6181        self
6182    }
6183}
6184
6185impl wkt::message::Message for HighScaleCheckpointingConfig {
6186    fn typename() -> &'static str {
6187        "type.googleapis.com/google.container.v1.HighScaleCheckpointingConfig"
6188    }
6189}
6190
6191/// Configuration for the Lustre CSI driver.
6192#[derive(Clone, Default, PartialEq)]
6193#[non_exhaustive]
6194pub struct LustreCsiDriverConfig {
6195    /// Whether the Lustre CSI driver is enabled for this cluster.
6196    pub enabled: bool,
6197
6198    /// If set to true, the Lustre CSI driver will install Lustre kernel modules
6199    /// using port 6988.
6200    pub enable_legacy_lustre_port: bool,
6201
6202    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6203}
6204
6205impl LustreCsiDriverConfig {
6206    pub fn new() -> Self {
6207        std::default::Default::default()
6208    }
6209
6210    /// Sets the value of [enabled][crate::model::LustreCsiDriverConfig::enabled].
6211    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6212        self.enabled = v.into();
6213        self
6214    }
6215
6216    /// Sets the value of [enable_legacy_lustre_port][crate::model::LustreCsiDriverConfig::enable_legacy_lustre_port].
6217    pub fn set_enable_legacy_lustre_port<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6218        self.enable_legacy_lustre_port = v.into();
6219        self
6220    }
6221}
6222
6223impl wkt::message::Message for LustreCsiDriverConfig {
6224    fn typename() -> &'static str {
6225        "type.googleapis.com/google.container.v1.LustreCsiDriverConfig"
6226    }
6227}
6228
6229/// Configuration options for the Ray Operator add-on.
6230#[derive(Clone, Default, PartialEq)]
6231#[non_exhaustive]
6232pub struct RayOperatorConfig {
6233    /// Whether the Ray Operator addon is enabled for this cluster.
6234    pub enabled: bool,
6235
6236    /// Optional. Logging configuration for Ray clusters.
6237    pub ray_cluster_logging_config: std::option::Option<crate::model::RayClusterLoggingConfig>,
6238
6239    /// Optional. Monitoring configuration for Ray clusters.
6240    pub ray_cluster_monitoring_config:
6241        std::option::Option<crate::model::RayClusterMonitoringConfig>,
6242
6243    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6244}
6245
6246impl RayOperatorConfig {
6247    pub fn new() -> Self {
6248        std::default::Default::default()
6249    }
6250
6251    /// Sets the value of [enabled][crate::model::RayOperatorConfig::enabled].
6252    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6253        self.enabled = v.into();
6254        self
6255    }
6256
6257    /// Sets the value of [ray_cluster_logging_config][crate::model::RayOperatorConfig::ray_cluster_logging_config].
6258    pub fn set_ray_cluster_logging_config<T>(mut self, v: T) -> Self
6259    where
6260        T: std::convert::Into<crate::model::RayClusterLoggingConfig>,
6261    {
6262        self.ray_cluster_logging_config = std::option::Option::Some(v.into());
6263        self
6264    }
6265
6266    /// Sets or clears the value of [ray_cluster_logging_config][crate::model::RayOperatorConfig::ray_cluster_logging_config].
6267    pub fn set_or_clear_ray_cluster_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
6268    where
6269        T: std::convert::Into<crate::model::RayClusterLoggingConfig>,
6270    {
6271        self.ray_cluster_logging_config = v.map(|x| x.into());
6272        self
6273    }
6274
6275    /// Sets the value of [ray_cluster_monitoring_config][crate::model::RayOperatorConfig::ray_cluster_monitoring_config].
6276    pub fn set_ray_cluster_monitoring_config<T>(mut self, v: T) -> Self
6277    where
6278        T: std::convert::Into<crate::model::RayClusterMonitoringConfig>,
6279    {
6280        self.ray_cluster_monitoring_config = std::option::Option::Some(v.into());
6281        self
6282    }
6283
6284    /// Sets or clears the value of [ray_cluster_monitoring_config][crate::model::RayOperatorConfig::ray_cluster_monitoring_config].
6285    pub fn set_or_clear_ray_cluster_monitoring_config<T>(
6286        mut self,
6287        v: std::option::Option<T>,
6288    ) -> Self
6289    where
6290        T: std::convert::Into<crate::model::RayClusterMonitoringConfig>,
6291    {
6292        self.ray_cluster_monitoring_config = v.map(|x| x.into());
6293        self
6294    }
6295}
6296
6297impl wkt::message::Message for RayOperatorConfig {
6298    fn typename() -> &'static str {
6299        "type.googleapis.com/google.container.v1.RayOperatorConfig"
6300    }
6301}
6302
6303/// Configuration for the Backup for GKE Agent.
6304#[derive(Clone, Default, PartialEq)]
6305#[non_exhaustive]
6306pub struct GkeBackupAgentConfig {
6307    /// Whether the Backup for GKE agent is enabled for this cluster.
6308    pub enabled: bool,
6309
6310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6311}
6312
6313impl GkeBackupAgentConfig {
6314    pub fn new() -> Self {
6315        std::default::Default::default()
6316    }
6317
6318    /// Sets the value of [enabled][crate::model::GkeBackupAgentConfig::enabled].
6319    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6320        self.enabled = v.into();
6321        self
6322    }
6323}
6324
6325impl wkt::message::Message for GkeBackupAgentConfig {
6326    fn typename() -> &'static str {
6327        "type.googleapis.com/google.container.v1.GkeBackupAgentConfig"
6328    }
6329}
6330
6331/// Configuration for the Stateful HA add-on.
6332#[derive(Clone, Default, PartialEq)]
6333#[non_exhaustive]
6334pub struct StatefulHAConfig {
6335    /// Whether the Stateful HA add-on is enabled for this cluster.
6336    pub enabled: bool,
6337
6338    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6339}
6340
6341impl StatefulHAConfig {
6342    pub fn new() -> Self {
6343        std::default::Default::default()
6344    }
6345
6346    /// Sets the value of [enabled][crate::model::StatefulHAConfig::enabled].
6347    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6348        self.enabled = v.into();
6349        self
6350    }
6351}
6352
6353impl wkt::message::Message for StatefulHAConfig {
6354    fn typename() -> &'static str {
6355        "type.googleapis.com/google.container.v1.StatefulHAConfig"
6356    }
6357}
6358
6359/// Configuration options for the master authorized networks feature. Enabled
6360/// master authorized networks will disallow all external traffic to access
6361/// Kubernetes master through HTTPS except traffic from the given CIDR blocks,
6362/// Google Compute Engine Public IPs and Google Prod IPs.
6363#[derive(Clone, Default, PartialEq)]
6364#[non_exhaustive]
6365pub struct MasterAuthorizedNetworksConfig {
6366    /// Whether or not master authorized networks is enabled.
6367    pub enabled: bool,
6368
6369    /// cidr_blocks define up to 50 external networks that could access
6370    /// Kubernetes master through HTTPS.
6371    pub cidr_blocks: std::vec::Vec<crate::model::master_authorized_networks_config::CidrBlock>,
6372
6373    /// Whether master is accessible via Google Compute Engine Public IP addresses.
6374    pub gcp_public_cidrs_access_enabled: std::option::Option<bool>,
6375
6376    /// Whether master authorized networks is enforced on private endpoint or not.
6377    pub private_endpoint_enforcement_enabled: std::option::Option<bool>,
6378
6379    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6380}
6381
6382impl MasterAuthorizedNetworksConfig {
6383    pub fn new() -> Self {
6384        std::default::Default::default()
6385    }
6386
6387    /// Sets the value of [enabled][crate::model::MasterAuthorizedNetworksConfig::enabled].
6388    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6389        self.enabled = v.into();
6390        self
6391    }
6392
6393    /// Sets the value of [cidr_blocks][crate::model::MasterAuthorizedNetworksConfig::cidr_blocks].
6394    pub fn set_cidr_blocks<T, V>(mut self, v: T) -> Self
6395    where
6396        T: std::iter::IntoIterator<Item = V>,
6397        V: std::convert::Into<crate::model::master_authorized_networks_config::CidrBlock>,
6398    {
6399        use std::iter::Iterator;
6400        self.cidr_blocks = v.into_iter().map(|i| i.into()).collect();
6401        self
6402    }
6403
6404    /// Sets the value of [gcp_public_cidrs_access_enabled][crate::model::MasterAuthorizedNetworksConfig::gcp_public_cidrs_access_enabled].
6405    pub fn set_gcp_public_cidrs_access_enabled<T>(mut self, v: T) -> Self
6406    where
6407        T: std::convert::Into<bool>,
6408    {
6409        self.gcp_public_cidrs_access_enabled = std::option::Option::Some(v.into());
6410        self
6411    }
6412
6413    /// Sets or clears the value of [gcp_public_cidrs_access_enabled][crate::model::MasterAuthorizedNetworksConfig::gcp_public_cidrs_access_enabled].
6414    pub fn set_or_clear_gcp_public_cidrs_access_enabled<T>(
6415        mut self,
6416        v: std::option::Option<T>,
6417    ) -> Self
6418    where
6419        T: std::convert::Into<bool>,
6420    {
6421        self.gcp_public_cidrs_access_enabled = v.map(|x| x.into());
6422        self
6423    }
6424
6425    /// Sets the value of [private_endpoint_enforcement_enabled][crate::model::MasterAuthorizedNetworksConfig::private_endpoint_enforcement_enabled].
6426    pub fn set_private_endpoint_enforcement_enabled<T>(mut self, v: T) -> Self
6427    where
6428        T: std::convert::Into<bool>,
6429    {
6430        self.private_endpoint_enforcement_enabled = std::option::Option::Some(v.into());
6431        self
6432    }
6433
6434    /// Sets or clears the value of [private_endpoint_enforcement_enabled][crate::model::MasterAuthorizedNetworksConfig::private_endpoint_enforcement_enabled].
6435    pub fn set_or_clear_private_endpoint_enforcement_enabled<T>(
6436        mut self,
6437        v: std::option::Option<T>,
6438    ) -> Self
6439    where
6440        T: std::convert::Into<bool>,
6441    {
6442        self.private_endpoint_enforcement_enabled = v.map(|x| x.into());
6443        self
6444    }
6445}
6446
6447impl wkt::message::Message for MasterAuthorizedNetworksConfig {
6448    fn typename() -> &'static str {
6449        "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig"
6450    }
6451}
6452
6453/// Defines additional types related to [MasterAuthorizedNetworksConfig].
6454pub mod master_authorized_networks_config {
6455    #[allow(unused_imports)]
6456    use super::*;
6457
6458    /// CidrBlock contains an optional name and one CIDR block.
6459    #[derive(Clone, Default, PartialEq)]
6460    #[non_exhaustive]
6461    pub struct CidrBlock {
6462        /// display_name is an optional field for users to identify CIDR blocks.
6463        pub display_name: std::string::String,
6464
6465        /// cidr_block must be specified in CIDR notation.
6466        pub cidr_block: std::string::String,
6467
6468        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6469    }
6470
6471    impl CidrBlock {
6472        pub fn new() -> Self {
6473            std::default::Default::default()
6474        }
6475
6476        /// Sets the value of [display_name][crate::model::master_authorized_networks_config::CidrBlock::display_name].
6477        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
6478            mut self,
6479            v: T,
6480        ) -> Self {
6481            self.display_name = v.into();
6482            self
6483        }
6484
6485        /// Sets the value of [cidr_block][crate::model::master_authorized_networks_config::CidrBlock::cidr_block].
6486        pub fn set_cidr_block<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6487            self.cidr_block = v.into();
6488            self
6489        }
6490    }
6491
6492    impl wkt::message::Message for CidrBlock {
6493        fn typename() -> &'static str {
6494            "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock"
6495        }
6496    }
6497}
6498
6499/// Configuration for the legacy Attribute Based Access Control authorization
6500/// mode.
6501#[derive(Clone, Default, PartialEq)]
6502#[non_exhaustive]
6503pub struct LegacyAbac {
6504    /// Whether the ABAC authorizer is enabled for this cluster. When enabled,
6505    /// identities in the system, including service accounts, nodes, and
6506    /// controllers, will have statically granted permissions beyond those
6507    /// provided by the RBAC configuration or IAM.
6508    pub enabled: bool,
6509
6510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6511}
6512
6513impl LegacyAbac {
6514    pub fn new() -> Self {
6515        std::default::Default::default()
6516    }
6517
6518    /// Sets the value of [enabled][crate::model::LegacyAbac::enabled].
6519    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6520        self.enabled = v.into();
6521        self
6522    }
6523}
6524
6525impl wkt::message::Message for LegacyAbac {
6526    fn typename() -> &'static str {
6527        "type.googleapis.com/google.container.v1.LegacyAbac"
6528    }
6529}
6530
6531/// Configuration options for the NetworkPolicy feature.
6532/// <https://kubernetes.io/docs/concepts/services-networking/networkpolicies/>
6533#[derive(Clone, Default, PartialEq)]
6534#[non_exhaustive]
6535pub struct NetworkPolicy {
6536    /// The selected network policy provider.
6537    pub provider: crate::model::network_policy::Provider,
6538
6539    /// Whether network policy is enabled on the cluster.
6540    pub enabled: bool,
6541
6542    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6543}
6544
6545impl NetworkPolicy {
6546    pub fn new() -> Self {
6547        std::default::Default::default()
6548    }
6549
6550    /// Sets the value of [provider][crate::model::NetworkPolicy::provider].
6551    pub fn set_provider<T: std::convert::Into<crate::model::network_policy::Provider>>(
6552        mut self,
6553        v: T,
6554    ) -> Self {
6555        self.provider = v.into();
6556        self
6557    }
6558
6559    /// Sets the value of [enabled][crate::model::NetworkPolicy::enabled].
6560    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6561        self.enabled = v.into();
6562        self
6563    }
6564}
6565
6566impl wkt::message::Message for NetworkPolicy {
6567    fn typename() -> &'static str {
6568        "type.googleapis.com/google.container.v1.NetworkPolicy"
6569    }
6570}
6571
6572/// Defines additional types related to [NetworkPolicy].
6573pub mod network_policy {
6574    #[allow(unused_imports)]
6575    use super::*;
6576
6577    /// Allowed Network Policy providers.
6578    ///
6579    /// # Working with unknown values
6580    ///
6581    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6582    /// additional enum variants at any time. Adding new variants is not considered
6583    /// a breaking change. Applications should write their code in anticipation of:
6584    ///
6585    /// - New values appearing in future releases of the client library, **and**
6586    /// - New values received dynamically, without application changes.
6587    ///
6588    /// Please consult the [Working with enums] section in the user guide for some
6589    /// guidelines.
6590    ///
6591    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6592    #[derive(Clone, Debug, PartialEq)]
6593    #[non_exhaustive]
6594    pub enum Provider {
6595        /// Not set
6596        Unspecified,
6597        /// Tigera (Calico Felix).
6598        Calico,
6599        /// If set, the enum was initialized with an unknown value.
6600        ///
6601        /// Applications can examine the value using [Provider::value] or
6602        /// [Provider::name].
6603        UnknownValue(provider::UnknownValue),
6604    }
6605
6606    #[doc(hidden)]
6607    pub mod provider {
6608        #[allow(unused_imports)]
6609        use super::*;
6610        #[derive(Clone, Debug, PartialEq)]
6611        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6612    }
6613
6614    impl Provider {
6615        /// Gets the enum value.
6616        ///
6617        /// Returns `None` if the enum contains an unknown value deserialized from
6618        /// the string representation of enums.
6619        pub fn value(&self) -> std::option::Option<i32> {
6620            match self {
6621                Self::Unspecified => std::option::Option::Some(0),
6622                Self::Calico => std::option::Option::Some(1),
6623                Self::UnknownValue(u) => u.0.value(),
6624            }
6625        }
6626
6627        /// Gets the enum value as a string.
6628        ///
6629        /// Returns `None` if the enum contains an unknown value deserialized from
6630        /// the integer representation of enums.
6631        pub fn name(&self) -> std::option::Option<&str> {
6632            match self {
6633                Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
6634                Self::Calico => std::option::Option::Some("CALICO"),
6635                Self::UnknownValue(u) => u.0.name(),
6636            }
6637        }
6638    }
6639
6640    impl std::default::Default for Provider {
6641        fn default() -> Self {
6642            use std::convert::From;
6643            Self::from(0)
6644        }
6645    }
6646
6647    impl std::fmt::Display for Provider {
6648        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6649            wkt::internal::display_enum(f, self.name(), self.value())
6650        }
6651    }
6652
6653    impl std::convert::From<i32> for Provider {
6654        fn from(value: i32) -> Self {
6655            match value {
6656                0 => Self::Unspecified,
6657                1 => Self::Calico,
6658                _ => Self::UnknownValue(provider::UnknownValue(
6659                    wkt::internal::UnknownEnumValue::Integer(value),
6660                )),
6661            }
6662        }
6663    }
6664
6665    impl std::convert::From<&str> for Provider {
6666        fn from(value: &str) -> Self {
6667            use std::string::ToString;
6668            match value {
6669                "PROVIDER_UNSPECIFIED" => Self::Unspecified,
6670                "CALICO" => Self::Calico,
6671                _ => Self::UnknownValue(provider::UnknownValue(
6672                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6673                )),
6674            }
6675        }
6676    }
6677
6678    impl serde::ser::Serialize for Provider {
6679        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6680        where
6681            S: serde::Serializer,
6682        {
6683            match self {
6684                Self::Unspecified => serializer.serialize_i32(0),
6685                Self::Calico => serializer.serialize_i32(1),
6686                Self::UnknownValue(u) => u.0.serialize(serializer),
6687            }
6688        }
6689    }
6690
6691    impl<'de> serde::de::Deserialize<'de> for Provider {
6692        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6693        where
6694            D: serde::Deserializer<'de>,
6695        {
6696            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
6697                ".google.container.v1.NetworkPolicy.Provider",
6698            ))
6699        }
6700    }
6701}
6702
6703/// Configuration for Binary Authorization.
6704#[derive(Clone, Default, PartialEq)]
6705#[non_exhaustive]
6706pub struct BinaryAuthorization {
6707    /// This field is deprecated. Leave this unset and instead configure
6708    /// BinaryAuthorization using evaluation_mode. If evaluation_mode is set to
6709    /// anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.
6710    #[deprecated]
6711    pub enabled: bool,
6712
6713    /// Mode of operation for binauthz policy evaluation. If unspecified, defaults
6714    /// to DISABLED.
6715    pub evaluation_mode: crate::model::binary_authorization::EvaluationMode,
6716
6717    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6718}
6719
6720impl BinaryAuthorization {
6721    pub fn new() -> Self {
6722        std::default::Default::default()
6723    }
6724
6725    /// Sets the value of [enabled][crate::model::BinaryAuthorization::enabled].
6726    #[deprecated]
6727    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6728        self.enabled = v.into();
6729        self
6730    }
6731
6732    /// Sets the value of [evaluation_mode][crate::model::BinaryAuthorization::evaluation_mode].
6733    pub fn set_evaluation_mode<
6734        T: std::convert::Into<crate::model::binary_authorization::EvaluationMode>,
6735    >(
6736        mut self,
6737        v: T,
6738    ) -> Self {
6739        self.evaluation_mode = v.into();
6740        self
6741    }
6742}
6743
6744impl wkt::message::Message for BinaryAuthorization {
6745    fn typename() -> &'static str {
6746        "type.googleapis.com/google.container.v1.BinaryAuthorization"
6747    }
6748}
6749
6750/// Defines additional types related to [BinaryAuthorization].
6751pub mod binary_authorization {
6752    #[allow(unused_imports)]
6753    use super::*;
6754
6755    /// Binary Authorization mode of operation.
6756    ///
6757    /// # Working with unknown values
6758    ///
6759    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6760    /// additional enum variants at any time. Adding new variants is not considered
6761    /// a breaking change. Applications should write their code in anticipation of:
6762    ///
6763    /// - New values appearing in future releases of the client library, **and**
6764    /// - New values received dynamically, without application changes.
6765    ///
6766    /// Please consult the [Working with enums] section in the user guide for some
6767    /// guidelines.
6768    ///
6769    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6770    #[derive(Clone, Debug, PartialEq)]
6771    #[non_exhaustive]
6772    pub enum EvaluationMode {
6773        /// Default value
6774        Unspecified,
6775        /// Disable BinaryAuthorization
6776        Disabled,
6777        /// Enforce Kubernetes admission requests with BinaryAuthorization using the
6778        /// project's singleton policy. This is equivalent to setting the
6779        /// enabled boolean to true.
6780        ProjectSingletonPolicyEnforce,
6781        /// If set, the enum was initialized with an unknown value.
6782        ///
6783        /// Applications can examine the value using [EvaluationMode::value] or
6784        /// [EvaluationMode::name].
6785        UnknownValue(evaluation_mode::UnknownValue),
6786    }
6787
6788    #[doc(hidden)]
6789    pub mod evaluation_mode {
6790        #[allow(unused_imports)]
6791        use super::*;
6792        #[derive(Clone, Debug, PartialEq)]
6793        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6794    }
6795
6796    impl EvaluationMode {
6797        /// Gets the enum value.
6798        ///
6799        /// Returns `None` if the enum contains an unknown value deserialized from
6800        /// the string representation of enums.
6801        pub fn value(&self) -> std::option::Option<i32> {
6802            match self {
6803                Self::Unspecified => std::option::Option::Some(0),
6804                Self::Disabled => std::option::Option::Some(1),
6805                Self::ProjectSingletonPolicyEnforce => std::option::Option::Some(2),
6806                Self::UnknownValue(u) => u.0.value(),
6807            }
6808        }
6809
6810        /// Gets the enum value as a string.
6811        ///
6812        /// Returns `None` if the enum contains an unknown value deserialized from
6813        /// the integer representation of enums.
6814        pub fn name(&self) -> std::option::Option<&str> {
6815            match self {
6816                Self::Unspecified => std::option::Option::Some("EVALUATION_MODE_UNSPECIFIED"),
6817                Self::Disabled => std::option::Option::Some("DISABLED"),
6818                Self::ProjectSingletonPolicyEnforce => {
6819                    std::option::Option::Some("PROJECT_SINGLETON_POLICY_ENFORCE")
6820                }
6821                Self::UnknownValue(u) => u.0.name(),
6822            }
6823        }
6824    }
6825
6826    impl std::default::Default for EvaluationMode {
6827        fn default() -> Self {
6828            use std::convert::From;
6829            Self::from(0)
6830        }
6831    }
6832
6833    impl std::fmt::Display for EvaluationMode {
6834        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6835            wkt::internal::display_enum(f, self.name(), self.value())
6836        }
6837    }
6838
6839    impl std::convert::From<i32> for EvaluationMode {
6840        fn from(value: i32) -> Self {
6841            match value {
6842                0 => Self::Unspecified,
6843                1 => Self::Disabled,
6844                2 => Self::ProjectSingletonPolicyEnforce,
6845                _ => Self::UnknownValue(evaluation_mode::UnknownValue(
6846                    wkt::internal::UnknownEnumValue::Integer(value),
6847                )),
6848            }
6849        }
6850    }
6851
6852    impl std::convert::From<&str> for EvaluationMode {
6853        fn from(value: &str) -> Self {
6854            use std::string::ToString;
6855            match value {
6856                "EVALUATION_MODE_UNSPECIFIED" => Self::Unspecified,
6857                "DISABLED" => Self::Disabled,
6858                "PROJECT_SINGLETON_POLICY_ENFORCE" => Self::ProjectSingletonPolicyEnforce,
6859                _ => Self::UnknownValue(evaluation_mode::UnknownValue(
6860                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6861                )),
6862            }
6863        }
6864    }
6865
6866    impl serde::ser::Serialize for EvaluationMode {
6867        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6868        where
6869            S: serde::Serializer,
6870        {
6871            match self {
6872                Self::Unspecified => serializer.serialize_i32(0),
6873                Self::Disabled => serializer.serialize_i32(1),
6874                Self::ProjectSingletonPolicyEnforce => serializer.serialize_i32(2),
6875                Self::UnknownValue(u) => u.0.serialize(serializer),
6876            }
6877        }
6878    }
6879
6880    impl<'de> serde::de::Deserialize<'de> for EvaluationMode {
6881        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6882        where
6883            D: serde::Deserializer<'de>,
6884        {
6885            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationMode>::new(
6886                ".google.container.v1.BinaryAuthorization.EvaluationMode",
6887            ))
6888        }
6889    }
6890}
6891
6892/// [PRIVATE FIELD]
6893/// Config for pod CIDR size overprovisioning.
6894#[derive(Clone, Default, PartialEq)]
6895#[non_exhaustive]
6896pub struct PodCIDROverprovisionConfig {
6897    /// Whether Pod CIDR overprovisioning is disabled.
6898    /// Note: Pod CIDR overprovisioning is enabled by default.
6899    pub disable: bool,
6900
6901    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6902}
6903
6904impl PodCIDROverprovisionConfig {
6905    pub fn new() -> Self {
6906        std::default::Default::default()
6907    }
6908
6909    /// Sets the value of [disable][crate::model::PodCIDROverprovisionConfig::disable].
6910    pub fn set_disable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6911        self.disable = v.into();
6912        self
6913    }
6914}
6915
6916impl wkt::message::Message for PodCIDROverprovisionConfig {
6917    fn typename() -> &'static str {
6918        "type.googleapis.com/google.container.v1.PodCIDROverprovisionConfig"
6919    }
6920}
6921
6922/// Configuration for controlling how IPs are allocated in the cluster.
6923#[derive(Clone, Default, PartialEq)]
6924#[non_exhaustive]
6925pub struct IPAllocationPolicy {
6926    /// Whether alias IPs will be used for pod IPs in the cluster.
6927    /// This is used in conjunction with use_routes. It cannot
6928    /// be true if use_routes is true. If both use_ip_aliases and use_routes are
6929    /// false, then the server picks the default IP allocation mode
6930    pub use_ip_aliases: bool,
6931
6932    /// Whether a new subnetwork will be created automatically for the cluster.
6933    ///
6934    /// This field is only applicable when `use_ip_aliases` is true.
6935    pub create_subnetwork: bool,
6936
6937    /// A custom subnetwork name to be used if `create_subnetwork` is true.  If
6938    /// this field is empty, then an automatic name will be chosen for the new
6939    /// subnetwork.
6940    pub subnetwork_name: std::string::String,
6941
6942    /// This field is deprecated, use cluster_ipv4_cidr_block.
6943    #[deprecated]
6944    pub cluster_ipv4_cidr: std::string::String,
6945
6946    /// This field is deprecated, use node_ipv4_cidr_block.
6947    #[deprecated]
6948    pub node_ipv4_cidr: std::string::String,
6949
6950    /// This field is deprecated, use services_ipv4_cidr_block.
6951    #[deprecated]
6952    pub services_ipv4_cidr: std::string::String,
6953
6954    /// The name of the secondary range to be used for the cluster CIDR
6955    /// block.  The secondary range will be used for pod IP
6956    /// addresses. This must be an existing secondary range associated
6957    /// with the cluster subnetwork.
6958    ///
6959    /// This field is only applicable with use_ip_aliases is true and
6960    /// create_subnetwork is false.
6961    pub cluster_secondary_range_name: std::string::String,
6962
6963    /// The name of the secondary range to be used as for the services
6964    /// CIDR block.  The secondary range will be used for service
6965    /// ClusterIPs. This must be an existing secondary range associated
6966    /// with the cluster subnetwork.
6967    ///
6968    /// This field is only applicable with use_ip_aliases is true and
6969    /// create_subnetwork is false.
6970    pub services_secondary_range_name: std::string::String,
6971
6972    /// The IP address range for the cluster pod IPs. If this field is set, then
6973    /// `cluster.cluster_ipv4_cidr` must be left blank.
6974    ///
6975    /// This field is only applicable when `use_ip_aliases` is true.
6976    ///
6977    /// Set to blank to have a range chosen with the default size.
6978    ///
6979    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
6980    /// netmask.
6981    ///
6982    /// Set to a
6983    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
6984    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
6985    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
6986    /// to use.
6987    pub cluster_ipv4_cidr_block: std::string::String,
6988
6989    /// The IP address range of the instance IPs in this cluster.
6990    ///
6991    /// This is applicable only if `create_subnetwork` is true.
6992    ///
6993    /// Set to blank to have a range chosen with the default size.
6994    ///
6995    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
6996    /// netmask.
6997    ///
6998    /// Set to a
6999    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7000    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
7001    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
7002    /// to use.
7003    pub node_ipv4_cidr_block: std::string::String,
7004
7005    /// The IP address range of the services IPs in this cluster. If blank, a range
7006    /// will be automatically chosen with the default size.
7007    ///
7008    /// This field is only applicable when `use_ip_aliases` is true.
7009    ///
7010    /// Set to blank to have a range chosen with the default size.
7011    ///
7012    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
7013    /// netmask.
7014    ///
7015    /// Set to a
7016    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7017    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
7018    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
7019    /// to use.
7020    pub services_ipv4_cidr_block: std::string::String,
7021
7022    /// The IP address range of the Cloud TPUs in this cluster. If unspecified, a
7023    /// range will be automatically chosen with the default size.
7024    ///
7025    /// This field is only applicable when `use_ip_aliases` is true.
7026    ///
7027    /// If unspecified, the range will use the default size.
7028    ///
7029    /// Set to /netmask (e.g. `/14`) to have a range chosen with a specific
7030    /// netmask.
7031    ///
7032    /// Set to a
7033    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7034    /// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
7035    /// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
7036    /// to use.
7037    ///
7038    /// This field is deprecated due to the deprecation of 2VM TPU. The end of life
7039    /// date for 2VM TPU is 2025-04-25.
7040    #[deprecated]
7041    pub tpu_ipv4_cidr_block: std::string::String,
7042
7043    /// Whether routes will be used for pod IPs in the cluster.
7044    /// This is used in conjunction with use_ip_aliases. It cannot be true if
7045    /// use_ip_aliases is true. If both use_ip_aliases and use_routes are false,
7046    /// then the server picks the default IP allocation mode
7047    pub use_routes: bool,
7048
7049    /// The IP stack type of the cluster
7050    pub stack_type: crate::model::StackType,
7051
7052    /// The ipv6 access type (internal or external) when create_subnetwork is true
7053    pub ipv6_access_type: crate::model::IPv6AccessType,
7054
7055    /// [PRIVATE FIELD]
7056    /// Pod CIDR size overprovisioning config for the cluster.
7057    ///
7058    /// Pod CIDR size per node depends on max_pods_per_node. By default, the value
7059    /// of max_pods_per_node is doubled and then rounded off to next power of 2 to
7060    /// get the size of pod CIDR block per node.
7061    /// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
7062    ///
7063    /// This config can disable the doubling of IPs (we still round off to next
7064    /// power of 2)
7065    /// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
7066    /// overprovisioning is disabled.
7067    pub pod_cidr_overprovision_config:
7068        std::option::Option<crate::model::PodCIDROverprovisionConfig>,
7069
7070    /// Output only. The subnet's IPv6 CIDR block used by nodes and pods.
7071    pub subnet_ipv6_cidr_block: std::string::String,
7072
7073    /// Output only. The services IPv6 CIDR block for the cluster.
7074    pub services_ipv6_cidr_block: std::string::String,
7075
7076    /// Output only. The additional pod ranges that are added to the cluster.
7077    /// These pod ranges can be used by new node pools to allocate pod IPs
7078    /// automatically. Once the range is removed it will not show up in
7079    /// IPAllocationPolicy.
7080    pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
7081
7082    /// Output only. The utilization of the cluster default IPv4 range for the
7083    /// pod. The ratio is Usage/[Total number of IPs in the secondary range],
7084    /// Usage=numNodes*numZones*podIPsPerNode.
7085    pub default_pod_ipv4_range_utilization: f64,
7086
7087    /// Output only. The additional IP ranges that are added to the cluster.
7088    /// These IP ranges can be used by new node pools to allocate node and pod IPs
7089    /// automatically.
7090    /// Each AdditionalIPRangesConfig corresponds to a single subnetwork.
7091    /// Once a range is removed it will not show up in IPAllocationPolicy.
7092    pub additional_ip_ranges_configs: std::vec::Vec<crate::model::AdditionalIPRangesConfig>,
7093
7094    /// Optional. AutoIpamConfig contains all information related to Auto IPAM
7095    pub auto_ipam_config: std::option::Option<crate::model::AutoIpamConfig>,
7096
7097    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7098}
7099
7100impl IPAllocationPolicy {
7101    pub fn new() -> Self {
7102        std::default::Default::default()
7103    }
7104
7105    /// Sets the value of [use_ip_aliases][crate::model::IPAllocationPolicy::use_ip_aliases].
7106    pub fn set_use_ip_aliases<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7107        self.use_ip_aliases = v.into();
7108        self
7109    }
7110
7111    /// Sets the value of [create_subnetwork][crate::model::IPAllocationPolicy::create_subnetwork].
7112    pub fn set_create_subnetwork<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7113        self.create_subnetwork = v.into();
7114        self
7115    }
7116
7117    /// Sets the value of [subnetwork_name][crate::model::IPAllocationPolicy::subnetwork_name].
7118    pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7119        self.subnetwork_name = v.into();
7120        self
7121    }
7122
7123    /// Sets the value of [cluster_ipv4_cidr][crate::model::IPAllocationPolicy::cluster_ipv4_cidr].
7124    #[deprecated]
7125    pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
7126        mut self,
7127        v: T,
7128    ) -> Self {
7129        self.cluster_ipv4_cidr = v.into();
7130        self
7131    }
7132
7133    /// Sets the value of [node_ipv4_cidr][crate::model::IPAllocationPolicy::node_ipv4_cidr].
7134    #[deprecated]
7135    pub fn set_node_ipv4_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7136        self.node_ipv4_cidr = v.into();
7137        self
7138    }
7139
7140    /// Sets the value of [services_ipv4_cidr][crate::model::IPAllocationPolicy::services_ipv4_cidr].
7141    #[deprecated]
7142    pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
7143        mut self,
7144        v: T,
7145    ) -> Self {
7146        self.services_ipv4_cidr = v.into();
7147        self
7148    }
7149
7150    /// Sets the value of [cluster_secondary_range_name][crate::model::IPAllocationPolicy::cluster_secondary_range_name].
7151    pub fn set_cluster_secondary_range_name<T: std::convert::Into<std::string::String>>(
7152        mut self,
7153        v: T,
7154    ) -> Self {
7155        self.cluster_secondary_range_name = v.into();
7156        self
7157    }
7158
7159    /// Sets the value of [services_secondary_range_name][crate::model::IPAllocationPolicy::services_secondary_range_name].
7160    pub fn set_services_secondary_range_name<T: std::convert::Into<std::string::String>>(
7161        mut self,
7162        v: T,
7163    ) -> Self {
7164        self.services_secondary_range_name = v.into();
7165        self
7166    }
7167
7168    /// Sets the value of [cluster_ipv4_cidr_block][crate::model::IPAllocationPolicy::cluster_ipv4_cidr_block].
7169    pub fn set_cluster_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7170        mut self,
7171        v: T,
7172    ) -> Self {
7173        self.cluster_ipv4_cidr_block = v.into();
7174        self
7175    }
7176
7177    /// Sets the value of [node_ipv4_cidr_block][crate::model::IPAllocationPolicy::node_ipv4_cidr_block].
7178    pub fn set_node_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7179        mut self,
7180        v: T,
7181    ) -> Self {
7182        self.node_ipv4_cidr_block = v.into();
7183        self
7184    }
7185
7186    /// Sets the value of [services_ipv4_cidr_block][crate::model::IPAllocationPolicy::services_ipv4_cidr_block].
7187    pub fn set_services_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7188        mut self,
7189        v: T,
7190    ) -> Self {
7191        self.services_ipv4_cidr_block = v.into();
7192        self
7193    }
7194
7195    /// Sets the value of [tpu_ipv4_cidr_block][crate::model::IPAllocationPolicy::tpu_ipv4_cidr_block].
7196    #[deprecated]
7197    pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7198        mut self,
7199        v: T,
7200    ) -> Self {
7201        self.tpu_ipv4_cidr_block = v.into();
7202        self
7203    }
7204
7205    /// Sets the value of [use_routes][crate::model::IPAllocationPolicy::use_routes].
7206    pub fn set_use_routes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7207        self.use_routes = v.into();
7208        self
7209    }
7210
7211    /// Sets the value of [stack_type][crate::model::IPAllocationPolicy::stack_type].
7212    pub fn set_stack_type<T: std::convert::Into<crate::model::StackType>>(mut self, v: T) -> Self {
7213        self.stack_type = v.into();
7214        self
7215    }
7216
7217    /// Sets the value of [ipv6_access_type][crate::model::IPAllocationPolicy::ipv6_access_type].
7218    pub fn set_ipv6_access_type<T: std::convert::Into<crate::model::IPv6AccessType>>(
7219        mut self,
7220        v: T,
7221    ) -> Self {
7222        self.ipv6_access_type = v.into();
7223        self
7224    }
7225
7226    /// Sets the value of [pod_cidr_overprovision_config][crate::model::IPAllocationPolicy::pod_cidr_overprovision_config].
7227    pub fn set_pod_cidr_overprovision_config<T>(mut self, v: T) -> Self
7228    where
7229        T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
7230    {
7231        self.pod_cidr_overprovision_config = std::option::Option::Some(v.into());
7232        self
7233    }
7234
7235    /// Sets or clears the value of [pod_cidr_overprovision_config][crate::model::IPAllocationPolicy::pod_cidr_overprovision_config].
7236    pub fn set_or_clear_pod_cidr_overprovision_config<T>(
7237        mut self,
7238        v: std::option::Option<T>,
7239    ) -> Self
7240    where
7241        T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
7242    {
7243        self.pod_cidr_overprovision_config = v.map(|x| x.into());
7244        self
7245    }
7246
7247    /// Sets the value of [subnet_ipv6_cidr_block][crate::model::IPAllocationPolicy::subnet_ipv6_cidr_block].
7248    pub fn set_subnet_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
7249        mut self,
7250        v: T,
7251    ) -> Self {
7252        self.subnet_ipv6_cidr_block = v.into();
7253        self
7254    }
7255
7256    /// Sets the value of [services_ipv6_cidr_block][crate::model::IPAllocationPolicy::services_ipv6_cidr_block].
7257    pub fn set_services_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
7258        mut self,
7259        v: T,
7260    ) -> Self {
7261        self.services_ipv6_cidr_block = v.into();
7262        self
7263    }
7264
7265    /// Sets the value of [additional_pod_ranges_config][crate::model::IPAllocationPolicy::additional_pod_ranges_config].
7266    pub fn set_additional_pod_ranges_config<T>(mut self, v: T) -> Self
7267    where
7268        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
7269    {
7270        self.additional_pod_ranges_config = std::option::Option::Some(v.into());
7271        self
7272    }
7273
7274    /// Sets or clears the value of [additional_pod_ranges_config][crate::model::IPAllocationPolicy::additional_pod_ranges_config].
7275    pub fn set_or_clear_additional_pod_ranges_config<T>(mut self, v: std::option::Option<T>) -> Self
7276    where
7277        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
7278    {
7279        self.additional_pod_ranges_config = v.map(|x| x.into());
7280        self
7281    }
7282
7283    /// Sets the value of [default_pod_ipv4_range_utilization][crate::model::IPAllocationPolicy::default_pod_ipv4_range_utilization].
7284    pub fn set_default_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(
7285        mut self,
7286        v: T,
7287    ) -> Self {
7288        self.default_pod_ipv4_range_utilization = v.into();
7289        self
7290    }
7291
7292    /// Sets the value of [additional_ip_ranges_configs][crate::model::IPAllocationPolicy::additional_ip_ranges_configs].
7293    pub fn set_additional_ip_ranges_configs<T, V>(mut self, v: T) -> Self
7294    where
7295        T: std::iter::IntoIterator<Item = V>,
7296        V: std::convert::Into<crate::model::AdditionalIPRangesConfig>,
7297    {
7298        use std::iter::Iterator;
7299        self.additional_ip_ranges_configs = v.into_iter().map(|i| i.into()).collect();
7300        self
7301    }
7302
7303    /// Sets the value of [auto_ipam_config][crate::model::IPAllocationPolicy::auto_ipam_config].
7304    pub fn set_auto_ipam_config<T>(mut self, v: T) -> Self
7305    where
7306        T: std::convert::Into<crate::model::AutoIpamConfig>,
7307    {
7308        self.auto_ipam_config = std::option::Option::Some(v.into());
7309        self
7310    }
7311
7312    /// Sets or clears the value of [auto_ipam_config][crate::model::IPAllocationPolicy::auto_ipam_config].
7313    pub fn set_or_clear_auto_ipam_config<T>(mut self, v: std::option::Option<T>) -> Self
7314    where
7315        T: std::convert::Into<crate::model::AutoIpamConfig>,
7316    {
7317        self.auto_ipam_config = v.map(|x| x.into());
7318        self
7319    }
7320}
7321
7322impl wkt::message::Message for IPAllocationPolicy {
7323    fn typename() -> &'static str {
7324        "type.googleapis.com/google.container.v1.IPAllocationPolicy"
7325    }
7326}
7327
7328/// A Google Kubernetes Engine cluster.
7329#[derive(Clone, Default, PartialEq)]
7330#[non_exhaustive]
7331pub struct Cluster {
7332    /// The name of this cluster. The name must be unique within this project
7333    /// and location (e.g. zone or region), and can be up to 40 characters with
7334    /// the following restrictions:
7335    ///
7336    /// * Lowercase letters, numbers, and hyphens only.
7337    /// * Must start with a letter.
7338    /// * Must end with a number or a letter.
7339    pub name: std::string::String,
7340
7341    /// An optional description of this cluster.
7342    pub description: std::string::String,
7343
7344    /// The number of nodes to create in this cluster. You must ensure that your
7345    /// Compute Engine [resource
7346    /// quota](https://cloud.google.com/compute/quotas)
7347    /// is sufficient for this number of instances. You must also have available
7348    /// firewall and routes quota.
7349    /// For requests, this field should only be used in lieu of a
7350    /// "node_pool" object, since this configuration (along with the
7351    /// "node_config") will be used to create a "NodePool" object with an
7352    /// auto-generated name. Do not use this and a node_pool at the same time.
7353    ///
7354    /// This field is deprecated, use node_pool.initial_node_count instead.
7355    #[deprecated]
7356    pub initial_node_count: i32,
7357
7358    /// Parameters used in creating the cluster's nodes.
7359    /// For requests, this field should only be used in lieu of a
7360    /// "node_pool" object, since this configuration (along with the
7361    /// "initial_node_count") will be used to create a "NodePool" object with an
7362    /// auto-generated name. Do not use this and a node_pool at the same time.
7363    /// For responses, this field will be populated with the node configuration of
7364    /// the first node pool. (For configuration of each node pool, see
7365    /// `node_pool.config`)
7366    ///
7367    /// If unspecified, the defaults are used.
7368    /// This field is deprecated, use node_pool.config instead.
7369    #[deprecated]
7370    pub node_config: std::option::Option<crate::model::NodeConfig>,
7371
7372    /// The authentication information for accessing the master endpoint.
7373    /// If unspecified, the defaults are used:
7374    /// For clusters before v1.12, if master_auth is unspecified, `username` will
7375    /// be set to "admin", a random password will be generated, and a client
7376    /// certificate will be issued.
7377    pub master_auth: std::option::Option<crate::model::MasterAuth>,
7378
7379    /// The logging service the cluster should use to write logs.
7380    /// Currently available options:
7381    ///
7382    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
7383    ///   service with a Kubernetes-native resource model
7384    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
7385    ///   available as of GKE 1.15).
7386    /// * `none` - no logs will be exported from the cluster.
7387    ///
7388    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
7389    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
7390    pub logging_service: std::string::String,
7391
7392    /// The monitoring service the cluster should use to write metrics.
7393    /// Currently available options:
7394    ///
7395    /// * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring
7396    ///   service with a Kubernetes-native resource model
7397    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
7398    ///   longer available as of GKE 1.15).
7399    /// * `none` - No metrics will be exported from the cluster.
7400    ///
7401    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
7402    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
7403    pub monitoring_service: std::string::String,
7404
7405    /// The name of the Google Compute Engine
7406    /// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
7407    /// to which the cluster is connected. If left unspecified, the `default`
7408    /// network will be used.
7409    pub network: std::string::String,
7410
7411    /// The IP address range of the container pods in this cluster, in
7412    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7413    /// notation (e.g. `10.96.0.0/14`). Leave blank to have
7414    /// one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
7415    pub cluster_ipv4_cidr: std::string::String,
7416
7417    /// Configurations for the various addons available to run in the cluster.
7418    pub addons_config: std::option::Option<crate::model::AddonsConfig>,
7419
7420    /// The name of the Google Compute Engine
7421    /// [subnetwork](https://cloud.google.com/compute/docs/subnetworks)
7422    /// to which the cluster is connected.
7423    pub subnetwork: std::string::String,
7424
7425    /// The node pools associated with this cluster.
7426    /// This field should not be set if "node_config" or "initial_node_count" are
7427    /// specified.
7428    pub node_pools: std::vec::Vec<crate::model::NodePool>,
7429
7430    /// The list of Google Compute Engine
7431    /// [zones](https://cloud.google.com/compute/docs/zones#available)
7432    /// in which the cluster's nodes should be located.
7433    ///
7434    /// This field provides a default value if
7435    /// [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
7436    /// are not specified during node pool creation.
7437    ///
7438    /// Warning: changing cluster locations will update the
7439    /// [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
7440    /// of all node pools and will result in nodes being added and/or removed.
7441    pub locations: std::vec::Vec<std::string::String>,
7442
7443    /// Kubernetes alpha features are enabled on this cluster. This includes alpha
7444    /// API groups (e.g. v1alpha1) and features that may not be production ready in
7445    /// the kubernetes version of the master and nodes.
7446    /// The cluster has no SLA for uptime and master/node upgrades are disabled.
7447    /// Alpha enabled clusters are automatically deleted thirty days after
7448    /// creation.
7449    pub enable_kubernetes_alpha: bool,
7450
7451    /// The list of user specified Kubernetes feature gates.
7452    /// Each string represents the activation status of a feature gate (e.g.
7453    /// "featureX=true" or "featureX=false")
7454    pub alpha_cluster_feature_gates: std::vec::Vec<std::string::String>,
7455
7456    /// The resource labels for the cluster to use to annotate any related
7457    /// Google Compute Engine resources.
7458    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
7459
7460    /// The fingerprint of the set of labels for this cluster.
7461    pub label_fingerprint: std::string::String,
7462
7463    /// Configuration for the legacy ABAC authorization mode.
7464    pub legacy_abac: std::option::Option<crate::model::LegacyAbac>,
7465
7466    /// Configuration options for the NetworkPolicy feature.
7467    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
7468
7469    /// Configuration for cluster IP allocation.
7470    pub ip_allocation_policy: std::option::Option<crate::model::IPAllocationPolicy>,
7471
7472    /// The configuration options for master authorized networks feature.
7473    ///
7474    /// Deprecated: Use
7475    /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config]
7476    /// instead.
7477    ///
7478    /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config]: crate::model::control_plane_endpoints_config::IPEndpointsConfig::authorized_networks_config
7479    #[deprecated]
7480    pub master_authorized_networks_config:
7481        std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
7482
7483    /// Configure the maintenance policy for this cluster.
7484    pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
7485
7486    /// Configuration for Binary Authorization.
7487    pub binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
7488
7489    /// Cluster-level autoscaling configuration.
7490    pub autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
7491
7492    /// Configuration for cluster networking.
7493    pub network_config: std::option::Option<crate::model::NetworkConfig>,
7494
7495    /// The default constraint on the maximum number of pods that can be run
7496    /// simultaneously on a node in the node pool of this cluster. Only honored
7497    /// if cluster created with IP Alias support.
7498    pub default_max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
7499
7500    /// Configuration for exporting resource usages. Resource usage export is
7501    /// disabled when this config is unspecified.
7502    pub resource_usage_export_config: std::option::Option<crate::model::ResourceUsageExportConfig>,
7503
7504    /// Configuration controlling RBAC group membership information.
7505    pub authenticator_groups_config: std::option::Option<crate::model::AuthenticatorGroupsConfig>,
7506
7507    /// Configuration for private cluster.
7508    pub private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
7509
7510    /// Configuration of etcd encryption.
7511    pub database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
7512
7513    /// Cluster-level Vertical Pod Autoscaling configuration.
7514    pub vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
7515
7516    /// Shielded Nodes configuration.
7517    pub shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
7518
7519    /// Release channel configuration. If left unspecified on cluster creation and
7520    /// a version is specified, the cluster is enrolled in the most mature release
7521    /// channel where the version is available (first checking STABLE, then
7522    /// REGULAR, and finally RAPID). Otherwise, if no release channel
7523    /// configuration and no version is specified, the cluster is enrolled in the
7524    /// REGULAR channel with its default version.
7525    pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
7526
7527    /// Configuration for the use of Kubernetes Service Accounts in GCP IAM
7528    /// policies.
7529    pub workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
7530
7531    /// Configuration for issuance of mTLS keys and certificates to Kubernetes
7532    /// pods.
7533    pub mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
7534
7535    /// Configuration for the fine-grained cost management feature.
7536    pub cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
7537
7538    /// Notification configuration of the cluster.
7539    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
7540
7541    /// Configuration of Confidential Nodes.
7542    /// All the nodes in the cluster will be Confidential VM once enabled.
7543    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
7544
7545    /// Configuration for Identity Service component.
7546    pub identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
7547
7548    /// Output only. Server-defined URL for the resource.
7549    pub self_link: std::string::String,
7550
7551    /// Output only. The name of the Google Compute Engine
7552    /// [zone](https://cloud.google.com/compute/docs/zones#available)
7553    /// in which the cluster resides. This field is deprecated, use location
7554    /// instead.
7555    #[deprecated]
7556    pub zone: std::string::String,
7557
7558    /// Output only. The IP address of this cluster's master endpoint.
7559    /// The endpoint can be accessed from the internet at
7560    /// `https://username:password@endpoint/`.
7561    ///
7562    /// See the `masterAuth` property of this resource for username and
7563    /// password information.
7564    pub endpoint: std::string::String,
7565
7566    /// The initial Kubernetes version for this cluster.  Valid versions are those
7567    /// found in validMasterVersions returned by getServerConfig.  The version can
7568    /// be upgraded over time; such upgrades are reflected in
7569    /// currentMasterVersion and currentNodeVersion.
7570    ///
7571    /// Users may specify either explicit versions offered by
7572    /// Kubernetes Engine or version aliases, which have the following behavior:
7573    ///
7574    /// - "latest": picks the highest valid Kubernetes version
7575    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
7576    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
7577    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
7578    /// - "","-": picks the default Kubernetes version
7579    pub initial_cluster_version: std::string::String,
7580
7581    /// Output only. The current software version of the master endpoint.
7582    pub current_master_version: std::string::String,
7583
7584    /// Output only. Deprecated, use
7585    /// [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools)
7586    /// instead. The current version of the node software components. If they are
7587    /// currently at multiple versions because they're in the process of being
7588    /// upgraded, this reflects the minimum version of all nodes.
7589    #[deprecated]
7590    pub current_node_version: std::string::String,
7591
7592    /// Output only. The time the cluster was created, in
7593    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
7594    pub create_time: std::string::String,
7595
7596    /// Output only. The current status of this cluster.
7597    pub status: crate::model::cluster::Status,
7598
7599    /// Output only. Deprecated. Use conditions instead.
7600    /// Additional information about the current status of this
7601    /// cluster, if available.
7602    #[deprecated]
7603    pub status_message: std::string::String,
7604
7605    /// Output only. The size of the address space on each node for hosting
7606    /// containers. This is provisioned from within the `container_ipv4_cidr`
7607    /// range. This field will only be set when cluster is in route-based network
7608    /// mode.
7609    pub node_ipv4_cidr_size: i32,
7610
7611    /// Output only. The IP address range of the Kubernetes services in
7612    /// this cluster, in
7613    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7614    /// notation (e.g. `1.2.3.4/29`). Service addresses are
7615    /// typically put in the last `/16` from the container CIDR.
7616    pub services_ipv4_cidr: std::string::String,
7617
7618    /// Output only. Deprecated. Use node_pools.instance_group_urls.
7619    #[deprecated]
7620    pub instance_group_urls: std::vec::Vec<std::string::String>,
7621
7622    /// Output only. The number of nodes currently in the cluster. Deprecated.
7623    /// Call Kubernetes API directly to retrieve node information.
7624    #[deprecated]
7625    pub current_node_count: i32,
7626
7627    /// Output only. The time the cluster will be automatically
7628    /// deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
7629    pub expire_time: std::string::String,
7630
7631    /// Output only. The name of the Google Compute Engine
7632    /// [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
7633    /// or
7634    /// [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
7635    /// in which the cluster resides.
7636    pub location: std::string::String,
7637
7638    /// Enable the ability to use Cloud TPUs in this cluster.
7639    /// This field is deprecated due to the deprecation of 2VM TPU. The end of life
7640    /// date for 2VM TPU is 2025-04-25.
7641    #[deprecated]
7642    pub enable_tpu: bool,
7643
7644    /// Output only. The IP address range of the Cloud TPUs in this cluster, in
7645    /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
7646    /// notation (e.g. `1.2.3.4/29`).
7647    /// This field is deprecated due to the deprecation of 2VM TPU. The end of life
7648    /// date for 2VM TPU is 2025-04-25.
7649    #[deprecated]
7650    pub tpu_ipv4_cidr_block: std::string::String,
7651
7652    /// Which conditions caused the current cluster state.
7653    pub conditions: std::vec::Vec<crate::model::StatusCondition>,
7654
7655    /// Autopilot configuration for the cluster.
7656    pub autopilot: std::option::Option<crate::model::Autopilot>,
7657
7658    /// Output only. Unique id for the cluster.
7659    pub id: std::string::String,
7660
7661    /// Default NodePool settings for the entire cluster. These settings are
7662    /// overridden if specified on the specific NodePool object.
7663    pub node_pool_defaults: std::option::Option<crate::model::NodePoolDefaults>,
7664
7665    /// Logging configuration for the cluster.
7666    pub logging_config: std::option::Option<crate::model::LoggingConfig>,
7667
7668    /// Monitoring configuration for the cluster.
7669    pub monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
7670
7671    /// Node pool configs that apply to all auto-provisioned node pools
7672    /// in autopilot clusters and node auto-provisioning enabled clusters.
7673    pub node_pool_auto_config: std::option::Option<crate::model::NodePoolAutoConfig>,
7674
7675    /// The config for pod autoscaling.
7676    pub pod_autoscaling: std::option::Option<crate::model::PodAutoscaling>,
7677
7678    /// This checksum is computed by the server based on the value of cluster
7679    /// fields, and may be sent on update requests to ensure the client has an
7680    /// up-to-date value before proceeding.
7681    pub etag: std::string::String,
7682
7683    /// Fleet information for the cluster.
7684    pub fleet: std::option::Option<crate::model::Fleet>,
7685
7686    /// Enable/Disable Security Posture API features for the cluster.
7687    pub security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
7688
7689    /// Configuration for all cluster's control plane endpoints.
7690    pub control_plane_endpoints_config:
7691        std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
7692
7693    /// Beta APIs Config
7694    pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
7695
7696    /// GKE Enterprise Configuration.
7697    pub enterprise_config: std::option::Option<crate::model::EnterpriseConfig>,
7698
7699    /// Secret CSI driver configuration.
7700    pub secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
7701
7702    /// Enable/Disable Compliance Posture features for the cluster.
7703    pub compliance_posture_config: std::option::Option<crate::model::CompliancePostureConfig>,
7704
7705    /// Output only. Reserved for future use.
7706    pub satisfies_pzs: std::option::Option<bool>,
7707
7708    /// Output only. Reserved for future use.
7709    pub satisfies_pzi: std::option::Option<bool>,
7710
7711    /// The Custom keys configuration for the cluster.
7712    pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
7713
7714    /// RBACBindingConfig allows user to restrict ClusterRoleBindings an
7715    /// RoleBindings that can be created.
7716    pub rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
7717
7718    /// Configuration for GKE auto upgrades.
7719    pub gke_auto_upgrade_config: std::option::Option<crate::model::GkeAutoUpgradeConfig>,
7720
7721    /// Configuration for limiting anonymous access to all endpoints except the
7722    /// health checks.
7723    pub anonymous_authentication_config:
7724        std::option::Option<crate::model::AnonymousAuthenticationConfig>,
7725
7726    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7727}
7728
7729impl Cluster {
7730    pub fn new() -> Self {
7731        std::default::Default::default()
7732    }
7733
7734    /// Sets the value of [name][crate::model::Cluster::name].
7735    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7736        self.name = v.into();
7737        self
7738    }
7739
7740    /// Sets the value of [description][crate::model::Cluster::description].
7741    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7742        self.description = v.into();
7743        self
7744    }
7745
7746    /// Sets the value of [initial_node_count][crate::model::Cluster::initial_node_count].
7747    #[deprecated]
7748    pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7749        self.initial_node_count = v.into();
7750        self
7751    }
7752
7753    /// Sets the value of [node_config][crate::model::Cluster::node_config].
7754    #[deprecated]
7755    pub fn set_node_config<T>(mut self, v: T) -> Self
7756    where
7757        T: std::convert::Into<crate::model::NodeConfig>,
7758    {
7759        self.node_config = std::option::Option::Some(v.into());
7760        self
7761    }
7762
7763    /// Sets or clears the value of [node_config][crate::model::Cluster::node_config].
7764    #[deprecated]
7765    pub fn set_or_clear_node_config<T>(mut self, v: std::option::Option<T>) -> Self
7766    where
7767        T: std::convert::Into<crate::model::NodeConfig>,
7768    {
7769        self.node_config = v.map(|x| x.into());
7770        self
7771    }
7772
7773    /// Sets the value of [master_auth][crate::model::Cluster::master_auth].
7774    pub fn set_master_auth<T>(mut self, v: T) -> Self
7775    where
7776        T: std::convert::Into<crate::model::MasterAuth>,
7777    {
7778        self.master_auth = std::option::Option::Some(v.into());
7779        self
7780    }
7781
7782    /// Sets or clears the value of [master_auth][crate::model::Cluster::master_auth].
7783    pub fn set_or_clear_master_auth<T>(mut self, v: std::option::Option<T>) -> Self
7784    where
7785        T: std::convert::Into<crate::model::MasterAuth>,
7786    {
7787        self.master_auth = v.map(|x| x.into());
7788        self
7789    }
7790
7791    /// Sets the value of [logging_service][crate::model::Cluster::logging_service].
7792    pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7793        self.logging_service = v.into();
7794        self
7795    }
7796
7797    /// Sets the value of [monitoring_service][crate::model::Cluster::monitoring_service].
7798    pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
7799        mut self,
7800        v: T,
7801    ) -> Self {
7802        self.monitoring_service = v.into();
7803        self
7804    }
7805
7806    /// Sets the value of [network][crate::model::Cluster::network].
7807    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7808        self.network = v.into();
7809        self
7810    }
7811
7812    /// Sets the value of [cluster_ipv4_cidr][crate::model::Cluster::cluster_ipv4_cidr].
7813    pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
7814        mut self,
7815        v: T,
7816    ) -> Self {
7817        self.cluster_ipv4_cidr = v.into();
7818        self
7819    }
7820
7821    /// Sets the value of [addons_config][crate::model::Cluster::addons_config].
7822    pub fn set_addons_config<T>(mut self, v: T) -> Self
7823    where
7824        T: std::convert::Into<crate::model::AddonsConfig>,
7825    {
7826        self.addons_config = std::option::Option::Some(v.into());
7827        self
7828    }
7829
7830    /// Sets or clears the value of [addons_config][crate::model::Cluster::addons_config].
7831    pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
7832    where
7833        T: std::convert::Into<crate::model::AddonsConfig>,
7834    {
7835        self.addons_config = v.map(|x| x.into());
7836        self
7837    }
7838
7839    /// Sets the value of [subnetwork][crate::model::Cluster::subnetwork].
7840    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7841        self.subnetwork = v.into();
7842        self
7843    }
7844
7845    /// Sets the value of [node_pools][crate::model::Cluster::node_pools].
7846    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
7847    where
7848        T: std::iter::IntoIterator<Item = V>,
7849        V: std::convert::Into<crate::model::NodePool>,
7850    {
7851        use std::iter::Iterator;
7852        self.node_pools = v.into_iter().map(|i| i.into()).collect();
7853        self
7854    }
7855
7856    /// Sets the value of [locations][crate::model::Cluster::locations].
7857    pub fn set_locations<T, V>(mut self, v: T) -> Self
7858    where
7859        T: std::iter::IntoIterator<Item = V>,
7860        V: std::convert::Into<std::string::String>,
7861    {
7862        use std::iter::Iterator;
7863        self.locations = v.into_iter().map(|i| i.into()).collect();
7864        self
7865    }
7866
7867    /// Sets the value of [enable_kubernetes_alpha][crate::model::Cluster::enable_kubernetes_alpha].
7868    pub fn set_enable_kubernetes_alpha<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7869        self.enable_kubernetes_alpha = v.into();
7870        self
7871    }
7872
7873    /// Sets the value of [alpha_cluster_feature_gates][crate::model::Cluster::alpha_cluster_feature_gates].
7874    pub fn set_alpha_cluster_feature_gates<T, V>(mut self, v: T) -> Self
7875    where
7876        T: std::iter::IntoIterator<Item = V>,
7877        V: std::convert::Into<std::string::String>,
7878    {
7879        use std::iter::Iterator;
7880        self.alpha_cluster_feature_gates = v.into_iter().map(|i| i.into()).collect();
7881        self
7882    }
7883
7884    /// Sets the value of [resource_labels][crate::model::Cluster::resource_labels].
7885    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
7886    where
7887        T: std::iter::IntoIterator<Item = (K, V)>,
7888        K: std::convert::Into<std::string::String>,
7889        V: std::convert::Into<std::string::String>,
7890    {
7891        use std::iter::Iterator;
7892        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7893        self
7894    }
7895
7896    /// Sets the value of [label_fingerprint][crate::model::Cluster::label_fingerprint].
7897    pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
7898        mut self,
7899        v: T,
7900    ) -> Self {
7901        self.label_fingerprint = v.into();
7902        self
7903    }
7904
7905    /// Sets the value of [legacy_abac][crate::model::Cluster::legacy_abac].
7906    pub fn set_legacy_abac<T>(mut self, v: T) -> Self
7907    where
7908        T: std::convert::Into<crate::model::LegacyAbac>,
7909    {
7910        self.legacy_abac = std::option::Option::Some(v.into());
7911        self
7912    }
7913
7914    /// Sets or clears the value of [legacy_abac][crate::model::Cluster::legacy_abac].
7915    pub fn set_or_clear_legacy_abac<T>(mut self, v: std::option::Option<T>) -> Self
7916    where
7917        T: std::convert::Into<crate::model::LegacyAbac>,
7918    {
7919        self.legacy_abac = v.map(|x| x.into());
7920        self
7921    }
7922
7923    /// Sets the value of [network_policy][crate::model::Cluster::network_policy].
7924    pub fn set_network_policy<T>(mut self, v: T) -> Self
7925    where
7926        T: std::convert::Into<crate::model::NetworkPolicy>,
7927    {
7928        self.network_policy = std::option::Option::Some(v.into());
7929        self
7930    }
7931
7932    /// Sets or clears the value of [network_policy][crate::model::Cluster::network_policy].
7933    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
7934    where
7935        T: std::convert::Into<crate::model::NetworkPolicy>,
7936    {
7937        self.network_policy = v.map(|x| x.into());
7938        self
7939    }
7940
7941    /// Sets the value of [ip_allocation_policy][crate::model::Cluster::ip_allocation_policy].
7942    pub fn set_ip_allocation_policy<T>(mut self, v: T) -> Self
7943    where
7944        T: std::convert::Into<crate::model::IPAllocationPolicy>,
7945    {
7946        self.ip_allocation_policy = std::option::Option::Some(v.into());
7947        self
7948    }
7949
7950    /// Sets or clears the value of [ip_allocation_policy][crate::model::Cluster::ip_allocation_policy].
7951    pub fn set_or_clear_ip_allocation_policy<T>(mut self, v: std::option::Option<T>) -> Self
7952    where
7953        T: std::convert::Into<crate::model::IPAllocationPolicy>,
7954    {
7955        self.ip_allocation_policy = v.map(|x| x.into());
7956        self
7957    }
7958
7959    /// Sets the value of [master_authorized_networks_config][crate::model::Cluster::master_authorized_networks_config].
7960    #[deprecated]
7961    pub fn set_master_authorized_networks_config<T>(mut self, v: T) -> Self
7962    where
7963        T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
7964    {
7965        self.master_authorized_networks_config = std::option::Option::Some(v.into());
7966        self
7967    }
7968
7969    /// Sets or clears the value of [master_authorized_networks_config][crate::model::Cluster::master_authorized_networks_config].
7970    #[deprecated]
7971    pub fn set_or_clear_master_authorized_networks_config<T>(
7972        mut self,
7973        v: std::option::Option<T>,
7974    ) -> Self
7975    where
7976        T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
7977    {
7978        self.master_authorized_networks_config = v.map(|x| x.into());
7979        self
7980    }
7981
7982    /// Sets the value of [maintenance_policy][crate::model::Cluster::maintenance_policy].
7983    pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
7984    where
7985        T: std::convert::Into<crate::model::MaintenancePolicy>,
7986    {
7987        self.maintenance_policy = std::option::Option::Some(v.into());
7988        self
7989    }
7990
7991    /// Sets or clears the value of [maintenance_policy][crate::model::Cluster::maintenance_policy].
7992    pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
7993    where
7994        T: std::convert::Into<crate::model::MaintenancePolicy>,
7995    {
7996        self.maintenance_policy = v.map(|x| x.into());
7997        self
7998    }
7999
8000    /// Sets the value of [binary_authorization][crate::model::Cluster::binary_authorization].
8001    pub fn set_binary_authorization<T>(mut self, v: T) -> Self
8002    where
8003        T: std::convert::Into<crate::model::BinaryAuthorization>,
8004    {
8005        self.binary_authorization = std::option::Option::Some(v.into());
8006        self
8007    }
8008
8009    /// Sets or clears the value of [binary_authorization][crate::model::Cluster::binary_authorization].
8010    pub fn set_or_clear_binary_authorization<T>(mut self, v: std::option::Option<T>) -> Self
8011    where
8012        T: std::convert::Into<crate::model::BinaryAuthorization>,
8013    {
8014        self.binary_authorization = v.map(|x| x.into());
8015        self
8016    }
8017
8018    /// Sets the value of [autoscaling][crate::model::Cluster::autoscaling].
8019    pub fn set_autoscaling<T>(mut self, v: T) -> Self
8020    where
8021        T: std::convert::Into<crate::model::ClusterAutoscaling>,
8022    {
8023        self.autoscaling = std::option::Option::Some(v.into());
8024        self
8025    }
8026
8027    /// Sets or clears the value of [autoscaling][crate::model::Cluster::autoscaling].
8028    pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8029    where
8030        T: std::convert::Into<crate::model::ClusterAutoscaling>,
8031    {
8032        self.autoscaling = v.map(|x| x.into());
8033        self
8034    }
8035
8036    /// Sets the value of [network_config][crate::model::Cluster::network_config].
8037    pub fn set_network_config<T>(mut self, v: T) -> Self
8038    where
8039        T: std::convert::Into<crate::model::NetworkConfig>,
8040    {
8041        self.network_config = std::option::Option::Some(v.into());
8042        self
8043    }
8044
8045    /// Sets or clears the value of [network_config][crate::model::Cluster::network_config].
8046    pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
8047    where
8048        T: std::convert::Into<crate::model::NetworkConfig>,
8049    {
8050        self.network_config = v.map(|x| x.into());
8051        self
8052    }
8053
8054    /// Sets the value of [default_max_pods_constraint][crate::model::Cluster::default_max_pods_constraint].
8055    pub fn set_default_max_pods_constraint<T>(mut self, v: T) -> Self
8056    where
8057        T: std::convert::Into<crate::model::MaxPodsConstraint>,
8058    {
8059        self.default_max_pods_constraint = std::option::Option::Some(v.into());
8060        self
8061    }
8062
8063    /// Sets or clears the value of [default_max_pods_constraint][crate::model::Cluster::default_max_pods_constraint].
8064    pub fn set_or_clear_default_max_pods_constraint<T>(mut self, v: std::option::Option<T>) -> Self
8065    where
8066        T: std::convert::Into<crate::model::MaxPodsConstraint>,
8067    {
8068        self.default_max_pods_constraint = v.map(|x| x.into());
8069        self
8070    }
8071
8072    /// Sets the value of [resource_usage_export_config][crate::model::Cluster::resource_usage_export_config].
8073    pub fn set_resource_usage_export_config<T>(mut self, v: T) -> Self
8074    where
8075        T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
8076    {
8077        self.resource_usage_export_config = std::option::Option::Some(v.into());
8078        self
8079    }
8080
8081    /// Sets or clears the value of [resource_usage_export_config][crate::model::Cluster::resource_usage_export_config].
8082    pub fn set_or_clear_resource_usage_export_config<T>(mut self, v: std::option::Option<T>) -> Self
8083    where
8084        T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
8085    {
8086        self.resource_usage_export_config = v.map(|x| x.into());
8087        self
8088    }
8089
8090    /// Sets the value of [authenticator_groups_config][crate::model::Cluster::authenticator_groups_config].
8091    pub fn set_authenticator_groups_config<T>(mut self, v: T) -> Self
8092    where
8093        T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
8094    {
8095        self.authenticator_groups_config = std::option::Option::Some(v.into());
8096        self
8097    }
8098
8099    /// Sets or clears the value of [authenticator_groups_config][crate::model::Cluster::authenticator_groups_config].
8100    pub fn set_or_clear_authenticator_groups_config<T>(mut self, v: std::option::Option<T>) -> Self
8101    where
8102        T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
8103    {
8104        self.authenticator_groups_config = v.map(|x| x.into());
8105        self
8106    }
8107
8108    /// Sets the value of [private_cluster_config][crate::model::Cluster::private_cluster_config].
8109    pub fn set_private_cluster_config<T>(mut self, v: T) -> Self
8110    where
8111        T: std::convert::Into<crate::model::PrivateClusterConfig>,
8112    {
8113        self.private_cluster_config = std::option::Option::Some(v.into());
8114        self
8115    }
8116
8117    /// Sets or clears the value of [private_cluster_config][crate::model::Cluster::private_cluster_config].
8118    pub fn set_or_clear_private_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
8119    where
8120        T: std::convert::Into<crate::model::PrivateClusterConfig>,
8121    {
8122        self.private_cluster_config = v.map(|x| x.into());
8123        self
8124    }
8125
8126    /// Sets the value of [database_encryption][crate::model::Cluster::database_encryption].
8127    pub fn set_database_encryption<T>(mut self, v: T) -> Self
8128    where
8129        T: std::convert::Into<crate::model::DatabaseEncryption>,
8130    {
8131        self.database_encryption = std::option::Option::Some(v.into());
8132        self
8133    }
8134
8135    /// Sets or clears the value of [database_encryption][crate::model::Cluster::database_encryption].
8136    pub fn set_or_clear_database_encryption<T>(mut self, v: std::option::Option<T>) -> Self
8137    where
8138        T: std::convert::Into<crate::model::DatabaseEncryption>,
8139    {
8140        self.database_encryption = v.map(|x| x.into());
8141        self
8142    }
8143
8144    /// Sets the value of [vertical_pod_autoscaling][crate::model::Cluster::vertical_pod_autoscaling].
8145    pub fn set_vertical_pod_autoscaling<T>(mut self, v: T) -> Self
8146    where
8147        T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
8148    {
8149        self.vertical_pod_autoscaling = std::option::Option::Some(v.into());
8150        self
8151    }
8152
8153    /// Sets or clears the value of [vertical_pod_autoscaling][crate::model::Cluster::vertical_pod_autoscaling].
8154    pub fn set_or_clear_vertical_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8155    where
8156        T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
8157    {
8158        self.vertical_pod_autoscaling = v.map(|x| x.into());
8159        self
8160    }
8161
8162    /// Sets the value of [shielded_nodes][crate::model::Cluster::shielded_nodes].
8163    pub fn set_shielded_nodes<T>(mut self, v: T) -> Self
8164    where
8165        T: std::convert::Into<crate::model::ShieldedNodes>,
8166    {
8167        self.shielded_nodes = std::option::Option::Some(v.into());
8168        self
8169    }
8170
8171    /// Sets or clears the value of [shielded_nodes][crate::model::Cluster::shielded_nodes].
8172    pub fn set_or_clear_shielded_nodes<T>(mut self, v: std::option::Option<T>) -> Self
8173    where
8174        T: std::convert::Into<crate::model::ShieldedNodes>,
8175    {
8176        self.shielded_nodes = v.map(|x| x.into());
8177        self
8178    }
8179
8180    /// Sets the value of [release_channel][crate::model::Cluster::release_channel].
8181    pub fn set_release_channel<T>(mut self, v: T) -> Self
8182    where
8183        T: std::convert::Into<crate::model::ReleaseChannel>,
8184    {
8185        self.release_channel = std::option::Option::Some(v.into());
8186        self
8187    }
8188
8189    /// Sets or clears the value of [release_channel][crate::model::Cluster::release_channel].
8190    pub fn set_or_clear_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
8191    where
8192        T: std::convert::Into<crate::model::ReleaseChannel>,
8193    {
8194        self.release_channel = v.map(|x| x.into());
8195        self
8196    }
8197
8198    /// Sets the value of [workload_identity_config][crate::model::Cluster::workload_identity_config].
8199    pub fn set_workload_identity_config<T>(mut self, v: T) -> Self
8200    where
8201        T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
8202    {
8203        self.workload_identity_config = std::option::Option::Some(v.into());
8204        self
8205    }
8206
8207    /// Sets or clears the value of [workload_identity_config][crate::model::Cluster::workload_identity_config].
8208    pub fn set_or_clear_workload_identity_config<T>(mut self, v: std::option::Option<T>) -> Self
8209    where
8210        T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
8211    {
8212        self.workload_identity_config = v.map(|x| x.into());
8213        self
8214    }
8215
8216    /// Sets the value of [mesh_certificates][crate::model::Cluster::mesh_certificates].
8217    pub fn set_mesh_certificates<T>(mut self, v: T) -> Self
8218    where
8219        T: std::convert::Into<crate::model::MeshCertificates>,
8220    {
8221        self.mesh_certificates = std::option::Option::Some(v.into());
8222        self
8223    }
8224
8225    /// Sets or clears the value of [mesh_certificates][crate::model::Cluster::mesh_certificates].
8226    pub fn set_or_clear_mesh_certificates<T>(mut self, v: std::option::Option<T>) -> Self
8227    where
8228        T: std::convert::Into<crate::model::MeshCertificates>,
8229    {
8230        self.mesh_certificates = v.map(|x| x.into());
8231        self
8232    }
8233
8234    /// Sets the value of [cost_management_config][crate::model::Cluster::cost_management_config].
8235    pub fn set_cost_management_config<T>(mut self, v: T) -> Self
8236    where
8237        T: std::convert::Into<crate::model::CostManagementConfig>,
8238    {
8239        self.cost_management_config = std::option::Option::Some(v.into());
8240        self
8241    }
8242
8243    /// Sets or clears the value of [cost_management_config][crate::model::Cluster::cost_management_config].
8244    pub fn set_or_clear_cost_management_config<T>(mut self, v: std::option::Option<T>) -> Self
8245    where
8246        T: std::convert::Into<crate::model::CostManagementConfig>,
8247    {
8248        self.cost_management_config = v.map(|x| x.into());
8249        self
8250    }
8251
8252    /// Sets the value of [notification_config][crate::model::Cluster::notification_config].
8253    pub fn set_notification_config<T>(mut self, v: T) -> Self
8254    where
8255        T: std::convert::Into<crate::model::NotificationConfig>,
8256    {
8257        self.notification_config = std::option::Option::Some(v.into());
8258        self
8259    }
8260
8261    /// Sets or clears the value of [notification_config][crate::model::Cluster::notification_config].
8262    pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
8263    where
8264        T: std::convert::Into<crate::model::NotificationConfig>,
8265    {
8266        self.notification_config = v.map(|x| x.into());
8267        self
8268    }
8269
8270    /// Sets the value of [confidential_nodes][crate::model::Cluster::confidential_nodes].
8271    pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
8272    where
8273        T: std::convert::Into<crate::model::ConfidentialNodes>,
8274    {
8275        self.confidential_nodes = std::option::Option::Some(v.into());
8276        self
8277    }
8278
8279    /// Sets or clears the value of [confidential_nodes][crate::model::Cluster::confidential_nodes].
8280    pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
8281    where
8282        T: std::convert::Into<crate::model::ConfidentialNodes>,
8283    {
8284        self.confidential_nodes = v.map(|x| x.into());
8285        self
8286    }
8287
8288    /// Sets the value of [identity_service_config][crate::model::Cluster::identity_service_config].
8289    pub fn set_identity_service_config<T>(mut self, v: T) -> Self
8290    where
8291        T: std::convert::Into<crate::model::IdentityServiceConfig>,
8292    {
8293        self.identity_service_config = std::option::Option::Some(v.into());
8294        self
8295    }
8296
8297    /// Sets or clears the value of [identity_service_config][crate::model::Cluster::identity_service_config].
8298    pub fn set_or_clear_identity_service_config<T>(mut self, v: std::option::Option<T>) -> Self
8299    where
8300        T: std::convert::Into<crate::model::IdentityServiceConfig>,
8301    {
8302        self.identity_service_config = v.map(|x| x.into());
8303        self
8304    }
8305
8306    /// Sets the value of [self_link][crate::model::Cluster::self_link].
8307    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8308        self.self_link = v.into();
8309        self
8310    }
8311
8312    /// Sets the value of [zone][crate::model::Cluster::zone].
8313    #[deprecated]
8314    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8315        self.zone = v.into();
8316        self
8317    }
8318
8319    /// Sets the value of [endpoint][crate::model::Cluster::endpoint].
8320    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8321        self.endpoint = v.into();
8322        self
8323    }
8324
8325    /// Sets the value of [initial_cluster_version][crate::model::Cluster::initial_cluster_version].
8326    pub fn set_initial_cluster_version<T: std::convert::Into<std::string::String>>(
8327        mut self,
8328        v: T,
8329    ) -> Self {
8330        self.initial_cluster_version = v.into();
8331        self
8332    }
8333
8334    /// Sets the value of [current_master_version][crate::model::Cluster::current_master_version].
8335    pub fn set_current_master_version<T: std::convert::Into<std::string::String>>(
8336        mut self,
8337        v: T,
8338    ) -> Self {
8339        self.current_master_version = v.into();
8340        self
8341    }
8342
8343    /// Sets the value of [current_node_version][crate::model::Cluster::current_node_version].
8344    #[deprecated]
8345    pub fn set_current_node_version<T: std::convert::Into<std::string::String>>(
8346        mut self,
8347        v: T,
8348    ) -> Self {
8349        self.current_node_version = v.into();
8350        self
8351    }
8352
8353    /// Sets the value of [create_time][crate::model::Cluster::create_time].
8354    pub fn set_create_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8355        self.create_time = v.into();
8356        self
8357    }
8358
8359    /// Sets the value of [status][crate::model::Cluster::status].
8360    pub fn set_status<T: std::convert::Into<crate::model::cluster::Status>>(
8361        mut self,
8362        v: T,
8363    ) -> Self {
8364        self.status = v.into();
8365        self
8366    }
8367
8368    /// Sets the value of [status_message][crate::model::Cluster::status_message].
8369    #[deprecated]
8370    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8371        self.status_message = v.into();
8372        self
8373    }
8374
8375    /// Sets the value of [node_ipv4_cidr_size][crate::model::Cluster::node_ipv4_cidr_size].
8376    pub fn set_node_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8377        self.node_ipv4_cidr_size = v.into();
8378        self
8379    }
8380
8381    /// Sets the value of [services_ipv4_cidr][crate::model::Cluster::services_ipv4_cidr].
8382    pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
8383        mut self,
8384        v: T,
8385    ) -> Self {
8386        self.services_ipv4_cidr = v.into();
8387        self
8388    }
8389
8390    /// Sets the value of [instance_group_urls][crate::model::Cluster::instance_group_urls].
8391    #[deprecated]
8392    pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
8393    where
8394        T: std::iter::IntoIterator<Item = V>,
8395        V: std::convert::Into<std::string::String>,
8396    {
8397        use std::iter::Iterator;
8398        self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
8399        self
8400    }
8401
8402    /// Sets the value of [current_node_count][crate::model::Cluster::current_node_count].
8403    #[deprecated]
8404    pub fn set_current_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8405        self.current_node_count = v.into();
8406        self
8407    }
8408
8409    /// Sets the value of [expire_time][crate::model::Cluster::expire_time].
8410    pub fn set_expire_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8411        self.expire_time = v.into();
8412        self
8413    }
8414
8415    /// Sets the value of [location][crate::model::Cluster::location].
8416    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8417        self.location = v.into();
8418        self
8419    }
8420
8421    /// Sets the value of [enable_tpu][crate::model::Cluster::enable_tpu].
8422    #[deprecated]
8423    pub fn set_enable_tpu<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8424        self.enable_tpu = v.into();
8425        self
8426    }
8427
8428    /// Sets the value of [tpu_ipv4_cidr_block][crate::model::Cluster::tpu_ipv4_cidr_block].
8429    #[deprecated]
8430    pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
8431        mut self,
8432        v: T,
8433    ) -> Self {
8434        self.tpu_ipv4_cidr_block = v.into();
8435        self
8436    }
8437
8438    /// Sets the value of [conditions][crate::model::Cluster::conditions].
8439    pub fn set_conditions<T, V>(mut self, v: T) -> Self
8440    where
8441        T: std::iter::IntoIterator<Item = V>,
8442        V: std::convert::Into<crate::model::StatusCondition>,
8443    {
8444        use std::iter::Iterator;
8445        self.conditions = v.into_iter().map(|i| i.into()).collect();
8446        self
8447    }
8448
8449    /// Sets the value of [autopilot][crate::model::Cluster::autopilot].
8450    pub fn set_autopilot<T>(mut self, v: T) -> Self
8451    where
8452        T: std::convert::Into<crate::model::Autopilot>,
8453    {
8454        self.autopilot = std::option::Option::Some(v.into());
8455        self
8456    }
8457
8458    /// Sets or clears the value of [autopilot][crate::model::Cluster::autopilot].
8459    pub fn set_or_clear_autopilot<T>(mut self, v: std::option::Option<T>) -> Self
8460    where
8461        T: std::convert::Into<crate::model::Autopilot>,
8462    {
8463        self.autopilot = v.map(|x| x.into());
8464        self
8465    }
8466
8467    /// Sets the value of [id][crate::model::Cluster::id].
8468    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8469        self.id = v.into();
8470        self
8471    }
8472
8473    /// Sets the value of [node_pool_defaults][crate::model::Cluster::node_pool_defaults].
8474    pub fn set_node_pool_defaults<T>(mut self, v: T) -> Self
8475    where
8476        T: std::convert::Into<crate::model::NodePoolDefaults>,
8477    {
8478        self.node_pool_defaults = std::option::Option::Some(v.into());
8479        self
8480    }
8481
8482    /// Sets or clears the value of [node_pool_defaults][crate::model::Cluster::node_pool_defaults].
8483    pub fn set_or_clear_node_pool_defaults<T>(mut self, v: std::option::Option<T>) -> Self
8484    where
8485        T: std::convert::Into<crate::model::NodePoolDefaults>,
8486    {
8487        self.node_pool_defaults = v.map(|x| x.into());
8488        self
8489    }
8490
8491    /// Sets the value of [logging_config][crate::model::Cluster::logging_config].
8492    pub fn set_logging_config<T>(mut self, v: T) -> Self
8493    where
8494        T: std::convert::Into<crate::model::LoggingConfig>,
8495    {
8496        self.logging_config = std::option::Option::Some(v.into());
8497        self
8498    }
8499
8500    /// Sets or clears the value of [logging_config][crate::model::Cluster::logging_config].
8501    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
8502    where
8503        T: std::convert::Into<crate::model::LoggingConfig>,
8504    {
8505        self.logging_config = v.map(|x| x.into());
8506        self
8507    }
8508
8509    /// Sets the value of [monitoring_config][crate::model::Cluster::monitoring_config].
8510    pub fn set_monitoring_config<T>(mut self, v: T) -> Self
8511    where
8512        T: std::convert::Into<crate::model::MonitoringConfig>,
8513    {
8514        self.monitoring_config = std::option::Option::Some(v.into());
8515        self
8516    }
8517
8518    /// Sets or clears the value of [monitoring_config][crate::model::Cluster::monitoring_config].
8519    pub fn set_or_clear_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
8520    where
8521        T: std::convert::Into<crate::model::MonitoringConfig>,
8522    {
8523        self.monitoring_config = v.map(|x| x.into());
8524        self
8525    }
8526
8527    /// Sets the value of [node_pool_auto_config][crate::model::Cluster::node_pool_auto_config].
8528    pub fn set_node_pool_auto_config<T>(mut self, v: T) -> Self
8529    where
8530        T: std::convert::Into<crate::model::NodePoolAutoConfig>,
8531    {
8532        self.node_pool_auto_config = std::option::Option::Some(v.into());
8533        self
8534    }
8535
8536    /// Sets or clears the value of [node_pool_auto_config][crate::model::Cluster::node_pool_auto_config].
8537    pub fn set_or_clear_node_pool_auto_config<T>(mut self, v: std::option::Option<T>) -> Self
8538    where
8539        T: std::convert::Into<crate::model::NodePoolAutoConfig>,
8540    {
8541        self.node_pool_auto_config = v.map(|x| x.into());
8542        self
8543    }
8544
8545    /// Sets the value of [pod_autoscaling][crate::model::Cluster::pod_autoscaling].
8546    pub fn set_pod_autoscaling<T>(mut self, v: T) -> Self
8547    where
8548        T: std::convert::Into<crate::model::PodAutoscaling>,
8549    {
8550        self.pod_autoscaling = std::option::Option::Some(v.into());
8551        self
8552    }
8553
8554    /// Sets or clears the value of [pod_autoscaling][crate::model::Cluster::pod_autoscaling].
8555    pub fn set_or_clear_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8556    where
8557        T: std::convert::Into<crate::model::PodAutoscaling>,
8558    {
8559        self.pod_autoscaling = v.map(|x| x.into());
8560        self
8561    }
8562
8563    /// Sets the value of [etag][crate::model::Cluster::etag].
8564    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8565        self.etag = v.into();
8566        self
8567    }
8568
8569    /// Sets the value of [fleet][crate::model::Cluster::fleet].
8570    pub fn set_fleet<T>(mut self, v: T) -> Self
8571    where
8572        T: std::convert::Into<crate::model::Fleet>,
8573    {
8574        self.fleet = std::option::Option::Some(v.into());
8575        self
8576    }
8577
8578    /// Sets or clears the value of [fleet][crate::model::Cluster::fleet].
8579    pub fn set_or_clear_fleet<T>(mut self, v: std::option::Option<T>) -> Self
8580    where
8581        T: std::convert::Into<crate::model::Fleet>,
8582    {
8583        self.fleet = v.map(|x| x.into());
8584        self
8585    }
8586
8587    /// Sets the value of [security_posture_config][crate::model::Cluster::security_posture_config].
8588    pub fn set_security_posture_config<T>(mut self, v: T) -> Self
8589    where
8590        T: std::convert::Into<crate::model::SecurityPostureConfig>,
8591    {
8592        self.security_posture_config = std::option::Option::Some(v.into());
8593        self
8594    }
8595
8596    /// Sets or clears the value of [security_posture_config][crate::model::Cluster::security_posture_config].
8597    pub fn set_or_clear_security_posture_config<T>(mut self, v: std::option::Option<T>) -> Self
8598    where
8599        T: std::convert::Into<crate::model::SecurityPostureConfig>,
8600    {
8601        self.security_posture_config = v.map(|x| x.into());
8602        self
8603    }
8604
8605    /// Sets the value of [control_plane_endpoints_config][crate::model::Cluster::control_plane_endpoints_config].
8606    pub fn set_control_plane_endpoints_config<T>(mut self, v: T) -> Self
8607    where
8608        T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
8609    {
8610        self.control_plane_endpoints_config = std::option::Option::Some(v.into());
8611        self
8612    }
8613
8614    /// Sets or clears the value of [control_plane_endpoints_config][crate::model::Cluster::control_plane_endpoints_config].
8615    pub fn set_or_clear_control_plane_endpoints_config<T>(
8616        mut self,
8617        v: std::option::Option<T>,
8618    ) -> Self
8619    where
8620        T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
8621    {
8622        self.control_plane_endpoints_config = v.map(|x| x.into());
8623        self
8624    }
8625
8626    /// Sets the value of [enable_k8s_beta_apis][crate::model::Cluster::enable_k8s_beta_apis].
8627    pub fn set_enable_k8s_beta_apis<T>(mut self, v: T) -> Self
8628    where
8629        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
8630    {
8631        self.enable_k8s_beta_apis = std::option::Option::Some(v.into());
8632        self
8633    }
8634
8635    /// Sets or clears the value of [enable_k8s_beta_apis][crate::model::Cluster::enable_k8s_beta_apis].
8636    pub fn set_or_clear_enable_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
8637    where
8638        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
8639    {
8640        self.enable_k8s_beta_apis = v.map(|x| x.into());
8641        self
8642    }
8643
8644    /// Sets the value of [enterprise_config][crate::model::Cluster::enterprise_config].
8645    pub fn set_enterprise_config<T>(mut self, v: T) -> Self
8646    where
8647        T: std::convert::Into<crate::model::EnterpriseConfig>,
8648    {
8649        self.enterprise_config = std::option::Option::Some(v.into());
8650        self
8651    }
8652
8653    /// Sets or clears the value of [enterprise_config][crate::model::Cluster::enterprise_config].
8654    pub fn set_or_clear_enterprise_config<T>(mut self, v: std::option::Option<T>) -> Self
8655    where
8656        T: std::convert::Into<crate::model::EnterpriseConfig>,
8657    {
8658        self.enterprise_config = v.map(|x| x.into());
8659        self
8660    }
8661
8662    /// Sets the value of [secret_manager_config][crate::model::Cluster::secret_manager_config].
8663    pub fn set_secret_manager_config<T>(mut self, v: T) -> Self
8664    where
8665        T: std::convert::Into<crate::model::SecretManagerConfig>,
8666    {
8667        self.secret_manager_config = std::option::Option::Some(v.into());
8668        self
8669    }
8670
8671    /// Sets or clears the value of [secret_manager_config][crate::model::Cluster::secret_manager_config].
8672    pub fn set_or_clear_secret_manager_config<T>(mut self, v: std::option::Option<T>) -> Self
8673    where
8674        T: std::convert::Into<crate::model::SecretManagerConfig>,
8675    {
8676        self.secret_manager_config = v.map(|x| x.into());
8677        self
8678    }
8679
8680    /// Sets the value of [compliance_posture_config][crate::model::Cluster::compliance_posture_config].
8681    pub fn set_compliance_posture_config<T>(mut self, v: T) -> Self
8682    where
8683        T: std::convert::Into<crate::model::CompliancePostureConfig>,
8684    {
8685        self.compliance_posture_config = std::option::Option::Some(v.into());
8686        self
8687    }
8688
8689    /// Sets or clears the value of [compliance_posture_config][crate::model::Cluster::compliance_posture_config].
8690    pub fn set_or_clear_compliance_posture_config<T>(mut self, v: std::option::Option<T>) -> Self
8691    where
8692        T: std::convert::Into<crate::model::CompliancePostureConfig>,
8693    {
8694        self.compliance_posture_config = v.map(|x| x.into());
8695        self
8696    }
8697
8698    /// Sets the value of [satisfies_pzs][crate::model::Cluster::satisfies_pzs].
8699    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
8700    where
8701        T: std::convert::Into<bool>,
8702    {
8703        self.satisfies_pzs = std::option::Option::Some(v.into());
8704        self
8705    }
8706
8707    /// Sets or clears the value of [satisfies_pzs][crate::model::Cluster::satisfies_pzs].
8708    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
8709    where
8710        T: std::convert::Into<bool>,
8711    {
8712        self.satisfies_pzs = v.map(|x| x.into());
8713        self
8714    }
8715
8716    /// Sets the value of [satisfies_pzi][crate::model::Cluster::satisfies_pzi].
8717    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
8718    where
8719        T: std::convert::Into<bool>,
8720    {
8721        self.satisfies_pzi = std::option::Option::Some(v.into());
8722        self
8723    }
8724
8725    /// Sets or clears the value of [satisfies_pzi][crate::model::Cluster::satisfies_pzi].
8726    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
8727    where
8728        T: std::convert::Into<bool>,
8729    {
8730        self.satisfies_pzi = v.map(|x| x.into());
8731        self
8732    }
8733
8734    /// Sets the value of [user_managed_keys_config][crate::model::Cluster::user_managed_keys_config].
8735    pub fn set_user_managed_keys_config<T>(mut self, v: T) -> Self
8736    where
8737        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
8738    {
8739        self.user_managed_keys_config = std::option::Option::Some(v.into());
8740        self
8741    }
8742
8743    /// Sets or clears the value of [user_managed_keys_config][crate::model::Cluster::user_managed_keys_config].
8744    pub fn set_or_clear_user_managed_keys_config<T>(mut self, v: std::option::Option<T>) -> Self
8745    where
8746        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
8747    {
8748        self.user_managed_keys_config = v.map(|x| x.into());
8749        self
8750    }
8751
8752    /// Sets the value of [rbac_binding_config][crate::model::Cluster::rbac_binding_config].
8753    pub fn set_rbac_binding_config<T>(mut self, v: T) -> Self
8754    where
8755        T: std::convert::Into<crate::model::RBACBindingConfig>,
8756    {
8757        self.rbac_binding_config = std::option::Option::Some(v.into());
8758        self
8759    }
8760
8761    /// Sets or clears the value of [rbac_binding_config][crate::model::Cluster::rbac_binding_config].
8762    pub fn set_or_clear_rbac_binding_config<T>(mut self, v: std::option::Option<T>) -> Self
8763    where
8764        T: std::convert::Into<crate::model::RBACBindingConfig>,
8765    {
8766        self.rbac_binding_config = v.map(|x| x.into());
8767        self
8768    }
8769
8770    /// Sets the value of [gke_auto_upgrade_config][crate::model::Cluster::gke_auto_upgrade_config].
8771    pub fn set_gke_auto_upgrade_config<T>(mut self, v: T) -> Self
8772    where
8773        T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
8774    {
8775        self.gke_auto_upgrade_config = std::option::Option::Some(v.into());
8776        self
8777    }
8778
8779    /// Sets or clears the value of [gke_auto_upgrade_config][crate::model::Cluster::gke_auto_upgrade_config].
8780    pub fn set_or_clear_gke_auto_upgrade_config<T>(mut self, v: std::option::Option<T>) -> Self
8781    where
8782        T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
8783    {
8784        self.gke_auto_upgrade_config = v.map(|x| x.into());
8785        self
8786    }
8787
8788    /// Sets the value of [anonymous_authentication_config][crate::model::Cluster::anonymous_authentication_config].
8789    pub fn set_anonymous_authentication_config<T>(mut self, v: T) -> Self
8790    where
8791        T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
8792    {
8793        self.anonymous_authentication_config = std::option::Option::Some(v.into());
8794        self
8795    }
8796
8797    /// Sets or clears the value of [anonymous_authentication_config][crate::model::Cluster::anonymous_authentication_config].
8798    pub fn set_or_clear_anonymous_authentication_config<T>(
8799        mut self,
8800        v: std::option::Option<T>,
8801    ) -> Self
8802    where
8803        T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
8804    {
8805        self.anonymous_authentication_config = v.map(|x| x.into());
8806        self
8807    }
8808}
8809
8810impl wkt::message::Message for Cluster {
8811    fn typename() -> &'static str {
8812        "type.googleapis.com/google.container.v1.Cluster"
8813    }
8814}
8815
8816/// Defines additional types related to [Cluster].
8817pub mod cluster {
8818    #[allow(unused_imports)]
8819    use super::*;
8820
8821    /// The current status of the cluster.
8822    ///
8823    /// # Working with unknown values
8824    ///
8825    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8826    /// additional enum variants at any time. Adding new variants is not considered
8827    /// a breaking change. Applications should write their code in anticipation of:
8828    ///
8829    /// - New values appearing in future releases of the client library, **and**
8830    /// - New values received dynamically, without application changes.
8831    ///
8832    /// Please consult the [Working with enums] section in the user guide for some
8833    /// guidelines.
8834    ///
8835    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8836    #[derive(Clone, Debug, PartialEq)]
8837    #[non_exhaustive]
8838    pub enum Status {
8839        /// Not set.
8840        Unspecified,
8841        /// The PROVISIONING state indicates the cluster is being created.
8842        Provisioning,
8843        /// The RUNNING state indicates the cluster has been created and is fully
8844        /// usable.
8845        Running,
8846        /// The RECONCILING state indicates that some work is actively being done on
8847        /// the cluster, such as upgrading the master or node software. Details can
8848        /// be found in the `statusMessage` field.
8849        Reconciling,
8850        /// The STOPPING state indicates the cluster is being deleted.
8851        Stopping,
8852        /// The ERROR state indicates the cluster is unusable. It will be
8853        /// automatically deleted. Details can be found in the `statusMessage` field.
8854        Error,
8855        /// The DEGRADED state indicates the cluster requires user action to restore
8856        /// full functionality. Details can be found in the `statusMessage` field.
8857        Degraded,
8858        /// If set, the enum was initialized with an unknown value.
8859        ///
8860        /// Applications can examine the value using [Status::value] or
8861        /// [Status::name].
8862        UnknownValue(status::UnknownValue),
8863    }
8864
8865    #[doc(hidden)]
8866    pub mod status {
8867        #[allow(unused_imports)]
8868        use super::*;
8869        #[derive(Clone, Debug, PartialEq)]
8870        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8871    }
8872
8873    impl Status {
8874        /// Gets the enum value.
8875        ///
8876        /// Returns `None` if the enum contains an unknown value deserialized from
8877        /// the string representation of enums.
8878        pub fn value(&self) -> std::option::Option<i32> {
8879            match self {
8880                Self::Unspecified => std::option::Option::Some(0),
8881                Self::Provisioning => std::option::Option::Some(1),
8882                Self::Running => std::option::Option::Some(2),
8883                Self::Reconciling => std::option::Option::Some(3),
8884                Self::Stopping => std::option::Option::Some(4),
8885                Self::Error => std::option::Option::Some(5),
8886                Self::Degraded => std::option::Option::Some(6),
8887                Self::UnknownValue(u) => u.0.value(),
8888            }
8889        }
8890
8891        /// Gets the enum value as a string.
8892        ///
8893        /// Returns `None` if the enum contains an unknown value deserialized from
8894        /// the integer representation of enums.
8895        pub fn name(&self) -> std::option::Option<&str> {
8896            match self {
8897                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
8898                Self::Provisioning => std::option::Option::Some("PROVISIONING"),
8899                Self::Running => std::option::Option::Some("RUNNING"),
8900                Self::Reconciling => std::option::Option::Some("RECONCILING"),
8901                Self::Stopping => std::option::Option::Some("STOPPING"),
8902                Self::Error => std::option::Option::Some("ERROR"),
8903                Self::Degraded => std::option::Option::Some("DEGRADED"),
8904                Self::UnknownValue(u) => u.0.name(),
8905            }
8906        }
8907    }
8908
8909    impl std::default::Default for Status {
8910        fn default() -> Self {
8911            use std::convert::From;
8912            Self::from(0)
8913        }
8914    }
8915
8916    impl std::fmt::Display for Status {
8917        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8918            wkt::internal::display_enum(f, self.name(), self.value())
8919        }
8920    }
8921
8922    impl std::convert::From<i32> for Status {
8923        fn from(value: i32) -> Self {
8924            match value {
8925                0 => Self::Unspecified,
8926                1 => Self::Provisioning,
8927                2 => Self::Running,
8928                3 => Self::Reconciling,
8929                4 => Self::Stopping,
8930                5 => Self::Error,
8931                6 => Self::Degraded,
8932                _ => Self::UnknownValue(status::UnknownValue(
8933                    wkt::internal::UnknownEnumValue::Integer(value),
8934                )),
8935            }
8936        }
8937    }
8938
8939    impl std::convert::From<&str> for Status {
8940        fn from(value: &str) -> Self {
8941            use std::string::ToString;
8942            match value {
8943                "STATUS_UNSPECIFIED" => Self::Unspecified,
8944                "PROVISIONING" => Self::Provisioning,
8945                "RUNNING" => Self::Running,
8946                "RECONCILING" => Self::Reconciling,
8947                "STOPPING" => Self::Stopping,
8948                "ERROR" => Self::Error,
8949                "DEGRADED" => Self::Degraded,
8950                _ => Self::UnknownValue(status::UnknownValue(
8951                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8952                )),
8953            }
8954        }
8955    }
8956
8957    impl serde::ser::Serialize for Status {
8958        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8959        where
8960            S: serde::Serializer,
8961        {
8962            match self {
8963                Self::Unspecified => serializer.serialize_i32(0),
8964                Self::Provisioning => serializer.serialize_i32(1),
8965                Self::Running => serializer.serialize_i32(2),
8966                Self::Reconciling => serializer.serialize_i32(3),
8967                Self::Stopping => serializer.serialize_i32(4),
8968                Self::Error => serializer.serialize_i32(5),
8969                Self::Degraded => serializer.serialize_i32(6),
8970                Self::UnknownValue(u) => u.0.serialize(serializer),
8971            }
8972        }
8973    }
8974
8975    impl<'de> serde::de::Deserialize<'de> for Status {
8976        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8977        where
8978            D: serde::Deserializer<'de>,
8979        {
8980            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
8981                ".google.container.v1.Cluster.Status",
8982            ))
8983        }
8984    }
8985}
8986
8987/// RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings
8988/// that can be created.
8989#[derive(Clone, Default, PartialEq)]
8990#[non_exhaustive]
8991pub struct RBACBindingConfig {
8992    /// Setting this to true will allow any ClusterRoleBinding and RoleBinding
8993    /// with subjets system:anonymous or system:unauthenticated.
8994    pub enable_insecure_binding_system_unauthenticated: std::option::Option<bool>,
8995
8996    /// Setting this to true will allow any ClusterRoleBinding and RoleBinding
8997    /// with subjects system:authenticated.
8998    pub enable_insecure_binding_system_authenticated: std::option::Option<bool>,
8999
9000    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9001}
9002
9003impl RBACBindingConfig {
9004    pub fn new() -> Self {
9005        std::default::Default::default()
9006    }
9007
9008    /// Sets the value of [enable_insecure_binding_system_unauthenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_unauthenticated].
9009    pub fn set_enable_insecure_binding_system_unauthenticated<T>(mut self, v: T) -> Self
9010    where
9011        T: std::convert::Into<bool>,
9012    {
9013        self.enable_insecure_binding_system_unauthenticated = std::option::Option::Some(v.into());
9014        self
9015    }
9016
9017    /// Sets or clears the value of [enable_insecure_binding_system_unauthenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_unauthenticated].
9018    pub fn set_or_clear_enable_insecure_binding_system_unauthenticated<T>(
9019        mut self,
9020        v: std::option::Option<T>,
9021    ) -> Self
9022    where
9023        T: std::convert::Into<bool>,
9024    {
9025        self.enable_insecure_binding_system_unauthenticated = v.map(|x| x.into());
9026        self
9027    }
9028
9029    /// Sets the value of [enable_insecure_binding_system_authenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_authenticated].
9030    pub fn set_enable_insecure_binding_system_authenticated<T>(mut self, v: T) -> Self
9031    where
9032        T: std::convert::Into<bool>,
9033    {
9034        self.enable_insecure_binding_system_authenticated = std::option::Option::Some(v.into());
9035        self
9036    }
9037
9038    /// Sets or clears the value of [enable_insecure_binding_system_authenticated][crate::model::RBACBindingConfig::enable_insecure_binding_system_authenticated].
9039    pub fn set_or_clear_enable_insecure_binding_system_authenticated<T>(
9040        mut self,
9041        v: std::option::Option<T>,
9042    ) -> Self
9043    where
9044        T: std::convert::Into<bool>,
9045    {
9046        self.enable_insecure_binding_system_authenticated = v.map(|x| x.into());
9047        self
9048    }
9049}
9050
9051impl wkt::message::Message for RBACBindingConfig {
9052    fn typename() -> &'static str {
9053        "type.googleapis.com/google.container.v1.RBACBindingConfig"
9054    }
9055}
9056
9057/// UserManagedKeysConfig holds the resource address to Keys which are used
9058/// for signing certs and token that are used for communication within cluster.
9059#[derive(Clone, Default, PartialEq)]
9060#[non_exhaustive]
9061pub struct UserManagedKeysConfig {
9062    /// The Certificate Authority Service caPool to use for the cluster CA in this
9063    /// cluster.
9064    pub cluster_ca: std::string::String,
9065
9066    /// Resource path of the Certificate Authority Service caPool to use for the
9067    /// etcd API CA in this cluster.
9068    pub etcd_api_ca: std::string::String,
9069
9070    /// Resource path of the Certificate Authority Service caPool to use for the
9071    /// etcd peer CA in this cluster.
9072    pub etcd_peer_ca: std::string::String,
9073
9074    /// The Cloud KMS cryptoKeyVersions to use for signing service account JWTs
9075    /// issued by this cluster.
9076    ///
9077    /// Format:
9078    /// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}`
9079    pub service_account_signing_keys: std::vec::Vec<std::string::String>,
9080
9081    /// The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs
9082    /// issued by this cluster.
9083    ///
9084    /// Format:
9085    /// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}`
9086    pub service_account_verification_keys: std::vec::Vec<std::string::String>,
9087
9088    /// The Certificate Authority Service caPool to use for the aggregation CA in
9089    /// this cluster.
9090    pub aggregation_ca: std::string::String,
9091
9092    /// The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control
9093    /// plane nodes.
9094    pub control_plane_disk_encryption_key: std::string::String,
9095
9096    /// Resource path of the Cloud KMS cryptoKey to use for encryption of internal
9097    /// etcd backups.
9098    pub gkeops_etcd_backup_encryption_key: std::string::String,
9099
9100    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9101}
9102
9103impl UserManagedKeysConfig {
9104    pub fn new() -> Self {
9105        std::default::Default::default()
9106    }
9107
9108    /// Sets the value of [cluster_ca][crate::model::UserManagedKeysConfig::cluster_ca].
9109    pub fn set_cluster_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9110        self.cluster_ca = v.into();
9111        self
9112    }
9113
9114    /// Sets the value of [etcd_api_ca][crate::model::UserManagedKeysConfig::etcd_api_ca].
9115    pub fn set_etcd_api_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9116        self.etcd_api_ca = v.into();
9117        self
9118    }
9119
9120    /// Sets the value of [etcd_peer_ca][crate::model::UserManagedKeysConfig::etcd_peer_ca].
9121    pub fn set_etcd_peer_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9122        self.etcd_peer_ca = v.into();
9123        self
9124    }
9125
9126    /// Sets the value of [service_account_signing_keys][crate::model::UserManagedKeysConfig::service_account_signing_keys].
9127    pub fn set_service_account_signing_keys<T, V>(mut self, v: T) -> Self
9128    where
9129        T: std::iter::IntoIterator<Item = V>,
9130        V: std::convert::Into<std::string::String>,
9131    {
9132        use std::iter::Iterator;
9133        self.service_account_signing_keys = v.into_iter().map(|i| i.into()).collect();
9134        self
9135    }
9136
9137    /// Sets the value of [service_account_verification_keys][crate::model::UserManagedKeysConfig::service_account_verification_keys].
9138    pub fn set_service_account_verification_keys<T, V>(mut self, v: T) -> Self
9139    where
9140        T: std::iter::IntoIterator<Item = V>,
9141        V: std::convert::Into<std::string::String>,
9142    {
9143        use std::iter::Iterator;
9144        self.service_account_verification_keys = v.into_iter().map(|i| i.into()).collect();
9145        self
9146    }
9147
9148    /// Sets the value of [aggregation_ca][crate::model::UserManagedKeysConfig::aggregation_ca].
9149    pub fn set_aggregation_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9150        self.aggregation_ca = v.into();
9151        self
9152    }
9153
9154    /// Sets the value of [control_plane_disk_encryption_key][crate::model::UserManagedKeysConfig::control_plane_disk_encryption_key].
9155    pub fn set_control_plane_disk_encryption_key<T: std::convert::Into<std::string::String>>(
9156        mut self,
9157        v: T,
9158    ) -> Self {
9159        self.control_plane_disk_encryption_key = v.into();
9160        self
9161    }
9162
9163    /// Sets the value of [gkeops_etcd_backup_encryption_key][crate::model::UserManagedKeysConfig::gkeops_etcd_backup_encryption_key].
9164    pub fn set_gkeops_etcd_backup_encryption_key<T: std::convert::Into<std::string::String>>(
9165        mut self,
9166        v: T,
9167    ) -> Self {
9168        self.gkeops_etcd_backup_encryption_key = v.into();
9169        self
9170    }
9171}
9172
9173impl wkt::message::Message for UserManagedKeysConfig {
9174    fn typename() -> &'static str {
9175        "type.googleapis.com/google.container.v1.UserManagedKeysConfig"
9176    }
9177}
9178
9179/// AnonymousAuthenticationConfig defines the settings needed to limit endpoints
9180/// that allow anonymous authentication.
9181#[derive(Clone, Default, PartialEq)]
9182#[non_exhaustive]
9183pub struct AnonymousAuthenticationConfig {
9184    /// Defines the mode of limiting anonymous access in the cluster.
9185    pub mode: crate::model::anonymous_authentication_config::Mode,
9186
9187    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9188}
9189
9190impl AnonymousAuthenticationConfig {
9191    pub fn new() -> Self {
9192        std::default::Default::default()
9193    }
9194
9195    /// Sets the value of [mode][crate::model::AnonymousAuthenticationConfig::mode].
9196    pub fn set_mode<T: std::convert::Into<crate::model::anonymous_authentication_config::Mode>>(
9197        mut self,
9198        v: T,
9199    ) -> Self {
9200        self.mode = v.into();
9201        self
9202    }
9203}
9204
9205impl wkt::message::Message for AnonymousAuthenticationConfig {
9206    fn typename() -> &'static str {
9207        "type.googleapis.com/google.container.v1.AnonymousAuthenticationConfig"
9208    }
9209}
9210
9211/// Defines additional types related to [AnonymousAuthenticationConfig].
9212pub mod anonymous_authentication_config {
9213    #[allow(unused_imports)]
9214    use super::*;
9215
9216    /// Mode defines the mode of anonymous authentication
9217    /// allowed in the cluster.
9218    ///
9219    /// # Working with unknown values
9220    ///
9221    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9222    /// additional enum variants at any time. Adding new variants is not considered
9223    /// a breaking change. Applications should write their code in anticipation of:
9224    ///
9225    /// - New values appearing in future releases of the client library, **and**
9226    /// - New values received dynamically, without application changes.
9227    ///
9228    /// Please consult the [Working with enums] section in the user guide for some
9229    /// guidelines.
9230    ///
9231    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9232    #[derive(Clone, Debug, PartialEq)]
9233    #[non_exhaustive]
9234    pub enum Mode {
9235        /// Default value not specified.
9236        Unspecified,
9237        /// Anonymous authentication is allowed for all endpoints.
9238        Enabled,
9239        /// Anonymous authentication is allowed for only health check endpoints.
9240        Limited,
9241        /// If set, the enum was initialized with an unknown value.
9242        ///
9243        /// Applications can examine the value using [Mode::value] or
9244        /// [Mode::name].
9245        UnknownValue(mode::UnknownValue),
9246    }
9247
9248    #[doc(hidden)]
9249    pub mod mode {
9250        #[allow(unused_imports)]
9251        use super::*;
9252        #[derive(Clone, Debug, PartialEq)]
9253        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9254    }
9255
9256    impl Mode {
9257        /// Gets the enum value.
9258        ///
9259        /// Returns `None` if the enum contains an unknown value deserialized from
9260        /// the string representation of enums.
9261        pub fn value(&self) -> std::option::Option<i32> {
9262            match self {
9263                Self::Unspecified => std::option::Option::Some(0),
9264                Self::Enabled => std::option::Option::Some(1),
9265                Self::Limited => std::option::Option::Some(2),
9266                Self::UnknownValue(u) => u.0.value(),
9267            }
9268        }
9269
9270        /// Gets the enum value as a string.
9271        ///
9272        /// Returns `None` if the enum contains an unknown value deserialized from
9273        /// the integer representation of enums.
9274        pub fn name(&self) -> std::option::Option<&str> {
9275            match self {
9276                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
9277                Self::Enabled => std::option::Option::Some("ENABLED"),
9278                Self::Limited => std::option::Option::Some("LIMITED"),
9279                Self::UnknownValue(u) => u.0.name(),
9280            }
9281        }
9282    }
9283
9284    impl std::default::Default for Mode {
9285        fn default() -> Self {
9286            use std::convert::From;
9287            Self::from(0)
9288        }
9289    }
9290
9291    impl std::fmt::Display for Mode {
9292        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9293            wkt::internal::display_enum(f, self.name(), self.value())
9294        }
9295    }
9296
9297    impl std::convert::From<i32> for Mode {
9298        fn from(value: i32) -> Self {
9299            match value {
9300                0 => Self::Unspecified,
9301                1 => Self::Enabled,
9302                2 => Self::Limited,
9303                _ => Self::UnknownValue(mode::UnknownValue(
9304                    wkt::internal::UnknownEnumValue::Integer(value),
9305                )),
9306            }
9307        }
9308    }
9309
9310    impl std::convert::From<&str> for Mode {
9311        fn from(value: &str) -> Self {
9312            use std::string::ToString;
9313            match value {
9314                "MODE_UNSPECIFIED" => Self::Unspecified,
9315                "ENABLED" => Self::Enabled,
9316                "LIMITED" => Self::Limited,
9317                _ => Self::UnknownValue(mode::UnknownValue(
9318                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9319                )),
9320            }
9321        }
9322    }
9323
9324    impl serde::ser::Serialize for Mode {
9325        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9326        where
9327            S: serde::Serializer,
9328        {
9329            match self {
9330                Self::Unspecified => serializer.serialize_i32(0),
9331                Self::Enabled => serializer.serialize_i32(1),
9332                Self::Limited => serializer.serialize_i32(2),
9333                Self::UnknownValue(u) => u.0.serialize(serializer),
9334            }
9335        }
9336    }
9337
9338    impl<'de> serde::de::Deserialize<'de> for Mode {
9339        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9340        where
9341            D: serde::Deserializer<'de>,
9342        {
9343            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
9344                ".google.container.v1.AnonymousAuthenticationConfig.Mode",
9345            ))
9346        }
9347    }
9348}
9349
9350/// CompliancePostureConfig defines the settings needed to enable/disable
9351/// features for the Compliance Posture.
9352#[derive(Clone, Default, PartialEq)]
9353#[non_exhaustive]
9354pub struct CompliancePostureConfig {
9355    /// Defines the enablement mode for Compliance Posture.
9356    pub mode: std::option::Option<crate::model::compliance_posture_config::Mode>,
9357
9358    /// List of enabled compliance standards.
9359    pub compliance_standards:
9360        std::vec::Vec<crate::model::compliance_posture_config::ComplianceStandard>,
9361
9362    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9363}
9364
9365impl CompliancePostureConfig {
9366    pub fn new() -> Self {
9367        std::default::Default::default()
9368    }
9369
9370    /// Sets the value of [mode][crate::model::CompliancePostureConfig::mode].
9371    pub fn set_mode<T>(mut self, v: T) -> Self
9372    where
9373        T: std::convert::Into<crate::model::compliance_posture_config::Mode>,
9374    {
9375        self.mode = std::option::Option::Some(v.into());
9376        self
9377    }
9378
9379    /// Sets or clears the value of [mode][crate::model::CompliancePostureConfig::mode].
9380    pub fn set_or_clear_mode<T>(mut self, v: std::option::Option<T>) -> Self
9381    where
9382        T: std::convert::Into<crate::model::compliance_posture_config::Mode>,
9383    {
9384        self.mode = v.map(|x| x.into());
9385        self
9386    }
9387
9388    /// Sets the value of [compliance_standards][crate::model::CompliancePostureConfig::compliance_standards].
9389    pub fn set_compliance_standards<T, V>(mut self, v: T) -> Self
9390    where
9391        T: std::iter::IntoIterator<Item = V>,
9392        V: std::convert::Into<crate::model::compliance_posture_config::ComplianceStandard>,
9393    {
9394        use std::iter::Iterator;
9395        self.compliance_standards = v.into_iter().map(|i| i.into()).collect();
9396        self
9397    }
9398}
9399
9400impl wkt::message::Message for CompliancePostureConfig {
9401    fn typename() -> &'static str {
9402        "type.googleapis.com/google.container.v1.CompliancePostureConfig"
9403    }
9404}
9405
9406/// Defines additional types related to [CompliancePostureConfig].
9407pub mod compliance_posture_config {
9408    #[allow(unused_imports)]
9409    use super::*;
9410
9411    /// Defines the details of a compliance standard.
9412    #[derive(Clone, Default, PartialEq)]
9413    #[non_exhaustive]
9414    pub struct ComplianceStandard {
9415        /// Name of the compliance standard.
9416        pub standard: std::option::Option<std::string::String>,
9417
9418        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9419    }
9420
9421    impl ComplianceStandard {
9422        pub fn new() -> Self {
9423            std::default::Default::default()
9424        }
9425
9426        /// Sets the value of [standard][crate::model::compliance_posture_config::ComplianceStandard::standard].
9427        pub fn set_standard<T>(mut self, v: T) -> Self
9428        where
9429            T: std::convert::Into<std::string::String>,
9430        {
9431            self.standard = std::option::Option::Some(v.into());
9432            self
9433        }
9434
9435        /// Sets or clears the value of [standard][crate::model::compliance_posture_config::ComplianceStandard::standard].
9436        pub fn set_or_clear_standard<T>(mut self, v: std::option::Option<T>) -> Self
9437        where
9438            T: std::convert::Into<std::string::String>,
9439        {
9440            self.standard = v.map(|x| x.into());
9441            self
9442        }
9443    }
9444
9445    impl wkt::message::Message for ComplianceStandard {
9446        fn typename() -> &'static str {
9447            "type.googleapis.com/google.container.v1.CompliancePostureConfig.ComplianceStandard"
9448        }
9449    }
9450
9451    /// Mode defines enablement mode for Compliance Posture.
9452    ///
9453    /// # Working with unknown values
9454    ///
9455    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9456    /// additional enum variants at any time. Adding new variants is not considered
9457    /// a breaking change. Applications should write their code in anticipation of:
9458    ///
9459    /// - New values appearing in future releases of the client library, **and**
9460    /// - New values received dynamically, without application changes.
9461    ///
9462    /// Please consult the [Working with enums] section in the user guide for some
9463    /// guidelines.
9464    ///
9465    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9466    #[derive(Clone, Debug, PartialEq)]
9467    #[non_exhaustive]
9468    pub enum Mode {
9469        /// Default value not specified.
9470        Unspecified,
9471        /// Disables Compliance Posture features on the cluster.
9472        Disabled,
9473        /// Enables Compliance Posture features on the cluster.
9474        Enabled,
9475        /// If set, the enum was initialized with an unknown value.
9476        ///
9477        /// Applications can examine the value using [Mode::value] or
9478        /// [Mode::name].
9479        UnknownValue(mode::UnknownValue),
9480    }
9481
9482    #[doc(hidden)]
9483    pub mod mode {
9484        #[allow(unused_imports)]
9485        use super::*;
9486        #[derive(Clone, Debug, PartialEq)]
9487        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9488    }
9489
9490    impl Mode {
9491        /// Gets the enum value.
9492        ///
9493        /// Returns `None` if the enum contains an unknown value deserialized from
9494        /// the string representation of enums.
9495        pub fn value(&self) -> std::option::Option<i32> {
9496            match self {
9497                Self::Unspecified => std::option::Option::Some(0),
9498                Self::Disabled => std::option::Option::Some(1),
9499                Self::Enabled => std::option::Option::Some(2),
9500                Self::UnknownValue(u) => u.0.value(),
9501            }
9502        }
9503
9504        /// Gets the enum value as a string.
9505        ///
9506        /// Returns `None` if the enum contains an unknown value deserialized from
9507        /// the integer representation of enums.
9508        pub fn name(&self) -> std::option::Option<&str> {
9509            match self {
9510                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
9511                Self::Disabled => std::option::Option::Some("DISABLED"),
9512                Self::Enabled => std::option::Option::Some("ENABLED"),
9513                Self::UnknownValue(u) => u.0.name(),
9514            }
9515        }
9516    }
9517
9518    impl std::default::Default for Mode {
9519        fn default() -> Self {
9520            use std::convert::From;
9521            Self::from(0)
9522        }
9523    }
9524
9525    impl std::fmt::Display for Mode {
9526        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9527            wkt::internal::display_enum(f, self.name(), self.value())
9528        }
9529    }
9530
9531    impl std::convert::From<i32> for Mode {
9532        fn from(value: i32) -> Self {
9533            match value {
9534                0 => Self::Unspecified,
9535                1 => Self::Disabled,
9536                2 => Self::Enabled,
9537                _ => Self::UnknownValue(mode::UnknownValue(
9538                    wkt::internal::UnknownEnumValue::Integer(value),
9539                )),
9540            }
9541        }
9542    }
9543
9544    impl std::convert::From<&str> for Mode {
9545        fn from(value: &str) -> Self {
9546            use std::string::ToString;
9547            match value {
9548                "MODE_UNSPECIFIED" => Self::Unspecified,
9549                "DISABLED" => Self::Disabled,
9550                "ENABLED" => Self::Enabled,
9551                _ => Self::UnknownValue(mode::UnknownValue(
9552                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9553                )),
9554            }
9555        }
9556    }
9557
9558    impl serde::ser::Serialize for Mode {
9559        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9560        where
9561            S: serde::Serializer,
9562        {
9563            match self {
9564                Self::Unspecified => serializer.serialize_i32(0),
9565                Self::Disabled => serializer.serialize_i32(1),
9566                Self::Enabled => serializer.serialize_i32(2),
9567                Self::UnknownValue(u) => u.0.serialize(serializer),
9568            }
9569        }
9570    }
9571
9572    impl<'de> serde::de::Deserialize<'de> for Mode {
9573        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9574        where
9575            D: serde::Deserializer<'de>,
9576        {
9577            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
9578                ".google.container.v1.CompliancePostureConfig.Mode",
9579            ))
9580        }
9581    }
9582}
9583
9584/// K8sBetaAPIConfig , configuration for beta APIs
9585#[derive(Clone, Default, PartialEq)]
9586#[non_exhaustive]
9587pub struct K8sBetaAPIConfig {
9588    /// Enabled k8s beta APIs.
9589    pub enabled_apis: std::vec::Vec<std::string::String>,
9590
9591    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9592}
9593
9594impl K8sBetaAPIConfig {
9595    pub fn new() -> Self {
9596        std::default::Default::default()
9597    }
9598
9599    /// Sets the value of [enabled_apis][crate::model::K8sBetaAPIConfig::enabled_apis].
9600    pub fn set_enabled_apis<T, V>(mut self, v: T) -> Self
9601    where
9602        T: std::iter::IntoIterator<Item = V>,
9603        V: std::convert::Into<std::string::String>,
9604    {
9605        use std::iter::Iterator;
9606        self.enabled_apis = v.into_iter().map(|i| i.into()).collect();
9607        self
9608    }
9609}
9610
9611impl wkt::message::Message for K8sBetaAPIConfig {
9612    fn typename() -> &'static str {
9613        "type.googleapis.com/google.container.v1.K8sBetaAPIConfig"
9614    }
9615}
9616
9617/// SecurityPostureConfig defines the flags needed to enable/disable features for
9618/// the Security Posture API.
9619#[derive(Clone, Default, PartialEq)]
9620#[non_exhaustive]
9621pub struct SecurityPostureConfig {
9622    /// Sets which mode to use for Security Posture features.
9623    pub mode: std::option::Option<crate::model::security_posture_config::Mode>,
9624
9625    /// Sets which mode to use for vulnerability scanning.
9626    pub vulnerability_mode:
9627        std::option::Option<crate::model::security_posture_config::VulnerabilityMode>,
9628
9629    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9630}
9631
9632impl SecurityPostureConfig {
9633    pub fn new() -> Self {
9634        std::default::Default::default()
9635    }
9636
9637    /// Sets the value of [mode][crate::model::SecurityPostureConfig::mode].
9638    pub fn set_mode<T>(mut self, v: T) -> Self
9639    where
9640        T: std::convert::Into<crate::model::security_posture_config::Mode>,
9641    {
9642        self.mode = std::option::Option::Some(v.into());
9643        self
9644    }
9645
9646    /// Sets or clears the value of [mode][crate::model::SecurityPostureConfig::mode].
9647    pub fn set_or_clear_mode<T>(mut self, v: std::option::Option<T>) -> Self
9648    where
9649        T: std::convert::Into<crate::model::security_posture_config::Mode>,
9650    {
9651        self.mode = v.map(|x| x.into());
9652        self
9653    }
9654
9655    /// Sets the value of [vulnerability_mode][crate::model::SecurityPostureConfig::vulnerability_mode].
9656    pub fn set_vulnerability_mode<T>(mut self, v: T) -> Self
9657    where
9658        T: std::convert::Into<crate::model::security_posture_config::VulnerabilityMode>,
9659    {
9660        self.vulnerability_mode = std::option::Option::Some(v.into());
9661        self
9662    }
9663
9664    /// Sets or clears the value of [vulnerability_mode][crate::model::SecurityPostureConfig::vulnerability_mode].
9665    pub fn set_or_clear_vulnerability_mode<T>(mut self, v: std::option::Option<T>) -> Self
9666    where
9667        T: std::convert::Into<crate::model::security_posture_config::VulnerabilityMode>,
9668    {
9669        self.vulnerability_mode = v.map(|x| x.into());
9670        self
9671    }
9672}
9673
9674impl wkt::message::Message for SecurityPostureConfig {
9675    fn typename() -> &'static str {
9676        "type.googleapis.com/google.container.v1.SecurityPostureConfig"
9677    }
9678}
9679
9680/// Defines additional types related to [SecurityPostureConfig].
9681pub mod security_posture_config {
9682    #[allow(unused_imports)]
9683    use super::*;
9684
9685    /// Mode defines enablement mode for GKE Security posture features.
9686    ///
9687    /// # Working with unknown values
9688    ///
9689    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9690    /// additional enum variants at any time. Adding new variants is not considered
9691    /// a breaking change. Applications should write their code in anticipation of:
9692    ///
9693    /// - New values appearing in future releases of the client library, **and**
9694    /// - New values received dynamically, without application changes.
9695    ///
9696    /// Please consult the [Working with enums] section in the user guide for some
9697    /// guidelines.
9698    ///
9699    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9700    #[derive(Clone, Debug, PartialEq)]
9701    #[non_exhaustive]
9702    pub enum Mode {
9703        /// Default value not specified.
9704        Unspecified,
9705        /// Disables Security Posture features on the cluster.
9706        Disabled,
9707        /// Applies Security Posture features on the cluster.
9708        Basic,
9709        /// Applies the Security Posture off cluster Enterprise level features.
9710        Enterprise,
9711        /// If set, the enum was initialized with an unknown value.
9712        ///
9713        /// Applications can examine the value using [Mode::value] or
9714        /// [Mode::name].
9715        UnknownValue(mode::UnknownValue),
9716    }
9717
9718    #[doc(hidden)]
9719    pub mod mode {
9720        #[allow(unused_imports)]
9721        use super::*;
9722        #[derive(Clone, Debug, PartialEq)]
9723        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9724    }
9725
9726    impl Mode {
9727        /// Gets the enum value.
9728        ///
9729        /// Returns `None` if the enum contains an unknown value deserialized from
9730        /// the string representation of enums.
9731        pub fn value(&self) -> std::option::Option<i32> {
9732            match self {
9733                Self::Unspecified => std::option::Option::Some(0),
9734                Self::Disabled => std::option::Option::Some(1),
9735                Self::Basic => std::option::Option::Some(2),
9736                Self::Enterprise => std::option::Option::Some(3),
9737                Self::UnknownValue(u) => u.0.value(),
9738            }
9739        }
9740
9741        /// Gets the enum value as a string.
9742        ///
9743        /// Returns `None` if the enum contains an unknown value deserialized from
9744        /// the integer representation of enums.
9745        pub fn name(&self) -> std::option::Option<&str> {
9746            match self {
9747                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
9748                Self::Disabled => std::option::Option::Some("DISABLED"),
9749                Self::Basic => std::option::Option::Some("BASIC"),
9750                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
9751                Self::UnknownValue(u) => u.0.name(),
9752            }
9753        }
9754    }
9755
9756    impl std::default::Default for Mode {
9757        fn default() -> Self {
9758            use std::convert::From;
9759            Self::from(0)
9760        }
9761    }
9762
9763    impl std::fmt::Display for Mode {
9764        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9765            wkt::internal::display_enum(f, self.name(), self.value())
9766        }
9767    }
9768
9769    impl std::convert::From<i32> for Mode {
9770        fn from(value: i32) -> Self {
9771            match value {
9772                0 => Self::Unspecified,
9773                1 => Self::Disabled,
9774                2 => Self::Basic,
9775                3 => Self::Enterprise,
9776                _ => Self::UnknownValue(mode::UnknownValue(
9777                    wkt::internal::UnknownEnumValue::Integer(value),
9778                )),
9779            }
9780        }
9781    }
9782
9783    impl std::convert::From<&str> for Mode {
9784        fn from(value: &str) -> Self {
9785            use std::string::ToString;
9786            match value {
9787                "MODE_UNSPECIFIED" => Self::Unspecified,
9788                "DISABLED" => Self::Disabled,
9789                "BASIC" => Self::Basic,
9790                "ENTERPRISE" => Self::Enterprise,
9791                _ => Self::UnknownValue(mode::UnknownValue(
9792                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9793                )),
9794            }
9795        }
9796    }
9797
9798    impl serde::ser::Serialize for Mode {
9799        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9800        where
9801            S: serde::Serializer,
9802        {
9803            match self {
9804                Self::Unspecified => serializer.serialize_i32(0),
9805                Self::Disabled => serializer.serialize_i32(1),
9806                Self::Basic => serializer.serialize_i32(2),
9807                Self::Enterprise => serializer.serialize_i32(3),
9808                Self::UnknownValue(u) => u.0.serialize(serializer),
9809            }
9810        }
9811    }
9812
9813    impl<'de> serde::de::Deserialize<'de> for Mode {
9814        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9815        where
9816            D: serde::Deserializer<'de>,
9817        {
9818            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
9819                ".google.container.v1.SecurityPostureConfig.Mode",
9820            ))
9821        }
9822    }
9823
9824    /// VulnerabilityMode defines enablement mode for vulnerability scanning.
9825    ///
9826    /// # Working with unknown values
9827    ///
9828    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9829    /// additional enum variants at any time. Adding new variants is not considered
9830    /// a breaking change. Applications should write their code in anticipation of:
9831    ///
9832    /// - New values appearing in future releases of the client library, **and**
9833    /// - New values received dynamically, without application changes.
9834    ///
9835    /// Please consult the [Working with enums] section in the user guide for some
9836    /// guidelines.
9837    ///
9838    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9839    #[derive(Clone, Debug, PartialEq)]
9840    #[non_exhaustive]
9841    pub enum VulnerabilityMode {
9842        /// Default value not specified.
9843        Unspecified,
9844        /// Disables vulnerability scanning on the cluster.
9845        VulnerabilityDisabled,
9846        /// Applies basic vulnerability scanning on the cluster.
9847        VulnerabilityBasic,
9848        /// Applies the Security Posture's vulnerability on cluster Enterprise level
9849        /// features.
9850        VulnerabilityEnterprise,
9851        /// If set, the enum was initialized with an unknown value.
9852        ///
9853        /// Applications can examine the value using [VulnerabilityMode::value] or
9854        /// [VulnerabilityMode::name].
9855        UnknownValue(vulnerability_mode::UnknownValue),
9856    }
9857
9858    #[doc(hidden)]
9859    pub mod vulnerability_mode {
9860        #[allow(unused_imports)]
9861        use super::*;
9862        #[derive(Clone, Debug, PartialEq)]
9863        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9864    }
9865
9866    impl VulnerabilityMode {
9867        /// Gets the enum value.
9868        ///
9869        /// Returns `None` if the enum contains an unknown value deserialized from
9870        /// the string representation of enums.
9871        pub fn value(&self) -> std::option::Option<i32> {
9872            match self {
9873                Self::Unspecified => std::option::Option::Some(0),
9874                Self::VulnerabilityDisabled => std::option::Option::Some(1),
9875                Self::VulnerabilityBasic => std::option::Option::Some(2),
9876                Self::VulnerabilityEnterprise => std::option::Option::Some(3),
9877                Self::UnknownValue(u) => u.0.value(),
9878            }
9879        }
9880
9881        /// Gets the enum value as a string.
9882        ///
9883        /// Returns `None` if the enum contains an unknown value deserialized from
9884        /// the integer representation of enums.
9885        pub fn name(&self) -> std::option::Option<&str> {
9886            match self {
9887                Self::Unspecified => std::option::Option::Some("VULNERABILITY_MODE_UNSPECIFIED"),
9888                Self::VulnerabilityDisabled => std::option::Option::Some("VULNERABILITY_DISABLED"),
9889                Self::VulnerabilityBasic => std::option::Option::Some("VULNERABILITY_BASIC"),
9890                Self::VulnerabilityEnterprise => {
9891                    std::option::Option::Some("VULNERABILITY_ENTERPRISE")
9892                }
9893                Self::UnknownValue(u) => u.0.name(),
9894            }
9895        }
9896    }
9897
9898    impl std::default::Default for VulnerabilityMode {
9899        fn default() -> Self {
9900            use std::convert::From;
9901            Self::from(0)
9902        }
9903    }
9904
9905    impl std::fmt::Display for VulnerabilityMode {
9906        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9907            wkt::internal::display_enum(f, self.name(), self.value())
9908        }
9909    }
9910
9911    impl std::convert::From<i32> for VulnerabilityMode {
9912        fn from(value: i32) -> Self {
9913            match value {
9914                0 => Self::Unspecified,
9915                1 => Self::VulnerabilityDisabled,
9916                2 => Self::VulnerabilityBasic,
9917                3 => Self::VulnerabilityEnterprise,
9918                _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
9919                    wkt::internal::UnknownEnumValue::Integer(value),
9920                )),
9921            }
9922        }
9923    }
9924
9925    impl std::convert::From<&str> for VulnerabilityMode {
9926        fn from(value: &str) -> Self {
9927            use std::string::ToString;
9928            match value {
9929                "VULNERABILITY_MODE_UNSPECIFIED" => Self::Unspecified,
9930                "VULNERABILITY_DISABLED" => Self::VulnerabilityDisabled,
9931                "VULNERABILITY_BASIC" => Self::VulnerabilityBasic,
9932                "VULNERABILITY_ENTERPRISE" => Self::VulnerabilityEnterprise,
9933                _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
9934                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9935                )),
9936            }
9937        }
9938    }
9939
9940    impl serde::ser::Serialize for VulnerabilityMode {
9941        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9942        where
9943            S: serde::Serializer,
9944        {
9945            match self {
9946                Self::Unspecified => serializer.serialize_i32(0),
9947                Self::VulnerabilityDisabled => serializer.serialize_i32(1),
9948                Self::VulnerabilityBasic => serializer.serialize_i32(2),
9949                Self::VulnerabilityEnterprise => serializer.serialize_i32(3),
9950                Self::UnknownValue(u) => u.0.serialize(serializer),
9951            }
9952        }
9953    }
9954
9955    impl<'de> serde::de::Deserialize<'de> for VulnerabilityMode {
9956        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9957        where
9958            D: serde::Deserializer<'de>,
9959        {
9960            deserializer.deserialize_any(wkt::internal::EnumVisitor::<VulnerabilityMode>::new(
9961                ".google.container.v1.SecurityPostureConfig.VulnerabilityMode",
9962            ))
9963        }
9964    }
9965}
9966
9967/// Node pool configs that apply to all auto-provisioned node pools
9968/// in autopilot clusters and node auto-provisioning enabled clusters.
9969#[derive(Clone, Default, PartialEq)]
9970#[non_exhaustive]
9971pub struct NodePoolAutoConfig {
9972    /// The list of instance tags applied to all nodes. Tags are used to identify
9973    /// valid sources or targets for network firewalls and are specified by
9974    /// the client during cluster creation. Each tag within the list
9975    /// must comply with RFC1035.
9976    pub network_tags: std::option::Option<crate::model::NetworkTags>,
9977
9978    /// Resource manager tag keys and values to be attached to the nodes
9979    /// for managing Compute Engine firewalls using Network Firewall Policies.
9980    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
9981
9982    /// NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
9983    ///
9984    /// Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
9985    pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
9986
9987    /// Output only. Configuration options for Linux nodes.
9988    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
9989
9990    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9991}
9992
9993impl NodePoolAutoConfig {
9994    pub fn new() -> Self {
9995        std::default::Default::default()
9996    }
9997
9998    /// Sets the value of [network_tags][crate::model::NodePoolAutoConfig::network_tags].
9999    pub fn set_network_tags<T>(mut self, v: T) -> Self
10000    where
10001        T: std::convert::Into<crate::model::NetworkTags>,
10002    {
10003        self.network_tags = std::option::Option::Some(v.into());
10004        self
10005    }
10006
10007    /// Sets or clears the value of [network_tags][crate::model::NodePoolAutoConfig::network_tags].
10008    pub fn set_or_clear_network_tags<T>(mut self, v: std::option::Option<T>) -> Self
10009    where
10010        T: std::convert::Into<crate::model::NetworkTags>,
10011    {
10012        self.network_tags = v.map(|x| x.into());
10013        self
10014    }
10015
10016    /// Sets the value of [resource_manager_tags][crate::model::NodePoolAutoConfig::resource_manager_tags].
10017    pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
10018    where
10019        T: std::convert::Into<crate::model::ResourceManagerTags>,
10020    {
10021        self.resource_manager_tags = std::option::Option::Some(v.into());
10022        self
10023    }
10024
10025    /// Sets or clears the value of [resource_manager_tags][crate::model::NodePoolAutoConfig::resource_manager_tags].
10026    pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
10027    where
10028        T: std::convert::Into<crate::model::ResourceManagerTags>,
10029    {
10030        self.resource_manager_tags = v.map(|x| x.into());
10031        self
10032    }
10033
10034    /// Sets the value of [node_kubelet_config][crate::model::NodePoolAutoConfig::node_kubelet_config].
10035    pub fn set_node_kubelet_config<T>(mut self, v: T) -> Self
10036    where
10037        T: std::convert::Into<crate::model::NodeKubeletConfig>,
10038    {
10039        self.node_kubelet_config = std::option::Option::Some(v.into());
10040        self
10041    }
10042
10043    /// Sets or clears the value of [node_kubelet_config][crate::model::NodePoolAutoConfig::node_kubelet_config].
10044    pub fn set_or_clear_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
10045    where
10046        T: std::convert::Into<crate::model::NodeKubeletConfig>,
10047    {
10048        self.node_kubelet_config = v.map(|x| x.into());
10049        self
10050    }
10051
10052    /// Sets the value of [linux_node_config][crate::model::NodePoolAutoConfig::linux_node_config].
10053    pub fn set_linux_node_config<T>(mut self, v: T) -> Self
10054    where
10055        T: std::convert::Into<crate::model::LinuxNodeConfig>,
10056    {
10057        self.linux_node_config = std::option::Option::Some(v.into());
10058        self
10059    }
10060
10061    /// Sets or clears the value of [linux_node_config][crate::model::NodePoolAutoConfig::linux_node_config].
10062    pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
10063    where
10064        T: std::convert::Into<crate::model::LinuxNodeConfig>,
10065    {
10066        self.linux_node_config = v.map(|x| x.into());
10067        self
10068    }
10069}
10070
10071impl wkt::message::Message for NodePoolAutoConfig {
10072    fn typename() -> &'static str {
10073        "type.googleapis.com/google.container.v1.NodePoolAutoConfig"
10074    }
10075}
10076
10077/// Subset of Nodepool message that has defaults.
10078#[derive(Clone, Default, PartialEq)]
10079#[non_exhaustive]
10080pub struct NodePoolDefaults {
10081    /// Subset of NodeConfig message that has defaults.
10082    pub node_config_defaults: std::option::Option<crate::model::NodeConfigDefaults>,
10083
10084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10085}
10086
10087impl NodePoolDefaults {
10088    pub fn new() -> Self {
10089        std::default::Default::default()
10090    }
10091
10092    /// Sets the value of [node_config_defaults][crate::model::NodePoolDefaults::node_config_defaults].
10093    pub fn set_node_config_defaults<T>(mut self, v: T) -> Self
10094    where
10095        T: std::convert::Into<crate::model::NodeConfigDefaults>,
10096    {
10097        self.node_config_defaults = std::option::Option::Some(v.into());
10098        self
10099    }
10100
10101    /// Sets or clears the value of [node_config_defaults][crate::model::NodePoolDefaults::node_config_defaults].
10102    pub fn set_or_clear_node_config_defaults<T>(mut self, v: std::option::Option<T>) -> Self
10103    where
10104        T: std::convert::Into<crate::model::NodeConfigDefaults>,
10105    {
10106        self.node_config_defaults = v.map(|x| x.into());
10107        self
10108    }
10109}
10110
10111impl wkt::message::Message for NodePoolDefaults {
10112    fn typename() -> &'static str {
10113        "type.googleapis.com/google.container.v1.NodePoolDefaults"
10114    }
10115}
10116
10117/// Subset of NodeConfig message that has defaults.
10118#[derive(Clone, Default, PartialEq)]
10119#[non_exhaustive]
10120pub struct NodeConfigDefaults {
10121    /// GCFS (Google Container File System, also known as Riptide) options.
10122    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10123
10124    /// Logging configuration for node pools.
10125    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10126
10127    /// Parameters for containerd customization.
10128    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10129
10130    /// NodeKubeletConfig controls the defaults for new node-pools.
10131    ///
10132    /// Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
10133    pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10134
10135    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10136}
10137
10138impl NodeConfigDefaults {
10139    pub fn new() -> Self {
10140        std::default::Default::default()
10141    }
10142
10143    /// Sets the value of [gcfs_config][crate::model::NodeConfigDefaults::gcfs_config].
10144    pub fn set_gcfs_config<T>(mut self, v: T) -> Self
10145    where
10146        T: std::convert::Into<crate::model::GcfsConfig>,
10147    {
10148        self.gcfs_config = std::option::Option::Some(v.into());
10149        self
10150    }
10151
10152    /// Sets or clears the value of [gcfs_config][crate::model::NodeConfigDefaults::gcfs_config].
10153    pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
10154    where
10155        T: std::convert::Into<crate::model::GcfsConfig>,
10156    {
10157        self.gcfs_config = v.map(|x| x.into());
10158        self
10159    }
10160
10161    /// Sets the value of [logging_config][crate::model::NodeConfigDefaults::logging_config].
10162    pub fn set_logging_config<T>(mut self, v: T) -> Self
10163    where
10164        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
10165    {
10166        self.logging_config = std::option::Option::Some(v.into());
10167        self
10168    }
10169
10170    /// Sets or clears the value of [logging_config][crate::model::NodeConfigDefaults::logging_config].
10171    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
10172    where
10173        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
10174    {
10175        self.logging_config = v.map(|x| x.into());
10176        self
10177    }
10178
10179    /// Sets the value of [containerd_config][crate::model::NodeConfigDefaults::containerd_config].
10180    pub fn set_containerd_config<T>(mut self, v: T) -> Self
10181    where
10182        T: std::convert::Into<crate::model::ContainerdConfig>,
10183    {
10184        self.containerd_config = std::option::Option::Some(v.into());
10185        self
10186    }
10187
10188    /// Sets or clears the value of [containerd_config][crate::model::NodeConfigDefaults::containerd_config].
10189    pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
10190    where
10191        T: std::convert::Into<crate::model::ContainerdConfig>,
10192    {
10193        self.containerd_config = v.map(|x| x.into());
10194        self
10195    }
10196
10197    /// Sets the value of [node_kubelet_config][crate::model::NodeConfigDefaults::node_kubelet_config].
10198    pub fn set_node_kubelet_config<T>(mut self, v: T) -> Self
10199    where
10200        T: std::convert::Into<crate::model::NodeKubeletConfig>,
10201    {
10202        self.node_kubelet_config = std::option::Option::Some(v.into());
10203        self
10204    }
10205
10206    /// Sets or clears the value of [node_kubelet_config][crate::model::NodeConfigDefaults::node_kubelet_config].
10207    pub fn set_or_clear_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
10208    where
10209        T: std::convert::Into<crate::model::NodeKubeletConfig>,
10210    {
10211        self.node_kubelet_config = v.map(|x| x.into());
10212        self
10213    }
10214}
10215
10216impl wkt::message::Message for NodeConfigDefaults {
10217    fn typename() -> &'static str {
10218        "type.googleapis.com/google.container.v1.NodeConfigDefaults"
10219    }
10220}
10221
10222/// ClusterUpdate describes an update to the cluster. Exactly one update can
10223/// be applied to a cluster with each request, so at most one field can be
10224/// provided.
10225#[derive(Clone, Default, PartialEq)]
10226#[non_exhaustive]
10227pub struct ClusterUpdate {
10228    /// The Kubernetes version to change the nodes to (typically an
10229    /// upgrade).
10230    ///
10231    /// Users may specify either explicit versions offered by
10232    /// Kubernetes Engine or version aliases, which have the following behavior:
10233    ///
10234    /// - "latest": picks the highest valid Kubernetes version
10235    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
10236    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
10237    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
10238    /// - "-": picks the Kubernetes master version
10239    pub desired_node_version: std::string::String,
10240
10241    /// The monitoring service the cluster should use to write metrics.
10242    /// Currently available options:
10243    ///
10244    /// * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring
10245    ///   service with a Kubernetes-native resource model
10246    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
10247    ///   longer available as of GKE 1.15).
10248    /// * `none` - No metrics will be exported from the cluster.
10249    ///
10250    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
10251    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
10252    pub desired_monitoring_service: std::string::String,
10253
10254    /// Configurations for the various addons available to run in the cluster.
10255    pub desired_addons_config: std::option::Option<crate::model::AddonsConfig>,
10256
10257    /// The node pool to be upgraded. This field is mandatory if
10258    /// "desired_node_version", "desired_image_family" or
10259    /// "desired_node_pool_autoscaling" is specified and there is more than one
10260    /// node pool on the cluster.
10261    pub desired_node_pool_id: std::string::String,
10262
10263    /// The desired image type for the node pool.
10264    /// NOTE: Set the "desired_node_pool" field as well.
10265    pub desired_image_type: std::string::String,
10266
10267    /// Configuration of etcd encryption.
10268    pub desired_database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
10269
10270    /// Configuration for Workload Identity.
10271    pub desired_workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
10272
10273    /// Configuration for issuance of mTLS keys and certificates to Kubernetes
10274    /// pods.
10275    pub desired_mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
10276
10277    /// Configuration for Shielded Nodes.
10278    pub desired_shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
10279
10280    /// The desired configuration for the fine-grained cost management feature.
10281    pub desired_cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
10282
10283    /// DNSConfig contains clusterDNS config for this cluster.
10284    pub desired_dns_config: std::option::Option<crate::model::DNSConfig>,
10285
10286    /// Autoscaler configuration for the node pool specified in
10287    /// desired_node_pool_id. If there is only one pool in the
10288    /// cluster and desired_node_pool_id is not provided then
10289    /// the change applies to that single node pool.
10290    pub desired_node_pool_autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
10291
10292    /// The desired list of Google Compute Engine
10293    /// [zones](https://cloud.google.com/compute/docs/zones#available)
10294    /// in which the cluster's nodes should be located.
10295    ///
10296    /// This list must always include the cluster's primary zone.
10297    ///
10298    /// Warning: changing cluster locations will update the locations of all node
10299    /// pools and will result in nodes being added and/or removed.
10300    pub desired_locations: std::vec::Vec<std::string::String>,
10301
10302    /// The desired configuration options for master authorized networks feature.
10303    ///
10304    /// Deprecated: Use
10305    /// desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config
10306    /// instead.
10307    #[deprecated]
10308    pub desired_master_authorized_networks_config:
10309        std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
10310
10311    /// Cluster-level autoscaling configuration.
10312    pub desired_cluster_autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
10313
10314    /// The desired configuration options for the Binary Authorization feature.
10315    pub desired_binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
10316
10317    /// The logging service the cluster should use to write logs.
10318    /// Currently available options:
10319    ///
10320    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
10321    ///   service with a Kubernetes-native resource model
10322    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
10323    ///   available as of GKE 1.15).
10324    /// * `none` - no logs will be exported from the cluster.
10325    ///
10326    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
10327    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
10328    pub desired_logging_service: std::string::String,
10329
10330    /// The desired configuration for exporting resource usage.
10331    pub desired_resource_usage_export_config:
10332        std::option::Option<crate::model::ResourceUsageExportConfig>,
10333
10334    /// Cluster-level Vertical Pod Autoscaling configuration.
10335    pub desired_vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
10336
10337    /// The desired private cluster configuration. master_global_access_config is
10338    /// the only field that can be changed via this field.
10339    /// See also
10340    /// [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
10341    /// for modifying other fields within
10342    /// [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
10343    ///
10344    /// Deprecated: Use
10345    /// desired_control_plane_endpoints_config.ip_endpoints_config.global_access
10346    /// instead.
10347    ///
10348    /// [google.container.v1.ClusterUpdate.desired_enable_private_endpoint]: crate::model::ClusterUpdate::desired_enable_private_endpoint
10349    /// [google.container.v1.PrivateClusterConfig]: crate::model::PrivateClusterConfig
10350    #[deprecated]
10351    pub desired_private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
10352
10353    /// The desired config of Intra-node visibility.
10354    pub desired_intra_node_visibility_config:
10355        std::option::Option<crate::model::IntraNodeVisibilityConfig>,
10356
10357    /// The desired status of whether to disable default sNAT for this cluster.
10358    pub desired_default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
10359
10360    /// The desired release channel configuration.
10361    pub desired_release_channel: std::option::Option<crate::model::ReleaseChannel>,
10362
10363    /// The desired L4 Internal Load Balancer Subsetting configuration.
10364    pub desired_l4ilb_subsetting_config: std::option::Option<crate::model::ILBSubsettingConfig>,
10365
10366    /// The desired datapath provider for the cluster.
10367    pub desired_datapath_provider: crate::model::DatapathProvider,
10368
10369    /// The desired state of IPv6 connectivity to Google Services.
10370    pub desired_private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
10371
10372    /// The desired notification configuration.
10373    pub desired_notification_config: std::option::Option<crate::model::NotificationConfig>,
10374
10375    /// The desired authenticator groups config for the cluster.
10376    pub desired_authenticator_groups_config:
10377        std::option::Option<crate::model::AuthenticatorGroupsConfig>,
10378
10379    /// The desired logging configuration.
10380    pub desired_logging_config: std::option::Option<crate::model::LoggingConfig>,
10381
10382    /// The desired monitoring configuration.
10383    pub desired_monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
10384
10385    /// The desired Identity Service component configuration.
10386    pub desired_identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
10387
10388    /// ServiceExternalIPsConfig specifies the config for the use of Services with
10389    /// ExternalIPs field.
10390    pub desired_service_external_ips_config:
10391        std::option::Option<crate::model::ServiceExternalIPsConfig>,
10392
10393    /// Enable/Disable private endpoint for the cluster's master.
10394    ///
10395    /// Deprecated: Use
10396    /// desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint
10397    /// instead. Note that the value of enable_public_endpoint is reversed: if
10398    /// enable_private_endpoint is false, then enable_public_endpoint will be true.
10399    #[deprecated]
10400    pub desired_enable_private_endpoint: std::option::Option<bool>,
10401
10402    /// Override the default setting of whether future created
10403    /// nodes have private IP addresses only, namely
10404    /// [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes]
10405    ///
10406    /// [google.container.v1.NetworkConfig.default_enable_private_nodes]: crate::model::NetworkConfig::default_enable_private_nodes
10407    pub desired_default_enable_private_nodes: std::option::Option<bool>,
10408
10409    /// [Control plane
10410    /// endpoints][google.container.v1.Cluster.control_plane_endpoints_config]
10411    /// configuration.
10412    ///
10413    /// [google.container.v1.Cluster.control_plane_endpoints_config]: crate::model::Cluster::control_plane_endpoints_config
10414    pub desired_control_plane_endpoints_config:
10415        std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
10416
10417    /// The Kubernetes version to change the master to.
10418    ///
10419    /// Users may specify either explicit versions offered by
10420    /// Kubernetes Engine or version aliases, which have the following behavior:
10421    ///
10422    /// - "latest": picks the highest valid Kubernetes version
10423    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
10424    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
10425    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
10426    /// - "-": picks the default Kubernetes version
10427    pub desired_master_version: std::string::String,
10428
10429    /// The desired GCFS config for the cluster
10430    pub desired_gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10431
10432    /// The desired network tags that apply to all auto-provisioned node pools
10433    /// in autopilot clusters and node auto-provisioning enabled clusters.
10434    pub desired_node_pool_auto_config_network_tags: std::option::Option<crate::model::NetworkTags>,
10435
10436    /// The desired config for pod autoscaling.
10437    pub desired_pod_autoscaling: std::option::Option<crate::model::PodAutoscaling>,
10438
10439    /// The desired config of Gateway API on this cluster.
10440    pub desired_gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
10441
10442    /// The current etag of the cluster.
10443    /// If an etag is provided and does not match the current etag of the cluster,
10444    /// update will be blocked and an ABORTED error will be returned.
10445    pub etag: std::string::String,
10446
10447    /// The desired node pool logging configuration defaults for the cluster.
10448    pub desired_node_pool_logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10449
10450    /// The desired fleet configuration for the cluster.
10451    pub desired_fleet: std::option::Option<crate::model::Fleet>,
10452
10453    /// The desired stack type of the cluster.
10454    /// If a stack type is provided and does not match the current stack type of
10455    /// the cluster, update will attempt to change the stack type to the new type.
10456    pub desired_stack_type: crate::model::StackType,
10457
10458    /// The additional pod ranges to be added to the cluster. These pod ranges
10459    /// can be used by node pools to allocate pod IPs.
10460    pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
10461
10462    /// The additional pod ranges that are to be removed from the cluster.
10463    /// The pod ranges specified here must have been specified earlier in the
10464    /// 'additional_pod_ranges_config' argument.
10465    pub removed_additional_pod_ranges_config:
10466        std::option::Option<crate::model::AdditionalPodRangesConfig>,
10467
10468    /// Kubernetes open source beta apis enabled on the cluster. Only beta apis
10469    pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
10470
10471    /// Enable/Disable Security Posture API features for the cluster.
10472    pub desired_security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
10473
10474    /// The desired network performance config.
10475    pub desired_network_performance_config:
10476        std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
10477
10478    /// Enable/Disable FQDN Network Policy for the cluster.
10479    pub desired_enable_fqdn_network_policy: std::option::Option<bool>,
10480
10481    /// WorkloadPolicyConfig is the configuration related to GCW workload policy
10482    pub desired_autopilot_workload_policy_config:
10483        std::option::Option<crate::model::WorkloadPolicyConfig>,
10484
10485    /// Desired Beta APIs to be enabled for cluster.
10486    pub desired_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
10487
10488    /// The desired containerd config for the cluster.
10489    pub desired_containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10490
10491    /// Enable/Disable Multi-Networking for the cluster
10492    pub desired_enable_multi_networking: std::option::Option<bool>,
10493
10494    /// The desired resource manager tags that apply to all auto-provisioned node
10495    /// pools in autopilot clusters and node auto-provisioning enabled clusters.
10496    pub desired_node_pool_auto_config_resource_manager_tags:
10497        std::option::Option<crate::model::ResourceManagerTags>,
10498
10499    /// Specify the details of in-transit encryption.
10500    pub desired_in_transit_encryption_config:
10501        std::option::Option<crate::model::InTransitEncryptionConfig>,
10502
10503    /// Enable/Disable Cilium Clusterwide Network Policy for the cluster.
10504    pub desired_enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
10505
10506    /// Enable/Disable Secret Manager Config.
10507    pub desired_secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
10508
10509    /// Enable/Disable Compliance Posture features for the cluster.
10510    pub desired_compliance_posture_config:
10511        std::option::Option<crate::model::CompliancePostureConfig>,
10512
10513    /// The desired node kubelet config for the cluster.
10514    pub desired_node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10515
10516    /// The desired node kubelet config for all auto-provisioned node pools
10517    /// in autopilot clusters and node auto-provisioning enabled clusters.
10518    pub desired_node_pool_auto_config_kubelet_config:
10519        std::option::Option<crate::model::NodeKubeletConfig>,
10520
10521    /// The Custom keys configuration for the cluster.
10522    ///
10523    /// This field is deprecated.
10524    /// Use
10525    /// [ClusterUpdate.desired_user_managed_keys_config][google.container.v1.ClusterUpdate.desired_user_managed_keys_config]
10526    /// instead.
10527    ///
10528    /// [google.container.v1.ClusterUpdate.desired_user_managed_keys_config]: crate::model::ClusterUpdate::desired_user_managed_keys_config
10529    #[deprecated]
10530    pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
10531
10532    /// RBACBindingConfig allows user to restrict ClusterRoleBindings an
10533    /// RoleBindings that can be created.
10534    pub desired_rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
10535
10536    /// The desired config for additional subnetworks attached to the cluster.
10537    pub desired_additional_ip_ranges_config:
10538        std::option::Option<crate::model::DesiredAdditionalIPRangesConfig>,
10539
10540    /// The desired enterprise configuration for the cluster.
10541    pub desired_enterprise_config: std::option::Option<crate::model::DesiredEnterpriseConfig>,
10542
10543    /// AutoIpamConfig contains all information related to Auto IPAM
10544    pub desired_auto_ipam_config: std::option::Option<crate::model::AutoIpamConfig>,
10545
10546    /// Enable/Disable L4 LB VPC firewall reconciliation for the cluster.
10547    pub desired_disable_l4_lb_firewall_reconciliation: std::option::Option<bool>,
10548
10549    /// The desired Linux node config for all auto-provisioned node pools
10550    /// in autopilot clusters and node auto-provisioning enabled clusters.
10551    ///
10552    /// Currently only `cgroup_mode` can be set here.
10553    pub desired_node_pool_auto_config_linux_node_config:
10554        std::option::Option<crate::model::LinuxNodeConfig>,
10555
10556    /// The desired user managed keys config for the cluster.
10557    pub desired_user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
10558
10559    /// Configuration for limiting anonymous access to all endpoints except the
10560    /// health checks.
10561    pub desired_anonymous_authentication_config:
10562        std::option::Option<crate::model::AnonymousAuthenticationConfig>,
10563
10564    /// Configuration for GKE auto upgrade.
10565    pub gke_auto_upgrade_config: std::option::Option<crate::model::GkeAutoUpgradeConfig>,
10566
10567    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10568}
10569
10570impl ClusterUpdate {
10571    pub fn new() -> Self {
10572        std::default::Default::default()
10573    }
10574
10575    /// Sets the value of [desired_node_version][crate::model::ClusterUpdate::desired_node_version].
10576    pub fn set_desired_node_version<T: std::convert::Into<std::string::String>>(
10577        mut self,
10578        v: T,
10579    ) -> Self {
10580        self.desired_node_version = v.into();
10581        self
10582    }
10583
10584    /// Sets the value of [desired_monitoring_service][crate::model::ClusterUpdate::desired_monitoring_service].
10585    pub fn set_desired_monitoring_service<T: std::convert::Into<std::string::String>>(
10586        mut self,
10587        v: T,
10588    ) -> Self {
10589        self.desired_monitoring_service = v.into();
10590        self
10591    }
10592
10593    /// Sets the value of [desired_addons_config][crate::model::ClusterUpdate::desired_addons_config].
10594    pub fn set_desired_addons_config<T>(mut self, v: T) -> Self
10595    where
10596        T: std::convert::Into<crate::model::AddonsConfig>,
10597    {
10598        self.desired_addons_config = std::option::Option::Some(v.into());
10599        self
10600    }
10601
10602    /// Sets or clears the value of [desired_addons_config][crate::model::ClusterUpdate::desired_addons_config].
10603    pub fn set_or_clear_desired_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
10604    where
10605        T: std::convert::Into<crate::model::AddonsConfig>,
10606    {
10607        self.desired_addons_config = v.map(|x| x.into());
10608        self
10609    }
10610
10611    /// Sets the value of [desired_node_pool_id][crate::model::ClusterUpdate::desired_node_pool_id].
10612    pub fn set_desired_node_pool_id<T: std::convert::Into<std::string::String>>(
10613        mut self,
10614        v: T,
10615    ) -> Self {
10616        self.desired_node_pool_id = v.into();
10617        self
10618    }
10619
10620    /// Sets the value of [desired_image_type][crate::model::ClusterUpdate::desired_image_type].
10621    pub fn set_desired_image_type<T: std::convert::Into<std::string::String>>(
10622        mut self,
10623        v: T,
10624    ) -> Self {
10625        self.desired_image_type = v.into();
10626        self
10627    }
10628
10629    /// Sets the value of [desired_database_encryption][crate::model::ClusterUpdate::desired_database_encryption].
10630    pub fn set_desired_database_encryption<T>(mut self, v: T) -> Self
10631    where
10632        T: std::convert::Into<crate::model::DatabaseEncryption>,
10633    {
10634        self.desired_database_encryption = std::option::Option::Some(v.into());
10635        self
10636    }
10637
10638    /// Sets or clears the value of [desired_database_encryption][crate::model::ClusterUpdate::desired_database_encryption].
10639    pub fn set_or_clear_desired_database_encryption<T>(mut self, v: std::option::Option<T>) -> Self
10640    where
10641        T: std::convert::Into<crate::model::DatabaseEncryption>,
10642    {
10643        self.desired_database_encryption = v.map(|x| x.into());
10644        self
10645    }
10646
10647    /// Sets the value of [desired_workload_identity_config][crate::model::ClusterUpdate::desired_workload_identity_config].
10648    pub fn set_desired_workload_identity_config<T>(mut self, v: T) -> Self
10649    where
10650        T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
10651    {
10652        self.desired_workload_identity_config = std::option::Option::Some(v.into());
10653        self
10654    }
10655
10656    /// Sets or clears the value of [desired_workload_identity_config][crate::model::ClusterUpdate::desired_workload_identity_config].
10657    pub fn set_or_clear_desired_workload_identity_config<T>(
10658        mut self,
10659        v: std::option::Option<T>,
10660    ) -> Self
10661    where
10662        T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
10663    {
10664        self.desired_workload_identity_config = v.map(|x| x.into());
10665        self
10666    }
10667
10668    /// Sets the value of [desired_mesh_certificates][crate::model::ClusterUpdate::desired_mesh_certificates].
10669    pub fn set_desired_mesh_certificates<T>(mut self, v: T) -> Self
10670    where
10671        T: std::convert::Into<crate::model::MeshCertificates>,
10672    {
10673        self.desired_mesh_certificates = std::option::Option::Some(v.into());
10674        self
10675    }
10676
10677    /// Sets or clears the value of [desired_mesh_certificates][crate::model::ClusterUpdate::desired_mesh_certificates].
10678    pub fn set_or_clear_desired_mesh_certificates<T>(mut self, v: std::option::Option<T>) -> Self
10679    where
10680        T: std::convert::Into<crate::model::MeshCertificates>,
10681    {
10682        self.desired_mesh_certificates = v.map(|x| x.into());
10683        self
10684    }
10685
10686    /// Sets the value of [desired_shielded_nodes][crate::model::ClusterUpdate::desired_shielded_nodes].
10687    pub fn set_desired_shielded_nodes<T>(mut self, v: T) -> Self
10688    where
10689        T: std::convert::Into<crate::model::ShieldedNodes>,
10690    {
10691        self.desired_shielded_nodes = std::option::Option::Some(v.into());
10692        self
10693    }
10694
10695    /// Sets or clears the value of [desired_shielded_nodes][crate::model::ClusterUpdate::desired_shielded_nodes].
10696    pub fn set_or_clear_desired_shielded_nodes<T>(mut self, v: std::option::Option<T>) -> Self
10697    where
10698        T: std::convert::Into<crate::model::ShieldedNodes>,
10699    {
10700        self.desired_shielded_nodes = v.map(|x| x.into());
10701        self
10702    }
10703
10704    /// Sets the value of [desired_cost_management_config][crate::model::ClusterUpdate::desired_cost_management_config].
10705    pub fn set_desired_cost_management_config<T>(mut self, v: T) -> Self
10706    where
10707        T: std::convert::Into<crate::model::CostManagementConfig>,
10708    {
10709        self.desired_cost_management_config = std::option::Option::Some(v.into());
10710        self
10711    }
10712
10713    /// Sets or clears the value of [desired_cost_management_config][crate::model::ClusterUpdate::desired_cost_management_config].
10714    pub fn set_or_clear_desired_cost_management_config<T>(
10715        mut self,
10716        v: std::option::Option<T>,
10717    ) -> Self
10718    where
10719        T: std::convert::Into<crate::model::CostManagementConfig>,
10720    {
10721        self.desired_cost_management_config = v.map(|x| x.into());
10722        self
10723    }
10724
10725    /// Sets the value of [desired_dns_config][crate::model::ClusterUpdate::desired_dns_config].
10726    pub fn set_desired_dns_config<T>(mut self, v: T) -> Self
10727    where
10728        T: std::convert::Into<crate::model::DNSConfig>,
10729    {
10730        self.desired_dns_config = std::option::Option::Some(v.into());
10731        self
10732    }
10733
10734    /// Sets or clears the value of [desired_dns_config][crate::model::ClusterUpdate::desired_dns_config].
10735    pub fn set_or_clear_desired_dns_config<T>(mut self, v: std::option::Option<T>) -> Self
10736    where
10737        T: std::convert::Into<crate::model::DNSConfig>,
10738    {
10739        self.desired_dns_config = v.map(|x| x.into());
10740        self
10741    }
10742
10743    /// Sets the value of [desired_node_pool_autoscaling][crate::model::ClusterUpdate::desired_node_pool_autoscaling].
10744    pub fn set_desired_node_pool_autoscaling<T>(mut self, v: T) -> Self
10745    where
10746        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
10747    {
10748        self.desired_node_pool_autoscaling = std::option::Option::Some(v.into());
10749        self
10750    }
10751
10752    /// Sets or clears the value of [desired_node_pool_autoscaling][crate::model::ClusterUpdate::desired_node_pool_autoscaling].
10753    pub fn set_or_clear_desired_node_pool_autoscaling<T>(
10754        mut self,
10755        v: std::option::Option<T>,
10756    ) -> Self
10757    where
10758        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
10759    {
10760        self.desired_node_pool_autoscaling = v.map(|x| x.into());
10761        self
10762    }
10763
10764    /// Sets the value of [desired_locations][crate::model::ClusterUpdate::desired_locations].
10765    pub fn set_desired_locations<T, V>(mut self, v: T) -> Self
10766    where
10767        T: std::iter::IntoIterator<Item = V>,
10768        V: std::convert::Into<std::string::String>,
10769    {
10770        use std::iter::Iterator;
10771        self.desired_locations = v.into_iter().map(|i| i.into()).collect();
10772        self
10773    }
10774
10775    /// Sets the value of [desired_master_authorized_networks_config][crate::model::ClusterUpdate::desired_master_authorized_networks_config].
10776    #[deprecated]
10777    pub fn set_desired_master_authorized_networks_config<T>(mut self, v: T) -> Self
10778    where
10779        T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
10780    {
10781        self.desired_master_authorized_networks_config = std::option::Option::Some(v.into());
10782        self
10783    }
10784
10785    /// Sets or clears the value of [desired_master_authorized_networks_config][crate::model::ClusterUpdate::desired_master_authorized_networks_config].
10786    #[deprecated]
10787    pub fn set_or_clear_desired_master_authorized_networks_config<T>(
10788        mut self,
10789        v: std::option::Option<T>,
10790    ) -> Self
10791    where
10792        T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
10793    {
10794        self.desired_master_authorized_networks_config = v.map(|x| x.into());
10795        self
10796    }
10797
10798    /// Sets the value of [desired_cluster_autoscaling][crate::model::ClusterUpdate::desired_cluster_autoscaling].
10799    pub fn set_desired_cluster_autoscaling<T>(mut self, v: T) -> Self
10800    where
10801        T: std::convert::Into<crate::model::ClusterAutoscaling>,
10802    {
10803        self.desired_cluster_autoscaling = std::option::Option::Some(v.into());
10804        self
10805    }
10806
10807    /// Sets or clears the value of [desired_cluster_autoscaling][crate::model::ClusterUpdate::desired_cluster_autoscaling].
10808    pub fn set_or_clear_desired_cluster_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
10809    where
10810        T: std::convert::Into<crate::model::ClusterAutoscaling>,
10811    {
10812        self.desired_cluster_autoscaling = v.map(|x| x.into());
10813        self
10814    }
10815
10816    /// Sets the value of [desired_binary_authorization][crate::model::ClusterUpdate::desired_binary_authorization].
10817    pub fn set_desired_binary_authorization<T>(mut self, v: T) -> Self
10818    where
10819        T: std::convert::Into<crate::model::BinaryAuthorization>,
10820    {
10821        self.desired_binary_authorization = std::option::Option::Some(v.into());
10822        self
10823    }
10824
10825    /// Sets or clears the value of [desired_binary_authorization][crate::model::ClusterUpdate::desired_binary_authorization].
10826    pub fn set_or_clear_desired_binary_authorization<T>(mut self, v: std::option::Option<T>) -> Self
10827    where
10828        T: std::convert::Into<crate::model::BinaryAuthorization>,
10829    {
10830        self.desired_binary_authorization = v.map(|x| x.into());
10831        self
10832    }
10833
10834    /// Sets the value of [desired_logging_service][crate::model::ClusterUpdate::desired_logging_service].
10835    pub fn set_desired_logging_service<T: std::convert::Into<std::string::String>>(
10836        mut self,
10837        v: T,
10838    ) -> Self {
10839        self.desired_logging_service = v.into();
10840        self
10841    }
10842
10843    /// Sets the value of [desired_resource_usage_export_config][crate::model::ClusterUpdate::desired_resource_usage_export_config].
10844    pub fn set_desired_resource_usage_export_config<T>(mut self, v: T) -> Self
10845    where
10846        T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
10847    {
10848        self.desired_resource_usage_export_config = std::option::Option::Some(v.into());
10849        self
10850    }
10851
10852    /// Sets or clears the value of [desired_resource_usage_export_config][crate::model::ClusterUpdate::desired_resource_usage_export_config].
10853    pub fn set_or_clear_desired_resource_usage_export_config<T>(
10854        mut self,
10855        v: std::option::Option<T>,
10856    ) -> Self
10857    where
10858        T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
10859    {
10860        self.desired_resource_usage_export_config = v.map(|x| x.into());
10861        self
10862    }
10863
10864    /// Sets the value of [desired_vertical_pod_autoscaling][crate::model::ClusterUpdate::desired_vertical_pod_autoscaling].
10865    pub fn set_desired_vertical_pod_autoscaling<T>(mut self, v: T) -> Self
10866    where
10867        T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
10868    {
10869        self.desired_vertical_pod_autoscaling = std::option::Option::Some(v.into());
10870        self
10871    }
10872
10873    /// Sets or clears the value of [desired_vertical_pod_autoscaling][crate::model::ClusterUpdate::desired_vertical_pod_autoscaling].
10874    pub fn set_or_clear_desired_vertical_pod_autoscaling<T>(
10875        mut self,
10876        v: std::option::Option<T>,
10877    ) -> Self
10878    where
10879        T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
10880    {
10881        self.desired_vertical_pod_autoscaling = v.map(|x| x.into());
10882        self
10883    }
10884
10885    /// Sets the value of [desired_private_cluster_config][crate::model::ClusterUpdate::desired_private_cluster_config].
10886    #[deprecated]
10887    pub fn set_desired_private_cluster_config<T>(mut self, v: T) -> Self
10888    where
10889        T: std::convert::Into<crate::model::PrivateClusterConfig>,
10890    {
10891        self.desired_private_cluster_config = std::option::Option::Some(v.into());
10892        self
10893    }
10894
10895    /// Sets or clears the value of [desired_private_cluster_config][crate::model::ClusterUpdate::desired_private_cluster_config].
10896    #[deprecated]
10897    pub fn set_or_clear_desired_private_cluster_config<T>(
10898        mut self,
10899        v: std::option::Option<T>,
10900    ) -> Self
10901    where
10902        T: std::convert::Into<crate::model::PrivateClusterConfig>,
10903    {
10904        self.desired_private_cluster_config = v.map(|x| x.into());
10905        self
10906    }
10907
10908    /// Sets the value of [desired_intra_node_visibility_config][crate::model::ClusterUpdate::desired_intra_node_visibility_config].
10909    pub fn set_desired_intra_node_visibility_config<T>(mut self, v: T) -> Self
10910    where
10911        T: std::convert::Into<crate::model::IntraNodeVisibilityConfig>,
10912    {
10913        self.desired_intra_node_visibility_config = std::option::Option::Some(v.into());
10914        self
10915    }
10916
10917    /// Sets or clears the value of [desired_intra_node_visibility_config][crate::model::ClusterUpdate::desired_intra_node_visibility_config].
10918    pub fn set_or_clear_desired_intra_node_visibility_config<T>(
10919        mut self,
10920        v: std::option::Option<T>,
10921    ) -> Self
10922    where
10923        T: std::convert::Into<crate::model::IntraNodeVisibilityConfig>,
10924    {
10925        self.desired_intra_node_visibility_config = v.map(|x| x.into());
10926        self
10927    }
10928
10929    /// Sets the value of [desired_default_snat_status][crate::model::ClusterUpdate::desired_default_snat_status].
10930    pub fn set_desired_default_snat_status<T>(mut self, v: T) -> Self
10931    where
10932        T: std::convert::Into<crate::model::DefaultSnatStatus>,
10933    {
10934        self.desired_default_snat_status = std::option::Option::Some(v.into());
10935        self
10936    }
10937
10938    /// Sets or clears the value of [desired_default_snat_status][crate::model::ClusterUpdate::desired_default_snat_status].
10939    pub fn set_or_clear_desired_default_snat_status<T>(mut self, v: std::option::Option<T>) -> Self
10940    where
10941        T: std::convert::Into<crate::model::DefaultSnatStatus>,
10942    {
10943        self.desired_default_snat_status = v.map(|x| x.into());
10944        self
10945    }
10946
10947    /// Sets the value of [desired_release_channel][crate::model::ClusterUpdate::desired_release_channel].
10948    pub fn set_desired_release_channel<T>(mut self, v: T) -> Self
10949    where
10950        T: std::convert::Into<crate::model::ReleaseChannel>,
10951    {
10952        self.desired_release_channel = std::option::Option::Some(v.into());
10953        self
10954    }
10955
10956    /// Sets or clears the value of [desired_release_channel][crate::model::ClusterUpdate::desired_release_channel].
10957    pub fn set_or_clear_desired_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
10958    where
10959        T: std::convert::Into<crate::model::ReleaseChannel>,
10960    {
10961        self.desired_release_channel = v.map(|x| x.into());
10962        self
10963    }
10964
10965    /// Sets the value of [desired_l4ilb_subsetting_config][crate::model::ClusterUpdate::desired_l4ilb_subsetting_config].
10966    pub fn set_desired_l4ilb_subsetting_config<T>(mut self, v: T) -> Self
10967    where
10968        T: std::convert::Into<crate::model::ILBSubsettingConfig>,
10969    {
10970        self.desired_l4ilb_subsetting_config = std::option::Option::Some(v.into());
10971        self
10972    }
10973
10974    /// Sets or clears the value of [desired_l4ilb_subsetting_config][crate::model::ClusterUpdate::desired_l4ilb_subsetting_config].
10975    pub fn set_or_clear_desired_l4ilb_subsetting_config<T>(
10976        mut self,
10977        v: std::option::Option<T>,
10978    ) -> Self
10979    where
10980        T: std::convert::Into<crate::model::ILBSubsettingConfig>,
10981    {
10982        self.desired_l4ilb_subsetting_config = v.map(|x| x.into());
10983        self
10984    }
10985
10986    /// Sets the value of [desired_datapath_provider][crate::model::ClusterUpdate::desired_datapath_provider].
10987    pub fn set_desired_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
10988        mut self,
10989        v: T,
10990    ) -> Self {
10991        self.desired_datapath_provider = v.into();
10992        self
10993    }
10994
10995    /// Sets the value of [desired_private_ipv6_google_access][crate::model::ClusterUpdate::desired_private_ipv6_google_access].
10996    pub fn set_desired_private_ipv6_google_access<
10997        T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
10998    >(
10999        mut self,
11000        v: T,
11001    ) -> Self {
11002        self.desired_private_ipv6_google_access = v.into();
11003        self
11004    }
11005
11006    /// Sets the value of [desired_notification_config][crate::model::ClusterUpdate::desired_notification_config].
11007    pub fn set_desired_notification_config<T>(mut self, v: T) -> Self
11008    where
11009        T: std::convert::Into<crate::model::NotificationConfig>,
11010    {
11011        self.desired_notification_config = std::option::Option::Some(v.into());
11012        self
11013    }
11014
11015    /// Sets or clears the value of [desired_notification_config][crate::model::ClusterUpdate::desired_notification_config].
11016    pub fn set_or_clear_desired_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
11017    where
11018        T: std::convert::Into<crate::model::NotificationConfig>,
11019    {
11020        self.desired_notification_config = v.map(|x| x.into());
11021        self
11022    }
11023
11024    /// Sets the value of [desired_authenticator_groups_config][crate::model::ClusterUpdate::desired_authenticator_groups_config].
11025    pub fn set_desired_authenticator_groups_config<T>(mut self, v: T) -> Self
11026    where
11027        T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
11028    {
11029        self.desired_authenticator_groups_config = std::option::Option::Some(v.into());
11030        self
11031    }
11032
11033    /// Sets or clears the value of [desired_authenticator_groups_config][crate::model::ClusterUpdate::desired_authenticator_groups_config].
11034    pub fn set_or_clear_desired_authenticator_groups_config<T>(
11035        mut self,
11036        v: std::option::Option<T>,
11037    ) -> Self
11038    where
11039        T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
11040    {
11041        self.desired_authenticator_groups_config = v.map(|x| x.into());
11042        self
11043    }
11044
11045    /// Sets the value of [desired_logging_config][crate::model::ClusterUpdate::desired_logging_config].
11046    pub fn set_desired_logging_config<T>(mut self, v: T) -> Self
11047    where
11048        T: std::convert::Into<crate::model::LoggingConfig>,
11049    {
11050        self.desired_logging_config = std::option::Option::Some(v.into());
11051        self
11052    }
11053
11054    /// Sets or clears the value of [desired_logging_config][crate::model::ClusterUpdate::desired_logging_config].
11055    pub fn set_or_clear_desired_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
11056    where
11057        T: std::convert::Into<crate::model::LoggingConfig>,
11058    {
11059        self.desired_logging_config = v.map(|x| x.into());
11060        self
11061    }
11062
11063    /// Sets the value of [desired_monitoring_config][crate::model::ClusterUpdate::desired_monitoring_config].
11064    pub fn set_desired_monitoring_config<T>(mut self, v: T) -> Self
11065    where
11066        T: std::convert::Into<crate::model::MonitoringConfig>,
11067    {
11068        self.desired_monitoring_config = std::option::Option::Some(v.into());
11069        self
11070    }
11071
11072    /// Sets or clears the value of [desired_monitoring_config][crate::model::ClusterUpdate::desired_monitoring_config].
11073    pub fn set_or_clear_desired_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
11074    where
11075        T: std::convert::Into<crate::model::MonitoringConfig>,
11076    {
11077        self.desired_monitoring_config = v.map(|x| x.into());
11078        self
11079    }
11080
11081    /// Sets the value of [desired_identity_service_config][crate::model::ClusterUpdate::desired_identity_service_config].
11082    pub fn set_desired_identity_service_config<T>(mut self, v: T) -> Self
11083    where
11084        T: std::convert::Into<crate::model::IdentityServiceConfig>,
11085    {
11086        self.desired_identity_service_config = std::option::Option::Some(v.into());
11087        self
11088    }
11089
11090    /// Sets or clears the value of [desired_identity_service_config][crate::model::ClusterUpdate::desired_identity_service_config].
11091    pub fn set_or_clear_desired_identity_service_config<T>(
11092        mut self,
11093        v: std::option::Option<T>,
11094    ) -> Self
11095    where
11096        T: std::convert::Into<crate::model::IdentityServiceConfig>,
11097    {
11098        self.desired_identity_service_config = v.map(|x| x.into());
11099        self
11100    }
11101
11102    /// Sets the value of [desired_service_external_ips_config][crate::model::ClusterUpdate::desired_service_external_ips_config].
11103    pub fn set_desired_service_external_ips_config<T>(mut self, v: T) -> Self
11104    where
11105        T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
11106    {
11107        self.desired_service_external_ips_config = std::option::Option::Some(v.into());
11108        self
11109    }
11110
11111    /// Sets or clears the value of [desired_service_external_ips_config][crate::model::ClusterUpdate::desired_service_external_ips_config].
11112    pub fn set_or_clear_desired_service_external_ips_config<T>(
11113        mut self,
11114        v: std::option::Option<T>,
11115    ) -> Self
11116    where
11117        T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
11118    {
11119        self.desired_service_external_ips_config = v.map(|x| x.into());
11120        self
11121    }
11122
11123    /// Sets the value of [desired_enable_private_endpoint][crate::model::ClusterUpdate::desired_enable_private_endpoint].
11124    #[deprecated]
11125    pub fn set_desired_enable_private_endpoint<T>(mut self, v: T) -> Self
11126    where
11127        T: std::convert::Into<bool>,
11128    {
11129        self.desired_enable_private_endpoint = std::option::Option::Some(v.into());
11130        self
11131    }
11132
11133    /// Sets or clears the value of [desired_enable_private_endpoint][crate::model::ClusterUpdate::desired_enable_private_endpoint].
11134    #[deprecated]
11135    pub fn set_or_clear_desired_enable_private_endpoint<T>(
11136        mut self,
11137        v: std::option::Option<T>,
11138    ) -> Self
11139    where
11140        T: std::convert::Into<bool>,
11141    {
11142        self.desired_enable_private_endpoint = v.map(|x| x.into());
11143        self
11144    }
11145
11146    /// Sets the value of [desired_default_enable_private_nodes][crate::model::ClusterUpdate::desired_default_enable_private_nodes].
11147    pub fn set_desired_default_enable_private_nodes<T>(mut self, v: T) -> Self
11148    where
11149        T: std::convert::Into<bool>,
11150    {
11151        self.desired_default_enable_private_nodes = std::option::Option::Some(v.into());
11152        self
11153    }
11154
11155    /// Sets or clears the value of [desired_default_enable_private_nodes][crate::model::ClusterUpdate::desired_default_enable_private_nodes].
11156    pub fn set_or_clear_desired_default_enable_private_nodes<T>(
11157        mut self,
11158        v: std::option::Option<T>,
11159    ) -> Self
11160    where
11161        T: std::convert::Into<bool>,
11162    {
11163        self.desired_default_enable_private_nodes = v.map(|x| x.into());
11164        self
11165    }
11166
11167    /// Sets the value of [desired_control_plane_endpoints_config][crate::model::ClusterUpdate::desired_control_plane_endpoints_config].
11168    pub fn set_desired_control_plane_endpoints_config<T>(mut self, v: T) -> Self
11169    where
11170        T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
11171    {
11172        self.desired_control_plane_endpoints_config = std::option::Option::Some(v.into());
11173        self
11174    }
11175
11176    /// Sets or clears the value of [desired_control_plane_endpoints_config][crate::model::ClusterUpdate::desired_control_plane_endpoints_config].
11177    pub fn set_or_clear_desired_control_plane_endpoints_config<T>(
11178        mut self,
11179        v: std::option::Option<T>,
11180    ) -> Self
11181    where
11182        T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
11183    {
11184        self.desired_control_plane_endpoints_config = v.map(|x| x.into());
11185        self
11186    }
11187
11188    /// Sets the value of [desired_master_version][crate::model::ClusterUpdate::desired_master_version].
11189    pub fn set_desired_master_version<T: std::convert::Into<std::string::String>>(
11190        mut self,
11191        v: T,
11192    ) -> Self {
11193        self.desired_master_version = v.into();
11194        self
11195    }
11196
11197    /// Sets the value of [desired_gcfs_config][crate::model::ClusterUpdate::desired_gcfs_config].
11198    pub fn set_desired_gcfs_config<T>(mut self, v: T) -> Self
11199    where
11200        T: std::convert::Into<crate::model::GcfsConfig>,
11201    {
11202        self.desired_gcfs_config = std::option::Option::Some(v.into());
11203        self
11204    }
11205
11206    /// Sets or clears the value of [desired_gcfs_config][crate::model::ClusterUpdate::desired_gcfs_config].
11207    pub fn set_or_clear_desired_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
11208    where
11209        T: std::convert::Into<crate::model::GcfsConfig>,
11210    {
11211        self.desired_gcfs_config = v.map(|x| x.into());
11212        self
11213    }
11214
11215    /// Sets the value of [desired_node_pool_auto_config_network_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_network_tags].
11216    pub fn set_desired_node_pool_auto_config_network_tags<T>(mut self, v: T) -> Self
11217    where
11218        T: std::convert::Into<crate::model::NetworkTags>,
11219    {
11220        self.desired_node_pool_auto_config_network_tags = std::option::Option::Some(v.into());
11221        self
11222    }
11223
11224    /// Sets or clears the value of [desired_node_pool_auto_config_network_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_network_tags].
11225    pub fn set_or_clear_desired_node_pool_auto_config_network_tags<T>(
11226        mut self,
11227        v: std::option::Option<T>,
11228    ) -> Self
11229    where
11230        T: std::convert::Into<crate::model::NetworkTags>,
11231    {
11232        self.desired_node_pool_auto_config_network_tags = v.map(|x| x.into());
11233        self
11234    }
11235
11236    /// Sets the value of [desired_pod_autoscaling][crate::model::ClusterUpdate::desired_pod_autoscaling].
11237    pub fn set_desired_pod_autoscaling<T>(mut self, v: T) -> Self
11238    where
11239        T: std::convert::Into<crate::model::PodAutoscaling>,
11240    {
11241        self.desired_pod_autoscaling = std::option::Option::Some(v.into());
11242        self
11243    }
11244
11245    /// Sets or clears the value of [desired_pod_autoscaling][crate::model::ClusterUpdate::desired_pod_autoscaling].
11246    pub fn set_or_clear_desired_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
11247    where
11248        T: std::convert::Into<crate::model::PodAutoscaling>,
11249    {
11250        self.desired_pod_autoscaling = v.map(|x| x.into());
11251        self
11252    }
11253
11254    /// Sets the value of [desired_gateway_api_config][crate::model::ClusterUpdate::desired_gateway_api_config].
11255    pub fn set_desired_gateway_api_config<T>(mut self, v: T) -> Self
11256    where
11257        T: std::convert::Into<crate::model::GatewayAPIConfig>,
11258    {
11259        self.desired_gateway_api_config = std::option::Option::Some(v.into());
11260        self
11261    }
11262
11263    /// Sets or clears the value of [desired_gateway_api_config][crate::model::ClusterUpdate::desired_gateway_api_config].
11264    pub fn set_or_clear_desired_gateway_api_config<T>(mut self, v: std::option::Option<T>) -> Self
11265    where
11266        T: std::convert::Into<crate::model::GatewayAPIConfig>,
11267    {
11268        self.desired_gateway_api_config = v.map(|x| x.into());
11269        self
11270    }
11271
11272    /// Sets the value of [etag][crate::model::ClusterUpdate::etag].
11273    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11274        self.etag = v.into();
11275        self
11276    }
11277
11278    /// Sets the value of [desired_node_pool_logging_config][crate::model::ClusterUpdate::desired_node_pool_logging_config].
11279    pub fn set_desired_node_pool_logging_config<T>(mut self, v: T) -> Self
11280    where
11281        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
11282    {
11283        self.desired_node_pool_logging_config = std::option::Option::Some(v.into());
11284        self
11285    }
11286
11287    /// Sets or clears the value of [desired_node_pool_logging_config][crate::model::ClusterUpdate::desired_node_pool_logging_config].
11288    pub fn set_or_clear_desired_node_pool_logging_config<T>(
11289        mut self,
11290        v: std::option::Option<T>,
11291    ) -> Self
11292    where
11293        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
11294    {
11295        self.desired_node_pool_logging_config = v.map(|x| x.into());
11296        self
11297    }
11298
11299    /// Sets the value of [desired_fleet][crate::model::ClusterUpdate::desired_fleet].
11300    pub fn set_desired_fleet<T>(mut self, v: T) -> Self
11301    where
11302        T: std::convert::Into<crate::model::Fleet>,
11303    {
11304        self.desired_fleet = std::option::Option::Some(v.into());
11305        self
11306    }
11307
11308    /// Sets or clears the value of [desired_fleet][crate::model::ClusterUpdate::desired_fleet].
11309    pub fn set_or_clear_desired_fleet<T>(mut self, v: std::option::Option<T>) -> Self
11310    where
11311        T: std::convert::Into<crate::model::Fleet>,
11312    {
11313        self.desired_fleet = v.map(|x| x.into());
11314        self
11315    }
11316
11317    /// Sets the value of [desired_stack_type][crate::model::ClusterUpdate::desired_stack_type].
11318    pub fn set_desired_stack_type<T: std::convert::Into<crate::model::StackType>>(
11319        mut self,
11320        v: T,
11321    ) -> Self {
11322        self.desired_stack_type = v.into();
11323        self
11324    }
11325
11326    /// Sets the value of [additional_pod_ranges_config][crate::model::ClusterUpdate::additional_pod_ranges_config].
11327    pub fn set_additional_pod_ranges_config<T>(mut self, v: T) -> Self
11328    where
11329        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11330    {
11331        self.additional_pod_ranges_config = std::option::Option::Some(v.into());
11332        self
11333    }
11334
11335    /// Sets or clears the value of [additional_pod_ranges_config][crate::model::ClusterUpdate::additional_pod_ranges_config].
11336    pub fn set_or_clear_additional_pod_ranges_config<T>(mut self, v: std::option::Option<T>) -> Self
11337    where
11338        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11339    {
11340        self.additional_pod_ranges_config = v.map(|x| x.into());
11341        self
11342    }
11343
11344    /// Sets the value of [removed_additional_pod_ranges_config][crate::model::ClusterUpdate::removed_additional_pod_ranges_config].
11345    pub fn set_removed_additional_pod_ranges_config<T>(mut self, v: T) -> Self
11346    where
11347        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11348    {
11349        self.removed_additional_pod_ranges_config = std::option::Option::Some(v.into());
11350        self
11351    }
11352
11353    /// Sets or clears the value of [removed_additional_pod_ranges_config][crate::model::ClusterUpdate::removed_additional_pod_ranges_config].
11354    pub fn set_or_clear_removed_additional_pod_ranges_config<T>(
11355        mut self,
11356        v: std::option::Option<T>,
11357    ) -> Self
11358    where
11359        T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11360    {
11361        self.removed_additional_pod_ranges_config = v.map(|x| x.into());
11362        self
11363    }
11364
11365    /// Sets the value of [enable_k8s_beta_apis][crate::model::ClusterUpdate::enable_k8s_beta_apis].
11366    pub fn set_enable_k8s_beta_apis<T>(mut self, v: T) -> Self
11367    where
11368        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11369    {
11370        self.enable_k8s_beta_apis = std::option::Option::Some(v.into());
11371        self
11372    }
11373
11374    /// Sets or clears the value of [enable_k8s_beta_apis][crate::model::ClusterUpdate::enable_k8s_beta_apis].
11375    pub fn set_or_clear_enable_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
11376    where
11377        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11378    {
11379        self.enable_k8s_beta_apis = v.map(|x| x.into());
11380        self
11381    }
11382
11383    /// Sets the value of [desired_security_posture_config][crate::model::ClusterUpdate::desired_security_posture_config].
11384    pub fn set_desired_security_posture_config<T>(mut self, v: T) -> Self
11385    where
11386        T: std::convert::Into<crate::model::SecurityPostureConfig>,
11387    {
11388        self.desired_security_posture_config = std::option::Option::Some(v.into());
11389        self
11390    }
11391
11392    /// Sets or clears the value of [desired_security_posture_config][crate::model::ClusterUpdate::desired_security_posture_config].
11393    pub fn set_or_clear_desired_security_posture_config<T>(
11394        mut self,
11395        v: std::option::Option<T>,
11396    ) -> Self
11397    where
11398        T: std::convert::Into<crate::model::SecurityPostureConfig>,
11399    {
11400        self.desired_security_posture_config = v.map(|x| x.into());
11401        self
11402    }
11403
11404    /// Sets the value of [desired_network_performance_config][crate::model::ClusterUpdate::desired_network_performance_config].
11405    pub fn set_desired_network_performance_config<T>(mut self, v: T) -> Self
11406    where
11407        T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
11408    {
11409        self.desired_network_performance_config = std::option::Option::Some(v.into());
11410        self
11411    }
11412
11413    /// Sets or clears the value of [desired_network_performance_config][crate::model::ClusterUpdate::desired_network_performance_config].
11414    pub fn set_or_clear_desired_network_performance_config<T>(
11415        mut self,
11416        v: std::option::Option<T>,
11417    ) -> Self
11418    where
11419        T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
11420    {
11421        self.desired_network_performance_config = v.map(|x| x.into());
11422        self
11423    }
11424
11425    /// Sets the value of [desired_enable_fqdn_network_policy][crate::model::ClusterUpdate::desired_enable_fqdn_network_policy].
11426    pub fn set_desired_enable_fqdn_network_policy<T>(mut self, v: T) -> Self
11427    where
11428        T: std::convert::Into<bool>,
11429    {
11430        self.desired_enable_fqdn_network_policy = std::option::Option::Some(v.into());
11431        self
11432    }
11433
11434    /// Sets or clears the value of [desired_enable_fqdn_network_policy][crate::model::ClusterUpdate::desired_enable_fqdn_network_policy].
11435    pub fn set_or_clear_desired_enable_fqdn_network_policy<T>(
11436        mut self,
11437        v: std::option::Option<T>,
11438    ) -> Self
11439    where
11440        T: std::convert::Into<bool>,
11441    {
11442        self.desired_enable_fqdn_network_policy = v.map(|x| x.into());
11443        self
11444    }
11445
11446    /// Sets the value of [desired_autopilot_workload_policy_config][crate::model::ClusterUpdate::desired_autopilot_workload_policy_config].
11447    pub fn set_desired_autopilot_workload_policy_config<T>(mut self, v: T) -> Self
11448    where
11449        T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
11450    {
11451        self.desired_autopilot_workload_policy_config = std::option::Option::Some(v.into());
11452        self
11453    }
11454
11455    /// Sets or clears the value of [desired_autopilot_workload_policy_config][crate::model::ClusterUpdate::desired_autopilot_workload_policy_config].
11456    pub fn set_or_clear_desired_autopilot_workload_policy_config<T>(
11457        mut self,
11458        v: std::option::Option<T>,
11459    ) -> Self
11460    where
11461        T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
11462    {
11463        self.desired_autopilot_workload_policy_config = v.map(|x| x.into());
11464        self
11465    }
11466
11467    /// Sets the value of [desired_k8s_beta_apis][crate::model::ClusterUpdate::desired_k8s_beta_apis].
11468    pub fn set_desired_k8s_beta_apis<T>(mut self, v: T) -> Self
11469    where
11470        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11471    {
11472        self.desired_k8s_beta_apis = std::option::Option::Some(v.into());
11473        self
11474    }
11475
11476    /// Sets or clears the value of [desired_k8s_beta_apis][crate::model::ClusterUpdate::desired_k8s_beta_apis].
11477    pub fn set_or_clear_desired_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
11478    where
11479        T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11480    {
11481        self.desired_k8s_beta_apis = v.map(|x| x.into());
11482        self
11483    }
11484
11485    /// Sets the value of [desired_containerd_config][crate::model::ClusterUpdate::desired_containerd_config].
11486    pub fn set_desired_containerd_config<T>(mut self, v: T) -> Self
11487    where
11488        T: std::convert::Into<crate::model::ContainerdConfig>,
11489    {
11490        self.desired_containerd_config = std::option::Option::Some(v.into());
11491        self
11492    }
11493
11494    /// Sets or clears the value of [desired_containerd_config][crate::model::ClusterUpdate::desired_containerd_config].
11495    pub fn set_or_clear_desired_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
11496    where
11497        T: std::convert::Into<crate::model::ContainerdConfig>,
11498    {
11499        self.desired_containerd_config = v.map(|x| x.into());
11500        self
11501    }
11502
11503    /// Sets the value of [desired_enable_multi_networking][crate::model::ClusterUpdate::desired_enable_multi_networking].
11504    pub fn set_desired_enable_multi_networking<T>(mut self, v: T) -> Self
11505    where
11506        T: std::convert::Into<bool>,
11507    {
11508        self.desired_enable_multi_networking = std::option::Option::Some(v.into());
11509        self
11510    }
11511
11512    /// Sets or clears the value of [desired_enable_multi_networking][crate::model::ClusterUpdate::desired_enable_multi_networking].
11513    pub fn set_or_clear_desired_enable_multi_networking<T>(
11514        mut self,
11515        v: std::option::Option<T>,
11516    ) -> Self
11517    where
11518        T: std::convert::Into<bool>,
11519    {
11520        self.desired_enable_multi_networking = v.map(|x| x.into());
11521        self
11522    }
11523
11524    /// Sets the value of [desired_node_pool_auto_config_resource_manager_tags][crate::model::ClusterUpdate::desired_node_pool_auto_config_resource_manager_tags].
11525    pub fn set_desired_node_pool_auto_config_resource_manager_tags<T>(mut self, v: T) -> Self
11526    where
11527        T: std::convert::Into<crate::model::ResourceManagerTags>,
11528    {
11529        self.desired_node_pool_auto_config_resource_manager_tags =
11530            std::option::Option::Some(v.into());
11531        self
11532    }
11533
11534    /// 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].
11535    pub fn set_or_clear_desired_node_pool_auto_config_resource_manager_tags<T>(
11536        mut self,
11537        v: std::option::Option<T>,
11538    ) -> Self
11539    where
11540        T: std::convert::Into<crate::model::ResourceManagerTags>,
11541    {
11542        self.desired_node_pool_auto_config_resource_manager_tags = v.map(|x| x.into());
11543        self
11544    }
11545
11546    /// Sets the value of [desired_in_transit_encryption_config][crate::model::ClusterUpdate::desired_in_transit_encryption_config].
11547    pub fn set_desired_in_transit_encryption_config<T>(mut self, v: T) -> Self
11548    where
11549        T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
11550    {
11551        self.desired_in_transit_encryption_config = std::option::Option::Some(v.into());
11552        self
11553    }
11554
11555    /// Sets or clears the value of [desired_in_transit_encryption_config][crate::model::ClusterUpdate::desired_in_transit_encryption_config].
11556    pub fn set_or_clear_desired_in_transit_encryption_config<T>(
11557        mut self,
11558        v: std::option::Option<T>,
11559    ) -> Self
11560    where
11561        T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
11562    {
11563        self.desired_in_transit_encryption_config = v.map(|x| x.into());
11564        self
11565    }
11566
11567    /// Sets the value of [desired_enable_cilium_clusterwide_network_policy][crate::model::ClusterUpdate::desired_enable_cilium_clusterwide_network_policy].
11568    pub fn set_desired_enable_cilium_clusterwide_network_policy<T>(mut self, v: T) -> Self
11569    where
11570        T: std::convert::Into<bool>,
11571    {
11572        self.desired_enable_cilium_clusterwide_network_policy = std::option::Option::Some(v.into());
11573        self
11574    }
11575
11576    /// Sets or clears the value of [desired_enable_cilium_clusterwide_network_policy][crate::model::ClusterUpdate::desired_enable_cilium_clusterwide_network_policy].
11577    pub fn set_or_clear_desired_enable_cilium_clusterwide_network_policy<T>(
11578        mut self,
11579        v: std::option::Option<T>,
11580    ) -> Self
11581    where
11582        T: std::convert::Into<bool>,
11583    {
11584        self.desired_enable_cilium_clusterwide_network_policy = v.map(|x| x.into());
11585        self
11586    }
11587
11588    /// Sets the value of [desired_secret_manager_config][crate::model::ClusterUpdate::desired_secret_manager_config].
11589    pub fn set_desired_secret_manager_config<T>(mut self, v: T) -> Self
11590    where
11591        T: std::convert::Into<crate::model::SecretManagerConfig>,
11592    {
11593        self.desired_secret_manager_config = std::option::Option::Some(v.into());
11594        self
11595    }
11596
11597    /// Sets or clears the value of [desired_secret_manager_config][crate::model::ClusterUpdate::desired_secret_manager_config].
11598    pub fn set_or_clear_desired_secret_manager_config<T>(
11599        mut self,
11600        v: std::option::Option<T>,
11601    ) -> Self
11602    where
11603        T: std::convert::Into<crate::model::SecretManagerConfig>,
11604    {
11605        self.desired_secret_manager_config = v.map(|x| x.into());
11606        self
11607    }
11608
11609    /// Sets the value of [desired_compliance_posture_config][crate::model::ClusterUpdate::desired_compliance_posture_config].
11610    pub fn set_desired_compliance_posture_config<T>(mut self, v: T) -> Self
11611    where
11612        T: std::convert::Into<crate::model::CompliancePostureConfig>,
11613    {
11614        self.desired_compliance_posture_config = std::option::Option::Some(v.into());
11615        self
11616    }
11617
11618    /// Sets or clears the value of [desired_compliance_posture_config][crate::model::ClusterUpdate::desired_compliance_posture_config].
11619    pub fn set_or_clear_desired_compliance_posture_config<T>(
11620        mut self,
11621        v: std::option::Option<T>,
11622    ) -> Self
11623    where
11624        T: std::convert::Into<crate::model::CompliancePostureConfig>,
11625    {
11626        self.desired_compliance_posture_config = v.map(|x| x.into());
11627        self
11628    }
11629
11630    /// Sets the value of [desired_node_kubelet_config][crate::model::ClusterUpdate::desired_node_kubelet_config].
11631    pub fn set_desired_node_kubelet_config<T>(mut self, v: T) -> Self
11632    where
11633        T: std::convert::Into<crate::model::NodeKubeletConfig>,
11634    {
11635        self.desired_node_kubelet_config = std::option::Option::Some(v.into());
11636        self
11637    }
11638
11639    /// Sets or clears the value of [desired_node_kubelet_config][crate::model::ClusterUpdate::desired_node_kubelet_config].
11640    pub fn set_or_clear_desired_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
11641    where
11642        T: std::convert::Into<crate::model::NodeKubeletConfig>,
11643    {
11644        self.desired_node_kubelet_config = v.map(|x| x.into());
11645        self
11646    }
11647
11648    /// Sets the value of [desired_node_pool_auto_config_kubelet_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_kubelet_config].
11649    pub fn set_desired_node_pool_auto_config_kubelet_config<T>(mut self, v: T) -> Self
11650    where
11651        T: std::convert::Into<crate::model::NodeKubeletConfig>,
11652    {
11653        self.desired_node_pool_auto_config_kubelet_config = std::option::Option::Some(v.into());
11654        self
11655    }
11656
11657    /// Sets or clears the value of [desired_node_pool_auto_config_kubelet_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_kubelet_config].
11658    pub fn set_or_clear_desired_node_pool_auto_config_kubelet_config<T>(
11659        mut self,
11660        v: std::option::Option<T>,
11661    ) -> Self
11662    where
11663        T: std::convert::Into<crate::model::NodeKubeletConfig>,
11664    {
11665        self.desired_node_pool_auto_config_kubelet_config = v.map(|x| x.into());
11666        self
11667    }
11668
11669    /// Sets the value of [user_managed_keys_config][crate::model::ClusterUpdate::user_managed_keys_config].
11670    #[deprecated]
11671    pub fn set_user_managed_keys_config<T>(mut self, v: T) -> Self
11672    where
11673        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
11674    {
11675        self.user_managed_keys_config = std::option::Option::Some(v.into());
11676        self
11677    }
11678
11679    /// Sets or clears the value of [user_managed_keys_config][crate::model::ClusterUpdate::user_managed_keys_config].
11680    #[deprecated]
11681    pub fn set_or_clear_user_managed_keys_config<T>(mut self, v: std::option::Option<T>) -> Self
11682    where
11683        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
11684    {
11685        self.user_managed_keys_config = v.map(|x| x.into());
11686        self
11687    }
11688
11689    /// Sets the value of [desired_rbac_binding_config][crate::model::ClusterUpdate::desired_rbac_binding_config].
11690    pub fn set_desired_rbac_binding_config<T>(mut self, v: T) -> Self
11691    where
11692        T: std::convert::Into<crate::model::RBACBindingConfig>,
11693    {
11694        self.desired_rbac_binding_config = std::option::Option::Some(v.into());
11695        self
11696    }
11697
11698    /// Sets or clears the value of [desired_rbac_binding_config][crate::model::ClusterUpdate::desired_rbac_binding_config].
11699    pub fn set_or_clear_desired_rbac_binding_config<T>(mut self, v: std::option::Option<T>) -> Self
11700    where
11701        T: std::convert::Into<crate::model::RBACBindingConfig>,
11702    {
11703        self.desired_rbac_binding_config = v.map(|x| x.into());
11704        self
11705    }
11706
11707    /// Sets the value of [desired_additional_ip_ranges_config][crate::model::ClusterUpdate::desired_additional_ip_ranges_config].
11708    pub fn set_desired_additional_ip_ranges_config<T>(mut self, v: T) -> Self
11709    where
11710        T: std::convert::Into<crate::model::DesiredAdditionalIPRangesConfig>,
11711    {
11712        self.desired_additional_ip_ranges_config = std::option::Option::Some(v.into());
11713        self
11714    }
11715
11716    /// Sets or clears the value of [desired_additional_ip_ranges_config][crate::model::ClusterUpdate::desired_additional_ip_ranges_config].
11717    pub fn set_or_clear_desired_additional_ip_ranges_config<T>(
11718        mut self,
11719        v: std::option::Option<T>,
11720    ) -> Self
11721    where
11722        T: std::convert::Into<crate::model::DesiredAdditionalIPRangesConfig>,
11723    {
11724        self.desired_additional_ip_ranges_config = v.map(|x| x.into());
11725        self
11726    }
11727
11728    /// Sets the value of [desired_enterprise_config][crate::model::ClusterUpdate::desired_enterprise_config].
11729    pub fn set_desired_enterprise_config<T>(mut self, v: T) -> Self
11730    where
11731        T: std::convert::Into<crate::model::DesiredEnterpriseConfig>,
11732    {
11733        self.desired_enterprise_config = std::option::Option::Some(v.into());
11734        self
11735    }
11736
11737    /// Sets or clears the value of [desired_enterprise_config][crate::model::ClusterUpdate::desired_enterprise_config].
11738    pub fn set_or_clear_desired_enterprise_config<T>(mut self, v: std::option::Option<T>) -> Self
11739    where
11740        T: std::convert::Into<crate::model::DesiredEnterpriseConfig>,
11741    {
11742        self.desired_enterprise_config = v.map(|x| x.into());
11743        self
11744    }
11745
11746    /// Sets the value of [desired_auto_ipam_config][crate::model::ClusterUpdate::desired_auto_ipam_config].
11747    pub fn set_desired_auto_ipam_config<T>(mut self, v: T) -> Self
11748    where
11749        T: std::convert::Into<crate::model::AutoIpamConfig>,
11750    {
11751        self.desired_auto_ipam_config = std::option::Option::Some(v.into());
11752        self
11753    }
11754
11755    /// Sets or clears the value of [desired_auto_ipam_config][crate::model::ClusterUpdate::desired_auto_ipam_config].
11756    pub fn set_or_clear_desired_auto_ipam_config<T>(mut self, v: std::option::Option<T>) -> Self
11757    where
11758        T: std::convert::Into<crate::model::AutoIpamConfig>,
11759    {
11760        self.desired_auto_ipam_config = v.map(|x| x.into());
11761        self
11762    }
11763
11764    /// Sets the value of [desired_disable_l4_lb_firewall_reconciliation][crate::model::ClusterUpdate::desired_disable_l4_lb_firewall_reconciliation].
11765    pub fn set_desired_disable_l4_lb_firewall_reconciliation<T>(mut self, v: T) -> Self
11766    where
11767        T: std::convert::Into<bool>,
11768    {
11769        self.desired_disable_l4_lb_firewall_reconciliation = std::option::Option::Some(v.into());
11770        self
11771    }
11772
11773    /// Sets or clears the value of [desired_disable_l4_lb_firewall_reconciliation][crate::model::ClusterUpdate::desired_disable_l4_lb_firewall_reconciliation].
11774    pub fn set_or_clear_desired_disable_l4_lb_firewall_reconciliation<T>(
11775        mut self,
11776        v: std::option::Option<T>,
11777    ) -> Self
11778    where
11779        T: std::convert::Into<bool>,
11780    {
11781        self.desired_disable_l4_lb_firewall_reconciliation = v.map(|x| x.into());
11782        self
11783    }
11784
11785    /// Sets the value of [desired_node_pool_auto_config_linux_node_config][crate::model::ClusterUpdate::desired_node_pool_auto_config_linux_node_config].
11786    pub fn set_desired_node_pool_auto_config_linux_node_config<T>(mut self, v: T) -> Self
11787    where
11788        T: std::convert::Into<crate::model::LinuxNodeConfig>,
11789    {
11790        self.desired_node_pool_auto_config_linux_node_config = std::option::Option::Some(v.into());
11791        self
11792    }
11793
11794    /// 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].
11795    pub fn set_or_clear_desired_node_pool_auto_config_linux_node_config<T>(
11796        mut self,
11797        v: std::option::Option<T>,
11798    ) -> Self
11799    where
11800        T: std::convert::Into<crate::model::LinuxNodeConfig>,
11801    {
11802        self.desired_node_pool_auto_config_linux_node_config = v.map(|x| x.into());
11803        self
11804    }
11805
11806    /// Sets the value of [desired_user_managed_keys_config][crate::model::ClusterUpdate::desired_user_managed_keys_config].
11807    pub fn set_desired_user_managed_keys_config<T>(mut self, v: T) -> Self
11808    where
11809        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
11810    {
11811        self.desired_user_managed_keys_config = std::option::Option::Some(v.into());
11812        self
11813    }
11814
11815    /// Sets or clears the value of [desired_user_managed_keys_config][crate::model::ClusterUpdate::desired_user_managed_keys_config].
11816    pub fn set_or_clear_desired_user_managed_keys_config<T>(
11817        mut self,
11818        v: std::option::Option<T>,
11819    ) -> Self
11820    where
11821        T: std::convert::Into<crate::model::UserManagedKeysConfig>,
11822    {
11823        self.desired_user_managed_keys_config = v.map(|x| x.into());
11824        self
11825    }
11826
11827    /// Sets the value of [desired_anonymous_authentication_config][crate::model::ClusterUpdate::desired_anonymous_authentication_config].
11828    pub fn set_desired_anonymous_authentication_config<T>(mut self, v: T) -> Self
11829    where
11830        T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
11831    {
11832        self.desired_anonymous_authentication_config = std::option::Option::Some(v.into());
11833        self
11834    }
11835
11836    /// Sets or clears the value of [desired_anonymous_authentication_config][crate::model::ClusterUpdate::desired_anonymous_authentication_config].
11837    pub fn set_or_clear_desired_anonymous_authentication_config<T>(
11838        mut self,
11839        v: std::option::Option<T>,
11840    ) -> Self
11841    where
11842        T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
11843    {
11844        self.desired_anonymous_authentication_config = v.map(|x| x.into());
11845        self
11846    }
11847
11848    /// Sets the value of [gke_auto_upgrade_config][crate::model::ClusterUpdate::gke_auto_upgrade_config].
11849    pub fn set_gke_auto_upgrade_config<T>(mut self, v: T) -> Self
11850    where
11851        T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
11852    {
11853        self.gke_auto_upgrade_config = std::option::Option::Some(v.into());
11854        self
11855    }
11856
11857    /// Sets or clears the value of [gke_auto_upgrade_config][crate::model::ClusterUpdate::gke_auto_upgrade_config].
11858    pub fn set_or_clear_gke_auto_upgrade_config<T>(mut self, v: std::option::Option<T>) -> Self
11859    where
11860        T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
11861    {
11862        self.gke_auto_upgrade_config = v.map(|x| x.into());
11863        self
11864    }
11865}
11866
11867impl wkt::message::Message for ClusterUpdate {
11868    fn typename() -> &'static str {
11869        "type.googleapis.com/google.container.v1.ClusterUpdate"
11870    }
11871}
11872
11873/// AdditionalPodRangesConfig is the configuration for additional pod secondary
11874/// ranges supporting the ClusterUpdate message.
11875#[derive(Clone, Default, PartialEq)]
11876#[non_exhaustive]
11877pub struct AdditionalPodRangesConfig {
11878    /// Name for pod secondary ipv4 range which has the actual range defined ahead.
11879    pub pod_range_names: std::vec::Vec<std::string::String>,
11880
11881    /// Output only. Information for additional pod range.
11882    pub pod_range_info: std::vec::Vec<crate::model::RangeInfo>,
11883
11884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11885}
11886
11887impl AdditionalPodRangesConfig {
11888    pub fn new() -> Self {
11889        std::default::Default::default()
11890    }
11891
11892    /// Sets the value of [pod_range_names][crate::model::AdditionalPodRangesConfig::pod_range_names].
11893    pub fn set_pod_range_names<T, V>(mut self, v: T) -> Self
11894    where
11895        T: std::iter::IntoIterator<Item = V>,
11896        V: std::convert::Into<std::string::String>,
11897    {
11898        use std::iter::Iterator;
11899        self.pod_range_names = v.into_iter().map(|i| i.into()).collect();
11900        self
11901    }
11902
11903    /// Sets the value of [pod_range_info][crate::model::AdditionalPodRangesConfig::pod_range_info].
11904    pub fn set_pod_range_info<T, V>(mut self, v: T) -> Self
11905    where
11906        T: std::iter::IntoIterator<Item = V>,
11907        V: std::convert::Into<crate::model::RangeInfo>,
11908    {
11909        use std::iter::Iterator;
11910        self.pod_range_info = v.into_iter().map(|i| i.into()).collect();
11911        self
11912    }
11913}
11914
11915impl wkt::message::Message for AdditionalPodRangesConfig {
11916    fn typename() -> &'static str {
11917        "type.googleapis.com/google.container.v1.AdditionalPodRangesConfig"
11918    }
11919}
11920
11921/// AdditionalIPRangesConfig is the configuration for individual additional
11922/// subnetwork attached to the cluster
11923#[derive(Clone, Default, PartialEq)]
11924#[non_exhaustive]
11925pub struct AdditionalIPRangesConfig {
11926    /// Name of the subnetwork. This can be the full path of the subnetwork or
11927    /// just the name.
11928    /// Example1: my-subnet
11929    /// Example2: projects/gke-project/regions/us-central1/subnetworks/my-subnet
11930    pub subnetwork: std::string::String,
11931
11932    /// List of secondary ranges names within this subnetwork that can be used for
11933    /// pod IPs.
11934    /// Example1: gke-pod-range1
11935    /// Example2: gke-pod-range1,gke-pod-range2
11936    pub pod_ipv4_range_names: std::vec::Vec<std::string::String>,
11937
11938    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11939}
11940
11941impl AdditionalIPRangesConfig {
11942    pub fn new() -> Self {
11943        std::default::Default::default()
11944    }
11945
11946    /// Sets the value of [subnetwork][crate::model::AdditionalIPRangesConfig::subnetwork].
11947    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11948        self.subnetwork = v.into();
11949        self
11950    }
11951
11952    /// Sets the value of [pod_ipv4_range_names][crate::model::AdditionalIPRangesConfig::pod_ipv4_range_names].
11953    pub fn set_pod_ipv4_range_names<T, V>(mut self, v: T) -> Self
11954    where
11955        T: std::iter::IntoIterator<Item = V>,
11956        V: std::convert::Into<std::string::String>,
11957    {
11958        use std::iter::Iterator;
11959        self.pod_ipv4_range_names = v.into_iter().map(|i| i.into()).collect();
11960        self
11961    }
11962}
11963
11964impl wkt::message::Message for AdditionalIPRangesConfig {
11965    fn typename() -> &'static str {
11966        "type.googleapis.com/google.container.v1.AdditionalIPRangesConfig"
11967    }
11968}
11969
11970/// DesiredAdditionalIPRangesConfig is a wrapper used for cluster update
11971/// operation and contains multiple AdditionalIPRangesConfigs.
11972#[derive(Clone, Default, PartialEq)]
11973#[non_exhaustive]
11974pub struct DesiredAdditionalIPRangesConfig {
11975    /// List of additional IP ranges configs where each AdditionalIPRangesConfig
11976    /// corresponds to one subnetwork's IP ranges
11977    pub additional_ip_ranges_configs: std::vec::Vec<crate::model::AdditionalIPRangesConfig>,
11978
11979    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11980}
11981
11982impl DesiredAdditionalIPRangesConfig {
11983    pub fn new() -> Self {
11984        std::default::Default::default()
11985    }
11986
11987    /// Sets the value of [additional_ip_ranges_configs][crate::model::DesiredAdditionalIPRangesConfig::additional_ip_ranges_configs].
11988    pub fn set_additional_ip_ranges_configs<T, V>(mut self, v: T) -> Self
11989    where
11990        T: std::iter::IntoIterator<Item = V>,
11991        V: std::convert::Into<crate::model::AdditionalIPRangesConfig>,
11992    {
11993        use std::iter::Iterator;
11994        self.additional_ip_ranges_configs = v.into_iter().map(|i| i.into()).collect();
11995        self
11996    }
11997}
11998
11999impl wkt::message::Message for DesiredAdditionalIPRangesConfig {
12000    fn typename() -> &'static str {
12001        "type.googleapis.com/google.container.v1.DesiredAdditionalIPRangesConfig"
12002    }
12003}
12004
12005/// AutoIpamConfig contains all information related to Auto IPAM
12006#[derive(Clone, Default, PartialEq)]
12007#[non_exhaustive]
12008pub struct AutoIpamConfig {
12009    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12010}
12011
12012impl AutoIpamConfig {
12013    pub fn new() -> Self {
12014        std::default::Default::default()
12015    }
12016}
12017
12018impl wkt::message::Message for AutoIpamConfig {
12019    fn typename() -> &'static str {
12020        "type.googleapis.com/google.container.v1.AutoIpamConfig"
12021    }
12022}
12023
12024/// RangeInfo contains the range name and the range utilization by this cluster.
12025#[derive(Clone, Default, PartialEq)]
12026#[non_exhaustive]
12027pub struct RangeInfo {
12028    /// Output only. Name of a range.
12029    pub range_name: std::string::String,
12030
12031    /// Output only. The utilization of the range.
12032    pub utilization: f64,
12033
12034    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12035}
12036
12037impl RangeInfo {
12038    pub fn new() -> Self {
12039        std::default::Default::default()
12040    }
12041
12042    /// Sets the value of [range_name][crate::model::RangeInfo::range_name].
12043    pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12044        self.range_name = v.into();
12045        self
12046    }
12047
12048    /// Sets the value of [utilization][crate::model::RangeInfo::utilization].
12049    pub fn set_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12050        self.utilization = v.into();
12051        self
12052    }
12053}
12054
12055impl wkt::message::Message for RangeInfo {
12056    fn typename() -> &'static str {
12057        "type.googleapis.com/google.container.v1.RangeInfo"
12058    }
12059}
12060
12061/// DesiredEnterpriseConfig is a wrapper used for updating enterprise_config.
12062#[derive(Clone, Default, PartialEq)]
12063#[non_exhaustive]
12064pub struct DesiredEnterpriseConfig {
12065    /// desired_tier specifies the desired tier of the cluster.
12066    pub desired_tier: crate::model::enterprise_config::ClusterTier,
12067
12068    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12069}
12070
12071impl DesiredEnterpriseConfig {
12072    pub fn new() -> Self {
12073        std::default::Default::default()
12074    }
12075
12076    /// Sets the value of [desired_tier][crate::model::DesiredEnterpriseConfig::desired_tier].
12077    pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
12078        mut self,
12079        v: T,
12080    ) -> Self {
12081        self.desired_tier = v.into();
12082        self
12083    }
12084}
12085
12086impl wkt::message::Message for DesiredEnterpriseConfig {
12087    fn typename() -> &'static str {
12088        "type.googleapis.com/google.container.v1.DesiredEnterpriseConfig"
12089    }
12090}
12091
12092/// This operation resource represents operations that may have happened or are
12093/// happening on the cluster. All fields are output only.
12094#[derive(Clone, Default, PartialEq)]
12095#[non_exhaustive]
12096pub struct Operation {
12097    /// Output only. The server-assigned ID for the operation.
12098    pub name: std::string::String,
12099
12100    /// Output only. The name of the Google Compute Engine
12101    /// [zone](https://cloud.google.com/compute/docs/zones#available)
12102    /// in which the operation is taking place. This field is deprecated, use
12103    /// location instead.
12104    #[deprecated]
12105    pub zone: std::string::String,
12106
12107    /// Output only. The operation type.
12108    pub operation_type: crate::model::operation::Type,
12109
12110    /// Output only. The current status of the operation.
12111    pub status: crate::model::operation::Status,
12112
12113    /// Output only. Detailed operation progress, if available.
12114    pub detail: std::string::String,
12115
12116    /// Output only. If an error has occurred, a textual description of the error.
12117    /// Deprecated. Use the field error instead.
12118    #[deprecated]
12119    pub status_message: std::string::String,
12120
12121    /// Output only. Server-defined URI for the operation. Example:
12122    /// `<https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123>`.
12123    pub self_link: std::string::String,
12124
12125    /// Output only. Server-defined URI for the target of the operation. The format
12126    /// of this is a URI to the resource being modified (such as a cluster, node
12127    /// pool, or node). For node pool repairs, there may be multiple nodes being
12128    /// repaired, but only one will be the target.
12129    ///
12130    /// Examples:
12131    ///
12132    ///
12133    /// ##
12134    ///
12135    /// `<https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster>`
12136    ///
12137    /// ##
12138    ///
12139    /// `<https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np>`
12140    ///
12141    /// `<https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node>`
12142    pub target_link: std::string::String,
12143
12144    /// Output only. The name of the Google Compute Engine
12145    /// [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
12146    /// or
12147    /// [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
12148    /// in which the cluster resides.
12149    pub location: std::string::String,
12150
12151    /// Output only. The time the operation started, in
12152    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
12153    pub start_time: std::string::String,
12154
12155    /// Output only. The time the operation completed, in
12156    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
12157    pub end_time: std::string::String,
12158
12159    /// Output only. Progress information for an operation.
12160    pub progress: std::option::Option<crate::model::OperationProgress>,
12161
12162    /// Which conditions caused the current cluster state.
12163    /// Deprecated. Use field error instead.
12164    #[deprecated]
12165    pub cluster_conditions: std::vec::Vec<crate::model::StatusCondition>,
12166
12167    /// Which conditions caused the current node pool state.
12168    /// Deprecated. Use field error instead.
12169    #[deprecated]
12170    pub nodepool_conditions: std::vec::Vec<crate::model::StatusCondition>,
12171
12172    /// The error result of the operation in case of failure.
12173    pub error: std::option::Option<rpc::model::Status>,
12174
12175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12176}
12177
12178impl Operation {
12179    pub fn new() -> Self {
12180        std::default::Default::default()
12181    }
12182
12183    /// Sets the value of [name][crate::model::Operation::name].
12184    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12185        self.name = v.into();
12186        self
12187    }
12188
12189    /// Sets the value of [zone][crate::model::Operation::zone].
12190    #[deprecated]
12191    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12192        self.zone = v.into();
12193        self
12194    }
12195
12196    /// Sets the value of [operation_type][crate::model::Operation::operation_type].
12197    pub fn set_operation_type<T: std::convert::Into<crate::model::operation::Type>>(
12198        mut self,
12199        v: T,
12200    ) -> Self {
12201        self.operation_type = v.into();
12202        self
12203    }
12204
12205    /// Sets the value of [status][crate::model::Operation::status].
12206    pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
12207        mut self,
12208        v: T,
12209    ) -> Self {
12210        self.status = v.into();
12211        self
12212    }
12213
12214    /// Sets the value of [detail][crate::model::Operation::detail].
12215    pub fn set_detail<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12216        self.detail = v.into();
12217        self
12218    }
12219
12220    /// Sets the value of [status_message][crate::model::Operation::status_message].
12221    #[deprecated]
12222    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12223        self.status_message = v.into();
12224        self
12225    }
12226
12227    /// Sets the value of [self_link][crate::model::Operation::self_link].
12228    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12229        self.self_link = v.into();
12230        self
12231    }
12232
12233    /// Sets the value of [target_link][crate::model::Operation::target_link].
12234    pub fn set_target_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12235        self.target_link = v.into();
12236        self
12237    }
12238
12239    /// Sets the value of [location][crate::model::Operation::location].
12240    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12241        self.location = v.into();
12242        self
12243    }
12244
12245    /// Sets the value of [start_time][crate::model::Operation::start_time].
12246    pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12247        self.start_time = v.into();
12248        self
12249    }
12250
12251    /// Sets the value of [end_time][crate::model::Operation::end_time].
12252    pub fn set_end_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12253        self.end_time = v.into();
12254        self
12255    }
12256
12257    /// Sets the value of [progress][crate::model::Operation::progress].
12258    pub fn set_progress<T>(mut self, v: T) -> Self
12259    where
12260        T: std::convert::Into<crate::model::OperationProgress>,
12261    {
12262        self.progress = std::option::Option::Some(v.into());
12263        self
12264    }
12265
12266    /// Sets or clears the value of [progress][crate::model::Operation::progress].
12267    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
12268    where
12269        T: std::convert::Into<crate::model::OperationProgress>,
12270    {
12271        self.progress = v.map(|x| x.into());
12272        self
12273    }
12274
12275    /// Sets the value of [cluster_conditions][crate::model::Operation::cluster_conditions].
12276    #[deprecated]
12277    pub fn set_cluster_conditions<T, V>(mut self, v: T) -> Self
12278    where
12279        T: std::iter::IntoIterator<Item = V>,
12280        V: std::convert::Into<crate::model::StatusCondition>,
12281    {
12282        use std::iter::Iterator;
12283        self.cluster_conditions = v.into_iter().map(|i| i.into()).collect();
12284        self
12285    }
12286
12287    /// Sets the value of [nodepool_conditions][crate::model::Operation::nodepool_conditions].
12288    #[deprecated]
12289    pub fn set_nodepool_conditions<T, V>(mut self, v: T) -> Self
12290    where
12291        T: std::iter::IntoIterator<Item = V>,
12292        V: std::convert::Into<crate::model::StatusCondition>,
12293    {
12294        use std::iter::Iterator;
12295        self.nodepool_conditions = v.into_iter().map(|i| i.into()).collect();
12296        self
12297    }
12298
12299    /// Sets the value of [error][crate::model::Operation::error].
12300    pub fn set_error<T>(mut self, v: T) -> Self
12301    where
12302        T: std::convert::Into<rpc::model::Status>,
12303    {
12304        self.error = std::option::Option::Some(v.into());
12305        self
12306    }
12307
12308    /// Sets or clears the value of [error][crate::model::Operation::error].
12309    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
12310    where
12311        T: std::convert::Into<rpc::model::Status>,
12312    {
12313        self.error = v.map(|x| x.into());
12314        self
12315    }
12316}
12317
12318impl wkt::message::Message for Operation {
12319    fn typename() -> &'static str {
12320        "type.googleapis.com/google.container.v1.Operation"
12321    }
12322}
12323
12324/// Defines additional types related to [Operation].
12325pub mod operation {
12326    #[allow(unused_imports)]
12327    use super::*;
12328
12329    /// Current status of the operation.
12330    ///
12331    /// # Working with unknown values
12332    ///
12333    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12334    /// additional enum variants at any time. Adding new variants is not considered
12335    /// a breaking change. Applications should write their code in anticipation of:
12336    ///
12337    /// - New values appearing in future releases of the client library, **and**
12338    /// - New values received dynamically, without application changes.
12339    ///
12340    /// Please consult the [Working with enums] section in the user guide for some
12341    /// guidelines.
12342    ///
12343    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12344    #[derive(Clone, Debug, PartialEq)]
12345    #[non_exhaustive]
12346    pub enum Status {
12347        /// Not set.
12348        Unspecified,
12349        /// The operation has been created.
12350        Pending,
12351        /// The operation is currently running.
12352        Running,
12353        /// The operation is done, either cancelled or completed.
12354        Done,
12355        /// The operation is aborting.
12356        Aborting,
12357        /// If set, the enum was initialized with an unknown value.
12358        ///
12359        /// Applications can examine the value using [Status::value] or
12360        /// [Status::name].
12361        UnknownValue(status::UnknownValue),
12362    }
12363
12364    #[doc(hidden)]
12365    pub mod status {
12366        #[allow(unused_imports)]
12367        use super::*;
12368        #[derive(Clone, Debug, PartialEq)]
12369        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12370    }
12371
12372    impl Status {
12373        /// Gets the enum value.
12374        ///
12375        /// Returns `None` if the enum contains an unknown value deserialized from
12376        /// the string representation of enums.
12377        pub fn value(&self) -> std::option::Option<i32> {
12378            match self {
12379                Self::Unspecified => std::option::Option::Some(0),
12380                Self::Pending => std::option::Option::Some(1),
12381                Self::Running => std::option::Option::Some(2),
12382                Self::Done => std::option::Option::Some(3),
12383                Self::Aborting => std::option::Option::Some(4),
12384                Self::UnknownValue(u) => u.0.value(),
12385            }
12386        }
12387
12388        /// Gets the enum value as a string.
12389        ///
12390        /// Returns `None` if the enum contains an unknown value deserialized from
12391        /// the integer representation of enums.
12392        pub fn name(&self) -> std::option::Option<&str> {
12393            match self {
12394                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
12395                Self::Pending => std::option::Option::Some("PENDING"),
12396                Self::Running => std::option::Option::Some("RUNNING"),
12397                Self::Done => std::option::Option::Some("DONE"),
12398                Self::Aborting => std::option::Option::Some("ABORTING"),
12399                Self::UnknownValue(u) => u.0.name(),
12400            }
12401        }
12402    }
12403
12404    impl std::default::Default for Status {
12405        fn default() -> Self {
12406            use std::convert::From;
12407            Self::from(0)
12408        }
12409    }
12410
12411    impl std::fmt::Display for Status {
12412        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12413            wkt::internal::display_enum(f, self.name(), self.value())
12414        }
12415    }
12416
12417    impl std::convert::From<i32> for Status {
12418        fn from(value: i32) -> Self {
12419            match value {
12420                0 => Self::Unspecified,
12421                1 => Self::Pending,
12422                2 => Self::Running,
12423                3 => Self::Done,
12424                4 => Self::Aborting,
12425                _ => Self::UnknownValue(status::UnknownValue(
12426                    wkt::internal::UnknownEnumValue::Integer(value),
12427                )),
12428            }
12429        }
12430    }
12431
12432    impl std::convert::From<&str> for Status {
12433        fn from(value: &str) -> Self {
12434            use std::string::ToString;
12435            match value {
12436                "STATUS_UNSPECIFIED" => Self::Unspecified,
12437                "PENDING" => Self::Pending,
12438                "RUNNING" => Self::Running,
12439                "DONE" => Self::Done,
12440                "ABORTING" => Self::Aborting,
12441                _ => Self::UnknownValue(status::UnknownValue(
12442                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12443                )),
12444            }
12445        }
12446    }
12447
12448    impl serde::ser::Serialize for Status {
12449        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12450        where
12451            S: serde::Serializer,
12452        {
12453            match self {
12454                Self::Unspecified => serializer.serialize_i32(0),
12455                Self::Pending => serializer.serialize_i32(1),
12456                Self::Running => serializer.serialize_i32(2),
12457                Self::Done => serializer.serialize_i32(3),
12458                Self::Aborting => serializer.serialize_i32(4),
12459                Self::UnknownValue(u) => u.0.serialize(serializer),
12460            }
12461        }
12462    }
12463
12464    impl<'de> serde::de::Deserialize<'de> for Status {
12465        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12466        where
12467            D: serde::Deserializer<'de>,
12468        {
12469            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
12470                ".google.container.v1.Operation.Status",
12471            ))
12472        }
12473    }
12474
12475    /// Operation type categorizes the operation.
12476    ///
12477    /// # Working with unknown values
12478    ///
12479    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12480    /// additional enum variants at any time. Adding new variants is not considered
12481    /// a breaking change. Applications should write their code in anticipation of:
12482    ///
12483    /// - New values appearing in future releases of the client library, **and**
12484    /// - New values received dynamically, without application changes.
12485    ///
12486    /// Please consult the [Working with enums] section in the user guide for some
12487    /// guidelines.
12488    ///
12489    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12490    #[derive(Clone, Debug, PartialEq)]
12491    #[non_exhaustive]
12492    pub enum Type {
12493        /// Not set.
12494        Unspecified,
12495        /// The cluster is being created. The cluster should be assumed to be
12496        /// unusable until the operation finishes.
12497        ///
12498        /// In the event of the operation failing, the cluster will enter the
12499        /// [ERROR state][google.container.v1.Cluster.Status.ERROR] and eventually be
12500        /// deleted.
12501        ///
12502        /// [google.container.v1.Cluster.Status.ERROR]: crate::model::cluster::Status::Error
12503        CreateCluster,
12504        /// The cluster is being deleted. The cluster should be assumed to be
12505        /// unusable as soon as this operation starts.
12506        ///
12507        /// In the event of the operation failing, the cluster will enter the
12508        /// [ERROR state][google.container.v1.Cluster.Status.ERROR] and the deletion
12509        /// will be automatically retried until completed.
12510        ///
12511        /// [google.container.v1.Cluster.Status.ERROR]: crate::model::cluster::Status::Error
12512        DeleteCluster,
12513        /// The [cluster
12514        /// version][google.container.v1.ClusterUpdate.desired_master_version] is
12515        /// being updated. Note that this includes "upgrades" to the same version,
12516        /// which are simply a recreation. This also includes
12517        /// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically).
12518        /// For more details, see [documentation on cluster
12519        /// upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades).
12520        ///
12521        /// [google.container.v1.ClusterUpdate.desired_master_version]: crate::model::ClusterUpdate::desired_master_version
12522        UpgradeMaster,
12523        /// A node pool is being updated. Despite calling this an "upgrade", this
12524        /// includes most forms of updates to node pools. This also includes
12525        /// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades).
12526        ///
12527        /// This operation sets the
12528        /// [progress][google.container.v1.Operation.progress] field and may be
12529        /// [canceled][google.container.v1.ClusterManager.CancelOperation].
12530        ///
12531        /// The upgrade strategy depends on [node pool
12532        /// configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies).
12533        /// The nodes are generally still usable during this operation.
12534        ///
12535        /// [google.container.v1.ClusterManager.CancelOperation]: crate::client::ClusterManager::cancel_operation
12536        /// [google.container.v1.Operation.progress]: crate::model::Operation::progress
12537        UpgradeNodes,
12538        /// A problem has been detected with the control plane and is being repaired.
12539        /// This operation type is initiated by GKE. For more details, see
12540        /// [documentation on
12541        /// repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
12542        RepairCluster,
12543        /// The cluster is being updated. This is a broad category of operations and
12544        /// includes operations that only change metadata as well as those that must
12545        /// recreate the entire cluster. If the control plane must be recreated, this
12546        /// will cause temporary downtime for zonal clusters.
12547        ///
12548        /// Some features require recreating the nodes as well. Those will be
12549        /// recreated as separate operations and the update may not be completely
12550        /// functional until the node pools recreations finish. Node recreations will
12551        /// generally follow [maintenance
12552        /// policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions).
12553        ///
12554        /// Some GKE-initiated operations use this type. This includes certain types
12555        /// of auto-upgrades and incident mitigations.
12556        UpdateCluster,
12557        /// A node pool is being created. The node pool should be assumed to be
12558        /// unusable until this operation finishes. In the event of an error, the
12559        /// node pool may be partially created.
12560        ///
12561        /// If enabled, [node
12562        /// autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning)
12563        /// may have automatically initiated such operations.
12564        CreateNodePool,
12565        /// The node pool is being deleted. The node pool should be assumed to be
12566        /// unusable as soon as this operation starts.
12567        DeleteNodePool,
12568        /// The node pool's [manamagent][google.container.v1.NodePool.management]
12569        /// field is being updated. These operations only update metadata and may be
12570        /// concurrent with most other operations.
12571        ///
12572        /// [google.container.v1.NodePool.management]: crate::model::NodePool::management
12573        SetNodePoolManagement,
12574        /// A problem has been detected with nodes and [they are being
12575        /// repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair).
12576        /// This operation type is initiated by GKE, typically automatically. This
12577        /// operation may be concurrent with other operations and there may be
12578        /// multiple repairs occurring on the same node pool.
12579        AutoRepairNodes,
12580        /// Unused. Automatic node upgrade uses
12581        /// [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES].
12582        ///
12583        /// [google.container.v1.Operation.Type.UPGRADE_NODES]: crate::model::operation::Type::UpgradeNodes
12584        #[deprecated]
12585        AutoUpgradeNodes,
12586        /// Unused. Updating labels uses
12587        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
12588        ///
12589        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
12590        #[deprecated]
12591        SetLabels,
12592        /// Unused. Updating master auth uses
12593        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
12594        ///
12595        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
12596        #[deprecated]
12597        SetMasterAuth,
12598        /// The node pool is being resized. With the exception of resizing to or from
12599        /// size zero, the node pool is generally usable during this operation.
12600        SetNodePoolSize,
12601        /// Unused. Updating network policy uses
12602        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
12603        ///
12604        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
12605        #[deprecated]
12606        SetNetworkPolicy,
12607        /// Unused. Updating maintenance policy uses
12608        /// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
12609        ///
12610        /// [google.container.v1.Operation.Type.UPDATE_CLUSTER]: crate::model::operation::Type::UpdateCluster
12611        #[deprecated]
12612        SetMaintenancePolicy,
12613        /// The control plane is being resized. This operation type is initiated by
12614        /// GKE. These operations are often performed preemptively to ensure that the
12615        /// control plane has sufficient resources and is not typically an indication
12616        /// of issues. For more details, see
12617        /// [documentation on
12618        /// resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
12619        ResizeCluster,
12620        /// Fleet features of GKE Enterprise are being upgraded. The cluster should
12621        /// be assumed to be blocked for other upgrades until the operation finishes.
12622        FleetFeatureUpgrade,
12623        /// If set, the enum was initialized with an unknown value.
12624        ///
12625        /// Applications can examine the value using [Type::value] or
12626        /// [Type::name].
12627        UnknownValue(r#type::UnknownValue),
12628    }
12629
12630    #[doc(hidden)]
12631    pub mod r#type {
12632        #[allow(unused_imports)]
12633        use super::*;
12634        #[derive(Clone, Debug, PartialEq)]
12635        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12636    }
12637
12638    impl Type {
12639        /// Gets the enum value.
12640        ///
12641        /// Returns `None` if the enum contains an unknown value deserialized from
12642        /// the string representation of enums.
12643        pub fn value(&self) -> std::option::Option<i32> {
12644            match self {
12645                Self::Unspecified => std::option::Option::Some(0),
12646                Self::CreateCluster => std::option::Option::Some(1),
12647                Self::DeleteCluster => std::option::Option::Some(2),
12648                Self::UpgradeMaster => std::option::Option::Some(3),
12649                Self::UpgradeNodes => std::option::Option::Some(4),
12650                Self::RepairCluster => std::option::Option::Some(5),
12651                Self::UpdateCluster => std::option::Option::Some(6),
12652                Self::CreateNodePool => std::option::Option::Some(7),
12653                Self::DeleteNodePool => std::option::Option::Some(8),
12654                Self::SetNodePoolManagement => std::option::Option::Some(9),
12655                Self::AutoRepairNodes => std::option::Option::Some(10),
12656                Self::AutoUpgradeNodes => std::option::Option::Some(11),
12657                Self::SetLabels => std::option::Option::Some(12),
12658                Self::SetMasterAuth => std::option::Option::Some(13),
12659                Self::SetNodePoolSize => std::option::Option::Some(14),
12660                Self::SetNetworkPolicy => std::option::Option::Some(15),
12661                Self::SetMaintenancePolicy => std::option::Option::Some(16),
12662                Self::ResizeCluster => std::option::Option::Some(18),
12663                Self::FleetFeatureUpgrade => std::option::Option::Some(19),
12664                Self::UnknownValue(u) => u.0.value(),
12665            }
12666        }
12667
12668        /// Gets the enum value as a string.
12669        ///
12670        /// Returns `None` if the enum contains an unknown value deserialized from
12671        /// the integer representation of enums.
12672        pub fn name(&self) -> std::option::Option<&str> {
12673            match self {
12674                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
12675                Self::CreateCluster => std::option::Option::Some("CREATE_CLUSTER"),
12676                Self::DeleteCluster => std::option::Option::Some("DELETE_CLUSTER"),
12677                Self::UpgradeMaster => std::option::Option::Some("UPGRADE_MASTER"),
12678                Self::UpgradeNodes => std::option::Option::Some("UPGRADE_NODES"),
12679                Self::RepairCluster => std::option::Option::Some("REPAIR_CLUSTER"),
12680                Self::UpdateCluster => std::option::Option::Some("UPDATE_CLUSTER"),
12681                Self::CreateNodePool => std::option::Option::Some("CREATE_NODE_POOL"),
12682                Self::DeleteNodePool => std::option::Option::Some("DELETE_NODE_POOL"),
12683                Self::SetNodePoolManagement => {
12684                    std::option::Option::Some("SET_NODE_POOL_MANAGEMENT")
12685                }
12686                Self::AutoRepairNodes => std::option::Option::Some("AUTO_REPAIR_NODES"),
12687                Self::AutoUpgradeNodes => std::option::Option::Some("AUTO_UPGRADE_NODES"),
12688                Self::SetLabels => std::option::Option::Some("SET_LABELS"),
12689                Self::SetMasterAuth => std::option::Option::Some("SET_MASTER_AUTH"),
12690                Self::SetNodePoolSize => std::option::Option::Some("SET_NODE_POOL_SIZE"),
12691                Self::SetNetworkPolicy => std::option::Option::Some("SET_NETWORK_POLICY"),
12692                Self::SetMaintenancePolicy => std::option::Option::Some("SET_MAINTENANCE_POLICY"),
12693                Self::ResizeCluster => std::option::Option::Some("RESIZE_CLUSTER"),
12694                Self::FleetFeatureUpgrade => std::option::Option::Some("FLEET_FEATURE_UPGRADE"),
12695                Self::UnknownValue(u) => u.0.name(),
12696            }
12697        }
12698    }
12699
12700    impl std::default::Default for Type {
12701        fn default() -> Self {
12702            use std::convert::From;
12703            Self::from(0)
12704        }
12705    }
12706
12707    impl std::fmt::Display for Type {
12708        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12709            wkt::internal::display_enum(f, self.name(), self.value())
12710        }
12711    }
12712
12713    impl std::convert::From<i32> for Type {
12714        fn from(value: i32) -> Self {
12715            match value {
12716                0 => Self::Unspecified,
12717                1 => Self::CreateCluster,
12718                2 => Self::DeleteCluster,
12719                3 => Self::UpgradeMaster,
12720                4 => Self::UpgradeNodes,
12721                5 => Self::RepairCluster,
12722                6 => Self::UpdateCluster,
12723                7 => Self::CreateNodePool,
12724                8 => Self::DeleteNodePool,
12725                9 => Self::SetNodePoolManagement,
12726                10 => Self::AutoRepairNodes,
12727                11 => Self::AutoUpgradeNodes,
12728                12 => Self::SetLabels,
12729                13 => Self::SetMasterAuth,
12730                14 => Self::SetNodePoolSize,
12731                15 => Self::SetNetworkPolicy,
12732                16 => Self::SetMaintenancePolicy,
12733                18 => Self::ResizeCluster,
12734                19 => Self::FleetFeatureUpgrade,
12735                _ => Self::UnknownValue(r#type::UnknownValue(
12736                    wkt::internal::UnknownEnumValue::Integer(value),
12737                )),
12738            }
12739        }
12740    }
12741
12742    impl std::convert::From<&str> for Type {
12743        fn from(value: &str) -> Self {
12744            use std::string::ToString;
12745            match value {
12746                "TYPE_UNSPECIFIED" => Self::Unspecified,
12747                "CREATE_CLUSTER" => Self::CreateCluster,
12748                "DELETE_CLUSTER" => Self::DeleteCluster,
12749                "UPGRADE_MASTER" => Self::UpgradeMaster,
12750                "UPGRADE_NODES" => Self::UpgradeNodes,
12751                "REPAIR_CLUSTER" => Self::RepairCluster,
12752                "UPDATE_CLUSTER" => Self::UpdateCluster,
12753                "CREATE_NODE_POOL" => Self::CreateNodePool,
12754                "DELETE_NODE_POOL" => Self::DeleteNodePool,
12755                "SET_NODE_POOL_MANAGEMENT" => Self::SetNodePoolManagement,
12756                "AUTO_REPAIR_NODES" => Self::AutoRepairNodes,
12757                "AUTO_UPGRADE_NODES" => Self::AutoUpgradeNodes,
12758                "SET_LABELS" => Self::SetLabels,
12759                "SET_MASTER_AUTH" => Self::SetMasterAuth,
12760                "SET_NODE_POOL_SIZE" => Self::SetNodePoolSize,
12761                "SET_NETWORK_POLICY" => Self::SetNetworkPolicy,
12762                "SET_MAINTENANCE_POLICY" => Self::SetMaintenancePolicy,
12763                "RESIZE_CLUSTER" => Self::ResizeCluster,
12764                "FLEET_FEATURE_UPGRADE" => Self::FleetFeatureUpgrade,
12765                _ => Self::UnknownValue(r#type::UnknownValue(
12766                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12767                )),
12768            }
12769        }
12770    }
12771
12772    impl serde::ser::Serialize for Type {
12773        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12774        where
12775            S: serde::Serializer,
12776        {
12777            match self {
12778                Self::Unspecified => serializer.serialize_i32(0),
12779                Self::CreateCluster => serializer.serialize_i32(1),
12780                Self::DeleteCluster => serializer.serialize_i32(2),
12781                Self::UpgradeMaster => serializer.serialize_i32(3),
12782                Self::UpgradeNodes => serializer.serialize_i32(4),
12783                Self::RepairCluster => serializer.serialize_i32(5),
12784                Self::UpdateCluster => serializer.serialize_i32(6),
12785                Self::CreateNodePool => serializer.serialize_i32(7),
12786                Self::DeleteNodePool => serializer.serialize_i32(8),
12787                Self::SetNodePoolManagement => serializer.serialize_i32(9),
12788                Self::AutoRepairNodes => serializer.serialize_i32(10),
12789                Self::AutoUpgradeNodes => serializer.serialize_i32(11),
12790                Self::SetLabels => serializer.serialize_i32(12),
12791                Self::SetMasterAuth => serializer.serialize_i32(13),
12792                Self::SetNodePoolSize => serializer.serialize_i32(14),
12793                Self::SetNetworkPolicy => serializer.serialize_i32(15),
12794                Self::SetMaintenancePolicy => serializer.serialize_i32(16),
12795                Self::ResizeCluster => serializer.serialize_i32(18),
12796                Self::FleetFeatureUpgrade => serializer.serialize_i32(19),
12797                Self::UnknownValue(u) => u.0.serialize(serializer),
12798            }
12799        }
12800    }
12801
12802    impl<'de> serde::de::Deserialize<'de> for Type {
12803        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12804        where
12805            D: serde::Deserializer<'de>,
12806        {
12807            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
12808                ".google.container.v1.Operation.Type",
12809            ))
12810        }
12811    }
12812}
12813
12814/// Information about operation (or operation stage) progress.
12815#[derive(Clone, Default, PartialEq)]
12816#[non_exhaustive]
12817pub struct OperationProgress {
12818    /// A non-parameterized string describing an operation stage.
12819    /// Unset for single-stage operations.
12820    pub name: std::string::String,
12821
12822    /// Status of an operation stage.
12823    /// Unset for single-stage operations.
12824    pub status: crate::model::operation::Status,
12825
12826    /// Progress metric bundle, for example:
12827    /// metrics: [{name: "nodes done",     int_value: 15},
12828    /// {name: "nodes total",    int_value: 32}]
12829    /// or
12830    /// metrics: [{name: "progress",       double_value: 0.56},
12831    /// {name: "progress scale", double_value: 1.0}]
12832    pub metrics: std::vec::Vec<crate::model::operation_progress::Metric>,
12833
12834    /// Substages of an operation or a stage.
12835    pub stages: std::vec::Vec<crate::model::OperationProgress>,
12836
12837    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12838}
12839
12840impl OperationProgress {
12841    pub fn new() -> Self {
12842        std::default::Default::default()
12843    }
12844
12845    /// Sets the value of [name][crate::model::OperationProgress::name].
12846    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12847        self.name = v.into();
12848        self
12849    }
12850
12851    /// Sets the value of [status][crate::model::OperationProgress::status].
12852    pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
12853        mut self,
12854        v: T,
12855    ) -> Self {
12856        self.status = v.into();
12857        self
12858    }
12859
12860    /// Sets the value of [metrics][crate::model::OperationProgress::metrics].
12861    pub fn set_metrics<T, V>(mut self, v: T) -> Self
12862    where
12863        T: std::iter::IntoIterator<Item = V>,
12864        V: std::convert::Into<crate::model::operation_progress::Metric>,
12865    {
12866        use std::iter::Iterator;
12867        self.metrics = v.into_iter().map(|i| i.into()).collect();
12868        self
12869    }
12870
12871    /// Sets the value of [stages][crate::model::OperationProgress::stages].
12872    pub fn set_stages<T, V>(mut self, v: T) -> Self
12873    where
12874        T: std::iter::IntoIterator<Item = V>,
12875        V: std::convert::Into<crate::model::OperationProgress>,
12876    {
12877        use std::iter::Iterator;
12878        self.stages = v.into_iter().map(|i| i.into()).collect();
12879        self
12880    }
12881}
12882
12883impl wkt::message::Message for OperationProgress {
12884    fn typename() -> &'static str {
12885        "type.googleapis.com/google.container.v1.OperationProgress"
12886    }
12887}
12888
12889/// Defines additional types related to [OperationProgress].
12890pub mod operation_progress {
12891    #[allow(unused_imports)]
12892    use super::*;
12893
12894    /// Progress metric is (string, int|float|string) pair.
12895    #[derive(Clone, Default, PartialEq)]
12896    #[non_exhaustive]
12897    pub struct Metric {
12898        /// Required. Metric name, e.g., "nodes total", "percent done".
12899        pub name: std::string::String,
12900
12901        /// Strictly one of the values is required.
12902        pub value: std::option::Option<crate::model::operation_progress::metric::Value>,
12903
12904        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12905    }
12906
12907    impl Metric {
12908        pub fn new() -> Self {
12909            std::default::Default::default()
12910        }
12911
12912        /// Sets the value of [name][crate::model::operation_progress::Metric::name].
12913        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12914            self.name = v.into();
12915            self
12916        }
12917
12918        /// Sets the value of [value][crate::model::operation_progress::Metric::value].
12919        ///
12920        /// Note that all the setters affecting `value` are mutually
12921        /// exclusive.
12922        pub fn set_value<
12923            T: std::convert::Into<
12924                    std::option::Option<crate::model::operation_progress::metric::Value>,
12925                >,
12926        >(
12927            mut self,
12928            v: T,
12929        ) -> Self {
12930            self.value = v.into();
12931            self
12932        }
12933
12934        /// The value of [value][crate::model::operation_progress::Metric::value]
12935        /// if it holds a `IntValue`, `None` if the field is not set or
12936        /// holds a different branch.
12937        pub fn int_value(&self) -> std::option::Option<&i64> {
12938            #[allow(unreachable_patterns)]
12939            self.value.as_ref().and_then(|v| match v {
12940                crate::model::operation_progress::metric::Value::IntValue(v) => {
12941                    std::option::Option::Some(v)
12942                }
12943                _ => std::option::Option::None,
12944            })
12945        }
12946
12947        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
12948        /// to hold a `IntValue`.
12949        ///
12950        /// Note that all the setters affecting `value` are
12951        /// mutually exclusive.
12952        pub fn set_int_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12953            self.value = std::option::Option::Some(
12954                crate::model::operation_progress::metric::Value::IntValue(v.into()),
12955            );
12956            self
12957        }
12958
12959        /// The value of [value][crate::model::operation_progress::Metric::value]
12960        /// if it holds a `DoubleValue`, `None` if the field is not set or
12961        /// holds a different branch.
12962        pub fn double_value(&self) -> std::option::Option<&f64> {
12963            #[allow(unreachable_patterns)]
12964            self.value.as_ref().and_then(|v| match v {
12965                crate::model::operation_progress::metric::Value::DoubleValue(v) => {
12966                    std::option::Option::Some(v)
12967                }
12968                _ => std::option::Option::None,
12969            })
12970        }
12971
12972        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
12973        /// to hold a `DoubleValue`.
12974        ///
12975        /// Note that all the setters affecting `value` are
12976        /// mutually exclusive.
12977        pub fn set_double_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12978            self.value = std::option::Option::Some(
12979                crate::model::operation_progress::metric::Value::DoubleValue(v.into()),
12980            );
12981            self
12982        }
12983
12984        /// The value of [value][crate::model::operation_progress::Metric::value]
12985        /// if it holds a `StringValue`, `None` if the field is not set or
12986        /// holds a different branch.
12987        pub fn string_value(&self) -> std::option::Option<&std::string::String> {
12988            #[allow(unreachable_patterns)]
12989            self.value.as_ref().and_then(|v| match v {
12990                crate::model::operation_progress::metric::Value::StringValue(v) => {
12991                    std::option::Option::Some(v)
12992                }
12993                _ => std::option::Option::None,
12994            })
12995        }
12996
12997        /// Sets the value of [value][crate::model::operation_progress::Metric::value]
12998        /// to hold a `StringValue`.
12999        ///
13000        /// Note that all the setters affecting `value` are
13001        /// mutually exclusive.
13002        pub fn set_string_value<T: std::convert::Into<std::string::String>>(
13003            mut self,
13004            v: T,
13005        ) -> Self {
13006            self.value = std::option::Option::Some(
13007                crate::model::operation_progress::metric::Value::StringValue(v.into()),
13008            );
13009            self
13010        }
13011    }
13012
13013    impl wkt::message::Message for Metric {
13014        fn typename() -> &'static str {
13015            "type.googleapis.com/google.container.v1.OperationProgress.Metric"
13016        }
13017    }
13018
13019    /// Defines additional types related to [Metric].
13020    pub mod metric {
13021        #[allow(unused_imports)]
13022        use super::*;
13023
13024        /// Strictly one of the values is required.
13025        #[derive(Clone, Debug, PartialEq)]
13026        #[non_exhaustive]
13027        pub enum Value {
13028            /// For metrics with integer value.
13029            IntValue(i64),
13030            /// For metrics with floating point value.
13031            DoubleValue(f64),
13032            /// For metrics with custom values (ratios, visual progress, etc.).
13033            StringValue(std::string::String),
13034        }
13035    }
13036}
13037
13038/// CreateClusterRequest creates a cluster.
13039#[derive(Clone, Default, PartialEq)]
13040#[non_exhaustive]
13041pub struct CreateClusterRequest {
13042    /// Deprecated. The Google Developers Console [project ID or project
13043    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13044    /// This field has been deprecated and replaced by the parent field.
13045    #[deprecated]
13046    pub project_id: std::string::String,
13047
13048    /// Deprecated. The name of the Google Compute Engine
13049    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13050    /// in which the cluster resides. This field has been deprecated and replaced
13051    /// by the parent field.
13052    #[deprecated]
13053    pub zone: std::string::String,
13054
13055    /// Required. A [cluster
13056    /// resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
13057    pub cluster: std::option::Option<crate::model::Cluster>,
13058
13059    /// The parent (project and location) where the cluster will be created.
13060    /// Specified in the format `projects/*/locations/*`.
13061    pub parent: std::string::String,
13062
13063    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13064}
13065
13066impl CreateClusterRequest {
13067    pub fn new() -> Self {
13068        std::default::Default::default()
13069    }
13070
13071    /// Sets the value of [project_id][crate::model::CreateClusterRequest::project_id].
13072    #[deprecated]
13073    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13074        self.project_id = v.into();
13075        self
13076    }
13077
13078    /// Sets the value of [zone][crate::model::CreateClusterRequest::zone].
13079    #[deprecated]
13080    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13081        self.zone = v.into();
13082        self
13083    }
13084
13085    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
13086    pub fn set_cluster<T>(mut self, v: T) -> Self
13087    where
13088        T: std::convert::Into<crate::model::Cluster>,
13089    {
13090        self.cluster = std::option::Option::Some(v.into());
13091        self
13092    }
13093
13094    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
13095    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
13096    where
13097        T: std::convert::Into<crate::model::Cluster>,
13098    {
13099        self.cluster = v.map(|x| x.into());
13100        self
13101    }
13102
13103    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
13104    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13105        self.parent = v.into();
13106        self
13107    }
13108}
13109
13110impl wkt::message::Message for CreateClusterRequest {
13111    fn typename() -> &'static str {
13112        "type.googleapis.com/google.container.v1.CreateClusterRequest"
13113    }
13114}
13115
13116/// GetClusterRequest gets the settings of a cluster.
13117#[derive(Clone, Default, PartialEq)]
13118#[non_exhaustive]
13119pub struct GetClusterRequest {
13120    /// Deprecated. The Google Developers Console [project ID or project
13121    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13122    /// This field has been deprecated and replaced by the name field.
13123    #[deprecated]
13124    pub project_id: std::string::String,
13125
13126    /// Deprecated. The name of the Google Compute Engine
13127    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13128    /// in which the cluster resides. This field has been deprecated and replaced
13129    /// by the name field.
13130    #[deprecated]
13131    pub zone: std::string::String,
13132
13133    /// Deprecated. The name of the cluster to retrieve.
13134    /// This field has been deprecated and replaced by the name field.
13135    #[deprecated]
13136    pub cluster_id: std::string::String,
13137
13138    /// The name (project, location, cluster) of the cluster to retrieve.
13139    /// Specified in the format `projects/*/locations/*/clusters/*`.
13140    pub name: std::string::String,
13141
13142    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13143}
13144
13145impl GetClusterRequest {
13146    pub fn new() -> Self {
13147        std::default::Default::default()
13148    }
13149
13150    /// Sets the value of [project_id][crate::model::GetClusterRequest::project_id].
13151    #[deprecated]
13152    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13153        self.project_id = v.into();
13154        self
13155    }
13156
13157    /// Sets the value of [zone][crate::model::GetClusterRequest::zone].
13158    #[deprecated]
13159    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13160        self.zone = v.into();
13161        self
13162    }
13163
13164    /// Sets the value of [cluster_id][crate::model::GetClusterRequest::cluster_id].
13165    #[deprecated]
13166    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13167        self.cluster_id = v.into();
13168        self
13169    }
13170
13171    /// Sets the value of [name][crate::model::GetClusterRequest::name].
13172    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13173        self.name = v.into();
13174        self
13175    }
13176}
13177
13178impl wkt::message::Message for GetClusterRequest {
13179    fn typename() -> &'static str {
13180        "type.googleapis.com/google.container.v1.GetClusterRequest"
13181    }
13182}
13183
13184/// UpdateClusterRequest updates the settings of a cluster.
13185#[derive(Clone, Default, PartialEq)]
13186#[non_exhaustive]
13187pub struct UpdateClusterRequest {
13188    /// Deprecated. The Google Developers Console [project ID or project
13189    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13190    /// This field has been deprecated and replaced by the name field.
13191    #[deprecated]
13192    pub project_id: std::string::String,
13193
13194    /// Deprecated. The name of the Google Compute Engine
13195    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13196    /// in which the cluster resides. This field has been deprecated and replaced
13197    /// by the name field.
13198    #[deprecated]
13199    pub zone: std::string::String,
13200
13201    /// Deprecated. The name of the cluster to upgrade.
13202    /// This field has been deprecated and replaced by the name field.
13203    #[deprecated]
13204    pub cluster_id: std::string::String,
13205
13206    /// Required. A description of the update.
13207    pub update: std::option::Option<crate::model::ClusterUpdate>,
13208
13209    /// The name (project, location, cluster) of the cluster to update.
13210    /// Specified in the format `projects/*/locations/*/clusters/*`.
13211    pub name: std::string::String,
13212
13213    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13214}
13215
13216impl UpdateClusterRequest {
13217    pub fn new() -> Self {
13218        std::default::Default::default()
13219    }
13220
13221    /// Sets the value of [project_id][crate::model::UpdateClusterRequest::project_id].
13222    #[deprecated]
13223    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13224        self.project_id = v.into();
13225        self
13226    }
13227
13228    /// Sets the value of [zone][crate::model::UpdateClusterRequest::zone].
13229    #[deprecated]
13230    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13231        self.zone = v.into();
13232        self
13233    }
13234
13235    /// Sets the value of [cluster_id][crate::model::UpdateClusterRequest::cluster_id].
13236    #[deprecated]
13237    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13238        self.cluster_id = v.into();
13239        self
13240    }
13241
13242    /// Sets the value of [update][crate::model::UpdateClusterRequest::update].
13243    pub fn set_update<T>(mut self, v: T) -> Self
13244    where
13245        T: std::convert::Into<crate::model::ClusterUpdate>,
13246    {
13247        self.update = std::option::Option::Some(v.into());
13248        self
13249    }
13250
13251    /// Sets or clears the value of [update][crate::model::UpdateClusterRequest::update].
13252    pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
13253    where
13254        T: std::convert::Into<crate::model::ClusterUpdate>,
13255    {
13256        self.update = v.map(|x| x.into());
13257        self
13258    }
13259
13260    /// Sets the value of [name][crate::model::UpdateClusterRequest::name].
13261    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13262        self.name = v.into();
13263        self
13264    }
13265}
13266
13267impl wkt::message::Message for UpdateClusterRequest {
13268    fn typename() -> &'static str {
13269        "type.googleapis.com/google.container.v1.UpdateClusterRequest"
13270    }
13271}
13272
13273/// UpdateNodePoolRequests update a node pool's image and/or version.
13274#[derive(Clone, Default, PartialEq)]
13275#[non_exhaustive]
13276pub struct UpdateNodePoolRequest {
13277    /// Deprecated. The Google Developers Console [project ID or project
13278    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13279    /// This field has been deprecated and replaced by the name field.
13280    #[deprecated]
13281    pub project_id: std::string::String,
13282
13283    /// Deprecated. The name of the Google Compute Engine
13284    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13285    /// in which the cluster resides. This field has been deprecated and replaced
13286    /// by the name field.
13287    #[deprecated]
13288    pub zone: std::string::String,
13289
13290    /// Deprecated. The name of the cluster to upgrade.
13291    /// This field has been deprecated and replaced by the name field.
13292    #[deprecated]
13293    pub cluster_id: std::string::String,
13294
13295    /// Deprecated. The name of the node pool to upgrade.
13296    /// This field has been deprecated and replaced by the name field.
13297    #[deprecated]
13298    pub node_pool_id: std::string::String,
13299
13300    /// Required. The Kubernetes version to change the nodes to (typically an
13301    /// upgrade).
13302    ///
13303    /// Users may specify either explicit versions offered by Kubernetes Engine or
13304    /// version aliases, which have the following behavior:
13305    ///
13306    /// - "latest": picks the highest valid Kubernetes version
13307    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
13308    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
13309    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
13310    /// - "-": picks the Kubernetes master version
13311    pub node_version: std::string::String,
13312
13313    /// Required. The desired image type for the node pool. Please see
13314    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images>
13315    /// for available image types.
13316    pub image_type: std::string::String,
13317
13318    /// The name (project, location, cluster, node pool) of the node pool to
13319    /// update. Specified in the format
13320    /// `projects/*/locations/*/clusters/*/nodePools/*`.
13321    pub name: std::string::String,
13322
13323    /// The desired list of Google Compute Engine
13324    /// [zones](https://cloud.google.com/compute/docs/zones#available)
13325    /// in which the node pool's nodes should be located. Changing the locations
13326    /// for a node pool will result in nodes being either created or removed from
13327    /// the node pool, depending on whether locations are being added or removed.
13328    pub locations: std::vec::Vec<std::string::String>,
13329
13330    /// The desired workload metadata config for the node pool.
13331    pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
13332
13333    /// Upgrade settings control disruption and speed of the upgrade.
13334    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
13335
13336    /// The desired network tags to be applied to all nodes in the node pool.
13337    /// If this field is not present, the tags will not be changed. Otherwise,
13338    /// the existing network tags will be *replaced* with the provided tags.
13339    pub tags: std::option::Option<crate::model::NetworkTags>,
13340
13341    /// The desired node taints to be applied to all nodes in the node pool.
13342    /// If this field is not present, the taints will not be changed. Otherwise,
13343    /// the existing node taints will be *replaced* with the provided taints.
13344    pub taints: std::option::Option<crate::model::NodeTaints>,
13345
13346    /// The desired node labels to be applied to all nodes in the node pool.
13347    /// If this field is not present, the labels will not be changed. Otherwise,
13348    /// the existing node labels will be *replaced* with the provided labels.
13349    pub labels: std::option::Option<crate::model::NodeLabels>,
13350
13351    /// Parameters that can be configured on Linux nodes.
13352    pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
13353
13354    /// Node kubelet configs.
13355    pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
13356
13357    /// Node network config.
13358    pub node_network_config: std::option::Option<crate::model::NodeNetworkConfig>,
13359
13360    /// GCFS config.
13361    pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
13362
13363    /// Confidential nodes config.
13364    /// All the nodes in the node pool will be Confidential VM once enabled.
13365    pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
13366
13367    /// Enable or disable gvnic on the node pool.
13368    pub gvnic: std::option::Option<crate::model::VirtualNIC>,
13369
13370    /// The current etag of the node pool.
13371    /// If an etag is provided and does not match the current etag of the node
13372    /// pool, update will be blocked and an ABORTED error will be returned.
13373    pub etag: std::string::String,
13374
13375    /// Enable or disable NCCL fast socket for the node pool.
13376    pub fast_socket: std::option::Option<crate::model::FastSocket>,
13377
13378    /// Logging configuration.
13379    pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
13380
13381    /// The resource labels for the node pool to use to annotate any related
13382    /// Google Compute Engine resources.
13383    pub resource_labels: std::option::Option<crate::model::ResourceLabels>,
13384
13385    /// Parameters that can be configured on Windows nodes.
13386    pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
13387
13388    /// A list of hardware accelerators to be attached to each node.
13389    /// See
13390    /// <https://cloud.google.com/compute/docs/gpus>
13391    /// for more information about support for GPUs.
13392    pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
13393
13394    /// Optional. The desired [Google Compute Engine machine
13395    /// type](https://cloud.google.com/compute/docs/machine-types)
13396    /// for nodes in the node pool. Initiates an upgrade operation that migrates
13397    /// the nodes in the node pool to the specified machine type.
13398    pub machine_type: std::string::String,
13399
13400    /// Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or
13401    /// 'pd-balanced') for nodes in the node pool.
13402    /// Initiates an upgrade operation that migrates the nodes in the
13403    /// node pool to the specified disk type.
13404    pub disk_type: std::string::String,
13405
13406    /// Optional. The desired disk size for nodes in the node pool specified in GB.
13407    /// The smallest allowed disk size is 10GB.
13408    /// Initiates an upgrade operation that migrates the nodes in the
13409    /// node pool to the specified disk size.
13410    pub disk_size_gb: i64,
13411
13412    /// Desired resource manager tag keys and values to be attached to the nodes
13413    /// for managing Compute Engine firewalls using Network Firewall Policies.
13414    /// Existing tags will be replaced with new values.
13415    pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
13416
13417    /// The desired containerd config for nodes in the node pool.
13418    /// Initiates an upgrade operation that recreates the nodes with the new
13419    /// config.
13420    pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
13421
13422    /// Specifies the configuration of queued provisioning.
13423    pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
13424
13425    /// List of Storage Pools where boot disks are provisioned.
13426    /// Existing Storage Pools will be replaced with storage-pools.
13427    pub storage_pools: std::vec::Vec<std::string::String>,
13428
13429    /// The maximum duration for the nodes to exist.
13430    /// If unspecified, the nodes can exist indefinitely.
13431    pub max_run_duration: std::option::Option<wkt::Duration>,
13432
13433    /// Flex Start flag for enabling Flex Start VM.
13434    pub flex_start: std::option::Option<bool>,
13435
13436    /// The desired boot disk config for nodes in the node pool.
13437    /// Initiates an upgrade operation that migrates the nodes in the
13438    /// node pool to the specified boot disk config.
13439    pub boot_disk: std::option::Option<crate::model::BootDisk>,
13440
13441    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13442}
13443
13444impl UpdateNodePoolRequest {
13445    pub fn new() -> Self {
13446        std::default::Default::default()
13447    }
13448
13449    /// Sets the value of [project_id][crate::model::UpdateNodePoolRequest::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::UpdateNodePoolRequest::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_id][crate::model::UpdateNodePoolRequest::cluster_id].
13464    #[deprecated]
13465    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13466        self.cluster_id = v.into();
13467        self
13468    }
13469
13470    /// Sets the value of [node_pool_id][crate::model::UpdateNodePoolRequest::node_pool_id].
13471    #[deprecated]
13472    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13473        self.node_pool_id = v.into();
13474        self
13475    }
13476
13477    /// Sets the value of [node_version][crate::model::UpdateNodePoolRequest::node_version].
13478    pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13479        self.node_version = v.into();
13480        self
13481    }
13482
13483    /// Sets the value of [image_type][crate::model::UpdateNodePoolRequest::image_type].
13484    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13485        self.image_type = v.into();
13486        self
13487    }
13488
13489    /// Sets the value of [name][crate::model::UpdateNodePoolRequest::name].
13490    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13491        self.name = v.into();
13492        self
13493    }
13494
13495    /// Sets the value of [locations][crate::model::UpdateNodePoolRequest::locations].
13496    pub fn set_locations<T, V>(mut self, v: T) -> Self
13497    where
13498        T: std::iter::IntoIterator<Item = V>,
13499        V: std::convert::Into<std::string::String>,
13500    {
13501        use std::iter::Iterator;
13502        self.locations = v.into_iter().map(|i| i.into()).collect();
13503        self
13504    }
13505
13506    /// Sets the value of [workload_metadata_config][crate::model::UpdateNodePoolRequest::workload_metadata_config].
13507    pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
13508    where
13509        T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
13510    {
13511        self.workload_metadata_config = std::option::Option::Some(v.into());
13512        self
13513    }
13514
13515    /// Sets or clears the value of [workload_metadata_config][crate::model::UpdateNodePoolRequest::workload_metadata_config].
13516    pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
13517    where
13518        T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
13519    {
13520        self.workload_metadata_config = v.map(|x| x.into());
13521        self
13522    }
13523
13524    /// Sets the value of [upgrade_settings][crate::model::UpdateNodePoolRequest::upgrade_settings].
13525    pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
13526    where
13527        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
13528    {
13529        self.upgrade_settings = std::option::Option::Some(v.into());
13530        self
13531    }
13532
13533    /// Sets or clears the value of [upgrade_settings][crate::model::UpdateNodePoolRequest::upgrade_settings].
13534    pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
13535    where
13536        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
13537    {
13538        self.upgrade_settings = v.map(|x| x.into());
13539        self
13540    }
13541
13542    /// Sets the value of [tags][crate::model::UpdateNodePoolRequest::tags].
13543    pub fn set_tags<T>(mut self, v: T) -> Self
13544    where
13545        T: std::convert::Into<crate::model::NetworkTags>,
13546    {
13547        self.tags = std::option::Option::Some(v.into());
13548        self
13549    }
13550
13551    /// Sets or clears the value of [tags][crate::model::UpdateNodePoolRequest::tags].
13552    pub fn set_or_clear_tags<T>(mut self, v: std::option::Option<T>) -> Self
13553    where
13554        T: std::convert::Into<crate::model::NetworkTags>,
13555    {
13556        self.tags = v.map(|x| x.into());
13557        self
13558    }
13559
13560    /// Sets the value of [taints][crate::model::UpdateNodePoolRequest::taints].
13561    pub fn set_taints<T>(mut self, v: T) -> Self
13562    where
13563        T: std::convert::Into<crate::model::NodeTaints>,
13564    {
13565        self.taints = std::option::Option::Some(v.into());
13566        self
13567    }
13568
13569    /// Sets or clears the value of [taints][crate::model::UpdateNodePoolRequest::taints].
13570    pub fn set_or_clear_taints<T>(mut self, v: std::option::Option<T>) -> Self
13571    where
13572        T: std::convert::Into<crate::model::NodeTaints>,
13573    {
13574        self.taints = v.map(|x| x.into());
13575        self
13576    }
13577
13578    /// Sets the value of [labels][crate::model::UpdateNodePoolRequest::labels].
13579    pub fn set_labels<T>(mut self, v: T) -> Self
13580    where
13581        T: std::convert::Into<crate::model::NodeLabels>,
13582    {
13583        self.labels = std::option::Option::Some(v.into());
13584        self
13585    }
13586
13587    /// Sets or clears the value of [labels][crate::model::UpdateNodePoolRequest::labels].
13588    pub fn set_or_clear_labels<T>(mut self, v: std::option::Option<T>) -> Self
13589    where
13590        T: std::convert::Into<crate::model::NodeLabels>,
13591    {
13592        self.labels = v.map(|x| x.into());
13593        self
13594    }
13595
13596    /// Sets the value of [linux_node_config][crate::model::UpdateNodePoolRequest::linux_node_config].
13597    pub fn set_linux_node_config<T>(mut self, v: T) -> Self
13598    where
13599        T: std::convert::Into<crate::model::LinuxNodeConfig>,
13600    {
13601        self.linux_node_config = std::option::Option::Some(v.into());
13602        self
13603    }
13604
13605    /// Sets or clears the value of [linux_node_config][crate::model::UpdateNodePoolRequest::linux_node_config].
13606    pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
13607    where
13608        T: std::convert::Into<crate::model::LinuxNodeConfig>,
13609    {
13610        self.linux_node_config = v.map(|x| x.into());
13611        self
13612    }
13613
13614    /// Sets the value of [kubelet_config][crate::model::UpdateNodePoolRequest::kubelet_config].
13615    pub fn set_kubelet_config<T>(mut self, v: T) -> Self
13616    where
13617        T: std::convert::Into<crate::model::NodeKubeletConfig>,
13618    {
13619        self.kubelet_config = std::option::Option::Some(v.into());
13620        self
13621    }
13622
13623    /// Sets or clears the value of [kubelet_config][crate::model::UpdateNodePoolRequest::kubelet_config].
13624    pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
13625    where
13626        T: std::convert::Into<crate::model::NodeKubeletConfig>,
13627    {
13628        self.kubelet_config = v.map(|x| x.into());
13629        self
13630    }
13631
13632    /// Sets the value of [node_network_config][crate::model::UpdateNodePoolRequest::node_network_config].
13633    pub fn set_node_network_config<T>(mut self, v: T) -> Self
13634    where
13635        T: std::convert::Into<crate::model::NodeNetworkConfig>,
13636    {
13637        self.node_network_config = std::option::Option::Some(v.into());
13638        self
13639    }
13640
13641    /// Sets or clears the value of [node_network_config][crate::model::UpdateNodePoolRequest::node_network_config].
13642    pub fn set_or_clear_node_network_config<T>(mut self, v: std::option::Option<T>) -> Self
13643    where
13644        T: std::convert::Into<crate::model::NodeNetworkConfig>,
13645    {
13646        self.node_network_config = v.map(|x| x.into());
13647        self
13648    }
13649
13650    /// Sets the value of [gcfs_config][crate::model::UpdateNodePoolRequest::gcfs_config].
13651    pub fn set_gcfs_config<T>(mut self, v: T) -> Self
13652    where
13653        T: std::convert::Into<crate::model::GcfsConfig>,
13654    {
13655        self.gcfs_config = std::option::Option::Some(v.into());
13656        self
13657    }
13658
13659    /// Sets or clears the value of [gcfs_config][crate::model::UpdateNodePoolRequest::gcfs_config].
13660    pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
13661    where
13662        T: std::convert::Into<crate::model::GcfsConfig>,
13663    {
13664        self.gcfs_config = v.map(|x| x.into());
13665        self
13666    }
13667
13668    /// Sets the value of [confidential_nodes][crate::model::UpdateNodePoolRequest::confidential_nodes].
13669    pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
13670    where
13671        T: std::convert::Into<crate::model::ConfidentialNodes>,
13672    {
13673        self.confidential_nodes = std::option::Option::Some(v.into());
13674        self
13675    }
13676
13677    /// Sets or clears the value of [confidential_nodes][crate::model::UpdateNodePoolRequest::confidential_nodes].
13678    pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
13679    where
13680        T: std::convert::Into<crate::model::ConfidentialNodes>,
13681    {
13682        self.confidential_nodes = v.map(|x| x.into());
13683        self
13684    }
13685
13686    /// Sets the value of [gvnic][crate::model::UpdateNodePoolRequest::gvnic].
13687    pub fn set_gvnic<T>(mut self, v: T) -> Self
13688    where
13689        T: std::convert::Into<crate::model::VirtualNIC>,
13690    {
13691        self.gvnic = std::option::Option::Some(v.into());
13692        self
13693    }
13694
13695    /// Sets or clears the value of [gvnic][crate::model::UpdateNodePoolRequest::gvnic].
13696    pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
13697    where
13698        T: std::convert::Into<crate::model::VirtualNIC>,
13699    {
13700        self.gvnic = v.map(|x| x.into());
13701        self
13702    }
13703
13704    /// Sets the value of [etag][crate::model::UpdateNodePoolRequest::etag].
13705    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13706        self.etag = v.into();
13707        self
13708    }
13709
13710    /// Sets the value of [fast_socket][crate::model::UpdateNodePoolRequest::fast_socket].
13711    pub fn set_fast_socket<T>(mut self, v: T) -> Self
13712    where
13713        T: std::convert::Into<crate::model::FastSocket>,
13714    {
13715        self.fast_socket = std::option::Option::Some(v.into());
13716        self
13717    }
13718
13719    /// Sets or clears the value of [fast_socket][crate::model::UpdateNodePoolRequest::fast_socket].
13720    pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
13721    where
13722        T: std::convert::Into<crate::model::FastSocket>,
13723    {
13724        self.fast_socket = v.map(|x| x.into());
13725        self
13726    }
13727
13728    /// Sets the value of [logging_config][crate::model::UpdateNodePoolRequest::logging_config].
13729    pub fn set_logging_config<T>(mut self, v: T) -> Self
13730    where
13731        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
13732    {
13733        self.logging_config = std::option::Option::Some(v.into());
13734        self
13735    }
13736
13737    /// Sets or clears the value of [logging_config][crate::model::UpdateNodePoolRequest::logging_config].
13738    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
13739    where
13740        T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
13741    {
13742        self.logging_config = v.map(|x| x.into());
13743        self
13744    }
13745
13746    /// Sets the value of [resource_labels][crate::model::UpdateNodePoolRequest::resource_labels].
13747    pub fn set_resource_labels<T>(mut self, v: T) -> Self
13748    where
13749        T: std::convert::Into<crate::model::ResourceLabels>,
13750    {
13751        self.resource_labels = std::option::Option::Some(v.into());
13752        self
13753    }
13754
13755    /// Sets or clears the value of [resource_labels][crate::model::UpdateNodePoolRequest::resource_labels].
13756    pub fn set_or_clear_resource_labels<T>(mut self, v: std::option::Option<T>) -> Self
13757    where
13758        T: std::convert::Into<crate::model::ResourceLabels>,
13759    {
13760        self.resource_labels = v.map(|x| x.into());
13761        self
13762    }
13763
13764    /// Sets the value of [windows_node_config][crate::model::UpdateNodePoolRequest::windows_node_config].
13765    pub fn set_windows_node_config<T>(mut self, v: T) -> Self
13766    where
13767        T: std::convert::Into<crate::model::WindowsNodeConfig>,
13768    {
13769        self.windows_node_config = std::option::Option::Some(v.into());
13770        self
13771    }
13772
13773    /// Sets or clears the value of [windows_node_config][crate::model::UpdateNodePoolRequest::windows_node_config].
13774    pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
13775    where
13776        T: std::convert::Into<crate::model::WindowsNodeConfig>,
13777    {
13778        self.windows_node_config = v.map(|x| x.into());
13779        self
13780    }
13781
13782    /// Sets the value of [accelerators][crate::model::UpdateNodePoolRequest::accelerators].
13783    pub fn set_accelerators<T, V>(mut self, v: T) -> Self
13784    where
13785        T: std::iter::IntoIterator<Item = V>,
13786        V: std::convert::Into<crate::model::AcceleratorConfig>,
13787    {
13788        use std::iter::Iterator;
13789        self.accelerators = v.into_iter().map(|i| i.into()).collect();
13790        self
13791    }
13792
13793    /// Sets the value of [machine_type][crate::model::UpdateNodePoolRequest::machine_type].
13794    pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13795        self.machine_type = v.into();
13796        self
13797    }
13798
13799    /// Sets the value of [disk_type][crate::model::UpdateNodePoolRequest::disk_type].
13800    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13801        self.disk_type = v.into();
13802        self
13803    }
13804
13805    /// Sets the value of [disk_size_gb][crate::model::UpdateNodePoolRequest::disk_size_gb].
13806    pub fn set_disk_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13807        self.disk_size_gb = v.into();
13808        self
13809    }
13810
13811    /// Sets the value of [resource_manager_tags][crate::model::UpdateNodePoolRequest::resource_manager_tags].
13812    pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
13813    where
13814        T: std::convert::Into<crate::model::ResourceManagerTags>,
13815    {
13816        self.resource_manager_tags = std::option::Option::Some(v.into());
13817        self
13818    }
13819
13820    /// Sets or clears the value of [resource_manager_tags][crate::model::UpdateNodePoolRequest::resource_manager_tags].
13821    pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
13822    where
13823        T: std::convert::Into<crate::model::ResourceManagerTags>,
13824    {
13825        self.resource_manager_tags = v.map(|x| x.into());
13826        self
13827    }
13828
13829    /// Sets the value of [containerd_config][crate::model::UpdateNodePoolRequest::containerd_config].
13830    pub fn set_containerd_config<T>(mut self, v: T) -> Self
13831    where
13832        T: std::convert::Into<crate::model::ContainerdConfig>,
13833    {
13834        self.containerd_config = std::option::Option::Some(v.into());
13835        self
13836    }
13837
13838    /// Sets or clears the value of [containerd_config][crate::model::UpdateNodePoolRequest::containerd_config].
13839    pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
13840    where
13841        T: std::convert::Into<crate::model::ContainerdConfig>,
13842    {
13843        self.containerd_config = v.map(|x| x.into());
13844        self
13845    }
13846
13847    /// Sets the value of [queued_provisioning][crate::model::UpdateNodePoolRequest::queued_provisioning].
13848    pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
13849    where
13850        T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
13851    {
13852        self.queued_provisioning = std::option::Option::Some(v.into());
13853        self
13854    }
13855
13856    /// Sets or clears the value of [queued_provisioning][crate::model::UpdateNodePoolRequest::queued_provisioning].
13857    pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
13858    where
13859        T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
13860    {
13861        self.queued_provisioning = v.map(|x| x.into());
13862        self
13863    }
13864
13865    /// Sets the value of [storage_pools][crate::model::UpdateNodePoolRequest::storage_pools].
13866    pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
13867    where
13868        T: std::iter::IntoIterator<Item = V>,
13869        V: std::convert::Into<std::string::String>,
13870    {
13871        use std::iter::Iterator;
13872        self.storage_pools = v.into_iter().map(|i| i.into()).collect();
13873        self
13874    }
13875
13876    /// Sets the value of [max_run_duration][crate::model::UpdateNodePoolRequest::max_run_duration].
13877    pub fn set_max_run_duration<T>(mut self, v: T) -> Self
13878    where
13879        T: std::convert::Into<wkt::Duration>,
13880    {
13881        self.max_run_duration = std::option::Option::Some(v.into());
13882        self
13883    }
13884
13885    /// Sets or clears the value of [max_run_duration][crate::model::UpdateNodePoolRequest::max_run_duration].
13886    pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
13887    where
13888        T: std::convert::Into<wkt::Duration>,
13889    {
13890        self.max_run_duration = v.map(|x| x.into());
13891        self
13892    }
13893
13894    /// Sets the value of [flex_start][crate::model::UpdateNodePoolRequest::flex_start].
13895    pub fn set_flex_start<T>(mut self, v: T) -> Self
13896    where
13897        T: std::convert::Into<bool>,
13898    {
13899        self.flex_start = std::option::Option::Some(v.into());
13900        self
13901    }
13902
13903    /// Sets or clears the value of [flex_start][crate::model::UpdateNodePoolRequest::flex_start].
13904    pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
13905    where
13906        T: std::convert::Into<bool>,
13907    {
13908        self.flex_start = v.map(|x| x.into());
13909        self
13910    }
13911
13912    /// Sets the value of [boot_disk][crate::model::UpdateNodePoolRequest::boot_disk].
13913    pub fn set_boot_disk<T>(mut self, v: T) -> Self
13914    where
13915        T: std::convert::Into<crate::model::BootDisk>,
13916    {
13917        self.boot_disk = std::option::Option::Some(v.into());
13918        self
13919    }
13920
13921    /// Sets or clears the value of [boot_disk][crate::model::UpdateNodePoolRequest::boot_disk].
13922    pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
13923    where
13924        T: std::convert::Into<crate::model::BootDisk>,
13925    {
13926        self.boot_disk = v.map(|x| x.into());
13927        self
13928    }
13929}
13930
13931impl wkt::message::Message for UpdateNodePoolRequest {
13932    fn typename() -> &'static str {
13933        "type.googleapis.com/google.container.v1.UpdateNodePoolRequest"
13934    }
13935}
13936
13937/// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.
13938#[derive(Clone, Default, PartialEq)]
13939#[non_exhaustive]
13940pub struct SetNodePoolAutoscalingRequest {
13941    /// Deprecated. The Google Developers Console [project ID or project
13942    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
13943    /// This field has been deprecated and replaced by the name field.
13944    #[deprecated]
13945    pub project_id: std::string::String,
13946
13947    /// Deprecated. The name of the Google Compute Engine
13948    /// [zone](https://cloud.google.com/compute/docs/zones#available)
13949    /// in which the cluster resides. This field has been deprecated and replaced
13950    /// by the name field.
13951    #[deprecated]
13952    pub zone: std::string::String,
13953
13954    /// Deprecated. The name of the cluster to upgrade.
13955    /// This field has been deprecated and replaced by the name field.
13956    #[deprecated]
13957    pub cluster_id: std::string::String,
13958
13959    /// Deprecated. The name of the node pool to upgrade.
13960    /// This field has been deprecated and replaced by the name field.
13961    #[deprecated]
13962    pub node_pool_id: std::string::String,
13963
13964    /// Required. Autoscaling configuration for the node pool.
13965    pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
13966
13967    /// The name (project, location, cluster, node pool) of the node pool to set
13968    /// autoscaler settings. Specified in the format
13969    /// `projects/*/locations/*/clusters/*/nodePools/*`.
13970    pub name: std::string::String,
13971
13972    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13973}
13974
13975impl SetNodePoolAutoscalingRequest {
13976    pub fn new() -> Self {
13977        std::default::Default::default()
13978    }
13979
13980    /// Sets the value of [project_id][crate::model::SetNodePoolAutoscalingRequest::project_id].
13981    #[deprecated]
13982    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13983        self.project_id = v.into();
13984        self
13985    }
13986
13987    /// Sets the value of [zone][crate::model::SetNodePoolAutoscalingRequest::zone].
13988    #[deprecated]
13989    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13990        self.zone = v.into();
13991        self
13992    }
13993
13994    /// Sets the value of [cluster_id][crate::model::SetNodePoolAutoscalingRequest::cluster_id].
13995    #[deprecated]
13996    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13997        self.cluster_id = v.into();
13998        self
13999    }
14000
14001    /// Sets the value of [node_pool_id][crate::model::SetNodePoolAutoscalingRequest::node_pool_id].
14002    #[deprecated]
14003    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14004        self.node_pool_id = v.into();
14005        self
14006    }
14007
14008    /// Sets the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
14009    pub fn set_autoscaling<T>(mut self, v: T) -> Self
14010    where
14011        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
14012    {
14013        self.autoscaling = std::option::Option::Some(v.into());
14014        self
14015    }
14016
14017    /// Sets or clears the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
14018    pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
14019    where
14020        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
14021    {
14022        self.autoscaling = v.map(|x| x.into());
14023        self
14024    }
14025
14026    /// Sets the value of [name][crate::model::SetNodePoolAutoscalingRequest::name].
14027    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14028        self.name = v.into();
14029        self
14030    }
14031}
14032
14033impl wkt::message::Message for SetNodePoolAutoscalingRequest {
14034    fn typename() -> &'static str {
14035        "type.googleapis.com/google.container.v1.SetNodePoolAutoscalingRequest"
14036    }
14037}
14038
14039/// SetLoggingServiceRequest sets the logging service of a cluster.
14040#[derive(Clone, Default, PartialEq)]
14041#[non_exhaustive]
14042pub struct SetLoggingServiceRequest {
14043    /// Deprecated. The Google Developers Console [project ID or project
14044    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14045    /// This field has been deprecated and replaced by the name field.
14046    #[deprecated]
14047    pub project_id: std::string::String,
14048
14049    /// Deprecated. The name of the Google Compute Engine
14050    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14051    /// in which the cluster resides. This field has been deprecated and replaced
14052    /// by the name field.
14053    #[deprecated]
14054    pub zone: std::string::String,
14055
14056    /// Deprecated. The name of the cluster to upgrade.
14057    /// This field has been deprecated and replaced by the name field.
14058    #[deprecated]
14059    pub cluster_id: std::string::String,
14060
14061    /// Required. The logging service the cluster should use to write logs.
14062    /// Currently available options:
14063    ///
14064    /// * `logging.googleapis.com/kubernetes` - The Cloud Logging
14065    ///   service with a Kubernetes-native resource model
14066    /// * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
14067    ///   available as of GKE 1.15).
14068    /// * `none` - no logs will be exported from the cluster.
14069    ///
14070    /// If left as an empty string,`logging.googleapis.com/kubernetes` will be
14071    /// used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
14072    pub logging_service: std::string::String,
14073
14074    /// The name (project, location, cluster) of the cluster to set logging.
14075    /// Specified in the format `projects/*/locations/*/clusters/*`.
14076    pub name: std::string::String,
14077
14078    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14079}
14080
14081impl SetLoggingServiceRequest {
14082    pub fn new() -> Self {
14083        std::default::Default::default()
14084    }
14085
14086    /// Sets the value of [project_id][crate::model::SetLoggingServiceRequest::project_id].
14087    #[deprecated]
14088    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14089        self.project_id = v.into();
14090        self
14091    }
14092
14093    /// Sets the value of [zone][crate::model::SetLoggingServiceRequest::zone].
14094    #[deprecated]
14095    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14096        self.zone = v.into();
14097        self
14098    }
14099
14100    /// Sets the value of [cluster_id][crate::model::SetLoggingServiceRequest::cluster_id].
14101    #[deprecated]
14102    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14103        self.cluster_id = v.into();
14104        self
14105    }
14106
14107    /// Sets the value of [logging_service][crate::model::SetLoggingServiceRequest::logging_service].
14108    pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14109        self.logging_service = v.into();
14110        self
14111    }
14112
14113    /// Sets the value of [name][crate::model::SetLoggingServiceRequest::name].
14114    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14115        self.name = v.into();
14116        self
14117    }
14118}
14119
14120impl wkt::message::Message for SetLoggingServiceRequest {
14121    fn typename() -> &'static str {
14122        "type.googleapis.com/google.container.v1.SetLoggingServiceRequest"
14123    }
14124}
14125
14126/// SetMonitoringServiceRequest sets the monitoring service of a cluster.
14127#[derive(Clone, Default, PartialEq)]
14128#[non_exhaustive]
14129pub struct SetMonitoringServiceRequest {
14130    /// Deprecated. The Google Developers Console [project ID or project
14131    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14132    /// This field has been deprecated and replaced by the name field.
14133    #[deprecated]
14134    pub project_id: std::string::String,
14135
14136    /// Deprecated. The name of the Google Compute Engine
14137    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14138    /// in which the cluster resides. This field has been deprecated and replaced
14139    /// by the name field.
14140    #[deprecated]
14141    pub zone: std::string::String,
14142
14143    /// Deprecated. The name of the cluster to upgrade.
14144    /// This field has been deprecated and replaced by the name field.
14145    #[deprecated]
14146    pub cluster_id: std::string::String,
14147
14148    /// Required. The monitoring service the cluster should use to write metrics.
14149    /// Currently available options:
14150    ///
14151    /// * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring
14152    ///   service with a Kubernetes-native resource model
14153    /// * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
14154    ///   longer available as of GKE 1.15).
14155    /// * `none` - No metrics will be exported from the cluster.
14156    ///
14157    /// If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
14158    /// used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
14159    pub monitoring_service: std::string::String,
14160
14161    /// The name (project, location, cluster) of the cluster to set monitoring.
14162    /// Specified in the format `projects/*/locations/*/clusters/*`.
14163    pub name: std::string::String,
14164
14165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14166}
14167
14168impl SetMonitoringServiceRequest {
14169    pub fn new() -> Self {
14170        std::default::Default::default()
14171    }
14172
14173    /// Sets the value of [project_id][crate::model::SetMonitoringServiceRequest::project_id].
14174    #[deprecated]
14175    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14176        self.project_id = v.into();
14177        self
14178    }
14179
14180    /// Sets the value of [zone][crate::model::SetMonitoringServiceRequest::zone].
14181    #[deprecated]
14182    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14183        self.zone = v.into();
14184        self
14185    }
14186
14187    /// Sets the value of [cluster_id][crate::model::SetMonitoringServiceRequest::cluster_id].
14188    #[deprecated]
14189    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14190        self.cluster_id = v.into();
14191        self
14192    }
14193
14194    /// Sets the value of [monitoring_service][crate::model::SetMonitoringServiceRequest::monitoring_service].
14195    pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
14196        mut self,
14197        v: T,
14198    ) -> Self {
14199        self.monitoring_service = v.into();
14200        self
14201    }
14202
14203    /// Sets the value of [name][crate::model::SetMonitoringServiceRequest::name].
14204    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14205        self.name = v.into();
14206        self
14207    }
14208}
14209
14210impl wkt::message::Message for SetMonitoringServiceRequest {
14211    fn typename() -> &'static str {
14212        "type.googleapis.com/google.container.v1.SetMonitoringServiceRequest"
14213    }
14214}
14215
14216/// SetAddonsConfigRequest sets the addons associated with the cluster.
14217#[derive(Clone, Default, PartialEq)]
14218#[non_exhaustive]
14219pub struct SetAddonsConfigRequest {
14220    /// Deprecated. The Google Developers Console [project ID or project
14221    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14222    /// This field has been deprecated and replaced by the name field.
14223    #[deprecated]
14224    pub project_id: std::string::String,
14225
14226    /// Deprecated. The name of the Google Compute Engine
14227    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14228    /// in which the cluster resides. This field has been deprecated and replaced
14229    /// by the name field.
14230    #[deprecated]
14231    pub zone: std::string::String,
14232
14233    /// Deprecated. The name of the cluster to upgrade.
14234    /// This field has been deprecated and replaced by the name field.
14235    #[deprecated]
14236    pub cluster_id: std::string::String,
14237
14238    /// Required. The desired configurations for the various addons available to
14239    /// run in the cluster.
14240    pub addons_config: std::option::Option<crate::model::AddonsConfig>,
14241
14242    /// The name (project, location, cluster) of the cluster to set addons.
14243    /// Specified in the format `projects/*/locations/*/clusters/*`.
14244    pub name: std::string::String,
14245
14246    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14247}
14248
14249impl SetAddonsConfigRequest {
14250    pub fn new() -> Self {
14251        std::default::Default::default()
14252    }
14253
14254    /// Sets the value of [project_id][crate::model::SetAddonsConfigRequest::project_id].
14255    #[deprecated]
14256    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14257        self.project_id = v.into();
14258        self
14259    }
14260
14261    /// Sets the value of [zone][crate::model::SetAddonsConfigRequest::zone].
14262    #[deprecated]
14263    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14264        self.zone = v.into();
14265        self
14266    }
14267
14268    /// Sets the value of [cluster_id][crate::model::SetAddonsConfigRequest::cluster_id].
14269    #[deprecated]
14270    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14271        self.cluster_id = v.into();
14272        self
14273    }
14274
14275    /// Sets the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
14276    pub fn set_addons_config<T>(mut self, v: T) -> Self
14277    where
14278        T: std::convert::Into<crate::model::AddonsConfig>,
14279    {
14280        self.addons_config = std::option::Option::Some(v.into());
14281        self
14282    }
14283
14284    /// Sets or clears the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
14285    pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
14286    where
14287        T: std::convert::Into<crate::model::AddonsConfig>,
14288    {
14289        self.addons_config = v.map(|x| x.into());
14290        self
14291    }
14292
14293    /// Sets the value of [name][crate::model::SetAddonsConfigRequest::name].
14294    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14295        self.name = v.into();
14296        self
14297    }
14298}
14299
14300impl wkt::message::Message for SetAddonsConfigRequest {
14301    fn typename() -> &'static str {
14302        "type.googleapis.com/google.container.v1.SetAddonsConfigRequest"
14303    }
14304}
14305
14306/// SetLocationsRequest sets the locations of the cluster.
14307#[derive(Clone, Default, PartialEq)]
14308#[non_exhaustive]
14309pub struct SetLocationsRequest {
14310    /// Deprecated. The Google Developers Console [project ID or project
14311    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14312    /// This field has been deprecated and replaced by the name field.
14313    #[deprecated]
14314    pub project_id: std::string::String,
14315
14316    /// Deprecated. The name of the Google Compute Engine
14317    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14318    /// in which the cluster resides. This field has been deprecated and replaced
14319    /// by the name field.
14320    #[deprecated]
14321    pub zone: std::string::String,
14322
14323    /// Deprecated. The name of the cluster to upgrade.
14324    /// This field has been deprecated and replaced by the name field.
14325    #[deprecated]
14326    pub cluster_id: std::string::String,
14327
14328    /// Required. The desired list of Google Compute Engine
14329    /// [zones](https://cloud.google.com/compute/docs/zones#available)
14330    /// in which the cluster's nodes should be located. Changing the locations a
14331    /// cluster is in will result in nodes being either created or removed from the
14332    /// cluster, depending on whether locations are being added or removed.
14333    ///
14334    /// This list must always include the cluster's primary zone.
14335    pub locations: std::vec::Vec<std::string::String>,
14336
14337    /// The name (project, location, cluster) of the cluster to set locations.
14338    /// Specified in the format `projects/*/locations/*/clusters/*`.
14339    pub name: std::string::String,
14340
14341    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14342}
14343
14344impl SetLocationsRequest {
14345    pub fn new() -> Self {
14346        std::default::Default::default()
14347    }
14348
14349    /// Sets the value of [project_id][crate::model::SetLocationsRequest::project_id].
14350    #[deprecated]
14351    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14352        self.project_id = v.into();
14353        self
14354    }
14355
14356    /// Sets the value of [zone][crate::model::SetLocationsRequest::zone].
14357    #[deprecated]
14358    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14359        self.zone = v.into();
14360        self
14361    }
14362
14363    /// Sets the value of [cluster_id][crate::model::SetLocationsRequest::cluster_id].
14364    #[deprecated]
14365    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14366        self.cluster_id = v.into();
14367        self
14368    }
14369
14370    /// Sets the value of [locations][crate::model::SetLocationsRequest::locations].
14371    pub fn set_locations<T, V>(mut self, v: T) -> Self
14372    where
14373        T: std::iter::IntoIterator<Item = V>,
14374        V: std::convert::Into<std::string::String>,
14375    {
14376        use std::iter::Iterator;
14377        self.locations = v.into_iter().map(|i| i.into()).collect();
14378        self
14379    }
14380
14381    /// Sets the value of [name][crate::model::SetLocationsRequest::name].
14382    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14383        self.name = v.into();
14384        self
14385    }
14386}
14387
14388impl wkt::message::Message for SetLocationsRequest {
14389    fn typename() -> &'static str {
14390        "type.googleapis.com/google.container.v1.SetLocationsRequest"
14391    }
14392}
14393
14394/// UpdateMasterRequest updates the master of the cluster.
14395#[derive(Clone, Default, PartialEq)]
14396#[non_exhaustive]
14397pub struct UpdateMasterRequest {
14398    /// Deprecated. The Google Developers Console [project ID or project
14399    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14400    /// This field has been deprecated and replaced by the name field.
14401    #[deprecated]
14402    pub project_id: std::string::String,
14403
14404    /// Deprecated. The name of the Google Compute Engine
14405    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14406    /// in which the cluster resides. This field has been deprecated and replaced
14407    /// by the name field.
14408    #[deprecated]
14409    pub zone: std::string::String,
14410
14411    /// Deprecated. The name of the cluster to upgrade.
14412    /// This field has been deprecated and replaced by the name field.
14413    #[deprecated]
14414    pub cluster_id: std::string::String,
14415
14416    /// Required. The Kubernetes version to change the master to.
14417    ///
14418    /// Users may specify either explicit versions offered by Kubernetes Engine or
14419    /// version aliases, which have the following behavior:
14420    ///
14421    /// - "latest": picks the highest valid Kubernetes version
14422    /// - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
14423    /// - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
14424    /// - "1.X.Y-gke.N": picks an explicit Kubernetes version
14425    /// - "-": picks the default Kubernetes version
14426    pub master_version: std::string::String,
14427
14428    /// The name (project, location, cluster) of the cluster to update.
14429    /// Specified in the format `projects/*/locations/*/clusters/*`.
14430    pub name: std::string::String,
14431
14432    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14433}
14434
14435impl UpdateMasterRequest {
14436    pub fn new() -> Self {
14437        std::default::Default::default()
14438    }
14439
14440    /// Sets the value of [project_id][crate::model::UpdateMasterRequest::project_id].
14441    #[deprecated]
14442    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14443        self.project_id = v.into();
14444        self
14445    }
14446
14447    /// Sets the value of [zone][crate::model::UpdateMasterRequest::zone].
14448    #[deprecated]
14449    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14450        self.zone = v.into();
14451        self
14452    }
14453
14454    /// Sets the value of [cluster_id][crate::model::UpdateMasterRequest::cluster_id].
14455    #[deprecated]
14456    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14457        self.cluster_id = v.into();
14458        self
14459    }
14460
14461    /// Sets the value of [master_version][crate::model::UpdateMasterRequest::master_version].
14462    pub fn set_master_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14463        self.master_version = v.into();
14464        self
14465    }
14466
14467    /// Sets the value of [name][crate::model::UpdateMasterRequest::name].
14468    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14469        self.name = v.into();
14470        self
14471    }
14472}
14473
14474impl wkt::message::Message for UpdateMasterRequest {
14475    fn typename() -> &'static str {
14476        "type.googleapis.com/google.container.v1.UpdateMasterRequest"
14477    }
14478}
14479
14480/// SetMasterAuthRequest updates the admin password of a cluster.
14481#[derive(Clone, Default, PartialEq)]
14482#[non_exhaustive]
14483pub struct SetMasterAuthRequest {
14484    /// Deprecated. The Google Developers Console [project ID or project
14485    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14486    /// This field has been deprecated and replaced by the name field.
14487    #[deprecated]
14488    pub project_id: std::string::String,
14489
14490    /// Deprecated. The name of the Google Compute Engine
14491    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14492    /// in which the cluster resides. This field has been deprecated and replaced
14493    /// by the name field.
14494    #[deprecated]
14495    pub zone: std::string::String,
14496
14497    /// Deprecated. The name of the cluster to upgrade.
14498    /// This field has been deprecated and replaced by the name field.
14499    #[deprecated]
14500    pub cluster_id: std::string::String,
14501
14502    /// Required. The exact form of action to be taken on the master auth.
14503    pub action: crate::model::set_master_auth_request::Action,
14504
14505    /// Required. A description of the update.
14506    pub update: std::option::Option<crate::model::MasterAuth>,
14507
14508    /// The name (project, location, cluster) of the cluster to set auth.
14509    /// Specified in the format `projects/*/locations/*/clusters/*`.
14510    pub name: std::string::String,
14511
14512    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14513}
14514
14515impl SetMasterAuthRequest {
14516    pub fn new() -> Self {
14517        std::default::Default::default()
14518    }
14519
14520    /// Sets the value of [project_id][crate::model::SetMasterAuthRequest::project_id].
14521    #[deprecated]
14522    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14523        self.project_id = v.into();
14524        self
14525    }
14526
14527    /// Sets the value of [zone][crate::model::SetMasterAuthRequest::zone].
14528    #[deprecated]
14529    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14530        self.zone = v.into();
14531        self
14532    }
14533
14534    /// Sets the value of [cluster_id][crate::model::SetMasterAuthRequest::cluster_id].
14535    #[deprecated]
14536    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14537        self.cluster_id = v.into();
14538        self
14539    }
14540
14541    /// Sets the value of [action][crate::model::SetMasterAuthRequest::action].
14542    pub fn set_action<T: std::convert::Into<crate::model::set_master_auth_request::Action>>(
14543        mut self,
14544        v: T,
14545    ) -> Self {
14546        self.action = v.into();
14547        self
14548    }
14549
14550    /// Sets the value of [update][crate::model::SetMasterAuthRequest::update].
14551    pub fn set_update<T>(mut self, v: T) -> Self
14552    where
14553        T: std::convert::Into<crate::model::MasterAuth>,
14554    {
14555        self.update = std::option::Option::Some(v.into());
14556        self
14557    }
14558
14559    /// Sets or clears the value of [update][crate::model::SetMasterAuthRequest::update].
14560    pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
14561    where
14562        T: std::convert::Into<crate::model::MasterAuth>,
14563    {
14564        self.update = v.map(|x| x.into());
14565        self
14566    }
14567
14568    /// Sets the value of [name][crate::model::SetMasterAuthRequest::name].
14569    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14570        self.name = v.into();
14571        self
14572    }
14573}
14574
14575impl wkt::message::Message for SetMasterAuthRequest {
14576    fn typename() -> &'static str {
14577        "type.googleapis.com/google.container.v1.SetMasterAuthRequest"
14578    }
14579}
14580
14581/// Defines additional types related to [SetMasterAuthRequest].
14582pub mod set_master_auth_request {
14583    #[allow(unused_imports)]
14584    use super::*;
14585
14586    /// Operation type: what type update to perform.
14587    ///
14588    /// # Working with unknown values
14589    ///
14590    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14591    /// additional enum variants at any time. Adding new variants is not considered
14592    /// a breaking change. Applications should write their code in anticipation of:
14593    ///
14594    /// - New values appearing in future releases of the client library, **and**
14595    /// - New values received dynamically, without application changes.
14596    ///
14597    /// Please consult the [Working with enums] section in the user guide for some
14598    /// guidelines.
14599    ///
14600    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14601    #[derive(Clone, Debug, PartialEq)]
14602    #[non_exhaustive]
14603    pub enum Action {
14604        /// Operation is unknown and will error out.
14605        Unknown,
14606        /// Set the password to a user generated value.
14607        SetPassword,
14608        /// Generate a new password and set it to that.
14609        GeneratePassword,
14610        /// Set the username.  If an empty username is provided, basic authentication
14611        /// is disabled for the cluster.  If a non-empty username is provided, basic
14612        /// authentication is enabled, with either a provided password or a generated
14613        /// one.
14614        SetUsername,
14615        /// If set, the enum was initialized with an unknown value.
14616        ///
14617        /// Applications can examine the value using [Action::value] or
14618        /// [Action::name].
14619        UnknownValue(action::UnknownValue),
14620    }
14621
14622    #[doc(hidden)]
14623    pub mod action {
14624        #[allow(unused_imports)]
14625        use super::*;
14626        #[derive(Clone, Debug, PartialEq)]
14627        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14628    }
14629
14630    impl Action {
14631        /// Gets the enum value.
14632        ///
14633        /// Returns `None` if the enum contains an unknown value deserialized from
14634        /// the string representation of enums.
14635        pub fn value(&self) -> std::option::Option<i32> {
14636            match self {
14637                Self::Unknown => std::option::Option::Some(0),
14638                Self::SetPassword => std::option::Option::Some(1),
14639                Self::GeneratePassword => std::option::Option::Some(2),
14640                Self::SetUsername => std::option::Option::Some(3),
14641                Self::UnknownValue(u) => u.0.value(),
14642            }
14643        }
14644
14645        /// Gets the enum value as a string.
14646        ///
14647        /// Returns `None` if the enum contains an unknown value deserialized from
14648        /// the integer representation of enums.
14649        pub fn name(&self) -> std::option::Option<&str> {
14650            match self {
14651                Self::Unknown => std::option::Option::Some("UNKNOWN"),
14652                Self::SetPassword => std::option::Option::Some("SET_PASSWORD"),
14653                Self::GeneratePassword => std::option::Option::Some("GENERATE_PASSWORD"),
14654                Self::SetUsername => std::option::Option::Some("SET_USERNAME"),
14655                Self::UnknownValue(u) => u.0.name(),
14656            }
14657        }
14658    }
14659
14660    impl std::default::Default for Action {
14661        fn default() -> Self {
14662            use std::convert::From;
14663            Self::from(0)
14664        }
14665    }
14666
14667    impl std::fmt::Display for Action {
14668        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14669            wkt::internal::display_enum(f, self.name(), self.value())
14670        }
14671    }
14672
14673    impl std::convert::From<i32> for Action {
14674        fn from(value: i32) -> Self {
14675            match value {
14676                0 => Self::Unknown,
14677                1 => Self::SetPassword,
14678                2 => Self::GeneratePassword,
14679                3 => Self::SetUsername,
14680                _ => Self::UnknownValue(action::UnknownValue(
14681                    wkt::internal::UnknownEnumValue::Integer(value),
14682                )),
14683            }
14684        }
14685    }
14686
14687    impl std::convert::From<&str> for Action {
14688        fn from(value: &str) -> Self {
14689            use std::string::ToString;
14690            match value {
14691                "UNKNOWN" => Self::Unknown,
14692                "SET_PASSWORD" => Self::SetPassword,
14693                "GENERATE_PASSWORD" => Self::GeneratePassword,
14694                "SET_USERNAME" => Self::SetUsername,
14695                _ => Self::UnknownValue(action::UnknownValue(
14696                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14697                )),
14698            }
14699        }
14700    }
14701
14702    impl serde::ser::Serialize for Action {
14703        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14704        where
14705            S: serde::Serializer,
14706        {
14707            match self {
14708                Self::Unknown => serializer.serialize_i32(0),
14709                Self::SetPassword => serializer.serialize_i32(1),
14710                Self::GeneratePassword => serializer.serialize_i32(2),
14711                Self::SetUsername => serializer.serialize_i32(3),
14712                Self::UnknownValue(u) => u.0.serialize(serializer),
14713            }
14714        }
14715    }
14716
14717    impl<'de> serde::de::Deserialize<'de> for Action {
14718        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14719        where
14720            D: serde::Deserializer<'de>,
14721        {
14722            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
14723                ".google.container.v1.SetMasterAuthRequest.Action",
14724            ))
14725        }
14726    }
14727}
14728
14729/// DeleteClusterRequest deletes a cluster.
14730#[derive(Clone, Default, PartialEq)]
14731#[non_exhaustive]
14732pub struct DeleteClusterRequest {
14733    /// Deprecated. The Google Developers Console [project ID or project
14734    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14735    /// This field has been deprecated and replaced by the name field.
14736    #[deprecated]
14737    pub project_id: std::string::String,
14738
14739    /// Deprecated. The name of the Google Compute Engine
14740    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14741    /// in which the cluster resides. This field has been deprecated and replaced
14742    /// by the name field.
14743    #[deprecated]
14744    pub zone: std::string::String,
14745
14746    /// Deprecated. The name of the cluster to delete.
14747    /// This field has been deprecated and replaced by the name field.
14748    #[deprecated]
14749    pub cluster_id: std::string::String,
14750
14751    /// The name (project, location, cluster) of the cluster to delete.
14752    /// Specified in the format `projects/*/locations/*/clusters/*`.
14753    pub name: std::string::String,
14754
14755    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14756}
14757
14758impl DeleteClusterRequest {
14759    pub fn new() -> Self {
14760        std::default::Default::default()
14761    }
14762
14763    /// Sets the value of [project_id][crate::model::DeleteClusterRequest::project_id].
14764    #[deprecated]
14765    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14766        self.project_id = v.into();
14767        self
14768    }
14769
14770    /// Sets the value of [zone][crate::model::DeleteClusterRequest::zone].
14771    #[deprecated]
14772    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14773        self.zone = v.into();
14774        self
14775    }
14776
14777    /// Sets the value of [cluster_id][crate::model::DeleteClusterRequest::cluster_id].
14778    #[deprecated]
14779    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14780        self.cluster_id = v.into();
14781        self
14782    }
14783
14784    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
14785    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14786        self.name = v.into();
14787        self
14788    }
14789}
14790
14791impl wkt::message::Message for DeleteClusterRequest {
14792    fn typename() -> &'static str {
14793        "type.googleapis.com/google.container.v1.DeleteClusterRequest"
14794    }
14795}
14796
14797/// ListClustersRequest lists clusters.
14798#[derive(Clone, Default, PartialEq)]
14799#[non_exhaustive]
14800pub struct ListClustersRequest {
14801    /// Deprecated. The Google Developers Console [project ID or project
14802    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14803    /// This field has been deprecated and replaced by the parent field.
14804    #[deprecated]
14805    pub project_id: std::string::String,
14806
14807    /// Deprecated. The name of the Google Compute Engine
14808    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14809    /// in which the cluster resides, or "-" for all zones. This field has been
14810    /// deprecated and replaced by the parent field.
14811    #[deprecated]
14812    pub zone: std::string::String,
14813
14814    /// The parent (project and location) where the clusters will be listed.
14815    /// Specified in the format `projects/*/locations/*`.
14816    /// Location "-" matches all zones and all regions.
14817    pub parent: std::string::String,
14818
14819    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14820}
14821
14822impl ListClustersRequest {
14823    pub fn new() -> Self {
14824        std::default::Default::default()
14825    }
14826
14827    /// Sets the value of [project_id][crate::model::ListClustersRequest::project_id].
14828    #[deprecated]
14829    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14830        self.project_id = v.into();
14831        self
14832    }
14833
14834    /// Sets the value of [zone][crate::model::ListClustersRequest::zone].
14835    #[deprecated]
14836    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14837        self.zone = v.into();
14838        self
14839    }
14840
14841    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
14842    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14843        self.parent = v.into();
14844        self
14845    }
14846}
14847
14848impl wkt::message::Message for ListClustersRequest {
14849    fn typename() -> &'static str {
14850        "type.googleapis.com/google.container.v1.ListClustersRequest"
14851    }
14852}
14853
14854/// ListClustersResponse is the result of ListClustersRequest.
14855#[derive(Clone, Default, PartialEq)]
14856#[non_exhaustive]
14857pub struct ListClustersResponse {
14858    /// A list of clusters in the project in the specified zone, or
14859    /// across all ones.
14860    pub clusters: std::vec::Vec<crate::model::Cluster>,
14861
14862    /// If any zones are listed here, the list of clusters returned
14863    /// may be missing those zones.
14864    pub missing_zones: std::vec::Vec<std::string::String>,
14865
14866    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14867}
14868
14869impl ListClustersResponse {
14870    pub fn new() -> Self {
14871        std::default::Default::default()
14872    }
14873
14874    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
14875    pub fn set_clusters<T, V>(mut self, v: T) -> Self
14876    where
14877        T: std::iter::IntoIterator<Item = V>,
14878        V: std::convert::Into<crate::model::Cluster>,
14879    {
14880        use std::iter::Iterator;
14881        self.clusters = v.into_iter().map(|i| i.into()).collect();
14882        self
14883    }
14884
14885    /// Sets the value of [missing_zones][crate::model::ListClustersResponse::missing_zones].
14886    pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
14887    where
14888        T: std::iter::IntoIterator<Item = V>,
14889        V: std::convert::Into<std::string::String>,
14890    {
14891        use std::iter::Iterator;
14892        self.missing_zones = v.into_iter().map(|i| i.into()).collect();
14893        self
14894    }
14895}
14896
14897impl wkt::message::Message for ListClustersResponse {
14898    fn typename() -> &'static str {
14899        "type.googleapis.com/google.container.v1.ListClustersResponse"
14900    }
14901}
14902
14903/// GetOperationRequest gets a single operation.
14904#[derive(Clone, Default, PartialEq)]
14905#[non_exhaustive]
14906pub struct GetOperationRequest {
14907    /// Deprecated. The Google Developers Console [project ID or project
14908    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14909    /// This field has been deprecated and replaced by the name field.
14910    #[deprecated]
14911    pub project_id: std::string::String,
14912
14913    /// Deprecated. The name of the Google Compute Engine
14914    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14915    /// in which the cluster resides. This field has been deprecated and replaced
14916    /// by the name field.
14917    #[deprecated]
14918    pub zone: std::string::String,
14919
14920    /// Deprecated. The server-assigned `name` of the operation.
14921    /// This field has been deprecated and replaced by the name field.
14922    #[deprecated]
14923    pub operation_id: std::string::String,
14924
14925    /// The name (project, location, operation id) of the operation to get.
14926    /// Specified in the format `projects/*/locations/*/operations/*`.
14927    pub name: std::string::String,
14928
14929    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14930}
14931
14932impl GetOperationRequest {
14933    pub fn new() -> Self {
14934        std::default::Default::default()
14935    }
14936
14937    /// Sets the value of [project_id][crate::model::GetOperationRequest::project_id].
14938    #[deprecated]
14939    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14940        self.project_id = v.into();
14941        self
14942    }
14943
14944    /// Sets the value of [zone][crate::model::GetOperationRequest::zone].
14945    #[deprecated]
14946    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14947        self.zone = v.into();
14948        self
14949    }
14950
14951    /// Sets the value of [operation_id][crate::model::GetOperationRequest::operation_id].
14952    #[deprecated]
14953    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14954        self.operation_id = v.into();
14955        self
14956    }
14957
14958    /// Sets the value of [name][crate::model::GetOperationRequest::name].
14959    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14960        self.name = v.into();
14961        self
14962    }
14963}
14964
14965impl wkt::message::Message for GetOperationRequest {
14966    fn typename() -> &'static str {
14967        "type.googleapis.com/google.container.v1.GetOperationRequest"
14968    }
14969}
14970
14971/// ListOperationsRequest lists operations.
14972#[derive(Clone, Default, PartialEq)]
14973#[non_exhaustive]
14974pub struct ListOperationsRequest {
14975    /// Deprecated. The Google Developers Console [project ID or project
14976    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
14977    /// This field has been deprecated and replaced by the parent field.
14978    #[deprecated]
14979    pub project_id: std::string::String,
14980
14981    /// Deprecated. The name of the Google Compute Engine
14982    /// [zone](https://cloud.google.com/compute/docs/zones#available)
14983    /// to return operations for, or `-` for all zones. This field has been
14984    /// deprecated and replaced by the parent field.
14985    #[deprecated]
14986    pub zone: std::string::String,
14987
14988    /// The parent (project and location) where the operations will be listed.
14989    /// Specified in the format `projects/*/locations/*`.
14990    /// Location "-" matches all zones and all regions.
14991    pub parent: std::string::String,
14992
14993    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14994}
14995
14996impl ListOperationsRequest {
14997    pub fn new() -> Self {
14998        std::default::Default::default()
14999    }
15000
15001    /// Sets the value of [project_id][crate::model::ListOperationsRequest::project_id].
15002    #[deprecated]
15003    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15004        self.project_id = v.into();
15005        self
15006    }
15007
15008    /// Sets the value of [zone][crate::model::ListOperationsRequest::zone].
15009    #[deprecated]
15010    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15011        self.zone = v.into();
15012        self
15013    }
15014
15015    /// Sets the value of [parent][crate::model::ListOperationsRequest::parent].
15016    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15017        self.parent = v.into();
15018        self
15019    }
15020}
15021
15022impl wkt::message::Message for ListOperationsRequest {
15023    fn typename() -> &'static str {
15024        "type.googleapis.com/google.container.v1.ListOperationsRequest"
15025    }
15026}
15027
15028/// CancelOperationRequest cancels a single operation.
15029#[derive(Clone, Default, PartialEq)]
15030#[non_exhaustive]
15031pub struct CancelOperationRequest {
15032    /// Deprecated. The Google Developers Console [project ID or project
15033    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15034    /// This field has been deprecated and replaced by the name field.
15035    #[deprecated]
15036    pub project_id: std::string::String,
15037
15038    /// Deprecated. The name of the Google Compute Engine
15039    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15040    /// in which the operation resides. This field has been deprecated and replaced
15041    /// by the name field.
15042    #[deprecated]
15043    pub zone: std::string::String,
15044
15045    /// Deprecated. The server-assigned `name` of the operation.
15046    /// This field has been deprecated and replaced by the name field.
15047    #[deprecated]
15048    pub operation_id: std::string::String,
15049
15050    /// The name (project, location, operation id) of the operation to cancel.
15051    /// Specified in the format `projects/*/locations/*/operations/*`.
15052    pub name: std::string::String,
15053
15054    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15055}
15056
15057impl CancelOperationRequest {
15058    pub fn new() -> Self {
15059        std::default::Default::default()
15060    }
15061
15062    /// Sets the value of [project_id][crate::model::CancelOperationRequest::project_id].
15063    #[deprecated]
15064    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15065        self.project_id = v.into();
15066        self
15067    }
15068
15069    /// Sets the value of [zone][crate::model::CancelOperationRequest::zone].
15070    #[deprecated]
15071    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15072        self.zone = v.into();
15073        self
15074    }
15075
15076    /// Sets the value of [operation_id][crate::model::CancelOperationRequest::operation_id].
15077    #[deprecated]
15078    pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15079        self.operation_id = v.into();
15080        self
15081    }
15082
15083    /// Sets the value of [name][crate::model::CancelOperationRequest::name].
15084    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15085        self.name = v.into();
15086        self
15087    }
15088}
15089
15090impl wkt::message::Message for CancelOperationRequest {
15091    fn typename() -> &'static str {
15092        "type.googleapis.com/google.container.v1.CancelOperationRequest"
15093    }
15094}
15095
15096/// ListOperationsResponse is the result of ListOperationsRequest.
15097#[derive(Clone, Default, PartialEq)]
15098#[non_exhaustive]
15099pub struct ListOperationsResponse {
15100    /// A list of operations in the project in the specified zone.
15101    pub operations: std::vec::Vec<crate::model::Operation>,
15102
15103    /// If any zones are listed here, the list of operations returned
15104    /// may be missing the operations from those zones.
15105    pub missing_zones: std::vec::Vec<std::string::String>,
15106
15107    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15108}
15109
15110impl ListOperationsResponse {
15111    pub fn new() -> Self {
15112        std::default::Default::default()
15113    }
15114
15115    /// Sets the value of [operations][crate::model::ListOperationsResponse::operations].
15116    pub fn set_operations<T, V>(mut self, v: T) -> Self
15117    where
15118        T: std::iter::IntoIterator<Item = V>,
15119        V: std::convert::Into<crate::model::Operation>,
15120    {
15121        use std::iter::Iterator;
15122        self.operations = v.into_iter().map(|i| i.into()).collect();
15123        self
15124    }
15125
15126    /// Sets the value of [missing_zones][crate::model::ListOperationsResponse::missing_zones].
15127    pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
15128    where
15129        T: std::iter::IntoIterator<Item = V>,
15130        V: std::convert::Into<std::string::String>,
15131    {
15132        use std::iter::Iterator;
15133        self.missing_zones = v.into_iter().map(|i| i.into()).collect();
15134        self
15135    }
15136}
15137
15138impl wkt::message::Message for ListOperationsResponse {
15139    fn typename() -> &'static str {
15140        "type.googleapis.com/google.container.v1.ListOperationsResponse"
15141    }
15142}
15143
15144/// Gets the current Kubernetes Engine service configuration.
15145#[derive(Clone, Default, PartialEq)]
15146#[non_exhaustive]
15147pub struct GetServerConfigRequest {
15148    /// Deprecated. The Google Developers Console [project ID or project
15149    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15150    /// This field has been deprecated and replaced by the name field.
15151    #[deprecated]
15152    pub project_id: std::string::String,
15153
15154    /// Deprecated. The name of the Google Compute Engine
15155    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15156    /// to return operations for. This field has been deprecated and replaced by
15157    /// the name field.
15158    #[deprecated]
15159    pub zone: std::string::String,
15160
15161    /// The name (project and location) of the server config to get,
15162    /// specified in the format `projects/*/locations/*`.
15163    pub name: std::string::String,
15164
15165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15166}
15167
15168impl GetServerConfigRequest {
15169    pub fn new() -> Self {
15170        std::default::Default::default()
15171    }
15172
15173    /// Sets the value of [project_id][crate::model::GetServerConfigRequest::project_id].
15174    #[deprecated]
15175    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15176        self.project_id = v.into();
15177        self
15178    }
15179
15180    /// Sets the value of [zone][crate::model::GetServerConfigRequest::zone].
15181    #[deprecated]
15182    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15183        self.zone = v.into();
15184        self
15185    }
15186
15187    /// Sets the value of [name][crate::model::GetServerConfigRequest::name].
15188    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15189        self.name = v.into();
15190        self
15191    }
15192}
15193
15194impl wkt::message::Message for GetServerConfigRequest {
15195    fn typename() -> &'static str {
15196        "type.googleapis.com/google.container.v1.GetServerConfigRequest"
15197    }
15198}
15199
15200/// Kubernetes Engine service configuration.
15201#[derive(Clone, Default, PartialEq)]
15202#[non_exhaustive]
15203pub struct ServerConfig {
15204    /// Version of Kubernetes the service deploys by default.
15205    pub default_cluster_version: std::string::String,
15206
15207    /// List of valid node upgrade target versions, in descending order.
15208    pub valid_node_versions: std::vec::Vec<std::string::String>,
15209
15210    /// Default image type.
15211    pub default_image_type: std::string::String,
15212
15213    /// List of valid image types.
15214    pub valid_image_types: std::vec::Vec<std::string::String>,
15215
15216    /// List of valid master versions, in descending order.
15217    pub valid_master_versions: std::vec::Vec<std::string::String>,
15218
15219    /// List of release channel configurations.
15220    pub channels: std::vec::Vec<crate::model::server_config::ReleaseChannelConfig>,
15221
15222    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15223}
15224
15225impl ServerConfig {
15226    pub fn new() -> Self {
15227        std::default::Default::default()
15228    }
15229
15230    /// Sets the value of [default_cluster_version][crate::model::ServerConfig::default_cluster_version].
15231    pub fn set_default_cluster_version<T: std::convert::Into<std::string::String>>(
15232        mut self,
15233        v: T,
15234    ) -> Self {
15235        self.default_cluster_version = v.into();
15236        self
15237    }
15238
15239    /// Sets the value of [valid_node_versions][crate::model::ServerConfig::valid_node_versions].
15240    pub fn set_valid_node_versions<T, V>(mut self, v: T) -> Self
15241    where
15242        T: std::iter::IntoIterator<Item = V>,
15243        V: std::convert::Into<std::string::String>,
15244    {
15245        use std::iter::Iterator;
15246        self.valid_node_versions = v.into_iter().map(|i| i.into()).collect();
15247        self
15248    }
15249
15250    /// Sets the value of [default_image_type][crate::model::ServerConfig::default_image_type].
15251    pub fn set_default_image_type<T: std::convert::Into<std::string::String>>(
15252        mut self,
15253        v: T,
15254    ) -> Self {
15255        self.default_image_type = v.into();
15256        self
15257    }
15258
15259    /// Sets the value of [valid_image_types][crate::model::ServerConfig::valid_image_types].
15260    pub fn set_valid_image_types<T, V>(mut self, v: T) -> Self
15261    where
15262        T: std::iter::IntoIterator<Item = V>,
15263        V: std::convert::Into<std::string::String>,
15264    {
15265        use std::iter::Iterator;
15266        self.valid_image_types = v.into_iter().map(|i| i.into()).collect();
15267        self
15268    }
15269
15270    /// Sets the value of [valid_master_versions][crate::model::ServerConfig::valid_master_versions].
15271    pub fn set_valid_master_versions<T, V>(mut self, v: T) -> Self
15272    where
15273        T: std::iter::IntoIterator<Item = V>,
15274        V: std::convert::Into<std::string::String>,
15275    {
15276        use std::iter::Iterator;
15277        self.valid_master_versions = v.into_iter().map(|i| i.into()).collect();
15278        self
15279    }
15280
15281    /// Sets the value of [channels][crate::model::ServerConfig::channels].
15282    pub fn set_channels<T, V>(mut self, v: T) -> Self
15283    where
15284        T: std::iter::IntoIterator<Item = V>,
15285        V: std::convert::Into<crate::model::server_config::ReleaseChannelConfig>,
15286    {
15287        use std::iter::Iterator;
15288        self.channels = v.into_iter().map(|i| i.into()).collect();
15289        self
15290    }
15291}
15292
15293impl wkt::message::Message for ServerConfig {
15294    fn typename() -> &'static str {
15295        "type.googleapis.com/google.container.v1.ServerConfig"
15296    }
15297}
15298
15299/// Defines additional types related to [ServerConfig].
15300pub mod server_config {
15301    #[allow(unused_imports)]
15302    use super::*;
15303
15304    /// ReleaseChannelConfig exposes configuration for a release channel.
15305    #[derive(Clone, Default, PartialEq)]
15306    #[non_exhaustive]
15307    pub struct ReleaseChannelConfig {
15308        /// The release channel this configuration applies to.
15309        pub channel: crate::model::release_channel::Channel,
15310
15311        /// The default version for newly created clusters on the channel.
15312        pub default_version: std::string::String,
15313
15314        /// List of valid versions for the channel.
15315        pub valid_versions: std::vec::Vec<std::string::String>,
15316
15317        /// The auto upgrade target version for clusters on the channel.
15318        pub upgrade_target_version: std::string::String,
15319
15320        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15321    }
15322
15323    impl ReleaseChannelConfig {
15324        pub fn new() -> Self {
15325            std::default::Default::default()
15326        }
15327
15328        /// Sets the value of [channel][crate::model::server_config::ReleaseChannelConfig::channel].
15329        pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
15330            mut self,
15331            v: T,
15332        ) -> Self {
15333            self.channel = v.into();
15334            self
15335        }
15336
15337        /// Sets the value of [default_version][crate::model::server_config::ReleaseChannelConfig::default_version].
15338        pub fn set_default_version<T: std::convert::Into<std::string::String>>(
15339            mut self,
15340            v: T,
15341        ) -> Self {
15342            self.default_version = v.into();
15343            self
15344        }
15345
15346        /// Sets the value of [valid_versions][crate::model::server_config::ReleaseChannelConfig::valid_versions].
15347        pub fn set_valid_versions<T, V>(mut self, v: T) -> Self
15348        where
15349            T: std::iter::IntoIterator<Item = V>,
15350            V: std::convert::Into<std::string::String>,
15351        {
15352            use std::iter::Iterator;
15353            self.valid_versions = v.into_iter().map(|i| i.into()).collect();
15354            self
15355        }
15356
15357        /// Sets the value of [upgrade_target_version][crate::model::server_config::ReleaseChannelConfig::upgrade_target_version].
15358        pub fn set_upgrade_target_version<T: std::convert::Into<std::string::String>>(
15359            mut self,
15360            v: T,
15361        ) -> Self {
15362            self.upgrade_target_version = v.into();
15363            self
15364        }
15365    }
15366
15367    impl wkt::message::Message for ReleaseChannelConfig {
15368        fn typename() -> &'static str {
15369            "type.googleapis.com/google.container.v1.ServerConfig.ReleaseChannelConfig"
15370        }
15371    }
15372}
15373
15374/// CreateNodePoolRequest creates a node pool for a cluster.
15375#[derive(Clone, Default, PartialEq)]
15376#[non_exhaustive]
15377pub struct CreateNodePoolRequest {
15378    /// Deprecated. The Google Developers Console [project ID or project
15379    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15380    /// This field has been deprecated and replaced by the parent field.
15381    #[deprecated]
15382    pub project_id: std::string::String,
15383
15384    /// Deprecated. The name of the Google Compute Engine
15385    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15386    /// in which the cluster resides. This field has been deprecated and replaced
15387    /// by the parent field.
15388    #[deprecated]
15389    pub zone: std::string::String,
15390
15391    /// Deprecated. The name of the cluster.
15392    /// This field has been deprecated and replaced by the parent field.
15393    #[deprecated]
15394    pub cluster_id: std::string::String,
15395
15396    /// Required. The node pool to create.
15397    pub node_pool: std::option::Option<crate::model::NodePool>,
15398
15399    /// The parent (project, location, cluster name) where the node pool will be
15400    /// created. Specified in the format
15401    /// `projects/*/locations/*/clusters/*`.
15402    pub parent: std::string::String,
15403
15404    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15405}
15406
15407impl CreateNodePoolRequest {
15408    pub fn new() -> Self {
15409        std::default::Default::default()
15410    }
15411
15412    /// Sets the value of [project_id][crate::model::CreateNodePoolRequest::project_id].
15413    #[deprecated]
15414    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15415        self.project_id = v.into();
15416        self
15417    }
15418
15419    /// Sets the value of [zone][crate::model::CreateNodePoolRequest::zone].
15420    #[deprecated]
15421    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15422        self.zone = v.into();
15423        self
15424    }
15425
15426    /// Sets the value of [cluster_id][crate::model::CreateNodePoolRequest::cluster_id].
15427    #[deprecated]
15428    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15429        self.cluster_id = v.into();
15430        self
15431    }
15432
15433    /// Sets the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
15434    pub fn set_node_pool<T>(mut self, v: T) -> Self
15435    where
15436        T: std::convert::Into<crate::model::NodePool>,
15437    {
15438        self.node_pool = std::option::Option::Some(v.into());
15439        self
15440    }
15441
15442    /// Sets or clears the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
15443    pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
15444    where
15445        T: std::convert::Into<crate::model::NodePool>,
15446    {
15447        self.node_pool = v.map(|x| x.into());
15448        self
15449    }
15450
15451    /// Sets the value of [parent][crate::model::CreateNodePoolRequest::parent].
15452    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15453        self.parent = v.into();
15454        self
15455    }
15456}
15457
15458impl wkt::message::Message for CreateNodePoolRequest {
15459    fn typename() -> &'static str {
15460        "type.googleapis.com/google.container.v1.CreateNodePoolRequest"
15461    }
15462}
15463
15464/// DeleteNodePoolRequest deletes a node pool for a cluster.
15465#[derive(Clone, Default, PartialEq)]
15466#[non_exhaustive]
15467pub struct DeleteNodePoolRequest {
15468    /// Deprecated. The Google Developers Console [project ID or project
15469    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15470    /// This field has been deprecated and replaced by the name field.
15471    #[deprecated]
15472    pub project_id: std::string::String,
15473
15474    /// Deprecated. The name of the Google Compute Engine
15475    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15476    /// in which the cluster resides. This field has been deprecated and replaced
15477    /// by the name field.
15478    #[deprecated]
15479    pub zone: std::string::String,
15480
15481    /// Deprecated. The name of the cluster.
15482    /// This field has been deprecated and replaced by the name field.
15483    #[deprecated]
15484    pub cluster_id: std::string::String,
15485
15486    /// Deprecated. The name of the node pool to delete.
15487    /// This field has been deprecated and replaced by the name field.
15488    #[deprecated]
15489    pub node_pool_id: std::string::String,
15490
15491    /// The name (project, location, cluster, node pool id) of the node pool to
15492    /// delete. Specified in the format
15493    /// `projects/*/locations/*/clusters/*/nodePools/*`.
15494    pub name: std::string::String,
15495
15496    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15497}
15498
15499impl DeleteNodePoolRequest {
15500    pub fn new() -> Self {
15501        std::default::Default::default()
15502    }
15503
15504    /// Sets the value of [project_id][crate::model::DeleteNodePoolRequest::project_id].
15505    #[deprecated]
15506    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15507        self.project_id = v.into();
15508        self
15509    }
15510
15511    /// Sets the value of [zone][crate::model::DeleteNodePoolRequest::zone].
15512    #[deprecated]
15513    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15514        self.zone = v.into();
15515        self
15516    }
15517
15518    /// Sets the value of [cluster_id][crate::model::DeleteNodePoolRequest::cluster_id].
15519    #[deprecated]
15520    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15521        self.cluster_id = v.into();
15522        self
15523    }
15524
15525    /// Sets the value of [node_pool_id][crate::model::DeleteNodePoolRequest::node_pool_id].
15526    #[deprecated]
15527    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15528        self.node_pool_id = v.into();
15529        self
15530    }
15531
15532    /// Sets the value of [name][crate::model::DeleteNodePoolRequest::name].
15533    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15534        self.name = v.into();
15535        self
15536    }
15537}
15538
15539impl wkt::message::Message for DeleteNodePoolRequest {
15540    fn typename() -> &'static str {
15541        "type.googleapis.com/google.container.v1.DeleteNodePoolRequest"
15542    }
15543}
15544
15545/// ListNodePoolsRequest lists the node pool(s) for a cluster.
15546#[derive(Clone, Default, PartialEq)]
15547#[non_exhaustive]
15548pub struct ListNodePoolsRequest {
15549    /// Deprecated. The Google Developers Console [project ID or project
15550    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15551    /// This field has been deprecated and replaced by the parent field.
15552    #[deprecated]
15553    pub project_id: std::string::String,
15554
15555    /// Deprecated. The name of the Google Compute Engine
15556    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15557    /// in which the cluster resides. This field has been deprecated and replaced
15558    /// by the parent field.
15559    #[deprecated]
15560    pub zone: std::string::String,
15561
15562    /// Deprecated. The name of the cluster.
15563    /// This field has been deprecated and replaced by the parent field.
15564    #[deprecated]
15565    pub cluster_id: std::string::String,
15566
15567    /// The parent (project, location, cluster name) where the node pools will be
15568    /// listed. Specified in the format `projects/*/locations/*/clusters/*`.
15569    pub parent: std::string::String,
15570
15571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15572}
15573
15574impl ListNodePoolsRequest {
15575    pub fn new() -> Self {
15576        std::default::Default::default()
15577    }
15578
15579    /// Sets the value of [project_id][crate::model::ListNodePoolsRequest::project_id].
15580    #[deprecated]
15581    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15582        self.project_id = v.into();
15583        self
15584    }
15585
15586    /// Sets the value of [zone][crate::model::ListNodePoolsRequest::zone].
15587    #[deprecated]
15588    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15589        self.zone = v.into();
15590        self
15591    }
15592
15593    /// Sets the value of [cluster_id][crate::model::ListNodePoolsRequest::cluster_id].
15594    #[deprecated]
15595    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15596        self.cluster_id = v.into();
15597        self
15598    }
15599
15600    /// Sets the value of [parent][crate::model::ListNodePoolsRequest::parent].
15601    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15602        self.parent = v.into();
15603        self
15604    }
15605}
15606
15607impl wkt::message::Message for ListNodePoolsRequest {
15608    fn typename() -> &'static str {
15609        "type.googleapis.com/google.container.v1.ListNodePoolsRequest"
15610    }
15611}
15612
15613/// GetNodePoolRequest retrieves a node pool for a cluster.
15614#[derive(Clone, Default, PartialEq)]
15615#[non_exhaustive]
15616pub struct GetNodePoolRequest {
15617    /// Deprecated. The Google Developers Console [project ID or project
15618    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
15619    /// This field has been deprecated and replaced by the name field.
15620    #[deprecated]
15621    pub project_id: std::string::String,
15622
15623    /// Deprecated. The name of the Google Compute Engine
15624    /// [zone](https://cloud.google.com/compute/docs/zones#available)
15625    /// in which the cluster resides. This field has been deprecated and replaced
15626    /// by the name field.
15627    #[deprecated]
15628    pub zone: std::string::String,
15629
15630    /// Deprecated. The name of the cluster.
15631    /// This field has been deprecated and replaced by the name field.
15632    #[deprecated]
15633    pub cluster_id: std::string::String,
15634
15635    /// Deprecated. The name of the node pool.
15636    /// This field has been deprecated and replaced by the name field.
15637    #[deprecated]
15638    pub node_pool_id: std::string::String,
15639
15640    /// The name (project, location, cluster, node pool id) of the node pool to
15641    /// get. Specified in the format
15642    /// `projects/*/locations/*/clusters/*/nodePools/*`.
15643    pub name: std::string::String,
15644
15645    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15646}
15647
15648impl GetNodePoolRequest {
15649    pub fn new() -> Self {
15650        std::default::Default::default()
15651    }
15652
15653    /// Sets the value of [project_id][crate::model::GetNodePoolRequest::project_id].
15654    #[deprecated]
15655    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15656        self.project_id = v.into();
15657        self
15658    }
15659
15660    /// Sets the value of [zone][crate::model::GetNodePoolRequest::zone].
15661    #[deprecated]
15662    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15663        self.zone = v.into();
15664        self
15665    }
15666
15667    /// Sets the value of [cluster_id][crate::model::GetNodePoolRequest::cluster_id].
15668    #[deprecated]
15669    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15670        self.cluster_id = v.into();
15671        self
15672    }
15673
15674    /// Sets the value of [node_pool_id][crate::model::GetNodePoolRequest::node_pool_id].
15675    #[deprecated]
15676    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15677        self.node_pool_id = v.into();
15678        self
15679    }
15680
15681    /// Sets the value of [name][crate::model::GetNodePoolRequest::name].
15682    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15683        self.name = v.into();
15684        self
15685    }
15686}
15687
15688impl wkt::message::Message for GetNodePoolRequest {
15689    fn typename() -> &'static str {
15690        "type.googleapis.com/google.container.v1.GetNodePoolRequest"
15691    }
15692}
15693
15694/// Settings for blue-green upgrade.
15695#[derive(Clone, Default, PartialEq)]
15696#[non_exhaustive]
15697pub struct BlueGreenSettings {
15698    /// Time needed after draining entire blue pool. After this period, blue pool
15699    /// will be cleaned up.
15700    pub node_pool_soak_duration: std::option::Option<wkt::Duration>,
15701
15702    /// The rollout policy controls the general rollout progress of blue-green.
15703    pub rollout_policy: std::option::Option<crate::model::blue_green_settings::RolloutPolicy>,
15704
15705    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15706}
15707
15708impl BlueGreenSettings {
15709    pub fn new() -> Self {
15710        std::default::Default::default()
15711    }
15712
15713    /// Sets the value of [node_pool_soak_duration][crate::model::BlueGreenSettings::node_pool_soak_duration].
15714    pub fn set_node_pool_soak_duration<T>(mut self, v: T) -> Self
15715    where
15716        T: std::convert::Into<wkt::Duration>,
15717    {
15718        self.node_pool_soak_duration = std::option::Option::Some(v.into());
15719        self
15720    }
15721
15722    /// Sets or clears the value of [node_pool_soak_duration][crate::model::BlueGreenSettings::node_pool_soak_duration].
15723    pub fn set_or_clear_node_pool_soak_duration<T>(mut self, v: std::option::Option<T>) -> Self
15724    where
15725        T: std::convert::Into<wkt::Duration>,
15726    {
15727        self.node_pool_soak_duration = v.map(|x| x.into());
15728        self
15729    }
15730
15731    /// Sets the value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy].
15732    ///
15733    /// Note that all the setters affecting `rollout_policy` are mutually
15734    /// exclusive.
15735    pub fn set_rollout_policy<
15736        T: std::convert::Into<std::option::Option<crate::model::blue_green_settings::RolloutPolicy>>,
15737    >(
15738        mut self,
15739        v: T,
15740    ) -> Self {
15741        self.rollout_policy = v.into();
15742        self
15743    }
15744
15745    /// The value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy]
15746    /// if it holds a `StandardRolloutPolicy`, `None` if the field is not set or
15747    /// holds a different branch.
15748    pub fn standard_rollout_policy(
15749        &self,
15750    ) -> std::option::Option<
15751        &std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
15752    > {
15753        #[allow(unreachable_patterns)]
15754        self.rollout_policy.as_ref().and_then(|v| match v {
15755            crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v) => {
15756                std::option::Option::Some(v)
15757            }
15758            _ => std::option::Option::None,
15759        })
15760    }
15761
15762    /// Sets the value of [rollout_policy][crate::model::BlueGreenSettings::rollout_policy]
15763    /// to hold a `StandardRolloutPolicy`.
15764    ///
15765    /// Note that all the setters affecting `rollout_policy` are
15766    /// mutually exclusive.
15767    pub fn set_standard_rollout_policy<
15768        T: std::convert::Into<
15769                std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
15770            >,
15771    >(
15772        mut self,
15773        v: T,
15774    ) -> Self {
15775        self.rollout_policy = std::option::Option::Some(
15776            crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v.into()),
15777        );
15778        self
15779    }
15780}
15781
15782impl wkt::message::Message for BlueGreenSettings {
15783    fn typename() -> &'static str {
15784        "type.googleapis.com/google.container.v1.BlueGreenSettings"
15785    }
15786}
15787
15788/// Defines additional types related to [BlueGreenSettings].
15789pub mod blue_green_settings {
15790    #[allow(unused_imports)]
15791    use super::*;
15792
15793    /// Standard rollout policy is the default policy for blue-green.
15794    #[derive(Clone, Default, PartialEq)]
15795    #[non_exhaustive]
15796    pub struct StandardRolloutPolicy {
15797        /// Soak time after each batch gets drained. Default to zero.
15798        pub batch_soak_duration: std::option::Option<wkt::Duration>,
15799
15800        /// Blue pool size to drain in a batch.
15801        pub update_batch_size: std::option::Option<
15802            crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
15803        >,
15804
15805        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15806    }
15807
15808    impl StandardRolloutPolicy {
15809        pub fn new() -> Self {
15810            std::default::Default::default()
15811        }
15812
15813        /// Sets the value of [batch_soak_duration][crate::model::blue_green_settings::StandardRolloutPolicy::batch_soak_duration].
15814        pub fn set_batch_soak_duration<T>(mut self, v: T) -> Self
15815        where
15816            T: std::convert::Into<wkt::Duration>,
15817        {
15818            self.batch_soak_duration = std::option::Option::Some(v.into());
15819            self
15820        }
15821
15822        /// Sets or clears the value of [batch_soak_duration][crate::model::blue_green_settings::StandardRolloutPolicy::batch_soak_duration].
15823        pub fn set_or_clear_batch_soak_duration<T>(mut self, v: std::option::Option<T>) -> Self
15824        where
15825            T: std::convert::Into<wkt::Duration>,
15826        {
15827            self.batch_soak_duration = v.map(|x| x.into());
15828            self
15829        }
15830
15831        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size].
15832        ///
15833        /// Note that all the setters affecting `update_batch_size` are mutually
15834        /// exclusive.
15835        pub fn set_update_batch_size<
15836            T: std::convert::Into<
15837                    std::option::Option<
15838                        crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
15839                    >,
15840                >,
15841        >(
15842            mut self,
15843            v: T,
15844        ) -> Self {
15845            self.update_batch_size = v.into();
15846            self
15847        }
15848
15849        /// The value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
15850        /// if it holds a `BatchPercentage`, `None` if the field is not set or
15851        /// holds a different branch.
15852        pub fn batch_percentage(&self) -> std::option::Option<&f32> {
15853            #[allow(unreachable_patterns)]
15854            self.update_batch_size.as_ref().and_then(|v| match v {
15855                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(v) => std::option::Option::Some(v),
15856                _ => std::option::Option::None,
15857            })
15858        }
15859
15860        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
15861        /// to hold a `BatchPercentage`.
15862        ///
15863        /// Note that all the setters affecting `update_batch_size` are
15864        /// mutually exclusive.
15865        pub fn set_batch_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
15866            self.update_batch_size = std::option::Option::Some(
15867                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(
15868                    v.into()
15869                )
15870            );
15871            self
15872        }
15873
15874        /// The value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
15875        /// if it holds a `BatchNodeCount`, `None` if the field is not set or
15876        /// holds a different branch.
15877        pub fn batch_node_count(&self) -> std::option::Option<&i32> {
15878            #[allow(unreachable_patterns)]
15879            self.update_batch_size.as_ref().and_then(|v| match v {
15880                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(v) => std::option::Option::Some(v),
15881                _ => std::option::Option::None,
15882            })
15883        }
15884
15885        /// Sets the value of [update_batch_size][crate::model::blue_green_settings::StandardRolloutPolicy::update_batch_size]
15886        /// to hold a `BatchNodeCount`.
15887        ///
15888        /// Note that all the setters affecting `update_batch_size` are
15889        /// mutually exclusive.
15890        pub fn set_batch_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15891            self.update_batch_size = std::option::Option::Some(
15892                crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(
15893                    v.into()
15894                )
15895            );
15896            self
15897        }
15898    }
15899
15900    impl wkt::message::Message for StandardRolloutPolicy {
15901        fn typename() -> &'static str {
15902            "type.googleapis.com/google.container.v1.BlueGreenSettings.StandardRolloutPolicy"
15903        }
15904    }
15905
15906    /// Defines additional types related to [StandardRolloutPolicy].
15907    pub mod standard_rollout_policy {
15908        #[allow(unused_imports)]
15909        use super::*;
15910
15911        /// Blue pool size to drain in a batch.
15912        #[derive(Clone, Debug, PartialEq)]
15913        #[non_exhaustive]
15914        pub enum UpdateBatchSize {
15915            /// Percentage of the blue pool nodes to drain in a batch.
15916            /// The range of this field should be (0.0, 1.0].
15917            BatchPercentage(f32),
15918            /// Number of blue nodes to drain in a batch.
15919            BatchNodeCount(i32),
15920        }
15921    }
15922
15923    /// The rollout policy controls the general rollout progress of blue-green.
15924    #[derive(Clone, Debug, PartialEq)]
15925    #[non_exhaustive]
15926    pub enum RolloutPolicy {
15927        /// Standard policy for the blue-green upgrade.
15928        StandardRolloutPolicy(
15929            std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
15930        ),
15931    }
15932}
15933
15934/// NodePool contains the name and configuration for a cluster's node pool.
15935/// Node pools are a set of nodes (i.e. VM's), with a common configuration and
15936/// specification, under the control of the cluster master. They may have a set
15937/// of Kubernetes labels applied to them, which may be used to reference them
15938/// during pod scheduling. They may also be resized up or down, to accommodate
15939/// the workload.
15940#[derive(Clone, Default, PartialEq)]
15941#[non_exhaustive]
15942pub struct NodePool {
15943    /// The name of the node pool.
15944    pub name: std::string::String,
15945
15946    /// The node configuration of the pool.
15947    pub config: std::option::Option<crate::model::NodeConfig>,
15948
15949    /// The initial node count for the pool. You must ensure that your
15950    /// Compute Engine [resource
15951    /// quota](https://cloud.google.com/compute/quotas)
15952    /// is sufficient for this number of instances. You must also have available
15953    /// firewall and routes quota.
15954    pub initial_node_count: i32,
15955
15956    /// The list of Google Compute Engine
15957    /// [zones](https://cloud.google.com/compute/docs/zones#available)
15958    /// in which the NodePool's nodes should be located.
15959    ///
15960    /// If this value is unspecified during node pool creation, the
15961    /// [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations)
15962    /// value will be used, instead.
15963    ///
15964    /// Warning: changing node pool locations will result in nodes being added
15965    /// and/or removed.
15966    pub locations: std::vec::Vec<std::string::String>,
15967
15968    /// Networking configuration for this NodePool. If specified, it overrides the
15969    /// cluster-level defaults.
15970    pub network_config: std::option::Option<crate::model::NodeNetworkConfig>,
15971
15972    /// Output only. Server-defined URL for the resource.
15973    pub self_link: std::string::String,
15974
15975    /// The version of Kubernetes running on this NodePool's nodes. If unspecified,
15976    /// it defaults as described
15977    /// [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version).
15978    pub version: std::string::String,
15979
15980    /// Output only. The resource URLs of the [managed instance
15981    /// groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances)
15982    /// associated with this node pool.
15983    /// During the node pool blue-green upgrade operation, the URLs contain both
15984    /// blue and green resources.
15985    pub instance_group_urls: std::vec::Vec<std::string::String>,
15986
15987    /// Output only. The status of the nodes in this pool instance.
15988    pub status: crate::model::node_pool::Status,
15989
15990    /// Output only. Deprecated. Use conditions instead.
15991    /// Additional information about the current status of this
15992    /// node pool instance, if available.
15993    #[deprecated]
15994    pub status_message: std::string::String,
15995
15996    /// Autoscaler configuration for this NodePool. Autoscaler is enabled
15997    /// only if a valid configuration is present.
15998    pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
15999
16000    /// NodeManagement configuration for this NodePool.
16001    pub management: std::option::Option<crate::model::NodeManagement>,
16002
16003    /// The constraint on the maximum number of pods that can be run
16004    /// simultaneously on a node in the node pool.
16005    pub max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
16006
16007    /// Which conditions caused the current node pool state.
16008    pub conditions: std::vec::Vec<crate::model::StatusCondition>,
16009
16010    /// Output only. The pod CIDR block size per node in this node pool.
16011    pub pod_ipv4_cidr_size: i32,
16012
16013    /// Upgrade settings control disruption and speed of the upgrade.
16014    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
16015
16016    /// Specifies the node placement policy.
16017    pub placement_policy: std::option::Option<crate::model::node_pool::PlacementPolicy>,
16018
16019    /// Output only. Update info contains relevant information during a node
16020    /// pool update.
16021    pub update_info: std::option::Option<crate::model::node_pool::UpdateInfo>,
16022
16023    /// This checksum is computed by the server based on the value of node pool
16024    /// fields, and may be sent on update requests to ensure the client has an
16025    /// up-to-date value before proceeding.
16026    pub etag: std::string::String,
16027
16028    /// Specifies the configuration of queued provisioning.
16029    pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
16030
16031    /// Enable best effort provisioning for nodes
16032    pub best_effort_provisioning: std::option::Option<crate::model::BestEffortProvisioning>,
16033
16034    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16035}
16036
16037impl NodePool {
16038    pub fn new() -> Self {
16039        std::default::Default::default()
16040    }
16041
16042    /// Sets the value of [name][crate::model::NodePool::name].
16043    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16044        self.name = v.into();
16045        self
16046    }
16047
16048    /// Sets the value of [config][crate::model::NodePool::config].
16049    pub fn set_config<T>(mut self, v: T) -> Self
16050    where
16051        T: std::convert::Into<crate::model::NodeConfig>,
16052    {
16053        self.config = std::option::Option::Some(v.into());
16054        self
16055    }
16056
16057    /// Sets or clears the value of [config][crate::model::NodePool::config].
16058    pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
16059    where
16060        T: std::convert::Into<crate::model::NodeConfig>,
16061    {
16062        self.config = v.map(|x| x.into());
16063        self
16064    }
16065
16066    /// Sets the value of [initial_node_count][crate::model::NodePool::initial_node_count].
16067    pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16068        self.initial_node_count = v.into();
16069        self
16070    }
16071
16072    /// Sets the value of [locations][crate::model::NodePool::locations].
16073    pub fn set_locations<T, V>(mut self, v: T) -> Self
16074    where
16075        T: std::iter::IntoIterator<Item = V>,
16076        V: std::convert::Into<std::string::String>,
16077    {
16078        use std::iter::Iterator;
16079        self.locations = v.into_iter().map(|i| i.into()).collect();
16080        self
16081    }
16082
16083    /// Sets the value of [network_config][crate::model::NodePool::network_config].
16084    pub fn set_network_config<T>(mut self, v: T) -> Self
16085    where
16086        T: std::convert::Into<crate::model::NodeNetworkConfig>,
16087    {
16088        self.network_config = std::option::Option::Some(v.into());
16089        self
16090    }
16091
16092    /// Sets or clears the value of [network_config][crate::model::NodePool::network_config].
16093    pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
16094    where
16095        T: std::convert::Into<crate::model::NodeNetworkConfig>,
16096    {
16097        self.network_config = v.map(|x| x.into());
16098        self
16099    }
16100
16101    /// Sets the value of [self_link][crate::model::NodePool::self_link].
16102    pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16103        self.self_link = v.into();
16104        self
16105    }
16106
16107    /// Sets the value of [version][crate::model::NodePool::version].
16108    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16109        self.version = v.into();
16110        self
16111    }
16112
16113    /// Sets the value of [instance_group_urls][crate::model::NodePool::instance_group_urls].
16114    pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
16115    where
16116        T: std::iter::IntoIterator<Item = V>,
16117        V: std::convert::Into<std::string::String>,
16118    {
16119        use std::iter::Iterator;
16120        self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
16121        self
16122    }
16123
16124    /// Sets the value of [status][crate::model::NodePool::status].
16125    pub fn set_status<T: std::convert::Into<crate::model::node_pool::Status>>(
16126        mut self,
16127        v: T,
16128    ) -> Self {
16129        self.status = v.into();
16130        self
16131    }
16132
16133    /// Sets the value of [status_message][crate::model::NodePool::status_message].
16134    #[deprecated]
16135    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16136        self.status_message = v.into();
16137        self
16138    }
16139
16140    /// Sets the value of [autoscaling][crate::model::NodePool::autoscaling].
16141    pub fn set_autoscaling<T>(mut self, v: T) -> Self
16142    where
16143        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
16144    {
16145        self.autoscaling = std::option::Option::Some(v.into());
16146        self
16147    }
16148
16149    /// Sets or clears the value of [autoscaling][crate::model::NodePool::autoscaling].
16150    pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
16151    where
16152        T: std::convert::Into<crate::model::NodePoolAutoscaling>,
16153    {
16154        self.autoscaling = v.map(|x| x.into());
16155        self
16156    }
16157
16158    /// Sets the value of [management][crate::model::NodePool::management].
16159    pub fn set_management<T>(mut self, v: T) -> Self
16160    where
16161        T: std::convert::Into<crate::model::NodeManagement>,
16162    {
16163        self.management = std::option::Option::Some(v.into());
16164        self
16165    }
16166
16167    /// Sets or clears the value of [management][crate::model::NodePool::management].
16168    pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
16169    where
16170        T: std::convert::Into<crate::model::NodeManagement>,
16171    {
16172        self.management = v.map(|x| x.into());
16173        self
16174    }
16175
16176    /// Sets the value of [max_pods_constraint][crate::model::NodePool::max_pods_constraint].
16177    pub fn set_max_pods_constraint<T>(mut self, v: T) -> Self
16178    where
16179        T: std::convert::Into<crate::model::MaxPodsConstraint>,
16180    {
16181        self.max_pods_constraint = std::option::Option::Some(v.into());
16182        self
16183    }
16184
16185    /// Sets or clears the value of [max_pods_constraint][crate::model::NodePool::max_pods_constraint].
16186    pub fn set_or_clear_max_pods_constraint<T>(mut self, v: std::option::Option<T>) -> Self
16187    where
16188        T: std::convert::Into<crate::model::MaxPodsConstraint>,
16189    {
16190        self.max_pods_constraint = v.map(|x| x.into());
16191        self
16192    }
16193
16194    /// Sets the value of [conditions][crate::model::NodePool::conditions].
16195    pub fn set_conditions<T, V>(mut self, v: T) -> Self
16196    where
16197        T: std::iter::IntoIterator<Item = V>,
16198        V: std::convert::Into<crate::model::StatusCondition>,
16199    {
16200        use std::iter::Iterator;
16201        self.conditions = v.into_iter().map(|i| i.into()).collect();
16202        self
16203    }
16204
16205    /// Sets the value of [pod_ipv4_cidr_size][crate::model::NodePool::pod_ipv4_cidr_size].
16206    pub fn set_pod_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16207        self.pod_ipv4_cidr_size = v.into();
16208        self
16209    }
16210
16211    /// Sets the value of [upgrade_settings][crate::model::NodePool::upgrade_settings].
16212    pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
16213    where
16214        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
16215    {
16216        self.upgrade_settings = std::option::Option::Some(v.into());
16217        self
16218    }
16219
16220    /// Sets or clears the value of [upgrade_settings][crate::model::NodePool::upgrade_settings].
16221    pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
16222    where
16223        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
16224    {
16225        self.upgrade_settings = v.map(|x| x.into());
16226        self
16227    }
16228
16229    /// Sets the value of [placement_policy][crate::model::NodePool::placement_policy].
16230    pub fn set_placement_policy<T>(mut self, v: T) -> Self
16231    where
16232        T: std::convert::Into<crate::model::node_pool::PlacementPolicy>,
16233    {
16234        self.placement_policy = std::option::Option::Some(v.into());
16235        self
16236    }
16237
16238    /// Sets or clears the value of [placement_policy][crate::model::NodePool::placement_policy].
16239    pub fn set_or_clear_placement_policy<T>(mut self, v: std::option::Option<T>) -> Self
16240    where
16241        T: std::convert::Into<crate::model::node_pool::PlacementPolicy>,
16242    {
16243        self.placement_policy = v.map(|x| x.into());
16244        self
16245    }
16246
16247    /// Sets the value of [update_info][crate::model::NodePool::update_info].
16248    pub fn set_update_info<T>(mut self, v: T) -> Self
16249    where
16250        T: std::convert::Into<crate::model::node_pool::UpdateInfo>,
16251    {
16252        self.update_info = std::option::Option::Some(v.into());
16253        self
16254    }
16255
16256    /// Sets or clears the value of [update_info][crate::model::NodePool::update_info].
16257    pub fn set_or_clear_update_info<T>(mut self, v: std::option::Option<T>) -> Self
16258    where
16259        T: std::convert::Into<crate::model::node_pool::UpdateInfo>,
16260    {
16261        self.update_info = v.map(|x| x.into());
16262        self
16263    }
16264
16265    /// Sets the value of [etag][crate::model::NodePool::etag].
16266    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16267        self.etag = v.into();
16268        self
16269    }
16270
16271    /// Sets the value of [queued_provisioning][crate::model::NodePool::queued_provisioning].
16272    pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
16273    where
16274        T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
16275    {
16276        self.queued_provisioning = std::option::Option::Some(v.into());
16277        self
16278    }
16279
16280    /// Sets or clears the value of [queued_provisioning][crate::model::NodePool::queued_provisioning].
16281    pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
16282    where
16283        T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
16284    {
16285        self.queued_provisioning = v.map(|x| x.into());
16286        self
16287    }
16288
16289    /// Sets the value of [best_effort_provisioning][crate::model::NodePool::best_effort_provisioning].
16290    pub fn set_best_effort_provisioning<T>(mut self, v: T) -> Self
16291    where
16292        T: std::convert::Into<crate::model::BestEffortProvisioning>,
16293    {
16294        self.best_effort_provisioning = std::option::Option::Some(v.into());
16295        self
16296    }
16297
16298    /// Sets or clears the value of [best_effort_provisioning][crate::model::NodePool::best_effort_provisioning].
16299    pub fn set_or_clear_best_effort_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
16300    where
16301        T: std::convert::Into<crate::model::BestEffortProvisioning>,
16302    {
16303        self.best_effort_provisioning = v.map(|x| x.into());
16304        self
16305    }
16306}
16307
16308impl wkt::message::Message for NodePool {
16309    fn typename() -> &'static str {
16310        "type.googleapis.com/google.container.v1.NodePool"
16311    }
16312}
16313
16314/// Defines additional types related to [NodePool].
16315pub mod node_pool {
16316    #[allow(unused_imports)]
16317    use super::*;
16318
16319    /// These upgrade settings control the level of parallelism and the level of
16320    /// disruption caused by an upgrade.
16321    ///
16322    /// maxUnavailable controls the number of nodes that can be simultaneously
16323    /// unavailable.
16324    ///
16325    /// maxSurge controls the number of additional nodes that can be added to the
16326    /// node pool temporarily for the time of the upgrade to increase the number of
16327    /// available nodes.
16328    ///
16329    /// (maxUnavailable + maxSurge) determines the level of parallelism (how many
16330    /// nodes are being upgraded at the same time).
16331    ///
16332    /// Note: upgrades inevitably introduce some disruption since workloads need to
16333    /// be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0,
16334    /// this holds true. (Disruption stays within the limits of
16335    /// PodDisruptionBudget, if it is configured.)
16336    ///
16337    /// Consider a hypothetical node pool with 5 nodes having maxSurge=2,
16338    /// maxUnavailable=1. This means the upgrade process upgrades 3 nodes
16339    /// simultaneously. It creates 2 additional (upgraded) nodes, then it brings
16340    /// down 3 old (not yet upgraded) nodes at the same time. This ensures that
16341    /// there are always at least 4 nodes available.
16342    ///
16343    /// These upgrade settings configure the upgrade strategy for the node pool.
16344    /// Use strategy to switch between the strategies applied to the node pool.
16345    ///
16346    /// If the strategy is ROLLING, use max_surge and max_unavailable to control
16347    /// the level of parallelism and the level of disruption caused by upgrade.
16348    ///
16349    /// 1. maxSurge controls the number of additional nodes that can be added to
16350    ///    the node pool temporarily for the time of the upgrade to increase the
16351    ///    number of available nodes.
16352    /// 1. maxUnavailable controls the number of nodes that can be simultaneously
16353    ///    unavailable.
16354    /// 1. (maxUnavailable + maxSurge) determines the level of parallelism (how
16355    ///    many nodes are being upgraded at the same time).
16356    ///
16357    /// If the strategy is BLUE_GREEN, use blue_green_settings to configure the
16358    /// blue-green upgrade related settings.
16359    ///
16360    /// 1. standard_rollout_policy is the default policy. The policy is used to
16361    ///    control the way blue pool gets drained. The draining is executed in the
16362    ///    batch mode. The batch size could be specified as either percentage of the
16363    ///    node pool size or the number of nodes. batch_soak_duration is the soak
16364    ///    time after each batch gets drained.
16365    /// 1. node_pool_soak_duration is the soak time after all blue nodes are
16366    ///    drained. After this period, the blue pool nodes will be deleted.
16367    #[derive(Clone, Default, PartialEq)]
16368    #[non_exhaustive]
16369    pub struct UpgradeSettings {
16370        /// The maximum number of nodes that can be created beyond the current size
16371        /// of the node pool during the upgrade process.
16372        pub max_surge: i32,
16373
16374        /// The maximum number of nodes that can be simultaneously unavailable during
16375        /// the upgrade process. A node is considered available if its status is
16376        /// Ready.
16377        pub max_unavailable: i32,
16378
16379        /// Update strategy of the node pool.
16380        pub strategy: std::option::Option<crate::model::NodePoolUpdateStrategy>,
16381
16382        /// Settings for blue-green upgrade strategy.
16383        pub blue_green_settings: std::option::Option<crate::model::BlueGreenSettings>,
16384
16385        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16386    }
16387
16388    impl UpgradeSettings {
16389        pub fn new() -> Self {
16390            std::default::Default::default()
16391        }
16392
16393        /// Sets the value of [max_surge][crate::model::node_pool::UpgradeSettings::max_surge].
16394        pub fn set_max_surge<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16395            self.max_surge = v.into();
16396            self
16397        }
16398
16399        /// Sets the value of [max_unavailable][crate::model::node_pool::UpgradeSettings::max_unavailable].
16400        pub fn set_max_unavailable<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16401            self.max_unavailable = v.into();
16402            self
16403        }
16404
16405        /// Sets the value of [strategy][crate::model::node_pool::UpgradeSettings::strategy].
16406        pub fn set_strategy<T>(mut self, v: T) -> Self
16407        where
16408            T: std::convert::Into<crate::model::NodePoolUpdateStrategy>,
16409        {
16410            self.strategy = std::option::Option::Some(v.into());
16411            self
16412        }
16413
16414        /// Sets or clears the value of [strategy][crate::model::node_pool::UpgradeSettings::strategy].
16415        pub fn set_or_clear_strategy<T>(mut self, v: std::option::Option<T>) -> Self
16416        where
16417            T: std::convert::Into<crate::model::NodePoolUpdateStrategy>,
16418        {
16419            self.strategy = v.map(|x| x.into());
16420            self
16421        }
16422
16423        /// Sets the value of [blue_green_settings][crate::model::node_pool::UpgradeSettings::blue_green_settings].
16424        pub fn set_blue_green_settings<T>(mut self, v: T) -> Self
16425        where
16426            T: std::convert::Into<crate::model::BlueGreenSettings>,
16427        {
16428            self.blue_green_settings = std::option::Option::Some(v.into());
16429            self
16430        }
16431
16432        /// Sets or clears the value of [blue_green_settings][crate::model::node_pool::UpgradeSettings::blue_green_settings].
16433        pub fn set_or_clear_blue_green_settings<T>(mut self, v: std::option::Option<T>) -> Self
16434        where
16435            T: std::convert::Into<crate::model::BlueGreenSettings>,
16436        {
16437            self.blue_green_settings = v.map(|x| x.into());
16438            self
16439        }
16440    }
16441
16442    impl wkt::message::Message for UpgradeSettings {
16443        fn typename() -> &'static str {
16444            "type.googleapis.com/google.container.v1.NodePool.UpgradeSettings"
16445        }
16446    }
16447
16448    /// UpdateInfo contains resource (instance groups, etc), status and other
16449    /// intermediate information relevant to a node pool upgrade.
16450    #[derive(Clone, Default, PartialEq)]
16451    #[non_exhaustive]
16452    pub struct UpdateInfo {
16453        /// Information of a blue-green upgrade.
16454        pub blue_green_info:
16455            std::option::Option<crate::model::node_pool::update_info::BlueGreenInfo>,
16456
16457        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16458    }
16459
16460    impl UpdateInfo {
16461        pub fn new() -> Self {
16462            std::default::Default::default()
16463        }
16464
16465        /// Sets the value of [blue_green_info][crate::model::node_pool::UpdateInfo::blue_green_info].
16466        pub fn set_blue_green_info<T>(mut self, v: T) -> Self
16467        where
16468            T: std::convert::Into<crate::model::node_pool::update_info::BlueGreenInfo>,
16469        {
16470            self.blue_green_info = std::option::Option::Some(v.into());
16471            self
16472        }
16473
16474        /// Sets or clears the value of [blue_green_info][crate::model::node_pool::UpdateInfo::blue_green_info].
16475        pub fn set_or_clear_blue_green_info<T>(mut self, v: std::option::Option<T>) -> Self
16476        where
16477            T: std::convert::Into<crate::model::node_pool::update_info::BlueGreenInfo>,
16478        {
16479            self.blue_green_info = v.map(|x| x.into());
16480            self
16481        }
16482    }
16483
16484    impl wkt::message::Message for UpdateInfo {
16485        fn typename() -> &'static str {
16486            "type.googleapis.com/google.container.v1.NodePool.UpdateInfo"
16487        }
16488    }
16489
16490    /// Defines additional types related to [UpdateInfo].
16491    pub mod update_info {
16492        #[allow(unused_imports)]
16493        use super::*;
16494
16495        /// Information relevant to blue-green upgrade.
16496        #[derive(Clone, Default, PartialEq)]
16497        #[non_exhaustive]
16498        pub struct BlueGreenInfo {
16499            /// Current blue-green upgrade phase.
16500            pub phase: crate::model::node_pool::update_info::blue_green_info::Phase,
16501
16502            /// The resource URLs of the [managed instance groups]
16503            /// (/compute/docs/instance-groups/creating-groups-of-managed-instances)
16504            /// associated with blue pool.
16505            pub blue_instance_group_urls: std::vec::Vec<std::string::String>,
16506
16507            /// The resource URLs of the [managed instance groups]
16508            /// (/compute/docs/instance-groups/creating-groups-of-managed-instances)
16509            /// associated with green pool.
16510            pub green_instance_group_urls: std::vec::Vec<std::string::String>,
16511
16512            /// Time to start deleting blue pool to complete blue-green upgrade,
16513            /// in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
16514            pub blue_pool_deletion_start_time: std::string::String,
16515
16516            /// Version of green pool.
16517            pub green_pool_version: std::string::String,
16518
16519            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16520        }
16521
16522        impl BlueGreenInfo {
16523            pub fn new() -> Self {
16524                std::default::Default::default()
16525            }
16526
16527            /// Sets the value of [phase][crate::model::node_pool::update_info::BlueGreenInfo::phase].
16528            pub fn set_phase<
16529                T: std::convert::Into<crate::model::node_pool::update_info::blue_green_info::Phase>,
16530            >(
16531                mut self,
16532                v: T,
16533            ) -> Self {
16534                self.phase = v.into();
16535                self
16536            }
16537
16538            /// Sets the value of [blue_instance_group_urls][crate::model::node_pool::update_info::BlueGreenInfo::blue_instance_group_urls].
16539            pub fn set_blue_instance_group_urls<T, V>(mut self, v: T) -> Self
16540            where
16541                T: std::iter::IntoIterator<Item = V>,
16542                V: std::convert::Into<std::string::String>,
16543            {
16544                use std::iter::Iterator;
16545                self.blue_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
16546                self
16547            }
16548
16549            /// Sets the value of [green_instance_group_urls][crate::model::node_pool::update_info::BlueGreenInfo::green_instance_group_urls].
16550            pub fn set_green_instance_group_urls<T, V>(mut self, v: T) -> Self
16551            where
16552                T: std::iter::IntoIterator<Item = V>,
16553                V: std::convert::Into<std::string::String>,
16554            {
16555                use std::iter::Iterator;
16556                self.green_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
16557                self
16558            }
16559
16560            /// Sets the value of [blue_pool_deletion_start_time][crate::model::node_pool::update_info::BlueGreenInfo::blue_pool_deletion_start_time].
16561            pub fn set_blue_pool_deletion_start_time<T: std::convert::Into<std::string::String>>(
16562                mut self,
16563                v: T,
16564            ) -> Self {
16565                self.blue_pool_deletion_start_time = v.into();
16566                self
16567            }
16568
16569            /// Sets the value of [green_pool_version][crate::model::node_pool::update_info::BlueGreenInfo::green_pool_version].
16570            pub fn set_green_pool_version<T: std::convert::Into<std::string::String>>(
16571                mut self,
16572                v: T,
16573            ) -> Self {
16574                self.green_pool_version = v.into();
16575                self
16576            }
16577        }
16578
16579        impl wkt::message::Message for BlueGreenInfo {
16580            fn typename() -> &'static str {
16581                "type.googleapis.com/google.container.v1.NodePool.UpdateInfo.BlueGreenInfo"
16582            }
16583        }
16584
16585        /// Defines additional types related to [BlueGreenInfo].
16586        pub mod blue_green_info {
16587            #[allow(unused_imports)]
16588            use super::*;
16589
16590            /// Phase represents the different stages blue-green upgrade is running in.
16591            ///
16592            /// # Working with unknown values
16593            ///
16594            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16595            /// additional enum variants at any time. Adding new variants is not considered
16596            /// a breaking change. Applications should write their code in anticipation of:
16597            ///
16598            /// - New values appearing in future releases of the client library, **and**
16599            /// - New values received dynamically, without application changes.
16600            ///
16601            /// Please consult the [Working with enums] section in the user guide for some
16602            /// guidelines.
16603            ///
16604            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16605            #[derive(Clone, Debug, PartialEq)]
16606            #[non_exhaustive]
16607            pub enum Phase {
16608                /// Unspecified phase.
16609                Unspecified,
16610                /// blue-green upgrade has been initiated.
16611                UpdateStarted,
16612                /// Start creating green pool nodes.
16613                CreatingGreenPool,
16614                /// Start cordoning blue pool nodes.
16615                CordoningBluePool,
16616                /// Start draining blue pool nodes.
16617                DrainingBluePool,
16618                /// Start soaking time after draining entire blue pool.
16619                NodePoolSoaking,
16620                /// Start deleting blue nodes.
16621                DeletingBluePool,
16622                /// Rollback has been initiated.
16623                RollbackStarted,
16624                /// If set, the enum was initialized with an unknown value.
16625                ///
16626                /// Applications can examine the value using [Phase::value] or
16627                /// [Phase::name].
16628                UnknownValue(phase::UnknownValue),
16629            }
16630
16631            #[doc(hidden)]
16632            pub mod phase {
16633                #[allow(unused_imports)]
16634                use super::*;
16635                #[derive(Clone, Debug, PartialEq)]
16636                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16637            }
16638
16639            impl Phase {
16640                /// Gets the enum value.
16641                ///
16642                /// Returns `None` if the enum contains an unknown value deserialized from
16643                /// the string representation of enums.
16644                pub fn value(&self) -> std::option::Option<i32> {
16645                    match self {
16646                        Self::Unspecified => std::option::Option::Some(0),
16647                        Self::UpdateStarted => std::option::Option::Some(1),
16648                        Self::CreatingGreenPool => std::option::Option::Some(2),
16649                        Self::CordoningBluePool => std::option::Option::Some(3),
16650                        Self::DrainingBluePool => std::option::Option::Some(4),
16651                        Self::NodePoolSoaking => std::option::Option::Some(5),
16652                        Self::DeletingBluePool => std::option::Option::Some(6),
16653                        Self::RollbackStarted => std::option::Option::Some(7),
16654                        Self::UnknownValue(u) => u.0.value(),
16655                    }
16656                }
16657
16658                /// Gets the enum value as a string.
16659                ///
16660                /// Returns `None` if the enum contains an unknown value deserialized from
16661                /// the integer representation of enums.
16662                pub fn name(&self) -> std::option::Option<&str> {
16663                    match self {
16664                        Self::Unspecified => std::option::Option::Some("PHASE_UNSPECIFIED"),
16665                        Self::UpdateStarted => std::option::Option::Some("UPDATE_STARTED"),
16666                        Self::CreatingGreenPool => std::option::Option::Some("CREATING_GREEN_POOL"),
16667                        Self::CordoningBluePool => std::option::Option::Some("CORDONING_BLUE_POOL"),
16668                        Self::DrainingBluePool => std::option::Option::Some("DRAINING_BLUE_POOL"),
16669                        Self::NodePoolSoaking => std::option::Option::Some("NODE_POOL_SOAKING"),
16670                        Self::DeletingBluePool => std::option::Option::Some("DELETING_BLUE_POOL"),
16671                        Self::RollbackStarted => std::option::Option::Some("ROLLBACK_STARTED"),
16672                        Self::UnknownValue(u) => u.0.name(),
16673                    }
16674                }
16675            }
16676
16677            impl std::default::Default for Phase {
16678                fn default() -> Self {
16679                    use std::convert::From;
16680                    Self::from(0)
16681                }
16682            }
16683
16684            impl std::fmt::Display for Phase {
16685                fn fmt(
16686                    &self,
16687                    f: &mut std::fmt::Formatter<'_>,
16688                ) -> std::result::Result<(), std::fmt::Error> {
16689                    wkt::internal::display_enum(f, self.name(), self.value())
16690                }
16691            }
16692
16693            impl std::convert::From<i32> for Phase {
16694                fn from(value: i32) -> Self {
16695                    match value {
16696                        0 => Self::Unspecified,
16697                        1 => Self::UpdateStarted,
16698                        2 => Self::CreatingGreenPool,
16699                        3 => Self::CordoningBluePool,
16700                        4 => Self::DrainingBluePool,
16701                        5 => Self::NodePoolSoaking,
16702                        6 => Self::DeletingBluePool,
16703                        7 => Self::RollbackStarted,
16704                        _ => Self::UnknownValue(phase::UnknownValue(
16705                            wkt::internal::UnknownEnumValue::Integer(value),
16706                        )),
16707                    }
16708                }
16709            }
16710
16711            impl std::convert::From<&str> for Phase {
16712                fn from(value: &str) -> Self {
16713                    use std::string::ToString;
16714                    match value {
16715                        "PHASE_UNSPECIFIED" => Self::Unspecified,
16716                        "UPDATE_STARTED" => Self::UpdateStarted,
16717                        "CREATING_GREEN_POOL" => Self::CreatingGreenPool,
16718                        "CORDONING_BLUE_POOL" => Self::CordoningBluePool,
16719                        "DRAINING_BLUE_POOL" => Self::DrainingBluePool,
16720                        "NODE_POOL_SOAKING" => Self::NodePoolSoaking,
16721                        "DELETING_BLUE_POOL" => Self::DeletingBluePool,
16722                        "ROLLBACK_STARTED" => Self::RollbackStarted,
16723                        _ => Self::UnknownValue(phase::UnknownValue(
16724                            wkt::internal::UnknownEnumValue::String(value.to_string()),
16725                        )),
16726                    }
16727                }
16728            }
16729
16730            impl serde::ser::Serialize for Phase {
16731                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16732                where
16733                    S: serde::Serializer,
16734                {
16735                    match self {
16736                        Self::Unspecified => serializer.serialize_i32(0),
16737                        Self::UpdateStarted => serializer.serialize_i32(1),
16738                        Self::CreatingGreenPool => serializer.serialize_i32(2),
16739                        Self::CordoningBluePool => serializer.serialize_i32(3),
16740                        Self::DrainingBluePool => serializer.serialize_i32(4),
16741                        Self::NodePoolSoaking => serializer.serialize_i32(5),
16742                        Self::DeletingBluePool => serializer.serialize_i32(6),
16743                        Self::RollbackStarted => serializer.serialize_i32(7),
16744                        Self::UnknownValue(u) => u.0.serialize(serializer),
16745                    }
16746                }
16747            }
16748
16749            impl<'de> serde::de::Deserialize<'de> for Phase {
16750                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16751                where
16752                    D: serde::Deserializer<'de>,
16753                {
16754                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<Phase>::new(
16755                        ".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase",
16756                    ))
16757                }
16758            }
16759        }
16760    }
16761
16762    /// PlacementPolicy defines the placement policy used by the node pool.
16763    #[derive(Clone, Default, PartialEq)]
16764    #[non_exhaustive]
16765    pub struct PlacementPolicy {
16766        /// The type of placement.
16767        pub r#type: crate::model::node_pool::placement_policy::Type,
16768
16769        /// Optional. TPU placement topology for pod slice node pool.
16770        /// <https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies>
16771        pub tpu_topology: std::string::String,
16772
16773        /// If set, refers to the name of a custom resource policy supplied by the
16774        /// user. The resource policy must be in the same project and region as the
16775        /// node pool. If not found, InvalidArgument error is returned.
16776        pub policy_name: std::string::String,
16777
16778        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16779    }
16780
16781    impl PlacementPolicy {
16782        pub fn new() -> Self {
16783            std::default::Default::default()
16784        }
16785
16786        /// Sets the value of [r#type][crate::model::node_pool::PlacementPolicy::type].
16787        pub fn set_type<T: std::convert::Into<crate::model::node_pool::placement_policy::Type>>(
16788            mut self,
16789            v: T,
16790        ) -> Self {
16791            self.r#type = v.into();
16792            self
16793        }
16794
16795        /// Sets the value of [tpu_topology][crate::model::node_pool::PlacementPolicy::tpu_topology].
16796        pub fn set_tpu_topology<T: std::convert::Into<std::string::String>>(
16797            mut self,
16798            v: T,
16799        ) -> Self {
16800            self.tpu_topology = v.into();
16801            self
16802        }
16803
16804        /// Sets the value of [policy_name][crate::model::node_pool::PlacementPolicy::policy_name].
16805        pub fn set_policy_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16806            self.policy_name = v.into();
16807            self
16808        }
16809    }
16810
16811    impl wkt::message::Message for PlacementPolicy {
16812        fn typename() -> &'static str {
16813            "type.googleapis.com/google.container.v1.NodePool.PlacementPolicy"
16814        }
16815    }
16816
16817    /// Defines additional types related to [PlacementPolicy].
16818    pub mod placement_policy {
16819        #[allow(unused_imports)]
16820        use super::*;
16821
16822        /// Type defines the type of placement policy.
16823        ///
16824        /// # Working with unknown values
16825        ///
16826        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16827        /// additional enum variants at any time. Adding new variants is not considered
16828        /// a breaking change. Applications should write their code in anticipation of:
16829        ///
16830        /// - New values appearing in future releases of the client library, **and**
16831        /// - New values received dynamically, without application changes.
16832        ///
16833        /// Please consult the [Working with enums] section in the user guide for some
16834        /// guidelines.
16835        ///
16836        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16837        #[derive(Clone, Debug, PartialEq)]
16838        #[non_exhaustive]
16839        pub enum Type {
16840            /// TYPE_UNSPECIFIED specifies no requirements on nodes
16841            /// placement.
16842            Unspecified,
16843            /// COMPACT specifies node placement in the same availability domain to
16844            /// ensure low communication latency.
16845            Compact,
16846            /// If set, the enum was initialized with an unknown value.
16847            ///
16848            /// Applications can examine the value using [Type::value] or
16849            /// [Type::name].
16850            UnknownValue(r#type::UnknownValue),
16851        }
16852
16853        #[doc(hidden)]
16854        pub mod r#type {
16855            #[allow(unused_imports)]
16856            use super::*;
16857            #[derive(Clone, Debug, PartialEq)]
16858            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16859        }
16860
16861        impl Type {
16862            /// Gets the enum value.
16863            ///
16864            /// Returns `None` if the enum contains an unknown value deserialized from
16865            /// the string representation of enums.
16866            pub fn value(&self) -> std::option::Option<i32> {
16867                match self {
16868                    Self::Unspecified => std::option::Option::Some(0),
16869                    Self::Compact => std::option::Option::Some(1),
16870                    Self::UnknownValue(u) => u.0.value(),
16871                }
16872            }
16873
16874            /// Gets the enum value as a string.
16875            ///
16876            /// Returns `None` if the enum contains an unknown value deserialized from
16877            /// the integer representation of enums.
16878            pub fn name(&self) -> std::option::Option<&str> {
16879                match self {
16880                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
16881                    Self::Compact => std::option::Option::Some("COMPACT"),
16882                    Self::UnknownValue(u) => u.0.name(),
16883                }
16884            }
16885        }
16886
16887        impl std::default::Default for Type {
16888            fn default() -> Self {
16889                use std::convert::From;
16890                Self::from(0)
16891            }
16892        }
16893
16894        impl std::fmt::Display for Type {
16895            fn fmt(
16896                &self,
16897                f: &mut std::fmt::Formatter<'_>,
16898            ) -> std::result::Result<(), std::fmt::Error> {
16899                wkt::internal::display_enum(f, self.name(), self.value())
16900            }
16901        }
16902
16903        impl std::convert::From<i32> for Type {
16904            fn from(value: i32) -> Self {
16905                match value {
16906                    0 => Self::Unspecified,
16907                    1 => Self::Compact,
16908                    _ => Self::UnknownValue(r#type::UnknownValue(
16909                        wkt::internal::UnknownEnumValue::Integer(value),
16910                    )),
16911                }
16912            }
16913        }
16914
16915        impl std::convert::From<&str> for Type {
16916            fn from(value: &str) -> Self {
16917                use std::string::ToString;
16918                match value {
16919                    "TYPE_UNSPECIFIED" => Self::Unspecified,
16920                    "COMPACT" => Self::Compact,
16921                    _ => Self::UnknownValue(r#type::UnknownValue(
16922                        wkt::internal::UnknownEnumValue::String(value.to_string()),
16923                    )),
16924                }
16925            }
16926        }
16927
16928        impl serde::ser::Serialize for Type {
16929            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16930            where
16931                S: serde::Serializer,
16932            {
16933                match self {
16934                    Self::Unspecified => serializer.serialize_i32(0),
16935                    Self::Compact => serializer.serialize_i32(1),
16936                    Self::UnknownValue(u) => u.0.serialize(serializer),
16937                }
16938            }
16939        }
16940
16941        impl<'de> serde::de::Deserialize<'de> for Type {
16942            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16943            where
16944                D: serde::Deserializer<'de>,
16945            {
16946                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
16947                    ".google.container.v1.NodePool.PlacementPolicy.Type",
16948                ))
16949            }
16950        }
16951    }
16952
16953    /// QueuedProvisioning defines the queued provisioning used by the node pool.
16954    #[derive(Clone, Default, PartialEq)]
16955    #[non_exhaustive]
16956    pub struct QueuedProvisioning {
16957        /// Denotes that this nodepool is QRM specific, meaning nodes can be only
16958        /// obtained through queuing via the Cluster Autoscaler ProvisioningRequest
16959        /// API.
16960        pub enabled: bool,
16961
16962        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16963    }
16964
16965    impl QueuedProvisioning {
16966        pub fn new() -> Self {
16967            std::default::Default::default()
16968        }
16969
16970        /// Sets the value of [enabled][crate::model::node_pool::QueuedProvisioning::enabled].
16971        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16972            self.enabled = v.into();
16973            self
16974        }
16975    }
16976
16977    impl wkt::message::Message for QueuedProvisioning {
16978        fn typename() -> &'static str {
16979            "type.googleapis.com/google.container.v1.NodePool.QueuedProvisioning"
16980        }
16981    }
16982
16983    /// The current status of the node pool instance.
16984    ///
16985    /// # Working with unknown values
16986    ///
16987    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16988    /// additional enum variants at any time. Adding new variants is not considered
16989    /// a breaking change. Applications should write their code in anticipation of:
16990    ///
16991    /// - New values appearing in future releases of the client library, **and**
16992    /// - New values received dynamically, without application changes.
16993    ///
16994    /// Please consult the [Working with enums] section in the user guide for some
16995    /// guidelines.
16996    ///
16997    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16998    #[derive(Clone, Debug, PartialEq)]
16999    #[non_exhaustive]
17000    pub enum Status {
17001        /// Not set.
17002        Unspecified,
17003        /// The PROVISIONING state indicates the node pool is being created.
17004        Provisioning,
17005        /// The RUNNING state indicates the node pool has been created
17006        /// and is fully usable.
17007        Running,
17008        /// The RUNNING_WITH_ERROR state indicates the node pool has been created
17009        /// and is partially usable. Some error state has occurred and some
17010        /// functionality may be impaired. Customer may need to reissue a request
17011        /// or trigger a new update.
17012        RunningWithError,
17013        /// The RECONCILING state indicates that some work is actively being done on
17014        /// the node pool, such as upgrading node software. Details can
17015        /// be found in the `statusMessage` field.
17016        Reconciling,
17017        /// The STOPPING state indicates the node pool is being deleted.
17018        Stopping,
17019        /// The ERROR state indicates the node pool may be unusable. Details
17020        /// can be found in the `statusMessage` field.
17021        Error,
17022        /// If set, the enum was initialized with an unknown value.
17023        ///
17024        /// Applications can examine the value using [Status::value] or
17025        /// [Status::name].
17026        UnknownValue(status::UnknownValue),
17027    }
17028
17029    #[doc(hidden)]
17030    pub mod status {
17031        #[allow(unused_imports)]
17032        use super::*;
17033        #[derive(Clone, Debug, PartialEq)]
17034        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17035    }
17036
17037    impl Status {
17038        /// Gets the enum value.
17039        ///
17040        /// Returns `None` if the enum contains an unknown value deserialized from
17041        /// the string representation of enums.
17042        pub fn value(&self) -> std::option::Option<i32> {
17043            match self {
17044                Self::Unspecified => std::option::Option::Some(0),
17045                Self::Provisioning => std::option::Option::Some(1),
17046                Self::Running => std::option::Option::Some(2),
17047                Self::RunningWithError => std::option::Option::Some(3),
17048                Self::Reconciling => std::option::Option::Some(4),
17049                Self::Stopping => std::option::Option::Some(5),
17050                Self::Error => std::option::Option::Some(6),
17051                Self::UnknownValue(u) => u.0.value(),
17052            }
17053        }
17054
17055        /// Gets the enum value as a string.
17056        ///
17057        /// Returns `None` if the enum contains an unknown value deserialized from
17058        /// the integer representation of enums.
17059        pub fn name(&self) -> std::option::Option<&str> {
17060            match self {
17061                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
17062                Self::Provisioning => std::option::Option::Some("PROVISIONING"),
17063                Self::Running => std::option::Option::Some("RUNNING"),
17064                Self::RunningWithError => std::option::Option::Some("RUNNING_WITH_ERROR"),
17065                Self::Reconciling => std::option::Option::Some("RECONCILING"),
17066                Self::Stopping => std::option::Option::Some("STOPPING"),
17067                Self::Error => std::option::Option::Some("ERROR"),
17068                Self::UnknownValue(u) => u.0.name(),
17069            }
17070        }
17071    }
17072
17073    impl std::default::Default for Status {
17074        fn default() -> Self {
17075            use std::convert::From;
17076            Self::from(0)
17077        }
17078    }
17079
17080    impl std::fmt::Display for Status {
17081        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17082            wkt::internal::display_enum(f, self.name(), self.value())
17083        }
17084    }
17085
17086    impl std::convert::From<i32> for Status {
17087        fn from(value: i32) -> Self {
17088            match value {
17089                0 => Self::Unspecified,
17090                1 => Self::Provisioning,
17091                2 => Self::Running,
17092                3 => Self::RunningWithError,
17093                4 => Self::Reconciling,
17094                5 => Self::Stopping,
17095                6 => Self::Error,
17096                _ => Self::UnknownValue(status::UnknownValue(
17097                    wkt::internal::UnknownEnumValue::Integer(value),
17098                )),
17099            }
17100        }
17101    }
17102
17103    impl std::convert::From<&str> for Status {
17104        fn from(value: &str) -> Self {
17105            use std::string::ToString;
17106            match value {
17107                "STATUS_UNSPECIFIED" => Self::Unspecified,
17108                "PROVISIONING" => Self::Provisioning,
17109                "RUNNING" => Self::Running,
17110                "RUNNING_WITH_ERROR" => Self::RunningWithError,
17111                "RECONCILING" => Self::Reconciling,
17112                "STOPPING" => Self::Stopping,
17113                "ERROR" => Self::Error,
17114                _ => Self::UnknownValue(status::UnknownValue(
17115                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17116                )),
17117            }
17118        }
17119    }
17120
17121    impl serde::ser::Serialize for Status {
17122        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17123        where
17124            S: serde::Serializer,
17125        {
17126            match self {
17127                Self::Unspecified => serializer.serialize_i32(0),
17128                Self::Provisioning => serializer.serialize_i32(1),
17129                Self::Running => serializer.serialize_i32(2),
17130                Self::RunningWithError => serializer.serialize_i32(3),
17131                Self::Reconciling => serializer.serialize_i32(4),
17132                Self::Stopping => serializer.serialize_i32(5),
17133                Self::Error => serializer.serialize_i32(6),
17134                Self::UnknownValue(u) => u.0.serialize(serializer),
17135            }
17136        }
17137    }
17138
17139    impl<'de> serde::de::Deserialize<'de> for Status {
17140        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17141        where
17142            D: serde::Deserializer<'de>,
17143        {
17144            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
17145                ".google.container.v1.NodePool.Status",
17146            ))
17147        }
17148    }
17149}
17150
17151/// NodeManagement defines the set of node management services turned on for the
17152/// node pool.
17153#[derive(Clone, Default, PartialEq)]
17154#[non_exhaustive]
17155pub struct NodeManagement {
17156    /// A flag that specifies whether node auto-upgrade is enabled for the node
17157    /// pool. If enabled, node auto-upgrade helps keep the nodes in your node pool
17158    /// up to date with the latest release version of Kubernetes.
17159    pub auto_upgrade: bool,
17160
17161    /// A flag that specifies whether the node auto-repair is enabled for the node
17162    /// pool. If enabled, the nodes in this node pool will be monitored and, if
17163    /// they fail health checks too many times, an automatic repair action will be
17164    /// triggered.
17165    pub auto_repair: bool,
17166
17167    /// Specifies the Auto Upgrade knobs for the node pool.
17168    pub upgrade_options: std::option::Option<crate::model::AutoUpgradeOptions>,
17169
17170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17171}
17172
17173impl NodeManagement {
17174    pub fn new() -> Self {
17175        std::default::Default::default()
17176    }
17177
17178    /// Sets the value of [auto_upgrade][crate::model::NodeManagement::auto_upgrade].
17179    pub fn set_auto_upgrade<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17180        self.auto_upgrade = v.into();
17181        self
17182    }
17183
17184    /// Sets the value of [auto_repair][crate::model::NodeManagement::auto_repair].
17185    pub fn set_auto_repair<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17186        self.auto_repair = v.into();
17187        self
17188    }
17189
17190    /// Sets the value of [upgrade_options][crate::model::NodeManagement::upgrade_options].
17191    pub fn set_upgrade_options<T>(mut self, v: T) -> Self
17192    where
17193        T: std::convert::Into<crate::model::AutoUpgradeOptions>,
17194    {
17195        self.upgrade_options = std::option::Option::Some(v.into());
17196        self
17197    }
17198
17199    /// Sets or clears the value of [upgrade_options][crate::model::NodeManagement::upgrade_options].
17200    pub fn set_or_clear_upgrade_options<T>(mut self, v: std::option::Option<T>) -> Self
17201    where
17202        T: std::convert::Into<crate::model::AutoUpgradeOptions>,
17203    {
17204        self.upgrade_options = v.map(|x| x.into());
17205        self
17206    }
17207}
17208
17209impl wkt::message::Message for NodeManagement {
17210    fn typename() -> &'static str {
17211        "type.googleapis.com/google.container.v1.NodeManagement"
17212    }
17213}
17214
17215/// Best effort provisioning.
17216#[derive(Clone, Default, PartialEq)]
17217#[non_exhaustive]
17218pub struct BestEffortProvisioning {
17219    /// When this is enabled, cluster/node pool creations will ignore non-fatal
17220    /// errors like stockout to best provision as many nodes as possible right now
17221    /// and eventually bring up all target number of nodes
17222    pub enabled: bool,
17223
17224    /// Minimum number of nodes to be provisioned to be considered as succeeded,
17225    /// and the rest of nodes will be provisioned gradually and eventually when
17226    /// stockout issue has been resolved.
17227    pub min_provision_nodes: i32,
17228
17229    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17230}
17231
17232impl BestEffortProvisioning {
17233    pub fn new() -> Self {
17234        std::default::Default::default()
17235    }
17236
17237    /// Sets the value of [enabled][crate::model::BestEffortProvisioning::enabled].
17238    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17239        self.enabled = v.into();
17240        self
17241    }
17242
17243    /// Sets the value of [min_provision_nodes][crate::model::BestEffortProvisioning::min_provision_nodes].
17244    pub fn set_min_provision_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17245        self.min_provision_nodes = v.into();
17246        self
17247    }
17248}
17249
17250impl wkt::message::Message for BestEffortProvisioning {
17251    fn typename() -> &'static str {
17252        "type.googleapis.com/google.container.v1.BestEffortProvisioning"
17253    }
17254}
17255
17256/// AutoUpgradeOptions defines the set of options for the user to control how
17257/// the Auto Upgrades will proceed.
17258#[derive(Clone, Default, PartialEq)]
17259#[non_exhaustive]
17260pub struct AutoUpgradeOptions {
17261    /// Output only. This field is set when upgrades are about to commence
17262    /// with the approximate start time for the upgrades, in
17263    /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
17264    pub auto_upgrade_start_time: std::string::String,
17265
17266    /// Output only. This field is set when upgrades are about to commence
17267    /// with the description of the upgrade.
17268    pub description: std::string::String,
17269
17270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17271}
17272
17273impl AutoUpgradeOptions {
17274    pub fn new() -> Self {
17275        std::default::Default::default()
17276    }
17277
17278    /// Sets the value of [auto_upgrade_start_time][crate::model::AutoUpgradeOptions::auto_upgrade_start_time].
17279    pub fn set_auto_upgrade_start_time<T: std::convert::Into<std::string::String>>(
17280        mut self,
17281        v: T,
17282    ) -> Self {
17283        self.auto_upgrade_start_time = v.into();
17284        self
17285    }
17286
17287    /// Sets the value of [description][crate::model::AutoUpgradeOptions::description].
17288    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17289        self.description = v.into();
17290        self
17291    }
17292}
17293
17294impl wkt::message::Message for AutoUpgradeOptions {
17295    fn typename() -> &'static str {
17296        "type.googleapis.com/google.container.v1.AutoUpgradeOptions"
17297    }
17298}
17299
17300/// MaintenancePolicy defines the maintenance policy to be used for the cluster.
17301#[derive(Clone, Default, PartialEq)]
17302#[non_exhaustive]
17303pub struct MaintenancePolicy {
17304    /// Specifies the maintenance window in which maintenance may be performed.
17305    pub window: std::option::Option<crate::model::MaintenanceWindow>,
17306
17307    /// A hash identifying the version of this policy, so that updates to fields of
17308    /// the policy won't accidentally undo intermediate changes (and so that users
17309    /// of the API unaware of some fields won't accidentally remove other fields).
17310    /// Make a `get()` request to the cluster to get the current
17311    /// resource version and include it with requests to set the policy.
17312    pub resource_version: std::string::String,
17313
17314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17315}
17316
17317impl MaintenancePolicy {
17318    pub fn new() -> Self {
17319        std::default::Default::default()
17320    }
17321
17322    /// Sets the value of [window][crate::model::MaintenancePolicy::window].
17323    pub fn set_window<T>(mut self, v: T) -> Self
17324    where
17325        T: std::convert::Into<crate::model::MaintenanceWindow>,
17326    {
17327        self.window = std::option::Option::Some(v.into());
17328        self
17329    }
17330
17331    /// Sets or clears the value of [window][crate::model::MaintenancePolicy::window].
17332    pub fn set_or_clear_window<T>(mut self, v: std::option::Option<T>) -> Self
17333    where
17334        T: std::convert::Into<crate::model::MaintenanceWindow>,
17335    {
17336        self.window = v.map(|x| x.into());
17337        self
17338    }
17339
17340    /// Sets the value of [resource_version][crate::model::MaintenancePolicy::resource_version].
17341    pub fn set_resource_version<T: std::convert::Into<std::string::String>>(
17342        mut self,
17343        v: T,
17344    ) -> Self {
17345        self.resource_version = v.into();
17346        self
17347    }
17348}
17349
17350impl wkt::message::Message for MaintenancePolicy {
17351    fn typename() -> &'static str {
17352        "type.googleapis.com/google.container.v1.MaintenancePolicy"
17353    }
17354}
17355
17356/// MaintenanceWindow defines the maintenance window to be used for the cluster.
17357#[derive(Clone, Default, PartialEq)]
17358#[non_exhaustive]
17359pub struct MaintenanceWindow {
17360    /// Exceptions to maintenance window. Non-emergency maintenance should not
17361    /// occur in these windows.
17362    pub maintenance_exclusions:
17363        std::collections::HashMap<std::string::String, crate::model::TimeWindow>,
17364
17365    pub policy: std::option::Option<crate::model::maintenance_window::Policy>,
17366
17367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17368}
17369
17370impl MaintenanceWindow {
17371    pub fn new() -> Self {
17372        std::default::Default::default()
17373    }
17374
17375    /// Sets the value of [maintenance_exclusions][crate::model::MaintenanceWindow::maintenance_exclusions].
17376    pub fn set_maintenance_exclusions<T, K, V>(mut self, v: T) -> Self
17377    where
17378        T: std::iter::IntoIterator<Item = (K, V)>,
17379        K: std::convert::Into<std::string::String>,
17380        V: std::convert::Into<crate::model::TimeWindow>,
17381    {
17382        use std::iter::Iterator;
17383        self.maintenance_exclusions = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17384        self
17385    }
17386
17387    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy].
17388    ///
17389    /// Note that all the setters affecting `policy` are mutually
17390    /// exclusive.
17391    pub fn set_policy<
17392        T: std::convert::Into<std::option::Option<crate::model::maintenance_window::Policy>>,
17393    >(
17394        mut self,
17395        v: T,
17396    ) -> Self {
17397        self.policy = v.into();
17398        self
17399    }
17400
17401    /// The value of [policy][crate::model::MaintenanceWindow::policy]
17402    /// if it holds a `DailyMaintenanceWindow`, `None` if the field is not set or
17403    /// holds a different branch.
17404    pub fn daily_maintenance_window(
17405        &self,
17406    ) -> std::option::Option<&std::boxed::Box<crate::model::DailyMaintenanceWindow>> {
17407        #[allow(unreachable_patterns)]
17408        self.policy.as_ref().and_then(|v| match v {
17409            crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v) => {
17410                std::option::Option::Some(v)
17411            }
17412            _ => std::option::Option::None,
17413        })
17414    }
17415
17416    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy]
17417    /// to hold a `DailyMaintenanceWindow`.
17418    ///
17419    /// Note that all the setters affecting `policy` are
17420    /// mutually exclusive.
17421    pub fn set_daily_maintenance_window<
17422        T: std::convert::Into<std::boxed::Box<crate::model::DailyMaintenanceWindow>>,
17423    >(
17424        mut self,
17425        v: T,
17426    ) -> Self {
17427        self.policy = std::option::Option::Some(
17428            crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v.into()),
17429        );
17430        self
17431    }
17432
17433    /// The value of [policy][crate::model::MaintenanceWindow::policy]
17434    /// if it holds a `RecurringWindow`, `None` if the field is not set or
17435    /// holds a different branch.
17436    pub fn recurring_window(
17437        &self,
17438    ) -> std::option::Option<&std::boxed::Box<crate::model::RecurringTimeWindow>> {
17439        #[allow(unreachable_patterns)]
17440        self.policy.as_ref().and_then(|v| match v {
17441            crate::model::maintenance_window::Policy::RecurringWindow(v) => {
17442                std::option::Option::Some(v)
17443            }
17444            _ => std::option::Option::None,
17445        })
17446    }
17447
17448    /// Sets the value of [policy][crate::model::MaintenanceWindow::policy]
17449    /// to hold a `RecurringWindow`.
17450    ///
17451    /// Note that all the setters affecting `policy` are
17452    /// mutually exclusive.
17453    pub fn set_recurring_window<
17454        T: std::convert::Into<std::boxed::Box<crate::model::RecurringTimeWindow>>,
17455    >(
17456        mut self,
17457        v: T,
17458    ) -> Self {
17459        self.policy = std::option::Option::Some(
17460            crate::model::maintenance_window::Policy::RecurringWindow(v.into()),
17461        );
17462        self
17463    }
17464}
17465
17466impl wkt::message::Message for MaintenanceWindow {
17467    fn typename() -> &'static str {
17468        "type.googleapis.com/google.container.v1.MaintenanceWindow"
17469    }
17470}
17471
17472/// Defines additional types related to [MaintenanceWindow].
17473pub mod maintenance_window {
17474    #[allow(unused_imports)]
17475    use super::*;
17476
17477    #[derive(Clone, Debug, PartialEq)]
17478    #[non_exhaustive]
17479    pub enum Policy {
17480        /// DailyMaintenanceWindow specifies a daily maintenance operation window.
17481        DailyMaintenanceWindow(std::boxed::Box<crate::model::DailyMaintenanceWindow>),
17482        /// RecurringWindow specifies some number of recurring time periods for
17483        /// maintenance to occur. The time windows may be overlapping. If no
17484        /// maintenance windows are set, maintenance can occur at any time.
17485        RecurringWindow(std::boxed::Box<crate::model::RecurringTimeWindow>),
17486    }
17487}
17488
17489/// Represents an arbitrary window of time.
17490#[derive(Clone, Default, PartialEq)]
17491#[non_exhaustive]
17492pub struct TimeWindow {
17493    /// The time that the window first starts.
17494    pub start_time: std::option::Option<wkt::Timestamp>,
17495
17496    /// The time that the window ends. The end time should take place after the
17497    /// start time.
17498    pub end_time: std::option::Option<wkt::Timestamp>,
17499
17500    pub options: std::option::Option<crate::model::time_window::Options>,
17501
17502    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17503}
17504
17505impl TimeWindow {
17506    pub fn new() -> Self {
17507        std::default::Default::default()
17508    }
17509
17510    /// Sets the value of [start_time][crate::model::TimeWindow::start_time].
17511    pub fn set_start_time<T>(mut self, v: T) -> Self
17512    where
17513        T: std::convert::Into<wkt::Timestamp>,
17514    {
17515        self.start_time = std::option::Option::Some(v.into());
17516        self
17517    }
17518
17519    /// Sets or clears the value of [start_time][crate::model::TimeWindow::start_time].
17520    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
17521    where
17522        T: std::convert::Into<wkt::Timestamp>,
17523    {
17524        self.start_time = v.map(|x| x.into());
17525        self
17526    }
17527
17528    /// Sets the value of [end_time][crate::model::TimeWindow::end_time].
17529    pub fn set_end_time<T>(mut self, v: T) -> Self
17530    where
17531        T: std::convert::Into<wkt::Timestamp>,
17532    {
17533        self.end_time = std::option::Option::Some(v.into());
17534        self
17535    }
17536
17537    /// Sets or clears the value of [end_time][crate::model::TimeWindow::end_time].
17538    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
17539    where
17540        T: std::convert::Into<wkt::Timestamp>,
17541    {
17542        self.end_time = v.map(|x| x.into());
17543        self
17544    }
17545
17546    /// Sets the value of [options][crate::model::TimeWindow::options].
17547    ///
17548    /// Note that all the setters affecting `options` are mutually
17549    /// exclusive.
17550    pub fn set_options<
17551        T: std::convert::Into<std::option::Option<crate::model::time_window::Options>>,
17552    >(
17553        mut self,
17554        v: T,
17555    ) -> Self {
17556        self.options = v.into();
17557        self
17558    }
17559
17560    /// The value of [options][crate::model::TimeWindow::options]
17561    /// if it holds a `MaintenanceExclusionOptions`, `None` if the field is not set or
17562    /// holds a different branch.
17563    pub fn maintenance_exclusion_options(
17564        &self,
17565    ) -> std::option::Option<&std::boxed::Box<crate::model::MaintenanceExclusionOptions>> {
17566        #[allow(unreachable_patterns)]
17567        self.options.as_ref().and_then(|v| match v {
17568            crate::model::time_window::Options::MaintenanceExclusionOptions(v) => {
17569                std::option::Option::Some(v)
17570            }
17571            _ => std::option::Option::None,
17572        })
17573    }
17574
17575    /// Sets the value of [options][crate::model::TimeWindow::options]
17576    /// to hold a `MaintenanceExclusionOptions`.
17577    ///
17578    /// Note that all the setters affecting `options` are
17579    /// mutually exclusive.
17580    pub fn set_maintenance_exclusion_options<
17581        T: std::convert::Into<std::boxed::Box<crate::model::MaintenanceExclusionOptions>>,
17582    >(
17583        mut self,
17584        v: T,
17585    ) -> Self {
17586        self.options = std::option::Option::Some(
17587            crate::model::time_window::Options::MaintenanceExclusionOptions(v.into()),
17588        );
17589        self
17590    }
17591}
17592
17593impl wkt::message::Message for TimeWindow {
17594    fn typename() -> &'static str {
17595        "type.googleapis.com/google.container.v1.TimeWindow"
17596    }
17597}
17598
17599/// Defines additional types related to [TimeWindow].
17600pub mod time_window {
17601    #[allow(unused_imports)]
17602    use super::*;
17603
17604    #[derive(Clone, Debug, PartialEq)]
17605    #[non_exhaustive]
17606    pub enum Options {
17607        /// MaintenanceExclusionOptions provides maintenance exclusion related
17608        /// options.
17609        MaintenanceExclusionOptions(std::boxed::Box<crate::model::MaintenanceExclusionOptions>),
17610    }
17611}
17612
17613/// Represents the Maintenance exclusion option.
17614#[derive(Clone, Default, PartialEq)]
17615#[non_exhaustive]
17616pub struct MaintenanceExclusionOptions {
17617    /// Scope specifies the upgrade scope which upgrades are blocked by the
17618    /// exclusion.
17619    pub scope: crate::model::maintenance_exclusion_options::Scope,
17620
17621    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17622}
17623
17624impl MaintenanceExclusionOptions {
17625    pub fn new() -> Self {
17626        std::default::Default::default()
17627    }
17628
17629    /// Sets the value of [scope][crate::model::MaintenanceExclusionOptions::scope].
17630    pub fn set_scope<T: std::convert::Into<crate::model::maintenance_exclusion_options::Scope>>(
17631        mut self,
17632        v: T,
17633    ) -> Self {
17634        self.scope = v.into();
17635        self
17636    }
17637}
17638
17639impl wkt::message::Message for MaintenanceExclusionOptions {
17640    fn typename() -> &'static str {
17641        "type.googleapis.com/google.container.v1.MaintenanceExclusionOptions"
17642    }
17643}
17644
17645/// Defines additional types related to [MaintenanceExclusionOptions].
17646pub mod maintenance_exclusion_options {
17647    #[allow(unused_imports)]
17648    use super::*;
17649
17650    /// Scope of exclusion.
17651    ///
17652    /// # Working with unknown values
17653    ///
17654    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17655    /// additional enum variants at any time. Adding new variants is not considered
17656    /// a breaking change. Applications should write their code in anticipation of:
17657    ///
17658    /// - New values appearing in future releases of the client library, **and**
17659    /// - New values received dynamically, without application changes.
17660    ///
17661    /// Please consult the [Working with enums] section in the user guide for some
17662    /// guidelines.
17663    ///
17664    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17665    #[derive(Clone, Debug, PartialEq)]
17666    #[non_exhaustive]
17667    pub enum Scope {
17668        /// NO_UPGRADES excludes all upgrades, including patch upgrades and minor
17669        /// upgrades across control planes and nodes. This is the default exclusion
17670        /// behavior.
17671        NoUpgrades,
17672        /// NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only
17673        /// patches are allowed.
17674        NoMinorUpgrades,
17675        /// NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster,
17676        /// and also exclude all node pool upgrades. Only control
17677        /// plane patches are allowed.
17678        NoMinorOrNodeUpgrades,
17679        /// If set, the enum was initialized with an unknown value.
17680        ///
17681        /// Applications can examine the value using [Scope::value] or
17682        /// [Scope::name].
17683        UnknownValue(scope::UnknownValue),
17684    }
17685
17686    #[doc(hidden)]
17687    pub mod scope {
17688        #[allow(unused_imports)]
17689        use super::*;
17690        #[derive(Clone, Debug, PartialEq)]
17691        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17692    }
17693
17694    impl Scope {
17695        /// Gets the enum value.
17696        ///
17697        /// Returns `None` if the enum contains an unknown value deserialized from
17698        /// the string representation of enums.
17699        pub fn value(&self) -> std::option::Option<i32> {
17700            match self {
17701                Self::NoUpgrades => std::option::Option::Some(0),
17702                Self::NoMinorUpgrades => std::option::Option::Some(1),
17703                Self::NoMinorOrNodeUpgrades => std::option::Option::Some(2),
17704                Self::UnknownValue(u) => u.0.value(),
17705            }
17706        }
17707
17708        /// Gets the enum value as a string.
17709        ///
17710        /// Returns `None` if the enum contains an unknown value deserialized from
17711        /// the integer representation of enums.
17712        pub fn name(&self) -> std::option::Option<&str> {
17713            match self {
17714                Self::NoUpgrades => std::option::Option::Some("NO_UPGRADES"),
17715                Self::NoMinorUpgrades => std::option::Option::Some("NO_MINOR_UPGRADES"),
17716                Self::NoMinorOrNodeUpgrades => {
17717                    std::option::Option::Some("NO_MINOR_OR_NODE_UPGRADES")
17718                }
17719                Self::UnknownValue(u) => u.0.name(),
17720            }
17721        }
17722    }
17723
17724    impl std::default::Default for Scope {
17725        fn default() -> Self {
17726            use std::convert::From;
17727            Self::from(0)
17728        }
17729    }
17730
17731    impl std::fmt::Display for Scope {
17732        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17733            wkt::internal::display_enum(f, self.name(), self.value())
17734        }
17735    }
17736
17737    impl std::convert::From<i32> for Scope {
17738        fn from(value: i32) -> Self {
17739            match value {
17740                0 => Self::NoUpgrades,
17741                1 => Self::NoMinorUpgrades,
17742                2 => Self::NoMinorOrNodeUpgrades,
17743                _ => Self::UnknownValue(scope::UnknownValue(
17744                    wkt::internal::UnknownEnumValue::Integer(value),
17745                )),
17746            }
17747        }
17748    }
17749
17750    impl std::convert::From<&str> for Scope {
17751        fn from(value: &str) -> Self {
17752            use std::string::ToString;
17753            match value {
17754                "NO_UPGRADES" => Self::NoUpgrades,
17755                "NO_MINOR_UPGRADES" => Self::NoMinorUpgrades,
17756                "NO_MINOR_OR_NODE_UPGRADES" => Self::NoMinorOrNodeUpgrades,
17757                _ => Self::UnknownValue(scope::UnknownValue(
17758                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17759                )),
17760            }
17761        }
17762    }
17763
17764    impl serde::ser::Serialize for Scope {
17765        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17766        where
17767            S: serde::Serializer,
17768        {
17769            match self {
17770                Self::NoUpgrades => serializer.serialize_i32(0),
17771                Self::NoMinorUpgrades => serializer.serialize_i32(1),
17772                Self::NoMinorOrNodeUpgrades => serializer.serialize_i32(2),
17773                Self::UnknownValue(u) => u.0.serialize(serializer),
17774            }
17775        }
17776    }
17777
17778    impl<'de> serde::de::Deserialize<'de> for Scope {
17779        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17780        where
17781            D: serde::Deserializer<'de>,
17782        {
17783            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
17784                ".google.container.v1.MaintenanceExclusionOptions.Scope",
17785            ))
17786        }
17787    }
17788}
17789
17790/// Represents an arbitrary window of time that recurs.
17791#[derive(Clone, Default, PartialEq)]
17792#[non_exhaustive]
17793pub struct RecurringTimeWindow {
17794    /// The window of the first recurrence.
17795    pub window: std::option::Option<crate::model::TimeWindow>,
17796
17797    /// An RRULE (<https://tools.ietf.org/html/rfc5545#section-3.8.5.3>) for how
17798    /// this window reccurs. They go on for the span of time between the start and
17799    /// end time.
17800    ///
17801    /// For example, to have something repeat every weekday, you'd use:
17802    /// `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR`
17803    ///
17804    /// To repeat some window daily (equivalent to the DailyMaintenanceWindow):
17805    /// `FREQ=DAILY`
17806    ///
17807    /// For the first weekend of every month:
17808    /// `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU`
17809    ///
17810    /// This specifies how frequently the window starts. Eg, if you wanted to have
17811    /// a 9-5 UTC-4 window every weekday, you'd use something like:
17812    ///
17813    /// ```norust
17814    /// start time = 2019-01-01T09:00:00-0400
17815    /// end time = 2019-01-01T17:00:00-0400
17816    /// recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
17817    /// ```
17818    ///
17819    /// Windows can span multiple days. Eg, to make the window encompass every
17820    /// weekend from midnight Saturday till the last minute of Sunday UTC:
17821    ///
17822    /// ```norust
17823    /// start time = 2019-01-05T00:00:00Z
17824    /// end time = 2019-01-07T23:59:00Z
17825    /// recurrence = FREQ=WEEKLY;BYDAY=SA
17826    /// ```
17827    ///
17828    /// Note the start and end time's specific dates are largely arbitrary except
17829    /// to specify duration of the window and when it first starts.
17830    /// The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported.
17831    pub recurrence: std::string::String,
17832
17833    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17834}
17835
17836impl RecurringTimeWindow {
17837    pub fn new() -> Self {
17838        std::default::Default::default()
17839    }
17840
17841    /// Sets the value of [window][crate::model::RecurringTimeWindow::window].
17842    pub fn set_window<T>(mut self, v: T) -> Self
17843    where
17844        T: std::convert::Into<crate::model::TimeWindow>,
17845    {
17846        self.window = std::option::Option::Some(v.into());
17847        self
17848    }
17849
17850    /// Sets or clears the value of [window][crate::model::RecurringTimeWindow::window].
17851    pub fn set_or_clear_window<T>(mut self, v: std::option::Option<T>) -> Self
17852    where
17853        T: std::convert::Into<crate::model::TimeWindow>,
17854    {
17855        self.window = v.map(|x| x.into());
17856        self
17857    }
17858
17859    /// Sets the value of [recurrence][crate::model::RecurringTimeWindow::recurrence].
17860    pub fn set_recurrence<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17861        self.recurrence = v.into();
17862        self
17863    }
17864}
17865
17866impl wkt::message::Message for RecurringTimeWindow {
17867    fn typename() -> &'static str {
17868        "type.googleapis.com/google.container.v1.RecurringTimeWindow"
17869    }
17870}
17871
17872/// Time window specified for daily maintenance operations.
17873#[derive(Clone, Default, PartialEq)]
17874#[non_exhaustive]
17875pub struct DailyMaintenanceWindow {
17876    /// Time within the maintenance window to start the maintenance operations.
17877    /// Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
17878    /// format "HH:MM", where HH : [00-23] and MM : [00-59] GMT.
17879    pub start_time: std::string::String,
17880
17881    /// Output only. Duration of the time window, automatically chosen to be
17882    /// smallest possible in the given scenario.
17883    /// Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
17884    /// format "PTnHnMnS".
17885    pub duration: std::string::String,
17886
17887    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17888}
17889
17890impl DailyMaintenanceWindow {
17891    pub fn new() -> Self {
17892        std::default::Default::default()
17893    }
17894
17895    /// Sets the value of [start_time][crate::model::DailyMaintenanceWindow::start_time].
17896    pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17897        self.start_time = v.into();
17898        self
17899    }
17900
17901    /// Sets the value of [duration][crate::model::DailyMaintenanceWindow::duration].
17902    pub fn set_duration<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17903        self.duration = v.into();
17904        self
17905    }
17906}
17907
17908impl wkt::message::Message for DailyMaintenanceWindow {
17909    fn typename() -> &'static str {
17910        "type.googleapis.com/google.container.v1.DailyMaintenanceWindow"
17911    }
17912}
17913
17914/// SetNodePoolManagementRequest sets the node management properties of a node
17915/// pool.
17916#[derive(Clone, Default, PartialEq)]
17917#[non_exhaustive]
17918pub struct SetNodePoolManagementRequest {
17919    /// Deprecated. The Google Developers Console [project ID or project
17920    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
17921    /// This field has been deprecated and replaced by the name field.
17922    #[deprecated]
17923    pub project_id: std::string::String,
17924
17925    /// Deprecated. The name of the Google Compute Engine
17926    /// [zone](https://cloud.google.com/compute/docs/zones#available)
17927    /// in which the cluster resides. This field has been deprecated and replaced
17928    /// by the name field.
17929    #[deprecated]
17930    pub zone: std::string::String,
17931
17932    /// Deprecated. The name of the cluster to update.
17933    /// This field has been deprecated and replaced by the name field.
17934    #[deprecated]
17935    pub cluster_id: std::string::String,
17936
17937    /// Deprecated. The name of the node pool to update.
17938    /// This field has been deprecated and replaced by the name field.
17939    #[deprecated]
17940    pub node_pool_id: std::string::String,
17941
17942    /// Required. NodeManagement configuration for the node pool.
17943    pub management: std::option::Option<crate::model::NodeManagement>,
17944
17945    /// The name (project, location, cluster, node pool id) of the node pool to set
17946    /// management properties. Specified in the format
17947    /// `projects/*/locations/*/clusters/*/nodePools/*`.
17948    pub name: std::string::String,
17949
17950    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17951}
17952
17953impl SetNodePoolManagementRequest {
17954    pub fn new() -> Self {
17955        std::default::Default::default()
17956    }
17957
17958    /// Sets the value of [project_id][crate::model::SetNodePoolManagementRequest::project_id].
17959    #[deprecated]
17960    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17961        self.project_id = v.into();
17962        self
17963    }
17964
17965    /// Sets the value of [zone][crate::model::SetNodePoolManagementRequest::zone].
17966    #[deprecated]
17967    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17968        self.zone = v.into();
17969        self
17970    }
17971
17972    /// Sets the value of [cluster_id][crate::model::SetNodePoolManagementRequest::cluster_id].
17973    #[deprecated]
17974    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17975        self.cluster_id = v.into();
17976        self
17977    }
17978
17979    /// Sets the value of [node_pool_id][crate::model::SetNodePoolManagementRequest::node_pool_id].
17980    #[deprecated]
17981    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17982        self.node_pool_id = v.into();
17983        self
17984    }
17985
17986    /// Sets the value of [management][crate::model::SetNodePoolManagementRequest::management].
17987    pub fn set_management<T>(mut self, v: T) -> Self
17988    where
17989        T: std::convert::Into<crate::model::NodeManagement>,
17990    {
17991        self.management = std::option::Option::Some(v.into());
17992        self
17993    }
17994
17995    /// Sets or clears the value of [management][crate::model::SetNodePoolManagementRequest::management].
17996    pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
17997    where
17998        T: std::convert::Into<crate::model::NodeManagement>,
17999    {
18000        self.management = v.map(|x| x.into());
18001        self
18002    }
18003
18004    /// Sets the value of [name][crate::model::SetNodePoolManagementRequest::name].
18005    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18006        self.name = v.into();
18007        self
18008    }
18009}
18010
18011impl wkt::message::Message for SetNodePoolManagementRequest {
18012    fn typename() -> &'static str {
18013        "type.googleapis.com/google.container.v1.SetNodePoolManagementRequest"
18014    }
18015}
18016
18017/// SetNodePoolSizeRequest sets the size of a node pool.
18018#[derive(Clone, Default, PartialEq)]
18019#[non_exhaustive]
18020pub struct SetNodePoolSizeRequest {
18021    /// Deprecated. The Google Developers Console [project ID or project
18022    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
18023    /// This field has been deprecated and replaced by the name field.
18024    #[deprecated]
18025    pub project_id: std::string::String,
18026
18027    /// Deprecated. The name of the Google Compute Engine
18028    /// [zone](https://cloud.google.com/compute/docs/zones#available)
18029    /// in which the cluster resides. This field has been deprecated and replaced
18030    /// by the name field.
18031    #[deprecated]
18032    pub zone: std::string::String,
18033
18034    /// Deprecated. The name of the cluster to update.
18035    /// This field has been deprecated and replaced by the name field.
18036    #[deprecated]
18037    pub cluster_id: std::string::String,
18038
18039    /// Deprecated. The name of the node pool to update.
18040    /// This field has been deprecated and replaced by the name field.
18041    #[deprecated]
18042    pub node_pool_id: std::string::String,
18043
18044    /// Required. The desired node count for the pool.
18045    pub node_count: i32,
18046
18047    /// The name (project, location, cluster, node pool id) of the node pool to set
18048    /// size.
18049    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
18050    pub name: std::string::String,
18051
18052    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18053}
18054
18055impl SetNodePoolSizeRequest {
18056    pub fn new() -> Self {
18057        std::default::Default::default()
18058    }
18059
18060    /// Sets the value of [project_id][crate::model::SetNodePoolSizeRequest::project_id].
18061    #[deprecated]
18062    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18063        self.project_id = v.into();
18064        self
18065    }
18066
18067    /// Sets the value of [zone][crate::model::SetNodePoolSizeRequest::zone].
18068    #[deprecated]
18069    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18070        self.zone = v.into();
18071        self
18072    }
18073
18074    /// Sets the value of [cluster_id][crate::model::SetNodePoolSizeRequest::cluster_id].
18075    #[deprecated]
18076    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18077        self.cluster_id = v.into();
18078        self
18079    }
18080
18081    /// Sets the value of [node_pool_id][crate::model::SetNodePoolSizeRequest::node_pool_id].
18082    #[deprecated]
18083    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18084        self.node_pool_id = v.into();
18085        self
18086    }
18087
18088    /// Sets the value of [node_count][crate::model::SetNodePoolSizeRequest::node_count].
18089    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18090        self.node_count = v.into();
18091        self
18092    }
18093
18094    /// Sets the value of [name][crate::model::SetNodePoolSizeRequest::name].
18095    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18096        self.name = v.into();
18097        self
18098    }
18099}
18100
18101impl wkt::message::Message for SetNodePoolSizeRequest {
18102    fn typename() -> &'static str {
18103        "type.googleapis.com/google.container.v1.SetNodePoolSizeRequest"
18104    }
18105}
18106
18107/// CompleteNodePoolUpgradeRequest sets the name of target node pool to complete
18108/// upgrade.
18109#[derive(Clone, Default, PartialEq)]
18110#[non_exhaustive]
18111pub struct CompleteNodePoolUpgradeRequest {
18112    /// The name (project, location, cluster, node pool id) of the node pool to
18113    /// complete upgrade.
18114    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
18115    pub name: std::string::String,
18116
18117    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18118}
18119
18120impl CompleteNodePoolUpgradeRequest {
18121    pub fn new() -> Self {
18122        std::default::Default::default()
18123    }
18124
18125    /// Sets the value of [name][crate::model::CompleteNodePoolUpgradeRequest::name].
18126    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18127        self.name = v.into();
18128        self
18129    }
18130}
18131
18132impl wkt::message::Message for CompleteNodePoolUpgradeRequest {
18133    fn typename() -> &'static str {
18134        "type.googleapis.com/google.container.v1.CompleteNodePoolUpgradeRequest"
18135    }
18136}
18137
18138/// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed
18139/// NodePool upgrade. This will be an no-op if the last upgrade successfully
18140/// completed.
18141#[derive(Clone, Default, PartialEq)]
18142#[non_exhaustive]
18143pub struct RollbackNodePoolUpgradeRequest {
18144    /// Deprecated. The Google Developers Console [project ID or project
18145    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
18146    /// This field has been deprecated and replaced by the name field.
18147    #[deprecated]
18148    pub project_id: std::string::String,
18149
18150    /// Deprecated. The name of the Google Compute Engine
18151    /// [zone](https://cloud.google.com/compute/docs/zones#available)
18152    /// in which the cluster resides. This field has been deprecated and replaced
18153    /// by the name field.
18154    #[deprecated]
18155    pub zone: std::string::String,
18156
18157    /// Deprecated. The name of the cluster to rollback.
18158    /// This field has been deprecated and replaced by the name field.
18159    #[deprecated]
18160    pub cluster_id: std::string::String,
18161
18162    /// Deprecated. The name of the node pool to rollback.
18163    /// This field has been deprecated and replaced by the name field.
18164    #[deprecated]
18165    pub node_pool_id: std::string::String,
18166
18167    /// The name (project, location, cluster, node pool id) of the node poll to
18168    /// rollback upgrade.
18169    /// Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
18170    pub name: std::string::String,
18171
18172    /// Option for rollback to ignore the PodDisruptionBudget.
18173    /// Default value is false.
18174    pub respect_pdb: bool,
18175
18176    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18177}
18178
18179impl RollbackNodePoolUpgradeRequest {
18180    pub fn new() -> Self {
18181        std::default::Default::default()
18182    }
18183
18184    /// Sets the value of [project_id][crate::model::RollbackNodePoolUpgradeRequest::project_id].
18185    #[deprecated]
18186    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18187        self.project_id = v.into();
18188        self
18189    }
18190
18191    /// Sets the value of [zone][crate::model::RollbackNodePoolUpgradeRequest::zone].
18192    #[deprecated]
18193    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18194        self.zone = v.into();
18195        self
18196    }
18197
18198    /// Sets the value of [cluster_id][crate::model::RollbackNodePoolUpgradeRequest::cluster_id].
18199    #[deprecated]
18200    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18201        self.cluster_id = v.into();
18202        self
18203    }
18204
18205    /// Sets the value of [node_pool_id][crate::model::RollbackNodePoolUpgradeRequest::node_pool_id].
18206    #[deprecated]
18207    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18208        self.node_pool_id = v.into();
18209        self
18210    }
18211
18212    /// Sets the value of [name][crate::model::RollbackNodePoolUpgradeRequest::name].
18213    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18214        self.name = v.into();
18215        self
18216    }
18217
18218    /// Sets the value of [respect_pdb][crate::model::RollbackNodePoolUpgradeRequest::respect_pdb].
18219    pub fn set_respect_pdb<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18220        self.respect_pdb = v.into();
18221        self
18222    }
18223}
18224
18225impl wkt::message::Message for RollbackNodePoolUpgradeRequest {
18226    fn typename() -> &'static str {
18227        "type.googleapis.com/google.container.v1.RollbackNodePoolUpgradeRequest"
18228    }
18229}
18230
18231/// ListNodePoolsResponse is the result of ListNodePoolsRequest.
18232#[derive(Clone, Default, PartialEq)]
18233#[non_exhaustive]
18234pub struct ListNodePoolsResponse {
18235    /// A list of node pools for a cluster.
18236    pub node_pools: std::vec::Vec<crate::model::NodePool>,
18237
18238    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18239}
18240
18241impl ListNodePoolsResponse {
18242    pub fn new() -> Self {
18243        std::default::Default::default()
18244    }
18245
18246    /// Sets the value of [node_pools][crate::model::ListNodePoolsResponse::node_pools].
18247    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
18248    where
18249        T: std::iter::IntoIterator<Item = V>,
18250        V: std::convert::Into<crate::model::NodePool>,
18251    {
18252        use std::iter::Iterator;
18253        self.node_pools = v.into_iter().map(|i| i.into()).collect();
18254        self
18255    }
18256}
18257
18258impl wkt::message::Message for ListNodePoolsResponse {
18259    fn typename() -> &'static str {
18260        "type.googleapis.com/google.container.v1.ListNodePoolsResponse"
18261    }
18262}
18263
18264/// ClusterAutoscaling contains global, per-cluster information
18265/// required by Cluster Autoscaler to automatically adjust
18266/// the size of the cluster and create/delete
18267/// node pools based on the current needs.
18268#[derive(Clone, Default, PartialEq)]
18269#[non_exhaustive]
18270pub struct ClusterAutoscaling {
18271    /// Enables automatic node pool creation and deletion.
18272    pub enable_node_autoprovisioning: bool,
18273
18274    /// Contains global constraints regarding minimum and maximum
18275    /// amount of resources in the cluster.
18276    pub resource_limits: std::vec::Vec<crate::model::ResourceLimit>,
18277
18278    /// Defines autoscaling behaviour.
18279    pub autoscaling_profile: crate::model::cluster_autoscaling::AutoscalingProfile,
18280
18281    /// AutoprovisioningNodePoolDefaults contains defaults for a node pool
18282    /// created by NAP.
18283    pub autoprovisioning_node_pool_defaults:
18284        std::option::Option<crate::model::AutoprovisioningNodePoolDefaults>,
18285
18286    /// The list of Google Compute Engine
18287    /// [zones](https://cloud.google.com/compute/docs/zones#available)
18288    /// in which the NodePool's nodes can be created by NAP.
18289    pub autoprovisioning_locations: std::vec::Vec<std::string::String>,
18290
18291    /// Default compute class is a configuration for default compute class.
18292    pub default_compute_class_config: std::option::Option<crate::model::DefaultComputeClassConfig>,
18293
18294    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18295}
18296
18297impl ClusterAutoscaling {
18298    pub fn new() -> Self {
18299        std::default::Default::default()
18300    }
18301
18302    /// Sets the value of [enable_node_autoprovisioning][crate::model::ClusterAutoscaling::enable_node_autoprovisioning].
18303    pub fn set_enable_node_autoprovisioning<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18304        self.enable_node_autoprovisioning = v.into();
18305        self
18306    }
18307
18308    /// Sets the value of [resource_limits][crate::model::ClusterAutoscaling::resource_limits].
18309    pub fn set_resource_limits<T, V>(mut self, v: T) -> Self
18310    where
18311        T: std::iter::IntoIterator<Item = V>,
18312        V: std::convert::Into<crate::model::ResourceLimit>,
18313    {
18314        use std::iter::Iterator;
18315        self.resource_limits = v.into_iter().map(|i| i.into()).collect();
18316        self
18317    }
18318
18319    /// Sets the value of [autoscaling_profile][crate::model::ClusterAutoscaling::autoscaling_profile].
18320    pub fn set_autoscaling_profile<
18321        T: std::convert::Into<crate::model::cluster_autoscaling::AutoscalingProfile>,
18322    >(
18323        mut self,
18324        v: T,
18325    ) -> Self {
18326        self.autoscaling_profile = v.into();
18327        self
18328    }
18329
18330    /// Sets the value of [autoprovisioning_node_pool_defaults][crate::model::ClusterAutoscaling::autoprovisioning_node_pool_defaults].
18331    pub fn set_autoprovisioning_node_pool_defaults<T>(mut self, v: T) -> Self
18332    where
18333        T: std::convert::Into<crate::model::AutoprovisioningNodePoolDefaults>,
18334    {
18335        self.autoprovisioning_node_pool_defaults = std::option::Option::Some(v.into());
18336        self
18337    }
18338
18339    /// Sets or clears the value of [autoprovisioning_node_pool_defaults][crate::model::ClusterAutoscaling::autoprovisioning_node_pool_defaults].
18340    pub fn set_or_clear_autoprovisioning_node_pool_defaults<T>(
18341        mut self,
18342        v: std::option::Option<T>,
18343    ) -> Self
18344    where
18345        T: std::convert::Into<crate::model::AutoprovisioningNodePoolDefaults>,
18346    {
18347        self.autoprovisioning_node_pool_defaults = v.map(|x| x.into());
18348        self
18349    }
18350
18351    /// Sets the value of [autoprovisioning_locations][crate::model::ClusterAutoscaling::autoprovisioning_locations].
18352    pub fn set_autoprovisioning_locations<T, V>(mut self, v: T) -> Self
18353    where
18354        T: std::iter::IntoIterator<Item = V>,
18355        V: std::convert::Into<std::string::String>,
18356    {
18357        use std::iter::Iterator;
18358        self.autoprovisioning_locations = v.into_iter().map(|i| i.into()).collect();
18359        self
18360    }
18361
18362    /// Sets the value of [default_compute_class_config][crate::model::ClusterAutoscaling::default_compute_class_config].
18363    pub fn set_default_compute_class_config<T>(mut self, v: T) -> Self
18364    where
18365        T: std::convert::Into<crate::model::DefaultComputeClassConfig>,
18366    {
18367        self.default_compute_class_config = std::option::Option::Some(v.into());
18368        self
18369    }
18370
18371    /// Sets or clears the value of [default_compute_class_config][crate::model::ClusterAutoscaling::default_compute_class_config].
18372    pub fn set_or_clear_default_compute_class_config<T>(mut self, v: std::option::Option<T>) -> Self
18373    where
18374        T: std::convert::Into<crate::model::DefaultComputeClassConfig>,
18375    {
18376        self.default_compute_class_config = v.map(|x| x.into());
18377        self
18378    }
18379}
18380
18381impl wkt::message::Message for ClusterAutoscaling {
18382    fn typename() -> &'static str {
18383        "type.googleapis.com/google.container.v1.ClusterAutoscaling"
18384    }
18385}
18386
18387/// Defines additional types related to [ClusterAutoscaling].
18388pub mod cluster_autoscaling {
18389    #[allow(unused_imports)]
18390    use super::*;
18391
18392    /// Defines possible options for autoscaling_profile field.
18393    ///
18394    /// # Working with unknown values
18395    ///
18396    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18397    /// additional enum variants at any time. Adding new variants is not considered
18398    /// a breaking change. Applications should write their code in anticipation of:
18399    ///
18400    /// - New values appearing in future releases of the client library, **and**
18401    /// - New values received dynamically, without application changes.
18402    ///
18403    /// Please consult the [Working with enums] section in the user guide for some
18404    /// guidelines.
18405    ///
18406    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18407    #[derive(Clone, Debug, PartialEq)]
18408    #[non_exhaustive]
18409    pub enum AutoscalingProfile {
18410        /// No change to autoscaling configuration.
18411        ProfileUnspecified,
18412        /// Prioritize optimizing utilization of resources.
18413        OptimizeUtilization,
18414        /// Use default (balanced) autoscaling configuration.
18415        Balanced,
18416        /// If set, the enum was initialized with an unknown value.
18417        ///
18418        /// Applications can examine the value using [AutoscalingProfile::value] or
18419        /// [AutoscalingProfile::name].
18420        UnknownValue(autoscaling_profile::UnknownValue),
18421    }
18422
18423    #[doc(hidden)]
18424    pub mod autoscaling_profile {
18425        #[allow(unused_imports)]
18426        use super::*;
18427        #[derive(Clone, Debug, PartialEq)]
18428        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18429    }
18430
18431    impl AutoscalingProfile {
18432        /// Gets the enum value.
18433        ///
18434        /// Returns `None` if the enum contains an unknown value deserialized from
18435        /// the string representation of enums.
18436        pub fn value(&self) -> std::option::Option<i32> {
18437            match self {
18438                Self::ProfileUnspecified => std::option::Option::Some(0),
18439                Self::OptimizeUtilization => std::option::Option::Some(1),
18440                Self::Balanced => std::option::Option::Some(2),
18441                Self::UnknownValue(u) => u.0.value(),
18442            }
18443        }
18444
18445        /// Gets the enum value as a string.
18446        ///
18447        /// Returns `None` if the enum contains an unknown value deserialized from
18448        /// the integer representation of enums.
18449        pub fn name(&self) -> std::option::Option<&str> {
18450            match self {
18451                Self::ProfileUnspecified => std::option::Option::Some("PROFILE_UNSPECIFIED"),
18452                Self::OptimizeUtilization => std::option::Option::Some("OPTIMIZE_UTILIZATION"),
18453                Self::Balanced => std::option::Option::Some("BALANCED"),
18454                Self::UnknownValue(u) => u.0.name(),
18455            }
18456        }
18457    }
18458
18459    impl std::default::Default for AutoscalingProfile {
18460        fn default() -> Self {
18461            use std::convert::From;
18462            Self::from(0)
18463        }
18464    }
18465
18466    impl std::fmt::Display for AutoscalingProfile {
18467        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18468            wkt::internal::display_enum(f, self.name(), self.value())
18469        }
18470    }
18471
18472    impl std::convert::From<i32> for AutoscalingProfile {
18473        fn from(value: i32) -> Self {
18474            match value {
18475                0 => Self::ProfileUnspecified,
18476                1 => Self::OptimizeUtilization,
18477                2 => Self::Balanced,
18478                _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
18479                    wkt::internal::UnknownEnumValue::Integer(value),
18480                )),
18481            }
18482        }
18483    }
18484
18485    impl std::convert::From<&str> for AutoscalingProfile {
18486        fn from(value: &str) -> Self {
18487            use std::string::ToString;
18488            match value {
18489                "PROFILE_UNSPECIFIED" => Self::ProfileUnspecified,
18490                "OPTIMIZE_UTILIZATION" => Self::OptimizeUtilization,
18491                "BALANCED" => Self::Balanced,
18492                _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
18493                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18494                )),
18495            }
18496        }
18497    }
18498
18499    impl serde::ser::Serialize for AutoscalingProfile {
18500        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18501        where
18502            S: serde::Serializer,
18503        {
18504            match self {
18505                Self::ProfileUnspecified => serializer.serialize_i32(0),
18506                Self::OptimizeUtilization => serializer.serialize_i32(1),
18507                Self::Balanced => serializer.serialize_i32(2),
18508                Self::UnknownValue(u) => u.0.serialize(serializer),
18509            }
18510        }
18511    }
18512
18513    impl<'de> serde::de::Deserialize<'de> for AutoscalingProfile {
18514        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18515        where
18516            D: serde::Deserializer<'de>,
18517        {
18518            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoscalingProfile>::new(
18519                ".google.container.v1.ClusterAutoscaling.AutoscalingProfile",
18520            ))
18521        }
18522    }
18523}
18524
18525/// AutoprovisioningNodePoolDefaults contains defaults for a node pool created
18526/// by NAP.
18527#[derive(Clone, Default, PartialEq)]
18528#[non_exhaustive]
18529pub struct AutoprovisioningNodePoolDefaults {
18530    /// Scopes that are used by NAP when creating node pools.
18531    pub oauth_scopes: std::vec::Vec<std::string::String>,
18532
18533    /// The Google Cloud Platform Service Account to be used by the node VMs.
18534    pub service_account: std::string::String,
18535
18536    /// Specifies the upgrade settings for NAP created node pools
18537    pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
18538
18539    /// Specifies the node management options for NAP created node-pools.
18540    pub management: std::option::Option<crate::model::NodeManagement>,
18541
18542    /// Deprecated. Minimum CPU platform to be used for NAP created node pools.
18543    /// The instance may be scheduled on the specified or newer CPU platform.
18544    /// Applicable values are the friendly names of CPU platforms, such as
18545    /// minCpuPlatform: Intel Haswell or
18546    /// minCpuPlatform: Intel Sandy Bridge. For more
18547    /// information, read [how to specify min CPU
18548    /// platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
18549    /// This field is deprecated, min_cpu_platform should be specified using
18550    /// `cloud.google.com/requested-min-cpu-platform` label selector on the pod.
18551    /// To unset the min cpu platform field pass "automatic"
18552    /// as field value.
18553    #[deprecated]
18554    pub min_cpu_platform: std::string::String,
18555
18556    /// Size of the disk attached to each node, specified in GB.
18557    /// The smallest allowed disk size is 10GB.
18558    ///
18559    /// If unspecified, the default disk size is 100GB.
18560    pub disk_size_gb: i32,
18561
18562    /// Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or
18563    /// 'pd-balanced')
18564    ///
18565    /// If unspecified, the default disk type is 'pd-standard'
18566    pub disk_type: std::string::String,
18567
18568    /// Shielded Instance options.
18569    pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
18570
18571    /// The Customer Managed Encryption Key used to encrypt the boot disk attached
18572    /// to each node in the node pool. This should be of the form
18573    /// projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME].
18574    /// For more information about protecting resources with Cloud KMS Keys please
18575    /// see:
18576    /// <https://cloud.google.com/compute/docs/disks/customer-managed-encryption>
18577    pub boot_disk_kms_key: std::string::String,
18578
18579    /// The image type to use for NAP created node. Please see
18580    /// <https://cloud.google.com/kubernetes-engine/docs/concepts/node-images>
18581    /// for available image types.
18582    pub image_type: std::string::String,
18583
18584    /// DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead.
18585    pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
18586
18587    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18588}
18589
18590impl AutoprovisioningNodePoolDefaults {
18591    pub fn new() -> Self {
18592        std::default::Default::default()
18593    }
18594
18595    /// Sets the value of [oauth_scopes][crate::model::AutoprovisioningNodePoolDefaults::oauth_scopes].
18596    pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
18597    where
18598        T: std::iter::IntoIterator<Item = V>,
18599        V: std::convert::Into<std::string::String>,
18600    {
18601        use std::iter::Iterator;
18602        self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
18603        self
18604    }
18605
18606    /// Sets the value of [service_account][crate::model::AutoprovisioningNodePoolDefaults::service_account].
18607    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18608        self.service_account = v.into();
18609        self
18610    }
18611
18612    /// Sets the value of [upgrade_settings][crate::model::AutoprovisioningNodePoolDefaults::upgrade_settings].
18613    pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
18614    where
18615        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
18616    {
18617        self.upgrade_settings = std::option::Option::Some(v.into());
18618        self
18619    }
18620
18621    /// Sets or clears the value of [upgrade_settings][crate::model::AutoprovisioningNodePoolDefaults::upgrade_settings].
18622    pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
18623    where
18624        T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
18625    {
18626        self.upgrade_settings = v.map(|x| x.into());
18627        self
18628    }
18629
18630    /// Sets the value of [management][crate::model::AutoprovisioningNodePoolDefaults::management].
18631    pub fn set_management<T>(mut self, v: T) -> Self
18632    where
18633        T: std::convert::Into<crate::model::NodeManagement>,
18634    {
18635        self.management = std::option::Option::Some(v.into());
18636        self
18637    }
18638
18639    /// Sets or clears the value of [management][crate::model::AutoprovisioningNodePoolDefaults::management].
18640    pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
18641    where
18642        T: std::convert::Into<crate::model::NodeManagement>,
18643    {
18644        self.management = v.map(|x| x.into());
18645        self
18646    }
18647
18648    /// Sets the value of [min_cpu_platform][crate::model::AutoprovisioningNodePoolDefaults::min_cpu_platform].
18649    #[deprecated]
18650    pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
18651        mut self,
18652        v: T,
18653    ) -> Self {
18654        self.min_cpu_platform = v.into();
18655        self
18656    }
18657
18658    /// Sets the value of [disk_size_gb][crate::model::AutoprovisioningNodePoolDefaults::disk_size_gb].
18659    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18660        self.disk_size_gb = v.into();
18661        self
18662    }
18663
18664    /// Sets the value of [disk_type][crate::model::AutoprovisioningNodePoolDefaults::disk_type].
18665    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18666        self.disk_type = v.into();
18667        self
18668    }
18669
18670    /// Sets the value of [shielded_instance_config][crate::model::AutoprovisioningNodePoolDefaults::shielded_instance_config].
18671    pub fn set_shielded_instance_config<T>(mut self, v: T) -> Self
18672    where
18673        T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
18674    {
18675        self.shielded_instance_config = std::option::Option::Some(v.into());
18676        self
18677    }
18678
18679    /// Sets or clears the value of [shielded_instance_config][crate::model::AutoprovisioningNodePoolDefaults::shielded_instance_config].
18680    pub fn set_or_clear_shielded_instance_config<T>(mut self, v: std::option::Option<T>) -> Self
18681    where
18682        T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
18683    {
18684        self.shielded_instance_config = v.map(|x| x.into());
18685        self
18686    }
18687
18688    /// Sets the value of [boot_disk_kms_key][crate::model::AutoprovisioningNodePoolDefaults::boot_disk_kms_key].
18689    pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
18690        mut self,
18691        v: T,
18692    ) -> Self {
18693        self.boot_disk_kms_key = v.into();
18694        self
18695    }
18696
18697    /// Sets the value of [image_type][crate::model::AutoprovisioningNodePoolDefaults::image_type].
18698    pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18699        self.image_type = v.into();
18700        self
18701    }
18702
18703    /// Sets the value of [insecure_kubelet_readonly_port_enabled][crate::model::AutoprovisioningNodePoolDefaults::insecure_kubelet_readonly_port_enabled].
18704    pub fn set_insecure_kubelet_readonly_port_enabled<T>(mut self, v: T) -> Self
18705    where
18706        T: std::convert::Into<bool>,
18707    {
18708        self.insecure_kubelet_readonly_port_enabled = std::option::Option::Some(v.into());
18709        self
18710    }
18711
18712    /// Sets or clears the value of [insecure_kubelet_readonly_port_enabled][crate::model::AutoprovisioningNodePoolDefaults::insecure_kubelet_readonly_port_enabled].
18713    pub fn set_or_clear_insecure_kubelet_readonly_port_enabled<T>(
18714        mut self,
18715        v: std::option::Option<T>,
18716    ) -> Self
18717    where
18718        T: std::convert::Into<bool>,
18719    {
18720        self.insecure_kubelet_readonly_port_enabled = v.map(|x| x.into());
18721        self
18722    }
18723}
18724
18725impl wkt::message::Message for AutoprovisioningNodePoolDefaults {
18726    fn typename() -> &'static str {
18727        "type.googleapis.com/google.container.v1.AutoprovisioningNodePoolDefaults"
18728    }
18729}
18730
18731/// Contains information about amount of some resource in the cluster.
18732/// For memory, value should be in GB.
18733#[derive(Clone, Default, PartialEq)]
18734#[non_exhaustive]
18735pub struct ResourceLimit {
18736    /// Resource name "cpu", "memory" or gpu-specific string.
18737    pub resource_type: std::string::String,
18738
18739    /// Minimum amount of the resource in the cluster.
18740    pub minimum: i64,
18741
18742    /// Maximum amount of the resource in the cluster.
18743    pub maximum: i64,
18744
18745    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18746}
18747
18748impl ResourceLimit {
18749    pub fn new() -> Self {
18750        std::default::Default::default()
18751    }
18752
18753    /// Sets the value of [resource_type][crate::model::ResourceLimit::resource_type].
18754    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18755        self.resource_type = v.into();
18756        self
18757    }
18758
18759    /// Sets the value of [minimum][crate::model::ResourceLimit::minimum].
18760    pub fn set_minimum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18761        self.minimum = v.into();
18762        self
18763    }
18764
18765    /// Sets the value of [maximum][crate::model::ResourceLimit::maximum].
18766    pub fn set_maximum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18767        self.maximum = v.into();
18768        self
18769    }
18770}
18771
18772impl wkt::message::Message for ResourceLimit {
18773    fn typename() -> &'static str {
18774        "type.googleapis.com/google.container.v1.ResourceLimit"
18775    }
18776}
18777
18778/// DefaultComputeClassConfig defines default compute class
18779/// configuration.
18780#[derive(Clone, Default, PartialEq)]
18781#[non_exhaustive]
18782pub struct DefaultComputeClassConfig {
18783    /// Enables default compute class.
18784    pub enabled: bool,
18785
18786    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18787}
18788
18789impl DefaultComputeClassConfig {
18790    pub fn new() -> Self {
18791        std::default::Default::default()
18792    }
18793
18794    /// Sets the value of [enabled][crate::model::DefaultComputeClassConfig::enabled].
18795    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18796        self.enabled = v.into();
18797        self
18798    }
18799}
18800
18801impl wkt::message::Message for DefaultComputeClassConfig {
18802    fn typename() -> &'static str {
18803        "type.googleapis.com/google.container.v1.DefaultComputeClassConfig"
18804    }
18805}
18806
18807/// NodePoolAutoscaling contains information required by cluster autoscaler to
18808/// adjust the size of the node pool to the current cluster usage.
18809#[derive(Clone, Default, PartialEq)]
18810#[non_exhaustive]
18811pub struct NodePoolAutoscaling {
18812    /// Is autoscaling enabled for this node pool.
18813    pub enabled: bool,
18814
18815    /// Minimum number of nodes for one location in the node pool. Must be greater
18816    /// than or equal to 0 and less than or equal to max_node_count.
18817    pub min_node_count: i32,
18818
18819    /// Maximum number of nodes for one location in the node pool. Must be >=
18820    /// min_node_count. There has to be enough quota to scale up the cluster.
18821    pub max_node_count: i32,
18822
18823    /// Can this node pool be deleted automatically.
18824    pub autoprovisioned: bool,
18825
18826    /// Location policy used when scaling up a nodepool.
18827    pub location_policy: crate::model::node_pool_autoscaling::LocationPolicy,
18828
18829    /// Minimum number of nodes in the node pool. Must be greater than or equal
18830    /// to 0 and less than or equal to total_max_node_count.
18831    /// The total_*_node_count fields are mutually exclusive with the *_node_count
18832    /// fields.
18833    pub total_min_node_count: i32,
18834
18835    /// Maximum number of nodes in the node pool. Must be greater than or equal to
18836    /// total_min_node_count. There has to be enough quota to scale up the cluster.
18837    /// The total_*_node_count fields are mutually exclusive with the *_node_count
18838    /// fields.
18839    pub total_max_node_count: i32,
18840
18841    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18842}
18843
18844impl NodePoolAutoscaling {
18845    pub fn new() -> Self {
18846        std::default::Default::default()
18847    }
18848
18849    /// Sets the value of [enabled][crate::model::NodePoolAutoscaling::enabled].
18850    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18851        self.enabled = v.into();
18852        self
18853    }
18854
18855    /// Sets the value of [min_node_count][crate::model::NodePoolAutoscaling::min_node_count].
18856    pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18857        self.min_node_count = v.into();
18858        self
18859    }
18860
18861    /// Sets the value of [max_node_count][crate::model::NodePoolAutoscaling::max_node_count].
18862    pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18863        self.max_node_count = v.into();
18864        self
18865    }
18866
18867    /// Sets the value of [autoprovisioned][crate::model::NodePoolAutoscaling::autoprovisioned].
18868    pub fn set_autoprovisioned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18869        self.autoprovisioned = v.into();
18870        self
18871    }
18872
18873    /// Sets the value of [location_policy][crate::model::NodePoolAutoscaling::location_policy].
18874    pub fn set_location_policy<
18875        T: std::convert::Into<crate::model::node_pool_autoscaling::LocationPolicy>,
18876    >(
18877        mut self,
18878        v: T,
18879    ) -> Self {
18880        self.location_policy = v.into();
18881        self
18882    }
18883
18884    /// Sets the value of [total_min_node_count][crate::model::NodePoolAutoscaling::total_min_node_count].
18885    pub fn set_total_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18886        self.total_min_node_count = v.into();
18887        self
18888    }
18889
18890    /// Sets the value of [total_max_node_count][crate::model::NodePoolAutoscaling::total_max_node_count].
18891    pub fn set_total_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18892        self.total_max_node_count = v.into();
18893        self
18894    }
18895}
18896
18897impl wkt::message::Message for NodePoolAutoscaling {
18898    fn typename() -> &'static str {
18899        "type.googleapis.com/google.container.v1.NodePoolAutoscaling"
18900    }
18901}
18902
18903/// Defines additional types related to [NodePoolAutoscaling].
18904pub mod node_pool_autoscaling {
18905    #[allow(unused_imports)]
18906    use super::*;
18907
18908    /// Location policy specifies how zones are picked when scaling up the
18909    /// nodepool.
18910    ///
18911    /// # Working with unknown values
18912    ///
18913    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18914    /// additional enum variants at any time. Adding new variants is not considered
18915    /// a breaking change. Applications should write their code in anticipation of:
18916    ///
18917    /// - New values appearing in future releases of the client library, **and**
18918    /// - New values received dynamically, without application changes.
18919    ///
18920    /// Please consult the [Working with enums] section in the user guide for some
18921    /// guidelines.
18922    ///
18923    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18924    #[derive(Clone, Debug, PartialEq)]
18925    #[non_exhaustive]
18926    pub enum LocationPolicy {
18927        /// Not set.
18928        Unspecified,
18929        /// BALANCED is a best effort policy that aims to balance the sizes of
18930        /// different zones.
18931        Balanced,
18932        /// ANY policy picks zones that have the highest capacity available.
18933        Any,
18934        /// If set, the enum was initialized with an unknown value.
18935        ///
18936        /// Applications can examine the value using [LocationPolicy::value] or
18937        /// [LocationPolicy::name].
18938        UnknownValue(location_policy::UnknownValue),
18939    }
18940
18941    #[doc(hidden)]
18942    pub mod location_policy {
18943        #[allow(unused_imports)]
18944        use super::*;
18945        #[derive(Clone, Debug, PartialEq)]
18946        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18947    }
18948
18949    impl LocationPolicy {
18950        /// Gets the enum value.
18951        ///
18952        /// Returns `None` if the enum contains an unknown value deserialized from
18953        /// the string representation of enums.
18954        pub fn value(&self) -> std::option::Option<i32> {
18955            match self {
18956                Self::Unspecified => std::option::Option::Some(0),
18957                Self::Balanced => std::option::Option::Some(1),
18958                Self::Any => std::option::Option::Some(2),
18959                Self::UnknownValue(u) => u.0.value(),
18960            }
18961        }
18962
18963        /// Gets the enum value as a string.
18964        ///
18965        /// Returns `None` if the enum contains an unknown value deserialized from
18966        /// the integer representation of enums.
18967        pub fn name(&self) -> std::option::Option<&str> {
18968            match self {
18969                Self::Unspecified => std::option::Option::Some("LOCATION_POLICY_UNSPECIFIED"),
18970                Self::Balanced => std::option::Option::Some("BALANCED"),
18971                Self::Any => std::option::Option::Some("ANY"),
18972                Self::UnknownValue(u) => u.0.name(),
18973            }
18974        }
18975    }
18976
18977    impl std::default::Default for LocationPolicy {
18978        fn default() -> Self {
18979            use std::convert::From;
18980            Self::from(0)
18981        }
18982    }
18983
18984    impl std::fmt::Display for LocationPolicy {
18985        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18986            wkt::internal::display_enum(f, self.name(), self.value())
18987        }
18988    }
18989
18990    impl std::convert::From<i32> for LocationPolicy {
18991        fn from(value: i32) -> Self {
18992            match value {
18993                0 => Self::Unspecified,
18994                1 => Self::Balanced,
18995                2 => Self::Any,
18996                _ => Self::UnknownValue(location_policy::UnknownValue(
18997                    wkt::internal::UnknownEnumValue::Integer(value),
18998                )),
18999            }
19000        }
19001    }
19002
19003    impl std::convert::From<&str> for LocationPolicy {
19004        fn from(value: &str) -> Self {
19005            use std::string::ToString;
19006            match value {
19007                "LOCATION_POLICY_UNSPECIFIED" => Self::Unspecified,
19008                "BALANCED" => Self::Balanced,
19009                "ANY" => Self::Any,
19010                _ => Self::UnknownValue(location_policy::UnknownValue(
19011                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19012                )),
19013            }
19014        }
19015    }
19016
19017    impl serde::ser::Serialize for LocationPolicy {
19018        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19019        where
19020            S: serde::Serializer,
19021        {
19022            match self {
19023                Self::Unspecified => serializer.serialize_i32(0),
19024                Self::Balanced => serializer.serialize_i32(1),
19025                Self::Any => serializer.serialize_i32(2),
19026                Self::UnknownValue(u) => u.0.serialize(serializer),
19027            }
19028        }
19029    }
19030
19031    impl<'de> serde::de::Deserialize<'de> for LocationPolicy {
19032        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19033        where
19034            D: serde::Deserializer<'de>,
19035        {
19036            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationPolicy>::new(
19037                ".google.container.v1.NodePoolAutoscaling.LocationPolicy",
19038            ))
19039        }
19040    }
19041}
19042
19043/// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container
19044/// Engine cluster, which will in turn set them for Google Compute Engine
19045/// resources used by that cluster
19046#[derive(Clone, Default, PartialEq)]
19047#[non_exhaustive]
19048pub struct SetLabelsRequest {
19049    /// Deprecated. The Google Developers Console [project ID or project
19050    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
19051    /// This field has been deprecated and replaced by the name field.
19052    #[deprecated]
19053    pub project_id: std::string::String,
19054
19055    /// Deprecated. The name of the Google Compute Engine
19056    /// [zone](https://cloud.google.com/compute/docs/zones#available)
19057    /// in which the cluster resides. This field has been deprecated and replaced
19058    /// by the name field.
19059    #[deprecated]
19060    pub zone: std::string::String,
19061
19062    /// Deprecated. The name of the cluster.
19063    /// This field has been deprecated and replaced by the name field.
19064    #[deprecated]
19065    pub cluster_id: std::string::String,
19066
19067    /// Required. The labels to set for that cluster.
19068    pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
19069
19070    /// Required. The fingerprint of the previous set of labels for this resource,
19071    /// used to detect conflicts. The fingerprint is initially generated by
19072    /// Kubernetes Engine and changes after every request to modify or update
19073    /// labels. You must always provide an up-to-date fingerprint hash when
19074    /// updating or changing labels. Make a `get()` request to the
19075    /// resource to get the latest fingerprint.
19076    pub label_fingerprint: std::string::String,
19077
19078    /// The name (project, location, cluster name) of the cluster to set labels.
19079    /// Specified in the format `projects/*/locations/*/clusters/*`.
19080    pub name: std::string::String,
19081
19082    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19083}
19084
19085impl SetLabelsRequest {
19086    pub fn new() -> Self {
19087        std::default::Default::default()
19088    }
19089
19090    /// Sets the value of [project_id][crate::model::SetLabelsRequest::project_id].
19091    #[deprecated]
19092    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19093        self.project_id = v.into();
19094        self
19095    }
19096
19097    /// Sets the value of [zone][crate::model::SetLabelsRequest::zone].
19098    #[deprecated]
19099    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19100        self.zone = v.into();
19101        self
19102    }
19103
19104    /// Sets the value of [cluster_id][crate::model::SetLabelsRequest::cluster_id].
19105    #[deprecated]
19106    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19107        self.cluster_id = v.into();
19108        self
19109    }
19110
19111    /// Sets the value of [resource_labels][crate::model::SetLabelsRequest::resource_labels].
19112    pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
19113    where
19114        T: std::iter::IntoIterator<Item = (K, V)>,
19115        K: std::convert::Into<std::string::String>,
19116        V: std::convert::Into<std::string::String>,
19117    {
19118        use std::iter::Iterator;
19119        self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19120        self
19121    }
19122
19123    /// Sets the value of [label_fingerprint][crate::model::SetLabelsRequest::label_fingerprint].
19124    pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
19125        mut self,
19126        v: T,
19127    ) -> Self {
19128        self.label_fingerprint = v.into();
19129        self
19130    }
19131
19132    /// Sets the value of [name][crate::model::SetLabelsRequest::name].
19133    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19134        self.name = v.into();
19135        self
19136    }
19137}
19138
19139impl wkt::message::Message for SetLabelsRequest {
19140    fn typename() -> &'static str {
19141        "type.googleapis.com/google.container.v1.SetLabelsRequest"
19142    }
19143}
19144
19145/// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for
19146/// a cluster.
19147#[derive(Clone, Default, PartialEq)]
19148#[non_exhaustive]
19149pub struct SetLegacyAbacRequest {
19150    /// Deprecated. The Google Developers Console [project ID or project
19151    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
19152    /// This field has been deprecated and replaced by the name field.
19153    #[deprecated]
19154    pub project_id: std::string::String,
19155
19156    /// Deprecated. The name of the Google Compute Engine
19157    /// [zone](https://cloud.google.com/compute/docs/zones#available)
19158    /// in which the cluster resides. This field has been deprecated and replaced
19159    /// by the name field.
19160    #[deprecated]
19161    pub zone: std::string::String,
19162
19163    /// Deprecated. The name of the cluster to update.
19164    /// This field has been deprecated and replaced by the name field.
19165    #[deprecated]
19166    pub cluster_id: std::string::String,
19167
19168    /// Required. Whether ABAC authorization will be enabled in the cluster.
19169    pub enabled: bool,
19170
19171    /// The name (project, location, cluster name) of the cluster to set legacy
19172    /// abac. Specified in the format `projects/*/locations/*/clusters/*`.
19173    pub name: std::string::String,
19174
19175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19176}
19177
19178impl SetLegacyAbacRequest {
19179    pub fn new() -> Self {
19180        std::default::Default::default()
19181    }
19182
19183    /// Sets the value of [project_id][crate::model::SetLegacyAbacRequest::project_id].
19184    #[deprecated]
19185    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19186        self.project_id = v.into();
19187        self
19188    }
19189
19190    /// Sets the value of [zone][crate::model::SetLegacyAbacRequest::zone].
19191    #[deprecated]
19192    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19193        self.zone = v.into();
19194        self
19195    }
19196
19197    /// Sets the value of [cluster_id][crate::model::SetLegacyAbacRequest::cluster_id].
19198    #[deprecated]
19199    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19200        self.cluster_id = v.into();
19201        self
19202    }
19203
19204    /// Sets the value of [enabled][crate::model::SetLegacyAbacRequest::enabled].
19205    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19206        self.enabled = v.into();
19207        self
19208    }
19209
19210    /// Sets the value of [name][crate::model::SetLegacyAbacRequest::name].
19211    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19212        self.name = v.into();
19213        self
19214    }
19215}
19216
19217impl wkt::message::Message for SetLegacyAbacRequest {
19218    fn typename() -> &'static str {
19219        "type.googleapis.com/google.container.v1.SetLegacyAbacRequest"
19220    }
19221}
19222
19223/// StartIPRotationRequest creates a new IP for the cluster and then performs
19224/// a node upgrade on each node pool to point to the new IP.
19225#[derive(Clone, Default, PartialEq)]
19226#[non_exhaustive]
19227pub struct StartIPRotationRequest {
19228    /// Deprecated. The Google Developers Console [project ID or project
19229    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
19230    /// This field has been deprecated and replaced by the name field.
19231    #[deprecated]
19232    pub project_id: std::string::String,
19233
19234    /// Deprecated. The name of the Google Compute Engine
19235    /// [zone](https://cloud.google.com/compute/docs/zones#available)
19236    /// in which the cluster resides. This field has been deprecated and replaced
19237    /// by the name field.
19238    #[deprecated]
19239    pub zone: std::string::String,
19240
19241    /// Deprecated. The name of the cluster.
19242    /// This field has been deprecated and replaced by the name field.
19243    #[deprecated]
19244    pub cluster_id: std::string::String,
19245
19246    /// The name (project, location, cluster name) of the cluster to start IP
19247    /// rotation. Specified in the format `projects/*/locations/*/clusters/*`.
19248    pub name: std::string::String,
19249
19250    /// Whether to rotate credentials during IP rotation.
19251    pub rotate_credentials: bool,
19252
19253    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19254}
19255
19256impl StartIPRotationRequest {
19257    pub fn new() -> Self {
19258        std::default::Default::default()
19259    }
19260
19261    /// Sets the value of [project_id][crate::model::StartIPRotationRequest::project_id].
19262    #[deprecated]
19263    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19264        self.project_id = v.into();
19265        self
19266    }
19267
19268    /// Sets the value of [zone][crate::model::StartIPRotationRequest::zone].
19269    #[deprecated]
19270    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19271        self.zone = v.into();
19272        self
19273    }
19274
19275    /// Sets the value of [cluster_id][crate::model::StartIPRotationRequest::cluster_id].
19276    #[deprecated]
19277    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19278        self.cluster_id = v.into();
19279        self
19280    }
19281
19282    /// Sets the value of [name][crate::model::StartIPRotationRequest::name].
19283    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19284        self.name = v.into();
19285        self
19286    }
19287
19288    /// Sets the value of [rotate_credentials][crate::model::StartIPRotationRequest::rotate_credentials].
19289    pub fn set_rotate_credentials<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19290        self.rotate_credentials = v.into();
19291        self
19292    }
19293}
19294
19295impl wkt::message::Message for StartIPRotationRequest {
19296    fn typename() -> &'static str {
19297        "type.googleapis.com/google.container.v1.StartIPRotationRequest"
19298    }
19299}
19300
19301/// CompleteIPRotationRequest moves the cluster master back into single-IP mode.
19302#[derive(Clone, Default, PartialEq)]
19303#[non_exhaustive]
19304pub struct CompleteIPRotationRequest {
19305    /// Deprecated. The Google Developers Console [project ID or project
19306    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
19307    /// This field has been deprecated and replaced by the name field.
19308    #[deprecated]
19309    pub project_id: std::string::String,
19310
19311    /// Deprecated. The name of the Google Compute Engine
19312    /// [zone](https://cloud.google.com/compute/docs/zones#available)
19313    /// in which the cluster resides. This field has been deprecated and replaced
19314    /// by the name field.
19315    #[deprecated]
19316    pub zone: std::string::String,
19317
19318    /// Deprecated. The name of the cluster.
19319    /// This field has been deprecated and replaced by the name field.
19320    #[deprecated]
19321    pub cluster_id: std::string::String,
19322
19323    /// The name (project, location, cluster name) of the cluster to complete IP
19324    /// rotation. Specified in the format `projects/*/locations/*/clusters/*`.
19325    pub name: std::string::String,
19326
19327    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19328}
19329
19330impl CompleteIPRotationRequest {
19331    pub fn new() -> Self {
19332        std::default::Default::default()
19333    }
19334
19335    /// Sets the value of [project_id][crate::model::CompleteIPRotationRequest::project_id].
19336    #[deprecated]
19337    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19338        self.project_id = v.into();
19339        self
19340    }
19341
19342    /// Sets the value of [zone][crate::model::CompleteIPRotationRequest::zone].
19343    #[deprecated]
19344    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19345        self.zone = v.into();
19346        self
19347    }
19348
19349    /// Sets the value of [cluster_id][crate::model::CompleteIPRotationRequest::cluster_id].
19350    #[deprecated]
19351    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19352        self.cluster_id = v.into();
19353        self
19354    }
19355
19356    /// Sets the value of [name][crate::model::CompleteIPRotationRequest::name].
19357    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19358        self.name = v.into();
19359        self
19360    }
19361}
19362
19363impl wkt::message::Message for CompleteIPRotationRequest {
19364    fn typename() -> &'static str {
19365        "type.googleapis.com/google.container.v1.CompleteIPRotationRequest"
19366    }
19367}
19368
19369/// AcceleratorConfig represents a Hardware Accelerator request.
19370#[derive(Clone, Default, PartialEq)]
19371#[non_exhaustive]
19372pub struct AcceleratorConfig {
19373    /// The number of the accelerator cards exposed to an instance.
19374    pub accelerator_count: i64,
19375
19376    /// The accelerator type resource name. List of supported accelerators
19377    /// [here](https://cloud.google.com/compute/docs/gpus)
19378    pub accelerator_type: std::string::String,
19379
19380    /// Size of partitions to create on the GPU. Valid values are described in the
19381    /// NVIDIA [mig user
19382    /// guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).
19383    pub gpu_partition_size: std::string::String,
19384
19385    /// The configuration for GPU sharing options.
19386    pub gpu_sharing_config: std::option::Option<crate::model::GPUSharingConfig>,
19387
19388    /// The configuration for auto installation of GPU driver.
19389    pub gpu_driver_installation_config:
19390        std::option::Option<crate::model::GPUDriverInstallationConfig>,
19391
19392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19393}
19394
19395impl AcceleratorConfig {
19396    pub fn new() -> Self {
19397        std::default::Default::default()
19398    }
19399
19400    /// Sets the value of [accelerator_count][crate::model::AcceleratorConfig::accelerator_count].
19401    pub fn set_accelerator_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19402        self.accelerator_count = v.into();
19403        self
19404    }
19405
19406    /// Sets the value of [accelerator_type][crate::model::AcceleratorConfig::accelerator_type].
19407    pub fn set_accelerator_type<T: std::convert::Into<std::string::String>>(
19408        mut self,
19409        v: T,
19410    ) -> Self {
19411        self.accelerator_type = v.into();
19412        self
19413    }
19414
19415    /// Sets the value of [gpu_partition_size][crate::model::AcceleratorConfig::gpu_partition_size].
19416    pub fn set_gpu_partition_size<T: std::convert::Into<std::string::String>>(
19417        mut self,
19418        v: T,
19419    ) -> Self {
19420        self.gpu_partition_size = v.into();
19421        self
19422    }
19423
19424    /// Sets the value of [gpu_sharing_config][crate::model::AcceleratorConfig::gpu_sharing_config].
19425    pub fn set_gpu_sharing_config<T>(mut self, v: T) -> Self
19426    where
19427        T: std::convert::Into<crate::model::GPUSharingConfig>,
19428    {
19429        self.gpu_sharing_config = std::option::Option::Some(v.into());
19430        self
19431    }
19432
19433    /// Sets or clears the value of [gpu_sharing_config][crate::model::AcceleratorConfig::gpu_sharing_config].
19434    pub fn set_or_clear_gpu_sharing_config<T>(mut self, v: std::option::Option<T>) -> Self
19435    where
19436        T: std::convert::Into<crate::model::GPUSharingConfig>,
19437    {
19438        self.gpu_sharing_config = v.map(|x| x.into());
19439        self
19440    }
19441
19442    /// Sets the value of [gpu_driver_installation_config][crate::model::AcceleratorConfig::gpu_driver_installation_config].
19443    pub fn set_gpu_driver_installation_config<T>(mut self, v: T) -> Self
19444    where
19445        T: std::convert::Into<crate::model::GPUDriverInstallationConfig>,
19446    {
19447        self.gpu_driver_installation_config = std::option::Option::Some(v.into());
19448        self
19449    }
19450
19451    /// Sets or clears the value of [gpu_driver_installation_config][crate::model::AcceleratorConfig::gpu_driver_installation_config].
19452    pub fn set_or_clear_gpu_driver_installation_config<T>(
19453        mut self,
19454        v: std::option::Option<T>,
19455    ) -> Self
19456    where
19457        T: std::convert::Into<crate::model::GPUDriverInstallationConfig>,
19458    {
19459        self.gpu_driver_installation_config = v.map(|x| x.into());
19460        self
19461    }
19462}
19463
19464impl wkt::message::Message for AcceleratorConfig {
19465    fn typename() -> &'static str {
19466        "type.googleapis.com/google.container.v1.AcceleratorConfig"
19467    }
19468}
19469
19470/// GPUSharingConfig represents the GPU sharing configuration for Hardware
19471/// Accelerators.
19472#[derive(Clone, Default, PartialEq)]
19473#[non_exhaustive]
19474pub struct GPUSharingConfig {
19475    /// The max number of containers that can share a physical GPU.
19476    pub max_shared_clients_per_gpu: i64,
19477
19478    /// The type of GPU sharing strategy to enable on the GPU node.
19479    pub gpu_sharing_strategy:
19480        std::option::Option<crate::model::gpu_sharing_config::GPUSharingStrategy>,
19481
19482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19483}
19484
19485impl GPUSharingConfig {
19486    pub fn new() -> Self {
19487        std::default::Default::default()
19488    }
19489
19490    /// Sets the value of [max_shared_clients_per_gpu][crate::model::GPUSharingConfig::max_shared_clients_per_gpu].
19491    pub fn set_max_shared_clients_per_gpu<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19492        self.max_shared_clients_per_gpu = v.into();
19493        self
19494    }
19495
19496    /// Sets the value of [gpu_sharing_strategy][crate::model::GPUSharingConfig::gpu_sharing_strategy].
19497    pub fn set_gpu_sharing_strategy<T>(mut self, v: T) -> Self
19498    where
19499        T: std::convert::Into<crate::model::gpu_sharing_config::GPUSharingStrategy>,
19500    {
19501        self.gpu_sharing_strategy = std::option::Option::Some(v.into());
19502        self
19503    }
19504
19505    /// Sets or clears the value of [gpu_sharing_strategy][crate::model::GPUSharingConfig::gpu_sharing_strategy].
19506    pub fn set_or_clear_gpu_sharing_strategy<T>(mut self, v: std::option::Option<T>) -> Self
19507    where
19508        T: std::convert::Into<crate::model::gpu_sharing_config::GPUSharingStrategy>,
19509    {
19510        self.gpu_sharing_strategy = v.map(|x| x.into());
19511        self
19512    }
19513}
19514
19515impl wkt::message::Message for GPUSharingConfig {
19516    fn typename() -> &'static str {
19517        "type.googleapis.com/google.container.v1.GPUSharingConfig"
19518    }
19519}
19520
19521/// Defines additional types related to [GPUSharingConfig].
19522pub mod gpu_sharing_config {
19523    #[allow(unused_imports)]
19524    use super::*;
19525
19526    /// The type of GPU sharing strategy currently provided.
19527    ///
19528    /// # Working with unknown values
19529    ///
19530    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19531    /// additional enum variants at any time. Adding new variants is not considered
19532    /// a breaking change. Applications should write their code in anticipation of:
19533    ///
19534    /// - New values appearing in future releases of the client library, **and**
19535    /// - New values received dynamically, without application changes.
19536    ///
19537    /// Please consult the [Working with enums] section in the user guide for some
19538    /// guidelines.
19539    ///
19540    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19541    #[derive(Clone, Debug, PartialEq)]
19542    #[non_exhaustive]
19543    pub enum GPUSharingStrategy {
19544        /// Default value.
19545        Unspecified,
19546        /// GPUs are time-shared between containers.
19547        TimeSharing,
19548        /// GPUs are shared between containers with NVIDIA MPS.
19549        Mps,
19550        /// If set, the enum was initialized with an unknown value.
19551        ///
19552        /// Applications can examine the value using [GPUSharingStrategy::value] or
19553        /// [GPUSharingStrategy::name].
19554        UnknownValue(gpu_sharing_strategy::UnknownValue),
19555    }
19556
19557    #[doc(hidden)]
19558    pub mod gpu_sharing_strategy {
19559        #[allow(unused_imports)]
19560        use super::*;
19561        #[derive(Clone, Debug, PartialEq)]
19562        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19563    }
19564
19565    impl GPUSharingStrategy {
19566        /// Gets the enum value.
19567        ///
19568        /// Returns `None` if the enum contains an unknown value deserialized from
19569        /// the string representation of enums.
19570        pub fn value(&self) -> std::option::Option<i32> {
19571            match self {
19572                Self::Unspecified => std::option::Option::Some(0),
19573                Self::TimeSharing => std::option::Option::Some(1),
19574                Self::Mps => std::option::Option::Some(2),
19575                Self::UnknownValue(u) => u.0.value(),
19576            }
19577        }
19578
19579        /// Gets the enum value as a string.
19580        ///
19581        /// Returns `None` if the enum contains an unknown value deserialized from
19582        /// the integer representation of enums.
19583        pub fn name(&self) -> std::option::Option<&str> {
19584            match self {
19585                Self::Unspecified => std::option::Option::Some("GPU_SHARING_STRATEGY_UNSPECIFIED"),
19586                Self::TimeSharing => std::option::Option::Some("TIME_SHARING"),
19587                Self::Mps => std::option::Option::Some("MPS"),
19588                Self::UnknownValue(u) => u.0.name(),
19589            }
19590        }
19591    }
19592
19593    impl std::default::Default for GPUSharingStrategy {
19594        fn default() -> Self {
19595            use std::convert::From;
19596            Self::from(0)
19597        }
19598    }
19599
19600    impl std::fmt::Display for GPUSharingStrategy {
19601        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19602            wkt::internal::display_enum(f, self.name(), self.value())
19603        }
19604    }
19605
19606    impl std::convert::From<i32> for GPUSharingStrategy {
19607        fn from(value: i32) -> Self {
19608            match value {
19609                0 => Self::Unspecified,
19610                1 => Self::TimeSharing,
19611                2 => Self::Mps,
19612                _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
19613                    wkt::internal::UnknownEnumValue::Integer(value),
19614                )),
19615            }
19616        }
19617    }
19618
19619    impl std::convert::From<&str> for GPUSharingStrategy {
19620        fn from(value: &str) -> Self {
19621            use std::string::ToString;
19622            match value {
19623                "GPU_SHARING_STRATEGY_UNSPECIFIED" => Self::Unspecified,
19624                "TIME_SHARING" => Self::TimeSharing,
19625                "MPS" => Self::Mps,
19626                _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
19627                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19628                )),
19629            }
19630        }
19631    }
19632
19633    impl serde::ser::Serialize for GPUSharingStrategy {
19634        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19635        where
19636            S: serde::Serializer,
19637        {
19638            match self {
19639                Self::Unspecified => serializer.serialize_i32(0),
19640                Self::TimeSharing => serializer.serialize_i32(1),
19641                Self::Mps => serializer.serialize_i32(2),
19642                Self::UnknownValue(u) => u.0.serialize(serializer),
19643            }
19644        }
19645    }
19646
19647    impl<'de> serde::de::Deserialize<'de> for GPUSharingStrategy {
19648        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19649        where
19650            D: serde::Deserializer<'de>,
19651        {
19652            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUSharingStrategy>::new(
19653                ".google.container.v1.GPUSharingConfig.GPUSharingStrategy",
19654            ))
19655        }
19656    }
19657}
19658
19659/// GPUDriverInstallationConfig specifies the version of GPU driver to be auto
19660/// installed.
19661#[derive(Clone, Default, PartialEq)]
19662#[non_exhaustive]
19663pub struct GPUDriverInstallationConfig {
19664    /// Mode for how the GPU driver is installed.
19665    pub gpu_driver_version:
19666        std::option::Option<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
19667
19668    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19669}
19670
19671impl GPUDriverInstallationConfig {
19672    pub fn new() -> Self {
19673        std::default::Default::default()
19674    }
19675
19676    /// Sets the value of [gpu_driver_version][crate::model::GPUDriverInstallationConfig::gpu_driver_version].
19677    pub fn set_gpu_driver_version<T>(mut self, v: T) -> Self
19678    where
19679        T: std::convert::Into<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
19680    {
19681        self.gpu_driver_version = std::option::Option::Some(v.into());
19682        self
19683    }
19684
19685    /// Sets or clears the value of [gpu_driver_version][crate::model::GPUDriverInstallationConfig::gpu_driver_version].
19686    pub fn set_or_clear_gpu_driver_version<T>(mut self, v: std::option::Option<T>) -> Self
19687    where
19688        T: std::convert::Into<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
19689    {
19690        self.gpu_driver_version = v.map(|x| x.into());
19691        self
19692    }
19693}
19694
19695impl wkt::message::Message for GPUDriverInstallationConfig {
19696    fn typename() -> &'static str {
19697        "type.googleapis.com/google.container.v1.GPUDriverInstallationConfig"
19698    }
19699}
19700
19701/// Defines additional types related to [GPUDriverInstallationConfig].
19702pub mod gpu_driver_installation_config {
19703    #[allow(unused_imports)]
19704    use super::*;
19705
19706    /// The GPU driver version to install.
19707    ///
19708    /// # Working with unknown values
19709    ///
19710    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19711    /// additional enum variants at any time. Adding new variants is not considered
19712    /// a breaking change. Applications should write their code in anticipation of:
19713    ///
19714    /// - New values appearing in future releases of the client library, **and**
19715    /// - New values received dynamically, without application changes.
19716    ///
19717    /// Please consult the [Working with enums] section in the user guide for some
19718    /// guidelines.
19719    ///
19720    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19721    #[derive(Clone, Debug, PartialEq)]
19722    #[non_exhaustive]
19723    pub enum GPUDriverVersion {
19724        /// Default value is to not install any GPU driver.
19725        Unspecified,
19726        /// Disable GPU driver auto installation and needs manual installation
19727        InstallationDisabled,
19728        /// "Default" GPU driver in COS and Ubuntu.
19729        Default,
19730        /// "Latest" GPU driver in COS.
19731        Latest,
19732        /// If set, the enum was initialized with an unknown value.
19733        ///
19734        /// Applications can examine the value using [GPUDriverVersion::value] or
19735        /// [GPUDriverVersion::name].
19736        UnknownValue(gpu_driver_version::UnknownValue),
19737    }
19738
19739    #[doc(hidden)]
19740    pub mod gpu_driver_version {
19741        #[allow(unused_imports)]
19742        use super::*;
19743        #[derive(Clone, Debug, PartialEq)]
19744        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19745    }
19746
19747    impl GPUDriverVersion {
19748        /// Gets the enum value.
19749        ///
19750        /// Returns `None` if the enum contains an unknown value deserialized from
19751        /// the string representation of enums.
19752        pub fn value(&self) -> std::option::Option<i32> {
19753            match self {
19754                Self::Unspecified => std::option::Option::Some(0),
19755                Self::InstallationDisabled => std::option::Option::Some(1),
19756                Self::Default => std::option::Option::Some(2),
19757                Self::Latest => std::option::Option::Some(3),
19758                Self::UnknownValue(u) => u.0.value(),
19759            }
19760        }
19761
19762        /// Gets the enum value as a string.
19763        ///
19764        /// Returns `None` if the enum contains an unknown value deserialized from
19765        /// the integer representation of enums.
19766        pub fn name(&self) -> std::option::Option<&str> {
19767            match self {
19768                Self::Unspecified => std::option::Option::Some("GPU_DRIVER_VERSION_UNSPECIFIED"),
19769                Self::InstallationDisabled => std::option::Option::Some("INSTALLATION_DISABLED"),
19770                Self::Default => std::option::Option::Some("DEFAULT"),
19771                Self::Latest => std::option::Option::Some("LATEST"),
19772                Self::UnknownValue(u) => u.0.name(),
19773            }
19774        }
19775    }
19776
19777    impl std::default::Default for GPUDriverVersion {
19778        fn default() -> Self {
19779            use std::convert::From;
19780            Self::from(0)
19781        }
19782    }
19783
19784    impl std::fmt::Display for GPUDriverVersion {
19785        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19786            wkt::internal::display_enum(f, self.name(), self.value())
19787        }
19788    }
19789
19790    impl std::convert::From<i32> for GPUDriverVersion {
19791        fn from(value: i32) -> Self {
19792            match value {
19793                0 => Self::Unspecified,
19794                1 => Self::InstallationDisabled,
19795                2 => Self::Default,
19796                3 => Self::Latest,
19797                _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
19798                    wkt::internal::UnknownEnumValue::Integer(value),
19799                )),
19800            }
19801        }
19802    }
19803
19804    impl std::convert::From<&str> for GPUDriverVersion {
19805        fn from(value: &str) -> Self {
19806            use std::string::ToString;
19807            match value {
19808                "GPU_DRIVER_VERSION_UNSPECIFIED" => Self::Unspecified,
19809                "INSTALLATION_DISABLED" => Self::InstallationDisabled,
19810                "DEFAULT" => Self::Default,
19811                "LATEST" => Self::Latest,
19812                _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
19813                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19814                )),
19815            }
19816        }
19817    }
19818
19819    impl serde::ser::Serialize for GPUDriverVersion {
19820        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19821        where
19822            S: serde::Serializer,
19823        {
19824            match self {
19825                Self::Unspecified => serializer.serialize_i32(0),
19826                Self::InstallationDisabled => serializer.serialize_i32(1),
19827                Self::Default => serializer.serialize_i32(2),
19828                Self::Latest => serializer.serialize_i32(3),
19829                Self::UnknownValue(u) => u.0.serialize(serializer),
19830            }
19831        }
19832    }
19833
19834    impl<'de> serde::de::Deserialize<'de> for GPUDriverVersion {
19835        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19836        where
19837            D: serde::Deserializer<'de>,
19838        {
19839            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUDriverVersion>::new(
19840                ".google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion",
19841            ))
19842        }
19843    }
19844}
19845
19846/// WorkloadMetadataConfig defines the metadata configuration to expose to
19847/// workloads on the node pool.
19848#[derive(Clone, Default, PartialEq)]
19849#[non_exhaustive]
19850pub struct WorkloadMetadataConfig {
19851    /// Mode is the configuration for how to expose metadata to workloads running
19852    /// on the node pool.
19853    pub mode: crate::model::workload_metadata_config::Mode,
19854
19855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19856}
19857
19858impl WorkloadMetadataConfig {
19859    pub fn new() -> Self {
19860        std::default::Default::default()
19861    }
19862
19863    /// Sets the value of [mode][crate::model::WorkloadMetadataConfig::mode].
19864    pub fn set_mode<T: std::convert::Into<crate::model::workload_metadata_config::Mode>>(
19865        mut self,
19866        v: T,
19867    ) -> Self {
19868        self.mode = v.into();
19869        self
19870    }
19871}
19872
19873impl wkt::message::Message for WorkloadMetadataConfig {
19874    fn typename() -> &'static str {
19875        "type.googleapis.com/google.container.v1.WorkloadMetadataConfig"
19876    }
19877}
19878
19879/// Defines additional types related to [WorkloadMetadataConfig].
19880pub mod workload_metadata_config {
19881    #[allow(unused_imports)]
19882    use super::*;
19883
19884    /// Mode is the configuration for how to expose metadata to workloads running
19885    /// on the node.
19886    ///
19887    /// # Working with unknown values
19888    ///
19889    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19890    /// additional enum variants at any time. Adding new variants is not considered
19891    /// a breaking change. Applications should write their code in anticipation of:
19892    ///
19893    /// - New values appearing in future releases of the client library, **and**
19894    /// - New values received dynamically, without application changes.
19895    ///
19896    /// Please consult the [Working with enums] section in the user guide for some
19897    /// guidelines.
19898    ///
19899    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19900    #[derive(Clone, Debug, PartialEq)]
19901    #[non_exhaustive]
19902    pub enum Mode {
19903        /// Not set.
19904        Unspecified,
19905        /// Expose all Compute Engine metadata to pods.
19906        GceMetadata,
19907        /// Run the GKE Metadata Server on this node. The GKE Metadata Server exposes
19908        /// a metadata API to workloads that is compatible with the V1 Compute
19909        /// Metadata APIs exposed by the Compute Engine and App Engine Metadata
19910        /// Servers. This feature can only be enabled if Workload Identity is enabled
19911        /// at the cluster level.
19912        GkeMetadata,
19913        /// If set, the enum was initialized with an unknown value.
19914        ///
19915        /// Applications can examine the value using [Mode::value] or
19916        /// [Mode::name].
19917        UnknownValue(mode::UnknownValue),
19918    }
19919
19920    #[doc(hidden)]
19921    pub mod mode {
19922        #[allow(unused_imports)]
19923        use super::*;
19924        #[derive(Clone, Debug, PartialEq)]
19925        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19926    }
19927
19928    impl Mode {
19929        /// Gets the enum value.
19930        ///
19931        /// Returns `None` if the enum contains an unknown value deserialized from
19932        /// the string representation of enums.
19933        pub fn value(&self) -> std::option::Option<i32> {
19934            match self {
19935                Self::Unspecified => std::option::Option::Some(0),
19936                Self::GceMetadata => std::option::Option::Some(1),
19937                Self::GkeMetadata => std::option::Option::Some(2),
19938                Self::UnknownValue(u) => u.0.value(),
19939            }
19940        }
19941
19942        /// Gets the enum value as a string.
19943        ///
19944        /// Returns `None` if the enum contains an unknown value deserialized from
19945        /// the integer representation of enums.
19946        pub fn name(&self) -> std::option::Option<&str> {
19947            match self {
19948                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
19949                Self::GceMetadata => std::option::Option::Some("GCE_METADATA"),
19950                Self::GkeMetadata => std::option::Option::Some("GKE_METADATA"),
19951                Self::UnknownValue(u) => u.0.name(),
19952            }
19953        }
19954    }
19955
19956    impl std::default::Default for Mode {
19957        fn default() -> Self {
19958            use std::convert::From;
19959            Self::from(0)
19960        }
19961    }
19962
19963    impl std::fmt::Display for Mode {
19964        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19965            wkt::internal::display_enum(f, self.name(), self.value())
19966        }
19967    }
19968
19969    impl std::convert::From<i32> for Mode {
19970        fn from(value: i32) -> Self {
19971            match value {
19972                0 => Self::Unspecified,
19973                1 => Self::GceMetadata,
19974                2 => Self::GkeMetadata,
19975                _ => Self::UnknownValue(mode::UnknownValue(
19976                    wkt::internal::UnknownEnumValue::Integer(value),
19977                )),
19978            }
19979        }
19980    }
19981
19982    impl std::convert::From<&str> for Mode {
19983        fn from(value: &str) -> Self {
19984            use std::string::ToString;
19985            match value {
19986                "MODE_UNSPECIFIED" => Self::Unspecified,
19987                "GCE_METADATA" => Self::GceMetadata,
19988                "GKE_METADATA" => Self::GkeMetadata,
19989                _ => Self::UnknownValue(mode::UnknownValue(
19990                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19991                )),
19992            }
19993        }
19994    }
19995
19996    impl serde::ser::Serialize for Mode {
19997        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19998        where
19999            S: serde::Serializer,
20000        {
20001            match self {
20002                Self::Unspecified => serializer.serialize_i32(0),
20003                Self::GceMetadata => serializer.serialize_i32(1),
20004                Self::GkeMetadata => serializer.serialize_i32(2),
20005                Self::UnknownValue(u) => u.0.serialize(serializer),
20006            }
20007        }
20008    }
20009
20010    impl<'de> serde::de::Deserialize<'de> for Mode {
20011        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20012        where
20013            D: serde::Deserializer<'de>,
20014        {
20015            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
20016                ".google.container.v1.WorkloadMetadataConfig.Mode",
20017            ))
20018        }
20019    }
20020}
20021
20022/// SetNetworkPolicyRequest enables/disables network policy for a cluster.
20023#[derive(Clone, Default, PartialEq)]
20024#[non_exhaustive]
20025pub struct SetNetworkPolicyRequest {
20026    /// Deprecated. The Google Developers Console [project ID or project
20027    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
20028    /// This field has been deprecated and replaced by the name field.
20029    #[deprecated]
20030    pub project_id: std::string::String,
20031
20032    /// Deprecated. The name of the Google Compute Engine
20033    /// [zone](https://cloud.google.com/compute/docs/zones#available)
20034    /// in which the cluster resides. This field has been deprecated and replaced
20035    /// by the name field.
20036    #[deprecated]
20037    pub zone: std::string::String,
20038
20039    /// Deprecated. The name of the cluster.
20040    /// This field has been deprecated and replaced by the name field.
20041    #[deprecated]
20042    pub cluster_id: std::string::String,
20043
20044    /// Required. Configuration options for the NetworkPolicy feature.
20045    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
20046
20047    /// The name (project, location, cluster name) of the cluster to set networking
20048    /// policy. Specified in the format `projects/*/locations/*/clusters/*`.
20049    pub name: std::string::String,
20050
20051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20052}
20053
20054impl SetNetworkPolicyRequest {
20055    pub fn new() -> Self {
20056        std::default::Default::default()
20057    }
20058
20059    /// Sets the value of [project_id][crate::model::SetNetworkPolicyRequest::project_id].
20060    #[deprecated]
20061    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20062        self.project_id = v.into();
20063        self
20064    }
20065
20066    /// Sets the value of [zone][crate::model::SetNetworkPolicyRequest::zone].
20067    #[deprecated]
20068    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20069        self.zone = v.into();
20070        self
20071    }
20072
20073    /// Sets the value of [cluster_id][crate::model::SetNetworkPolicyRequest::cluster_id].
20074    #[deprecated]
20075    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20076        self.cluster_id = v.into();
20077        self
20078    }
20079
20080    /// Sets the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
20081    pub fn set_network_policy<T>(mut self, v: T) -> Self
20082    where
20083        T: std::convert::Into<crate::model::NetworkPolicy>,
20084    {
20085        self.network_policy = std::option::Option::Some(v.into());
20086        self
20087    }
20088
20089    /// Sets or clears the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
20090    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
20091    where
20092        T: std::convert::Into<crate::model::NetworkPolicy>,
20093    {
20094        self.network_policy = v.map(|x| x.into());
20095        self
20096    }
20097
20098    /// Sets the value of [name][crate::model::SetNetworkPolicyRequest::name].
20099    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20100        self.name = v.into();
20101        self
20102    }
20103}
20104
20105impl wkt::message::Message for SetNetworkPolicyRequest {
20106    fn typename() -> &'static str {
20107        "type.googleapis.com/google.container.v1.SetNetworkPolicyRequest"
20108    }
20109}
20110
20111/// SetMaintenancePolicyRequest sets the maintenance policy for a cluster.
20112#[derive(Clone, Default, PartialEq)]
20113#[non_exhaustive]
20114pub struct SetMaintenancePolicyRequest {
20115    /// Required. The Google Developers Console [project ID or project
20116    /// number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
20117    pub project_id: std::string::String,
20118
20119    /// Required. The name of the Google Compute Engine
20120    /// [zone](https://cloud.google.com/compute/docs/zones#available)
20121    /// in which the cluster resides.
20122    pub zone: std::string::String,
20123
20124    /// Required. The name of the cluster to update.
20125    pub cluster_id: std::string::String,
20126
20127    /// Required. The maintenance policy to be set for the cluster. An empty field
20128    /// clears the existing maintenance policy.
20129    pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
20130
20131    /// The name (project, location, cluster name) of the cluster to set
20132    /// maintenance policy.
20133    /// Specified in the format `projects/*/locations/*/clusters/*`.
20134    pub name: std::string::String,
20135
20136    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20137}
20138
20139impl SetMaintenancePolicyRequest {
20140    pub fn new() -> Self {
20141        std::default::Default::default()
20142    }
20143
20144    /// Sets the value of [project_id][crate::model::SetMaintenancePolicyRequest::project_id].
20145    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20146        self.project_id = v.into();
20147        self
20148    }
20149
20150    /// Sets the value of [zone][crate::model::SetMaintenancePolicyRequest::zone].
20151    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20152        self.zone = v.into();
20153        self
20154    }
20155
20156    /// Sets the value of [cluster_id][crate::model::SetMaintenancePolicyRequest::cluster_id].
20157    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20158        self.cluster_id = v.into();
20159        self
20160    }
20161
20162    /// Sets the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
20163    pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
20164    where
20165        T: std::convert::Into<crate::model::MaintenancePolicy>,
20166    {
20167        self.maintenance_policy = std::option::Option::Some(v.into());
20168        self
20169    }
20170
20171    /// Sets or clears the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
20172    pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
20173    where
20174        T: std::convert::Into<crate::model::MaintenancePolicy>,
20175    {
20176        self.maintenance_policy = v.map(|x| x.into());
20177        self
20178    }
20179
20180    /// Sets the value of [name][crate::model::SetMaintenancePolicyRequest::name].
20181    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20182        self.name = v.into();
20183        self
20184    }
20185}
20186
20187impl wkt::message::Message for SetMaintenancePolicyRequest {
20188    fn typename() -> &'static str {
20189        "type.googleapis.com/google.container.v1.SetMaintenancePolicyRequest"
20190    }
20191}
20192
20193/// StatusCondition describes why a cluster or a node pool has a certain status
20194/// (e.g., ERROR or DEGRADED).
20195#[derive(Clone, Default, PartialEq)]
20196#[non_exhaustive]
20197pub struct StatusCondition {
20198    /// Machine-friendly representation of the condition
20199    /// Deprecated. Use canonical_code instead.
20200    #[deprecated]
20201    pub code: crate::model::status_condition::Code,
20202
20203    /// Human-friendly representation of the condition
20204    pub message: std::string::String,
20205
20206    /// Canonical code of the condition.
20207    pub canonical_code: rpc::model::Code,
20208
20209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20210}
20211
20212impl StatusCondition {
20213    pub fn new() -> Self {
20214        std::default::Default::default()
20215    }
20216
20217    /// Sets the value of [code][crate::model::StatusCondition::code].
20218    #[deprecated]
20219    pub fn set_code<T: std::convert::Into<crate::model::status_condition::Code>>(
20220        mut self,
20221        v: T,
20222    ) -> Self {
20223        self.code = v.into();
20224        self
20225    }
20226
20227    /// Sets the value of [message][crate::model::StatusCondition::message].
20228    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20229        self.message = v.into();
20230        self
20231    }
20232
20233    /// Sets the value of [canonical_code][crate::model::StatusCondition::canonical_code].
20234    pub fn set_canonical_code<T: std::convert::Into<rpc::model::Code>>(mut self, v: T) -> Self {
20235        self.canonical_code = v.into();
20236        self
20237    }
20238}
20239
20240impl wkt::message::Message for StatusCondition {
20241    fn typename() -> &'static str {
20242        "type.googleapis.com/google.container.v1.StatusCondition"
20243    }
20244}
20245
20246/// Defines additional types related to [StatusCondition].
20247pub mod status_condition {
20248    #[allow(unused_imports)]
20249    use super::*;
20250
20251    /// Code for each condition
20252    ///
20253    /// # Working with unknown values
20254    ///
20255    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20256    /// additional enum variants at any time. Adding new variants is not considered
20257    /// a breaking change. Applications should write their code in anticipation of:
20258    ///
20259    /// - New values appearing in future releases of the client library, **and**
20260    /// - New values received dynamically, without application changes.
20261    ///
20262    /// Please consult the [Working with enums] section in the user guide for some
20263    /// guidelines.
20264    ///
20265    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20266    #[derive(Clone, Debug, PartialEq)]
20267    #[non_exhaustive]
20268    pub enum Code {
20269        /// UNKNOWN indicates a generic condition.
20270        Unknown,
20271        /// GCE_STOCKOUT indicates that Google Compute Engine resources are
20272        /// temporarily unavailable.
20273        GceStockout,
20274        /// GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot
20275        /// service account.
20276        GkeServiceAccountDeleted,
20277        /// Google Compute Engine quota was exceeded.
20278        GceQuotaExceeded,
20279        /// Cluster state was manually changed by an SRE due to a system logic error.
20280        SetByOperator,
20281        /// Unable to perform an encrypt operation against the CloudKMS key used for
20282        /// etcd level encryption.
20283        CloudKmsKeyError,
20284        /// Cluster CA is expiring soon.
20285        CaExpiring,
20286        /// Node service account is missing permissions.
20287        NodeServiceAccountMissingPermissions,
20288        /// Cloud KMS key version used for etcd level encryption has been destroyed.
20289        /// This is a permanent error.
20290        CloudKmsKeyDestroyed,
20291        /// If set, the enum was initialized with an unknown value.
20292        ///
20293        /// Applications can examine the value using [Code::value] or
20294        /// [Code::name].
20295        UnknownValue(code::UnknownValue),
20296    }
20297
20298    #[doc(hidden)]
20299    pub mod code {
20300        #[allow(unused_imports)]
20301        use super::*;
20302        #[derive(Clone, Debug, PartialEq)]
20303        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20304    }
20305
20306    impl Code {
20307        /// Gets the enum value.
20308        ///
20309        /// Returns `None` if the enum contains an unknown value deserialized from
20310        /// the string representation of enums.
20311        pub fn value(&self) -> std::option::Option<i32> {
20312            match self {
20313                Self::Unknown => std::option::Option::Some(0),
20314                Self::GceStockout => std::option::Option::Some(1),
20315                Self::GkeServiceAccountDeleted => std::option::Option::Some(2),
20316                Self::GceQuotaExceeded => std::option::Option::Some(3),
20317                Self::SetByOperator => std::option::Option::Some(4),
20318                Self::CloudKmsKeyError => std::option::Option::Some(7),
20319                Self::CaExpiring => std::option::Option::Some(9),
20320                Self::NodeServiceAccountMissingPermissions => std::option::Option::Some(10),
20321                Self::CloudKmsKeyDestroyed => std::option::Option::Some(11),
20322                Self::UnknownValue(u) => u.0.value(),
20323            }
20324        }
20325
20326        /// Gets the enum value as a string.
20327        ///
20328        /// Returns `None` if the enum contains an unknown value deserialized from
20329        /// the integer representation of enums.
20330        pub fn name(&self) -> std::option::Option<&str> {
20331            match self {
20332                Self::Unknown => std::option::Option::Some("UNKNOWN"),
20333                Self::GceStockout => std::option::Option::Some("GCE_STOCKOUT"),
20334                Self::GkeServiceAccountDeleted => {
20335                    std::option::Option::Some("GKE_SERVICE_ACCOUNT_DELETED")
20336                }
20337                Self::GceQuotaExceeded => std::option::Option::Some("GCE_QUOTA_EXCEEDED"),
20338                Self::SetByOperator => std::option::Option::Some("SET_BY_OPERATOR"),
20339                Self::CloudKmsKeyError => std::option::Option::Some("CLOUD_KMS_KEY_ERROR"),
20340                Self::CaExpiring => std::option::Option::Some("CA_EXPIRING"),
20341                Self::NodeServiceAccountMissingPermissions => {
20342                    std::option::Option::Some("NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS")
20343                }
20344                Self::CloudKmsKeyDestroyed => std::option::Option::Some("CLOUD_KMS_KEY_DESTROYED"),
20345                Self::UnknownValue(u) => u.0.name(),
20346            }
20347        }
20348    }
20349
20350    impl std::default::Default for Code {
20351        fn default() -> Self {
20352            use std::convert::From;
20353            Self::from(0)
20354        }
20355    }
20356
20357    impl std::fmt::Display for Code {
20358        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20359            wkt::internal::display_enum(f, self.name(), self.value())
20360        }
20361    }
20362
20363    impl std::convert::From<i32> for Code {
20364        fn from(value: i32) -> Self {
20365            match value {
20366                0 => Self::Unknown,
20367                1 => Self::GceStockout,
20368                2 => Self::GkeServiceAccountDeleted,
20369                3 => Self::GceQuotaExceeded,
20370                4 => Self::SetByOperator,
20371                7 => Self::CloudKmsKeyError,
20372                9 => Self::CaExpiring,
20373                10 => Self::NodeServiceAccountMissingPermissions,
20374                11 => Self::CloudKmsKeyDestroyed,
20375                _ => Self::UnknownValue(code::UnknownValue(
20376                    wkt::internal::UnknownEnumValue::Integer(value),
20377                )),
20378            }
20379        }
20380    }
20381
20382    impl std::convert::From<&str> for Code {
20383        fn from(value: &str) -> Self {
20384            use std::string::ToString;
20385            match value {
20386                "UNKNOWN" => Self::Unknown,
20387                "GCE_STOCKOUT" => Self::GceStockout,
20388                "GKE_SERVICE_ACCOUNT_DELETED" => Self::GkeServiceAccountDeleted,
20389                "GCE_QUOTA_EXCEEDED" => Self::GceQuotaExceeded,
20390                "SET_BY_OPERATOR" => Self::SetByOperator,
20391                "CLOUD_KMS_KEY_ERROR" => Self::CloudKmsKeyError,
20392                "CA_EXPIRING" => Self::CaExpiring,
20393                "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS" => {
20394                    Self::NodeServiceAccountMissingPermissions
20395                }
20396                "CLOUD_KMS_KEY_DESTROYED" => Self::CloudKmsKeyDestroyed,
20397                _ => Self::UnknownValue(code::UnknownValue(
20398                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20399                )),
20400            }
20401        }
20402    }
20403
20404    impl serde::ser::Serialize for Code {
20405        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20406        where
20407            S: serde::Serializer,
20408        {
20409            match self {
20410                Self::Unknown => serializer.serialize_i32(0),
20411                Self::GceStockout => serializer.serialize_i32(1),
20412                Self::GkeServiceAccountDeleted => serializer.serialize_i32(2),
20413                Self::GceQuotaExceeded => serializer.serialize_i32(3),
20414                Self::SetByOperator => serializer.serialize_i32(4),
20415                Self::CloudKmsKeyError => serializer.serialize_i32(7),
20416                Self::CaExpiring => serializer.serialize_i32(9),
20417                Self::NodeServiceAccountMissingPermissions => serializer.serialize_i32(10),
20418                Self::CloudKmsKeyDestroyed => serializer.serialize_i32(11),
20419                Self::UnknownValue(u) => u.0.serialize(serializer),
20420            }
20421        }
20422    }
20423
20424    impl<'de> serde::de::Deserialize<'de> for Code {
20425        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20426        where
20427            D: serde::Deserializer<'de>,
20428        {
20429            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Code>::new(
20430                ".google.container.v1.StatusCondition.Code",
20431            ))
20432        }
20433    }
20434}
20435
20436/// NetworkConfig reports the relative names of network & subnetwork.
20437#[derive(Clone, Default, PartialEq)]
20438#[non_exhaustive]
20439pub struct NetworkConfig {
20440    /// Output only. The relative name of the Google Compute Engine
20441    /// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
20442    /// to which the cluster is connected. Example:
20443    /// projects/my-project/global/networks/my-network
20444    pub network: std::string::String,
20445
20446    /// Output only. The relative name of the Google Compute Engine
20447    /// [subnetwork](https://cloud.google.com/compute/docs/vpc)
20448    /// to which the cluster is connected. Example:
20449    /// projects/my-project/regions/us-central1/subnetworks/my-subnet
20450    pub subnetwork: std::string::String,
20451
20452    /// Whether Intra-node visibility is enabled for this cluster.
20453    /// This makes same node pod to pod traffic visible for VPC network.
20454    pub enable_intra_node_visibility: bool,
20455
20456    /// Whether the cluster disables default in-node sNAT rules. In-node sNAT rules
20457    /// will be disabled when default_snat_status is disabled. When disabled is set
20458    /// to false, default IP masquerade rules will be applied to the nodes to
20459    /// prevent sNAT on cluster internal traffic.
20460    pub default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
20461
20462    /// Whether L4ILB Subsetting is enabled for this cluster.
20463    pub enable_l4ilb_subsetting: bool,
20464
20465    /// The desired datapath provider for this cluster. By default, uses the
20466    /// IPTables-based kube-proxy implementation.
20467    pub datapath_provider: crate::model::DatapathProvider,
20468
20469    /// The desired state of IPv6 connectivity to Google Services.
20470    /// By default, no private IPv6 access to or from Google Services (all access
20471    /// will be via IPv4)
20472    pub private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
20473
20474    /// DNSConfig contains clusterDNS config for this cluster.
20475    pub dns_config: std::option::Option<crate::model::DNSConfig>,
20476
20477    /// ServiceExternalIPsConfig specifies if services with externalIPs field are
20478    /// blocked or not.
20479    pub service_external_ips_config: std::option::Option<crate::model::ServiceExternalIPsConfig>,
20480
20481    /// GatewayAPIConfig contains the desired config of Gateway API on this
20482    /// cluster.
20483    pub gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
20484
20485    /// Whether multi-networking is enabled for this cluster.
20486    pub enable_multi_networking: bool,
20487
20488    /// Network bandwidth tier configuration.
20489    pub network_performance_config:
20490        std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
20491
20492    /// Whether FQDN Network Policy is enabled on this cluster.
20493    pub enable_fqdn_network_policy: std::option::Option<bool>,
20494
20495    /// Specify the details of in-transit encryption.
20496    /// Now named inter-node transparent encryption.
20497    pub in_transit_encryption_config: std::option::Option<crate::model::InTransitEncryptionConfig>,
20498
20499    /// Whether CiliumClusterwideNetworkPolicy is enabled on this cluster.
20500    pub enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
20501
20502    /// Controls whether by default nodes have private IP addresses only.
20503    /// It is invalid to specify both [PrivateClusterConfig.enablePrivateNodes][]
20504    /// and this field at the same time.
20505    /// To update the default setting, use
20506    /// [ClusterUpdate.desired_default_enable_private_nodes][google.container.v1.ClusterUpdate.desired_default_enable_private_nodes]
20507    ///
20508    /// [google.container.v1.ClusterUpdate.desired_default_enable_private_nodes]: crate::model::ClusterUpdate::desired_default_enable_private_nodes
20509    pub default_enable_private_nodes: std::option::Option<bool>,
20510
20511    /// Disable L4 load balancer VPC firewalls to enable firewall policies.
20512    pub disable_l4_lb_firewall_reconciliation: std::option::Option<bool>,
20513
20514    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20515}
20516
20517impl NetworkConfig {
20518    pub fn new() -> Self {
20519        std::default::Default::default()
20520    }
20521
20522    /// Sets the value of [network][crate::model::NetworkConfig::network].
20523    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20524        self.network = v.into();
20525        self
20526    }
20527
20528    /// Sets the value of [subnetwork][crate::model::NetworkConfig::subnetwork].
20529    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20530        self.subnetwork = v.into();
20531        self
20532    }
20533
20534    /// Sets the value of [enable_intra_node_visibility][crate::model::NetworkConfig::enable_intra_node_visibility].
20535    pub fn set_enable_intra_node_visibility<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20536        self.enable_intra_node_visibility = v.into();
20537        self
20538    }
20539
20540    /// Sets the value of [default_snat_status][crate::model::NetworkConfig::default_snat_status].
20541    pub fn set_default_snat_status<T>(mut self, v: T) -> Self
20542    where
20543        T: std::convert::Into<crate::model::DefaultSnatStatus>,
20544    {
20545        self.default_snat_status = std::option::Option::Some(v.into());
20546        self
20547    }
20548
20549    /// Sets or clears the value of [default_snat_status][crate::model::NetworkConfig::default_snat_status].
20550    pub fn set_or_clear_default_snat_status<T>(mut self, v: std::option::Option<T>) -> Self
20551    where
20552        T: std::convert::Into<crate::model::DefaultSnatStatus>,
20553    {
20554        self.default_snat_status = v.map(|x| x.into());
20555        self
20556    }
20557
20558    /// Sets the value of [enable_l4ilb_subsetting][crate::model::NetworkConfig::enable_l4ilb_subsetting].
20559    pub fn set_enable_l4ilb_subsetting<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20560        self.enable_l4ilb_subsetting = v.into();
20561        self
20562    }
20563
20564    /// Sets the value of [datapath_provider][crate::model::NetworkConfig::datapath_provider].
20565    pub fn set_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
20566        mut self,
20567        v: T,
20568    ) -> Self {
20569        self.datapath_provider = v.into();
20570        self
20571    }
20572
20573    /// Sets the value of [private_ipv6_google_access][crate::model::NetworkConfig::private_ipv6_google_access].
20574    pub fn set_private_ipv6_google_access<
20575        T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
20576    >(
20577        mut self,
20578        v: T,
20579    ) -> Self {
20580        self.private_ipv6_google_access = v.into();
20581        self
20582    }
20583
20584    /// Sets the value of [dns_config][crate::model::NetworkConfig::dns_config].
20585    pub fn set_dns_config<T>(mut self, v: T) -> Self
20586    where
20587        T: std::convert::Into<crate::model::DNSConfig>,
20588    {
20589        self.dns_config = std::option::Option::Some(v.into());
20590        self
20591    }
20592
20593    /// Sets or clears the value of [dns_config][crate::model::NetworkConfig::dns_config].
20594    pub fn set_or_clear_dns_config<T>(mut self, v: std::option::Option<T>) -> Self
20595    where
20596        T: std::convert::Into<crate::model::DNSConfig>,
20597    {
20598        self.dns_config = v.map(|x| x.into());
20599        self
20600    }
20601
20602    /// Sets the value of [service_external_ips_config][crate::model::NetworkConfig::service_external_ips_config].
20603    pub fn set_service_external_ips_config<T>(mut self, v: T) -> Self
20604    where
20605        T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
20606    {
20607        self.service_external_ips_config = std::option::Option::Some(v.into());
20608        self
20609    }
20610
20611    /// Sets or clears the value of [service_external_ips_config][crate::model::NetworkConfig::service_external_ips_config].
20612    pub fn set_or_clear_service_external_ips_config<T>(mut self, v: std::option::Option<T>) -> Self
20613    where
20614        T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
20615    {
20616        self.service_external_ips_config = v.map(|x| x.into());
20617        self
20618    }
20619
20620    /// Sets the value of [gateway_api_config][crate::model::NetworkConfig::gateway_api_config].
20621    pub fn set_gateway_api_config<T>(mut self, v: T) -> Self
20622    where
20623        T: std::convert::Into<crate::model::GatewayAPIConfig>,
20624    {
20625        self.gateway_api_config = std::option::Option::Some(v.into());
20626        self
20627    }
20628
20629    /// Sets or clears the value of [gateway_api_config][crate::model::NetworkConfig::gateway_api_config].
20630    pub fn set_or_clear_gateway_api_config<T>(mut self, v: std::option::Option<T>) -> Self
20631    where
20632        T: std::convert::Into<crate::model::GatewayAPIConfig>,
20633    {
20634        self.gateway_api_config = v.map(|x| x.into());
20635        self
20636    }
20637
20638    /// Sets the value of [enable_multi_networking][crate::model::NetworkConfig::enable_multi_networking].
20639    pub fn set_enable_multi_networking<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20640        self.enable_multi_networking = v.into();
20641        self
20642    }
20643
20644    /// Sets the value of [network_performance_config][crate::model::NetworkConfig::network_performance_config].
20645    pub fn set_network_performance_config<T>(mut self, v: T) -> Self
20646    where
20647        T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
20648    {
20649        self.network_performance_config = std::option::Option::Some(v.into());
20650        self
20651    }
20652
20653    /// Sets or clears the value of [network_performance_config][crate::model::NetworkConfig::network_performance_config].
20654    pub fn set_or_clear_network_performance_config<T>(mut self, v: std::option::Option<T>) -> Self
20655    where
20656        T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
20657    {
20658        self.network_performance_config = v.map(|x| x.into());
20659        self
20660    }
20661
20662    /// Sets the value of [enable_fqdn_network_policy][crate::model::NetworkConfig::enable_fqdn_network_policy].
20663    pub fn set_enable_fqdn_network_policy<T>(mut self, v: T) -> Self
20664    where
20665        T: std::convert::Into<bool>,
20666    {
20667        self.enable_fqdn_network_policy = std::option::Option::Some(v.into());
20668        self
20669    }
20670
20671    /// Sets or clears the value of [enable_fqdn_network_policy][crate::model::NetworkConfig::enable_fqdn_network_policy].
20672    pub fn set_or_clear_enable_fqdn_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
20673    where
20674        T: std::convert::Into<bool>,
20675    {
20676        self.enable_fqdn_network_policy = v.map(|x| x.into());
20677        self
20678    }
20679
20680    /// Sets the value of [in_transit_encryption_config][crate::model::NetworkConfig::in_transit_encryption_config].
20681    pub fn set_in_transit_encryption_config<T>(mut self, v: T) -> Self
20682    where
20683        T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
20684    {
20685        self.in_transit_encryption_config = std::option::Option::Some(v.into());
20686        self
20687    }
20688
20689    /// Sets or clears the value of [in_transit_encryption_config][crate::model::NetworkConfig::in_transit_encryption_config].
20690    pub fn set_or_clear_in_transit_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
20691    where
20692        T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
20693    {
20694        self.in_transit_encryption_config = v.map(|x| x.into());
20695        self
20696    }
20697
20698    /// Sets the value of [enable_cilium_clusterwide_network_policy][crate::model::NetworkConfig::enable_cilium_clusterwide_network_policy].
20699    pub fn set_enable_cilium_clusterwide_network_policy<T>(mut self, v: T) -> Self
20700    where
20701        T: std::convert::Into<bool>,
20702    {
20703        self.enable_cilium_clusterwide_network_policy = std::option::Option::Some(v.into());
20704        self
20705    }
20706
20707    /// Sets or clears the value of [enable_cilium_clusterwide_network_policy][crate::model::NetworkConfig::enable_cilium_clusterwide_network_policy].
20708    pub fn set_or_clear_enable_cilium_clusterwide_network_policy<T>(
20709        mut self,
20710        v: std::option::Option<T>,
20711    ) -> Self
20712    where
20713        T: std::convert::Into<bool>,
20714    {
20715        self.enable_cilium_clusterwide_network_policy = v.map(|x| x.into());
20716        self
20717    }
20718
20719    /// Sets the value of [default_enable_private_nodes][crate::model::NetworkConfig::default_enable_private_nodes].
20720    pub fn set_default_enable_private_nodes<T>(mut self, v: T) -> Self
20721    where
20722        T: std::convert::Into<bool>,
20723    {
20724        self.default_enable_private_nodes = std::option::Option::Some(v.into());
20725        self
20726    }
20727
20728    /// Sets or clears the value of [default_enable_private_nodes][crate::model::NetworkConfig::default_enable_private_nodes].
20729    pub fn set_or_clear_default_enable_private_nodes<T>(mut self, v: std::option::Option<T>) -> Self
20730    where
20731        T: std::convert::Into<bool>,
20732    {
20733        self.default_enable_private_nodes = v.map(|x| x.into());
20734        self
20735    }
20736
20737    /// Sets the value of [disable_l4_lb_firewall_reconciliation][crate::model::NetworkConfig::disable_l4_lb_firewall_reconciliation].
20738    pub fn set_disable_l4_lb_firewall_reconciliation<T>(mut self, v: T) -> Self
20739    where
20740        T: std::convert::Into<bool>,
20741    {
20742        self.disable_l4_lb_firewall_reconciliation = std::option::Option::Some(v.into());
20743        self
20744    }
20745
20746    /// Sets or clears the value of [disable_l4_lb_firewall_reconciliation][crate::model::NetworkConfig::disable_l4_lb_firewall_reconciliation].
20747    pub fn set_or_clear_disable_l4_lb_firewall_reconciliation<T>(
20748        mut self,
20749        v: std::option::Option<T>,
20750    ) -> Self
20751    where
20752        T: std::convert::Into<bool>,
20753    {
20754        self.disable_l4_lb_firewall_reconciliation = v.map(|x| x.into());
20755        self
20756    }
20757}
20758
20759impl wkt::message::Message for NetworkConfig {
20760    fn typename() -> &'static str {
20761        "type.googleapis.com/google.container.v1.NetworkConfig"
20762    }
20763}
20764
20765/// Defines additional types related to [NetworkConfig].
20766pub mod network_config {
20767    #[allow(unused_imports)]
20768    use super::*;
20769
20770    /// Configuration of network bandwidth tiers
20771    #[derive(Clone, Default, PartialEq)]
20772    #[non_exhaustive]
20773    pub struct ClusterNetworkPerformanceConfig {
20774        /// Specifies the total network bandwidth tier for NodePools in the cluster.
20775        pub total_egress_bandwidth_tier: std::option::Option<
20776            crate::model::network_config::cluster_network_performance_config::Tier,
20777        >,
20778
20779        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20780    }
20781
20782    impl ClusterNetworkPerformanceConfig {
20783        pub fn new() -> Self {
20784            std::default::Default::default()
20785        }
20786
20787        /// Sets the value of [total_egress_bandwidth_tier][crate::model::network_config::ClusterNetworkPerformanceConfig::total_egress_bandwidth_tier].
20788        pub fn set_total_egress_bandwidth_tier<T>(mut self, v: T) -> Self
20789        where
20790            T: std::convert::Into<
20791                    crate::model::network_config::cluster_network_performance_config::Tier,
20792                >,
20793        {
20794            self.total_egress_bandwidth_tier = std::option::Option::Some(v.into());
20795            self
20796        }
20797
20798        /// Sets or clears the value of [total_egress_bandwidth_tier][crate::model::network_config::ClusterNetworkPerformanceConfig::total_egress_bandwidth_tier].
20799        pub fn set_or_clear_total_egress_bandwidth_tier<T>(
20800            mut self,
20801            v: std::option::Option<T>,
20802        ) -> Self
20803        where
20804            T: std::convert::Into<
20805                    crate::model::network_config::cluster_network_performance_config::Tier,
20806                >,
20807        {
20808            self.total_egress_bandwidth_tier = v.map(|x| x.into());
20809            self
20810        }
20811    }
20812
20813    impl wkt::message::Message for ClusterNetworkPerformanceConfig {
20814        fn typename() -> &'static str {
20815            "type.googleapis.com/google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig"
20816        }
20817    }
20818
20819    /// Defines additional types related to [ClusterNetworkPerformanceConfig].
20820    pub mod cluster_network_performance_config {
20821        #[allow(unused_imports)]
20822        use super::*;
20823
20824        /// Node network tier
20825        ///
20826        /// # Working with unknown values
20827        ///
20828        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20829        /// additional enum variants at any time. Adding new variants is not considered
20830        /// a breaking change. Applications should write their code in anticipation of:
20831        ///
20832        /// - New values appearing in future releases of the client library, **and**
20833        /// - New values received dynamically, without application changes.
20834        ///
20835        /// Please consult the [Working with enums] section in the user guide for some
20836        /// guidelines.
20837        ///
20838        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20839        #[derive(Clone, Debug, PartialEq)]
20840        #[non_exhaustive]
20841        pub enum Tier {
20842            /// Default value
20843            Unspecified,
20844            /// Higher bandwidth, actual values based on VM size.
20845            Tier1,
20846            /// If set, the enum was initialized with an unknown value.
20847            ///
20848            /// Applications can examine the value using [Tier::value] or
20849            /// [Tier::name].
20850            UnknownValue(tier::UnknownValue),
20851        }
20852
20853        #[doc(hidden)]
20854        pub mod tier {
20855            #[allow(unused_imports)]
20856            use super::*;
20857            #[derive(Clone, Debug, PartialEq)]
20858            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20859        }
20860
20861        impl Tier {
20862            /// Gets the enum value.
20863            ///
20864            /// Returns `None` if the enum contains an unknown value deserialized from
20865            /// the string representation of enums.
20866            pub fn value(&self) -> std::option::Option<i32> {
20867                match self {
20868                    Self::Unspecified => std::option::Option::Some(0),
20869                    Self::Tier1 => std::option::Option::Some(1),
20870                    Self::UnknownValue(u) => u.0.value(),
20871                }
20872            }
20873
20874            /// Gets the enum value as a string.
20875            ///
20876            /// Returns `None` if the enum contains an unknown value deserialized from
20877            /// the integer representation of enums.
20878            pub fn name(&self) -> std::option::Option<&str> {
20879                match self {
20880                    Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
20881                    Self::Tier1 => std::option::Option::Some("TIER_1"),
20882                    Self::UnknownValue(u) => u.0.name(),
20883                }
20884            }
20885        }
20886
20887        impl std::default::Default for Tier {
20888            fn default() -> Self {
20889                use std::convert::From;
20890                Self::from(0)
20891            }
20892        }
20893
20894        impl std::fmt::Display for Tier {
20895            fn fmt(
20896                &self,
20897                f: &mut std::fmt::Formatter<'_>,
20898            ) -> std::result::Result<(), std::fmt::Error> {
20899                wkt::internal::display_enum(f, self.name(), self.value())
20900            }
20901        }
20902
20903        impl std::convert::From<i32> for Tier {
20904            fn from(value: i32) -> Self {
20905                match value {
20906                    0 => Self::Unspecified,
20907                    1 => Self::Tier1,
20908                    _ => Self::UnknownValue(tier::UnknownValue(
20909                        wkt::internal::UnknownEnumValue::Integer(value),
20910                    )),
20911                }
20912            }
20913        }
20914
20915        impl std::convert::From<&str> for Tier {
20916            fn from(value: &str) -> Self {
20917                use std::string::ToString;
20918                match value {
20919                    "TIER_UNSPECIFIED" => Self::Unspecified,
20920                    "TIER_1" => Self::Tier1,
20921                    _ => Self::UnknownValue(tier::UnknownValue(
20922                        wkt::internal::UnknownEnumValue::String(value.to_string()),
20923                    )),
20924                }
20925            }
20926        }
20927
20928        impl serde::ser::Serialize for Tier {
20929            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20930            where
20931                S: serde::Serializer,
20932            {
20933                match self {
20934                    Self::Unspecified => serializer.serialize_i32(0),
20935                    Self::Tier1 => serializer.serialize_i32(1),
20936                    Self::UnknownValue(u) => u.0.serialize(serializer),
20937                }
20938            }
20939        }
20940
20941        impl<'de> serde::de::Deserialize<'de> for Tier {
20942            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20943            where
20944                D: serde::Deserializer<'de>,
20945            {
20946                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
20947                    ".google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier",
20948                ))
20949            }
20950        }
20951    }
20952}
20953
20954/// GatewayAPIConfig contains the desired config of Gateway API on this cluster.
20955#[derive(Clone, Default, PartialEq)]
20956#[non_exhaustive]
20957pub struct GatewayAPIConfig {
20958    /// The Gateway API release channel to use for Gateway API.
20959    pub channel: crate::model::gateway_api_config::Channel,
20960
20961    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20962}
20963
20964impl GatewayAPIConfig {
20965    pub fn new() -> Self {
20966        std::default::Default::default()
20967    }
20968
20969    /// Sets the value of [channel][crate::model::GatewayAPIConfig::channel].
20970    pub fn set_channel<T: std::convert::Into<crate::model::gateway_api_config::Channel>>(
20971        mut self,
20972        v: T,
20973    ) -> Self {
20974        self.channel = v.into();
20975        self
20976    }
20977}
20978
20979impl wkt::message::Message for GatewayAPIConfig {
20980    fn typename() -> &'static str {
20981        "type.googleapis.com/google.container.v1.GatewayAPIConfig"
20982    }
20983}
20984
20985/// Defines additional types related to [GatewayAPIConfig].
20986pub mod gateway_api_config {
20987    #[allow(unused_imports)]
20988    use super::*;
20989
20990    /// Channel describes if/how Gateway API should be installed and implemented in
20991    /// a cluster.
20992    ///
20993    /// # Working with unknown values
20994    ///
20995    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20996    /// additional enum variants at any time. Adding new variants is not considered
20997    /// a breaking change. Applications should write their code in anticipation of:
20998    ///
20999    /// - New values appearing in future releases of the client library, **and**
21000    /// - New values received dynamically, without application changes.
21001    ///
21002    /// Please consult the [Working with enums] section in the user guide for some
21003    /// guidelines.
21004    ///
21005    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21006    #[derive(Clone, Debug, PartialEq)]
21007    #[non_exhaustive]
21008    pub enum Channel {
21009        /// Default value.
21010        Unspecified,
21011        /// Gateway API support is disabled
21012        Disabled,
21013        /// Deprecated: use CHANNEL_STANDARD instead.
21014        /// Gateway API support is enabled, experimental CRDs are installed
21015        #[deprecated]
21016        Experimental,
21017        /// Gateway API support is enabled, standard CRDs are installed
21018        Standard,
21019        /// If set, the enum was initialized with an unknown value.
21020        ///
21021        /// Applications can examine the value using [Channel::value] or
21022        /// [Channel::name].
21023        UnknownValue(channel::UnknownValue),
21024    }
21025
21026    #[doc(hidden)]
21027    pub mod channel {
21028        #[allow(unused_imports)]
21029        use super::*;
21030        #[derive(Clone, Debug, PartialEq)]
21031        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21032    }
21033
21034    impl Channel {
21035        /// Gets the enum value.
21036        ///
21037        /// Returns `None` if the enum contains an unknown value deserialized from
21038        /// the string representation of enums.
21039        pub fn value(&self) -> std::option::Option<i32> {
21040            match self {
21041                Self::Unspecified => std::option::Option::Some(0),
21042                Self::Disabled => std::option::Option::Some(1),
21043                Self::Experimental => std::option::Option::Some(3),
21044                Self::Standard => std::option::Option::Some(4),
21045                Self::UnknownValue(u) => u.0.value(),
21046            }
21047        }
21048
21049        /// Gets the enum value as a string.
21050        ///
21051        /// Returns `None` if the enum contains an unknown value deserialized from
21052        /// the integer representation of enums.
21053        pub fn name(&self) -> std::option::Option<&str> {
21054            match self {
21055                Self::Unspecified => std::option::Option::Some("CHANNEL_UNSPECIFIED"),
21056                Self::Disabled => std::option::Option::Some("CHANNEL_DISABLED"),
21057                Self::Experimental => std::option::Option::Some("CHANNEL_EXPERIMENTAL"),
21058                Self::Standard => std::option::Option::Some("CHANNEL_STANDARD"),
21059                Self::UnknownValue(u) => u.0.name(),
21060            }
21061        }
21062    }
21063
21064    impl std::default::Default for Channel {
21065        fn default() -> Self {
21066            use std::convert::From;
21067            Self::from(0)
21068        }
21069    }
21070
21071    impl std::fmt::Display for Channel {
21072        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21073            wkt::internal::display_enum(f, self.name(), self.value())
21074        }
21075    }
21076
21077    impl std::convert::From<i32> for Channel {
21078        fn from(value: i32) -> Self {
21079            match value {
21080                0 => Self::Unspecified,
21081                1 => Self::Disabled,
21082                3 => Self::Experimental,
21083                4 => Self::Standard,
21084                _ => Self::UnknownValue(channel::UnknownValue(
21085                    wkt::internal::UnknownEnumValue::Integer(value),
21086                )),
21087            }
21088        }
21089    }
21090
21091    impl std::convert::From<&str> for Channel {
21092        fn from(value: &str) -> Self {
21093            use std::string::ToString;
21094            match value {
21095                "CHANNEL_UNSPECIFIED" => Self::Unspecified,
21096                "CHANNEL_DISABLED" => Self::Disabled,
21097                "CHANNEL_EXPERIMENTAL" => Self::Experimental,
21098                "CHANNEL_STANDARD" => Self::Standard,
21099                _ => Self::UnknownValue(channel::UnknownValue(
21100                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21101                )),
21102            }
21103        }
21104    }
21105
21106    impl serde::ser::Serialize for Channel {
21107        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21108        where
21109            S: serde::Serializer,
21110        {
21111            match self {
21112                Self::Unspecified => serializer.serialize_i32(0),
21113                Self::Disabled => serializer.serialize_i32(1),
21114                Self::Experimental => serializer.serialize_i32(3),
21115                Self::Standard => serializer.serialize_i32(4),
21116                Self::UnknownValue(u) => u.0.serialize(serializer),
21117            }
21118        }
21119    }
21120
21121    impl<'de> serde::de::Deserialize<'de> for Channel {
21122        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21123        where
21124            D: serde::Deserializer<'de>,
21125        {
21126            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
21127                ".google.container.v1.GatewayAPIConfig.Channel",
21128            ))
21129        }
21130    }
21131}
21132
21133/// Config to block services with externalIPs field.
21134#[derive(Clone, Default, PartialEq)]
21135#[non_exhaustive]
21136pub struct ServiceExternalIPsConfig {
21137    /// Whether Services with ExternalIPs field are allowed or not.
21138    pub enabled: bool,
21139
21140    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21141}
21142
21143impl ServiceExternalIPsConfig {
21144    pub fn new() -> Self {
21145        std::default::Default::default()
21146    }
21147
21148    /// Sets the value of [enabled][crate::model::ServiceExternalIPsConfig::enabled].
21149    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21150        self.enabled = v.into();
21151        self
21152    }
21153}
21154
21155impl wkt::message::Message for ServiceExternalIPsConfig {
21156    fn typename() -> &'static str {
21157        "type.googleapis.com/google.container.v1.ServiceExternalIPsConfig"
21158    }
21159}
21160
21161/// GetOpenIDConfigRequest gets the OIDC discovery document for the
21162/// cluster. See the OpenID Connect Discovery 1.0 specification for details.
21163#[derive(Clone, Default, PartialEq)]
21164#[non_exhaustive]
21165pub struct GetOpenIDConfigRequest {
21166    /// The cluster (project, location, cluster name) to get the discovery document
21167    /// for. Specified in the format `projects/*/locations/*/clusters/*`.
21168    pub parent: std::string::String,
21169
21170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21171}
21172
21173impl GetOpenIDConfigRequest {
21174    pub fn new() -> Self {
21175        std::default::Default::default()
21176    }
21177
21178    /// Sets the value of [parent][crate::model::GetOpenIDConfigRequest::parent].
21179    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21180        self.parent = v.into();
21181        self
21182    }
21183}
21184
21185impl wkt::message::Message for GetOpenIDConfigRequest {
21186    fn typename() -> &'static str {
21187        "type.googleapis.com/google.container.v1.GetOpenIDConfigRequest"
21188    }
21189}
21190
21191/// GetOpenIDConfigResponse is an OIDC discovery document for the cluster.
21192/// See the OpenID Connect Discovery 1.0 specification for details.
21193#[derive(Clone, Default, PartialEq)]
21194#[non_exhaustive]
21195pub struct GetOpenIDConfigResponse {
21196    /// OIDC Issuer.
21197    pub issuer: std::string::String,
21198
21199    /// JSON Web Key uri.
21200    pub jwks_uri: std::string::String,
21201
21202    /// Supported response types.
21203    pub response_types_supported: std::vec::Vec<std::string::String>,
21204
21205    /// Supported subject types.
21206    pub subject_types_supported: std::vec::Vec<std::string::String>,
21207
21208    /// supported ID Token signing Algorithms.
21209    pub id_token_signing_alg_values_supported: std::vec::Vec<std::string::String>,
21210
21211    /// Supported claims.
21212    pub claims_supported: std::vec::Vec<std::string::String>,
21213
21214    /// Supported grant types.
21215    pub grant_types: std::vec::Vec<std::string::String>,
21216
21217    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21218}
21219
21220impl GetOpenIDConfigResponse {
21221    pub fn new() -> Self {
21222        std::default::Default::default()
21223    }
21224
21225    /// Sets the value of [issuer][crate::model::GetOpenIDConfigResponse::issuer].
21226    pub fn set_issuer<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21227        self.issuer = v.into();
21228        self
21229    }
21230
21231    /// Sets the value of [jwks_uri][crate::model::GetOpenIDConfigResponse::jwks_uri].
21232    pub fn set_jwks_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21233        self.jwks_uri = v.into();
21234        self
21235    }
21236
21237    /// Sets the value of [response_types_supported][crate::model::GetOpenIDConfigResponse::response_types_supported].
21238    pub fn set_response_types_supported<T, V>(mut self, v: T) -> Self
21239    where
21240        T: std::iter::IntoIterator<Item = V>,
21241        V: std::convert::Into<std::string::String>,
21242    {
21243        use std::iter::Iterator;
21244        self.response_types_supported = v.into_iter().map(|i| i.into()).collect();
21245        self
21246    }
21247
21248    /// Sets the value of [subject_types_supported][crate::model::GetOpenIDConfigResponse::subject_types_supported].
21249    pub fn set_subject_types_supported<T, V>(mut self, v: T) -> Self
21250    where
21251        T: std::iter::IntoIterator<Item = V>,
21252        V: std::convert::Into<std::string::String>,
21253    {
21254        use std::iter::Iterator;
21255        self.subject_types_supported = v.into_iter().map(|i| i.into()).collect();
21256        self
21257    }
21258
21259    /// Sets the value of [id_token_signing_alg_values_supported][crate::model::GetOpenIDConfigResponse::id_token_signing_alg_values_supported].
21260    pub fn set_id_token_signing_alg_values_supported<T, V>(mut self, v: T) -> Self
21261    where
21262        T: std::iter::IntoIterator<Item = V>,
21263        V: std::convert::Into<std::string::String>,
21264    {
21265        use std::iter::Iterator;
21266        self.id_token_signing_alg_values_supported = v.into_iter().map(|i| i.into()).collect();
21267        self
21268    }
21269
21270    /// Sets the value of [claims_supported][crate::model::GetOpenIDConfigResponse::claims_supported].
21271    pub fn set_claims_supported<T, V>(mut self, v: T) -> Self
21272    where
21273        T: std::iter::IntoIterator<Item = V>,
21274        V: std::convert::Into<std::string::String>,
21275    {
21276        use std::iter::Iterator;
21277        self.claims_supported = v.into_iter().map(|i| i.into()).collect();
21278        self
21279    }
21280
21281    /// Sets the value of [grant_types][crate::model::GetOpenIDConfigResponse::grant_types].
21282    pub fn set_grant_types<T, V>(mut self, v: T) -> Self
21283    where
21284        T: std::iter::IntoIterator<Item = V>,
21285        V: std::convert::Into<std::string::String>,
21286    {
21287        use std::iter::Iterator;
21288        self.grant_types = v.into_iter().map(|i| i.into()).collect();
21289        self
21290    }
21291}
21292
21293impl wkt::message::Message for GetOpenIDConfigResponse {
21294    fn typename() -> &'static str {
21295        "type.googleapis.com/google.container.v1.GetOpenIDConfigResponse"
21296    }
21297}
21298
21299/// GetJSONWebKeysRequest gets the public component of the keys used by the
21300/// cluster to sign token requests. This will be the jwks_uri for the discover
21301/// document returned by getOpenIDConfig. See the OpenID Connect
21302/// Discovery 1.0 specification for details.
21303#[derive(Clone, Default, PartialEq)]
21304#[non_exhaustive]
21305pub struct GetJSONWebKeysRequest {
21306    /// The cluster (project, location, cluster name) to get keys for. Specified in
21307    /// the format `projects/*/locations/*/clusters/*`.
21308    pub parent: std::string::String,
21309
21310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21311}
21312
21313impl GetJSONWebKeysRequest {
21314    pub fn new() -> Self {
21315        std::default::Default::default()
21316    }
21317
21318    /// Sets the value of [parent][crate::model::GetJSONWebKeysRequest::parent].
21319    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21320        self.parent = v.into();
21321        self
21322    }
21323}
21324
21325impl wkt::message::Message for GetJSONWebKeysRequest {
21326    fn typename() -> &'static str {
21327        "type.googleapis.com/google.container.v1.GetJSONWebKeysRequest"
21328    }
21329}
21330
21331/// Jwk is a JSON Web Key as specified in RFC 7517
21332#[derive(Clone, Default, PartialEq)]
21333#[non_exhaustive]
21334pub struct Jwk {
21335    /// Key Type.
21336    pub kty: std::string::String,
21337
21338    /// Algorithm.
21339    pub alg: std::string::String,
21340
21341    /// Permitted uses for the public keys.
21342    pub r#use: std::string::String,
21343
21344    /// Key ID.
21345    pub kid: std::string::String,
21346
21347    /// Used for RSA keys.
21348    pub n: std::string::String,
21349
21350    /// Used for RSA keys.
21351    pub e: std::string::String,
21352
21353    /// Used for ECDSA keys.
21354    pub x: std::string::String,
21355
21356    /// Used for ECDSA keys.
21357    pub y: std::string::String,
21358
21359    /// Used for ECDSA keys.
21360    pub crv: std::string::String,
21361
21362    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21363}
21364
21365impl Jwk {
21366    pub fn new() -> Self {
21367        std::default::Default::default()
21368    }
21369
21370    /// Sets the value of [kty][crate::model::Jwk::kty].
21371    pub fn set_kty<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21372        self.kty = v.into();
21373        self
21374    }
21375
21376    /// Sets the value of [alg][crate::model::Jwk::alg].
21377    pub fn set_alg<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21378        self.alg = v.into();
21379        self
21380    }
21381
21382    /// Sets the value of [r#use][crate::model::Jwk::use].
21383    pub fn set_use<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21384        self.r#use = v.into();
21385        self
21386    }
21387
21388    /// Sets the value of [kid][crate::model::Jwk::kid].
21389    pub fn set_kid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21390        self.kid = v.into();
21391        self
21392    }
21393
21394    /// Sets the value of [n][crate::model::Jwk::n].
21395    pub fn set_n<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21396        self.n = v.into();
21397        self
21398    }
21399
21400    /// Sets the value of [e][crate::model::Jwk::e].
21401    pub fn set_e<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21402        self.e = v.into();
21403        self
21404    }
21405
21406    /// Sets the value of [x][crate::model::Jwk::x].
21407    pub fn set_x<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21408        self.x = v.into();
21409        self
21410    }
21411
21412    /// Sets the value of [y][crate::model::Jwk::y].
21413    pub fn set_y<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21414        self.y = v.into();
21415        self
21416    }
21417
21418    /// Sets the value of [crv][crate::model::Jwk::crv].
21419    pub fn set_crv<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21420        self.crv = v.into();
21421        self
21422    }
21423}
21424
21425impl wkt::message::Message for Jwk {
21426    fn typename() -> &'static str {
21427        "type.googleapis.com/google.container.v1.Jwk"
21428    }
21429}
21430
21431/// GetJSONWebKeysResponse is a valid JSON Web Key Set as specified in rfc 7517
21432#[derive(Clone, Default, PartialEq)]
21433#[non_exhaustive]
21434pub struct GetJSONWebKeysResponse {
21435    /// The public component of the keys used by the cluster to sign token
21436    /// requests.
21437    pub keys: std::vec::Vec<crate::model::Jwk>,
21438
21439    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21440}
21441
21442impl GetJSONWebKeysResponse {
21443    pub fn new() -> Self {
21444        std::default::Default::default()
21445    }
21446
21447    /// Sets the value of [keys][crate::model::GetJSONWebKeysResponse::keys].
21448    pub fn set_keys<T, V>(mut self, v: T) -> Self
21449    where
21450        T: std::iter::IntoIterator<Item = V>,
21451        V: std::convert::Into<crate::model::Jwk>,
21452    {
21453        use std::iter::Iterator;
21454        self.keys = v.into_iter().map(|i| i.into()).collect();
21455        self
21456    }
21457}
21458
21459impl wkt::message::Message for GetJSONWebKeysResponse {
21460    fn typename() -> &'static str {
21461        "type.googleapis.com/google.container.v1.GetJSONWebKeysResponse"
21462    }
21463}
21464
21465/// CheckAutopilotCompatibilityRequest requests getting the blockers for the
21466/// given operation in the cluster.
21467#[derive(Clone, Default, PartialEq)]
21468#[non_exhaustive]
21469pub struct CheckAutopilotCompatibilityRequest {
21470    /// The name (project, location, cluster) of the cluster to retrieve.
21471    /// Specified in the format `projects/*/locations/*/clusters/*`.
21472    pub name: std::string::String,
21473
21474    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21475}
21476
21477impl CheckAutopilotCompatibilityRequest {
21478    pub fn new() -> Self {
21479        std::default::Default::default()
21480    }
21481
21482    /// Sets the value of [name][crate::model::CheckAutopilotCompatibilityRequest::name].
21483    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21484        self.name = v.into();
21485        self
21486    }
21487}
21488
21489impl wkt::message::Message for CheckAutopilotCompatibilityRequest {
21490    fn typename() -> &'static str {
21491        "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityRequest"
21492    }
21493}
21494
21495/// AutopilotCompatibilityIssue contains information about a specific
21496/// compatibility issue with Autopilot mode.
21497#[derive(Clone, Default, PartialEq)]
21498#[non_exhaustive]
21499pub struct AutopilotCompatibilityIssue {
21500    /// The last time when this issue was observed.
21501    pub last_observation: std::option::Option<wkt::Timestamp>,
21502
21503    /// The constraint type of the issue.
21504    pub constraint_type: std::string::String,
21505
21506    /// The incompatibility type of this issue.
21507    pub incompatibility_type: crate::model::autopilot_compatibility_issue::IssueType,
21508
21509    /// The name of the resources which are subject to this issue.
21510    pub subjects: std::vec::Vec<std::string::String>,
21511
21512    /// A URL to a public documentation, which addresses resolving this issue.
21513    pub documentation_url: std::string::String,
21514
21515    /// The description of the issue.
21516    pub description: std::string::String,
21517
21518    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21519}
21520
21521impl AutopilotCompatibilityIssue {
21522    pub fn new() -> Self {
21523        std::default::Default::default()
21524    }
21525
21526    /// Sets the value of [last_observation][crate::model::AutopilotCompatibilityIssue::last_observation].
21527    pub fn set_last_observation<T>(mut self, v: T) -> Self
21528    where
21529        T: std::convert::Into<wkt::Timestamp>,
21530    {
21531        self.last_observation = std::option::Option::Some(v.into());
21532        self
21533    }
21534
21535    /// Sets or clears the value of [last_observation][crate::model::AutopilotCompatibilityIssue::last_observation].
21536    pub fn set_or_clear_last_observation<T>(mut self, v: std::option::Option<T>) -> Self
21537    where
21538        T: std::convert::Into<wkt::Timestamp>,
21539    {
21540        self.last_observation = v.map(|x| x.into());
21541        self
21542    }
21543
21544    /// Sets the value of [constraint_type][crate::model::AutopilotCompatibilityIssue::constraint_type].
21545    pub fn set_constraint_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21546        self.constraint_type = v.into();
21547        self
21548    }
21549
21550    /// Sets the value of [incompatibility_type][crate::model::AutopilotCompatibilityIssue::incompatibility_type].
21551    pub fn set_incompatibility_type<
21552        T: std::convert::Into<crate::model::autopilot_compatibility_issue::IssueType>,
21553    >(
21554        mut self,
21555        v: T,
21556    ) -> Self {
21557        self.incompatibility_type = v.into();
21558        self
21559    }
21560
21561    /// Sets the value of [subjects][crate::model::AutopilotCompatibilityIssue::subjects].
21562    pub fn set_subjects<T, V>(mut self, v: T) -> Self
21563    where
21564        T: std::iter::IntoIterator<Item = V>,
21565        V: std::convert::Into<std::string::String>,
21566    {
21567        use std::iter::Iterator;
21568        self.subjects = v.into_iter().map(|i| i.into()).collect();
21569        self
21570    }
21571
21572    /// Sets the value of [documentation_url][crate::model::AutopilotCompatibilityIssue::documentation_url].
21573    pub fn set_documentation_url<T: std::convert::Into<std::string::String>>(
21574        mut self,
21575        v: T,
21576    ) -> Self {
21577        self.documentation_url = v.into();
21578        self
21579    }
21580
21581    /// Sets the value of [description][crate::model::AutopilotCompatibilityIssue::description].
21582    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21583        self.description = v.into();
21584        self
21585    }
21586}
21587
21588impl wkt::message::Message for AutopilotCompatibilityIssue {
21589    fn typename() -> &'static str {
21590        "type.googleapis.com/google.container.v1.AutopilotCompatibilityIssue"
21591    }
21592}
21593
21594/// Defines additional types related to [AutopilotCompatibilityIssue].
21595pub mod autopilot_compatibility_issue {
21596    #[allow(unused_imports)]
21597    use super::*;
21598
21599    /// The type of the reported issue.
21600    ///
21601    /// # Working with unknown values
21602    ///
21603    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21604    /// additional enum variants at any time. Adding new variants is not considered
21605    /// a breaking change. Applications should write their code in anticipation of:
21606    ///
21607    /// - New values appearing in future releases of the client library, **and**
21608    /// - New values received dynamically, without application changes.
21609    ///
21610    /// Please consult the [Working with enums] section in the user guide for some
21611    /// guidelines.
21612    ///
21613    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21614    #[derive(Clone, Debug, PartialEq)]
21615    #[non_exhaustive]
21616    pub enum IssueType {
21617        /// Default value, should not be used.
21618        Unspecified,
21619        /// Indicates that the issue is a known incompatibility between the
21620        /// cluster and Autopilot mode.
21621        Incompatibility,
21622        /// Indicates the issue is an incompatibility if customers take no further
21623        /// action to resolve.
21624        AdditionalConfigRequired,
21625        /// Indicates the issue is not an incompatibility, but depending on the
21626        /// workloads business logic, there is a potential that they won't work on
21627        /// Autopilot.
21628        PassedWithOptionalConfig,
21629        /// If set, the enum was initialized with an unknown value.
21630        ///
21631        /// Applications can examine the value using [IssueType::value] or
21632        /// [IssueType::name].
21633        UnknownValue(issue_type::UnknownValue),
21634    }
21635
21636    #[doc(hidden)]
21637    pub mod issue_type {
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 IssueType {
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::Incompatibility => std::option::Option::Some(1),
21653                Self::AdditionalConfigRequired => std::option::Option::Some(2),
21654                Self::PassedWithOptionalConfig => std::option::Option::Some(3),
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("UNSPECIFIED"),
21666                Self::Incompatibility => std::option::Option::Some("INCOMPATIBILITY"),
21667                Self::AdditionalConfigRequired => {
21668                    std::option::Option::Some("ADDITIONAL_CONFIG_REQUIRED")
21669                }
21670                Self::PassedWithOptionalConfig => {
21671                    std::option::Option::Some("PASSED_WITH_OPTIONAL_CONFIG")
21672                }
21673                Self::UnknownValue(u) => u.0.name(),
21674            }
21675        }
21676    }
21677
21678    impl std::default::Default for IssueType {
21679        fn default() -> Self {
21680            use std::convert::From;
21681            Self::from(0)
21682        }
21683    }
21684
21685    impl std::fmt::Display for IssueType {
21686        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21687            wkt::internal::display_enum(f, self.name(), self.value())
21688        }
21689    }
21690
21691    impl std::convert::From<i32> for IssueType {
21692        fn from(value: i32) -> Self {
21693            match value {
21694                0 => Self::Unspecified,
21695                1 => Self::Incompatibility,
21696                2 => Self::AdditionalConfigRequired,
21697                3 => Self::PassedWithOptionalConfig,
21698                _ => Self::UnknownValue(issue_type::UnknownValue(
21699                    wkt::internal::UnknownEnumValue::Integer(value),
21700                )),
21701            }
21702        }
21703    }
21704
21705    impl std::convert::From<&str> for IssueType {
21706        fn from(value: &str) -> Self {
21707            use std::string::ToString;
21708            match value {
21709                "UNSPECIFIED" => Self::Unspecified,
21710                "INCOMPATIBILITY" => Self::Incompatibility,
21711                "ADDITIONAL_CONFIG_REQUIRED" => Self::AdditionalConfigRequired,
21712                "PASSED_WITH_OPTIONAL_CONFIG" => Self::PassedWithOptionalConfig,
21713                _ => Self::UnknownValue(issue_type::UnknownValue(
21714                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21715                )),
21716            }
21717        }
21718    }
21719
21720    impl serde::ser::Serialize for IssueType {
21721        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21722        where
21723            S: serde::Serializer,
21724        {
21725            match self {
21726                Self::Unspecified => serializer.serialize_i32(0),
21727                Self::Incompatibility => serializer.serialize_i32(1),
21728                Self::AdditionalConfigRequired => serializer.serialize_i32(2),
21729                Self::PassedWithOptionalConfig => serializer.serialize_i32(3),
21730                Self::UnknownValue(u) => u.0.serialize(serializer),
21731            }
21732        }
21733    }
21734
21735    impl<'de> serde::de::Deserialize<'de> for IssueType {
21736        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21737        where
21738            D: serde::Deserializer<'de>,
21739        {
21740            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IssueType>::new(
21741                ".google.container.v1.AutopilotCompatibilityIssue.IssueType",
21742            ))
21743        }
21744    }
21745}
21746
21747/// CheckAutopilotCompatibilityResponse has a list of compatibility issues.
21748#[derive(Clone, Default, PartialEq)]
21749#[non_exhaustive]
21750pub struct CheckAutopilotCompatibilityResponse {
21751    /// The list of issues for the given operation.
21752    pub issues: std::vec::Vec<crate::model::AutopilotCompatibilityIssue>,
21753
21754    /// The summary of the autopilot compatibility response.
21755    pub summary: std::string::String,
21756
21757    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21758}
21759
21760impl CheckAutopilotCompatibilityResponse {
21761    pub fn new() -> Self {
21762        std::default::Default::default()
21763    }
21764
21765    /// Sets the value of [issues][crate::model::CheckAutopilotCompatibilityResponse::issues].
21766    pub fn set_issues<T, V>(mut self, v: T) -> Self
21767    where
21768        T: std::iter::IntoIterator<Item = V>,
21769        V: std::convert::Into<crate::model::AutopilotCompatibilityIssue>,
21770    {
21771        use std::iter::Iterator;
21772        self.issues = v.into_iter().map(|i| i.into()).collect();
21773        self
21774    }
21775
21776    /// Sets the value of [summary][crate::model::CheckAutopilotCompatibilityResponse::summary].
21777    pub fn set_summary<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21778        self.summary = v.into();
21779        self
21780    }
21781}
21782
21783impl wkt::message::Message for CheckAutopilotCompatibilityResponse {
21784    fn typename() -> &'static str {
21785        "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityResponse"
21786    }
21787}
21788
21789/// ReleaseChannel indicates which release channel a cluster is
21790/// subscribed to. Release channels are arranged in order of risk.
21791///
21792/// When a cluster is subscribed to a release channel, Google maintains
21793/// both the master version and the node version. Node auto-upgrade
21794/// defaults to true and cannot be disabled.
21795#[derive(Clone, Default, PartialEq)]
21796#[non_exhaustive]
21797pub struct ReleaseChannel {
21798    /// channel specifies which release channel the cluster is subscribed to.
21799    pub channel: crate::model::release_channel::Channel,
21800
21801    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21802}
21803
21804impl ReleaseChannel {
21805    pub fn new() -> Self {
21806        std::default::Default::default()
21807    }
21808
21809    /// Sets the value of [channel][crate::model::ReleaseChannel::channel].
21810    pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
21811        mut self,
21812        v: T,
21813    ) -> Self {
21814        self.channel = v.into();
21815        self
21816    }
21817}
21818
21819impl wkt::message::Message for ReleaseChannel {
21820    fn typename() -> &'static str {
21821        "type.googleapis.com/google.container.v1.ReleaseChannel"
21822    }
21823}
21824
21825/// Defines additional types related to [ReleaseChannel].
21826pub mod release_channel {
21827    #[allow(unused_imports)]
21828    use super::*;
21829
21830    /// Possible values for 'channel'.
21831    ///
21832    /// # Working with unknown values
21833    ///
21834    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21835    /// additional enum variants at any time. Adding new variants is not considered
21836    /// a breaking change. Applications should write their code in anticipation of:
21837    ///
21838    /// - New values appearing in future releases of the client library, **and**
21839    /// - New values received dynamically, without application changes.
21840    ///
21841    /// Please consult the [Working with enums] section in the user guide for some
21842    /// guidelines.
21843    ///
21844    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21845    #[derive(Clone, Debug, PartialEq)]
21846    #[non_exhaustive]
21847    pub enum Channel {
21848        /// No channel specified.
21849        Unspecified,
21850        /// RAPID channel is offered on an early access basis for customers who want
21851        /// to test new releases.
21852        ///
21853        /// WARNING: Versions available in the RAPID Channel may be subject to
21854        /// unresolved issues with no known workaround and are not subject to any
21855        /// SLAs.
21856        Rapid,
21857        /// Clusters subscribed to REGULAR receive versions that are considered GA
21858        /// quality. REGULAR is intended for production users who want to take
21859        /// advantage of new features.
21860        Regular,
21861        /// Clusters subscribed to STABLE receive versions that are known to be
21862        /// stable and reliable in production.
21863        Stable,
21864        /// Clusters subscribed to EXTENDED receive extended support and availability
21865        /// for versions which are known to be stable and reliable in production.
21866        Extended,
21867        /// If set, the enum was initialized with an unknown value.
21868        ///
21869        /// Applications can examine the value using [Channel::value] or
21870        /// [Channel::name].
21871        UnknownValue(channel::UnknownValue),
21872    }
21873
21874    #[doc(hidden)]
21875    pub mod channel {
21876        #[allow(unused_imports)]
21877        use super::*;
21878        #[derive(Clone, Debug, PartialEq)]
21879        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21880    }
21881
21882    impl Channel {
21883        /// Gets the enum value.
21884        ///
21885        /// Returns `None` if the enum contains an unknown value deserialized from
21886        /// the string representation of enums.
21887        pub fn value(&self) -> std::option::Option<i32> {
21888            match self {
21889                Self::Unspecified => std::option::Option::Some(0),
21890                Self::Rapid => std::option::Option::Some(1),
21891                Self::Regular => std::option::Option::Some(2),
21892                Self::Stable => std::option::Option::Some(3),
21893                Self::Extended => std::option::Option::Some(4),
21894                Self::UnknownValue(u) => u.0.value(),
21895            }
21896        }
21897
21898        /// Gets the enum value as a string.
21899        ///
21900        /// Returns `None` if the enum contains an unknown value deserialized from
21901        /// the integer representation of enums.
21902        pub fn name(&self) -> std::option::Option<&str> {
21903            match self {
21904                Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
21905                Self::Rapid => std::option::Option::Some("RAPID"),
21906                Self::Regular => std::option::Option::Some("REGULAR"),
21907                Self::Stable => std::option::Option::Some("STABLE"),
21908                Self::Extended => std::option::Option::Some("EXTENDED"),
21909                Self::UnknownValue(u) => u.0.name(),
21910            }
21911        }
21912    }
21913
21914    impl std::default::Default for Channel {
21915        fn default() -> Self {
21916            use std::convert::From;
21917            Self::from(0)
21918        }
21919    }
21920
21921    impl std::fmt::Display for Channel {
21922        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21923            wkt::internal::display_enum(f, self.name(), self.value())
21924        }
21925    }
21926
21927    impl std::convert::From<i32> for Channel {
21928        fn from(value: i32) -> Self {
21929            match value {
21930                0 => Self::Unspecified,
21931                1 => Self::Rapid,
21932                2 => Self::Regular,
21933                3 => Self::Stable,
21934                4 => Self::Extended,
21935                _ => Self::UnknownValue(channel::UnknownValue(
21936                    wkt::internal::UnknownEnumValue::Integer(value),
21937                )),
21938            }
21939        }
21940    }
21941
21942    impl std::convert::From<&str> for Channel {
21943        fn from(value: &str) -> Self {
21944            use std::string::ToString;
21945            match value {
21946                "UNSPECIFIED" => Self::Unspecified,
21947                "RAPID" => Self::Rapid,
21948                "REGULAR" => Self::Regular,
21949                "STABLE" => Self::Stable,
21950                "EXTENDED" => Self::Extended,
21951                _ => Self::UnknownValue(channel::UnknownValue(
21952                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21953                )),
21954            }
21955        }
21956    }
21957
21958    impl serde::ser::Serialize for Channel {
21959        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21960        where
21961            S: serde::Serializer,
21962        {
21963            match self {
21964                Self::Unspecified => serializer.serialize_i32(0),
21965                Self::Rapid => serializer.serialize_i32(1),
21966                Self::Regular => serializer.serialize_i32(2),
21967                Self::Stable => serializer.serialize_i32(3),
21968                Self::Extended => serializer.serialize_i32(4),
21969                Self::UnknownValue(u) => u.0.serialize(serializer),
21970            }
21971        }
21972    }
21973
21974    impl<'de> serde::de::Deserialize<'de> for Channel {
21975        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21976        where
21977            D: serde::Deserializer<'de>,
21978        {
21979            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
21980                ".google.container.v1.ReleaseChannel.Channel",
21981            ))
21982        }
21983    }
21984}
21985
21986/// Configuration for fine-grained cost management feature.
21987#[derive(Clone, Default, PartialEq)]
21988#[non_exhaustive]
21989pub struct CostManagementConfig {
21990    /// Whether the feature is enabled or not.
21991    pub enabled: bool,
21992
21993    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21994}
21995
21996impl CostManagementConfig {
21997    pub fn new() -> Self {
21998        std::default::Default::default()
21999    }
22000
22001    /// Sets the value of [enabled][crate::model::CostManagementConfig::enabled].
22002    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22003        self.enabled = v.into();
22004        self
22005    }
22006}
22007
22008impl wkt::message::Message for CostManagementConfig {
22009    fn typename() -> &'static str {
22010        "type.googleapis.com/google.container.v1.CostManagementConfig"
22011    }
22012}
22013
22014/// IntraNodeVisibilityConfig contains the desired config of the intra-node
22015/// visibility on this cluster.
22016#[derive(Clone, Default, PartialEq)]
22017#[non_exhaustive]
22018pub struct IntraNodeVisibilityConfig {
22019    /// Enables intra node visibility for this cluster.
22020    pub enabled: bool,
22021
22022    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22023}
22024
22025impl IntraNodeVisibilityConfig {
22026    pub fn new() -> Self {
22027        std::default::Default::default()
22028    }
22029
22030    /// Sets the value of [enabled][crate::model::IntraNodeVisibilityConfig::enabled].
22031    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22032        self.enabled = v.into();
22033        self
22034    }
22035}
22036
22037impl wkt::message::Message for IntraNodeVisibilityConfig {
22038    fn typename() -> &'static str {
22039        "type.googleapis.com/google.container.v1.IntraNodeVisibilityConfig"
22040    }
22041}
22042
22043/// ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer
22044/// subsetting on this cluster.
22045#[derive(Clone, Default, PartialEq)]
22046#[non_exhaustive]
22047pub struct ILBSubsettingConfig {
22048    /// Enables l4 ILB subsetting for this cluster.
22049    pub enabled: bool,
22050
22051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22052}
22053
22054impl ILBSubsettingConfig {
22055    pub fn new() -> Self {
22056        std::default::Default::default()
22057    }
22058
22059    /// Sets the value of [enabled][crate::model::ILBSubsettingConfig::enabled].
22060    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22061        self.enabled = v.into();
22062        self
22063    }
22064}
22065
22066impl wkt::message::Message for ILBSubsettingConfig {
22067    fn typename() -> &'static str {
22068        "type.googleapis.com/google.container.v1.ILBSubsettingConfig"
22069    }
22070}
22071
22072/// DNSConfig contains the desired set of options for configuring clusterDNS.
22073#[derive(Clone, Default, PartialEq)]
22074#[non_exhaustive]
22075pub struct DNSConfig {
22076    /// cluster_dns indicates which in-cluster DNS provider should be used.
22077    pub cluster_dns: crate::model::dns_config::Provider,
22078
22079    /// cluster_dns_scope indicates the scope of access to cluster DNS records.
22080    pub cluster_dns_scope: crate::model::dns_config::DNSScope,
22081
22082    /// cluster_dns_domain is the suffix used for all cluster service records.
22083    pub cluster_dns_domain: std::string::String,
22084
22085    /// Optional. The domain used in Additive VPC scope.
22086    pub additive_vpc_scope_dns_domain: std::string::String,
22087
22088    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22089}
22090
22091impl DNSConfig {
22092    pub fn new() -> Self {
22093        std::default::Default::default()
22094    }
22095
22096    /// Sets the value of [cluster_dns][crate::model::DNSConfig::cluster_dns].
22097    pub fn set_cluster_dns<T: std::convert::Into<crate::model::dns_config::Provider>>(
22098        mut self,
22099        v: T,
22100    ) -> Self {
22101        self.cluster_dns = v.into();
22102        self
22103    }
22104
22105    /// Sets the value of [cluster_dns_scope][crate::model::DNSConfig::cluster_dns_scope].
22106    pub fn set_cluster_dns_scope<T: std::convert::Into<crate::model::dns_config::DNSScope>>(
22107        mut self,
22108        v: T,
22109    ) -> Self {
22110        self.cluster_dns_scope = v.into();
22111        self
22112    }
22113
22114    /// Sets the value of [cluster_dns_domain][crate::model::DNSConfig::cluster_dns_domain].
22115    pub fn set_cluster_dns_domain<T: std::convert::Into<std::string::String>>(
22116        mut self,
22117        v: T,
22118    ) -> Self {
22119        self.cluster_dns_domain = v.into();
22120        self
22121    }
22122
22123    /// Sets the value of [additive_vpc_scope_dns_domain][crate::model::DNSConfig::additive_vpc_scope_dns_domain].
22124    pub fn set_additive_vpc_scope_dns_domain<T: std::convert::Into<std::string::String>>(
22125        mut self,
22126        v: T,
22127    ) -> Self {
22128        self.additive_vpc_scope_dns_domain = v.into();
22129        self
22130    }
22131}
22132
22133impl wkt::message::Message for DNSConfig {
22134    fn typename() -> &'static str {
22135        "type.googleapis.com/google.container.v1.DNSConfig"
22136    }
22137}
22138
22139/// Defines additional types related to [DNSConfig].
22140pub mod dns_config {
22141    #[allow(unused_imports)]
22142    use super::*;
22143
22144    /// Provider lists the various in-cluster DNS providers.
22145    ///
22146    /// # Working with unknown values
22147    ///
22148    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22149    /// additional enum variants at any time. Adding new variants is not considered
22150    /// a breaking change. Applications should write their code in anticipation of:
22151    ///
22152    /// - New values appearing in future releases of the client library, **and**
22153    /// - New values received dynamically, without application changes.
22154    ///
22155    /// Please consult the [Working with enums] section in the user guide for some
22156    /// guidelines.
22157    ///
22158    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22159    #[derive(Clone, Debug, PartialEq)]
22160    #[non_exhaustive]
22161    pub enum Provider {
22162        /// Default value
22163        Unspecified,
22164        /// Use GKE default DNS provider(kube-dns) for DNS resolution.
22165        PlatformDefault,
22166        /// Use CloudDNS for DNS resolution.
22167        CloudDns,
22168        /// Use KubeDNS for DNS resolution.
22169        KubeDns,
22170        /// If set, the enum was initialized with an unknown value.
22171        ///
22172        /// Applications can examine the value using [Provider::value] or
22173        /// [Provider::name].
22174        UnknownValue(provider::UnknownValue),
22175    }
22176
22177    #[doc(hidden)]
22178    pub mod provider {
22179        #[allow(unused_imports)]
22180        use super::*;
22181        #[derive(Clone, Debug, PartialEq)]
22182        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22183    }
22184
22185    impl Provider {
22186        /// Gets the enum value.
22187        ///
22188        /// Returns `None` if the enum contains an unknown value deserialized from
22189        /// the string representation of enums.
22190        pub fn value(&self) -> std::option::Option<i32> {
22191            match self {
22192                Self::Unspecified => std::option::Option::Some(0),
22193                Self::PlatformDefault => std::option::Option::Some(1),
22194                Self::CloudDns => std::option::Option::Some(2),
22195                Self::KubeDns => std::option::Option::Some(3),
22196                Self::UnknownValue(u) => u.0.value(),
22197            }
22198        }
22199
22200        /// Gets the enum value as a string.
22201        ///
22202        /// Returns `None` if the enum contains an unknown value deserialized from
22203        /// the integer representation of enums.
22204        pub fn name(&self) -> std::option::Option<&str> {
22205            match self {
22206                Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
22207                Self::PlatformDefault => std::option::Option::Some("PLATFORM_DEFAULT"),
22208                Self::CloudDns => std::option::Option::Some("CLOUD_DNS"),
22209                Self::KubeDns => std::option::Option::Some("KUBE_DNS"),
22210                Self::UnknownValue(u) => u.0.name(),
22211            }
22212        }
22213    }
22214
22215    impl std::default::Default for Provider {
22216        fn default() -> Self {
22217            use std::convert::From;
22218            Self::from(0)
22219        }
22220    }
22221
22222    impl std::fmt::Display for Provider {
22223        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22224            wkt::internal::display_enum(f, self.name(), self.value())
22225        }
22226    }
22227
22228    impl std::convert::From<i32> for Provider {
22229        fn from(value: i32) -> Self {
22230            match value {
22231                0 => Self::Unspecified,
22232                1 => Self::PlatformDefault,
22233                2 => Self::CloudDns,
22234                3 => Self::KubeDns,
22235                _ => Self::UnknownValue(provider::UnknownValue(
22236                    wkt::internal::UnknownEnumValue::Integer(value),
22237                )),
22238            }
22239        }
22240    }
22241
22242    impl std::convert::From<&str> for Provider {
22243        fn from(value: &str) -> Self {
22244            use std::string::ToString;
22245            match value {
22246                "PROVIDER_UNSPECIFIED" => Self::Unspecified,
22247                "PLATFORM_DEFAULT" => Self::PlatformDefault,
22248                "CLOUD_DNS" => Self::CloudDns,
22249                "KUBE_DNS" => Self::KubeDns,
22250                _ => Self::UnknownValue(provider::UnknownValue(
22251                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22252                )),
22253            }
22254        }
22255    }
22256
22257    impl serde::ser::Serialize for Provider {
22258        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22259        where
22260            S: serde::Serializer,
22261        {
22262            match self {
22263                Self::Unspecified => serializer.serialize_i32(0),
22264                Self::PlatformDefault => serializer.serialize_i32(1),
22265                Self::CloudDns => serializer.serialize_i32(2),
22266                Self::KubeDns => serializer.serialize_i32(3),
22267                Self::UnknownValue(u) => u.0.serialize(serializer),
22268            }
22269        }
22270    }
22271
22272    impl<'de> serde::de::Deserialize<'de> for Provider {
22273        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22274        where
22275            D: serde::Deserializer<'de>,
22276        {
22277            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
22278                ".google.container.v1.DNSConfig.Provider",
22279            ))
22280        }
22281    }
22282
22283    /// DNSScope lists the various scopes of access to cluster DNS records.
22284    ///
22285    /// # Working with unknown values
22286    ///
22287    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22288    /// additional enum variants at any time. Adding new variants is not considered
22289    /// a breaking change. Applications should write their code in anticipation of:
22290    ///
22291    /// - New values appearing in future releases of the client library, **and**
22292    /// - New values received dynamically, without application changes.
22293    ///
22294    /// Please consult the [Working with enums] section in the user guide for some
22295    /// guidelines.
22296    ///
22297    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22298    #[derive(Clone, Debug, PartialEq)]
22299    #[non_exhaustive]
22300    pub enum DNSScope {
22301        /// Default value, will be inferred as cluster scope.
22302        Unspecified,
22303        /// DNS records are accessible from within the cluster.
22304        ClusterScope,
22305        /// DNS records are accessible from within the VPC.
22306        VpcScope,
22307        /// If set, the enum was initialized with an unknown value.
22308        ///
22309        /// Applications can examine the value using [DNSScope::value] or
22310        /// [DNSScope::name].
22311        UnknownValue(dns_scope::UnknownValue),
22312    }
22313
22314    #[doc(hidden)]
22315    pub mod dns_scope {
22316        #[allow(unused_imports)]
22317        use super::*;
22318        #[derive(Clone, Debug, PartialEq)]
22319        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22320    }
22321
22322    impl DNSScope {
22323        /// Gets the enum value.
22324        ///
22325        /// Returns `None` if the enum contains an unknown value deserialized from
22326        /// the string representation of enums.
22327        pub fn value(&self) -> std::option::Option<i32> {
22328            match self {
22329                Self::Unspecified => std::option::Option::Some(0),
22330                Self::ClusterScope => std::option::Option::Some(1),
22331                Self::VpcScope => std::option::Option::Some(2),
22332                Self::UnknownValue(u) => u.0.value(),
22333            }
22334        }
22335
22336        /// Gets the enum value as a string.
22337        ///
22338        /// Returns `None` if the enum contains an unknown value deserialized from
22339        /// the integer representation of enums.
22340        pub fn name(&self) -> std::option::Option<&str> {
22341            match self {
22342                Self::Unspecified => std::option::Option::Some("DNS_SCOPE_UNSPECIFIED"),
22343                Self::ClusterScope => std::option::Option::Some("CLUSTER_SCOPE"),
22344                Self::VpcScope => std::option::Option::Some("VPC_SCOPE"),
22345                Self::UnknownValue(u) => u.0.name(),
22346            }
22347        }
22348    }
22349
22350    impl std::default::Default for DNSScope {
22351        fn default() -> Self {
22352            use std::convert::From;
22353            Self::from(0)
22354        }
22355    }
22356
22357    impl std::fmt::Display for DNSScope {
22358        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22359            wkt::internal::display_enum(f, self.name(), self.value())
22360        }
22361    }
22362
22363    impl std::convert::From<i32> for DNSScope {
22364        fn from(value: i32) -> Self {
22365            match value {
22366                0 => Self::Unspecified,
22367                1 => Self::ClusterScope,
22368                2 => Self::VpcScope,
22369                _ => Self::UnknownValue(dns_scope::UnknownValue(
22370                    wkt::internal::UnknownEnumValue::Integer(value),
22371                )),
22372            }
22373        }
22374    }
22375
22376    impl std::convert::From<&str> for DNSScope {
22377        fn from(value: &str) -> Self {
22378            use std::string::ToString;
22379            match value {
22380                "DNS_SCOPE_UNSPECIFIED" => Self::Unspecified,
22381                "CLUSTER_SCOPE" => Self::ClusterScope,
22382                "VPC_SCOPE" => Self::VpcScope,
22383                _ => Self::UnknownValue(dns_scope::UnknownValue(
22384                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22385                )),
22386            }
22387        }
22388    }
22389
22390    impl serde::ser::Serialize for DNSScope {
22391        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22392        where
22393            S: serde::Serializer,
22394        {
22395            match self {
22396                Self::Unspecified => serializer.serialize_i32(0),
22397                Self::ClusterScope => serializer.serialize_i32(1),
22398                Self::VpcScope => serializer.serialize_i32(2),
22399                Self::UnknownValue(u) => u.0.serialize(serializer),
22400            }
22401        }
22402    }
22403
22404    impl<'de> serde::de::Deserialize<'de> for DNSScope {
22405        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22406        where
22407            D: serde::Deserializer<'de>,
22408        {
22409            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DNSScope>::new(
22410                ".google.container.v1.DNSConfig.DNSScope",
22411            ))
22412        }
22413    }
22414}
22415
22416/// Constraints applied to pods.
22417#[derive(Clone, Default, PartialEq)]
22418#[non_exhaustive]
22419pub struct MaxPodsConstraint {
22420    /// Constraint enforced on the max num of pods per node.
22421    pub max_pods_per_node: i64,
22422
22423    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22424}
22425
22426impl MaxPodsConstraint {
22427    pub fn new() -> Self {
22428        std::default::Default::default()
22429    }
22430
22431    /// Sets the value of [max_pods_per_node][crate::model::MaxPodsConstraint::max_pods_per_node].
22432    pub fn set_max_pods_per_node<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
22433        self.max_pods_per_node = v.into();
22434        self
22435    }
22436}
22437
22438impl wkt::message::Message for MaxPodsConstraint {
22439    fn typename() -> &'static str {
22440        "type.googleapis.com/google.container.v1.MaxPodsConstraint"
22441    }
22442}
22443
22444/// Configuration for the use of Kubernetes Service Accounts in GCP IAM
22445/// policies.
22446#[derive(Clone, Default, PartialEq)]
22447#[non_exhaustive]
22448pub struct WorkloadIdentityConfig {
22449    /// The workload pool to attach all Kubernetes service accounts to.
22450    pub workload_pool: std::string::String,
22451
22452    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22453}
22454
22455impl WorkloadIdentityConfig {
22456    pub fn new() -> Self {
22457        std::default::Default::default()
22458    }
22459
22460    /// Sets the value of [workload_pool][crate::model::WorkloadIdentityConfig::workload_pool].
22461    pub fn set_workload_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22462        self.workload_pool = v.into();
22463        self
22464    }
22465}
22466
22467impl wkt::message::Message for WorkloadIdentityConfig {
22468    fn typename() -> &'static str {
22469        "type.googleapis.com/google.container.v1.WorkloadIdentityConfig"
22470    }
22471}
22472
22473/// IdentityServiceConfig is configuration for Identity Service which allows
22474/// customers to use external identity providers with the K8S API
22475#[derive(Clone, Default, PartialEq)]
22476#[non_exhaustive]
22477pub struct IdentityServiceConfig {
22478    /// Whether to enable the Identity Service component
22479    pub enabled: bool,
22480
22481    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22482}
22483
22484impl IdentityServiceConfig {
22485    pub fn new() -> Self {
22486        std::default::Default::default()
22487    }
22488
22489    /// Sets the value of [enabled][crate::model::IdentityServiceConfig::enabled].
22490    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22491        self.enabled = v.into();
22492        self
22493    }
22494}
22495
22496impl wkt::message::Message for IdentityServiceConfig {
22497    fn typename() -> &'static str {
22498        "type.googleapis.com/google.container.v1.IdentityServiceConfig"
22499    }
22500}
22501
22502/// Configuration for issuance of mTLS keys and certificates to Kubernetes pods.
22503#[derive(Clone, Default, PartialEq)]
22504#[non_exhaustive]
22505pub struct MeshCertificates {
22506    /// enable_certificates controls issuance of workload mTLS certificates.
22507    ///
22508    /// If set, the GKE Workload Identity Certificates controller and node agent
22509    /// will be deployed in the cluster, which can then be configured by creating a
22510    /// WorkloadCertificateConfig Custom Resource.
22511    ///
22512    /// Requires Workload Identity
22513    /// ([workload_pool][google.container.v1.WorkloadIdentityConfig.workload_pool]
22514    /// must be non-empty).
22515    ///
22516    /// [google.container.v1.WorkloadIdentityConfig.workload_pool]: crate::model::WorkloadIdentityConfig::workload_pool
22517    pub enable_certificates: std::option::Option<wkt::BoolValue>,
22518
22519    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22520}
22521
22522impl MeshCertificates {
22523    pub fn new() -> Self {
22524        std::default::Default::default()
22525    }
22526
22527    /// Sets the value of [enable_certificates][crate::model::MeshCertificates::enable_certificates].
22528    pub fn set_enable_certificates<T>(mut self, v: T) -> Self
22529    where
22530        T: std::convert::Into<wkt::BoolValue>,
22531    {
22532        self.enable_certificates = std::option::Option::Some(v.into());
22533        self
22534    }
22535
22536    /// Sets or clears the value of [enable_certificates][crate::model::MeshCertificates::enable_certificates].
22537    pub fn set_or_clear_enable_certificates<T>(mut self, v: std::option::Option<T>) -> Self
22538    where
22539        T: std::convert::Into<wkt::BoolValue>,
22540    {
22541        self.enable_certificates = v.map(|x| x.into());
22542        self
22543    }
22544}
22545
22546impl wkt::message::Message for MeshCertificates {
22547    fn typename() -> &'static str {
22548        "type.googleapis.com/google.container.v1.MeshCertificates"
22549    }
22550}
22551
22552/// Configuration of etcd encryption.
22553#[derive(Clone, Default, PartialEq)]
22554#[non_exhaustive]
22555pub struct DatabaseEncryption {
22556    /// Name of CloudKMS key to use for the encryption of secrets in etcd.
22557    /// Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key
22558    pub key_name: std::string::String,
22559
22560    /// The desired state of etcd encryption.
22561    pub state: crate::model::database_encryption::State,
22562
22563    /// Output only. The current state of etcd encryption.
22564    pub current_state: std::option::Option<crate::model::database_encryption::CurrentState>,
22565
22566    /// Output only. Keys in use by the cluster for decrypting
22567    /// existing objects, in addition to the key in `key_name`.
22568    ///
22569    /// Each item is a CloudKMS key resource.
22570    pub decryption_keys: std::vec::Vec<std::string::String>,
22571
22572    /// Output only. Records errors seen during DatabaseEncryption update
22573    /// operations.
22574    pub last_operation_errors: std::vec::Vec<crate::model::database_encryption::OperationError>,
22575
22576    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22577}
22578
22579impl DatabaseEncryption {
22580    pub fn new() -> Self {
22581        std::default::Default::default()
22582    }
22583
22584    /// Sets the value of [key_name][crate::model::DatabaseEncryption::key_name].
22585    pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22586        self.key_name = v.into();
22587        self
22588    }
22589
22590    /// Sets the value of [state][crate::model::DatabaseEncryption::state].
22591    pub fn set_state<T: std::convert::Into<crate::model::database_encryption::State>>(
22592        mut self,
22593        v: T,
22594    ) -> Self {
22595        self.state = v.into();
22596        self
22597    }
22598
22599    /// Sets the value of [current_state][crate::model::DatabaseEncryption::current_state].
22600    pub fn set_current_state<T>(mut self, v: T) -> Self
22601    where
22602        T: std::convert::Into<crate::model::database_encryption::CurrentState>,
22603    {
22604        self.current_state = std::option::Option::Some(v.into());
22605        self
22606    }
22607
22608    /// Sets or clears the value of [current_state][crate::model::DatabaseEncryption::current_state].
22609    pub fn set_or_clear_current_state<T>(mut self, v: std::option::Option<T>) -> Self
22610    where
22611        T: std::convert::Into<crate::model::database_encryption::CurrentState>,
22612    {
22613        self.current_state = v.map(|x| x.into());
22614        self
22615    }
22616
22617    /// Sets the value of [decryption_keys][crate::model::DatabaseEncryption::decryption_keys].
22618    pub fn set_decryption_keys<T, V>(mut self, v: T) -> Self
22619    where
22620        T: std::iter::IntoIterator<Item = V>,
22621        V: std::convert::Into<std::string::String>,
22622    {
22623        use std::iter::Iterator;
22624        self.decryption_keys = v.into_iter().map(|i| i.into()).collect();
22625        self
22626    }
22627
22628    /// Sets the value of [last_operation_errors][crate::model::DatabaseEncryption::last_operation_errors].
22629    pub fn set_last_operation_errors<T, V>(mut self, v: T) -> Self
22630    where
22631        T: std::iter::IntoIterator<Item = V>,
22632        V: std::convert::Into<crate::model::database_encryption::OperationError>,
22633    {
22634        use std::iter::Iterator;
22635        self.last_operation_errors = v.into_iter().map(|i| i.into()).collect();
22636        self
22637    }
22638}
22639
22640impl wkt::message::Message for DatabaseEncryption {
22641    fn typename() -> &'static str {
22642        "type.googleapis.com/google.container.v1.DatabaseEncryption"
22643    }
22644}
22645
22646/// Defines additional types related to [DatabaseEncryption].
22647pub mod database_encryption {
22648    #[allow(unused_imports)]
22649    use super::*;
22650
22651    /// OperationError records errors seen from CloudKMS keys
22652    /// encountered during updates to DatabaseEncryption configuration.
22653    #[derive(Clone, Default, PartialEq)]
22654    #[non_exhaustive]
22655    pub struct OperationError {
22656        /// CloudKMS key resource that had the error.
22657        pub key_name: std::string::String,
22658
22659        /// Description of the error seen during the operation.
22660        pub error_message: std::string::String,
22661
22662        /// Time when the CloudKMS error was seen.
22663        pub timestamp: std::option::Option<wkt::Timestamp>,
22664
22665        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22666    }
22667
22668    impl OperationError {
22669        pub fn new() -> Self {
22670            std::default::Default::default()
22671        }
22672
22673        /// Sets the value of [key_name][crate::model::database_encryption::OperationError::key_name].
22674        pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22675            self.key_name = v.into();
22676            self
22677        }
22678
22679        /// Sets the value of [error_message][crate::model::database_encryption::OperationError::error_message].
22680        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
22681            mut self,
22682            v: T,
22683        ) -> Self {
22684            self.error_message = v.into();
22685            self
22686        }
22687
22688        /// Sets the value of [timestamp][crate::model::database_encryption::OperationError::timestamp].
22689        pub fn set_timestamp<T>(mut self, v: T) -> Self
22690        where
22691            T: std::convert::Into<wkt::Timestamp>,
22692        {
22693            self.timestamp = std::option::Option::Some(v.into());
22694            self
22695        }
22696
22697        /// Sets or clears the value of [timestamp][crate::model::database_encryption::OperationError::timestamp].
22698        pub fn set_or_clear_timestamp<T>(mut self, v: std::option::Option<T>) -> Self
22699        where
22700            T: std::convert::Into<wkt::Timestamp>,
22701        {
22702            self.timestamp = v.map(|x| x.into());
22703            self
22704        }
22705    }
22706
22707    impl wkt::message::Message for OperationError {
22708        fn typename() -> &'static str {
22709            "type.googleapis.com/google.container.v1.DatabaseEncryption.OperationError"
22710        }
22711    }
22712
22713    /// State of etcd encryption.
22714    ///
22715    /// # Working with unknown values
22716    ///
22717    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22718    /// additional enum variants at any time. Adding new variants is not considered
22719    /// a breaking change. Applications should write their code in anticipation of:
22720    ///
22721    /// - New values appearing in future releases of the client library, **and**
22722    /// - New values received dynamically, without application changes.
22723    ///
22724    /// Please consult the [Working with enums] section in the user guide for some
22725    /// guidelines.
22726    ///
22727    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22728    #[derive(Clone, Debug, PartialEq)]
22729    #[non_exhaustive]
22730    pub enum State {
22731        /// Should never be set
22732        Unknown,
22733        /// Secrets in etcd are encrypted.
22734        Encrypted,
22735        /// Secrets in etcd are stored in plain text (at etcd level) - this is
22736        /// unrelated to Compute Engine level full disk encryption.
22737        Decrypted,
22738        /// If set, the enum was initialized with an unknown value.
22739        ///
22740        /// Applications can examine the value using [State::value] or
22741        /// [State::name].
22742        UnknownValue(state::UnknownValue),
22743    }
22744
22745    #[doc(hidden)]
22746    pub mod state {
22747        #[allow(unused_imports)]
22748        use super::*;
22749        #[derive(Clone, Debug, PartialEq)]
22750        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22751    }
22752
22753    impl State {
22754        /// Gets the enum value.
22755        ///
22756        /// Returns `None` if the enum contains an unknown value deserialized from
22757        /// the string representation of enums.
22758        pub fn value(&self) -> std::option::Option<i32> {
22759            match self {
22760                Self::Unknown => std::option::Option::Some(0),
22761                Self::Encrypted => std::option::Option::Some(1),
22762                Self::Decrypted => std::option::Option::Some(2),
22763                Self::UnknownValue(u) => u.0.value(),
22764            }
22765        }
22766
22767        /// Gets the enum value as a string.
22768        ///
22769        /// Returns `None` if the enum contains an unknown value deserialized from
22770        /// the integer representation of enums.
22771        pub fn name(&self) -> std::option::Option<&str> {
22772            match self {
22773                Self::Unknown => std::option::Option::Some("UNKNOWN"),
22774                Self::Encrypted => std::option::Option::Some("ENCRYPTED"),
22775                Self::Decrypted => std::option::Option::Some("DECRYPTED"),
22776                Self::UnknownValue(u) => u.0.name(),
22777            }
22778        }
22779    }
22780
22781    impl std::default::Default for State {
22782        fn default() -> Self {
22783            use std::convert::From;
22784            Self::from(0)
22785        }
22786    }
22787
22788    impl std::fmt::Display for State {
22789        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22790            wkt::internal::display_enum(f, self.name(), self.value())
22791        }
22792    }
22793
22794    impl std::convert::From<i32> for State {
22795        fn from(value: i32) -> Self {
22796            match value {
22797                0 => Self::Unknown,
22798                1 => Self::Encrypted,
22799                2 => Self::Decrypted,
22800                _ => Self::UnknownValue(state::UnknownValue(
22801                    wkt::internal::UnknownEnumValue::Integer(value),
22802                )),
22803            }
22804        }
22805    }
22806
22807    impl std::convert::From<&str> for State {
22808        fn from(value: &str) -> Self {
22809            use std::string::ToString;
22810            match value {
22811                "UNKNOWN" => Self::Unknown,
22812                "ENCRYPTED" => Self::Encrypted,
22813                "DECRYPTED" => Self::Decrypted,
22814                _ => Self::UnknownValue(state::UnknownValue(
22815                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22816                )),
22817            }
22818        }
22819    }
22820
22821    impl serde::ser::Serialize for State {
22822        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22823        where
22824            S: serde::Serializer,
22825        {
22826            match self {
22827                Self::Unknown => serializer.serialize_i32(0),
22828                Self::Encrypted => serializer.serialize_i32(1),
22829                Self::Decrypted => serializer.serialize_i32(2),
22830                Self::UnknownValue(u) => u.0.serialize(serializer),
22831            }
22832        }
22833    }
22834
22835    impl<'de> serde::de::Deserialize<'de> for State {
22836        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22837        where
22838            D: serde::Deserializer<'de>,
22839        {
22840            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
22841                ".google.container.v1.DatabaseEncryption.State",
22842            ))
22843        }
22844    }
22845
22846    /// Current State of etcd encryption.
22847    ///
22848    /// # Working with unknown values
22849    ///
22850    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22851    /// additional enum variants at any time. Adding new variants is not considered
22852    /// a breaking change. Applications should write their code in anticipation of:
22853    ///
22854    /// - New values appearing in future releases of the client library, **and**
22855    /// - New values received dynamically, without application changes.
22856    ///
22857    /// Please consult the [Working with enums] section in the user guide for some
22858    /// guidelines.
22859    ///
22860    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22861    #[derive(Clone, Debug, PartialEq)]
22862    #[non_exhaustive]
22863    pub enum CurrentState {
22864        /// Should never be set
22865        Unspecified,
22866        /// Secrets in etcd are encrypted.
22867        Encrypted,
22868        /// Secrets in etcd are stored in plain text (at etcd level) - this is
22869        /// unrelated to Compute Engine level full disk encryption.
22870        Decrypted,
22871        /// Encryption (or re-encryption with a different CloudKMS key)
22872        /// of Secrets is in progress.
22873        EncryptionPending,
22874        /// Encryption (or re-encryption with a different CloudKMS key) of Secrets in
22875        /// etcd encountered an error.
22876        EncryptionError,
22877        /// De-crypting Secrets to plain text in etcd is in progress.
22878        DecryptionPending,
22879        /// De-crypting Secrets to plain text in etcd encountered an error.
22880        DecryptionError,
22881        /// If set, the enum was initialized with an unknown value.
22882        ///
22883        /// Applications can examine the value using [CurrentState::value] or
22884        /// [CurrentState::name].
22885        UnknownValue(current_state::UnknownValue),
22886    }
22887
22888    #[doc(hidden)]
22889    pub mod current_state {
22890        #[allow(unused_imports)]
22891        use super::*;
22892        #[derive(Clone, Debug, PartialEq)]
22893        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22894    }
22895
22896    impl CurrentState {
22897        /// Gets the enum value.
22898        ///
22899        /// Returns `None` if the enum contains an unknown value deserialized from
22900        /// the string representation of enums.
22901        pub fn value(&self) -> std::option::Option<i32> {
22902            match self {
22903                Self::Unspecified => std::option::Option::Some(0),
22904                Self::Encrypted => std::option::Option::Some(7),
22905                Self::Decrypted => std::option::Option::Some(2),
22906                Self::EncryptionPending => std::option::Option::Some(3),
22907                Self::EncryptionError => std::option::Option::Some(4),
22908                Self::DecryptionPending => std::option::Option::Some(5),
22909                Self::DecryptionError => std::option::Option::Some(6),
22910                Self::UnknownValue(u) => u.0.value(),
22911            }
22912        }
22913
22914        /// Gets the enum value as a string.
22915        ///
22916        /// Returns `None` if the enum contains an unknown value deserialized from
22917        /// the integer representation of enums.
22918        pub fn name(&self) -> std::option::Option<&str> {
22919            match self {
22920                Self::Unspecified => std::option::Option::Some("CURRENT_STATE_UNSPECIFIED"),
22921                Self::Encrypted => std::option::Option::Some("CURRENT_STATE_ENCRYPTED"),
22922                Self::Decrypted => std::option::Option::Some("CURRENT_STATE_DECRYPTED"),
22923                Self::EncryptionPending => {
22924                    std::option::Option::Some("CURRENT_STATE_ENCRYPTION_PENDING")
22925                }
22926                Self::EncryptionError => {
22927                    std::option::Option::Some("CURRENT_STATE_ENCRYPTION_ERROR")
22928                }
22929                Self::DecryptionPending => {
22930                    std::option::Option::Some("CURRENT_STATE_DECRYPTION_PENDING")
22931                }
22932                Self::DecryptionError => {
22933                    std::option::Option::Some("CURRENT_STATE_DECRYPTION_ERROR")
22934                }
22935                Self::UnknownValue(u) => u.0.name(),
22936            }
22937        }
22938    }
22939
22940    impl std::default::Default for CurrentState {
22941        fn default() -> Self {
22942            use std::convert::From;
22943            Self::from(0)
22944        }
22945    }
22946
22947    impl std::fmt::Display for CurrentState {
22948        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22949            wkt::internal::display_enum(f, self.name(), self.value())
22950        }
22951    }
22952
22953    impl std::convert::From<i32> for CurrentState {
22954        fn from(value: i32) -> Self {
22955            match value {
22956                0 => Self::Unspecified,
22957                2 => Self::Decrypted,
22958                3 => Self::EncryptionPending,
22959                4 => Self::EncryptionError,
22960                5 => Self::DecryptionPending,
22961                6 => Self::DecryptionError,
22962                7 => Self::Encrypted,
22963                _ => Self::UnknownValue(current_state::UnknownValue(
22964                    wkt::internal::UnknownEnumValue::Integer(value),
22965                )),
22966            }
22967        }
22968    }
22969
22970    impl std::convert::From<&str> for CurrentState {
22971        fn from(value: &str) -> Self {
22972            use std::string::ToString;
22973            match value {
22974                "CURRENT_STATE_UNSPECIFIED" => Self::Unspecified,
22975                "CURRENT_STATE_ENCRYPTED" => Self::Encrypted,
22976                "CURRENT_STATE_DECRYPTED" => Self::Decrypted,
22977                "CURRENT_STATE_ENCRYPTION_PENDING" => Self::EncryptionPending,
22978                "CURRENT_STATE_ENCRYPTION_ERROR" => Self::EncryptionError,
22979                "CURRENT_STATE_DECRYPTION_PENDING" => Self::DecryptionPending,
22980                "CURRENT_STATE_DECRYPTION_ERROR" => Self::DecryptionError,
22981                _ => Self::UnknownValue(current_state::UnknownValue(
22982                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22983                )),
22984            }
22985        }
22986    }
22987
22988    impl serde::ser::Serialize for CurrentState {
22989        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22990        where
22991            S: serde::Serializer,
22992        {
22993            match self {
22994                Self::Unspecified => serializer.serialize_i32(0),
22995                Self::Encrypted => serializer.serialize_i32(7),
22996                Self::Decrypted => serializer.serialize_i32(2),
22997                Self::EncryptionPending => serializer.serialize_i32(3),
22998                Self::EncryptionError => serializer.serialize_i32(4),
22999                Self::DecryptionPending => serializer.serialize_i32(5),
23000                Self::DecryptionError => serializer.serialize_i32(6),
23001                Self::UnknownValue(u) => u.0.serialize(serializer),
23002            }
23003        }
23004    }
23005
23006    impl<'de> serde::de::Deserialize<'de> for CurrentState {
23007        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23008        where
23009            D: serde::Deserializer<'de>,
23010        {
23011            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CurrentState>::new(
23012                ".google.container.v1.DatabaseEncryption.CurrentState",
23013            ))
23014        }
23015    }
23016}
23017
23018/// ListUsableSubnetworksRequest requests the list of usable subnetworks
23019/// available to a user for creating clusters.
23020#[derive(Clone, Default, PartialEq)]
23021#[non_exhaustive]
23022pub struct ListUsableSubnetworksRequest {
23023    /// The parent project where subnetworks are usable.
23024    /// Specified in the format `projects/*`.
23025    pub parent: std::string::String,
23026
23027    /// Filtering currently only supports equality on the networkProjectId and must
23028    /// be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
23029    /// is the project which owns the listed subnetworks. This defaults to the
23030    /// parent project ID.
23031    pub filter: std::string::String,
23032
23033    /// The max number of results per page that should be returned. If the number
23034    /// of available results is larger than `page_size`, a `next_page_token` is
23035    /// returned which can be used to get the next page of results in subsequent
23036    /// requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
23037    pub page_size: i32,
23038
23039    /// Specifies a page token to use. Set this to the nextPageToken returned by
23040    /// previous list requests to get the next page of results.
23041    pub page_token: std::string::String,
23042
23043    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23044}
23045
23046impl ListUsableSubnetworksRequest {
23047    pub fn new() -> Self {
23048        std::default::Default::default()
23049    }
23050
23051    /// Sets the value of [parent][crate::model::ListUsableSubnetworksRequest::parent].
23052    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23053        self.parent = v.into();
23054        self
23055    }
23056
23057    /// Sets the value of [filter][crate::model::ListUsableSubnetworksRequest::filter].
23058    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23059        self.filter = v.into();
23060        self
23061    }
23062
23063    /// Sets the value of [page_size][crate::model::ListUsableSubnetworksRequest::page_size].
23064    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23065        self.page_size = v.into();
23066        self
23067    }
23068
23069    /// Sets the value of [page_token][crate::model::ListUsableSubnetworksRequest::page_token].
23070    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23071        self.page_token = v.into();
23072        self
23073    }
23074}
23075
23076impl wkt::message::Message for ListUsableSubnetworksRequest {
23077    fn typename() -> &'static str {
23078        "type.googleapis.com/google.container.v1.ListUsableSubnetworksRequest"
23079    }
23080}
23081
23082/// ListUsableSubnetworksResponse is the response of
23083/// ListUsableSubnetworksRequest.
23084#[derive(Clone, Default, PartialEq)]
23085#[non_exhaustive]
23086pub struct ListUsableSubnetworksResponse {
23087    /// A list of usable subnetworks in the specified network project.
23088    pub subnetworks: std::vec::Vec<crate::model::UsableSubnetwork>,
23089
23090    /// This token allows you to get the next page of results for list requests.
23091    /// If the number of results is larger than `page_size`, use the
23092    /// `next_page_token` as a value for the query parameter `page_token` in the
23093    /// next request. The value will become empty when there are no more pages.
23094    pub next_page_token: std::string::String,
23095
23096    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23097}
23098
23099impl ListUsableSubnetworksResponse {
23100    pub fn new() -> Self {
23101        std::default::Default::default()
23102    }
23103
23104    /// Sets the value of [subnetworks][crate::model::ListUsableSubnetworksResponse::subnetworks].
23105    pub fn set_subnetworks<T, V>(mut self, v: T) -> Self
23106    where
23107        T: std::iter::IntoIterator<Item = V>,
23108        V: std::convert::Into<crate::model::UsableSubnetwork>,
23109    {
23110        use std::iter::Iterator;
23111        self.subnetworks = v.into_iter().map(|i| i.into()).collect();
23112        self
23113    }
23114
23115    /// Sets the value of [next_page_token][crate::model::ListUsableSubnetworksResponse::next_page_token].
23116    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23117        self.next_page_token = v.into();
23118        self
23119    }
23120}
23121
23122impl wkt::message::Message for ListUsableSubnetworksResponse {
23123    fn typename() -> &'static str {
23124        "type.googleapis.com/google.container.v1.ListUsableSubnetworksResponse"
23125    }
23126}
23127
23128#[doc(hidden)]
23129impl gax::paginator::internal::PageableResponse for ListUsableSubnetworksResponse {
23130    type PageItem = crate::model::UsableSubnetwork;
23131
23132    fn items(self) -> std::vec::Vec<Self::PageItem> {
23133        self.subnetworks
23134    }
23135
23136    fn next_page_token(&self) -> std::string::String {
23137        use std::clone::Clone;
23138        self.next_page_token.clone()
23139    }
23140}
23141
23142/// Secondary IP range of a usable subnetwork.
23143#[derive(Clone, Default, PartialEq)]
23144#[non_exhaustive]
23145pub struct UsableSubnetworkSecondaryRange {
23146    /// The name associated with this subnetwork secondary range, used when adding
23147    /// an alias IP range to a VM instance.
23148    pub range_name: std::string::String,
23149
23150    /// The range of IP addresses belonging to this subnetwork secondary range.
23151    pub ip_cidr_range: std::string::String,
23152
23153    /// This field is to determine the status of the secondary range programmably.
23154    pub status: crate::model::usable_subnetwork_secondary_range::Status,
23155
23156    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23157}
23158
23159impl UsableSubnetworkSecondaryRange {
23160    pub fn new() -> Self {
23161        std::default::Default::default()
23162    }
23163
23164    /// Sets the value of [range_name][crate::model::UsableSubnetworkSecondaryRange::range_name].
23165    pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23166        self.range_name = v.into();
23167        self
23168    }
23169
23170    /// Sets the value of [ip_cidr_range][crate::model::UsableSubnetworkSecondaryRange::ip_cidr_range].
23171    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23172        self.ip_cidr_range = v.into();
23173        self
23174    }
23175
23176    /// Sets the value of [status][crate::model::UsableSubnetworkSecondaryRange::status].
23177    pub fn set_status<
23178        T: std::convert::Into<crate::model::usable_subnetwork_secondary_range::Status>,
23179    >(
23180        mut self,
23181        v: T,
23182    ) -> Self {
23183        self.status = v.into();
23184        self
23185    }
23186}
23187
23188impl wkt::message::Message for UsableSubnetworkSecondaryRange {
23189    fn typename() -> &'static str {
23190        "type.googleapis.com/google.container.v1.UsableSubnetworkSecondaryRange"
23191    }
23192}
23193
23194/// Defines additional types related to [UsableSubnetworkSecondaryRange].
23195pub mod usable_subnetwork_secondary_range {
23196    #[allow(unused_imports)]
23197    use super::*;
23198
23199    /// Status shows the current usage of a secondary IP range.
23200    ///
23201    /// # Working with unknown values
23202    ///
23203    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23204    /// additional enum variants at any time. Adding new variants is not considered
23205    /// a breaking change. Applications should write their code in anticipation of:
23206    ///
23207    /// - New values appearing in future releases of the client library, **and**
23208    /// - New values received dynamically, without application changes.
23209    ///
23210    /// Please consult the [Working with enums] section in the user guide for some
23211    /// guidelines.
23212    ///
23213    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23214    #[derive(Clone, Debug, PartialEq)]
23215    #[non_exhaustive]
23216    pub enum Status {
23217        /// UNKNOWN is the zero value of the Status enum. It's not a valid status.
23218        Unknown,
23219        /// UNUSED denotes that this range is unclaimed by any cluster.
23220        Unused,
23221        /// IN_USE_SERVICE denotes that this range is claimed by cluster(s) for
23222        /// services. User-managed services range can be shared between clusters
23223        /// within the same subnetwork.
23224        InUseService,
23225        /// IN_USE_SHAREABLE_POD denotes this range was created by the network admin
23226        /// and is currently claimed by a cluster for pods. It can only be used by
23227        /// other clusters as a pod range.
23228        InUseShareablePod,
23229        /// IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed
23230        /// for pods. It cannot be used for other clusters.
23231        InUseManagedPod,
23232        /// If set, the enum was initialized with an unknown value.
23233        ///
23234        /// Applications can examine the value using [Status::value] or
23235        /// [Status::name].
23236        UnknownValue(status::UnknownValue),
23237    }
23238
23239    #[doc(hidden)]
23240    pub mod status {
23241        #[allow(unused_imports)]
23242        use super::*;
23243        #[derive(Clone, Debug, PartialEq)]
23244        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23245    }
23246
23247    impl Status {
23248        /// Gets the enum value.
23249        ///
23250        /// Returns `None` if the enum contains an unknown value deserialized from
23251        /// the string representation of enums.
23252        pub fn value(&self) -> std::option::Option<i32> {
23253            match self {
23254                Self::Unknown => std::option::Option::Some(0),
23255                Self::Unused => std::option::Option::Some(1),
23256                Self::InUseService => std::option::Option::Some(2),
23257                Self::InUseShareablePod => std::option::Option::Some(3),
23258                Self::InUseManagedPod => std::option::Option::Some(4),
23259                Self::UnknownValue(u) => u.0.value(),
23260            }
23261        }
23262
23263        /// Gets the enum value as a string.
23264        ///
23265        /// Returns `None` if the enum contains an unknown value deserialized from
23266        /// the integer representation of enums.
23267        pub fn name(&self) -> std::option::Option<&str> {
23268            match self {
23269                Self::Unknown => std::option::Option::Some("UNKNOWN"),
23270                Self::Unused => std::option::Option::Some("UNUSED"),
23271                Self::InUseService => std::option::Option::Some("IN_USE_SERVICE"),
23272                Self::InUseShareablePod => std::option::Option::Some("IN_USE_SHAREABLE_POD"),
23273                Self::InUseManagedPod => std::option::Option::Some("IN_USE_MANAGED_POD"),
23274                Self::UnknownValue(u) => u.0.name(),
23275            }
23276        }
23277    }
23278
23279    impl std::default::Default for Status {
23280        fn default() -> Self {
23281            use std::convert::From;
23282            Self::from(0)
23283        }
23284    }
23285
23286    impl std::fmt::Display for Status {
23287        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23288            wkt::internal::display_enum(f, self.name(), self.value())
23289        }
23290    }
23291
23292    impl std::convert::From<i32> for Status {
23293        fn from(value: i32) -> Self {
23294            match value {
23295                0 => Self::Unknown,
23296                1 => Self::Unused,
23297                2 => Self::InUseService,
23298                3 => Self::InUseShareablePod,
23299                4 => Self::InUseManagedPod,
23300                _ => Self::UnknownValue(status::UnknownValue(
23301                    wkt::internal::UnknownEnumValue::Integer(value),
23302                )),
23303            }
23304        }
23305    }
23306
23307    impl std::convert::From<&str> for Status {
23308        fn from(value: &str) -> Self {
23309            use std::string::ToString;
23310            match value {
23311                "UNKNOWN" => Self::Unknown,
23312                "UNUSED" => Self::Unused,
23313                "IN_USE_SERVICE" => Self::InUseService,
23314                "IN_USE_SHAREABLE_POD" => Self::InUseShareablePod,
23315                "IN_USE_MANAGED_POD" => Self::InUseManagedPod,
23316                _ => Self::UnknownValue(status::UnknownValue(
23317                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23318                )),
23319            }
23320        }
23321    }
23322
23323    impl serde::ser::Serialize for Status {
23324        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23325        where
23326            S: serde::Serializer,
23327        {
23328            match self {
23329                Self::Unknown => serializer.serialize_i32(0),
23330                Self::Unused => serializer.serialize_i32(1),
23331                Self::InUseService => serializer.serialize_i32(2),
23332                Self::InUseShareablePod => serializer.serialize_i32(3),
23333                Self::InUseManagedPod => serializer.serialize_i32(4),
23334                Self::UnknownValue(u) => u.0.serialize(serializer),
23335            }
23336        }
23337    }
23338
23339    impl<'de> serde::de::Deserialize<'de> for Status {
23340        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23341        where
23342            D: serde::Deserializer<'de>,
23343        {
23344            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
23345                ".google.container.v1.UsableSubnetworkSecondaryRange.Status",
23346            ))
23347        }
23348    }
23349}
23350
23351/// UsableSubnetwork resource returns the subnetwork name, its associated network
23352/// and the primary CIDR range.
23353#[derive(Clone, Default, PartialEq)]
23354#[non_exhaustive]
23355pub struct UsableSubnetwork {
23356    /// Subnetwork Name.
23357    /// Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
23358    pub subnetwork: std::string::String,
23359
23360    /// Network Name.
23361    /// Example: projects/my-project/global/networks/my-network
23362    pub network: std::string::String,
23363
23364    /// The range of internal addresses that are owned by this subnetwork.
23365    pub ip_cidr_range: std::string::String,
23366
23367    /// Secondary IP ranges.
23368    pub secondary_ip_ranges: std::vec::Vec<crate::model::UsableSubnetworkSecondaryRange>,
23369
23370    /// A human readable status message representing the reasons for cases where
23371    /// the caller cannot use the secondary ranges under the subnet. For example if
23372    /// the secondary_ip_ranges is empty due to a permission issue, an insufficient
23373    /// permission message will be given by status_message.
23374    pub status_message: std::string::String,
23375
23376    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23377}
23378
23379impl UsableSubnetwork {
23380    pub fn new() -> Self {
23381        std::default::Default::default()
23382    }
23383
23384    /// Sets the value of [subnetwork][crate::model::UsableSubnetwork::subnetwork].
23385    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23386        self.subnetwork = v.into();
23387        self
23388    }
23389
23390    /// Sets the value of [network][crate::model::UsableSubnetwork::network].
23391    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23392        self.network = v.into();
23393        self
23394    }
23395
23396    /// Sets the value of [ip_cidr_range][crate::model::UsableSubnetwork::ip_cidr_range].
23397    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23398        self.ip_cidr_range = v.into();
23399        self
23400    }
23401
23402    /// Sets the value of [secondary_ip_ranges][crate::model::UsableSubnetwork::secondary_ip_ranges].
23403    pub fn set_secondary_ip_ranges<T, V>(mut self, v: T) -> Self
23404    where
23405        T: std::iter::IntoIterator<Item = V>,
23406        V: std::convert::Into<crate::model::UsableSubnetworkSecondaryRange>,
23407    {
23408        use std::iter::Iterator;
23409        self.secondary_ip_ranges = v.into_iter().map(|i| i.into()).collect();
23410        self
23411    }
23412
23413    /// Sets the value of [status_message][crate::model::UsableSubnetwork::status_message].
23414    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23415        self.status_message = v.into();
23416        self
23417    }
23418}
23419
23420impl wkt::message::Message for UsableSubnetwork {
23421    fn typename() -> &'static str {
23422        "type.googleapis.com/google.container.v1.UsableSubnetwork"
23423    }
23424}
23425
23426/// Configuration for exporting cluster resource usages.
23427#[derive(Clone, Default, PartialEq)]
23428#[non_exhaustive]
23429pub struct ResourceUsageExportConfig {
23430    /// Configuration to use BigQuery as usage export destination.
23431    pub bigquery_destination:
23432        std::option::Option<crate::model::resource_usage_export_config::BigQueryDestination>,
23433
23434    /// Whether to enable network egress metering for this cluster. If enabled, a
23435    /// daemonset will be created in the cluster to meter network egress traffic.
23436    pub enable_network_egress_metering: bool,
23437
23438    /// Configuration to enable resource consumption metering.
23439    pub consumption_metering_config:
23440        std::option::Option<crate::model::resource_usage_export_config::ConsumptionMeteringConfig>,
23441
23442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23443}
23444
23445impl ResourceUsageExportConfig {
23446    pub fn new() -> Self {
23447        std::default::Default::default()
23448    }
23449
23450    /// Sets the value of [bigquery_destination][crate::model::ResourceUsageExportConfig::bigquery_destination].
23451    pub fn set_bigquery_destination<T>(mut self, v: T) -> Self
23452    where
23453        T: std::convert::Into<crate::model::resource_usage_export_config::BigQueryDestination>,
23454    {
23455        self.bigquery_destination = std::option::Option::Some(v.into());
23456        self
23457    }
23458
23459    /// Sets or clears the value of [bigquery_destination][crate::model::ResourceUsageExportConfig::bigquery_destination].
23460    pub fn set_or_clear_bigquery_destination<T>(mut self, v: std::option::Option<T>) -> Self
23461    where
23462        T: std::convert::Into<crate::model::resource_usage_export_config::BigQueryDestination>,
23463    {
23464        self.bigquery_destination = v.map(|x| x.into());
23465        self
23466    }
23467
23468    /// Sets the value of [enable_network_egress_metering][crate::model::ResourceUsageExportConfig::enable_network_egress_metering].
23469    pub fn set_enable_network_egress_metering<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23470        self.enable_network_egress_metering = v.into();
23471        self
23472    }
23473
23474    /// Sets the value of [consumption_metering_config][crate::model::ResourceUsageExportConfig::consumption_metering_config].
23475    pub fn set_consumption_metering_config<T>(mut self, v: T) -> Self
23476    where
23477        T: std::convert::Into<
23478                crate::model::resource_usage_export_config::ConsumptionMeteringConfig,
23479            >,
23480    {
23481        self.consumption_metering_config = std::option::Option::Some(v.into());
23482        self
23483    }
23484
23485    /// Sets or clears the value of [consumption_metering_config][crate::model::ResourceUsageExportConfig::consumption_metering_config].
23486    pub fn set_or_clear_consumption_metering_config<T>(mut self, v: std::option::Option<T>) -> Self
23487    where
23488        T: std::convert::Into<
23489                crate::model::resource_usage_export_config::ConsumptionMeteringConfig,
23490            >,
23491    {
23492        self.consumption_metering_config = v.map(|x| x.into());
23493        self
23494    }
23495}
23496
23497impl wkt::message::Message for ResourceUsageExportConfig {
23498    fn typename() -> &'static str {
23499        "type.googleapis.com/google.container.v1.ResourceUsageExportConfig"
23500    }
23501}
23502
23503/// Defines additional types related to [ResourceUsageExportConfig].
23504pub mod resource_usage_export_config {
23505    #[allow(unused_imports)]
23506    use super::*;
23507
23508    /// Parameters for using BigQuery as the destination of resource usage export.
23509    #[derive(Clone, Default, PartialEq)]
23510    #[non_exhaustive]
23511    pub struct BigQueryDestination {
23512        /// The ID of a BigQuery Dataset.
23513        pub dataset_id: std::string::String,
23514
23515        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23516    }
23517
23518    impl BigQueryDestination {
23519        pub fn new() -> Self {
23520            std::default::Default::default()
23521        }
23522
23523        /// Sets the value of [dataset_id][crate::model::resource_usage_export_config::BigQueryDestination::dataset_id].
23524        pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23525            self.dataset_id = v.into();
23526            self
23527        }
23528    }
23529
23530    impl wkt::message::Message for BigQueryDestination {
23531        fn typename() -> &'static str {
23532            "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.BigQueryDestination"
23533        }
23534    }
23535
23536    /// Parameters for controlling consumption metering.
23537    #[derive(Clone, Default, PartialEq)]
23538    #[non_exhaustive]
23539    pub struct ConsumptionMeteringConfig {
23540        /// Whether to enable consumption metering for this cluster. If enabled, a
23541        /// second BigQuery table will be created to hold resource consumption
23542        /// records.
23543        pub enabled: bool,
23544
23545        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23546    }
23547
23548    impl ConsumptionMeteringConfig {
23549        pub fn new() -> Self {
23550            std::default::Default::default()
23551        }
23552
23553        /// Sets the value of [enabled][crate::model::resource_usage_export_config::ConsumptionMeteringConfig::enabled].
23554        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23555            self.enabled = v.into();
23556            self
23557        }
23558    }
23559
23560    impl wkt::message::Message for ConsumptionMeteringConfig {
23561        fn typename() -> &'static str {
23562            "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig"
23563        }
23564    }
23565}
23566
23567/// VerticalPodAutoscaling contains global, per-cluster information
23568/// required by Vertical Pod Autoscaler to automatically adjust
23569/// the resources of pods controlled by it.
23570#[derive(Clone, Default, PartialEq)]
23571#[non_exhaustive]
23572pub struct VerticalPodAutoscaling {
23573    /// Enables vertical pod autoscaling.
23574    pub enabled: bool,
23575
23576    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23577}
23578
23579impl VerticalPodAutoscaling {
23580    pub fn new() -> Self {
23581        std::default::Default::default()
23582    }
23583
23584    /// Sets the value of [enabled][crate::model::VerticalPodAutoscaling::enabled].
23585    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23586        self.enabled = v.into();
23587        self
23588    }
23589}
23590
23591impl wkt::message::Message for VerticalPodAutoscaling {
23592    fn typename() -> &'static str {
23593        "type.googleapis.com/google.container.v1.VerticalPodAutoscaling"
23594    }
23595}
23596
23597/// DefaultSnatStatus contains the desired state of whether default sNAT should
23598/// be disabled on the cluster.
23599#[derive(Clone, Default, PartialEq)]
23600#[non_exhaustive]
23601pub struct DefaultSnatStatus {
23602    /// Disables cluster default sNAT rules.
23603    pub disabled: bool,
23604
23605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23606}
23607
23608impl DefaultSnatStatus {
23609    pub fn new() -> Self {
23610        std::default::Default::default()
23611    }
23612
23613    /// Sets the value of [disabled][crate::model::DefaultSnatStatus::disabled].
23614    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23615        self.disabled = v.into();
23616        self
23617    }
23618}
23619
23620impl wkt::message::Message for DefaultSnatStatus {
23621    fn typename() -> &'static str {
23622        "type.googleapis.com/google.container.v1.DefaultSnatStatus"
23623    }
23624}
23625
23626/// Configuration of Shielded Nodes feature.
23627#[derive(Clone, Default, PartialEq)]
23628#[non_exhaustive]
23629pub struct ShieldedNodes {
23630    /// Whether Shielded Nodes features are enabled on all nodes in this cluster.
23631    pub enabled: bool,
23632
23633    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23634}
23635
23636impl ShieldedNodes {
23637    pub fn new() -> Self {
23638        std::default::Default::default()
23639    }
23640
23641    /// Sets the value of [enabled][crate::model::ShieldedNodes::enabled].
23642    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23643        self.enabled = v.into();
23644        self
23645    }
23646}
23647
23648impl wkt::message::Message for ShieldedNodes {
23649    fn typename() -> &'static str {
23650        "type.googleapis.com/google.container.v1.ShieldedNodes"
23651    }
23652}
23653
23654/// Configuration of gVNIC feature.
23655#[derive(Clone, Default, PartialEq)]
23656#[non_exhaustive]
23657pub struct VirtualNIC {
23658    /// Whether gVNIC features are enabled in the node pool.
23659    pub enabled: bool,
23660
23661    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23662}
23663
23664impl VirtualNIC {
23665    pub fn new() -> Self {
23666        std::default::Default::default()
23667    }
23668
23669    /// Sets the value of [enabled][crate::model::VirtualNIC::enabled].
23670    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23671        self.enabled = v.into();
23672        self
23673    }
23674}
23675
23676impl wkt::message::Message for VirtualNIC {
23677    fn typename() -> &'static str {
23678        "type.googleapis.com/google.container.v1.VirtualNIC"
23679    }
23680}
23681
23682/// Configuration of Fast Socket feature.
23683#[derive(Clone, Default, PartialEq)]
23684#[non_exhaustive]
23685pub struct FastSocket {
23686    /// Whether Fast Socket features are enabled in the node pool.
23687    pub enabled: bool,
23688
23689    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23690}
23691
23692impl FastSocket {
23693    pub fn new() -> Self {
23694        std::default::Default::default()
23695    }
23696
23697    /// Sets the value of [enabled][crate::model::FastSocket::enabled].
23698    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23699        self.enabled = v.into();
23700        self
23701    }
23702}
23703
23704impl wkt::message::Message for FastSocket {
23705    fn typename() -> &'static str {
23706        "type.googleapis.com/google.container.v1.FastSocket"
23707    }
23708}
23709
23710/// NotificationConfig is the configuration of notifications.
23711#[derive(Clone, Default, PartialEq)]
23712#[non_exhaustive]
23713pub struct NotificationConfig {
23714    /// Notification config for Pub/Sub.
23715    pub pubsub: std::option::Option<crate::model::notification_config::PubSub>,
23716
23717    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23718}
23719
23720impl NotificationConfig {
23721    pub fn new() -> Self {
23722        std::default::Default::default()
23723    }
23724
23725    /// Sets the value of [pubsub][crate::model::NotificationConfig::pubsub].
23726    pub fn set_pubsub<T>(mut self, v: T) -> Self
23727    where
23728        T: std::convert::Into<crate::model::notification_config::PubSub>,
23729    {
23730        self.pubsub = std::option::Option::Some(v.into());
23731        self
23732    }
23733
23734    /// Sets or clears the value of [pubsub][crate::model::NotificationConfig::pubsub].
23735    pub fn set_or_clear_pubsub<T>(mut self, v: std::option::Option<T>) -> Self
23736    where
23737        T: std::convert::Into<crate::model::notification_config::PubSub>,
23738    {
23739        self.pubsub = v.map(|x| x.into());
23740        self
23741    }
23742}
23743
23744impl wkt::message::Message for NotificationConfig {
23745    fn typename() -> &'static str {
23746        "type.googleapis.com/google.container.v1.NotificationConfig"
23747    }
23748}
23749
23750/// Defines additional types related to [NotificationConfig].
23751pub mod notification_config {
23752    #[allow(unused_imports)]
23753    use super::*;
23754
23755    /// Pub/Sub specific notification config.
23756    #[derive(Clone, Default, PartialEq)]
23757    #[non_exhaustive]
23758    pub struct PubSub {
23759        /// Enable notifications for Pub/Sub.
23760        pub enabled: bool,
23761
23762        /// The desired Pub/Sub topic to which notifications will be
23763        /// sent by GKE. Format is `projects/{project}/topics/{topic}`.
23764        pub topic: std::string::String,
23765
23766        /// Allows filtering to one or more specific event types. If no filter is
23767        /// specified, or if a filter is specified with no event types, all event
23768        /// types will be sent
23769        pub filter: std::option::Option<crate::model::notification_config::Filter>,
23770
23771        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23772    }
23773
23774    impl PubSub {
23775        pub fn new() -> Self {
23776            std::default::Default::default()
23777        }
23778
23779        /// Sets the value of [enabled][crate::model::notification_config::PubSub::enabled].
23780        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23781            self.enabled = v.into();
23782            self
23783        }
23784
23785        /// Sets the value of [topic][crate::model::notification_config::PubSub::topic].
23786        pub fn set_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23787            self.topic = v.into();
23788            self
23789        }
23790
23791        /// Sets the value of [filter][crate::model::notification_config::PubSub::filter].
23792        pub fn set_filter<T>(mut self, v: T) -> Self
23793        where
23794            T: std::convert::Into<crate::model::notification_config::Filter>,
23795        {
23796            self.filter = std::option::Option::Some(v.into());
23797            self
23798        }
23799
23800        /// Sets or clears the value of [filter][crate::model::notification_config::PubSub::filter].
23801        pub fn set_or_clear_filter<T>(mut self, v: std::option::Option<T>) -> Self
23802        where
23803            T: std::convert::Into<crate::model::notification_config::Filter>,
23804        {
23805            self.filter = v.map(|x| x.into());
23806            self
23807        }
23808    }
23809
23810    impl wkt::message::Message for PubSub {
23811        fn typename() -> &'static str {
23812            "type.googleapis.com/google.container.v1.NotificationConfig.PubSub"
23813        }
23814    }
23815
23816    /// Allows filtering to one or more specific event types. If event types are
23817    /// present, those and only those event types will be transmitted to the
23818    /// cluster. Other types will be skipped. If no filter is specified, or no
23819    /// event types are present, all event types will be sent
23820    #[derive(Clone, Default, PartialEq)]
23821    #[non_exhaustive]
23822    pub struct Filter {
23823        /// Event types to allowlist.
23824        pub event_type: std::vec::Vec<crate::model::notification_config::EventType>,
23825
23826        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23827    }
23828
23829    impl Filter {
23830        pub fn new() -> Self {
23831            std::default::Default::default()
23832        }
23833
23834        /// Sets the value of [event_type][crate::model::notification_config::Filter::event_type].
23835        pub fn set_event_type<T, V>(mut self, v: T) -> Self
23836        where
23837            T: std::iter::IntoIterator<Item = V>,
23838            V: std::convert::Into<crate::model::notification_config::EventType>,
23839        {
23840            use std::iter::Iterator;
23841            self.event_type = v.into_iter().map(|i| i.into()).collect();
23842            self
23843        }
23844    }
23845
23846    impl wkt::message::Message for Filter {
23847        fn typename() -> &'static str {
23848            "type.googleapis.com/google.container.v1.NotificationConfig.Filter"
23849        }
23850    }
23851
23852    /// Types of notifications currently supported. Can be used to filter what
23853    /// notifications are sent.
23854    ///
23855    /// # Working with unknown values
23856    ///
23857    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23858    /// additional enum variants at any time. Adding new variants is not considered
23859    /// a breaking change. Applications should write their code in anticipation of:
23860    ///
23861    /// - New values appearing in future releases of the client library, **and**
23862    /// - New values received dynamically, without application changes.
23863    ///
23864    /// Please consult the [Working with enums] section in the user guide for some
23865    /// guidelines.
23866    ///
23867    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23868    #[derive(Clone, Debug, PartialEq)]
23869    #[non_exhaustive]
23870    pub enum EventType {
23871        /// Not set, will be ignored.
23872        Unspecified,
23873        /// Corresponds with UpgradeAvailableEvent.
23874        UpgradeAvailableEvent,
23875        /// Corresponds with UpgradeEvent.
23876        UpgradeEvent,
23877        /// Corresponds with SecurityBulletinEvent.
23878        SecurityBulletinEvent,
23879        /// Corresponds with UpgradeInfoEvent.
23880        UpgradeInfoEvent,
23881        /// If set, the enum was initialized with an unknown value.
23882        ///
23883        /// Applications can examine the value using [EventType::value] or
23884        /// [EventType::name].
23885        UnknownValue(event_type::UnknownValue),
23886    }
23887
23888    #[doc(hidden)]
23889    pub mod event_type {
23890        #[allow(unused_imports)]
23891        use super::*;
23892        #[derive(Clone, Debug, PartialEq)]
23893        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23894    }
23895
23896    impl EventType {
23897        /// Gets the enum value.
23898        ///
23899        /// Returns `None` if the enum contains an unknown value deserialized from
23900        /// the string representation of enums.
23901        pub fn value(&self) -> std::option::Option<i32> {
23902            match self {
23903                Self::Unspecified => std::option::Option::Some(0),
23904                Self::UpgradeAvailableEvent => std::option::Option::Some(1),
23905                Self::UpgradeEvent => std::option::Option::Some(2),
23906                Self::SecurityBulletinEvent => std::option::Option::Some(3),
23907                Self::UpgradeInfoEvent => std::option::Option::Some(4),
23908                Self::UnknownValue(u) => u.0.value(),
23909            }
23910        }
23911
23912        /// Gets the enum value as a string.
23913        ///
23914        /// Returns `None` if the enum contains an unknown value deserialized from
23915        /// the integer representation of enums.
23916        pub fn name(&self) -> std::option::Option<&str> {
23917            match self {
23918                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
23919                Self::UpgradeAvailableEvent => std::option::Option::Some("UPGRADE_AVAILABLE_EVENT"),
23920                Self::UpgradeEvent => std::option::Option::Some("UPGRADE_EVENT"),
23921                Self::SecurityBulletinEvent => std::option::Option::Some("SECURITY_BULLETIN_EVENT"),
23922                Self::UpgradeInfoEvent => std::option::Option::Some("UPGRADE_INFO_EVENT"),
23923                Self::UnknownValue(u) => u.0.name(),
23924            }
23925        }
23926    }
23927
23928    impl std::default::Default for EventType {
23929        fn default() -> Self {
23930            use std::convert::From;
23931            Self::from(0)
23932        }
23933    }
23934
23935    impl std::fmt::Display for EventType {
23936        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23937            wkt::internal::display_enum(f, self.name(), self.value())
23938        }
23939    }
23940
23941    impl std::convert::From<i32> for EventType {
23942        fn from(value: i32) -> Self {
23943            match value {
23944                0 => Self::Unspecified,
23945                1 => Self::UpgradeAvailableEvent,
23946                2 => Self::UpgradeEvent,
23947                3 => Self::SecurityBulletinEvent,
23948                4 => Self::UpgradeInfoEvent,
23949                _ => Self::UnknownValue(event_type::UnknownValue(
23950                    wkt::internal::UnknownEnumValue::Integer(value),
23951                )),
23952            }
23953        }
23954    }
23955
23956    impl std::convert::From<&str> for EventType {
23957        fn from(value: &str) -> Self {
23958            use std::string::ToString;
23959            match value {
23960                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
23961                "UPGRADE_AVAILABLE_EVENT" => Self::UpgradeAvailableEvent,
23962                "UPGRADE_EVENT" => Self::UpgradeEvent,
23963                "SECURITY_BULLETIN_EVENT" => Self::SecurityBulletinEvent,
23964                "UPGRADE_INFO_EVENT" => Self::UpgradeInfoEvent,
23965                _ => Self::UnknownValue(event_type::UnknownValue(
23966                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23967                )),
23968            }
23969        }
23970    }
23971
23972    impl serde::ser::Serialize for EventType {
23973        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23974        where
23975            S: serde::Serializer,
23976        {
23977            match self {
23978                Self::Unspecified => serializer.serialize_i32(0),
23979                Self::UpgradeAvailableEvent => serializer.serialize_i32(1),
23980                Self::UpgradeEvent => serializer.serialize_i32(2),
23981                Self::SecurityBulletinEvent => serializer.serialize_i32(3),
23982                Self::UpgradeInfoEvent => serializer.serialize_i32(4),
23983                Self::UnknownValue(u) => u.0.serialize(serializer),
23984            }
23985        }
23986    }
23987
23988    impl<'de> serde::de::Deserialize<'de> for EventType {
23989        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23990        where
23991            D: serde::Deserializer<'de>,
23992        {
23993            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
23994                ".google.container.v1.NotificationConfig.EventType",
23995            ))
23996        }
23997    }
23998}
23999
24000/// ConfidentialNodes is configuration for the confidential nodes feature, which
24001/// makes nodes run on confidential VMs.
24002#[derive(Clone, Default, PartialEq)]
24003#[non_exhaustive]
24004pub struct ConfidentialNodes {
24005    /// Whether Confidential Nodes feature is enabled.
24006    pub enabled: bool,
24007
24008    /// Defines the type of technology used by the confidential node.
24009    pub confidential_instance_type: crate::model::confidential_nodes::ConfidentialInstanceType,
24010
24011    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24012}
24013
24014impl ConfidentialNodes {
24015    pub fn new() -> Self {
24016        std::default::Default::default()
24017    }
24018
24019    /// Sets the value of [enabled][crate::model::ConfidentialNodes::enabled].
24020    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24021        self.enabled = v.into();
24022        self
24023    }
24024
24025    /// Sets the value of [confidential_instance_type][crate::model::ConfidentialNodes::confidential_instance_type].
24026    pub fn set_confidential_instance_type<
24027        T: std::convert::Into<crate::model::confidential_nodes::ConfidentialInstanceType>,
24028    >(
24029        mut self,
24030        v: T,
24031    ) -> Self {
24032        self.confidential_instance_type = v.into();
24033        self
24034    }
24035}
24036
24037impl wkt::message::Message for ConfidentialNodes {
24038    fn typename() -> &'static str {
24039        "type.googleapis.com/google.container.v1.ConfidentialNodes"
24040    }
24041}
24042
24043/// Defines additional types related to [ConfidentialNodes].
24044pub mod confidential_nodes {
24045    #[allow(unused_imports)]
24046    use super::*;
24047
24048    /// The type of technology used by the confidential node.
24049    ///
24050    /// # Working with unknown values
24051    ///
24052    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24053    /// additional enum variants at any time. Adding new variants is not considered
24054    /// a breaking change. Applications should write their code in anticipation of:
24055    ///
24056    /// - New values appearing in future releases of the client library, **and**
24057    /// - New values received dynamically, without application changes.
24058    ///
24059    /// Please consult the [Working with enums] section in the user guide for some
24060    /// guidelines.
24061    ///
24062    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24063    #[derive(Clone, Debug, PartialEq)]
24064    #[non_exhaustive]
24065    pub enum ConfidentialInstanceType {
24066        /// No type specified. Do not use this value.
24067        Unspecified,
24068        /// AMD Secure Encrypted Virtualization.
24069        Sev,
24070        /// AMD Secure Encrypted Virtualization - Secure Nested Paging.
24071        SevSnp,
24072        /// Intel Trust Domain eXtension.
24073        Tdx,
24074        /// If set, the enum was initialized with an unknown value.
24075        ///
24076        /// Applications can examine the value using [ConfidentialInstanceType::value] or
24077        /// [ConfidentialInstanceType::name].
24078        UnknownValue(confidential_instance_type::UnknownValue),
24079    }
24080
24081    #[doc(hidden)]
24082    pub mod confidential_instance_type {
24083        #[allow(unused_imports)]
24084        use super::*;
24085        #[derive(Clone, Debug, PartialEq)]
24086        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24087    }
24088
24089    impl ConfidentialInstanceType {
24090        /// Gets the enum value.
24091        ///
24092        /// Returns `None` if the enum contains an unknown value deserialized from
24093        /// the string representation of enums.
24094        pub fn value(&self) -> std::option::Option<i32> {
24095            match self {
24096                Self::Unspecified => std::option::Option::Some(0),
24097                Self::Sev => std::option::Option::Some(1),
24098                Self::SevSnp => std::option::Option::Some(2),
24099                Self::Tdx => std::option::Option::Some(3),
24100                Self::UnknownValue(u) => u.0.value(),
24101            }
24102        }
24103
24104        /// Gets the enum value as a string.
24105        ///
24106        /// Returns `None` if the enum contains an unknown value deserialized from
24107        /// the integer representation of enums.
24108        pub fn name(&self) -> std::option::Option<&str> {
24109            match self {
24110                Self::Unspecified => {
24111                    std::option::Option::Some("CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED")
24112                }
24113                Self::Sev => std::option::Option::Some("SEV"),
24114                Self::SevSnp => std::option::Option::Some("SEV_SNP"),
24115                Self::Tdx => std::option::Option::Some("TDX"),
24116                Self::UnknownValue(u) => u.0.name(),
24117            }
24118        }
24119    }
24120
24121    impl std::default::Default for ConfidentialInstanceType {
24122        fn default() -> Self {
24123            use std::convert::From;
24124            Self::from(0)
24125        }
24126    }
24127
24128    impl std::fmt::Display for ConfidentialInstanceType {
24129        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24130            wkt::internal::display_enum(f, self.name(), self.value())
24131        }
24132    }
24133
24134    impl std::convert::From<i32> for ConfidentialInstanceType {
24135        fn from(value: i32) -> Self {
24136            match value {
24137                0 => Self::Unspecified,
24138                1 => Self::Sev,
24139                2 => Self::SevSnp,
24140                3 => Self::Tdx,
24141                _ => Self::UnknownValue(confidential_instance_type::UnknownValue(
24142                    wkt::internal::UnknownEnumValue::Integer(value),
24143                )),
24144            }
24145        }
24146    }
24147
24148    impl std::convert::From<&str> for ConfidentialInstanceType {
24149        fn from(value: &str) -> Self {
24150            use std::string::ToString;
24151            match value {
24152                "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" => Self::Unspecified,
24153                "SEV" => Self::Sev,
24154                "SEV_SNP" => Self::SevSnp,
24155                "TDX" => Self::Tdx,
24156                _ => Self::UnknownValue(confidential_instance_type::UnknownValue(
24157                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24158                )),
24159            }
24160        }
24161    }
24162
24163    impl serde::ser::Serialize for ConfidentialInstanceType {
24164        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24165        where
24166            S: serde::Serializer,
24167        {
24168            match self {
24169                Self::Unspecified => serializer.serialize_i32(0),
24170                Self::Sev => serializer.serialize_i32(1),
24171                Self::SevSnp => serializer.serialize_i32(2),
24172                Self::Tdx => serializer.serialize_i32(3),
24173                Self::UnknownValue(u) => u.0.serialize(serializer),
24174            }
24175        }
24176    }
24177
24178    impl<'de> serde::de::Deserialize<'de> for ConfidentialInstanceType {
24179        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24180        where
24181            D: serde::Deserializer<'de>,
24182        {
24183            deserializer.deserialize_any(
24184                wkt::internal::EnumVisitor::<ConfidentialInstanceType>::new(
24185                    ".google.container.v1.ConfidentialNodes.ConfidentialInstanceType",
24186                ),
24187            )
24188        }
24189    }
24190}
24191
24192/// UpgradeEvent is a notification sent to customers by the cluster server when
24193/// a resource is upgrading.
24194#[derive(Clone, Default, PartialEq)]
24195#[non_exhaustive]
24196pub struct UpgradeEvent {
24197    /// The resource type that is upgrading.
24198    pub resource_type: crate::model::UpgradeResourceType,
24199
24200    /// The operation associated with this upgrade.
24201    pub operation: std::string::String,
24202
24203    /// The time when the operation was started.
24204    pub operation_start_time: std::option::Option<wkt::Timestamp>,
24205
24206    /// The current version before the upgrade.
24207    pub current_version: std::string::String,
24208
24209    /// The target version for the upgrade.
24210    pub target_version: std::string::String,
24211
24212    /// Optional relative path to the resource. For example in node pool upgrades,
24213    /// the relative path of the node pool.
24214    pub resource: std::string::String,
24215
24216    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24217}
24218
24219impl UpgradeEvent {
24220    pub fn new() -> Self {
24221        std::default::Default::default()
24222    }
24223
24224    /// Sets the value of [resource_type][crate::model::UpgradeEvent::resource_type].
24225    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
24226        mut self,
24227        v: T,
24228    ) -> Self {
24229        self.resource_type = v.into();
24230        self
24231    }
24232
24233    /// Sets the value of [operation][crate::model::UpgradeEvent::operation].
24234    pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24235        self.operation = v.into();
24236        self
24237    }
24238
24239    /// Sets the value of [operation_start_time][crate::model::UpgradeEvent::operation_start_time].
24240    pub fn set_operation_start_time<T>(mut self, v: T) -> Self
24241    where
24242        T: std::convert::Into<wkt::Timestamp>,
24243    {
24244        self.operation_start_time = std::option::Option::Some(v.into());
24245        self
24246    }
24247
24248    /// Sets or clears the value of [operation_start_time][crate::model::UpgradeEvent::operation_start_time].
24249    pub fn set_or_clear_operation_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24250    where
24251        T: std::convert::Into<wkt::Timestamp>,
24252    {
24253        self.operation_start_time = v.map(|x| x.into());
24254        self
24255    }
24256
24257    /// Sets the value of [current_version][crate::model::UpgradeEvent::current_version].
24258    pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24259        self.current_version = v.into();
24260        self
24261    }
24262
24263    /// Sets the value of [target_version][crate::model::UpgradeEvent::target_version].
24264    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24265        self.target_version = v.into();
24266        self
24267    }
24268
24269    /// Sets the value of [resource][crate::model::UpgradeEvent::resource].
24270    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24271        self.resource = v.into();
24272        self
24273    }
24274}
24275
24276impl wkt::message::Message for UpgradeEvent {
24277    fn typename() -> &'static str {
24278        "type.googleapis.com/google.container.v1.UpgradeEvent"
24279    }
24280}
24281
24282/// UpgradeInfoEvent is a notification sent to customers about the upgrade
24283/// information of a resource.
24284#[derive(Clone, Default, PartialEq)]
24285#[non_exhaustive]
24286pub struct UpgradeInfoEvent {
24287    /// The resource type associated with the upgrade.
24288    pub resource_type: crate::model::UpgradeResourceType,
24289
24290    /// The operation associated with this upgrade.
24291    pub operation: std::string::String,
24292
24293    /// The time when the operation was started.
24294    pub start_time: std::option::Option<wkt::Timestamp>,
24295
24296    /// The time when the operation ended.
24297    pub end_time: std::option::Option<wkt::Timestamp>,
24298
24299    /// The current version before the upgrade.
24300    pub current_version: std::string::String,
24301
24302    /// The target version for the upgrade.
24303    pub target_version: std::string::String,
24304
24305    /// Optional relative path to the resource. For example in node pool upgrades,
24306    /// the relative path of the node pool.
24307    pub resource: std::string::String,
24308
24309    /// Output only. The state of the upgrade.
24310    pub state: crate::model::upgrade_info_event::State,
24311
24312    /// The end of standard support timestamp.
24313    pub standard_support_end_time: std::option::Option<wkt::Timestamp>,
24314
24315    /// The end of extended support timestamp.
24316    pub extended_support_end_time: std::option::Option<wkt::Timestamp>,
24317
24318    /// A brief description of the event.
24319    pub description: std::string::String,
24320
24321    /// The type of the event.
24322    pub event_type: crate::model::upgrade_info_event::EventType,
24323
24324    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24325}
24326
24327impl UpgradeInfoEvent {
24328    pub fn new() -> Self {
24329        std::default::Default::default()
24330    }
24331
24332    /// Sets the value of [resource_type][crate::model::UpgradeInfoEvent::resource_type].
24333    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
24334        mut self,
24335        v: T,
24336    ) -> Self {
24337        self.resource_type = v.into();
24338        self
24339    }
24340
24341    /// Sets the value of [operation][crate::model::UpgradeInfoEvent::operation].
24342    pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24343        self.operation = v.into();
24344        self
24345    }
24346
24347    /// Sets the value of [start_time][crate::model::UpgradeInfoEvent::start_time].
24348    pub fn set_start_time<T>(mut self, v: T) -> Self
24349    where
24350        T: std::convert::Into<wkt::Timestamp>,
24351    {
24352        self.start_time = std::option::Option::Some(v.into());
24353        self
24354    }
24355
24356    /// Sets or clears the value of [start_time][crate::model::UpgradeInfoEvent::start_time].
24357    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24358    where
24359        T: std::convert::Into<wkt::Timestamp>,
24360    {
24361        self.start_time = v.map(|x| x.into());
24362        self
24363    }
24364
24365    /// Sets the value of [end_time][crate::model::UpgradeInfoEvent::end_time].
24366    pub fn set_end_time<T>(mut self, v: T) -> Self
24367    where
24368        T: std::convert::Into<wkt::Timestamp>,
24369    {
24370        self.end_time = std::option::Option::Some(v.into());
24371        self
24372    }
24373
24374    /// Sets or clears the value of [end_time][crate::model::UpgradeInfoEvent::end_time].
24375    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24376    where
24377        T: std::convert::Into<wkt::Timestamp>,
24378    {
24379        self.end_time = v.map(|x| x.into());
24380        self
24381    }
24382
24383    /// Sets the value of [current_version][crate::model::UpgradeInfoEvent::current_version].
24384    pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24385        self.current_version = v.into();
24386        self
24387    }
24388
24389    /// Sets the value of [target_version][crate::model::UpgradeInfoEvent::target_version].
24390    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24391        self.target_version = v.into();
24392        self
24393    }
24394
24395    /// Sets the value of [resource][crate::model::UpgradeInfoEvent::resource].
24396    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24397        self.resource = v.into();
24398        self
24399    }
24400
24401    /// Sets the value of [state][crate::model::UpgradeInfoEvent::state].
24402    pub fn set_state<T: std::convert::Into<crate::model::upgrade_info_event::State>>(
24403        mut self,
24404        v: T,
24405    ) -> Self {
24406        self.state = v.into();
24407        self
24408    }
24409
24410    /// Sets the value of [standard_support_end_time][crate::model::UpgradeInfoEvent::standard_support_end_time].
24411    pub fn set_standard_support_end_time<T>(mut self, v: T) -> Self
24412    where
24413        T: std::convert::Into<wkt::Timestamp>,
24414    {
24415        self.standard_support_end_time = std::option::Option::Some(v.into());
24416        self
24417    }
24418
24419    /// Sets or clears the value of [standard_support_end_time][crate::model::UpgradeInfoEvent::standard_support_end_time].
24420    pub fn set_or_clear_standard_support_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24421    where
24422        T: std::convert::Into<wkt::Timestamp>,
24423    {
24424        self.standard_support_end_time = v.map(|x| x.into());
24425        self
24426    }
24427
24428    /// Sets the value of [extended_support_end_time][crate::model::UpgradeInfoEvent::extended_support_end_time].
24429    pub fn set_extended_support_end_time<T>(mut self, v: T) -> Self
24430    where
24431        T: std::convert::Into<wkt::Timestamp>,
24432    {
24433        self.extended_support_end_time = std::option::Option::Some(v.into());
24434        self
24435    }
24436
24437    /// Sets or clears the value of [extended_support_end_time][crate::model::UpgradeInfoEvent::extended_support_end_time].
24438    pub fn set_or_clear_extended_support_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24439    where
24440        T: std::convert::Into<wkt::Timestamp>,
24441    {
24442        self.extended_support_end_time = v.map(|x| x.into());
24443        self
24444    }
24445
24446    /// Sets the value of [description][crate::model::UpgradeInfoEvent::description].
24447    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24448        self.description = v.into();
24449        self
24450    }
24451
24452    /// Sets the value of [event_type][crate::model::UpgradeInfoEvent::event_type].
24453    pub fn set_event_type<T: std::convert::Into<crate::model::upgrade_info_event::EventType>>(
24454        mut self,
24455        v: T,
24456    ) -> Self {
24457        self.event_type = v.into();
24458        self
24459    }
24460}
24461
24462impl wkt::message::Message for UpgradeInfoEvent {
24463    fn typename() -> &'static str {
24464        "type.googleapis.com/google.container.v1.UpgradeInfoEvent"
24465    }
24466}
24467
24468/// Defines additional types related to [UpgradeInfoEvent].
24469pub mod upgrade_info_event {
24470    #[allow(unused_imports)]
24471    use super::*;
24472
24473    /// The state of the upgrade.
24474    ///
24475    /// # Working with unknown values
24476    ///
24477    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24478    /// additional enum variants at any time. Adding new variants is not considered
24479    /// a breaking change. Applications should write their code in anticipation of:
24480    ///
24481    /// - New values appearing in future releases of the client library, **and**
24482    /// - New values received dynamically, without application changes.
24483    ///
24484    /// Please consult the [Working with enums] section in the user guide for some
24485    /// guidelines.
24486    ///
24487    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24488    #[derive(Clone, Debug, PartialEq)]
24489    #[non_exhaustive]
24490    pub enum State {
24491        /// STATE_UNSPECIFIED indicates the state is unspecified.
24492        Unspecified,
24493        /// STARTED indicates the upgrade has started.
24494        Started,
24495        /// SUCCEEDED indicates the upgrade has completed successfully.
24496        Succeeded,
24497        /// FAILED indicates the upgrade has failed.
24498        Failed,
24499        /// CANCELED indicates the upgrade has canceled.
24500        Canceled,
24501        /// If set, the enum was initialized with an unknown value.
24502        ///
24503        /// Applications can examine the value using [State::value] or
24504        /// [State::name].
24505        UnknownValue(state::UnknownValue),
24506    }
24507
24508    #[doc(hidden)]
24509    pub mod state {
24510        #[allow(unused_imports)]
24511        use super::*;
24512        #[derive(Clone, Debug, PartialEq)]
24513        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24514    }
24515
24516    impl State {
24517        /// Gets the enum value.
24518        ///
24519        /// Returns `None` if the enum contains an unknown value deserialized from
24520        /// the string representation of enums.
24521        pub fn value(&self) -> std::option::Option<i32> {
24522            match self {
24523                Self::Unspecified => std::option::Option::Some(0),
24524                Self::Started => std::option::Option::Some(3),
24525                Self::Succeeded => std::option::Option::Some(4),
24526                Self::Failed => std::option::Option::Some(5),
24527                Self::Canceled => std::option::Option::Some(6),
24528                Self::UnknownValue(u) => u.0.value(),
24529            }
24530        }
24531
24532        /// Gets the enum value as a string.
24533        ///
24534        /// Returns `None` if the enum contains an unknown value deserialized from
24535        /// the integer representation of enums.
24536        pub fn name(&self) -> std::option::Option<&str> {
24537            match self {
24538                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
24539                Self::Started => std::option::Option::Some("STARTED"),
24540                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
24541                Self::Failed => std::option::Option::Some("FAILED"),
24542                Self::Canceled => std::option::Option::Some("CANCELED"),
24543                Self::UnknownValue(u) => u.0.name(),
24544            }
24545        }
24546    }
24547
24548    impl std::default::Default for State {
24549        fn default() -> Self {
24550            use std::convert::From;
24551            Self::from(0)
24552        }
24553    }
24554
24555    impl std::fmt::Display for State {
24556        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24557            wkt::internal::display_enum(f, self.name(), self.value())
24558        }
24559    }
24560
24561    impl std::convert::From<i32> for State {
24562        fn from(value: i32) -> Self {
24563            match value {
24564                0 => Self::Unspecified,
24565                3 => Self::Started,
24566                4 => Self::Succeeded,
24567                5 => Self::Failed,
24568                6 => Self::Canceled,
24569                _ => Self::UnknownValue(state::UnknownValue(
24570                    wkt::internal::UnknownEnumValue::Integer(value),
24571                )),
24572            }
24573        }
24574    }
24575
24576    impl std::convert::From<&str> for State {
24577        fn from(value: &str) -> Self {
24578            use std::string::ToString;
24579            match value {
24580                "STATE_UNSPECIFIED" => Self::Unspecified,
24581                "STARTED" => Self::Started,
24582                "SUCCEEDED" => Self::Succeeded,
24583                "FAILED" => Self::Failed,
24584                "CANCELED" => Self::Canceled,
24585                _ => Self::UnknownValue(state::UnknownValue(
24586                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24587                )),
24588            }
24589        }
24590    }
24591
24592    impl serde::ser::Serialize for State {
24593        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24594        where
24595            S: serde::Serializer,
24596        {
24597            match self {
24598                Self::Unspecified => serializer.serialize_i32(0),
24599                Self::Started => serializer.serialize_i32(3),
24600                Self::Succeeded => serializer.serialize_i32(4),
24601                Self::Failed => serializer.serialize_i32(5),
24602                Self::Canceled => serializer.serialize_i32(6),
24603                Self::UnknownValue(u) => u.0.serialize(serializer),
24604            }
24605        }
24606    }
24607
24608    impl<'de> serde::de::Deserialize<'de> for State {
24609        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24610        where
24611            D: serde::Deserializer<'de>,
24612        {
24613            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
24614                ".google.container.v1.UpgradeInfoEvent.State",
24615            ))
24616        }
24617    }
24618
24619    /// The type of the event.
24620    ///
24621    /// # Working with unknown values
24622    ///
24623    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24624    /// additional enum variants at any time. Adding new variants is not considered
24625    /// a breaking change. Applications should write their code in anticipation of:
24626    ///
24627    /// - New values appearing in future releases of the client library, **and**
24628    /// - New values received dynamically, without application changes.
24629    ///
24630    /// Please consult the [Working with enums] section in the user guide for some
24631    /// guidelines.
24632    ///
24633    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24634    #[derive(Clone, Debug, PartialEq)]
24635    #[non_exhaustive]
24636    pub enum EventType {
24637        /// EVENT_TYPE_UNSPECIFIED indicates the event type is unspecified.
24638        Unspecified,
24639        /// END_OF_SUPPORT indicates GKE version reaches end of support, check
24640        /// standard_support_end_time and extended_support_end_time for more details.
24641        EndOfSupport,
24642        /// COS_MILESTONE_VERSION_UPDATE indicates that the COS node image will
24643        /// update COS milestone version for new patch versions starting with
24644        /// the one in the description.
24645        CosMilestoneVersionUpdate,
24646        /// UPGRADE_LIFECYCLE indicates the event is about the upgrade lifecycle.
24647        UpgradeLifecycle,
24648        /// If set, the enum was initialized with an unknown value.
24649        ///
24650        /// Applications can examine the value using [EventType::value] or
24651        /// [EventType::name].
24652        UnknownValue(event_type::UnknownValue),
24653    }
24654
24655    #[doc(hidden)]
24656    pub mod event_type {
24657        #[allow(unused_imports)]
24658        use super::*;
24659        #[derive(Clone, Debug, PartialEq)]
24660        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24661    }
24662
24663    impl EventType {
24664        /// Gets the enum value.
24665        ///
24666        /// Returns `None` if the enum contains an unknown value deserialized from
24667        /// the string representation of enums.
24668        pub fn value(&self) -> std::option::Option<i32> {
24669            match self {
24670                Self::Unspecified => std::option::Option::Some(0),
24671                Self::EndOfSupport => std::option::Option::Some(1),
24672                Self::CosMilestoneVersionUpdate => std::option::Option::Some(2),
24673                Self::UpgradeLifecycle => std::option::Option::Some(3),
24674                Self::UnknownValue(u) => u.0.value(),
24675            }
24676        }
24677
24678        /// Gets the enum value as a string.
24679        ///
24680        /// Returns `None` if the enum contains an unknown value deserialized from
24681        /// the integer representation of enums.
24682        pub fn name(&self) -> std::option::Option<&str> {
24683            match self {
24684                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
24685                Self::EndOfSupport => std::option::Option::Some("END_OF_SUPPORT"),
24686                Self::CosMilestoneVersionUpdate => {
24687                    std::option::Option::Some("COS_MILESTONE_VERSION_UPDATE")
24688                }
24689                Self::UpgradeLifecycle => std::option::Option::Some("UPGRADE_LIFECYCLE"),
24690                Self::UnknownValue(u) => u.0.name(),
24691            }
24692        }
24693    }
24694
24695    impl std::default::Default for EventType {
24696        fn default() -> Self {
24697            use std::convert::From;
24698            Self::from(0)
24699        }
24700    }
24701
24702    impl std::fmt::Display for EventType {
24703        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24704            wkt::internal::display_enum(f, self.name(), self.value())
24705        }
24706    }
24707
24708    impl std::convert::From<i32> for EventType {
24709        fn from(value: i32) -> Self {
24710            match value {
24711                0 => Self::Unspecified,
24712                1 => Self::EndOfSupport,
24713                2 => Self::CosMilestoneVersionUpdate,
24714                3 => Self::UpgradeLifecycle,
24715                _ => Self::UnknownValue(event_type::UnknownValue(
24716                    wkt::internal::UnknownEnumValue::Integer(value),
24717                )),
24718            }
24719        }
24720    }
24721
24722    impl std::convert::From<&str> for EventType {
24723        fn from(value: &str) -> Self {
24724            use std::string::ToString;
24725            match value {
24726                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
24727                "END_OF_SUPPORT" => Self::EndOfSupport,
24728                "COS_MILESTONE_VERSION_UPDATE" => Self::CosMilestoneVersionUpdate,
24729                "UPGRADE_LIFECYCLE" => Self::UpgradeLifecycle,
24730                _ => Self::UnknownValue(event_type::UnknownValue(
24731                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24732                )),
24733            }
24734        }
24735    }
24736
24737    impl serde::ser::Serialize for EventType {
24738        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24739        where
24740            S: serde::Serializer,
24741        {
24742            match self {
24743                Self::Unspecified => serializer.serialize_i32(0),
24744                Self::EndOfSupport => serializer.serialize_i32(1),
24745                Self::CosMilestoneVersionUpdate => serializer.serialize_i32(2),
24746                Self::UpgradeLifecycle => serializer.serialize_i32(3),
24747                Self::UnknownValue(u) => u.0.serialize(serializer),
24748            }
24749        }
24750    }
24751
24752    impl<'de> serde::de::Deserialize<'de> for EventType {
24753        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24754        where
24755            D: serde::Deserializer<'de>,
24756        {
24757            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
24758                ".google.container.v1.UpgradeInfoEvent.EventType",
24759            ))
24760        }
24761    }
24762}
24763
24764/// UpgradeAvailableEvent is a notification sent to customers when a new
24765/// available version is released.
24766#[derive(Clone, Default, PartialEq)]
24767#[non_exhaustive]
24768pub struct UpgradeAvailableEvent {
24769    /// The release version available for upgrade.
24770    pub version: std::string::String,
24771
24772    /// The resource type of the release version.
24773    pub resource_type: crate::model::UpgradeResourceType,
24774
24775    /// The release channel of the version. If empty, it means a non-channel
24776    /// release.
24777    pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
24778
24779    /// Optional relative path to the resource. For example, the relative path of
24780    /// the node pool.
24781    pub resource: std::string::String,
24782
24783    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24784}
24785
24786impl UpgradeAvailableEvent {
24787    pub fn new() -> Self {
24788        std::default::Default::default()
24789    }
24790
24791    /// Sets the value of [version][crate::model::UpgradeAvailableEvent::version].
24792    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24793        self.version = v.into();
24794        self
24795    }
24796
24797    /// Sets the value of [resource_type][crate::model::UpgradeAvailableEvent::resource_type].
24798    pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
24799        mut self,
24800        v: T,
24801    ) -> Self {
24802        self.resource_type = v.into();
24803        self
24804    }
24805
24806    /// Sets the value of [release_channel][crate::model::UpgradeAvailableEvent::release_channel].
24807    pub fn set_release_channel<T>(mut self, v: T) -> Self
24808    where
24809        T: std::convert::Into<crate::model::ReleaseChannel>,
24810    {
24811        self.release_channel = std::option::Option::Some(v.into());
24812        self
24813    }
24814
24815    /// Sets or clears the value of [release_channel][crate::model::UpgradeAvailableEvent::release_channel].
24816    pub fn set_or_clear_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
24817    where
24818        T: std::convert::Into<crate::model::ReleaseChannel>,
24819    {
24820        self.release_channel = v.map(|x| x.into());
24821        self
24822    }
24823
24824    /// Sets the value of [resource][crate::model::UpgradeAvailableEvent::resource].
24825    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24826        self.resource = v.into();
24827        self
24828    }
24829}
24830
24831impl wkt::message::Message for UpgradeAvailableEvent {
24832    fn typename() -> &'static str {
24833        "type.googleapis.com/google.container.v1.UpgradeAvailableEvent"
24834    }
24835}
24836
24837/// SecurityBulletinEvent is a notification sent to customers when a security
24838/// bulletin has been posted that they are vulnerable to.
24839#[derive(Clone, Default, PartialEq)]
24840#[non_exhaustive]
24841pub struct SecurityBulletinEvent {
24842    /// The resource type (node/control plane) that has the vulnerability. Multiple
24843    /// notifications (1 notification per resource type) will be sent for a
24844    /// vulnerability that affects > 1 resource type.
24845    pub resource_type_affected: std::string::String,
24846
24847    /// The ID of the bulletin corresponding to the vulnerability.
24848    pub bulletin_id: std::string::String,
24849
24850    /// The CVEs associated with this bulletin.
24851    pub cve_ids: std::vec::Vec<std::string::String>,
24852
24853    /// The severity of this bulletin as it relates to GKE.
24854    pub severity: std::string::String,
24855
24856    /// The URI link to the bulletin on the website for more information.
24857    pub bulletin_uri: std::string::String,
24858
24859    /// A brief description of the bulletin. See the bulletin pointed to by the
24860    /// bulletin_uri field for an expanded description.
24861    pub brief_description: std::string::String,
24862
24863    /// The GKE minor versions affected by this vulnerability.
24864    pub affected_supported_minors: std::vec::Vec<std::string::String>,
24865
24866    /// The GKE versions where this vulnerability is patched.
24867    pub patched_versions: std::vec::Vec<std::string::String>,
24868
24869    /// This represents a version selected from the patched_versions field that
24870    /// the cluster receiving this notification should most likely want to upgrade
24871    /// to based on its current version. Note that if this notification is being
24872    /// received by a given cluster, it means that this version is currently
24873    /// available as an upgrade target in that cluster's location.
24874    pub suggested_upgrade_target: std::string::String,
24875
24876    /// If this field is specified, it means there are manual steps that the user
24877    /// must take to make their clusters safe.
24878    pub manual_steps_required: bool,
24879
24880    /// The GKE versions where this vulnerability is mitigated.
24881    pub mitigated_versions: std::vec::Vec<std::string::String>,
24882
24883    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24884}
24885
24886impl SecurityBulletinEvent {
24887    pub fn new() -> Self {
24888        std::default::Default::default()
24889    }
24890
24891    /// Sets the value of [resource_type_affected][crate::model::SecurityBulletinEvent::resource_type_affected].
24892    pub fn set_resource_type_affected<T: std::convert::Into<std::string::String>>(
24893        mut self,
24894        v: T,
24895    ) -> Self {
24896        self.resource_type_affected = v.into();
24897        self
24898    }
24899
24900    /// Sets the value of [bulletin_id][crate::model::SecurityBulletinEvent::bulletin_id].
24901    pub fn set_bulletin_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24902        self.bulletin_id = v.into();
24903        self
24904    }
24905
24906    /// Sets the value of [cve_ids][crate::model::SecurityBulletinEvent::cve_ids].
24907    pub fn set_cve_ids<T, V>(mut self, v: T) -> Self
24908    where
24909        T: std::iter::IntoIterator<Item = V>,
24910        V: std::convert::Into<std::string::String>,
24911    {
24912        use std::iter::Iterator;
24913        self.cve_ids = v.into_iter().map(|i| i.into()).collect();
24914        self
24915    }
24916
24917    /// Sets the value of [severity][crate::model::SecurityBulletinEvent::severity].
24918    pub fn set_severity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24919        self.severity = v.into();
24920        self
24921    }
24922
24923    /// Sets the value of [bulletin_uri][crate::model::SecurityBulletinEvent::bulletin_uri].
24924    pub fn set_bulletin_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24925        self.bulletin_uri = v.into();
24926        self
24927    }
24928
24929    /// Sets the value of [brief_description][crate::model::SecurityBulletinEvent::brief_description].
24930    pub fn set_brief_description<T: std::convert::Into<std::string::String>>(
24931        mut self,
24932        v: T,
24933    ) -> Self {
24934        self.brief_description = v.into();
24935        self
24936    }
24937
24938    /// Sets the value of [affected_supported_minors][crate::model::SecurityBulletinEvent::affected_supported_minors].
24939    pub fn set_affected_supported_minors<T, V>(mut self, v: T) -> Self
24940    where
24941        T: std::iter::IntoIterator<Item = V>,
24942        V: std::convert::Into<std::string::String>,
24943    {
24944        use std::iter::Iterator;
24945        self.affected_supported_minors = v.into_iter().map(|i| i.into()).collect();
24946        self
24947    }
24948
24949    /// Sets the value of [patched_versions][crate::model::SecurityBulletinEvent::patched_versions].
24950    pub fn set_patched_versions<T, V>(mut self, v: T) -> Self
24951    where
24952        T: std::iter::IntoIterator<Item = V>,
24953        V: std::convert::Into<std::string::String>,
24954    {
24955        use std::iter::Iterator;
24956        self.patched_versions = v.into_iter().map(|i| i.into()).collect();
24957        self
24958    }
24959
24960    /// Sets the value of [suggested_upgrade_target][crate::model::SecurityBulletinEvent::suggested_upgrade_target].
24961    pub fn set_suggested_upgrade_target<T: std::convert::Into<std::string::String>>(
24962        mut self,
24963        v: T,
24964    ) -> Self {
24965        self.suggested_upgrade_target = v.into();
24966        self
24967    }
24968
24969    /// Sets the value of [manual_steps_required][crate::model::SecurityBulletinEvent::manual_steps_required].
24970    pub fn set_manual_steps_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24971        self.manual_steps_required = v.into();
24972        self
24973    }
24974
24975    /// Sets the value of [mitigated_versions][crate::model::SecurityBulletinEvent::mitigated_versions].
24976    pub fn set_mitigated_versions<T, V>(mut self, v: T) -> Self
24977    where
24978        T: std::iter::IntoIterator<Item = V>,
24979        V: std::convert::Into<std::string::String>,
24980    {
24981        use std::iter::Iterator;
24982        self.mitigated_versions = v.into_iter().map(|i| i.into()).collect();
24983        self
24984    }
24985}
24986
24987impl wkt::message::Message for SecurityBulletinEvent {
24988    fn typename() -> &'static str {
24989        "type.googleapis.com/google.container.v1.SecurityBulletinEvent"
24990    }
24991}
24992
24993/// Autopilot is the configuration for Autopilot settings on the cluster.
24994#[derive(Clone, Default, PartialEq)]
24995#[non_exhaustive]
24996pub struct Autopilot {
24997    /// Enable Autopilot
24998    pub enabled: bool,
24999
25000    /// WorkloadPolicyConfig is the configuration related to GCW workload policy
25001    pub workload_policy_config: std::option::Option<crate::model::WorkloadPolicyConfig>,
25002
25003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25004}
25005
25006impl Autopilot {
25007    pub fn new() -> Self {
25008        std::default::Default::default()
25009    }
25010
25011    /// Sets the value of [enabled][crate::model::Autopilot::enabled].
25012    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25013        self.enabled = v.into();
25014        self
25015    }
25016
25017    /// Sets the value of [workload_policy_config][crate::model::Autopilot::workload_policy_config].
25018    pub fn set_workload_policy_config<T>(mut self, v: T) -> Self
25019    where
25020        T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
25021    {
25022        self.workload_policy_config = std::option::Option::Some(v.into());
25023        self
25024    }
25025
25026    /// Sets or clears the value of [workload_policy_config][crate::model::Autopilot::workload_policy_config].
25027    pub fn set_or_clear_workload_policy_config<T>(mut self, v: std::option::Option<T>) -> Self
25028    where
25029        T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
25030    {
25031        self.workload_policy_config = v.map(|x| x.into());
25032        self
25033    }
25034}
25035
25036impl wkt::message::Message for Autopilot {
25037    fn typename() -> &'static str {
25038        "type.googleapis.com/google.container.v1.Autopilot"
25039    }
25040}
25041
25042/// WorkloadPolicyConfig is the configuration related to GCW workload policy
25043#[derive(Clone, Default, PartialEq)]
25044#[non_exhaustive]
25045pub struct WorkloadPolicyConfig {
25046    /// If true, workloads can use NET_ADMIN capability.
25047    pub allow_net_admin: std::option::Option<bool>,
25048
25049    /// If true, enables the GCW Auditor that audits workloads on
25050    /// standard clusters.
25051    pub autopilot_compatibility_auditing_enabled: std::option::Option<bool>,
25052
25053    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25054}
25055
25056impl WorkloadPolicyConfig {
25057    pub fn new() -> Self {
25058        std::default::Default::default()
25059    }
25060
25061    /// Sets the value of [allow_net_admin][crate::model::WorkloadPolicyConfig::allow_net_admin].
25062    pub fn set_allow_net_admin<T>(mut self, v: T) -> Self
25063    where
25064        T: std::convert::Into<bool>,
25065    {
25066        self.allow_net_admin = std::option::Option::Some(v.into());
25067        self
25068    }
25069
25070    /// Sets or clears the value of [allow_net_admin][crate::model::WorkloadPolicyConfig::allow_net_admin].
25071    pub fn set_or_clear_allow_net_admin<T>(mut self, v: std::option::Option<T>) -> Self
25072    where
25073        T: std::convert::Into<bool>,
25074    {
25075        self.allow_net_admin = v.map(|x| x.into());
25076        self
25077    }
25078
25079    /// Sets the value of [autopilot_compatibility_auditing_enabled][crate::model::WorkloadPolicyConfig::autopilot_compatibility_auditing_enabled].
25080    pub fn set_autopilot_compatibility_auditing_enabled<T>(mut self, v: T) -> Self
25081    where
25082        T: std::convert::Into<bool>,
25083    {
25084        self.autopilot_compatibility_auditing_enabled = std::option::Option::Some(v.into());
25085        self
25086    }
25087
25088    /// Sets or clears the value of [autopilot_compatibility_auditing_enabled][crate::model::WorkloadPolicyConfig::autopilot_compatibility_auditing_enabled].
25089    pub fn set_or_clear_autopilot_compatibility_auditing_enabled<T>(
25090        mut self,
25091        v: std::option::Option<T>,
25092    ) -> Self
25093    where
25094        T: std::convert::Into<bool>,
25095    {
25096        self.autopilot_compatibility_auditing_enabled = v.map(|x| x.into());
25097        self
25098    }
25099}
25100
25101impl wkt::message::Message for WorkloadPolicyConfig {
25102    fn typename() -> &'static str {
25103        "type.googleapis.com/google.container.v1.WorkloadPolicyConfig"
25104    }
25105}
25106
25107/// LoggingConfig is cluster logging configuration.
25108#[derive(Clone, Default, PartialEq)]
25109#[non_exhaustive]
25110pub struct LoggingConfig {
25111    /// Logging components configuration
25112    pub component_config: std::option::Option<crate::model::LoggingComponentConfig>,
25113
25114    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25115}
25116
25117impl LoggingConfig {
25118    pub fn new() -> Self {
25119        std::default::Default::default()
25120    }
25121
25122    /// Sets the value of [component_config][crate::model::LoggingConfig::component_config].
25123    pub fn set_component_config<T>(mut self, v: T) -> Self
25124    where
25125        T: std::convert::Into<crate::model::LoggingComponentConfig>,
25126    {
25127        self.component_config = std::option::Option::Some(v.into());
25128        self
25129    }
25130
25131    /// Sets or clears the value of [component_config][crate::model::LoggingConfig::component_config].
25132    pub fn set_or_clear_component_config<T>(mut self, v: std::option::Option<T>) -> Self
25133    where
25134        T: std::convert::Into<crate::model::LoggingComponentConfig>,
25135    {
25136        self.component_config = v.map(|x| x.into());
25137        self
25138    }
25139}
25140
25141impl wkt::message::Message for LoggingConfig {
25142    fn typename() -> &'static str {
25143        "type.googleapis.com/google.container.v1.LoggingConfig"
25144    }
25145}
25146
25147/// LoggingComponentConfig is cluster logging component configuration.
25148#[derive(Clone, Default, PartialEq)]
25149#[non_exhaustive]
25150pub struct LoggingComponentConfig {
25151    /// Select components to collect logs. An empty set would disable all logging.
25152    pub enable_components: std::vec::Vec<crate::model::logging_component_config::Component>,
25153
25154    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25155}
25156
25157impl LoggingComponentConfig {
25158    pub fn new() -> Self {
25159        std::default::Default::default()
25160    }
25161
25162    /// Sets the value of [enable_components][crate::model::LoggingComponentConfig::enable_components].
25163    pub fn set_enable_components<T, V>(mut self, v: T) -> Self
25164    where
25165        T: std::iter::IntoIterator<Item = V>,
25166        V: std::convert::Into<crate::model::logging_component_config::Component>,
25167    {
25168        use std::iter::Iterator;
25169        self.enable_components = v.into_iter().map(|i| i.into()).collect();
25170        self
25171    }
25172}
25173
25174impl wkt::message::Message for LoggingComponentConfig {
25175    fn typename() -> &'static str {
25176        "type.googleapis.com/google.container.v1.LoggingComponentConfig"
25177    }
25178}
25179
25180/// Defines additional types related to [LoggingComponentConfig].
25181pub mod logging_component_config {
25182    #[allow(unused_imports)]
25183    use super::*;
25184
25185    /// GKE components exposing logs
25186    ///
25187    /// # Working with unknown values
25188    ///
25189    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25190    /// additional enum variants at any time. Adding new variants is not considered
25191    /// a breaking change. Applications should write their code in anticipation of:
25192    ///
25193    /// - New values appearing in future releases of the client library, **and**
25194    /// - New values received dynamically, without application changes.
25195    ///
25196    /// Please consult the [Working with enums] section in the user guide for some
25197    /// guidelines.
25198    ///
25199    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25200    #[derive(Clone, Debug, PartialEq)]
25201    #[non_exhaustive]
25202    pub enum Component {
25203        /// Default value. This shouldn't be used.
25204        Unspecified,
25205        /// system components
25206        SystemComponents,
25207        /// workloads
25208        Workloads,
25209        /// kube-apiserver
25210        Apiserver,
25211        /// kube-scheduler
25212        Scheduler,
25213        /// kube-controller-manager
25214        ControllerManager,
25215        /// kcp-sshd
25216        KcpSshd,
25217        /// kcp connection logs
25218        KcpConnection,
25219        /// horizontal pod autoscaler decision logs
25220        KcpHpa,
25221        /// If set, the enum was initialized with an unknown value.
25222        ///
25223        /// Applications can examine the value using [Component::value] or
25224        /// [Component::name].
25225        UnknownValue(component::UnknownValue),
25226    }
25227
25228    #[doc(hidden)]
25229    pub mod component {
25230        #[allow(unused_imports)]
25231        use super::*;
25232        #[derive(Clone, Debug, PartialEq)]
25233        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25234    }
25235
25236    impl Component {
25237        /// Gets the enum value.
25238        ///
25239        /// Returns `None` if the enum contains an unknown value deserialized from
25240        /// the string representation of enums.
25241        pub fn value(&self) -> std::option::Option<i32> {
25242            match self {
25243                Self::Unspecified => std::option::Option::Some(0),
25244                Self::SystemComponents => std::option::Option::Some(1),
25245                Self::Workloads => std::option::Option::Some(2),
25246                Self::Apiserver => std::option::Option::Some(3),
25247                Self::Scheduler => std::option::Option::Some(4),
25248                Self::ControllerManager => std::option::Option::Some(5),
25249                Self::KcpSshd => std::option::Option::Some(7),
25250                Self::KcpConnection => std::option::Option::Some(8),
25251                Self::KcpHpa => std::option::Option::Some(9),
25252                Self::UnknownValue(u) => u.0.value(),
25253            }
25254        }
25255
25256        /// Gets the enum value as a string.
25257        ///
25258        /// Returns `None` if the enum contains an unknown value deserialized from
25259        /// the integer representation of enums.
25260        pub fn name(&self) -> std::option::Option<&str> {
25261            match self {
25262                Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
25263                Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
25264                Self::Workloads => std::option::Option::Some("WORKLOADS"),
25265                Self::Apiserver => std::option::Option::Some("APISERVER"),
25266                Self::Scheduler => std::option::Option::Some("SCHEDULER"),
25267                Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
25268                Self::KcpSshd => std::option::Option::Some("KCP_SSHD"),
25269                Self::KcpConnection => std::option::Option::Some("KCP_CONNECTION"),
25270                Self::KcpHpa => std::option::Option::Some("KCP_HPA"),
25271                Self::UnknownValue(u) => u.0.name(),
25272            }
25273        }
25274    }
25275
25276    impl std::default::Default for Component {
25277        fn default() -> Self {
25278            use std::convert::From;
25279            Self::from(0)
25280        }
25281    }
25282
25283    impl std::fmt::Display for Component {
25284        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25285            wkt::internal::display_enum(f, self.name(), self.value())
25286        }
25287    }
25288
25289    impl std::convert::From<i32> for Component {
25290        fn from(value: i32) -> Self {
25291            match value {
25292                0 => Self::Unspecified,
25293                1 => Self::SystemComponents,
25294                2 => Self::Workloads,
25295                3 => Self::Apiserver,
25296                4 => Self::Scheduler,
25297                5 => Self::ControllerManager,
25298                7 => Self::KcpSshd,
25299                8 => Self::KcpConnection,
25300                9 => Self::KcpHpa,
25301                _ => Self::UnknownValue(component::UnknownValue(
25302                    wkt::internal::UnknownEnumValue::Integer(value),
25303                )),
25304            }
25305        }
25306    }
25307
25308    impl std::convert::From<&str> for Component {
25309        fn from(value: &str) -> Self {
25310            use std::string::ToString;
25311            match value {
25312                "COMPONENT_UNSPECIFIED" => Self::Unspecified,
25313                "SYSTEM_COMPONENTS" => Self::SystemComponents,
25314                "WORKLOADS" => Self::Workloads,
25315                "APISERVER" => Self::Apiserver,
25316                "SCHEDULER" => Self::Scheduler,
25317                "CONTROLLER_MANAGER" => Self::ControllerManager,
25318                "KCP_SSHD" => Self::KcpSshd,
25319                "KCP_CONNECTION" => Self::KcpConnection,
25320                "KCP_HPA" => Self::KcpHpa,
25321                _ => Self::UnknownValue(component::UnknownValue(
25322                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25323                )),
25324            }
25325        }
25326    }
25327
25328    impl serde::ser::Serialize for Component {
25329        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25330        where
25331            S: serde::Serializer,
25332        {
25333            match self {
25334                Self::Unspecified => serializer.serialize_i32(0),
25335                Self::SystemComponents => serializer.serialize_i32(1),
25336                Self::Workloads => serializer.serialize_i32(2),
25337                Self::Apiserver => serializer.serialize_i32(3),
25338                Self::Scheduler => serializer.serialize_i32(4),
25339                Self::ControllerManager => serializer.serialize_i32(5),
25340                Self::KcpSshd => serializer.serialize_i32(7),
25341                Self::KcpConnection => serializer.serialize_i32(8),
25342                Self::KcpHpa => serializer.serialize_i32(9),
25343                Self::UnknownValue(u) => u.0.serialize(serializer),
25344            }
25345        }
25346    }
25347
25348    impl<'de> serde::de::Deserialize<'de> for Component {
25349        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25350        where
25351            D: serde::Deserializer<'de>,
25352        {
25353            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
25354                ".google.container.v1.LoggingComponentConfig.Component",
25355            ))
25356        }
25357    }
25358}
25359
25360/// RayClusterLoggingConfig specifies configuration of Ray logging.
25361#[derive(Clone, Default, PartialEq)]
25362#[non_exhaustive]
25363pub struct RayClusterLoggingConfig {
25364    /// Enable log collection for Ray clusters.
25365    pub enabled: bool,
25366
25367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25368}
25369
25370impl RayClusterLoggingConfig {
25371    pub fn new() -> Self {
25372        std::default::Default::default()
25373    }
25374
25375    /// Sets the value of [enabled][crate::model::RayClusterLoggingConfig::enabled].
25376    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25377        self.enabled = v.into();
25378        self
25379    }
25380}
25381
25382impl wkt::message::Message for RayClusterLoggingConfig {
25383    fn typename() -> &'static str {
25384        "type.googleapis.com/google.container.v1.RayClusterLoggingConfig"
25385    }
25386}
25387
25388/// MonitoringConfig is cluster monitoring configuration.
25389#[derive(Clone, Default, PartialEq)]
25390#[non_exhaustive]
25391pub struct MonitoringConfig {
25392    /// Monitoring components configuration
25393    pub component_config: std::option::Option<crate::model::MonitoringComponentConfig>,
25394
25395    /// Enable Google Cloud Managed Service for Prometheus
25396    /// in the cluster.
25397    pub managed_prometheus_config: std::option::Option<crate::model::ManagedPrometheusConfig>,
25398
25399    /// Configuration of Advanced Datapath Observability features.
25400    pub advanced_datapath_observability_config:
25401        std::option::Option<crate::model::AdvancedDatapathObservabilityConfig>,
25402
25403    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25404}
25405
25406impl MonitoringConfig {
25407    pub fn new() -> Self {
25408        std::default::Default::default()
25409    }
25410
25411    /// Sets the value of [component_config][crate::model::MonitoringConfig::component_config].
25412    pub fn set_component_config<T>(mut self, v: T) -> Self
25413    where
25414        T: std::convert::Into<crate::model::MonitoringComponentConfig>,
25415    {
25416        self.component_config = std::option::Option::Some(v.into());
25417        self
25418    }
25419
25420    /// Sets or clears the value of [component_config][crate::model::MonitoringConfig::component_config].
25421    pub fn set_or_clear_component_config<T>(mut self, v: std::option::Option<T>) -> Self
25422    where
25423        T: std::convert::Into<crate::model::MonitoringComponentConfig>,
25424    {
25425        self.component_config = v.map(|x| x.into());
25426        self
25427    }
25428
25429    /// Sets the value of [managed_prometheus_config][crate::model::MonitoringConfig::managed_prometheus_config].
25430    pub fn set_managed_prometheus_config<T>(mut self, v: T) -> Self
25431    where
25432        T: std::convert::Into<crate::model::ManagedPrometheusConfig>,
25433    {
25434        self.managed_prometheus_config = std::option::Option::Some(v.into());
25435        self
25436    }
25437
25438    /// Sets or clears the value of [managed_prometheus_config][crate::model::MonitoringConfig::managed_prometheus_config].
25439    pub fn set_or_clear_managed_prometheus_config<T>(mut self, v: std::option::Option<T>) -> Self
25440    where
25441        T: std::convert::Into<crate::model::ManagedPrometheusConfig>,
25442    {
25443        self.managed_prometheus_config = v.map(|x| x.into());
25444        self
25445    }
25446
25447    /// Sets the value of [advanced_datapath_observability_config][crate::model::MonitoringConfig::advanced_datapath_observability_config].
25448    pub fn set_advanced_datapath_observability_config<T>(mut self, v: T) -> Self
25449    where
25450        T: std::convert::Into<crate::model::AdvancedDatapathObservabilityConfig>,
25451    {
25452        self.advanced_datapath_observability_config = std::option::Option::Some(v.into());
25453        self
25454    }
25455
25456    /// Sets or clears the value of [advanced_datapath_observability_config][crate::model::MonitoringConfig::advanced_datapath_observability_config].
25457    pub fn set_or_clear_advanced_datapath_observability_config<T>(
25458        mut self,
25459        v: std::option::Option<T>,
25460    ) -> Self
25461    where
25462        T: std::convert::Into<crate::model::AdvancedDatapathObservabilityConfig>,
25463    {
25464        self.advanced_datapath_observability_config = v.map(|x| x.into());
25465        self
25466    }
25467}
25468
25469impl wkt::message::Message for MonitoringConfig {
25470    fn typename() -> &'static str {
25471        "type.googleapis.com/google.container.v1.MonitoringConfig"
25472    }
25473}
25474
25475/// AdvancedDatapathObservabilityConfig specifies configuration of observability
25476/// features of advanced datapath.
25477#[derive(Clone, Default, PartialEq)]
25478#[non_exhaustive]
25479pub struct AdvancedDatapathObservabilityConfig {
25480    /// Expose flow metrics on nodes
25481    pub enable_metrics: bool,
25482
25483    /// Method used to make Relay available
25484    pub relay_mode: crate::model::advanced_datapath_observability_config::RelayMode,
25485
25486    /// Enable Relay component
25487    pub enable_relay: std::option::Option<bool>,
25488
25489    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25490}
25491
25492impl AdvancedDatapathObservabilityConfig {
25493    pub fn new() -> Self {
25494        std::default::Default::default()
25495    }
25496
25497    /// Sets the value of [enable_metrics][crate::model::AdvancedDatapathObservabilityConfig::enable_metrics].
25498    pub fn set_enable_metrics<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25499        self.enable_metrics = v.into();
25500        self
25501    }
25502
25503    /// Sets the value of [relay_mode][crate::model::AdvancedDatapathObservabilityConfig::relay_mode].
25504    pub fn set_relay_mode<
25505        T: std::convert::Into<crate::model::advanced_datapath_observability_config::RelayMode>,
25506    >(
25507        mut self,
25508        v: T,
25509    ) -> Self {
25510        self.relay_mode = v.into();
25511        self
25512    }
25513
25514    /// Sets the value of [enable_relay][crate::model::AdvancedDatapathObservabilityConfig::enable_relay].
25515    pub fn set_enable_relay<T>(mut self, v: T) -> Self
25516    where
25517        T: std::convert::Into<bool>,
25518    {
25519        self.enable_relay = std::option::Option::Some(v.into());
25520        self
25521    }
25522
25523    /// Sets or clears the value of [enable_relay][crate::model::AdvancedDatapathObservabilityConfig::enable_relay].
25524    pub fn set_or_clear_enable_relay<T>(mut self, v: std::option::Option<T>) -> Self
25525    where
25526        T: std::convert::Into<bool>,
25527    {
25528        self.enable_relay = v.map(|x| x.into());
25529        self
25530    }
25531}
25532
25533impl wkt::message::Message for AdvancedDatapathObservabilityConfig {
25534    fn typename() -> &'static str {
25535        "type.googleapis.com/google.container.v1.AdvancedDatapathObservabilityConfig"
25536    }
25537}
25538
25539/// Defines additional types related to [AdvancedDatapathObservabilityConfig].
25540pub mod advanced_datapath_observability_config {
25541    #[allow(unused_imports)]
25542    use super::*;
25543
25544    /// Supported Relay modes
25545    ///
25546    /// # Working with unknown values
25547    ///
25548    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25549    /// additional enum variants at any time. Adding new variants is not considered
25550    /// a breaking change. Applications should write their code in anticipation of:
25551    ///
25552    /// - New values appearing in future releases of the client library, **and**
25553    /// - New values received dynamically, without application changes.
25554    ///
25555    /// Please consult the [Working with enums] section in the user guide for some
25556    /// guidelines.
25557    ///
25558    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25559    #[derive(Clone, Debug, PartialEq)]
25560    #[non_exhaustive]
25561    pub enum RelayMode {
25562        /// Default value. This shouldn't be used.
25563        Unspecified,
25564        /// disabled
25565        Disabled,
25566        /// exposed via internal load balancer
25567        InternalVpcLb,
25568        /// exposed via external load balancer
25569        ExternalLb,
25570        /// If set, the enum was initialized with an unknown value.
25571        ///
25572        /// Applications can examine the value using [RelayMode::value] or
25573        /// [RelayMode::name].
25574        UnknownValue(relay_mode::UnknownValue),
25575    }
25576
25577    #[doc(hidden)]
25578    pub mod relay_mode {
25579        #[allow(unused_imports)]
25580        use super::*;
25581        #[derive(Clone, Debug, PartialEq)]
25582        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25583    }
25584
25585    impl RelayMode {
25586        /// Gets the enum value.
25587        ///
25588        /// Returns `None` if the enum contains an unknown value deserialized from
25589        /// the string representation of enums.
25590        pub fn value(&self) -> std::option::Option<i32> {
25591            match self {
25592                Self::Unspecified => std::option::Option::Some(0),
25593                Self::Disabled => std::option::Option::Some(1),
25594                Self::InternalVpcLb => std::option::Option::Some(3),
25595                Self::ExternalLb => std::option::Option::Some(4),
25596                Self::UnknownValue(u) => u.0.value(),
25597            }
25598        }
25599
25600        /// Gets the enum value as a string.
25601        ///
25602        /// Returns `None` if the enum contains an unknown value deserialized from
25603        /// the integer representation of enums.
25604        pub fn name(&self) -> std::option::Option<&str> {
25605            match self {
25606                Self::Unspecified => std::option::Option::Some("RELAY_MODE_UNSPECIFIED"),
25607                Self::Disabled => std::option::Option::Some("DISABLED"),
25608                Self::InternalVpcLb => std::option::Option::Some("INTERNAL_VPC_LB"),
25609                Self::ExternalLb => std::option::Option::Some("EXTERNAL_LB"),
25610                Self::UnknownValue(u) => u.0.name(),
25611            }
25612        }
25613    }
25614
25615    impl std::default::Default for RelayMode {
25616        fn default() -> Self {
25617            use std::convert::From;
25618            Self::from(0)
25619        }
25620    }
25621
25622    impl std::fmt::Display for RelayMode {
25623        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25624            wkt::internal::display_enum(f, self.name(), self.value())
25625        }
25626    }
25627
25628    impl std::convert::From<i32> for RelayMode {
25629        fn from(value: i32) -> Self {
25630            match value {
25631                0 => Self::Unspecified,
25632                1 => Self::Disabled,
25633                3 => Self::InternalVpcLb,
25634                4 => Self::ExternalLb,
25635                _ => Self::UnknownValue(relay_mode::UnknownValue(
25636                    wkt::internal::UnknownEnumValue::Integer(value),
25637                )),
25638            }
25639        }
25640    }
25641
25642    impl std::convert::From<&str> for RelayMode {
25643        fn from(value: &str) -> Self {
25644            use std::string::ToString;
25645            match value {
25646                "RELAY_MODE_UNSPECIFIED" => Self::Unspecified,
25647                "DISABLED" => Self::Disabled,
25648                "INTERNAL_VPC_LB" => Self::InternalVpcLb,
25649                "EXTERNAL_LB" => Self::ExternalLb,
25650                _ => Self::UnknownValue(relay_mode::UnknownValue(
25651                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25652                )),
25653            }
25654        }
25655    }
25656
25657    impl serde::ser::Serialize for RelayMode {
25658        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25659        where
25660            S: serde::Serializer,
25661        {
25662            match self {
25663                Self::Unspecified => serializer.serialize_i32(0),
25664                Self::Disabled => serializer.serialize_i32(1),
25665                Self::InternalVpcLb => serializer.serialize_i32(3),
25666                Self::ExternalLb => serializer.serialize_i32(4),
25667                Self::UnknownValue(u) => u.0.serialize(serializer),
25668            }
25669        }
25670    }
25671
25672    impl<'de> serde::de::Deserialize<'de> for RelayMode {
25673        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25674        where
25675            D: serde::Deserializer<'de>,
25676        {
25677            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelayMode>::new(
25678                ".google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode",
25679            ))
25680        }
25681    }
25682}
25683
25684/// RayClusterMonitoringConfig specifies monitoring configuration for Ray
25685/// clusters.
25686#[derive(Clone, Default, PartialEq)]
25687#[non_exhaustive]
25688pub struct RayClusterMonitoringConfig {
25689    /// Enable metrics collection for Ray clusters.
25690    pub enabled: bool,
25691
25692    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25693}
25694
25695impl RayClusterMonitoringConfig {
25696    pub fn new() -> Self {
25697        std::default::Default::default()
25698    }
25699
25700    /// Sets the value of [enabled][crate::model::RayClusterMonitoringConfig::enabled].
25701    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25702        self.enabled = v.into();
25703        self
25704    }
25705}
25706
25707impl wkt::message::Message for RayClusterMonitoringConfig {
25708    fn typename() -> &'static str {
25709        "type.googleapis.com/google.container.v1.RayClusterMonitoringConfig"
25710    }
25711}
25712
25713/// NodePoolLoggingConfig specifies logging configuration for nodepools.
25714#[derive(Clone, Default, PartialEq)]
25715#[non_exhaustive]
25716pub struct NodePoolLoggingConfig {
25717    /// Logging variant configuration.
25718    pub variant_config: std::option::Option<crate::model::LoggingVariantConfig>,
25719
25720    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25721}
25722
25723impl NodePoolLoggingConfig {
25724    pub fn new() -> Self {
25725        std::default::Default::default()
25726    }
25727
25728    /// Sets the value of [variant_config][crate::model::NodePoolLoggingConfig::variant_config].
25729    pub fn set_variant_config<T>(mut self, v: T) -> Self
25730    where
25731        T: std::convert::Into<crate::model::LoggingVariantConfig>,
25732    {
25733        self.variant_config = std::option::Option::Some(v.into());
25734        self
25735    }
25736
25737    /// Sets or clears the value of [variant_config][crate::model::NodePoolLoggingConfig::variant_config].
25738    pub fn set_or_clear_variant_config<T>(mut self, v: std::option::Option<T>) -> Self
25739    where
25740        T: std::convert::Into<crate::model::LoggingVariantConfig>,
25741    {
25742        self.variant_config = v.map(|x| x.into());
25743        self
25744    }
25745}
25746
25747impl wkt::message::Message for NodePoolLoggingConfig {
25748    fn typename() -> &'static str {
25749        "type.googleapis.com/google.container.v1.NodePoolLoggingConfig"
25750    }
25751}
25752
25753/// LoggingVariantConfig specifies the behaviour of the logging component.
25754#[derive(Clone, Default, PartialEq)]
25755#[non_exhaustive]
25756pub struct LoggingVariantConfig {
25757    /// Logging variant deployed on nodes.
25758    pub variant: crate::model::logging_variant_config::Variant,
25759
25760    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25761}
25762
25763impl LoggingVariantConfig {
25764    pub fn new() -> Self {
25765        std::default::Default::default()
25766    }
25767
25768    /// Sets the value of [variant][crate::model::LoggingVariantConfig::variant].
25769    pub fn set_variant<T: std::convert::Into<crate::model::logging_variant_config::Variant>>(
25770        mut self,
25771        v: T,
25772    ) -> Self {
25773        self.variant = v.into();
25774        self
25775    }
25776}
25777
25778impl wkt::message::Message for LoggingVariantConfig {
25779    fn typename() -> &'static str {
25780        "type.googleapis.com/google.container.v1.LoggingVariantConfig"
25781    }
25782}
25783
25784/// Defines additional types related to [LoggingVariantConfig].
25785pub mod logging_variant_config {
25786    #[allow(unused_imports)]
25787    use super::*;
25788
25789    /// Logging component variants.
25790    ///
25791    /// # Working with unknown values
25792    ///
25793    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25794    /// additional enum variants at any time. Adding new variants is not considered
25795    /// a breaking change. Applications should write their code in anticipation of:
25796    ///
25797    /// - New values appearing in future releases of the client library, **and**
25798    /// - New values received dynamically, without application changes.
25799    ///
25800    /// Please consult the [Working with enums] section in the user guide for some
25801    /// guidelines.
25802    ///
25803    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25804    #[derive(Clone, Debug, PartialEq)]
25805    #[non_exhaustive]
25806    pub enum Variant {
25807        /// Default value. This shouldn't be used.
25808        Unspecified,
25809        /// default logging variant.
25810        Default,
25811        /// maximum logging throughput variant.
25812        MaxThroughput,
25813        /// If set, the enum was initialized with an unknown value.
25814        ///
25815        /// Applications can examine the value using [Variant::value] or
25816        /// [Variant::name].
25817        UnknownValue(variant::UnknownValue),
25818    }
25819
25820    #[doc(hidden)]
25821    pub mod variant {
25822        #[allow(unused_imports)]
25823        use super::*;
25824        #[derive(Clone, Debug, PartialEq)]
25825        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25826    }
25827
25828    impl Variant {
25829        /// Gets the enum value.
25830        ///
25831        /// Returns `None` if the enum contains an unknown value deserialized from
25832        /// the string representation of enums.
25833        pub fn value(&self) -> std::option::Option<i32> {
25834            match self {
25835                Self::Unspecified => std::option::Option::Some(0),
25836                Self::Default => std::option::Option::Some(1),
25837                Self::MaxThroughput => std::option::Option::Some(2),
25838                Self::UnknownValue(u) => u.0.value(),
25839            }
25840        }
25841
25842        /// Gets the enum value as a string.
25843        ///
25844        /// Returns `None` if the enum contains an unknown value deserialized from
25845        /// the integer representation of enums.
25846        pub fn name(&self) -> std::option::Option<&str> {
25847            match self {
25848                Self::Unspecified => std::option::Option::Some("VARIANT_UNSPECIFIED"),
25849                Self::Default => std::option::Option::Some("DEFAULT"),
25850                Self::MaxThroughput => std::option::Option::Some("MAX_THROUGHPUT"),
25851                Self::UnknownValue(u) => u.0.name(),
25852            }
25853        }
25854    }
25855
25856    impl std::default::Default for Variant {
25857        fn default() -> Self {
25858            use std::convert::From;
25859            Self::from(0)
25860        }
25861    }
25862
25863    impl std::fmt::Display for Variant {
25864        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25865            wkt::internal::display_enum(f, self.name(), self.value())
25866        }
25867    }
25868
25869    impl std::convert::From<i32> for Variant {
25870        fn from(value: i32) -> Self {
25871            match value {
25872                0 => Self::Unspecified,
25873                1 => Self::Default,
25874                2 => Self::MaxThroughput,
25875                _ => Self::UnknownValue(variant::UnknownValue(
25876                    wkt::internal::UnknownEnumValue::Integer(value),
25877                )),
25878            }
25879        }
25880    }
25881
25882    impl std::convert::From<&str> for Variant {
25883        fn from(value: &str) -> Self {
25884            use std::string::ToString;
25885            match value {
25886                "VARIANT_UNSPECIFIED" => Self::Unspecified,
25887                "DEFAULT" => Self::Default,
25888                "MAX_THROUGHPUT" => Self::MaxThroughput,
25889                _ => Self::UnknownValue(variant::UnknownValue(
25890                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25891                )),
25892            }
25893        }
25894    }
25895
25896    impl serde::ser::Serialize for Variant {
25897        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25898        where
25899            S: serde::Serializer,
25900        {
25901            match self {
25902                Self::Unspecified => serializer.serialize_i32(0),
25903                Self::Default => serializer.serialize_i32(1),
25904                Self::MaxThroughput => serializer.serialize_i32(2),
25905                Self::UnknownValue(u) => u.0.serialize(serializer),
25906            }
25907        }
25908    }
25909
25910    impl<'de> serde::de::Deserialize<'de> for Variant {
25911        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25912        where
25913            D: serde::Deserializer<'de>,
25914        {
25915            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Variant>::new(
25916                ".google.container.v1.LoggingVariantConfig.Variant",
25917            ))
25918        }
25919    }
25920}
25921
25922/// MonitoringComponentConfig is cluster monitoring component configuration.
25923#[derive(Clone, Default, PartialEq)]
25924#[non_exhaustive]
25925pub struct MonitoringComponentConfig {
25926    /// Select components to collect metrics. An empty set would disable all
25927    /// monitoring.
25928    pub enable_components: std::vec::Vec<crate::model::monitoring_component_config::Component>,
25929
25930    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25931}
25932
25933impl MonitoringComponentConfig {
25934    pub fn new() -> Self {
25935        std::default::Default::default()
25936    }
25937
25938    /// Sets the value of [enable_components][crate::model::MonitoringComponentConfig::enable_components].
25939    pub fn set_enable_components<T, V>(mut self, v: T) -> Self
25940    where
25941        T: std::iter::IntoIterator<Item = V>,
25942        V: std::convert::Into<crate::model::monitoring_component_config::Component>,
25943    {
25944        use std::iter::Iterator;
25945        self.enable_components = v.into_iter().map(|i| i.into()).collect();
25946        self
25947    }
25948}
25949
25950impl wkt::message::Message for MonitoringComponentConfig {
25951    fn typename() -> &'static str {
25952        "type.googleapis.com/google.container.v1.MonitoringComponentConfig"
25953    }
25954}
25955
25956/// Defines additional types related to [MonitoringComponentConfig].
25957pub mod monitoring_component_config {
25958    #[allow(unused_imports)]
25959    use super::*;
25960
25961    /// GKE components exposing metrics
25962    ///
25963    /// # Working with unknown values
25964    ///
25965    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25966    /// additional enum variants at any time. Adding new variants is not considered
25967    /// a breaking change. Applications should write their code in anticipation of:
25968    ///
25969    /// - New values appearing in future releases of the client library, **and**
25970    /// - New values received dynamically, without application changes.
25971    ///
25972    /// Please consult the [Working with enums] section in the user guide for some
25973    /// guidelines.
25974    ///
25975    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25976    #[derive(Clone, Debug, PartialEq)]
25977    #[non_exhaustive]
25978    pub enum Component {
25979        /// Default value. This shouldn't be used.
25980        Unspecified,
25981        /// system components
25982        SystemComponents,
25983        /// kube-apiserver
25984        Apiserver,
25985        /// kube-scheduler
25986        Scheduler,
25987        /// kube-controller-manager
25988        ControllerManager,
25989        /// Storage
25990        Storage,
25991        /// Horizontal Pod Autoscaling
25992        Hpa,
25993        /// Pod
25994        Pod,
25995        /// DaemonSet
25996        Daemonset,
25997        /// Deployment
25998        Deployment,
25999        /// Statefulset
26000        Statefulset,
26001        /// CADVISOR
26002        Cadvisor,
26003        /// KUBELET
26004        Kubelet,
26005        /// NVIDIA Data Center GPU Manager (DCGM)
26006        Dcgm,
26007        /// JobSet
26008        Jobset,
26009        /// If set, the enum was initialized with an unknown value.
26010        ///
26011        /// Applications can examine the value using [Component::value] or
26012        /// [Component::name].
26013        UnknownValue(component::UnknownValue),
26014    }
26015
26016    #[doc(hidden)]
26017    pub mod component {
26018        #[allow(unused_imports)]
26019        use super::*;
26020        #[derive(Clone, Debug, PartialEq)]
26021        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26022    }
26023
26024    impl Component {
26025        /// Gets the enum value.
26026        ///
26027        /// Returns `None` if the enum contains an unknown value deserialized from
26028        /// the string representation of enums.
26029        pub fn value(&self) -> std::option::Option<i32> {
26030            match self {
26031                Self::Unspecified => std::option::Option::Some(0),
26032                Self::SystemComponents => std::option::Option::Some(1),
26033                Self::Apiserver => std::option::Option::Some(3),
26034                Self::Scheduler => std::option::Option::Some(4),
26035                Self::ControllerManager => std::option::Option::Some(5),
26036                Self::Storage => std::option::Option::Some(7),
26037                Self::Hpa => std::option::Option::Some(8),
26038                Self::Pod => std::option::Option::Some(9),
26039                Self::Daemonset => std::option::Option::Some(10),
26040                Self::Deployment => std::option::Option::Some(11),
26041                Self::Statefulset => std::option::Option::Some(12),
26042                Self::Cadvisor => std::option::Option::Some(13),
26043                Self::Kubelet => std::option::Option::Some(14),
26044                Self::Dcgm => std::option::Option::Some(15),
26045                Self::Jobset => std::option::Option::Some(16),
26046                Self::UnknownValue(u) => u.0.value(),
26047            }
26048        }
26049
26050        /// Gets the enum value as a string.
26051        ///
26052        /// Returns `None` if the enum contains an unknown value deserialized from
26053        /// the integer representation of enums.
26054        pub fn name(&self) -> std::option::Option<&str> {
26055            match self {
26056                Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
26057                Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
26058                Self::Apiserver => std::option::Option::Some("APISERVER"),
26059                Self::Scheduler => std::option::Option::Some("SCHEDULER"),
26060                Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
26061                Self::Storage => std::option::Option::Some("STORAGE"),
26062                Self::Hpa => std::option::Option::Some("HPA"),
26063                Self::Pod => std::option::Option::Some("POD"),
26064                Self::Daemonset => std::option::Option::Some("DAEMONSET"),
26065                Self::Deployment => std::option::Option::Some("DEPLOYMENT"),
26066                Self::Statefulset => std::option::Option::Some("STATEFULSET"),
26067                Self::Cadvisor => std::option::Option::Some("CADVISOR"),
26068                Self::Kubelet => std::option::Option::Some("KUBELET"),
26069                Self::Dcgm => std::option::Option::Some("DCGM"),
26070                Self::Jobset => std::option::Option::Some("JOBSET"),
26071                Self::UnknownValue(u) => u.0.name(),
26072            }
26073        }
26074    }
26075
26076    impl std::default::Default for Component {
26077        fn default() -> Self {
26078            use std::convert::From;
26079            Self::from(0)
26080        }
26081    }
26082
26083    impl std::fmt::Display for Component {
26084        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26085            wkt::internal::display_enum(f, self.name(), self.value())
26086        }
26087    }
26088
26089    impl std::convert::From<i32> for Component {
26090        fn from(value: i32) -> Self {
26091            match value {
26092                0 => Self::Unspecified,
26093                1 => Self::SystemComponents,
26094                3 => Self::Apiserver,
26095                4 => Self::Scheduler,
26096                5 => Self::ControllerManager,
26097                7 => Self::Storage,
26098                8 => Self::Hpa,
26099                9 => Self::Pod,
26100                10 => Self::Daemonset,
26101                11 => Self::Deployment,
26102                12 => Self::Statefulset,
26103                13 => Self::Cadvisor,
26104                14 => Self::Kubelet,
26105                15 => Self::Dcgm,
26106                16 => Self::Jobset,
26107                _ => Self::UnknownValue(component::UnknownValue(
26108                    wkt::internal::UnknownEnumValue::Integer(value),
26109                )),
26110            }
26111        }
26112    }
26113
26114    impl std::convert::From<&str> for Component {
26115        fn from(value: &str) -> Self {
26116            use std::string::ToString;
26117            match value {
26118                "COMPONENT_UNSPECIFIED" => Self::Unspecified,
26119                "SYSTEM_COMPONENTS" => Self::SystemComponents,
26120                "APISERVER" => Self::Apiserver,
26121                "SCHEDULER" => Self::Scheduler,
26122                "CONTROLLER_MANAGER" => Self::ControllerManager,
26123                "STORAGE" => Self::Storage,
26124                "HPA" => Self::Hpa,
26125                "POD" => Self::Pod,
26126                "DAEMONSET" => Self::Daemonset,
26127                "DEPLOYMENT" => Self::Deployment,
26128                "STATEFULSET" => Self::Statefulset,
26129                "CADVISOR" => Self::Cadvisor,
26130                "KUBELET" => Self::Kubelet,
26131                "DCGM" => Self::Dcgm,
26132                "JOBSET" => Self::Jobset,
26133                _ => Self::UnknownValue(component::UnknownValue(
26134                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26135                )),
26136            }
26137        }
26138    }
26139
26140    impl serde::ser::Serialize for Component {
26141        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26142        where
26143            S: serde::Serializer,
26144        {
26145            match self {
26146                Self::Unspecified => serializer.serialize_i32(0),
26147                Self::SystemComponents => serializer.serialize_i32(1),
26148                Self::Apiserver => serializer.serialize_i32(3),
26149                Self::Scheduler => serializer.serialize_i32(4),
26150                Self::ControllerManager => serializer.serialize_i32(5),
26151                Self::Storage => serializer.serialize_i32(7),
26152                Self::Hpa => serializer.serialize_i32(8),
26153                Self::Pod => serializer.serialize_i32(9),
26154                Self::Daemonset => serializer.serialize_i32(10),
26155                Self::Deployment => serializer.serialize_i32(11),
26156                Self::Statefulset => serializer.serialize_i32(12),
26157                Self::Cadvisor => serializer.serialize_i32(13),
26158                Self::Kubelet => serializer.serialize_i32(14),
26159                Self::Dcgm => serializer.serialize_i32(15),
26160                Self::Jobset => serializer.serialize_i32(16),
26161                Self::UnknownValue(u) => u.0.serialize(serializer),
26162            }
26163        }
26164    }
26165
26166    impl<'de> serde::de::Deserialize<'de> for Component {
26167        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26168        where
26169            D: serde::Deserializer<'de>,
26170        {
26171            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
26172                ".google.container.v1.MonitoringComponentConfig.Component",
26173            ))
26174        }
26175    }
26176}
26177
26178/// ManagedPrometheusConfig defines the configuration for
26179/// Google Cloud Managed Service for Prometheus.
26180#[derive(Clone, Default, PartialEq)]
26181#[non_exhaustive]
26182pub struct ManagedPrometheusConfig {
26183    /// Enable Managed Collection.
26184    pub enabled: bool,
26185
26186    /// GKE Workload Auto-Monitoring Configuration.
26187    pub auto_monitoring_config: std::option::Option<crate::model::AutoMonitoringConfig>,
26188
26189    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26190}
26191
26192impl ManagedPrometheusConfig {
26193    pub fn new() -> Self {
26194        std::default::Default::default()
26195    }
26196
26197    /// Sets the value of [enabled][crate::model::ManagedPrometheusConfig::enabled].
26198    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26199        self.enabled = v.into();
26200        self
26201    }
26202
26203    /// Sets the value of [auto_monitoring_config][crate::model::ManagedPrometheusConfig::auto_monitoring_config].
26204    pub fn set_auto_monitoring_config<T>(mut self, v: T) -> Self
26205    where
26206        T: std::convert::Into<crate::model::AutoMonitoringConfig>,
26207    {
26208        self.auto_monitoring_config = std::option::Option::Some(v.into());
26209        self
26210    }
26211
26212    /// Sets or clears the value of [auto_monitoring_config][crate::model::ManagedPrometheusConfig::auto_monitoring_config].
26213    pub fn set_or_clear_auto_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
26214    where
26215        T: std::convert::Into<crate::model::AutoMonitoringConfig>,
26216    {
26217        self.auto_monitoring_config = v.map(|x| x.into());
26218        self
26219    }
26220}
26221
26222impl wkt::message::Message for ManagedPrometheusConfig {
26223    fn typename() -> &'static str {
26224        "type.googleapis.com/google.container.v1.ManagedPrometheusConfig"
26225    }
26226}
26227
26228/// AutoMonitoringConfig defines the configuration for GKE Workload
26229/// Auto-Monitoring.
26230#[derive(Clone, Default, PartialEq)]
26231#[non_exhaustive]
26232pub struct AutoMonitoringConfig {
26233    /// Scope for GKE Workload Auto-Monitoring.
26234    pub scope: crate::model::auto_monitoring_config::Scope,
26235
26236    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26237}
26238
26239impl AutoMonitoringConfig {
26240    pub fn new() -> Self {
26241        std::default::Default::default()
26242    }
26243
26244    /// Sets the value of [scope][crate::model::AutoMonitoringConfig::scope].
26245    pub fn set_scope<T: std::convert::Into<crate::model::auto_monitoring_config::Scope>>(
26246        mut self,
26247        v: T,
26248    ) -> Self {
26249        self.scope = v.into();
26250        self
26251    }
26252}
26253
26254impl wkt::message::Message for AutoMonitoringConfig {
26255    fn typename() -> &'static str {
26256        "type.googleapis.com/google.container.v1.AutoMonitoringConfig"
26257    }
26258}
26259
26260/// Defines additional types related to [AutoMonitoringConfig].
26261pub mod auto_monitoring_config {
26262    #[allow(unused_imports)]
26263    use super::*;
26264
26265    /// Scope for applications monitored by Auto-Monitoring
26266    ///
26267    /// # Working with unknown values
26268    ///
26269    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26270    /// additional enum variants at any time. Adding new variants is not considered
26271    /// a breaking change. Applications should write their code in anticipation of:
26272    ///
26273    /// - New values appearing in future releases of the client library, **and**
26274    /// - New values received dynamically, without application changes.
26275    ///
26276    /// Please consult the [Working with enums] section in the user guide for some
26277    /// guidelines.
26278    ///
26279    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26280    #[derive(Clone, Debug, PartialEq)]
26281    #[non_exhaustive]
26282    pub enum Scope {
26283        /// Not set.
26284        Unspecified,
26285        /// Auto-Monitoring is enabled for all supported applications.
26286        All,
26287        /// Disable Auto-Monitoring.
26288        None,
26289        /// If set, the enum was initialized with an unknown value.
26290        ///
26291        /// Applications can examine the value using [Scope::value] or
26292        /// [Scope::name].
26293        UnknownValue(scope::UnknownValue),
26294    }
26295
26296    #[doc(hidden)]
26297    pub mod scope {
26298        #[allow(unused_imports)]
26299        use super::*;
26300        #[derive(Clone, Debug, PartialEq)]
26301        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26302    }
26303
26304    impl Scope {
26305        /// Gets the enum value.
26306        ///
26307        /// Returns `None` if the enum contains an unknown value deserialized from
26308        /// the string representation of enums.
26309        pub fn value(&self) -> std::option::Option<i32> {
26310            match self {
26311                Self::Unspecified => std::option::Option::Some(0),
26312                Self::All => std::option::Option::Some(1),
26313                Self::None => std::option::Option::Some(2),
26314                Self::UnknownValue(u) => u.0.value(),
26315            }
26316        }
26317
26318        /// Gets the enum value as a string.
26319        ///
26320        /// Returns `None` if the enum contains an unknown value deserialized from
26321        /// the integer representation of enums.
26322        pub fn name(&self) -> std::option::Option<&str> {
26323            match self {
26324                Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
26325                Self::All => std::option::Option::Some("ALL"),
26326                Self::None => std::option::Option::Some("NONE"),
26327                Self::UnknownValue(u) => u.0.name(),
26328            }
26329        }
26330    }
26331
26332    impl std::default::Default for Scope {
26333        fn default() -> Self {
26334            use std::convert::From;
26335            Self::from(0)
26336        }
26337    }
26338
26339    impl std::fmt::Display for Scope {
26340        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26341            wkt::internal::display_enum(f, self.name(), self.value())
26342        }
26343    }
26344
26345    impl std::convert::From<i32> for Scope {
26346        fn from(value: i32) -> Self {
26347            match value {
26348                0 => Self::Unspecified,
26349                1 => Self::All,
26350                2 => Self::None,
26351                _ => Self::UnknownValue(scope::UnknownValue(
26352                    wkt::internal::UnknownEnumValue::Integer(value),
26353                )),
26354            }
26355        }
26356    }
26357
26358    impl std::convert::From<&str> for Scope {
26359        fn from(value: &str) -> Self {
26360            use std::string::ToString;
26361            match value {
26362                "SCOPE_UNSPECIFIED" => Self::Unspecified,
26363                "ALL" => Self::All,
26364                "NONE" => Self::None,
26365                _ => Self::UnknownValue(scope::UnknownValue(
26366                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26367                )),
26368            }
26369        }
26370    }
26371
26372    impl serde::ser::Serialize for Scope {
26373        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26374        where
26375            S: serde::Serializer,
26376        {
26377            match self {
26378                Self::Unspecified => serializer.serialize_i32(0),
26379                Self::All => serializer.serialize_i32(1),
26380                Self::None => serializer.serialize_i32(2),
26381                Self::UnknownValue(u) => u.0.serialize(serializer),
26382            }
26383        }
26384    }
26385
26386    impl<'de> serde::de::Deserialize<'de> for Scope {
26387        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26388        where
26389            D: serde::Deserializer<'de>,
26390        {
26391            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
26392                ".google.container.v1.AutoMonitoringConfig.Scope",
26393            ))
26394        }
26395    }
26396}
26397
26398/// PodAutoscaling is used for configuration of parameters
26399/// for workload autoscaling.
26400#[derive(Clone, Default, PartialEq)]
26401#[non_exhaustive]
26402pub struct PodAutoscaling {
26403    /// Selected Horizontal Pod Autoscaling profile.
26404    pub hpa_profile: std::option::Option<crate::model::pod_autoscaling::HPAProfile>,
26405
26406    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26407}
26408
26409impl PodAutoscaling {
26410    pub fn new() -> Self {
26411        std::default::Default::default()
26412    }
26413
26414    /// Sets the value of [hpa_profile][crate::model::PodAutoscaling::hpa_profile].
26415    pub fn set_hpa_profile<T>(mut self, v: T) -> Self
26416    where
26417        T: std::convert::Into<crate::model::pod_autoscaling::HPAProfile>,
26418    {
26419        self.hpa_profile = std::option::Option::Some(v.into());
26420        self
26421    }
26422
26423    /// Sets or clears the value of [hpa_profile][crate::model::PodAutoscaling::hpa_profile].
26424    pub fn set_or_clear_hpa_profile<T>(mut self, v: std::option::Option<T>) -> Self
26425    where
26426        T: std::convert::Into<crate::model::pod_autoscaling::HPAProfile>,
26427    {
26428        self.hpa_profile = v.map(|x| x.into());
26429        self
26430    }
26431}
26432
26433impl wkt::message::Message for PodAutoscaling {
26434    fn typename() -> &'static str {
26435        "type.googleapis.com/google.container.v1.PodAutoscaling"
26436    }
26437}
26438
26439/// Defines additional types related to [PodAutoscaling].
26440pub mod pod_autoscaling {
26441    #[allow(unused_imports)]
26442    use super::*;
26443
26444    /// Possible types of Horizontal Pod Autoscaling profile.
26445    ///
26446    /// # Working with unknown values
26447    ///
26448    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26449    /// additional enum variants at any time. Adding new variants is not considered
26450    /// a breaking change. Applications should write their code in anticipation of:
26451    ///
26452    /// - New values appearing in future releases of the client library, **and**
26453    /// - New values received dynamically, without application changes.
26454    ///
26455    /// Please consult the [Working with enums] section in the user guide for some
26456    /// guidelines.
26457    ///
26458    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26459    #[derive(Clone, Debug, PartialEq)]
26460    #[non_exhaustive]
26461    pub enum HPAProfile {
26462        /// HPA_PROFILE_UNSPECIFIED is used when no custom HPA profile is set.
26463        Unspecified,
26464        /// Customers explicitly opt-out of HPA profiles.
26465        None,
26466        /// PERFORMANCE is used when customers opt-in to the performance HPA profile.
26467        /// In this profile we support a higher number of HPAs per cluster and faster
26468        /// metrics collection for workload autoscaling.
26469        Performance,
26470        /// If set, the enum was initialized with an unknown value.
26471        ///
26472        /// Applications can examine the value using [HPAProfile::value] or
26473        /// [HPAProfile::name].
26474        UnknownValue(hpa_profile::UnknownValue),
26475    }
26476
26477    #[doc(hidden)]
26478    pub mod hpa_profile {
26479        #[allow(unused_imports)]
26480        use super::*;
26481        #[derive(Clone, Debug, PartialEq)]
26482        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26483    }
26484
26485    impl HPAProfile {
26486        /// Gets the enum value.
26487        ///
26488        /// Returns `None` if the enum contains an unknown value deserialized from
26489        /// the string representation of enums.
26490        pub fn value(&self) -> std::option::Option<i32> {
26491            match self {
26492                Self::Unspecified => std::option::Option::Some(0),
26493                Self::None => std::option::Option::Some(1),
26494                Self::Performance => std::option::Option::Some(2),
26495                Self::UnknownValue(u) => u.0.value(),
26496            }
26497        }
26498
26499        /// Gets the enum value as a string.
26500        ///
26501        /// Returns `None` if the enum contains an unknown value deserialized from
26502        /// the integer representation of enums.
26503        pub fn name(&self) -> std::option::Option<&str> {
26504            match self {
26505                Self::Unspecified => std::option::Option::Some("HPA_PROFILE_UNSPECIFIED"),
26506                Self::None => std::option::Option::Some("NONE"),
26507                Self::Performance => std::option::Option::Some("PERFORMANCE"),
26508                Self::UnknownValue(u) => u.0.name(),
26509            }
26510        }
26511    }
26512
26513    impl std::default::Default for HPAProfile {
26514        fn default() -> Self {
26515            use std::convert::From;
26516            Self::from(0)
26517        }
26518    }
26519
26520    impl std::fmt::Display for HPAProfile {
26521        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26522            wkt::internal::display_enum(f, self.name(), self.value())
26523        }
26524    }
26525
26526    impl std::convert::From<i32> for HPAProfile {
26527        fn from(value: i32) -> Self {
26528            match value {
26529                0 => Self::Unspecified,
26530                1 => Self::None,
26531                2 => Self::Performance,
26532                _ => Self::UnknownValue(hpa_profile::UnknownValue(
26533                    wkt::internal::UnknownEnumValue::Integer(value),
26534                )),
26535            }
26536        }
26537    }
26538
26539    impl std::convert::From<&str> for HPAProfile {
26540        fn from(value: &str) -> Self {
26541            use std::string::ToString;
26542            match value {
26543                "HPA_PROFILE_UNSPECIFIED" => Self::Unspecified,
26544                "NONE" => Self::None,
26545                "PERFORMANCE" => Self::Performance,
26546                _ => Self::UnknownValue(hpa_profile::UnknownValue(
26547                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26548                )),
26549            }
26550        }
26551    }
26552
26553    impl serde::ser::Serialize for HPAProfile {
26554        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26555        where
26556            S: serde::Serializer,
26557        {
26558            match self {
26559                Self::Unspecified => serializer.serialize_i32(0),
26560                Self::None => serializer.serialize_i32(1),
26561                Self::Performance => serializer.serialize_i32(2),
26562                Self::UnknownValue(u) => u.0.serialize(serializer),
26563            }
26564        }
26565    }
26566
26567    impl<'de> serde::de::Deserialize<'de> for HPAProfile {
26568        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26569        where
26570            D: serde::Deserializer<'de>,
26571        {
26572            deserializer.deserialize_any(wkt::internal::EnumVisitor::<HPAProfile>::new(
26573                ".google.container.v1.PodAutoscaling.HPAProfile",
26574            ))
26575        }
26576    }
26577}
26578
26579/// Fleet is the fleet configuration for the cluster.
26580#[derive(Clone, Default, PartialEq)]
26581#[non_exhaustive]
26582pub struct Fleet {
26583    /// The Fleet host project(project ID or project number) where this cluster
26584    /// will be registered to. This field cannot be changed after the cluster has
26585    /// been registered.
26586    pub project: std::string::String,
26587
26588    /// Output only. The full resource name of the registered fleet membership of
26589    /// the cluster, in the format
26590    /// `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.
26591    pub membership: std::string::String,
26592
26593    /// Output only. Whether the cluster has been registered through the fleet
26594    /// API.
26595    pub pre_registered: bool,
26596
26597    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26598}
26599
26600impl Fleet {
26601    pub fn new() -> Self {
26602        std::default::Default::default()
26603    }
26604
26605    /// Sets the value of [project][crate::model::Fleet::project].
26606    pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26607        self.project = v.into();
26608        self
26609    }
26610
26611    /// Sets the value of [membership][crate::model::Fleet::membership].
26612    pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26613        self.membership = v.into();
26614        self
26615    }
26616
26617    /// Sets the value of [pre_registered][crate::model::Fleet::pre_registered].
26618    pub fn set_pre_registered<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26619        self.pre_registered = v.into();
26620        self
26621    }
26622}
26623
26624impl wkt::message::Message for Fleet {
26625    fn typename() -> &'static str {
26626        "type.googleapis.com/google.container.v1.Fleet"
26627    }
26628}
26629
26630/// Configuration for all of the cluster's control plane endpoints.
26631#[derive(Clone, Default, PartialEq)]
26632#[non_exhaustive]
26633pub struct ControlPlaneEndpointsConfig {
26634    /// DNS endpoint configuration.
26635    pub dns_endpoint_config:
26636        std::option::Option<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
26637
26638    /// IP endpoints configuration.
26639    pub ip_endpoints_config:
26640        std::option::Option<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
26641
26642    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26643}
26644
26645impl ControlPlaneEndpointsConfig {
26646    pub fn new() -> Self {
26647        std::default::Default::default()
26648    }
26649
26650    /// Sets the value of [dns_endpoint_config][crate::model::ControlPlaneEndpointsConfig::dns_endpoint_config].
26651    pub fn set_dns_endpoint_config<T>(mut self, v: T) -> Self
26652    where
26653        T: std::convert::Into<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
26654    {
26655        self.dns_endpoint_config = std::option::Option::Some(v.into());
26656        self
26657    }
26658
26659    /// Sets or clears the value of [dns_endpoint_config][crate::model::ControlPlaneEndpointsConfig::dns_endpoint_config].
26660    pub fn set_or_clear_dns_endpoint_config<T>(mut self, v: std::option::Option<T>) -> Self
26661    where
26662        T: std::convert::Into<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
26663    {
26664        self.dns_endpoint_config = v.map(|x| x.into());
26665        self
26666    }
26667
26668    /// Sets the value of [ip_endpoints_config][crate::model::ControlPlaneEndpointsConfig::ip_endpoints_config].
26669    pub fn set_ip_endpoints_config<T>(mut self, v: T) -> Self
26670    where
26671        T: std::convert::Into<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
26672    {
26673        self.ip_endpoints_config = std::option::Option::Some(v.into());
26674        self
26675    }
26676
26677    /// Sets or clears the value of [ip_endpoints_config][crate::model::ControlPlaneEndpointsConfig::ip_endpoints_config].
26678    pub fn set_or_clear_ip_endpoints_config<T>(mut self, v: std::option::Option<T>) -> Self
26679    where
26680        T: std::convert::Into<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
26681    {
26682        self.ip_endpoints_config = v.map(|x| x.into());
26683        self
26684    }
26685}
26686
26687impl wkt::message::Message for ControlPlaneEndpointsConfig {
26688    fn typename() -> &'static str {
26689        "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig"
26690    }
26691}
26692
26693/// Defines additional types related to [ControlPlaneEndpointsConfig].
26694pub mod control_plane_endpoints_config {
26695    #[allow(unused_imports)]
26696    use super::*;
26697
26698    /// Describes the configuration of a DNS endpoint.
26699    #[derive(Clone, Default, PartialEq)]
26700    #[non_exhaustive]
26701    pub struct DNSEndpointConfig {
26702        /// Output only. The cluster's DNS endpoint configuration.
26703        /// A DNS format address. This is accessible from the public internet.
26704        /// Ex: uid.us-central1.gke.goog.
26705        /// Always present, but the behavior may change according to the value of
26706        /// [DNSEndpointConfig.allow_external_traffic][google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic].
26707        ///
26708        /// [google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic]: crate::model::control_plane_endpoints_config::DNSEndpointConfig::allow_external_traffic
26709        pub endpoint: std::string::String,
26710
26711        /// Controls whether user traffic is allowed over this endpoint. Note that
26712        /// GCP-managed services may still use the endpoint even if this is false.
26713        pub allow_external_traffic: std::option::Option<bool>,
26714
26715        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26716    }
26717
26718    impl DNSEndpointConfig {
26719        pub fn new() -> Self {
26720            std::default::Default::default()
26721        }
26722
26723        /// Sets the value of [endpoint][crate::model::control_plane_endpoints_config::DNSEndpointConfig::endpoint].
26724        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26725            self.endpoint = v.into();
26726            self
26727        }
26728
26729        /// Sets the value of [allow_external_traffic][crate::model::control_plane_endpoints_config::DNSEndpointConfig::allow_external_traffic].
26730        pub fn set_allow_external_traffic<T>(mut self, v: T) -> Self
26731        where
26732            T: std::convert::Into<bool>,
26733        {
26734            self.allow_external_traffic = std::option::Option::Some(v.into());
26735            self
26736        }
26737
26738        /// Sets or clears the value of [allow_external_traffic][crate::model::control_plane_endpoints_config::DNSEndpointConfig::allow_external_traffic].
26739        pub fn set_or_clear_allow_external_traffic<T>(mut self, v: std::option::Option<T>) -> Self
26740        where
26741            T: std::convert::Into<bool>,
26742        {
26743            self.allow_external_traffic = v.map(|x| x.into());
26744            self
26745        }
26746    }
26747
26748    impl wkt::message::Message for DNSEndpointConfig {
26749        fn typename() -> &'static str {
26750            "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig"
26751        }
26752    }
26753
26754    /// IP endpoints configuration.
26755    #[derive(Clone, Default, PartialEq)]
26756    #[non_exhaustive]
26757    pub struct IPEndpointsConfig {
26758        /// Controls whether to allow direct IP access.
26759        pub enabled: std::option::Option<bool>,
26760
26761        /// Controls whether the control plane allows access through a public IP.
26762        /// It is invalid to specify both
26763        /// [PrivateClusterConfig.enablePrivateEndpoint][] and this field at the same
26764        /// time.
26765        pub enable_public_endpoint: std::option::Option<bool>,
26766
26767        /// Controls whether the control plane's private endpoint is accessible from
26768        /// sources in other regions.
26769        /// It is invalid to specify both
26770        /// [PrivateClusterMasterGlobalAccessConfig.enabled][google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled]
26771        /// and this field at the same time.
26772        ///
26773        /// [google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled]: crate::model::PrivateClusterMasterGlobalAccessConfig::enabled
26774        pub global_access: std::option::Option<bool>,
26775
26776        /// Configuration of authorized networks. If enabled, restricts access to the
26777        /// control plane based on source IP.
26778        /// It is invalid to specify both
26779        /// [Cluster.masterAuthorizedNetworksConfig][] and this field at the same
26780        /// time.
26781        pub authorized_networks_config:
26782            std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
26783
26784        /// Output only. The external IP address of this cluster's control plane.
26785        /// Only populated if enabled.
26786        pub public_endpoint: std::string::String,
26787
26788        /// Output only. The internal IP address of this cluster's control plane.
26789        /// Only populated if enabled.
26790        pub private_endpoint: std::string::String,
26791
26792        /// Subnet to provision the master's private endpoint during cluster
26793        /// creation. Specified in projects/*/regions/*/subnetworks/* format. It is
26794        /// invalid to specify both
26795        /// [PrivateClusterConfig.privateEndpointSubnetwork][] and this field at the
26796        /// same time.
26797        pub private_endpoint_subnetwork: std::string::String,
26798
26799        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26800    }
26801
26802    impl IPEndpointsConfig {
26803        pub fn new() -> Self {
26804            std::default::Default::default()
26805        }
26806
26807        /// Sets the value of [enabled][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enabled].
26808        pub fn set_enabled<T>(mut self, v: T) -> Self
26809        where
26810            T: std::convert::Into<bool>,
26811        {
26812            self.enabled = std::option::Option::Some(v.into());
26813            self
26814        }
26815
26816        /// Sets or clears the value of [enabled][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enabled].
26817        pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
26818        where
26819            T: std::convert::Into<bool>,
26820        {
26821            self.enabled = v.map(|x| x.into());
26822            self
26823        }
26824
26825        /// Sets the value of [enable_public_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enable_public_endpoint].
26826        pub fn set_enable_public_endpoint<T>(mut self, v: T) -> Self
26827        where
26828            T: std::convert::Into<bool>,
26829        {
26830            self.enable_public_endpoint = std::option::Option::Some(v.into());
26831            self
26832        }
26833
26834        /// Sets or clears the value of [enable_public_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::enable_public_endpoint].
26835        pub fn set_or_clear_enable_public_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
26836        where
26837            T: std::convert::Into<bool>,
26838        {
26839            self.enable_public_endpoint = v.map(|x| x.into());
26840            self
26841        }
26842
26843        /// Sets the value of [global_access][crate::model::control_plane_endpoints_config::IPEndpointsConfig::global_access].
26844        pub fn set_global_access<T>(mut self, v: T) -> Self
26845        where
26846            T: std::convert::Into<bool>,
26847        {
26848            self.global_access = std::option::Option::Some(v.into());
26849            self
26850        }
26851
26852        /// Sets or clears the value of [global_access][crate::model::control_plane_endpoints_config::IPEndpointsConfig::global_access].
26853        pub fn set_or_clear_global_access<T>(mut self, v: std::option::Option<T>) -> Self
26854        where
26855            T: std::convert::Into<bool>,
26856        {
26857            self.global_access = v.map(|x| x.into());
26858            self
26859        }
26860
26861        /// Sets the value of [authorized_networks_config][crate::model::control_plane_endpoints_config::IPEndpointsConfig::authorized_networks_config].
26862        pub fn set_authorized_networks_config<T>(mut self, v: T) -> Self
26863        where
26864            T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
26865        {
26866            self.authorized_networks_config = std::option::Option::Some(v.into());
26867            self
26868        }
26869
26870        /// Sets or clears the value of [authorized_networks_config][crate::model::control_plane_endpoints_config::IPEndpointsConfig::authorized_networks_config].
26871        pub fn set_or_clear_authorized_networks_config<T>(
26872            mut self,
26873            v: std::option::Option<T>,
26874        ) -> Self
26875        where
26876            T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
26877        {
26878            self.authorized_networks_config = v.map(|x| x.into());
26879            self
26880        }
26881
26882        /// Sets the value of [public_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::public_endpoint].
26883        pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(
26884            mut self,
26885            v: T,
26886        ) -> Self {
26887            self.public_endpoint = v.into();
26888            self
26889        }
26890
26891        /// Sets the value of [private_endpoint][crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint].
26892        pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
26893            mut self,
26894            v: T,
26895        ) -> Self {
26896            self.private_endpoint = v.into();
26897            self
26898        }
26899
26900        /// Sets the value of [private_endpoint_subnetwork][crate::model::control_plane_endpoints_config::IPEndpointsConfig::private_endpoint_subnetwork].
26901        pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
26902            mut self,
26903            v: T,
26904        ) -> Self {
26905            self.private_endpoint_subnetwork = v.into();
26906            self
26907        }
26908    }
26909
26910    impl wkt::message::Message for IPEndpointsConfig {
26911        fn typename() -> &'static str {
26912            "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig"
26913        }
26914    }
26915}
26916
26917/// LocalNvmeSsdBlockConfig contains configuration for using raw-block local
26918/// NVMe SSDs
26919#[derive(Clone, Default, PartialEq)]
26920#[non_exhaustive]
26921pub struct LocalNvmeSsdBlockConfig {
26922    /// Number of local NVMe SSDs to use.  The limit for this value is dependent
26923    /// upon the maximum number of disk available on a machine per zone. See:
26924    /// <https://cloud.google.com/compute/docs/disks/local-ssd>
26925    /// for more information.
26926    ///
26927    /// A zero (or unset) value has different meanings depending on machine type
26928    /// being used:
26929    ///
26930    /// 1. For pre-Gen3 machines, which support flexible numbers of local ssds,
26931    ///    zero (or unset) means to disable using local SSDs as ephemeral storage.
26932    /// 1. For Gen3 machines which dictate a specific number of local ssds, zero
26933    ///    (or unset) means to use the default number of local ssds that goes with
26934    ///    that machine type. For example, for a c3-standard-8-lssd machine, 2 local
26935    ///    ssds would be provisioned. For c3-standard-8 (which doesn't support local
26936    ///    ssds), 0 will be provisioned. See
26937    ///    <https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds>
26938    ///    for more info.
26939    pub local_ssd_count: i32,
26940
26941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26942}
26943
26944impl LocalNvmeSsdBlockConfig {
26945    pub fn new() -> Self {
26946        std::default::Default::default()
26947    }
26948
26949    /// Sets the value of [local_ssd_count][crate::model::LocalNvmeSsdBlockConfig::local_ssd_count].
26950    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
26951        self.local_ssd_count = v.into();
26952        self
26953    }
26954}
26955
26956impl wkt::message::Message for LocalNvmeSsdBlockConfig {
26957    fn typename() -> &'static str {
26958        "type.googleapis.com/google.container.v1.LocalNvmeSsdBlockConfig"
26959    }
26960}
26961
26962/// EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral
26963/// storage using Local SSDs.
26964#[derive(Clone, Default, PartialEq)]
26965#[non_exhaustive]
26966pub struct EphemeralStorageLocalSsdConfig {
26967    /// Number of local SSDs to use to back ephemeral storage. Uses NVMe
26968    /// interfaces.
26969    ///
26970    /// A zero (or unset) value has different meanings depending on machine type
26971    /// being used:
26972    ///
26973    /// 1. For pre-Gen3 machines, which support flexible numbers of local ssds,
26974    ///    zero (or unset) means to disable using local SSDs as ephemeral storage. The
26975    ///    limit for this value is dependent upon the maximum number of disk
26976    ///    available on a machine per zone. See:
26977    ///    <https://cloud.google.com/compute/docs/disks/local-ssd>
26978    ///    for more information.
26979    /// 1. For Gen3 machines which dictate a specific number of local ssds, zero
26980    ///    (or unset) means to use the default number of local ssds that goes with
26981    ///    that machine type. For example, for a c3-standard-8-lssd machine, 2 local
26982    ///    ssds would be provisioned. For c3-standard-8 (which doesn't support local
26983    ///    ssds), 0 will be provisioned. See
26984    ///    <https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds>
26985    ///    for more info.
26986    pub local_ssd_count: i32,
26987
26988    /// Number of local SSDs to use for GKE Data Cache.
26989    pub data_cache_count: i32,
26990
26991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26992}
26993
26994impl EphemeralStorageLocalSsdConfig {
26995    pub fn new() -> Self {
26996        std::default::Default::default()
26997    }
26998
26999    /// Sets the value of [local_ssd_count][crate::model::EphemeralStorageLocalSsdConfig::local_ssd_count].
27000    pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27001        self.local_ssd_count = v.into();
27002        self
27003    }
27004
27005    /// Sets the value of [data_cache_count][crate::model::EphemeralStorageLocalSsdConfig::data_cache_count].
27006    pub fn set_data_cache_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27007        self.data_cache_count = v.into();
27008        self
27009    }
27010}
27011
27012impl wkt::message::Message for EphemeralStorageLocalSsdConfig {
27013    fn typename() -> &'static str {
27014        "type.googleapis.com/google.container.v1.EphemeralStorageLocalSsdConfig"
27015    }
27016}
27017
27018/// A map of resource manager tag keys and values to be attached to the nodes
27019/// for managing Compute Engine firewalls using Network Firewall Policies.
27020/// Tags must be according to specifications in
27021/// <https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications>.
27022/// A maximum of 5 tag key-value pairs can be specified.
27023/// Existing tags will be replaced with new values.
27024#[derive(Clone, Default, PartialEq)]
27025#[non_exhaustive]
27026pub struct ResourceManagerTags {
27027    /// TagKeyValue must be in one of the following formats ([KEY]=[VALUE])
27028    ///
27029    /// 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}`
27030    /// 1. `{org_id}/{tag_key_name}={tag_value_name}`
27031    /// 1. `{project_id}/{tag_key_name}={tag_value_name}`
27032    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
27033
27034    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27035}
27036
27037impl ResourceManagerTags {
27038    pub fn new() -> Self {
27039        std::default::Default::default()
27040    }
27041
27042    /// Sets the value of [tags][crate::model::ResourceManagerTags::tags].
27043    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
27044    where
27045        T: std::iter::IntoIterator<Item = (K, V)>,
27046        K: std::convert::Into<std::string::String>,
27047        V: std::convert::Into<std::string::String>,
27048    {
27049        use std::iter::Iterator;
27050        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
27051        self
27052    }
27053}
27054
27055impl wkt::message::Message for ResourceManagerTags {
27056    fn typename() -> &'static str {
27057        "type.googleapis.com/google.container.v1.ResourceManagerTags"
27058    }
27059}
27060
27061/// EnterpriseConfig is the cluster enterprise configuration.
27062#[derive(Clone, Default, PartialEq)]
27063#[non_exhaustive]
27064pub struct EnterpriseConfig {
27065    /// Output only. cluster_tier indicates the effective tier of the cluster.
27066    pub cluster_tier: crate::model::enterprise_config::ClusterTier,
27067
27068    /// desired_tier specifies the desired tier of the cluster.
27069    pub desired_tier: crate::model::enterprise_config::ClusterTier,
27070
27071    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27072}
27073
27074impl EnterpriseConfig {
27075    pub fn new() -> Self {
27076        std::default::Default::default()
27077    }
27078
27079    /// Sets the value of [cluster_tier][crate::model::EnterpriseConfig::cluster_tier].
27080    pub fn set_cluster_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
27081        mut self,
27082        v: T,
27083    ) -> Self {
27084        self.cluster_tier = v.into();
27085        self
27086    }
27087
27088    /// Sets the value of [desired_tier][crate::model::EnterpriseConfig::desired_tier].
27089    pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
27090        mut self,
27091        v: T,
27092    ) -> Self {
27093        self.desired_tier = v.into();
27094        self
27095    }
27096}
27097
27098impl wkt::message::Message for EnterpriseConfig {
27099    fn typename() -> &'static str {
27100        "type.googleapis.com/google.container.v1.EnterpriseConfig"
27101    }
27102}
27103
27104/// Defines additional types related to [EnterpriseConfig].
27105pub mod enterprise_config {
27106    #[allow(unused_imports)]
27107    use super::*;
27108
27109    /// Premium tiers for GKE Cluster.
27110    ///
27111    /// # Working with unknown values
27112    ///
27113    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27114    /// additional enum variants at any time. Adding new variants is not considered
27115    /// a breaking change. Applications should write their code in anticipation of:
27116    ///
27117    /// - New values appearing in future releases of the client library, **and**
27118    /// - New values received dynamically, without application changes.
27119    ///
27120    /// Please consult the [Working with enums] section in the user guide for some
27121    /// guidelines.
27122    ///
27123    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27124    #[derive(Clone, Debug, PartialEq)]
27125    #[non_exhaustive]
27126    pub enum ClusterTier {
27127        /// CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set.
27128        Unspecified,
27129        /// STANDARD indicates a standard GKE cluster.
27130        Standard,
27131        /// ENTERPRISE indicates a GKE Enterprise cluster.
27132        Enterprise,
27133        /// If set, the enum was initialized with an unknown value.
27134        ///
27135        /// Applications can examine the value using [ClusterTier::value] or
27136        /// [ClusterTier::name].
27137        UnknownValue(cluster_tier::UnknownValue),
27138    }
27139
27140    #[doc(hidden)]
27141    pub mod cluster_tier {
27142        #[allow(unused_imports)]
27143        use super::*;
27144        #[derive(Clone, Debug, PartialEq)]
27145        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27146    }
27147
27148    impl ClusterTier {
27149        /// Gets the enum value.
27150        ///
27151        /// Returns `None` if the enum contains an unknown value deserialized from
27152        /// the string representation of enums.
27153        pub fn value(&self) -> std::option::Option<i32> {
27154            match self {
27155                Self::Unspecified => std::option::Option::Some(0),
27156                Self::Standard => std::option::Option::Some(1),
27157                Self::Enterprise => std::option::Option::Some(2),
27158                Self::UnknownValue(u) => u.0.value(),
27159            }
27160        }
27161
27162        /// Gets the enum value as a string.
27163        ///
27164        /// Returns `None` if the enum contains an unknown value deserialized from
27165        /// the integer representation of enums.
27166        pub fn name(&self) -> std::option::Option<&str> {
27167            match self {
27168                Self::Unspecified => std::option::Option::Some("CLUSTER_TIER_UNSPECIFIED"),
27169                Self::Standard => std::option::Option::Some("STANDARD"),
27170                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
27171                Self::UnknownValue(u) => u.0.name(),
27172            }
27173        }
27174    }
27175
27176    impl std::default::Default for ClusterTier {
27177        fn default() -> Self {
27178            use std::convert::From;
27179            Self::from(0)
27180        }
27181    }
27182
27183    impl std::fmt::Display for ClusterTier {
27184        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27185            wkt::internal::display_enum(f, self.name(), self.value())
27186        }
27187    }
27188
27189    impl std::convert::From<i32> for ClusterTier {
27190        fn from(value: i32) -> Self {
27191            match value {
27192                0 => Self::Unspecified,
27193                1 => Self::Standard,
27194                2 => Self::Enterprise,
27195                _ => Self::UnknownValue(cluster_tier::UnknownValue(
27196                    wkt::internal::UnknownEnumValue::Integer(value),
27197                )),
27198            }
27199        }
27200    }
27201
27202    impl std::convert::From<&str> for ClusterTier {
27203        fn from(value: &str) -> Self {
27204            use std::string::ToString;
27205            match value {
27206                "CLUSTER_TIER_UNSPECIFIED" => Self::Unspecified,
27207                "STANDARD" => Self::Standard,
27208                "ENTERPRISE" => Self::Enterprise,
27209                _ => Self::UnknownValue(cluster_tier::UnknownValue(
27210                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27211                )),
27212            }
27213        }
27214    }
27215
27216    impl serde::ser::Serialize for ClusterTier {
27217        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27218        where
27219            S: serde::Serializer,
27220        {
27221            match self {
27222                Self::Unspecified => serializer.serialize_i32(0),
27223                Self::Standard => serializer.serialize_i32(1),
27224                Self::Enterprise => serializer.serialize_i32(2),
27225                Self::UnknownValue(u) => u.0.serialize(serializer),
27226            }
27227        }
27228    }
27229
27230    impl<'de> serde::de::Deserialize<'de> for ClusterTier {
27231        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27232        where
27233            D: serde::Deserializer<'de>,
27234        {
27235            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ClusterTier>::new(
27236                ".google.container.v1.EnterpriseConfig.ClusterTier",
27237            ))
27238        }
27239    }
27240}
27241
27242/// SecretManagerConfig is config for secret manager enablement.
27243#[derive(Clone, Default, PartialEq)]
27244#[non_exhaustive]
27245pub struct SecretManagerConfig {
27246    /// Enable/Disable Secret Manager Config.
27247    pub enabled: std::option::Option<bool>,
27248
27249    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27250}
27251
27252impl SecretManagerConfig {
27253    pub fn new() -> Self {
27254        std::default::Default::default()
27255    }
27256
27257    /// Sets the value of [enabled][crate::model::SecretManagerConfig::enabled].
27258    pub fn set_enabled<T>(mut self, v: T) -> Self
27259    where
27260        T: std::convert::Into<bool>,
27261    {
27262        self.enabled = std::option::Option::Some(v.into());
27263        self
27264    }
27265
27266    /// Sets or clears the value of [enabled][crate::model::SecretManagerConfig::enabled].
27267    pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
27268    where
27269        T: std::convert::Into<bool>,
27270    {
27271        self.enabled = v.map(|x| x.into());
27272        self
27273    }
27274}
27275
27276impl wkt::message::Message for SecretManagerConfig {
27277    fn typename() -> &'static str {
27278        "type.googleapis.com/google.container.v1.SecretManagerConfig"
27279    }
27280}
27281
27282/// BootDisk specifies the boot disk configuration for nodepools.
27283#[derive(Clone, Default, PartialEq)]
27284#[non_exhaustive]
27285pub struct BootDisk {
27286    /// Disk type of the boot disk.
27287    /// (i.e. Hyperdisk-Balanced, PD-Balanced, etc.)
27288    pub disk_type: std::string::String,
27289
27290    /// Disk size in GB. Replaces NodeConfig.disk_size_gb
27291    pub size_gb: i64,
27292
27293    /// For Hyperdisk-Balanced only, the provisioned IOPS config value.
27294    pub provisioned_iops: i64,
27295
27296    /// For Hyperdisk-Balanced only, the provisioned throughput config value.
27297    pub provisioned_throughput: i64,
27298
27299    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27300}
27301
27302impl BootDisk {
27303    pub fn new() -> Self {
27304        std::default::Default::default()
27305    }
27306
27307    /// Sets the value of [disk_type][crate::model::BootDisk::disk_type].
27308    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27309        self.disk_type = v.into();
27310        self
27311    }
27312
27313    /// Sets the value of [size_gb][crate::model::BootDisk::size_gb].
27314    pub fn set_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
27315        self.size_gb = v.into();
27316        self
27317    }
27318
27319    /// Sets the value of [provisioned_iops][crate::model::BootDisk::provisioned_iops].
27320    pub fn set_provisioned_iops<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
27321        self.provisioned_iops = v.into();
27322        self
27323    }
27324
27325    /// Sets the value of [provisioned_throughput][crate::model::BootDisk::provisioned_throughput].
27326    pub fn set_provisioned_throughput<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
27327        self.provisioned_throughput = v.into();
27328        self
27329    }
27330}
27331
27332impl wkt::message::Message for BootDisk {
27333    fn typename() -> &'static str {
27334        "type.googleapis.com/google.container.v1.BootDisk"
27335    }
27336}
27337
27338/// SecondaryBootDisk represents a persistent disk attached to a node
27339/// with special configurations based on its mode.
27340#[derive(Clone, Default, PartialEq)]
27341#[non_exhaustive]
27342pub struct SecondaryBootDisk {
27343    /// Disk mode (container image cache, etc.)
27344    pub mode: crate::model::secondary_boot_disk::Mode,
27345
27346    /// Fully-qualified resource ID for an existing disk image.
27347    pub disk_image: std::string::String,
27348
27349    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27350}
27351
27352impl SecondaryBootDisk {
27353    pub fn new() -> Self {
27354        std::default::Default::default()
27355    }
27356
27357    /// Sets the value of [mode][crate::model::SecondaryBootDisk::mode].
27358    pub fn set_mode<T: std::convert::Into<crate::model::secondary_boot_disk::Mode>>(
27359        mut self,
27360        v: T,
27361    ) -> Self {
27362        self.mode = v.into();
27363        self
27364    }
27365
27366    /// Sets the value of [disk_image][crate::model::SecondaryBootDisk::disk_image].
27367    pub fn set_disk_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27368        self.disk_image = v.into();
27369        self
27370    }
27371}
27372
27373impl wkt::message::Message for SecondaryBootDisk {
27374    fn typename() -> &'static str {
27375        "type.googleapis.com/google.container.v1.SecondaryBootDisk"
27376    }
27377}
27378
27379/// Defines additional types related to [SecondaryBootDisk].
27380pub mod secondary_boot_disk {
27381    #[allow(unused_imports)]
27382    use super::*;
27383
27384    /// Mode specifies how the secondary boot disk will be used.
27385    /// This triggers mode-specified logic in the control plane.
27386    ///
27387    /// # Working with unknown values
27388    ///
27389    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27390    /// additional enum variants at any time. Adding new variants is not considered
27391    /// a breaking change. Applications should write their code in anticipation of:
27392    ///
27393    /// - New values appearing in future releases of the client library, **and**
27394    /// - New values received dynamically, without application changes.
27395    ///
27396    /// Please consult the [Working with enums] section in the user guide for some
27397    /// guidelines.
27398    ///
27399    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27400    #[derive(Clone, Debug, PartialEq)]
27401    #[non_exhaustive]
27402    pub enum Mode {
27403        /// MODE_UNSPECIFIED is when mode is not set.
27404        Unspecified,
27405        /// CONTAINER_IMAGE_CACHE is for using the secondary boot disk as
27406        /// a container image cache.
27407        ContainerImageCache,
27408        /// If set, the enum was initialized with an unknown value.
27409        ///
27410        /// Applications can examine the value using [Mode::value] or
27411        /// [Mode::name].
27412        UnknownValue(mode::UnknownValue),
27413    }
27414
27415    #[doc(hidden)]
27416    pub mod mode {
27417        #[allow(unused_imports)]
27418        use super::*;
27419        #[derive(Clone, Debug, PartialEq)]
27420        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27421    }
27422
27423    impl Mode {
27424        /// Gets the enum value.
27425        ///
27426        /// Returns `None` if the enum contains an unknown value deserialized from
27427        /// the string representation of enums.
27428        pub fn value(&self) -> std::option::Option<i32> {
27429            match self {
27430                Self::Unspecified => std::option::Option::Some(0),
27431                Self::ContainerImageCache => std::option::Option::Some(1),
27432                Self::UnknownValue(u) => u.0.value(),
27433            }
27434        }
27435
27436        /// Gets the enum value as a string.
27437        ///
27438        /// Returns `None` if the enum contains an unknown value deserialized from
27439        /// the integer representation of enums.
27440        pub fn name(&self) -> std::option::Option<&str> {
27441            match self {
27442                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
27443                Self::ContainerImageCache => std::option::Option::Some("CONTAINER_IMAGE_CACHE"),
27444                Self::UnknownValue(u) => u.0.name(),
27445            }
27446        }
27447    }
27448
27449    impl std::default::Default for Mode {
27450        fn default() -> Self {
27451            use std::convert::From;
27452            Self::from(0)
27453        }
27454    }
27455
27456    impl std::fmt::Display for Mode {
27457        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27458            wkt::internal::display_enum(f, self.name(), self.value())
27459        }
27460    }
27461
27462    impl std::convert::From<i32> for Mode {
27463        fn from(value: i32) -> Self {
27464            match value {
27465                0 => Self::Unspecified,
27466                1 => Self::ContainerImageCache,
27467                _ => Self::UnknownValue(mode::UnknownValue(
27468                    wkt::internal::UnknownEnumValue::Integer(value),
27469                )),
27470            }
27471        }
27472    }
27473
27474    impl std::convert::From<&str> for Mode {
27475        fn from(value: &str) -> Self {
27476            use std::string::ToString;
27477            match value {
27478                "MODE_UNSPECIFIED" => Self::Unspecified,
27479                "CONTAINER_IMAGE_CACHE" => Self::ContainerImageCache,
27480                _ => Self::UnknownValue(mode::UnknownValue(
27481                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27482                )),
27483            }
27484        }
27485    }
27486
27487    impl serde::ser::Serialize for Mode {
27488        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27489        where
27490            S: serde::Serializer,
27491        {
27492            match self {
27493                Self::Unspecified => serializer.serialize_i32(0),
27494                Self::ContainerImageCache => serializer.serialize_i32(1),
27495                Self::UnknownValue(u) => u.0.serialize(serializer),
27496            }
27497        }
27498    }
27499
27500    impl<'de> serde::de::Deserialize<'de> for Mode {
27501        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27502        where
27503            D: serde::Deserializer<'de>,
27504        {
27505            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
27506                ".google.container.v1.SecondaryBootDisk.Mode",
27507            ))
27508        }
27509    }
27510}
27511
27512/// SecondaryBootDiskUpdateStrategy is a placeholder which will be extended
27513/// in the future to define different options for updating secondary boot disks.
27514#[derive(Clone, Default, PartialEq)]
27515#[non_exhaustive]
27516pub struct SecondaryBootDiskUpdateStrategy {
27517    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27518}
27519
27520impl SecondaryBootDiskUpdateStrategy {
27521    pub fn new() -> Self {
27522        std::default::Default::default()
27523    }
27524}
27525
27526impl wkt::message::Message for SecondaryBootDiskUpdateStrategy {
27527    fn typename() -> &'static str {
27528        "type.googleapis.com/google.container.v1.SecondaryBootDiskUpdateStrategy"
27529    }
27530}
27531
27532/// FetchClusterUpgradeInfoRequest fetches the upgrade information of a cluster.
27533#[derive(Clone, Default, PartialEq)]
27534#[non_exhaustive]
27535pub struct FetchClusterUpgradeInfoRequest {
27536    /// Required. The name (project, location, cluster) of the cluster to get.
27537    /// Specified in the format `projects/*/locations/*/clusters/*` or
27538    /// `projects/*/zones/*/clusters/*`.
27539    pub name: std::string::String,
27540
27541    /// API request version that initiates this operation.
27542    pub version: std::string::String,
27543
27544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27545}
27546
27547impl FetchClusterUpgradeInfoRequest {
27548    pub fn new() -> Self {
27549        std::default::Default::default()
27550    }
27551
27552    /// Sets the value of [name][crate::model::FetchClusterUpgradeInfoRequest::name].
27553    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27554        self.name = v.into();
27555        self
27556    }
27557
27558    /// Sets the value of [version][crate::model::FetchClusterUpgradeInfoRequest::version].
27559    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27560        self.version = v.into();
27561        self
27562    }
27563}
27564
27565impl wkt::message::Message for FetchClusterUpgradeInfoRequest {
27566    fn typename() -> &'static str {
27567        "type.googleapis.com/google.container.v1.FetchClusterUpgradeInfoRequest"
27568    }
27569}
27570
27571/// ClusterUpgradeInfo contains the upgrade information of a cluster.
27572#[derive(Clone, Default, PartialEq)]
27573#[non_exhaustive]
27574pub struct ClusterUpgradeInfo {
27575    /// minor_target_version indicates the target version for minor upgrade.
27576    pub minor_target_version: std::option::Option<std::string::String>,
27577
27578    /// patch_target_version indicates the target version for patch upgrade.
27579    pub patch_target_version: std::option::Option<std::string::String>,
27580
27581    /// The auto upgrade status.
27582    pub auto_upgrade_status: std::vec::Vec<crate::model::cluster_upgrade_info::AutoUpgradeStatus>,
27583
27584    /// The auto upgrade paused reason.
27585    pub paused_reason: std::vec::Vec<crate::model::cluster_upgrade_info::AutoUpgradePausedReason>,
27586
27587    /// The list of past auto upgrades.
27588    pub upgrade_details: std::vec::Vec<crate::model::UpgradeDetails>,
27589
27590    /// The cluster's current minor version's end of standard support timestamp.
27591    pub end_of_standard_support_timestamp: std::option::Option<std::string::String>,
27592
27593    /// The cluster's current minor version's end of extended support timestamp.
27594    pub end_of_extended_support_timestamp: std::option::Option<std::string::String>,
27595
27596    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27597}
27598
27599impl ClusterUpgradeInfo {
27600    pub fn new() -> Self {
27601        std::default::Default::default()
27602    }
27603
27604    /// Sets the value of [minor_target_version][crate::model::ClusterUpgradeInfo::minor_target_version].
27605    pub fn set_minor_target_version<T>(mut self, v: T) -> Self
27606    where
27607        T: std::convert::Into<std::string::String>,
27608    {
27609        self.minor_target_version = std::option::Option::Some(v.into());
27610        self
27611    }
27612
27613    /// Sets or clears the value of [minor_target_version][crate::model::ClusterUpgradeInfo::minor_target_version].
27614    pub fn set_or_clear_minor_target_version<T>(mut self, v: std::option::Option<T>) -> Self
27615    where
27616        T: std::convert::Into<std::string::String>,
27617    {
27618        self.minor_target_version = v.map(|x| x.into());
27619        self
27620    }
27621
27622    /// Sets the value of [patch_target_version][crate::model::ClusterUpgradeInfo::patch_target_version].
27623    pub fn set_patch_target_version<T>(mut self, v: T) -> Self
27624    where
27625        T: std::convert::Into<std::string::String>,
27626    {
27627        self.patch_target_version = std::option::Option::Some(v.into());
27628        self
27629    }
27630
27631    /// Sets or clears the value of [patch_target_version][crate::model::ClusterUpgradeInfo::patch_target_version].
27632    pub fn set_or_clear_patch_target_version<T>(mut self, v: std::option::Option<T>) -> Self
27633    where
27634        T: std::convert::Into<std::string::String>,
27635    {
27636        self.patch_target_version = v.map(|x| x.into());
27637        self
27638    }
27639
27640    /// Sets the value of [auto_upgrade_status][crate::model::ClusterUpgradeInfo::auto_upgrade_status].
27641    pub fn set_auto_upgrade_status<T, V>(mut self, v: T) -> Self
27642    where
27643        T: std::iter::IntoIterator<Item = V>,
27644        V: std::convert::Into<crate::model::cluster_upgrade_info::AutoUpgradeStatus>,
27645    {
27646        use std::iter::Iterator;
27647        self.auto_upgrade_status = v.into_iter().map(|i| i.into()).collect();
27648        self
27649    }
27650
27651    /// Sets the value of [paused_reason][crate::model::ClusterUpgradeInfo::paused_reason].
27652    pub fn set_paused_reason<T, V>(mut self, v: T) -> Self
27653    where
27654        T: std::iter::IntoIterator<Item = V>,
27655        V: std::convert::Into<crate::model::cluster_upgrade_info::AutoUpgradePausedReason>,
27656    {
27657        use std::iter::Iterator;
27658        self.paused_reason = v.into_iter().map(|i| i.into()).collect();
27659        self
27660    }
27661
27662    /// Sets the value of [upgrade_details][crate::model::ClusterUpgradeInfo::upgrade_details].
27663    pub fn set_upgrade_details<T, V>(mut self, v: T) -> Self
27664    where
27665        T: std::iter::IntoIterator<Item = V>,
27666        V: std::convert::Into<crate::model::UpgradeDetails>,
27667    {
27668        use std::iter::Iterator;
27669        self.upgrade_details = v.into_iter().map(|i| i.into()).collect();
27670        self
27671    }
27672
27673    /// Sets the value of [end_of_standard_support_timestamp][crate::model::ClusterUpgradeInfo::end_of_standard_support_timestamp].
27674    pub fn set_end_of_standard_support_timestamp<T>(mut self, v: T) -> Self
27675    where
27676        T: std::convert::Into<std::string::String>,
27677    {
27678        self.end_of_standard_support_timestamp = std::option::Option::Some(v.into());
27679        self
27680    }
27681
27682    /// Sets or clears the value of [end_of_standard_support_timestamp][crate::model::ClusterUpgradeInfo::end_of_standard_support_timestamp].
27683    pub fn set_or_clear_end_of_standard_support_timestamp<T>(
27684        mut self,
27685        v: std::option::Option<T>,
27686    ) -> Self
27687    where
27688        T: std::convert::Into<std::string::String>,
27689    {
27690        self.end_of_standard_support_timestamp = v.map(|x| x.into());
27691        self
27692    }
27693
27694    /// Sets the value of [end_of_extended_support_timestamp][crate::model::ClusterUpgradeInfo::end_of_extended_support_timestamp].
27695    pub fn set_end_of_extended_support_timestamp<T>(mut self, v: T) -> Self
27696    where
27697        T: std::convert::Into<std::string::String>,
27698    {
27699        self.end_of_extended_support_timestamp = std::option::Option::Some(v.into());
27700        self
27701    }
27702
27703    /// Sets or clears the value of [end_of_extended_support_timestamp][crate::model::ClusterUpgradeInfo::end_of_extended_support_timestamp].
27704    pub fn set_or_clear_end_of_extended_support_timestamp<T>(
27705        mut self,
27706        v: std::option::Option<T>,
27707    ) -> Self
27708    where
27709        T: std::convert::Into<std::string::String>,
27710    {
27711        self.end_of_extended_support_timestamp = v.map(|x| x.into());
27712        self
27713    }
27714}
27715
27716impl wkt::message::Message for ClusterUpgradeInfo {
27717    fn typename() -> &'static str {
27718        "type.googleapis.com/google.container.v1.ClusterUpgradeInfo"
27719    }
27720}
27721
27722/// Defines additional types related to [ClusterUpgradeInfo].
27723pub mod cluster_upgrade_info {
27724    #[allow(unused_imports)]
27725    use super::*;
27726
27727    /// AutoUpgradeStatus indicates the status of auto upgrade.
27728    ///
27729    /// # Working with unknown values
27730    ///
27731    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27732    /// additional enum variants at any time. Adding new variants is not considered
27733    /// a breaking change. Applications should write their code in anticipation of:
27734    ///
27735    /// - New values appearing in future releases of the client library, **and**
27736    /// - New values received dynamically, without application changes.
27737    ///
27738    /// Please consult the [Working with enums] section in the user guide for some
27739    /// guidelines.
27740    ///
27741    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27742    #[derive(Clone, Debug, PartialEq)]
27743    #[non_exhaustive]
27744    pub enum AutoUpgradeStatus {
27745        /// UNKNOWN indicates an unknown status.
27746        Unknown,
27747        /// ACTIVE indicates an active status.
27748        Active,
27749        /// MINOR_UPGRADE_PAUSED indicates the minor version upgrade is
27750        /// paused.
27751        MinorUpgradePaused,
27752        /// UPGRADE_PAUSED indicates the upgrade is paused.
27753        UpgradePaused,
27754        /// If set, the enum was initialized with an unknown value.
27755        ///
27756        /// Applications can examine the value using [AutoUpgradeStatus::value] or
27757        /// [AutoUpgradeStatus::name].
27758        UnknownValue(auto_upgrade_status::UnknownValue),
27759    }
27760
27761    #[doc(hidden)]
27762    pub mod auto_upgrade_status {
27763        #[allow(unused_imports)]
27764        use super::*;
27765        #[derive(Clone, Debug, PartialEq)]
27766        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27767    }
27768
27769    impl AutoUpgradeStatus {
27770        /// Gets the enum value.
27771        ///
27772        /// Returns `None` if the enum contains an unknown value deserialized from
27773        /// the string representation of enums.
27774        pub fn value(&self) -> std::option::Option<i32> {
27775            match self {
27776                Self::Unknown => std::option::Option::Some(0),
27777                Self::Active => std::option::Option::Some(1),
27778                Self::MinorUpgradePaused => std::option::Option::Some(4),
27779                Self::UpgradePaused => std::option::Option::Some(5),
27780                Self::UnknownValue(u) => u.0.value(),
27781            }
27782        }
27783
27784        /// Gets the enum value as a string.
27785        ///
27786        /// Returns `None` if the enum contains an unknown value deserialized from
27787        /// the integer representation of enums.
27788        pub fn name(&self) -> std::option::Option<&str> {
27789            match self {
27790                Self::Unknown => std::option::Option::Some("UNKNOWN"),
27791                Self::Active => std::option::Option::Some("ACTIVE"),
27792                Self::MinorUpgradePaused => std::option::Option::Some("MINOR_UPGRADE_PAUSED"),
27793                Self::UpgradePaused => std::option::Option::Some("UPGRADE_PAUSED"),
27794                Self::UnknownValue(u) => u.0.name(),
27795            }
27796        }
27797    }
27798
27799    impl std::default::Default for AutoUpgradeStatus {
27800        fn default() -> Self {
27801            use std::convert::From;
27802            Self::from(0)
27803        }
27804    }
27805
27806    impl std::fmt::Display for AutoUpgradeStatus {
27807        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27808            wkt::internal::display_enum(f, self.name(), self.value())
27809        }
27810    }
27811
27812    impl std::convert::From<i32> for AutoUpgradeStatus {
27813        fn from(value: i32) -> Self {
27814            match value {
27815                0 => Self::Unknown,
27816                1 => Self::Active,
27817                4 => Self::MinorUpgradePaused,
27818                5 => Self::UpgradePaused,
27819                _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
27820                    wkt::internal::UnknownEnumValue::Integer(value),
27821                )),
27822            }
27823        }
27824    }
27825
27826    impl std::convert::From<&str> for AutoUpgradeStatus {
27827        fn from(value: &str) -> Self {
27828            use std::string::ToString;
27829            match value {
27830                "UNKNOWN" => Self::Unknown,
27831                "ACTIVE" => Self::Active,
27832                "MINOR_UPGRADE_PAUSED" => Self::MinorUpgradePaused,
27833                "UPGRADE_PAUSED" => Self::UpgradePaused,
27834                _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
27835                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27836                )),
27837            }
27838        }
27839    }
27840
27841    impl serde::ser::Serialize for AutoUpgradeStatus {
27842        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27843        where
27844            S: serde::Serializer,
27845        {
27846            match self {
27847                Self::Unknown => serializer.serialize_i32(0),
27848                Self::Active => serializer.serialize_i32(1),
27849                Self::MinorUpgradePaused => serializer.serialize_i32(4),
27850                Self::UpgradePaused => serializer.serialize_i32(5),
27851                Self::UnknownValue(u) => u.0.serialize(serializer),
27852            }
27853        }
27854    }
27855
27856    impl<'de> serde::de::Deserialize<'de> for AutoUpgradeStatus {
27857        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27858        where
27859            D: serde::Deserializer<'de>,
27860        {
27861            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoUpgradeStatus>::new(
27862                ".google.container.v1.ClusterUpgradeInfo.AutoUpgradeStatus",
27863            ))
27864        }
27865    }
27866
27867    /// AutoUpgradePausedReason indicates the reason for auto upgrade paused
27868    /// status.
27869    ///
27870    /// # Working with unknown values
27871    ///
27872    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27873    /// additional enum variants at any time. Adding new variants is not considered
27874    /// a breaking change. Applications should write their code in anticipation of:
27875    ///
27876    /// - New values appearing in future releases of the client library, **and**
27877    /// - New values received dynamically, without application changes.
27878    ///
27879    /// Please consult the [Working with enums] section in the user guide for some
27880    /// guidelines.
27881    ///
27882    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27883    #[derive(Clone, Debug, PartialEq)]
27884    #[non_exhaustive]
27885    pub enum AutoUpgradePausedReason {
27886        /// AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason.
27887        Unspecified,
27888        /// MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance
27889        /// window.
27890        MaintenanceWindow,
27891        /// MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a
27892        /// maintenance exclusion with scope NO_UPGRADES.
27893        MaintenanceExclusionNoUpgrades,
27894        /// MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a
27895        /// maintenance exclusion with scope NO_MINOR_UPGRADES.
27896        MaintenanceExclusionNoMinorUpgrades,
27897        /// CLUSTER_DISRUPTION_BUDGET indicates the cluster is outside the cluster
27898        /// disruption budget.
27899        ClusterDisruptionBudget,
27900        /// CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE indicates the cluster is outside
27901        /// the cluster disruption budget for minor version upgrade.
27902        ClusterDisruptionBudgetMinorUpgrade,
27903        /// SYSTEM_CONFIG indicates the cluster upgrade is paused  by system config.
27904        SystemConfig,
27905        /// If set, the enum was initialized with an unknown value.
27906        ///
27907        /// Applications can examine the value using [AutoUpgradePausedReason::value] or
27908        /// [AutoUpgradePausedReason::name].
27909        UnknownValue(auto_upgrade_paused_reason::UnknownValue),
27910    }
27911
27912    #[doc(hidden)]
27913    pub mod auto_upgrade_paused_reason {
27914        #[allow(unused_imports)]
27915        use super::*;
27916        #[derive(Clone, Debug, PartialEq)]
27917        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27918    }
27919
27920    impl AutoUpgradePausedReason {
27921        /// Gets the enum value.
27922        ///
27923        /// Returns `None` if the enum contains an unknown value deserialized from
27924        /// the string representation of enums.
27925        pub fn value(&self) -> std::option::Option<i32> {
27926            match self {
27927                Self::Unspecified => std::option::Option::Some(0),
27928                Self::MaintenanceWindow => std::option::Option::Some(1),
27929                Self::MaintenanceExclusionNoUpgrades => std::option::Option::Some(5),
27930                Self::MaintenanceExclusionNoMinorUpgrades => std::option::Option::Some(6),
27931                Self::ClusterDisruptionBudget => std::option::Option::Some(4),
27932                Self::ClusterDisruptionBudgetMinorUpgrade => std::option::Option::Some(7),
27933                Self::SystemConfig => std::option::Option::Some(8),
27934                Self::UnknownValue(u) => u.0.value(),
27935            }
27936        }
27937
27938        /// Gets the enum value as a string.
27939        ///
27940        /// Returns `None` if the enum contains an unknown value deserialized from
27941        /// the integer representation of enums.
27942        pub fn name(&self) -> std::option::Option<&str> {
27943            match self {
27944                Self::Unspecified => {
27945                    std::option::Option::Some("AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED")
27946                }
27947                Self::MaintenanceWindow => std::option::Option::Some("MAINTENANCE_WINDOW"),
27948                Self::MaintenanceExclusionNoUpgrades => {
27949                    std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_UPGRADES")
27950                }
27951                Self::MaintenanceExclusionNoMinorUpgrades => {
27952                    std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES")
27953                }
27954                Self::ClusterDisruptionBudget => {
27955                    std::option::Option::Some("CLUSTER_DISRUPTION_BUDGET")
27956                }
27957                Self::ClusterDisruptionBudgetMinorUpgrade => {
27958                    std::option::Option::Some("CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE")
27959                }
27960                Self::SystemConfig => std::option::Option::Some("SYSTEM_CONFIG"),
27961                Self::UnknownValue(u) => u.0.name(),
27962            }
27963        }
27964    }
27965
27966    impl std::default::Default for AutoUpgradePausedReason {
27967        fn default() -> Self {
27968            use std::convert::From;
27969            Self::from(0)
27970        }
27971    }
27972
27973    impl std::fmt::Display for AutoUpgradePausedReason {
27974        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27975            wkt::internal::display_enum(f, self.name(), self.value())
27976        }
27977    }
27978
27979    impl std::convert::From<i32> for AutoUpgradePausedReason {
27980        fn from(value: i32) -> Self {
27981            match value {
27982                0 => Self::Unspecified,
27983                1 => Self::MaintenanceWindow,
27984                4 => Self::ClusterDisruptionBudget,
27985                5 => Self::MaintenanceExclusionNoUpgrades,
27986                6 => Self::MaintenanceExclusionNoMinorUpgrades,
27987                7 => Self::ClusterDisruptionBudgetMinorUpgrade,
27988                8 => Self::SystemConfig,
27989                _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
27990                    wkt::internal::UnknownEnumValue::Integer(value),
27991                )),
27992            }
27993        }
27994    }
27995
27996    impl std::convert::From<&str> for AutoUpgradePausedReason {
27997        fn from(value: &str) -> Self {
27998            use std::string::ToString;
27999            match value {
28000                "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED" => Self::Unspecified,
28001                "MAINTENANCE_WINDOW" => Self::MaintenanceWindow,
28002                "MAINTENANCE_EXCLUSION_NO_UPGRADES" => Self::MaintenanceExclusionNoUpgrades,
28003                "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES" => {
28004                    Self::MaintenanceExclusionNoMinorUpgrades
28005                }
28006                "CLUSTER_DISRUPTION_BUDGET" => Self::ClusterDisruptionBudget,
28007                "CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE" => {
28008                    Self::ClusterDisruptionBudgetMinorUpgrade
28009                }
28010                "SYSTEM_CONFIG" => Self::SystemConfig,
28011                _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
28012                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28013                )),
28014            }
28015        }
28016    }
28017
28018    impl serde::ser::Serialize for AutoUpgradePausedReason {
28019        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28020        where
28021            S: serde::Serializer,
28022        {
28023            match self {
28024                Self::Unspecified => serializer.serialize_i32(0),
28025                Self::MaintenanceWindow => serializer.serialize_i32(1),
28026                Self::MaintenanceExclusionNoUpgrades => serializer.serialize_i32(5),
28027                Self::MaintenanceExclusionNoMinorUpgrades => serializer.serialize_i32(6),
28028                Self::ClusterDisruptionBudget => serializer.serialize_i32(4),
28029                Self::ClusterDisruptionBudgetMinorUpgrade => serializer.serialize_i32(7),
28030                Self::SystemConfig => serializer.serialize_i32(8),
28031                Self::UnknownValue(u) => u.0.serialize(serializer),
28032            }
28033        }
28034    }
28035
28036    impl<'de> serde::de::Deserialize<'de> for AutoUpgradePausedReason {
28037        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28038        where
28039            D: serde::Deserializer<'de>,
28040        {
28041            deserializer.deserialize_any(
28042                wkt::internal::EnumVisitor::<AutoUpgradePausedReason>::new(
28043                    ".google.container.v1.ClusterUpgradeInfo.AutoUpgradePausedReason",
28044                ),
28045            )
28046        }
28047    }
28048}
28049
28050/// UpgradeDetails contains detailed information of each individual upgrade
28051/// operation.
28052#[derive(Clone, Default, PartialEq)]
28053#[non_exhaustive]
28054pub struct UpgradeDetails {
28055    /// Output only. The state of the upgrade.
28056    pub state: crate::model::upgrade_details::State,
28057
28058    /// The start timestamp of the upgrade.
28059    pub start_time: std::option::Option<wkt::Timestamp>,
28060
28061    /// The end timestamp of the upgrade.
28062    pub end_time: std::option::Option<wkt::Timestamp>,
28063
28064    /// The version before the upgrade.
28065    pub initial_version: std::string::String,
28066
28067    /// The version after the upgrade.
28068    pub target_version: std::string::String,
28069
28070    /// The start type of the upgrade.
28071    pub start_type: crate::model::upgrade_details::StartType,
28072
28073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28074}
28075
28076impl UpgradeDetails {
28077    pub fn new() -> Self {
28078        std::default::Default::default()
28079    }
28080
28081    /// Sets the value of [state][crate::model::UpgradeDetails::state].
28082    pub fn set_state<T: std::convert::Into<crate::model::upgrade_details::State>>(
28083        mut self,
28084        v: T,
28085    ) -> Self {
28086        self.state = v.into();
28087        self
28088    }
28089
28090    /// Sets the value of [start_time][crate::model::UpgradeDetails::start_time].
28091    pub fn set_start_time<T>(mut self, v: T) -> Self
28092    where
28093        T: std::convert::Into<wkt::Timestamp>,
28094    {
28095        self.start_time = std::option::Option::Some(v.into());
28096        self
28097    }
28098
28099    /// Sets or clears the value of [start_time][crate::model::UpgradeDetails::start_time].
28100    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
28101    where
28102        T: std::convert::Into<wkt::Timestamp>,
28103    {
28104        self.start_time = v.map(|x| x.into());
28105        self
28106    }
28107
28108    /// Sets the value of [end_time][crate::model::UpgradeDetails::end_time].
28109    pub fn set_end_time<T>(mut self, v: T) -> Self
28110    where
28111        T: std::convert::Into<wkt::Timestamp>,
28112    {
28113        self.end_time = std::option::Option::Some(v.into());
28114        self
28115    }
28116
28117    /// Sets or clears the value of [end_time][crate::model::UpgradeDetails::end_time].
28118    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
28119    where
28120        T: std::convert::Into<wkt::Timestamp>,
28121    {
28122        self.end_time = v.map(|x| x.into());
28123        self
28124    }
28125
28126    /// Sets the value of [initial_version][crate::model::UpgradeDetails::initial_version].
28127    pub fn set_initial_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28128        self.initial_version = v.into();
28129        self
28130    }
28131
28132    /// Sets the value of [target_version][crate::model::UpgradeDetails::target_version].
28133    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28134        self.target_version = v.into();
28135        self
28136    }
28137
28138    /// Sets the value of [start_type][crate::model::UpgradeDetails::start_type].
28139    pub fn set_start_type<T: std::convert::Into<crate::model::upgrade_details::StartType>>(
28140        mut self,
28141        v: T,
28142    ) -> Self {
28143        self.start_type = v.into();
28144        self
28145    }
28146}
28147
28148impl wkt::message::Message for UpgradeDetails {
28149    fn typename() -> &'static str {
28150        "type.googleapis.com/google.container.v1.UpgradeDetails"
28151    }
28152}
28153
28154/// Defines additional types related to [UpgradeDetails].
28155pub mod upgrade_details {
28156    #[allow(unused_imports)]
28157    use super::*;
28158
28159    /// State indicates the state of the upgrade.
28160    ///
28161    /// # Working with unknown values
28162    ///
28163    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28164    /// additional enum variants at any time. Adding new variants is not considered
28165    /// a breaking change. Applications should write their code in anticipation of:
28166    ///
28167    /// - New values appearing in future releases of the client library, **and**
28168    /// - New values received dynamically, without application changes.
28169    ///
28170    /// Please consult the [Working with enums] section in the user guide for some
28171    /// guidelines.
28172    ///
28173    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28174    #[derive(Clone, Debug, PartialEq)]
28175    #[non_exhaustive]
28176    pub enum State {
28177        /// Upgrade state is unknown.
28178        Unknown,
28179        /// Upgrade has failed with an error.
28180        Failed,
28181        /// Upgrade has succeeded.
28182        Succeeded,
28183        /// Upgrade has been canceled.
28184        Canceled,
28185        /// Upgrade is running.
28186        Running,
28187        /// If set, the enum was initialized with an unknown value.
28188        ///
28189        /// Applications can examine the value using [State::value] or
28190        /// [State::name].
28191        UnknownValue(state::UnknownValue),
28192    }
28193
28194    #[doc(hidden)]
28195    pub mod state {
28196        #[allow(unused_imports)]
28197        use super::*;
28198        #[derive(Clone, Debug, PartialEq)]
28199        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28200    }
28201
28202    impl State {
28203        /// Gets the enum value.
28204        ///
28205        /// Returns `None` if the enum contains an unknown value deserialized from
28206        /// the string representation of enums.
28207        pub fn value(&self) -> std::option::Option<i32> {
28208            match self {
28209                Self::Unknown => std::option::Option::Some(0),
28210                Self::Failed => std::option::Option::Some(1),
28211                Self::Succeeded => std::option::Option::Some(2),
28212                Self::Canceled => std::option::Option::Some(3),
28213                Self::Running => std::option::Option::Some(4),
28214                Self::UnknownValue(u) => u.0.value(),
28215            }
28216        }
28217
28218        /// Gets the enum value as a string.
28219        ///
28220        /// Returns `None` if the enum contains an unknown value deserialized from
28221        /// the integer representation of enums.
28222        pub fn name(&self) -> std::option::Option<&str> {
28223            match self {
28224                Self::Unknown => std::option::Option::Some("UNKNOWN"),
28225                Self::Failed => std::option::Option::Some("FAILED"),
28226                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
28227                Self::Canceled => std::option::Option::Some("CANCELED"),
28228                Self::Running => std::option::Option::Some("RUNNING"),
28229                Self::UnknownValue(u) => u.0.name(),
28230            }
28231        }
28232    }
28233
28234    impl std::default::Default for State {
28235        fn default() -> Self {
28236            use std::convert::From;
28237            Self::from(0)
28238        }
28239    }
28240
28241    impl std::fmt::Display for State {
28242        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28243            wkt::internal::display_enum(f, self.name(), self.value())
28244        }
28245    }
28246
28247    impl std::convert::From<i32> for State {
28248        fn from(value: i32) -> Self {
28249            match value {
28250                0 => Self::Unknown,
28251                1 => Self::Failed,
28252                2 => Self::Succeeded,
28253                3 => Self::Canceled,
28254                4 => Self::Running,
28255                _ => Self::UnknownValue(state::UnknownValue(
28256                    wkt::internal::UnknownEnumValue::Integer(value),
28257                )),
28258            }
28259        }
28260    }
28261
28262    impl std::convert::From<&str> for State {
28263        fn from(value: &str) -> Self {
28264            use std::string::ToString;
28265            match value {
28266                "UNKNOWN" => Self::Unknown,
28267                "FAILED" => Self::Failed,
28268                "SUCCEEDED" => Self::Succeeded,
28269                "CANCELED" => Self::Canceled,
28270                "RUNNING" => Self::Running,
28271                _ => Self::UnknownValue(state::UnknownValue(
28272                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28273                )),
28274            }
28275        }
28276    }
28277
28278    impl serde::ser::Serialize for State {
28279        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28280        where
28281            S: serde::Serializer,
28282        {
28283            match self {
28284                Self::Unknown => serializer.serialize_i32(0),
28285                Self::Failed => serializer.serialize_i32(1),
28286                Self::Succeeded => serializer.serialize_i32(2),
28287                Self::Canceled => serializer.serialize_i32(3),
28288                Self::Running => serializer.serialize_i32(4),
28289                Self::UnknownValue(u) => u.0.serialize(serializer),
28290            }
28291        }
28292    }
28293
28294    impl<'de> serde::de::Deserialize<'de> for State {
28295        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28296        where
28297            D: serde::Deserializer<'de>,
28298        {
28299            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
28300                ".google.container.v1.UpgradeDetails.State",
28301            ))
28302        }
28303    }
28304
28305    /// StartType indicates the type of starting the upgrade.
28306    ///
28307    /// # Working with unknown values
28308    ///
28309    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28310    /// additional enum variants at any time. Adding new variants is not considered
28311    /// a breaking change. Applications should write their code in anticipation of:
28312    ///
28313    /// - New values appearing in future releases of the client library, **and**
28314    /// - New values received dynamically, without application changes.
28315    ///
28316    /// Please consult the [Working with enums] section in the user guide for some
28317    /// guidelines.
28318    ///
28319    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28320    #[derive(Clone, Debug, PartialEq)]
28321    #[non_exhaustive]
28322    pub enum StartType {
28323        /// Upgrade start type is unspecified.
28324        Unspecified,
28325        /// Upgrade started automatically.
28326        Automatic,
28327        /// Upgrade started manually.
28328        Manual,
28329        /// If set, the enum was initialized with an unknown value.
28330        ///
28331        /// Applications can examine the value using [StartType::value] or
28332        /// [StartType::name].
28333        UnknownValue(start_type::UnknownValue),
28334    }
28335
28336    #[doc(hidden)]
28337    pub mod start_type {
28338        #[allow(unused_imports)]
28339        use super::*;
28340        #[derive(Clone, Debug, PartialEq)]
28341        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28342    }
28343
28344    impl StartType {
28345        /// Gets the enum value.
28346        ///
28347        /// Returns `None` if the enum contains an unknown value deserialized from
28348        /// the string representation of enums.
28349        pub fn value(&self) -> std::option::Option<i32> {
28350            match self {
28351                Self::Unspecified => std::option::Option::Some(0),
28352                Self::Automatic => std::option::Option::Some(1),
28353                Self::Manual => std::option::Option::Some(2),
28354                Self::UnknownValue(u) => u.0.value(),
28355            }
28356        }
28357
28358        /// Gets the enum value as a string.
28359        ///
28360        /// Returns `None` if the enum contains an unknown value deserialized from
28361        /// the integer representation of enums.
28362        pub fn name(&self) -> std::option::Option<&str> {
28363            match self {
28364                Self::Unspecified => std::option::Option::Some("START_TYPE_UNSPECIFIED"),
28365                Self::Automatic => std::option::Option::Some("AUTOMATIC"),
28366                Self::Manual => std::option::Option::Some("MANUAL"),
28367                Self::UnknownValue(u) => u.0.name(),
28368            }
28369        }
28370    }
28371
28372    impl std::default::Default for StartType {
28373        fn default() -> Self {
28374            use std::convert::From;
28375            Self::from(0)
28376        }
28377    }
28378
28379    impl std::fmt::Display for StartType {
28380        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28381            wkt::internal::display_enum(f, self.name(), self.value())
28382        }
28383    }
28384
28385    impl std::convert::From<i32> for StartType {
28386        fn from(value: i32) -> Self {
28387            match value {
28388                0 => Self::Unspecified,
28389                1 => Self::Automatic,
28390                2 => Self::Manual,
28391                _ => Self::UnknownValue(start_type::UnknownValue(
28392                    wkt::internal::UnknownEnumValue::Integer(value),
28393                )),
28394            }
28395        }
28396    }
28397
28398    impl std::convert::From<&str> for StartType {
28399        fn from(value: &str) -> Self {
28400            use std::string::ToString;
28401            match value {
28402                "START_TYPE_UNSPECIFIED" => Self::Unspecified,
28403                "AUTOMATIC" => Self::Automatic,
28404                "MANUAL" => Self::Manual,
28405                _ => Self::UnknownValue(start_type::UnknownValue(
28406                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28407                )),
28408            }
28409        }
28410    }
28411
28412    impl serde::ser::Serialize for StartType {
28413        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28414        where
28415            S: serde::Serializer,
28416        {
28417            match self {
28418                Self::Unspecified => serializer.serialize_i32(0),
28419                Self::Automatic => serializer.serialize_i32(1),
28420                Self::Manual => serializer.serialize_i32(2),
28421                Self::UnknownValue(u) => u.0.serialize(serializer),
28422            }
28423        }
28424    }
28425
28426    impl<'de> serde::de::Deserialize<'de> for StartType {
28427        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28428        where
28429            D: serde::Deserializer<'de>,
28430        {
28431            deserializer.deserialize_any(wkt::internal::EnumVisitor::<StartType>::new(
28432                ".google.container.v1.UpgradeDetails.StartType",
28433            ))
28434        }
28435    }
28436}
28437
28438/// FetchNodePoolUpgradeInfoRequest fetches the upgrade information of a
28439/// nodepool.
28440#[derive(Clone, Default, PartialEq)]
28441#[non_exhaustive]
28442pub struct FetchNodePoolUpgradeInfoRequest {
28443    /// Required. The name (project, location, cluster, nodepool) of the nodepool
28444    /// to get. Specified in the format
28445    /// `projects/*/locations/*/clusters/*/nodePools/*` or
28446    /// `projects/*/zones/*/clusters/*/nodePools/*`.
28447    pub name: std::string::String,
28448
28449    /// API request version that initiates this operation.
28450    pub version: std::string::String,
28451
28452    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28453}
28454
28455impl FetchNodePoolUpgradeInfoRequest {
28456    pub fn new() -> Self {
28457        std::default::Default::default()
28458    }
28459
28460    /// Sets the value of [name][crate::model::FetchNodePoolUpgradeInfoRequest::name].
28461    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28462        self.name = v.into();
28463        self
28464    }
28465
28466    /// Sets the value of [version][crate::model::FetchNodePoolUpgradeInfoRequest::version].
28467    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28468        self.version = v.into();
28469        self
28470    }
28471}
28472
28473impl wkt::message::Message for FetchNodePoolUpgradeInfoRequest {
28474    fn typename() -> &'static str {
28475        "type.googleapis.com/google.container.v1.FetchNodePoolUpgradeInfoRequest"
28476    }
28477}
28478
28479/// NodePoolUpgradeInfo contains the upgrade information of a nodepool.
28480#[derive(Clone, Default, PartialEq)]
28481#[non_exhaustive]
28482pub struct NodePoolUpgradeInfo {
28483    /// minor_target_version indicates the target version for minor upgrade.
28484    pub minor_target_version: std::option::Option<std::string::String>,
28485
28486    /// patch_target_version indicates the target version for patch upgrade.
28487    pub patch_target_version: std::option::Option<std::string::String>,
28488
28489    /// The auto upgrade status.
28490    pub auto_upgrade_status: std::vec::Vec<crate::model::node_pool_upgrade_info::AutoUpgradeStatus>,
28491
28492    /// The auto upgrade paused reason.
28493    pub paused_reason: std::vec::Vec<crate::model::node_pool_upgrade_info::AutoUpgradePausedReason>,
28494
28495    /// The list of past auto upgrades.
28496    pub upgrade_details: std::vec::Vec<crate::model::UpgradeDetails>,
28497
28498    /// The nodepool's current minor version's end of standard support timestamp.
28499    pub end_of_standard_support_timestamp: std::option::Option<std::string::String>,
28500
28501    /// The nodepool's current minor version's end of extended support timestamp.
28502    pub end_of_extended_support_timestamp: std::option::Option<std::string::String>,
28503
28504    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28505}
28506
28507impl NodePoolUpgradeInfo {
28508    pub fn new() -> Self {
28509        std::default::Default::default()
28510    }
28511
28512    /// Sets the value of [minor_target_version][crate::model::NodePoolUpgradeInfo::minor_target_version].
28513    pub fn set_minor_target_version<T>(mut self, v: T) -> Self
28514    where
28515        T: std::convert::Into<std::string::String>,
28516    {
28517        self.minor_target_version = std::option::Option::Some(v.into());
28518        self
28519    }
28520
28521    /// Sets or clears the value of [minor_target_version][crate::model::NodePoolUpgradeInfo::minor_target_version].
28522    pub fn set_or_clear_minor_target_version<T>(mut self, v: std::option::Option<T>) -> Self
28523    where
28524        T: std::convert::Into<std::string::String>,
28525    {
28526        self.minor_target_version = v.map(|x| x.into());
28527        self
28528    }
28529
28530    /// Sets the value of [patch_target_version][crate::model::NodePoolUpgradeInfo::patch_target_version].
28531    pub fn set_patch_target_version<T>(mut self, v: T) -> Self
28532    where
28533        T: std::convert::Into<std::string::String>,
28534    {
28535        self.patch_target_version = std::option::Option::Some(v.into());
28536        self
28537    }
28538
28539    /// Sets or clears the value of [patch_target_version][crate::model::NodePoolUpgradeInfo::patch_target_version].
28540    pub fn set_or_clear_patch_target_version<T>(mut self, v: std::option::Option<T>) -> Self
28541    where
28542        T: std::convert::Into<std::string::String>,
28543    {
28544        self.patch_target_version = v.map(|x| x.into());
28545        self
28546    }
28547
28548    /// Sets the value of [auto_upgrade_status][crate::model::NodePoolUpgradeInfo::auto_upgrade_status].
28549    pub fn set_auto_upgrade_status<T, V>(mut self, v: T) -> Self
28550    where
28551        T: std::iter::IntoIterator<Item = V>,
28552        V: std::convert::Into<crate::model::node_pool_upgrade_info::AutoUpgradeStatus>,
28553    {
28554        use std::iter::Iterator;
28555        self.auto_upgrade_status = v.into_iter().map(|i| i.into()).collect();
28556        self
28557    }
28558
28559    /// Sets the value of [paused_reason][crate::model::NodePoolUpgradeInfo::paused_reason].
28560    pub fn set_paused_reason<T, V>(mut self, v: T) -> Self
28561    where
28562        T: std::iter::IntoIterator<Item = V>,
28563        V: std::convert::Into<crate::model::node_pool_upgrade_info::AutoUpgradePausedReason>,
28564    {
28565        use std::iter::Iterator;
28566        self.paused_reason = v.into_iter().map(|i| i.into()).collect();
28567        self
28568    }
28569
28570    /// Sets the value of [upgrade_details][crate::model::NodePoolUpgradeInfo::upgrade_details].
28571    pub fn set_upgrade_details<T, V>(mut self, v: T) -> Self
28572    where
28573        T: std::iter::IntoIterator<Item = V>,
28574        V: std::convert::Into<crate::model::UpgradeDetails>,
28575    {
28576        use std::iter::Iterator;
28577        self.upgrade_details = v.into_iter().map(|i| i.into()).collect();
28578        self
28579    }
28580
28581    /// Sets the value of [end_of_standard_support_timestamp][crate::model::NodePoolUpgradeInfo::end_of_standard_support_timestamp].
28582    pub fn set_end_of_standard_support_timestamp<T>(mut self, v: T) -> Self
28583    where
28584        T: std::convert::Into<std::string::String>,
28585    {
28586        self.end_of_standard_support_timestamp = std::option::Option::Some(v.into());
28587        self
28588    }
28589
28590    /// Sets or clears the value of [end_of_standard_support_timestamp][crate::model::NodePoolUpgradeInfo::end_of_standard_support_timestamp].
28591    pub fn set_or_clear_end_of_standard_support_timestamp<T>(
28592        mut self,
28593        v: std::option::Option<T>,
28594    ) -> Self
28595    where
28596        T: std::convert::Into<std::string::String>,
28597    {
28598        self.end_of_standard_support_timestamp = v.map(|x| x.into());
28599        self
28600    }
28601
28602    /// Sets the value of [end_of_extended_support_timestamp][crate::model::NodePoolUpgradeInfo::end_of_extended_support_timestamp].
28603    pub fn set_end_of_extended_support_timestamp<T>(mut self, v: T) -> Self
28604    where
28605        T: std::convert::Into<std::string::String>,
28606    {
28607        self.end_of_extended_support_timestamp = std::option::Option::Some(v.into());
28608        self
28609    }
28610
28611    /// Sets or clears the value of [end_of_extended_support_timestamp][crate::model::NodePoolUpgradeInfo::end_of_extended_support_timestamp].
28612    pub fn set_or_clear_end_of_extended_support_timestamp<T>(
28613        mut self,
28614        v: std::option::Option<T>,
28615    ) -> Self
28616    where
28617        T: std::convert::Into<std::string::String>,
28618    {
28619        self.end_of_extended_support_timestamp = v.map(|x| x.into());
28620        self
28621    }
28622}
28623
28624impl wkt::message::Message for NodePoolUpgradeInfo {
28625    fn typename() -> &'static str {
28626        "type.googleapis.com/google.container.v1.NodePoolUpgradeInfo"
28627    }
28628}
28629
28630/// Defines additional types related to [NodePoolUpgradeInfo].
28631pub mod node_pool_upgrade_info {
28632    #[allow(unused_imports)]
28633    use super::*;
28634
28635    /// AutoUpgradeStatus indicates the status of auto upgrade.
28636    ///
28637    /// # Working with unknown values
28638    ///
28639    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28640    /// additional enum variants at any time. Adding new variants is not considered
28641    /// a breaking change. Applications should write their code in anticipation of:
28642    ///
28643    /// - New values appearing in future releases of the client library, **and**
28644    /// - New values received dynamically, without application changes.
28645    ///
28646    /// Please consult the [Working with enums] section in the user guide for some
28647    /// guidelines.
28648    ///
28649    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28650    #[derive(Clone, Debug, PartialEq)]
28651    #[non_exhaustive]
28652    pub enum AutoUpgradeStatus {
28653        /// UNKNOWN indicates an unknown status.
28654        Unknown,
28655        /// ACTIVE indicates an active status.
28656        Active,
28657        /// MINOR_UPGRADE_PAUSED indicates the minor version upgrade is
28658        /// paused.
28659        MinorUpgradePaused,
28660        /// UPGRADE_PAUSED indicates the upgrade is paused.
28661        UpgradePaused,
28662        /// If set, the enum was initialized with an unknown value.
28663        ///
28664        /// Applications can examine the value using [AutoUpgradeStatus::value] or
28665        /// [AutoUpgradeStatus::name].
28666        UnknownValue(auto_upgrade_status::UnknownValue),
28667    }
28668
28669    #[doc(hidden)]
28670    pub mod auto_upgrade_status {
28671        #[allow(unused_imports)]
28672        use super::*;
28673        #[derive(Clone, Debug, PartialEq)]
28674        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28675    }
28676
28677    impl AutoUpgradeStatus {
28678        /// Gets the enum value.
28679        ///
28680        /// Returns `None` if the enum contains an unknown value deserialized from
28681        /// the string representation of enums.
28682        pub fn value(&self) -> std::option::Option<i32> {
28683            match self {
28684                Self::Unknown => std::option::Option::Some(0),
28685                Self::Active => std::option::Option::Some(1),
28686                Self::MinorUpgradePaused => std::option::Option::Some(2),
28687                Self::UpgradePaused => std::option::Option::Some(3),
28688                Self::UnknownValue(u) => u.0.value(),
28689            }
28690        }
28691
28692        /// Gets the enum value as a string.
28693        ///
28694        /// Returns `None` if the enum contains an unknown value deserialized from
28695        /// the integer representation of enums.
28696        pub fn name(&self) -> std::option::Option<&str> {
28697            match self {
28698                Self::Unknown => std::option::Option::Some("UNKNOWN"),
28699                Self::Active => std::option::Option::Some("ACTIVE"),
28700                Self::MinorUpgradePaused => std::option::Option::Some("MINOR_UPGRADE_PAUSED"),
28701                Self::UpgradePaused => std::option::Option::Some("UPGRADE_PAUSED"),
28702                Self::UnknownValue(u) => u.0.name(),
28703            }
28704        }
28705    }
28706
28707    impl std::default::Default for AutoUpgradeStatus {
28708        fn default() -> Self {
28709            use std::convert::From;
28710            Self::from(0)
28711        }
28712    }
28713
28714    impl std::fmt::Display for AutoUpgradeStatus {
28715        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28716            wkt::internal::display_enum(f, self.name(), self.value())
28717        }
28718    }
28719
28720    impl std::convert::From<i32> for AutoUpgradeStatus {
28721        fn from(value: i32) -> Self {
28722            match value {
28723                0 => Self::Unknown,
28724                1 => Self::Active,
28725                2 => Self::MinorUpgradePaused,
28726                3 => Self::UpgradePaused,
28727                _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
28728                    wkt::internal::UnknownEnumValue::Integer(value),
28729                )),
28730            }
28731        }
28732    }
28733
28734    impl std::convert::From<&str> for AutoUpgradeStatus {
28735        fn from(value: &str) -> Self {
28736            use std::string::ToString;
28737            match value {
28738                "UNKNOWN" => Self::Unknown,
28739                "ACTIVE" => Self::Active,
28740                "MINOR_UPGRADE_PAUSED" => Self::MinorUpgradePaused,
28741                "UPGRADE_PAUSED" => Self::UpgradePaused,
28742                _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
28743                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28744                )),
28745            }
28746        }
28747    }
28748
28749    impl serde::ser::Serialize for AutoUpgradeStatus {
28750        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28751        where
28752            S: serde::Serializer,
28753        {
28754            match self {
28755                Self::Unknown => serializer.serialize_i32(0),
28756                Self::Active => serializer.serialize_i32(1),
28757                Self::MinorUpgradePaused => serializer.serialize_i32(2),
28758                Self::UpgradePaused => serializer.serialize_i32(3),
28759                Self::UnknownValue(u) => u.0.serialize(serializer),
28760            }
28761        }
28762    }
28763
28764    impl<'de> serde::de::Deserialize<'de> for AutoUpgradeStatus {
28765        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28766        where
28767            D: serde::Deserializer<'de>,
28768        {
28769            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoUpgradeStatus>::new(
28770                ".google.container.v1.NodePoolUpgradeInfo.AutoUpgradeStatus",
28771            ))
28772        }
28773    }
28774
28775    /// AutoUpgradePausedReason indicates the reason for auto upgrade paused
28776    /// status.
28777    ///
28778    /// # Working with unknown values
28779    ///
28780    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28781    /// additional enum variants at any time. Adding new variants is not considered
28782    /// a breaking change. Applications should write their code in anticipation of:
28783    ///
28784    /// - New values appearing in future releases of the client library, **and**
28785    /// - New values received dynamically, without application changes.
28786    ///
28787    /// Please consult the [Working with enums] section in the user guide for some
28788    /// guidelines.
28789    ///
28790    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28791    #[derive(Clone, Debug, PartialEq)]
28792    #[non_exhaustive]
28793    pub enum AutoUpgradePausedReason {
28794        /// AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason.
28795        Unspecified,
28796        /// MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance
28797        /// window.
28798        MaintenanceWindow,
28799        /// MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a
28800        /// maintenance exclusion with scope NO_UPGRADES.
28801        MaintenanceExclusionNoUpgrades,
28802        /// MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a
28803        /// maintenance exclusion with scope NO_MINOR_UPGRADES.
28804        MaintenanceExclusionNoMinorUpgrades,
28805        /// SYSTEM_CONFIG indicates the cluster upgrade is paused by system config.
28806        SystemConfig,
28807        /// If set, the enum was initialized with an unknown value.
28808        ///
28809        /// Applications can examine the value using [AutoUpgradePausedReason::value] or
28810        /// [AutoUpgradePausedReason::name].
28811        UnknownValue(auto_upgrade_paused_reason::UnknownValue),
28812    }
28813
28814    #[doc(hidden)]
28815    pub mod auto_upgrade_paused_reason {
28816        #[allow(unused_imports)]
28817        use super::*;
28818        #[derive(Clone, Debug, PartialEq)]
28819        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28820    }
28821
28822    impl AutoUpgradePausedReason {
28823        /// Gets the enum value.
28824        ///
28825        /// Returns `None` if the enum contains an unknown value deserialized from
28826        /// the string representation of enums.
28827        pub fn value(&self) -> std::option::Option<i32> {
28828            match self {
28829                Self::Unspecified => std::option::Option::Some(0),
28830                Self::MaintenanceWindow => std::option::Option::Some(1),
28831                Self::MaintenanceExclusionNoUpgrades => std::option::Option::Some(2),
28832                Self::MaintenanceExclusionNoMinorUpgrades => std::option::Option::Some(3),
28833                Self::SystemConfig => std::option::Option::Some(4),
28834                Self::UnknownValue(u) => u.0.value(),
28835            }
28836        }
28837
28838        /// Gets the enum value as a string.
28839        ///
28840        /// Returns `None` if the enum contains an unknown value deserialized from
28841        /// the integer representation of enums.
28842        pub fn name(&self) -> std::option::Option<&str> {
28843            match self {
28844                Self::Unspecified => {
28845                    std::option::Option::Some("AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED")
28846                }
28847                Self::MaintenanceWindow => std::option::Option::Some("MAINTENANCE_WINDOW"),
28848                Self::MaintenanceExclusionNoUpgrades => {
28849                    std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_UPGRADES")
28850                }
28851                Self::MaintenanceExclusionNoMinorUpgrades => {
28852                    std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES")
28853                }
28854                Self::SystemConfig => std::option::Option::Some("SYSTEM_CONFIG"),
28855                Self::UnknownValue(u) => u.0.name(),
28856            }
28857        }
28858    }
28859
28860    impl std::default::Default for AutoUpgradePausedReason {
28861        fn default() -> Self {
28862            use std::convert::From;
28863            Self::from(0)
28864        }
28865    }
28866
28867    impl std::fmt::Display for AutoUpgradePausedReason {
28868        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28869            wkt::internal::display_enum(f, self.name(), self.value())
28870        }
28871    }
28872
28873    impl std::convert::From<i32> for AutoUpgradePausedReason {
28874        fn from(value: i32) -> Self {
28875            match value {
28876                0 => Self::Unspecified,
28877                1 => Self::MaintenanceWindow,
28878                2 => Self::MaintenanceExclusionNoUpgrades,
28879                3 => Self::MaintenanceExclusionNoMinorUpgrades,
28880                4 => Self::SystemConfig,
28881                _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
28882                    wkt::internal::UnknownEnumValue::Integer(value),
28883                )),
28884            }
28885        }
28886    }
28887
28888    impl std::convert::From<&str> for AutoUpgradePausedReason {
28889        fn from(value: &str) -> Self {
28890            use std::string::ToString;
28891            match value {
28892                "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED" => Self::Unspecified,
28893                "MAINTENANCE_WINDOW" => Self::MaintenanceWindow,
28894                "MAINTENANCE_EXCLUSION_NO_UPGRADES" => Self::MaintenanceExclusionNoUpgrades,
28895                "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES" => {
28896                    Self::MaintenanceExclusionNoMinorUpgrades
28897                }
28898                "SYSTEM_CONFIG" => Self::SystemConfig,
28899                _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
28900                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28901                )),
28902            }
28903        }
28904    }
28905
28906    impl serde::ser::Serialize for AutoUpgradePausedReason {
28907        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28908        where
28909            S: serde::Serializer,
28910        {
28911            match self {
28912                Self::Unspecified => serializer.serialize_i32(0),
28913                Self::MaintenanceWindow => serializer.serialize_i32(1),
28914                Self::MaintenanceExclusionNoUpgrades => serializer.serialize_i32(2),
28915                Self::MaintenanceExclusionNoMinorUpgrades => serializer.serialize_i32(3),
28916                Self::SystemConfig => serializer.serialize_i32(4),
28917                Self::UnknownValue(u) => u.0.serialize(serializer),
28918            }
28919        }
28920    }
28921
28922    impl<'de> serde::de::Deserialize<'de> for AutoUpgradePausedReason {
28923        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28924        where
28925            D: serde::Deserializer<'de>,
28926        {
28927            deserializer.deserialize_any(
28928                wkt::internal::EnumVisitor::<AutoUpgradePausedReason>::new(
28929                    ".google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReason",
28930                ),
28931            )
28932        }
28933    }
28934}
28935
28936/// GkeAutoUpgradeConfig is the configuration for GKE auto upgrades.
28937#[derive(Clone, Default, PartialEq)]
28938#[non_exhaustive]
28939pub struct GkeAutoUpgradeConfig {
28940    /// PatchMode specifies how auto upgrade patch builds should be
28941    /// selected.
28942    pub patch_mode: crate::model::gke_auto_upgrade_config::PatchMode,
28943
28944    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28945}
28946
28947impl GkeAutoUpgradeConfig {
28948    pub fn new() -> Self {
28949        std::default::Default::default()
28950    }
28951
28952    /// Sets the value of [patch_mode][crate::model::GkeAutoUpgradeConfig::patch_mode].
28953    pub fn set_patch_mode<
28954        T: std::convert::Into<crate::model::gke_auto_upgrade_config::PatchMode>,
28955    >(
28956        mut self,
28957        v: T,
28958    ) -> Self {
28959        self.patch_mode = v.into();
28960        self
28961    }
28962}
28963
28964impl wkt::message::Message for GkeAutoUpgradeConfig {
28965    fn typename() -> &'static str {
28966        "type.googleapis.com/google.container.v1.GkeAutoUpgradeConfig"
28967    }
28968}
28969
28970/// Defines additional types related to [GkeAutoUpgradeConfig].
28971pub mod gke_auto_upgrade_config {
28972    #[allow(unused_imports)]
28973    use super::*;
28974
28975    /// PatchMode specifies how auto upgrade patch builds should be
28976    /// selected.
28977    ///
28978    /// # Working with unknown values
28979    ///
28980    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28981    /// additional enum variants at any time. Adding new variants is not considered
28982    /// a breaking change. Applications should write their code in anticipation of:
28983    ///
28984    /// - New values appearing in future releases of the client library, **and**
28985    /// - New values received dynamically, without application changes.
28986    ///
28987    /// Please consult the [Working with enums] section in the user guide for some
28988    /// guidelines.
28989    ///
28990    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28991    #[derive(Clone, Debug, PartialEq)]
28992    #[non_exhaustive]
28993    pub enum PatchMode {
28994        /// PATCH_MODE_UNSPECIFIED defaults to using the upgrade target from the
28995        /// channel's patch upgrade targets as the upgrade target for the
28996        /// version.
28997        Unspecified,
28998        /// ACCELERATED denotes that the latest patch build in the channel should be
28999        /// used as the upgrade target for the version.
29000        Accelerated,
29001        /// If set, the enum was initialized with an unknown value.
29002        ///
29003        /// Applications can examine the value using [PatchMode::value] or
29004        /// [PatchMode::name].
29005        UnknownValue(patch_mode::UnknownValue),
29006    }
29007
29008    #[doc(hidden)]
29009    pub mod patch_mode {
29010        #[allow(unused_imports)]
29011        use super::*;
29012        #[derive(Clone, Debug, PartialEq)]
29013        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29014    }
29015
29016    impl PatchMode {
29017        /// Gets the enum value.
29018        ///
29019        /// Returns `None` if the enum contains an unknown value deserialized from
29020        /// the string representation of enums.
29021        pub fn value(&self) -> std::option::Option<i32> {
29022            match self {
29023                Self::Unspecified => std::option::Option::Some(0),
29024                Self::Accelerated => std::option::Option::Some(1),
29025                Self::UnknownValue(u) => u.0.value(),
29026            }
29027        }
29028
29029        /// Gets the enum value as a string.
29030        ///
29031        /// Returns `None` if the enum contains an unknown value deserialized from
29032        /// the integer representation of enums.
29033        pub fn name(&self) -> std::option::Option<&str> {
29034            match self {
29035                Self::Unspecified => std::option::Option::Some("PATCH_MODE_UNSPECIFIED"),
29036                Self::Accelerated => std::option::Option::Some("ACCELERATED"),
29037                Self::UnknownValue(u) => u.0.name(),
29038            }
29039        }
29040    }
29041
29042    impl std::default::Default for PatchMode {
29043        fn default() -> Self {
29044            use std::convert::From;
29045            Self::from(0)
29046        }
29047    }
29048
29049    impl std::fmt::Display for PatchMode {
29050        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29051            wkt::internal::display_enum(f, self.name(), self.value())
29052        }
29053    }
29054
29055    impl std::convert::From<i32> for PatchMode {
29056        fn from(value: i32) -> Self {
29057            match value {
29058                0 => Self::Unspecified,
29059                1 => Self::Accelerated,
29060                _ => Self::UnknownValue(patch_mode::UnknownValue(
29061                    wkt::internal::UnknownEnumValue::Integer(value),
29062                )),
29063            }
29064        }
29065    }
29066
29067    impl std::convert::From<&str> for PatchMode {
29068        fn from(value: &str) -> Self {
29069            use std::string::ToString;
29070            match value {
29071                "PATCH_MODE_UNSPECIFIED" => Self::Unspecified,
29072                "ACCELERATED" => Self::Accelerated,
29073                _ => Self::UnknownValue(patch_mode::UnknownValue(
29074                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29075                )),
29076            }
29077        }
29078    }
29079
29080    impl serde::ser::Serialize for PatchMode {
29081        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29082        where
29083            S: serde::Serializer,
29084        {
29085            match self {
29086                Self::Unspecified => serializer.serialize_i32(0),
29087                Self::Accelerated => serializer.serialize_i32(1),
29088                Self::UnknownValue(u) => u.0.serialize(serializer),
29089            }
29090        }
29091    }
29092
29093    impl<'de> serde::de::Deserialize<'de> for PatchMode {
29094        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29095        where
29096            D: serde::Deserializer<'de>,
29097        {
29098            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PatchMode>::new(
29099                ".google.container.v1.GkeAutoUpgradeConfig.PatchMode",
29100            ))
29101        }
29102    }
29103}
29104
29105/// PrivateIPv6GoogleAccess controls whether and how the pods can communicate
29106/// with Google Services through gRPC over IPv6.
29107///
29108/// # Working with unknown values
29109///
29110/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29111/// additional enum variants at any time. Adding new variants is not considered
29112/// a breaking change. Applications should write their code in anticipation of:
29113///
29114/// - New values appearing in future releases of the client library, **and**
29115/// - New values received dynamically, without application changes.
29116///
29117/// Please consult the [Working with enums] section in the user guide for some
29118/// guidelines.
29119///
29120/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29121#[derive(Clone, Debug, PartialEq)]
29122#[non_exhaustive]
29123pub enum PrivateIPv6GoogleAccess {
29124    /// Default value. Same as DISABLED
29125    PrivateIpv6GoogleAccessUnspecified,
29126    /// No private access to or from Google Services
29127    PrivateIpv6GoogleAccessDisabled,
29128    /// Enables private IPv6 access to Google Services from GKE
29129    PrivateIpv6GoogleAccessToGoogle,
29130    /// Enables private IPv6 access to and from Google Services
29131    PrivateIpv6GoogleAccessBidirectional,
29132    /// If set, the enum was initialized with an unknown value.
29133    ///
29134    /// Applications can examine the value using [PrivateIPv6GoogleAccess::value] or
29135    /// [PrivateIPv6GoogleAccess::name].
29136    UnknownValue(private_i_pv_6_google_access::UnknownValue),
29137}
29138
29139#[doc(hidden)]
29140pub mod private_i_pv_6_google_access {
29141    #[allow(unused_imports)]
29142    use super::*;
29143    #[derive(Clone, Debug, PartialEq)]
29144    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29145}
29146
29147impl PrivateIPv6GoogleAccess {
29148    /// Gets the enum value.
29149    ///
29150    /// Returns `None` if the enum contains an unknown value deserialized from
29151    /// the string representation of enums.
29152    pub fn value(&self) -> std::option::Option<i32> {
29153        match self {
29154            Self::PrivateIpv6GoogleAccessUnspecified => std::option::Option::Some(0),
29155            Self::PrivateIpv6GoogleAccessDisabled => std::option::Option::Some(1),
29156            Self::PrivateIpv6GoogleAccessToGoogle => std::option::Option::Some(2),
29157            Self::PrivateIpv6GoogleAccessBidirectional => std::option::Option::Some(3),
29158            Self::UnknownValue(u) => u.0.value(),
29159        }
29160    }
29161
29162    /// Gets the enum value as a string.
29163    ///
29164    /// Returns `None` if the enum contains an unknown value deserialized from
29165    /// the integer representation of enums.
29166    pub fn name(&self) -> std::option::Option<&str> {
29167        match self {
29168            Self::PrivateIpv6GoogleAccessUnspecified => {
29169                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED")
29170            }
29171            Self::PrivateIpv6GoogleAccessDisabled => {
29172                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED")
29173            }
29174            Self::PrivateIpv6GoogleAccessToGoogle => {
29175                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE")
29176            }
29177            Self::PrivateIpv6GoogleAccessBidirectional => {
29178                std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL")
29179            }
29180            Self::UnknownValue(u) => u.0.name(),
29181        }
29182    }
29183}
29184
29185impl std::default::Default for PrivateIPv6GoogleAccess {
29186    fn default() -> Self {
29187        use std::convert::From;
29188        Self::from(0)
29189    }
29190}
29191
29192impl std::fmt::Display for PrivateIPv6GoogleAccess {
29193    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29194        wkt::internal::display_enum(f, self.name(), self.value())
29195    }
29196}
29197
29198impl std::convert::From<i32> for PrivateIPv6GoogleAccess {
29199    fn from(value: i32) -> Self {
29200        match value {
29201            0 => Self::PrivateIpv6GoogleAccessUnspecified,
29202            1 => Self::PrivateIpv6GoogleAccessDisabled,
29203            2 => Self::PrivateIpv6GoogleAccessToGoogle,
29204            3 => Self::PrivateIpv6GoogleAccessBidirectional,
29205            _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
29206                wkt::internal::UnknownEnumValue::Integer(value),
29207            )),
29208        }
29209    }
29210}
29211
29212impl std::convert::From<&str> for PrivateIPv6GoogleAccess {
29213    fn from(value: &str) -> Self {
29214        use std::string::ToString;
29215        match value {
29216            "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" => Self::PrivateIpv6GoogleAccessUnspecified,
29217            "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" => Self::PrivateIpv6GoogleAccessDisabled,
29218            "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" => Self::PrivateIpv6GoogleAccessToGoogle,
29219            "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" => {
29220                Self::PrivateIpv6GoogleAccessBidirectional
29221            }
29222            _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
29223                wkt::internal::UnknownEnumValue::String(value.to_string()),
29224            )),
29225        }
29226    }
29227}
29228
29229impl serde::ser::Serialize for PrivateIPv6GoogleAccess {
29230    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29231    where
29232        S: serde::Serializer,
29233    {
29234        match self {
29235            Self::PrivateIpv6GoogleAccessUnspecified => serializer.serialize_i32(0),
29236            Self::PrivateIpv6GoogleAccessDisabled => serializer.serialize_i32(1),
29237            Self::PrivateIpv6GoogleAccessToGoogle => serializer.serialize_i32(2),
29238            Self::PrivateIpv6GoogleAccessBidirectional => serializer.serialize_i32(3),
29239            Self::UnknownValue(u) => u.0.serialize(serializer),
29240        }
29241    }
29242}
29243
29244impl<'de> serde::de::Deserialize<'de> for PrivateIPv6GoogleAccess {
29245    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29246    where
29247        D: serde::Deserializer<'de>,
29248    {
29249        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PrivateIPv6GoogleAccess>::new(
29250            ".google.container.v1.PrivateIPv6GoogleAccess",
29251        ))
29252    }
29253}
29254
29255/// UpgradeResourceType is the resource type that is upgrading. It is used
29256/// in upgrade notifications.
29257///
29258/// # Working with unknown values
29259///
29260/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29261/// additional enum variants at any time. Adding new variants is not considered
29262/// a breaking change. Applications should write their code in anticipation of:
29263///
29264/// - New values appearing in future releases of the client library, **and**
29265/// - New values received dynamically, without application changes.
29266///
29267/// Please consult the [Working with enums] section in the user guide for some
29268/// guidelines.
29269///
29270/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29271#[derive(Clone, Debug, PartialEq)]
29272#[non_exhaustive]
29273pub enum UpgradeResourceType {
29274    /// Default value. This shouldn't be used.
29275    Unspecified,
29276    /// Master / control plane
29277    Master,
29278    /// Node pool
29279    NodePool,
29280    /// If set, the enum was initialized with an unknown value.
29281    ///
29282    /// Applications can examine the value using [UpgradeResourceType::value] or
29283    /// [UpgradeResourceType::name].
29284    UnknownValue(upgrade_resource_type::UnknownValue),
29285}
29286
29287#[doc(hidden)]
29288pub mod upgrade_resource_type {
29289    #[allow(unused_imports)]
29290    use super::*;
29291    #[derive(Clone, Debug, PartialEq)]
29292    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29293}
29294
29295impl UpgradeResourceType {
29296    /// Gets the enum value.
29297    ///
29298    /// Returns `None` if the enum contains an unknown value deserialized from
29299    /// the string representation of enums.
29300    pub fn value(&self) -> std::option::Option<i32> {
29301        match self {
29302            Self::Unspecified => std::option::Option::Some(0),
29303            Self::Master => std::option::Option::Some(1),
29304            Self::NodePool => std::option::Option::Some(2),
29305            Self::UnknownValue(u) => u.0.value(),
29306        }
29307    }
29308
29309    /// Gets the enum value as a string.
29310    ///
29311    /// Returns `None` if the enum contains an unknown value deserialized from
29312    /// the integer representation of enums.
29313    pub fn name(&self) -> std::option::Option<&str> {
29314        match self {
29315            Self::Unspecified => std::option::Option::Some("UPGRADE_RESOURCE_TYPE_UNSPECIFIED"),
29316            Self::Master => std::option::Option::Some("MASTER"),
29317            Self::NodePool => std::option::Option::Some("NODE_POOL"),
29318            Self::UnknownValue(u) => u.0.name(),
29319        }
29320    }
29321}
29322
29323impl std::default::Default for UpgradeResourceType {
29324    fn default() -> Self {
29325        use std::convert::From;
29326        Self::from(0)
29327    }
29328}
29329
29330impl std::fmt::Display for UpgradeResourceType {
29331    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29332        wkt::internal::display_enum(f, self.name(), self.value())
29333    }
29334}
29335
29336impl std::convert::From<i32> for UpgradeResourceType {
29337    fn from(value: i32) -> Self {
29338        match value {
29339            0 => Self::Unspecified,
29340            1 => Self::Master,
29341            2 => Self::NodePool,
29342            _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
29343                wkt::internal::UnknownEnumValue::Integer(value),
29344            )),
29345        }
29346    }
29347}
29348
29349impl std::convert::From<&str> for UpgradeResourceType {
29350    fn from(value: &str) -> Self {
29351        use std::string::ToString;
29352        match value {
29353            "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
29354            "MASTER" => Self::Master,
29355            "NODE_POOL" => Self::NodePool,
29356            _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
29357                wkt::internal::UnknownEnumValue::String(value.to_string()),
29358            )),
29359        }
29360    }
29361}
29362
29363impl serde::ser::Serialize for UpgradeResourceType {
29364    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29365    where
29366        S: serde::Serializer,
29367    {
29368        match self {
29369            Self::Unspecified => serializer.serialize_i32(0),
29370            Self::Master => serializer.serialize_i32(1),
29371            Self::NodePool => serializer.serialize_i32(2),
29372            Self::UnknownValue(u) => u.0.serialize(serializer),
29373        }
29374    }
29375}
29376
29377impl<'de> serde::de::Deserialize<'de> for UpgradeResourceType {
29378    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29379    where
29380        D: serde::Deserializer<'de>,
29381    {
29382        deserializer.deserialize_any(wkt::internal::EnumVisitor::<UpgradeResourceType>::new(
29383            ".google.container.v1.UpgradeResourceType",
29384        ))
29385    }
29386}
29387
29388/// The datapath provider selects the implementation of the Kubernetes networking
29389/// model for service resolution and network policy enforcement.
29390///
29391/// # Working with unknown values
29392///
29393/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29394/// additional enum variants at any time. Adding new variants is not considered
29395/// a breaking change. Applications should write their code in anticipation of:
29396///
29397/// - New values appearing in future releases of the client library, **and**
29398/// - New values received dynamically, without application changes.
29399///
29400/// Please consult the [Working with enums] section in the user guide for some
29401/// guidelines.
29402///
29403/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29404#[derive(Clone, Debug, PartialEq)]
29405#[non_exhaustive]
29406pub enum DatapathProvider {
29407    /// Default value.
29408    Unspecified,
29409    /// Use the IPTables implementation based on kube-proxy.
29410    LegacyDatapath,
29411    /// Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE
29412    /// Dataplane V2
29413    /// documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2)
29414    /// for more.
29415    AdvancedDatapath,
29416    /// If set, the enum was initialized with an unknown value.
29417    ///
29418    /// Applications can examine the value using [DatapathProvider::value] or
29419    /// [DatapathProvider::name].
29420    UnknownValue(datapath_provider::UnknownValue),
29421}
29422
29423#[doc(hidden)]
29424pub mod datapath_provider {
29425    #[allow(unused_imports)]
29426    use super::*;
29427    #[derive(Clone, Debug, PartialEq)]
29428    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29429}
29430
29431impl DatapathProvider {
29432    /// Gets the enum value.
29433    ///
29434    /// Returns `None` if the enum contains an unknown value deserialized from
29435    /// the string representation of enums.
29436    pub fn value(&self) -> std::option::Option<i32> {
29437        match self {
29438            Self::Unspecified => std::option::Option::Some(0),
29439            Self::LegacyDatapath => std::option::Option::Some(1),
29440            Self::AdvancedDatapath => std::option::Option::Some(2),
29441            Self::UnknownValue(u) => u.0.value(),
29442        }
29443    }
29444
29445    /// Gets the enum value as a string.
29446    ///
29447    /// Returns `None` if the enum contains an unknown value deserialized from
29448    /// the integer representation of enums.
29449    pub fn name(&self) -> std::option::Option<&str> {
29450        match self {
29451            Self::Unspecified => std::option::Option::Some("DATAPATH_PROVIDER_UNSPECIFIED"),
29452            Self::LegacyDatapath => std::option::Option::Some("LEGACY_DATAPATH"),
29453            Self::AdvancedDatapath => std::option::Option::Some("ADVANCED_DATAPATH"),
29454            Self::UnknownValue(u) => u.0.name(),
29455        }
29456    }
29457}
29458
29459impl std::default::Default for DatapathProvider {
29460    fn default() -> Self {
29461        use std::convert::From;
29462        Self::from(0)
29463    }
29464}
29465
29466impl std::fmt::Display for DatapathProvider {
29467    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29468        wkt::internal::display_enum(f, self.name(), self.value())
29469    }
29470}
29471
29472impl std::convert::From<i32> for DatapathProvider {
29473    fn from(value: i32) -> Self {
29474        match value {
29475            0 => Self::Unspecified,
29476            1 => Self::LegacyDatapath,
29477            2 => Self::AdvancedDatapath,
29478            _ => Self::UnknownValue(datapath_provider::UnknownValue(
29479                wkt::internal::UnknownEnumValue::Integer(value),
29480            )),
29481        }
29482    }
29483}
29484
29485impl std::convert::From<&str> for DatapathProvider {
29486    fn from(value: &str) -> Self {
29487        use std::string::ToString;
29488        match value {
29489            "DATAPATH_PROVIDER_UNSPECIFIED" => Self::Unspecified,
29490            "LEGACY_DATAPATH" => Self::LegacyDatapath,
29491            "ADVANCED_DATAPATH" => Self::AdvancedDatapath,
29492            _ => Self::UnknownValue(datapath_provider::UnknownValue(
29493                wkt::internal::UnknownEnumValue::String(value.to_string()),
29494            )),
29495        }
29496    }
29497}
29498
29499impl serde::ser::Serialize for DatapathProvider {
29500    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29501    where
29502        S: serde::Serializer,
29503    {
29504        match self {
29505            Self::Unspecified => serializer.serialize_i32(0),
29506            Self::LegacyDatapath => serializer.serialize_i32(1),
29507            Self::AdvancedDatapath => serializer.serialize_i32(2),
29508            Self::UnknownValue(u) => u.0.serialize(serializer),
29509        }
29510    }
29511}
29512
29513impl<'de> serde::de::Deserialize<'de> for DatapathProvider {
29514    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29515    where
29516        D: serde::Deserializer<'de>,
29517    {
29518        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatapathProvider>::new(
29519            ".google.container.v1.DatapathProvider",
29520        ))
29521    }
29522}
29523
29524/// Strategy used for node pool update.
29525///
29526/// # Working with unknown values
29527///
29528/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29529/// additional enum variants at any time. Adding new variants is not considered
29530/// a breaking change. Applications should write their code in anticipation of:
29531///
29532/// - New values appearing in future releases of the client library, **and**
29533/// - New values received dynamically, without application changes.
29534///
29535/// Please consult the [Working with enums] section in the user guide for some
29536/// guidelines.
29537///
29538/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29539#[derive(Clone, Debug, PartialEq)]
29540#[non_exhaustive]
29541pub enum NodePoolUpdateStrategy {
29542    /// Default value if unset. GKE internally defaults the update strategy to
29543    /// SURGE for unspecified strategies.
29544    Unspecified,
29545    /// blue-green upgrade.
29546    BlueGreen,
29547    /// SURGE is the traditional way of upgrade a node pool.
29548    /// max_surge and max_unavailable determines the level of upgrade parallelism.
29549    Surge,
29550    /// If set, the enum was initialized with an unknown value.
29551    ///
29552    /// Applications can examine the value using [NodePoolUpdateStrategy::value] or
29553    /// [NodePoolUpdateStrategy::name].
29554    UnknownValue(node_pool_update_strategy::UnknownValue),
29555}
29556
29557#[doc(hidden)]
29558pub mod node_pool_update_strategy {
29559    #[allow(unused_imports)]
29560    use super::*;
29561    #[derive(Clone, Debug, PartialEq)]
29562    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29563}
29564
29565impl NodePoolUpdateStrategy {
29566    /// Gets the enum value.
29567    ///
29568    /// Returns `None` if the enum contains an unknown value deserialized from
29569    /// the string representation of enums.
29570    pub fn value(&self) -> std::option::Option<i32> {
29571        match self {
29572            Self::Unspecified => std::option::Option::Some(0),
29573            Self::BlueGreen => std::option::Option::Some(2),
29574            Self::Surge => std::option::Option::Some(3),
29575            Self::UnknownValue(u) => u.0.value(),
29576        }
29577    }
29578
29579    /// Gets the enum value as a string.
29580    ///
29581    /// Returns `None` if the enum contains an unknown value deserialized from
29582    /// the integer representation of enums.
29583    pub fn name(&self) -> std::option::Option<&str> {
29584        match self {
29585            Self::Unspecified => std::option::Option::Some("NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"),
29586            Self::BlueGreen => std::option::Option::Some("BLUE_GREEN"),
29587            Self::Surge => std::option::Option::Some("SURGE"),
29588            Self::UnknownValue(u) => u.0.name(),
29589        }
29590    }
29591}
29592
29593impl std::default::Default for NodePoolUpdateStrategy {
29594    fn default() -> Self {
29595        use std::convert::From;
29596        Self::from(0)
29597    }
29598}
29599
29600impl std::fmt::Display for NodePoolUpdateStrategy {
29601    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29602        wkt::internal::display_enum(f, self.name(), self.value())
29603    }
29604}
29605
29606impl std::convert::From<i32> for NodePoolUpdateStrategy {
29607    fn from(value: i32) -> Self {
29608        match value {
29609            0 => Self::Unspecified,
29610            2 => Self::BlueGreen,
29611            3 => Self::Surge,
29612            _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
29613                wkt::internal::UnknownEnumValue::Integer(value),
29614            )),
29615        }
29616    }
29617}
29618
29619impl std::convert::From<&str> for NodePoolUpdateStrategy {
29620    fn from(value: &str) -> Self {
29621        use std::string::ToString;
29622        match value {
29623            "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED" => Self::Unspecified,
29624            "BLUE_GREEN" => Self::BlueGreen,
29625            "SURGE" => Self::Surge,
29626            _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
29627                wkt::internal::UnknownEnumValue::String(value.to_string()),
29628            )),
29629        }
29630    }
29631}
29632
29633impl serde::ser::Serialize for NodePoolUpdateStrategy {
29634    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29635    where
29636        S: serde::Serializer,
29637    {
29638        match self {
29639            Self::Unspecified => serializer.serialize_i32(0),
29640            Self::BlueGreen => serializer.serialize_i32(2),
29641            Self::Surge => serializer.serialize_i32(3),
29642            Self::UnknownValue(u) => u.0.serialize(serializer),
29643        }
29644    }
29645}
29646
29647impl<'de> serde::de::Deserialize<'de> for NodePoolUpdateStrategy {
29648    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29649    where
29650        D: serde::Deserializer<'de>,
29651    {
29652        deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodePoolUpdateStrategy>::new(
29653            ".google.container.v1.NodePoolUpdateStrategy",
29654        ))
29655    }
29656}
29657
29658/// Possible values for IP stack type
29659///
29660/// # Working with unknown values
29661///
29662/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29663/// additional enum variants at any time. Adding new variants is not considered
29664/// a breaking change. Applications should write their code in anticipation of:
29665///
29666/// - New values appearing in future releases of the client library, **and**
29667/// - New values received dynamically, without application changes.
29668///
29669/// Please consult the [Working with enums] section in the user guide for some
29670/// guidelines.
29671///
29672/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29673#[derive(Clone, Debug, PartialEq)]
29674#[non_exhaustive]
29675pub enum StackType {
29676    /// Default value, will be defaulted as IPV4 only
29677    Unspecified,
29678    /// Cluster is IPV4 only
29679    Ipv4,
29680    /// Cluster can use both IPv4 and IPv6
29681    Ipv4Ipv6,
29682    /// If set, the enum was initialized with an unknown value.
29683    ///
29684    /// Applications can examine the value using [StackType::value] or
29685    /// [StackType::name].
29686    UnknownValue(stack_type::UnknownValue),
29687}
29688
29689#[doc(hidden)]
29690pub mod stack_type {
29691    #[allow(unused_imports)]
29692    use super::*;
29693    #[derive(Clone, Debug, PartialEq)]
29694    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29695}
29696
29697impl StackType {
29698    /// Gets the enum value.
29699    ///
29700    /// Returns `None` if the enum contains an unknown value deserialized from
29701    /// the string representation of enums.
29702    pub fn value(&self) -> std::option::Option<i32> {
29703        match self {
29704            Self::Unspecified => std::option::Option::Some(0),
29705            Self::Ipv4 => std::option::Option::Some(1),
29706            Self::Ipv4Ipv6 => std::option::Option::Some(2),
29707            Self::UnknownValue(u) => u.0.value(),
29708        }
29709    }
29710
29711    /// Gets the enum value as a string.
29712    ///
29713    /// Returns `None` if the enum contains an unknown value deserialized from
29714    /// the integer representation of enums.
29715    pub fn name(&self) -> std::option::Option<&str> {
29716        match self {
29717            Self::Unspecified => std::option::Option::Some("STACK_TYPE_UNSPECIFIED"),
29718            Self::Ipv4 => std::option::Option::Some("IPV4"),
29719            Self::Ipv4Ipv6 => std::option::Option::Some("IPV4_IPV6"),
29720            Self::UnknownValue(u) => u.0.name(),
29721        }
29722    }
29723}
29724
29725impl std::default::Default for StackType {
29726    fn default() -> Self {
29727        use std::convert::From;
29728        Self::from(0)
29729    }
29730}
29731
29732impl std::fmt::Display for StackType {
29733    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29734        wkt::internal::display_enum(f, self.name(), self.value())
29735    }
29736}
29737
29738impl std::convert::From<i32> for StackType {
29739    fn from(value: i32) -> Self {
29740        match value {
29741            0 => Self::Unspecified,
29742            1 => Self::Ipv4,
29743            2 => Self::Ipv4Ipv6,
29744            _ => Self::UnknownValue(stack_type::UnknownValue(
29745                wkt::internal::UnknownEnumValue::Integer(value),
29746            )),
29747        }
29748    }
29749}
29750
29751impl std::convert::From<&str> for StackType {
29752    fn from(value: &str) -> Self {
29753        use std::string::ToString;
29754        match value {
29755            "STACK_TYPE_UNSPECIFIED" => Self::Unspecified,
29756            "IPV4" => Self::Ipv4,
29757            "IPV4_IPV6" => Self::Ipv4Ipv6,
29758            _ => Self::UnknownValue(stack_type::UnknownValue(
29759                wkt::internal::UnknownEnumValue::String(value.to_string()),
29760            )),
29761        }
29762    }
29763}
29764
29765impl serde::ser::Serialize for StackType {
29766    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29767    where
29768        S: serde::Serializer,
29769    {
29770        match self {
29771            Self::Unspecified => serializer.serialize_i32(0),
29772            Self::Ipv4 => serializer.serialize_i32(1),
29773            Self::Ipv4Ipv6 => serializer.serialize_i32(2),
29774            Self::UnknownValue(u) => u.0.serialize(serializer),
29775        }
29776    }
29777}
29778
29779impl<'de> serde::de::Deserialize<'de> for StackType {
29780    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29781    where
29782        D: serde::Deserializer<'de>,
29783    {
29784        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StackType>::new(
29785            ".google.container.v1.StackType",
29786        ))
29787    }
29788}
29789
29790/// Possible values for IPv6 access type
29791///
29792/// # Working with unknown values
29793///
29794/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29795/// additional enum variants at any time. Adding new variants is not considered
29796/// a breaking change. Applications should write their code in anticipation of:
29797///
29798/// - New values appearing in future releases of the client library, **and**
29799/// - New values received dynamically, without application changes.
29800///
29801/// Please consult the [Working with enums] section in the user guide for some
29802/// guidelines.
29803///
29804/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29805#[derive(Clone, Debug, PartialEq)]
29806#[non_exhaustive]
29807pub enum IPv6AccessType {
29808    /// Default value, will be defaulted as type external.
29809    Ipv6AccessTypeUnspecified,
29810    /// Access type internal (all v6 addresses are internal IPs)
29811    Internal,
29812    /// Access type external (all v6 addresses are external IPs)
29813    External,
29814    /// If set, the enum was initialized with an unknown value.
29815    ///
29816    /// Applications can examine the value using [IPv6AccessType::value] or
29817    /// [IPv6AccessType::name].
29818    UnknownValue(i_pv_6_access_type::UnknownValue),
29819}
29820
29821#[doc(hidden)]
29822pub mod i_pv_6_access_type {
29823    #[allow(unused_imports)]
29824    use super::*;
29825    #[derive(Clone, Debug, PartialEq)]
29826    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29827}
29828
29829impl IPv6AccessType {
29830    /// Gets the enum value.
29831    ///
29832    /// Returns `None` if the enum contains an unknown value deserialized from
29833    /// the string representation of enums.
29834    pub fn value(&self) -> std::option::Option<i32> {
29835        match self {
29836            Self::Ipv6AccessTypeUnspecified => std::option::Option::Some(0),
29837            Self::Internal => std::option::Option::Some(1),
29838            Self::External => std::option::Option::Some(2),
29839            Self::UnknownValue(u) => u.0.value(),
29840        }
29841    }
29842
29843    /// Gets the enum value as a string.
29844    ///
29845    /// Returns `None` if the enum contains an unknown value deserialized from
29846    /// the integer representation of enums.
29847    pub fn name(&self) -> std::option::Option<&str> {
29848        match self {
29849            Self::Ipv6AccessTypeUnspecified => {
29850                std::option::Option::Some("IPV6_ACCESS_TYPE_UNSPECIFIED")
29851            }
29852            Self::Internal => std::option::Option::Some("INTERNAL"),
29853            Self::External => std::option::Option::Some("EXTERNAL"),
29854            Self::UnknownValue(u) => u.0.name(),
29855        }
29856    }
29857}
29858
29859impl std::default::Default for IPv6AccessType {
29860    fn default() -> Self {
29861        use std::convert::From;
29862        Self::from(0)
29863    }
29864}
29865
29866impl std::fmt::Display for IPv6AccessType {
29867    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29868        wkt::internal::display_enum(f, self.name(), self.value())
29869    }
29870}
29871
29872impl std::convert::From<i32> for IPv6AccessType {
29873    fn from(value: i32) -> Self {
29874        match value {
29875            0 => Self::Ipv6AccessTypeUnspecified,
29876            1 => Self::Internal,
29877            2 => Self::External,
29878            _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
29879                wkt::internal::UnknownEnumValue::Integer(value),
29880            )),
29881        }
29882    }
29883}
29884
29885impl std::convert::From<&str> for IPv6AccessType {
29886    fn from(value: &str) -> Self {
29887        use std::string::ToString;
29888        match value {
29889            "IPV6_ACCESS_TYPE_UNSPECIFIED" => Self::Ipv6AccessTypeUnspecified,
29890            "INTERNAL" => Self::Internal,
29891            "EXTERNAL" => Self::External,
29892            _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
29893                wkt::internal::UnknownEnumValue::String(value.to_string()),
29894            )),
29895        }
29896    }
29897}
29898
29899impl serde::ser::Serialize for IPv6AccessType {
29900    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29901    where
29902        S: serde::Serializer,
29903    {
29904        match self {
29905            Self::Ipv6AccessTypeUnspecified => serializer.serialize_i32(0),
29906            Self::Internal => serializer.serialize_i32(1),
29907            Self::External => serializer.serialize_i32(2),
29908            Self::UnknownValue(u) => u.0.serialize(serializer),
29909        }
29910    }
29911}
29912
29913impl<'de> serde::de::Deserialize<'de> for IPv6AccessType {
29914    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29915    where
29916        D: serde::Deserializer<'de>,
29917    {
29918        deserializer.deserialize_any(wkt::internal::EnumVisitor::<IPv6AccessType>::new(
29919            ".google.container.v1.IPv6AccessType",
29920        ))
29921    }
29922}
29923
29924/// Options for in-transit encryption.
29925///
29926/// # Working with unknown values
29927///
29928/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29929/// additional enum variants at any time. Adding new variants is not considered
29930/// a breaking change. Applications should write their code in anticipation of:
29931///
29932/// - New values appearing in future releases of the client library, **and**
29933/// - New values received dynamically, without application changes.
29934///
29935/// Please consult the [Working with enums] section in the user guide for some
29936/// guidelines.
29937///
29938/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29939#[derive(Clone, Debug, PartialEq)]
29940#[non_exhaustive]
29941pub enum InTransitEncryptionConfig {
29942    /// Unspecified, will be inferred as default -
29943    /// IN_TRANSIT_ENCRYPTION_UNSPECIFIED.
29944    Unspecified,
29945    /// In-transit encryption is disabled.
29946    InTransitEncryptionDisabled,
29947    /// Data in-transit is encrypted using inter-node transparent encryption.
29948    InTransitEncryptionInterNodeTransparent,
29949    /// If set, the enum was initialized with an unknown value.
29950    ///
29951    /// Applications can examine the value using [InTransitEncryptionConfig::value] or
29952    /// [InTransitEncryptionConfig::name].
29953    UnknownValue(in_transit_encryption_config::UnknownValue),
29954}
29955
29956#[doc(hidden)]
29957pub mod in_transit_encryption_config {
29958    #[allow(unused_imports)]
29959    use super::*;
29960    #[derive(Clone, Debug, PartialEq)]
29961    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29962}
29963
29964impl InTransitEncryptionConfig {
29965    /// Gets the enum value.
29966    ///
29967    /// Returns `None` if the enum contains an unknown value deserialized from
29968    /// the string representation of enums.
29969    pub fn value(&self) -> std::option::Option<i32> {
29970        match self {
29971            Self::Unspecified => std::option::Option::Some(0),
29972            Self::InTransitEncryptionDisabled => std::option::Option::Some(1),
29973            Self::InTransitEncryptionInterNodeTransparent => std::option::Option::Some(2),
29974            Self::UnknownValue(u) => u.0.value(),
29975        }
29976    }
29977
29978    /// Gets the enum value as a string.
29979    ///
29980    /// Returns `None` if the enum contains an unknown value deserialized from
29981    /// the integer representation of enums.
29982    pub fn name(&self) -> std::option::Option<&str> {
29983        match self {
29984            Self::Unspecified => {
29985                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED")
29986            }
29987            Self::InTransitEncryptionDisabled => {
29988                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_DISABLED")
29989            }
29990            Self::InTransitEncryptionInterNodeTransparent => {
29991                std::option::Option::Some("IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT")
29992            }
29993            Self::UnknownValue(u) => u.0.name(),
29994        }
29995    }
29996}
29997
29998impl std::default::Default for InTransitEncryptionConfig {
29999    fn default() -> Self {
30000        use std::convert::From;
30001        Self::from(0)
30002    }
30003}
30004
30005impl std::fmt::Display for InTransitEncryptionConfig {
30006    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30007        wkt::internal::display_enum(f, self.name(), self.value())
30008    }
30009}
30010
30011impl std::convert::From<i32> for InTransitEncryptionConfig {
30012    fn from(value: i32) -> Self {
30013        match value {
30014            0 => Self::Unspecified,
30015            1 => Self::InTransitEncryptionDisabled,
30016            2 => Self::InTransitEncryptionInterNodeTransparent,
30017            _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
30018                wkt::internal::UnknownEnumValue::Integer(value),
30019            )),
30020        }
30021    }
30022}
30023
30024impl std::convert::From<&str> for InTransitEncryptionConfig {
30025    fn from(value: &str) -> Self {
30026        use std::string::ToString;
30027        match value {
30028            "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" => Self::Unspecified,
30029            "IN_TRANSIT_ENCRYPTION_DISABLED" => Self::InTransitEncryptionDisabled,
30030            "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" => {
30031                Self::InTransitEncryptionInterNodeTransparent
30032            }
30033            _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
30034                wkt::internal::UnknownEnumValue::String(value.to_string()),
30035            )),
30036        }
30037    }
30038}
30039
30040impl serde::ser::Serialize for InTransitEncryptionConfig {
30041    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30042    where
30043        S: serde::Serializer,
30044    {
30045        match self {
30046            Self::Unspecified => serializer.serialize_i32(0),
30047            Self::InTransitEncryptionDisabled => serializer.serialize_i32(1),
30048            Self::InTransitEncryptionInterNodeTransparent => serializer.serialize_i32(2),
30049            Self::UnknownValue(u) => u.0.serialize(serializer),
30050        }
30051    }
30052}
30053
30054impl<'de> serde::de::Deserialize<'de> for InTransitEncryptionConfig {
30055    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30056    where
30057        D: serde::Deserializer<'de>,
30058    {
30059        deserializer.deserialize_any(
30060            wkt::internal::EnumVisitor::<InTransitEncryptionConfig>::new(
30061                ".google.container.v1.InTransitEncryptionConfig",
30062            ),
30063        )
30064    }
30065}