1#![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#[derive(Clone, Default, PartialEq)]
40#[non_exhaustive]
41pub struct LinuxNodeConfig {
42 pub sysctls: std::collections::HashMap<std::string::String, std::string::String>,
86
87 pub cgroup_mode: crate::model::linux_node_config::CgroupMode,
89
90 pub hugepages: std::option::Option<crate::model::linux_node_config::HugepagesConfig>,
92
93 pub transparent_hugepage_enabled: crate::model::linux_node_config::TransparentHugepageEnabled,
101
102 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 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 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 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 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 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 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
187pub mod linux_node_config {
189 #[allow(unused_imports)]
190 use super::*;
191
192 #[derive(Clone, Default, PartialEq)]
194 #[non_exhaustive]
195 pub struct HugepagesConfig {
196 pub hugepage_size2m: std::option::Option<i32>,
198
199 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 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 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 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 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 #[derive(Clone, Debug, PartialEq)]
269 #[non_exhaustive]
270 pub enum CgroupMode {
271 Unspecified,
274 V1,
277 V2,
280 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 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 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 #[derive(Clone, Debug, PartialEq)]
404 #[non_exhaustive]
405 pub enum TransparentHugepageEnabled {
406 Unspecified,
408 Always,
410 Madvise,
413 Never,
415 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 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 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 #[derive(Clone, Debug, PartialEq)]
548 #[non_exhaustive]
549 pub enum TransparentHugepageDefrag {
550 Unspecified,
552 Always,
556 Defer,
561 DeferWithMadvise,
567 Madvise,
571 Never,
574 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 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 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#[derive(Clone, Default, PartialEq)]
708#[non_exhaustive]
709pub struct WindowsNodeConfig {
710 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 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
737pub mod windows_node_config {
739 #[allow(unused_imports)]
740 use super::*;
741
742 #[derive(Clone, Debug, PartialEq)]
758 #[non_exhaustive]
759 pub enum OSVersion {
760 Unspecified,
762 Ltsc2019,
764 Ltsc2022,
766 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 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 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#[derive(Clone, Default, PartialEq)]
877#[non_exhaustive]
878pub struct NodeKubeletConfig {
879 pub cpu_manager_policy: std::string::String,
890
891 pub topology_manager: std::option::Option<crate::model::TopologyManager>,
895
896 pub memory_manager: std::option::Option<crate::model::MemoryManager>,
900
901 pub cpu_cfs_quota: std::option::Option<wkt::BoolValue>,
913
914 pub cpu_cfs_quota_period: std::string::String,
921
922 pub pod_pids_limit: i64,
928
929 pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
931
932 pub image_gc_low_threshold_percent: i32,
941
942 pub image_gc_high_threshold_percent: i32,
951
952 pub image_minimum_gc_age: std::string::String,
963
964 pub image_maximum_gc_age: std::string::String,
976
977 pub container_log_max_size: std::string::String,
991
992 pub container_log_max_files: i32,
999
1000 pub allowed_unsafe_sysctls: std::vec::Vec<std::string::String>,
1014
1015 pub eviction_soft: std::option::Option<crate::model::EvictionSignals>,
1019
1020 pub eviction_soft_grace_period: std::option::Option<crate::model::EvictionGracePeriod>,
1025
1026 pub eviction_minimum_reclaim: std::option::Option<crate::model::EvictionMinimumReclaim>,
1031
1032 pub eviction_max_pod_grace_period_seconds: i32,
1038
1039 pub max_parallel_image_pulls: i32,
1047
1048 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1315#[non_exhaustive]
1316pub struct TopologyManager {
1317 pub policy: std::string::String,
1338
1339 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 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 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#[derive(Clone, Default, PartialEq)]
1380#[non_exhaustive]
1381pub struct MemoryManager {
1382 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 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#[derive(Clone, Default, PartialEq)]
1419#[non_exhaustive]
1420pub struct EvictionSignals {
1421 pub memory_available: std::string::String,
1428
1429 pub nodefs_available: std::string::String,
1436
1437 pub nodefs_inodes_free: std::string::String,
1444
1445 pub imagefs_available: std::string::String,
1454
1455 pub imagefs_inodes_free: std::string::String,
1462
1463 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1538#[non_exhaustive]
1539pub struct EvictionGracePeriod {
1540 pub memory_available: std::string::String,
1544
1545 pub nodefs_available: std::string::String,
1549
1550 pub nodefs_inodes_free: std::string::String,
1554
1555 pub imagefs_available: std::string::String,
1559
1560 pub imagefs_inodes_free: std::string::String,
1564
1565 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1639#[non_exhaustive]
1640pub struct EvictionMinimumReclaim {
1641 pub memory_available: std::string::String,
1645
1646 pub nodefs_available: std::string::String,
1650
1651 pub nodefs_inodes_free: std::string::String,
1656
1657 pub imagefs_available: std::string::String,
1662
1663 pub imagefs_inodes_free: std::string::String,
1668
1669 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1749#[non_exhaustive]
1750pub struct NodeConfig {
1751 pub machine_type: std::string::String,
1756
1757 pub disk_size_gb: i32,
1762
1763 pub oauth_scopes: std::vec::Vec<std::string::String>,
1779
1780 pub service_account: std::string::String,
1784
1785 pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
1818
1819 pub image_type: std::string::String,
1824
1825 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1834
1835 pub local_ssd_count: i32,
1842
1843 pub tags: std::vec::Vec<std::string::String>,
1848
1849 pub preemptible: bool,
1853
1854 pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
1859
1860 pub disk_type: std::string::String,
1865
1866 pub min_cpu_platform: std::string::String,
1874
1875 pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
1877
1878 pub taints: std::vec::Vec<crate::model::NodeTaint>,
1883
1884 pub sandbox_config: std::option::Option<crate::model::SandboxConfig>,
1886
1887 pub node_group: std::string::String,
1892
1893 pub reservation_affinity: std::option::Option<crate::model::ReservationAffinity>,
1898
1899 pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
1901
1902 pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
1904
1905 pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
1907
1908 pub boot_disk_kms_key: std::string::String,
1915
1916 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
1918
1919 pub advanced_machine_features: std::option::Option<crate::model::AdvancedMachineFeatures>,
1921
1922 pub gvnic: std::option::Option<crate::model::VirtualNIC>,
1924
1925 pub spot: bool,
1928
1929 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
1932
1933 pub fast_socket: std::option::Option<crate::model::FastSocket>,
1935
1936 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
1939
1940 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
1942
1943 pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
1945
1946 pub local_nvme_ssd_block_config: std::option::Option<crate::model::LocalNvmeSsdBlockConfig>,
1948
1949 pub ephemeral_storage_local_ssd_config:
1952 std::option::Option<crate::model::EphemeralStorageLocalSsdConfig>,
1953
1954 pub sole_tenant_config: std::option::Option<crate::model::SoleTenantConfig>,
1956
1957 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
1959
1960 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
1962
1963 pub enable_confidential_storage: bool,
1965
1966 pub secondary_boot_disks: std::vec::Vec<crate::model::SecondaryBootDisk>,
1968
1969 pub storage_pools: std::vec::Vec<std::string::String>,
1971
1972 pub secondary_boot_disk_update_strategy:
1974 std::option::Option<crate::model::SecondaryBootDiskUpdateStrategy>,
1975
1976 pub max_run_duration: std::option::Option<wkt::Duration>,
1979
1980 pub local_ssd_encryption_mode:
1983 std::option::Option<crate::model::node_config::LocalSsdEncryptionMode>,
1984
1985 pub effective_cgroup_mode: crate::model::node_config::EffectiveCgroupMode,
1990
1991 pub flex_start: std::option::Option<bool>,
1993
1994 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 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 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 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 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 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 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 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 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 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 pub fn set_preemptible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2083 self.preemptible = v.into();
2084 self
2085 }
2086
2087 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 pub fn set_spot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2303 self.spot = v.into();
2304 self
2305 }
2306
2307 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
2623pub mod node_config {
2625 #[allow(unused_imports)]
2626 use super::*;
2627
2628 #[derive(Clone, Debug, PartialEq)]
2645 #[non_exhaustive]
2646 pub enum LocalSsdEncryptionMode {
2647 Unspecified,
2651 StandardEncryption,
2655 EphemeralKeyEncryption,
2660 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 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 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 #[derive(Clone, Debug, PartialEq)]
2788 #[non_exhaustive]
2789 pub enum EffectiveCgroupMode {
2790 Unspecified,
2793 V1,
2796 V2,
2799 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 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 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#[derive(Clone, Default, PartialEq)]
2910#[non_exhaustive]
2911pub struct AdvancedMachineFeatures {
2912 pub threads_per_core: std::option::Option<i64>,
2916
2917 pub enable_nested_virtualization: std::option::Option<bool>,
2919
2920 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 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 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 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 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 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 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
2994pub mod advanced_machine_features {
2996 #[allow(unused_imports)]
2997 use super::*;
2998
2999 #[derive(Clone, Debug, PartialEq)]
3015 #[non_exhaustive]
3016 pub enum PerformanceMonitoringUnit {
3017 Unspecified,
3019 Architectural,
3021 Standard,
3023 Enhanced,
3025 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 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 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#[derive(Clone, Default, PartialEq)]
3145#[non_exhaustive]
3146pub struct NodeNetworkConfig {
3147 pub create_pod_range: bool,
3159
3160 pub pod_range: std::string::String,
3169
3170 pub pod_ipv4_cidr_block: std::string::String,
3187
3188 pub enable_private_nodes: std::option::Option<bool>,
3192
3193 pub network_performance_config:
3195 std::option::Option<crate::model::node_network_config::NetworkPerformanceConfig>,
3196
3197 pub pod_cidr_overprovision_config:
3210 std::option::Option<crate::model::PodCIDROverprovisionConfig>,
3211
3212 pub additional_node_network_configs: std::vec::Vec<crate::model::AdditionalNodeNetworkConfig>,
3215
3216 pub additional_pod_network_configs: std::vec::Vec<crate::model::AdditionalPodNetworkConfig>,
3219
3220 pub pod_ipv4_range_utilization: f64,
3224
3225 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 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 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 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 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 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 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 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 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 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 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 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 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 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
3359pub mod node_network_config {
3361 #[allow(unused_imports)]
3362 use super::*;
3363
3364 #[derive(Clone, Default, PartialEq)]
3366 #[non_exhaustive]
3367 pub struct NetworkPerformanceConfig {
3368 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 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 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 pub mod network_performance_config {
3415 #[allow(unused_imports)]
3416 use super::*;
3417
3418 #[derive(Clone, Debug, PartialEq)]
3434 #[non_exhaustive]
3435 pub enum Tier {
3436 Unspecified,
3438 Tier1,
3440 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 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 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#[derive(Clone, Default, PartialEq)]
3551#[non_exhaustive]
3552pub struct AdditionalNodeNetworkConfig {
3553 pub network: std::string::String,
3555
3556 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 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 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#[derive(Clone, Default, PartialEq)]
3589#[non_exhaustive]
3590pub struct AdditionalPodNetworkConfig {
3591 pub subnetwork: std::string::String,
3593
3594 pub secondary_pod_range: std::string::String,
3597
3598 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
3651#[non_exhaustive]
3652pub struct ShieldedInstanceConfig {
3653 pub enable_secure_boot: bool,
3659
3660 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 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 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#[derive(Clone, Default, PartialEq)]
3697#[non_exhaustive]
3698pub struct SandboxConfig {
3699 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 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
3726pub mod sandbox_config {
3728 #[allow(unused_imports)]
3729 use super::*;
3730
3731 #[derive(Clone, Debug, PartialEq)]
3747 #[non_exhaustive]
3748 pub enum Type {
3749 Unspecified,
3751 Gvisor,
3753 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 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 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#[derive(Clone, Default, PartialEq)]
3860#[non_exhaustive]
3861pub struct GcfsConfig {
3862 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 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#[derive(Clone, Default, PartialEq)]
3890#[non_exhaustive]
3891pub struct ReservationAffinity {
3892 pub consume_reservation_type: crate::model::reservation_affinity::Type,
3894
3895 pub key: std::string::String,
3900
3901 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 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 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 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
3947pub mod reservation_affinity {
3949 #[allow(unused_imports)]
3950 use super::*;
3951
3952 #[derive(Clone, Debug, PartialEq)]
3968 #[non_exhaustive]
3969 pub enum Type {
3970 Unspecified,
3972 NoReservation,
3974 AnyReservation,
3976 SpecificReservation,
3979 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 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 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#[derive(Clone, Default, PartialEq)]
4096#[non_exhaustive]
4097pub struct SoleTenantConfig {
4098 pub node_affinities: std::vec::Vec<crate::model::sole_tenant_config::NodeAffinity>,
4100
4101 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 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 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 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
4150pub mod sole_tenant_config {
4152 #[allow(unused_imports)]
4153 use super::*;
4154
4155 #[derive(Clone, Default, PartialEq)]
4159 #[non_exhaustive]
4160 pub struct NodeAffinity {
4161 pub key: std::string::String,
4163
4164 pub operator: crate::model::sole_tenant_config::node_affinity::Operator,
4166
4167 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 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 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 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 pub mod node_affinity {
4215 #[allow(unused_imports)]
4216 use super::*;
4217
4218 #[derive(Clone, Debug, PartialEq)]
4235 #[non_exhaustive]
4236 pub enum Operator {
4237 Unspecified,
4239 In,
4241 NotIn,
4243 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 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 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#[derive(Clone, Default, PartialEq)]
4358#[non_exhaustive]
4359pub struct ContainerdConfig {
4360 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 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 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
4401pub mod containerd_config {
4403 #[allow(unused_imports)]
4404 use super::*;
4405
4406 #[derive(Clone, Default, PartialEq)]
4409 #[non_exhaustive]
4410 pub struct PrivateRegistryAccessConfig {
4411
4412 pub enabled: bool,
4414
4415 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4428 self.enabled = v.into();
4429 self
4430 }
4431
4432 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 pub mod private_registry_access_config {
4452 #[allow(unused_imports)]
4453 use super::*;
4454
4455 #[derive(Clone, Default, PartialEq)]
4458 #[non_exhaustive]
4459 pub struct CertificateAuthorityDomainConfig {
4460
4461 pub fqdns: std::vec::Vec<std::string::String>,
4469
4470 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 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 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 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 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 pub mod certificate_authority_domain_config {
4538 #[allow(unused_imports)]
4539 use super::*;
4540
4541 #[derive(Clone, Default, PartialEq)]
4545 #[non_exhaustive]
4546 pub struct GCPSecretManagerCertificateConfig {
4547 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 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 #[derive(Clone, Debug, PartialEq)]
4580 #[non_exhaustive]
4581 pub enum CertificateConfig {
4582 GcpSecretManagerCertificateConfig(std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>),
4584 }
4585 }
4586 }
4587}
4588
4589#[derive(Clone, Default, PartialEq)]
4596#[non_exhaustive]
4597pub struct NodeTaint {
4598 pub key: std::string::String,
4600
4601 pub value: std::string::String,
4603
4604 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 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 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 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
4643pub mod node_taint {
4645 #[allow(unused_imports)]
4646 use super::*;
4647
4648 #[derive(Clone, Debug, PartialEq)]
4664 #[non_exhaustive]
4665 pub enum Effect {
4666 Unspecified,
4668 NoSchedule,
4670 PreferNoSchedule,
4672 NoExecute,
4674 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 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 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#[derive(Clone, Default, PartialEq)]
4791#[non_exhaustive]
4792pub struct NodeTaints {
4793 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 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#[derive(Clone, Default, PartialEq)]
4825#[non_exhaustive]
4826pub struct NodeLabels {
4827 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 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#[derive(Clone, Default, PartialEq)]
4860#[non_exhaustive]
4861pub struct ResourceLabels {
4862 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 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#[derive(Clone, Default, PartialEq)]
4895#[non_exhaustive]
4896pub struct NetworkTags {
4897 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 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#[derive(Clone, Default, PartialEq)]
4930#[non_exhaustive]
4931pub struct MasterAuth {
4932 #[deprecated]
4941 pub username: std::string::String,
4942
4943 #[deprecated]
4953 pub password: std::string::String,
4954
4955 pub client_certificate_config: std::option::Option<crate::model::ClientCertificateConfig>,
4959
4960 pub cluster_ca_certificate: std::string::String,
4963
4964 pub client_certificate: std::string::String,
4968
4969 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 #[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 #[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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5046#[non_exhaustive]
5047pub struct ClientCertificateConfig {
5048 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 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#[derive(Clone, Default, PartialEq)]
5075#[non_exhaustive]
5076pub struct AddonsConfig {
5077 pub http_load_balancing: std::option::Option<crate::model::HttpLoadBalancing>,
5080
5081 pub horizontal_pod_autoscaling: std::option::Option<crate::model::HorizontalPodAutoscaling>,
5085
5086 #[deprecated]
5092 pub kubernetes_dashboard: std::option::Option<crate::model::KubernetesDashboard>,
5093
5094 pub network_policy_config: std::option::Option<crate::model::NetworkPolicyConfig>,
5098
5099 pub cloud_run_config: std::option::Option<crate::model::CloudRunConfig>,
5102
5103 pub dns_cache_config: std::option::Option<crate::model::DnsCacheConfig>,
5105
5106 pub config_connector_config: std::option::Option<crate::model::ConfigConnectorConfig>,
5109
5110 pub gce_persistent_disk_csi_driver_config:
5112 std::option::Option<crate::model::GcePersistentDiskCsiDriverConfig>,
5113
5114 pub gcp_filestore_csi_driver_config:
5116 std::option::Option<crate::model::GcpFilestoreCsiDriverConfig>,
5117
5118 pub gke_backup_agent_config: std::option::Option<crate::model::GkeBackupAgentConfig>,
5120
5121 pub gcs_fuse_csi_driver_config: std::option::Option<crate::model::GcsFuseCsiDriverConfig>,
5123
5124 pub stateful_ha_config: std::option::Option<crate::model::StatefulHAConfig>,
5126
5127 pub parallelstore_csi_driver_config:
5129 std::option::Option<crate::model::ParallelstoreCsiDriverConfig>,
5130
5131 pub ray_operator_config: std::option::Option<crate::model::RayOperatorConfig>,
5133
5134 pub high_scale_checkpointing_config:
5136 std::option::Option<crate::model::HighScaleCheckpointingConfig>,
5137
5138 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 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 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 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 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 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5461#[non_exhaustive]
5462pub struct HttpLoadBalancing {
5463 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 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#[derive(Clone, Default, PartialEq)]
5493#[non_exhaustive]
5494pub struct HorizontalPodAutoscaling {
5495 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 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#[derive(Clone, Default, PartialEq)]
5523#[non_exhaustive]
5524pub struct KubernetesDashboard {
5525 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 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#[derive(Clone, Default, PartialEq)]
5553#[non_exhaustive]
5554pub struct NetworkPolicyConfig {
5555 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 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#[derive(Clone, Default, PartialEq)]
5581#[non_exhaustive]
5582pub struct DnsCacheConfig {
5583 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 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#[derive(Clone, Default, PartialEq)]
5609#[non_exhaustive]
5610pub struct PrivateClusterMasterGlobalAccessConfig {
5611 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 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#[derive(Clone, Default, PartialEq)]
5637#[non_exhaustive]
5638pub struct PrivateClusterConfig {
5639 #[deprecated]
5649 pub enable_private_nodes: bool,
5650
5651 #[deprecated]
5660 pub enable_private_endpoint: bool,
5661
5662 pub master_ipv4_cidr_block: std::string::String,
5667
5668 #[deprecated]
5676 pub private_endpoint: std::string::String,
5677
5678 #[deprecated]
5686 pub public_endpoint: std::string::String,
5687
5688 pub peering_name: std::string::String,
5690
5691 #[deprecated]
5697 pub master_global_access_config:
5698 std::option::Option<crate::model::PrivateClusterMasterGlobalAccessConfig>,
5699
5700 #[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 #[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 #[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 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 #[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 #[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 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 #[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 #[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 #[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#[derive(Clone, Default, PartialEq)]
5804#[non_exhaustive]
5805pub struct AuthenticatorGroupsConfig {
5806 pub enabled: bool,
5809
5810 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5824 self.enabled = v.into();
5825 self
5826 }
5827
5828 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#[derive(Clone, Default, PartialEq)]
5843#[non_exhaustive]
5844pub struct CloudRunConfig {
5845 pub disabled: bool,
5847
5848 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 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5861 self.disabled = v.into();
5862 self
5863 }
5864
5865 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
5883pub mod cloud_run_config {
5885 #[allow(unused_imports)]
5886 use super::*;
5887
5888 #[derive(Clone, Debug, PartialEq)]
5904 #[non_exhaustive]
5905 pub enum LoadBalancerType {
5906 Unspecified,
5908 External,
5910 Internal,
5912 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 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 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#[derive(Clone, Default, PartialEq)]
6023#[non_exhaustive]
6024pub struct ConfigConnectorConfig {
6025 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 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#[derive(Clone, Default, PartialEq)]
6051#[non_exhaustive]
6052pub struct GcePersistentDiskCsiDriverConfig {
6053 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 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#[derive(Clone, Default, PartialEq)]
6079#[non_exhaustive]
6080pub struct GcpFilestoreCsiDriverConfig {
6081 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 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#[derive(Clone, Default, PartialEq)]
6107#[non_exhaustive]
6108pub struct GcsFuseCsiDriverConfig {
6109 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 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#[derive(Clone, Default, PartialEq)]
6135#[non_exhaustive]
6136pub struct ParallelstoreCsiDriverConfig {
6137 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 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#[derive(Clone, Default, PartialEq)]
6164#[non_exhaustive]
6165pub struct HighScaleCheckpointingConfig {
6166 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 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#[derive(Clone, Default, PartialEq)]
6193#[non_exhaustive]
6194pub struct LustreCsiDriverConfig {
6195 pub enabled: bool,
6197
6198 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6212 self.enabled = v.into();
6213 self
6214 }
6215
6216 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#[derive(Clone, Default, PartialEq)]
6231#[non_exhaustive]
6232pub struct RayOperatorConfig {
6233 pub enabled: bool,
6235
6236 pub ray_cluster_logging_config: std::option::Option<crate::model::RayClusterLoggingConfig>,
6238
6239 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6253 self.enabled = v.into();
6254 self
6255 }
6256
6257 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 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 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 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#[derive(Clone, Default, PartialEq)]
6305#[non_exhaustive]
6306pub struct GkeBackupAgentConfig {
6307 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 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#[derive(Clone, Default, PartialEq)]
6333#[non_exhaustive]
6334pub struct StatefulHAConfig {
6335 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 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#[derive(Clone, Default, PartialEq)]
6364#[non_exhaustive]
6365pub struct MasterAuthorizedNetworksConfig {
6366 pub enabled: bool,
6368
6369 pub cidr_blocks: std::vec::Vec<crate::model::master_authorized_networks_config::CidrBlock>,
6372
6373 pub gcp_public_cidrs_access_enabled: std::option::Option<bool>,
6375
6376 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6389 self.enabled = v.into();
6390 self
6391 }
6392
6393 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 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 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 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 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
6453pub mod master_authorized_networks_config {
6455 #[allow(unused_imports)]
6456 use super::*;
6457
6458 #[derive(Clone, Default, PartialEq)]
6460 #[non_exhaustive]
6461 pub struct CidrBlock {
6462 pub display_name: std::string::String,
6464
6465 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 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 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#[derive(Clone, Default, PartialEq)]
6502#[non_exhaustive]
6503pub struct LegacyAbac {
6504 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 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#[derive(Clone, Default, PartialEq)]
6534#[non_exhaustive]
6535pub struct NetworkPolicy {
6536 pub provider: crate::model::network_policy::Provider,
6538
6539 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 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 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
6572pub mod network_policy {
6574 #[allow(unused_imports)]
6575 use super::*;
6576
6577 #[derive(Clone, Debug, PartialEq)]
6593 #[non_exhaustive]
6594 pub enum Provider {
6595 Unspecified,
6597 Calico,
6599 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 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 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#[derive(Clone, Default, PartialEq)]
6705#[non_exhaustive]
6706pub struct BinaryAuthorization {
6707 #[deprecated]
6711 pub enabled: bool,
6712
6713 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 #[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 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
6750pub mod binary_authorization {
6752 #[allow(unused_imports)]
6753 use super::*;
6754
6755 #[derive(Clone, Debug, PartialEq)]
6771 #[non_exhaustive]
6772 pub enum EvaluationMode {
6773 Unspecified,
6775 Disabled,
6777 ProjectSingletonPolicyEnforce,
6781 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 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 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#[derive(Clone, Default, PartialEq)]
6895#[non_exhaustive]
6896pub struct PodCIDROverprovisionConfig {
6897 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 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#[derive(Clone, Default, PartialEq)]
6924#[non_exhaustive]
6925pub struct IPAllocationPolicy {
6926 pub use_ip_aliases: bool,
6931
6932 pub create_subnetwork: bool,
6936
6937 pub subnetwork_name: std::string::String,
6941
6942 #[deprecated]
6944 pub cluster_ipv4_cidr: std::string::String,
6945
6946 #[deprecated]
6948 pub node_ipv4_cidr: std::string::String,
6949
6950 #[deprecated]
6952 pub services_ipv4_cidr: std::string::String,
6953
6954 pub cluster_secondary_range_name: std::string::String,
6962
6963 pub services_secondary_range_name: std::string::String,
6971
6972 pub cluster_ipv4_cidr_block: std::string::String,
6988
6989 pub node_ipv4_cidr_block: std::string::String,
7004
7005 pub services_ipv4_cidr_block: std::string::String,
7021
7022 #[deprecated]
7041 pub tpu_ipv4_cidr_block: std::string::String,
7042
7043 pub use_routes: bool,
7048
7049 pub stack_type: crate::model::StackType,
7051
7052 pub ipv6_access_type: crate::model::IPv6AccessType,
7054
7055 pub pod_cidr_overprovision_config:
7068 std::option::Option<crate::model::PodCIDROverprovisionConfig>,
7069
7070 pub subnet_ipv6_cidr_block: std::string::String,
7072
7073 pub services_ipv6_cidr_block: std::string::String,
7075
7076 pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
7081
7082 pub default_pod_ipv4_range_utilization: f64,
7086
7087 pub additional_ip_ranges_configs: std::vec::Vec<crate::model::AdditionalIPRangesConfig>,
7093
7094 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 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 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 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 #[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 #[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 #[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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
7330#[non_exhaustive]
7331pub struct Cluster {
7332 pub name: std::string::String,
7340
7341 pub description: std::string::String,
7343
7344 #[deprecated]
7356 pub initial_node_count: i32,
7357
7358 #[deprecated]
7370 pub node_config: std::option::Option<crate::model::NodeConfig>,
7371
7372 pub master_auth: std::option::Option<crate::model::MasterAuth>,
7378
7379 pub logging_service: std::string::String,
7391
7392 pub monitoring_service: std::string::String,
7404
7405 pub network: std::string::String,
7410
7411 pub cluster_ipv4_cidr: std::string::String,
7416
7417 pub addons_config: std::option::Option<crate::model::AddonsConfig>,
7419
7420 pub subnetwork: std::string::String,
7424
7425 pub node_pools: std::vec::Vec<crate::model::NodePool>,
7429
7430 pub locations: std::vec::Vec<std::string::String>,
7442
7443 pub enable_kubernetes_alpha: bool,
7450
7451 pub alpha_cluster_feature_gates: std::vec::Vec<std::string::String>,
7455
7456 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
7459
7460 pub label_fingerprint: std::string::String,
7462
7463 pub legacy_abac: std::option::Option<crate::model::LegacyAbac>,
7465
7466 pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
7468
7469 pub ip_allocation_policy: std::option::Option<crate::model::IPAllocationPolicy>,
7471
7472 #[deprecated]
7480 pub master_authorized_networks_config:
7481 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
7482
7483 pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
7485
7486 pub binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
7488
7489 pub autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
7491
7492 pub network_config: std::option::Option<crate::model::NetworkConfig>,
7494
7495 pub default_max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
7499
7500 pub resource_usage_export_config: std::option::Option<crate::model::ResourceUsageExportConfig>,
7503
7504 pub authenticator_groups_config: std::option::Option<crate::model::AuthenticatorGroupsConfig>,
7506
7507 pub private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
7509
7510 pub database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
7512
7513 pub vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
7515
7516 pub shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
7518
7519 pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
7526
7527 pub workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
7530
7531 pub mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
7534
7535 pub cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
7537
7538 pub notification_config: std::option::Option<crate::model::NotificationConfig>,
7540
7541 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
7544
7545 pub identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
7547
7548 pub self_link: std::string::String,
7550
7551 #[deprecated]
7556 pub zone: std::string::String,
7557
7558 pub endpoint: std::string::String,
7565
7566 pub initial_cluster_version: std::string::String,
7580
7581 pub current_master_version: std::string::String,
7583
7584 #[deprecated]
7590 pub current_node_version: std::string::String,
7591
7592 pub create_time: std::string::String,
7595
7596 pub status: crate::model::cluster::Status,
7598
7599 #[deprecated]
7603 pub status_message: std::string::String,
7604
7605 pub node_ipv4_cidr_size: i32,
7610
7611 pub services_ipv4_cidr: std::string::String,
7617
7618 #[deprecated]
7620 pub instance_group_urls: std::vec::Vec<std::string::String>,
7621
7622 #[deprecated]
7625 pub current_node_count: i32,
7626
7627 pub expire_time: std::string::String,
7630
7631 pub location: std::string::String,
7637
7638 #[deprecated]
7642 pub enable_tpu: bool,
7643
7644 #[deprecated]
7650 pub tpu_ipv4_cidr_block: std::string::String,
7651
7652 pub conditions: std::vec::Vec<crate::model::StatusCondition>,
7654
7655 pub autopilot: std::option::Option<crate::model::Autopilot>,
7657
7658 pub id: std::string::String,
7660
7661 pub node_pool_defaults: std::option::Option<crate::model::NodePoolDefaults>,
7664
7665 pub logging_config: std::option::Option<crate::model::LoggingConfig>,
7667
7668 pub monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
7670
7671 pub node_pool_auto_config: std::option::Option<crate::model::NodePoolAutoConfig>,
7674
7675 pub pod_autoscaling: std::option::Option<crate::model::PodAutoscaling>,
7677
7678 pub etag: std::string::String,
7682
7683 pub fleet: std::option::Option<crate::model::Fleet>,
7685
7686 pub security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
7688
7689 pub control_plane_endpoints_config:
7691 std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
7692
7693 pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
7695
7696 pub enterprise_config: std::option::Option<crate::model::EnterpriseConfig>,
7698
7699 pub secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
7701
7702 pub compliance_posture_config: std::option::Option<crate::model::CompliancePostureConfig>,
7704
7705 pub satisfies_pzs: std::option::Option<bool>,
7707
7708 pub satisfies_pzi: std::option::Option<bool>,
7710
7711 pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
7713
7714 pub rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
7717
7718 pub gke_auto_upgrade_config: std::option::Option<crate::model::GkeAutoUpgradeConfig>,
7720
7721 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 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 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 #[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 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 #[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 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 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 #[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 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 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 #[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 #[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 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 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 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
8816pub mod cluster {
8818 #[allow(unused_imports)]
8819 use super::*;
8820
8821 #[derive(Clone, Debug, PartialEq)]
8837 #[non_exhaustive]
8838 pub enum Status {
8839 Unspecified,
8841 Provisioning,
8843 Running,
8846 Reconciling,
8850 Stopping,
8852 Error,
8855 Degraded,
8858 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 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 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#[derive(Clone, Default, PartialEq)]
8990#[non_exhaustive]
8991pub struct RBACBindingConfig {
8992 pub enable_insecure_binding_system_unauthenticated: std::option::Option<bool>,
8995
8996 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
9060#[non_exhaustive]
9061pub struct UserManagedKeysConfig {
9062 pub cluster_ca: std::string::String,
9065
9066 pub etcd_api_ca: std::string::String,
9069
9070 pub etcd_peer_ca: std::string::String,
9073
9074 pub service_account_signing_keys: std::vec::Vec<std::string::String>,
9080
9081 pub service_account_verification_keys: std::vec::Vec<std::string::String>,
9087
9088 pub aggregation_ca: std::string::String,
9091
9092 pub control_plane_disk_encryption_key: std::string::String,
9095
9096 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
9182#[non_exhaustive]
9183pub struct AnonymousAuthenticationConfig {
9184 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 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
9211pub mod anonymous_authentication_config {
9213 #[allow(unused_imports)]
9214 use super::*;
9215
9216 #[derive(Clone, Debug, PartialEq)]
9233 #[non_exhaustive]
9234 pub enum Mode {
9235 Unspecified,
9237 Enabled,
9239 Limited,
9241 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 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 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#[derive(Clone, Default, PartialEq)]
9353#[non_exhaustive]
9354pub struct CompliancePostureConfig {
9355 pub mode: std::option::Option<crate::model::compliance_posture_config::Mode>,
9357
9358 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 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 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 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
9406pub mod compliance_posture_config {
9408 #[allow(unused_imports)]
9409 use super::*;
9410
9411 #[derive(Clone, Default, PartialEq)]
9413 #[non_exhaustive]
9414 pub struct ComplianceStandard {
9415 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 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 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 #[derive(Clone, Debug, PartialEq)]
9467 #[non_exhaustive]
9468 pub enum Mode {
9469 Unspecified,
9471 Disabled,
9473 Enabled,
9475 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 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 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#[derive(Clone, Default, PartialEq)]
9586#[non_exhaustive]
9587pub struct K8sBetaAPIConfig {
9588 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 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#[derive(Clone, Default, PartialEq)]
9620#[non_exhaustive]
9621pub struct SecurityPostureConfig {
9622 pub mode: std::option::Option<crate::model::security_posture_config::Mode>,
9624
9625 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 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 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 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 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
9680pub mod security_posture_config {
9682 #[allow(unused_imports)]
9683 use super::*;
9684
9685 #[derive(Clone, Debug, PartialEq)]
9701 #[non_exhaustive]
9702 pub enum Mode {
9703 Unspecified,
9705 Disabled,
9707 Basic,
9709 Enterprise,
9711 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 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 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 #[derive(Clone, Debug, PartialEq)]
9840 #[non_exhaustive]
9841 pub enum VulnerabilityMode {
9842 Unspecified,
9844 VulnerabilityDisabled,
9846 VulnerabilityBasic,
9848 VulnerabilityEnterprise,
9851 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 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 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#[derive(Clone, Default, PartialEq)]
9970#[non_exhaustive]
9971pub struct NodePoolAutoConfig {
9972 pub network_tags: std::option::Option<crate::model::NetworkTags>,
9977
9978 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
9981
9982 pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
9986
9987 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
10079#[non_exhaustive]
10080pub struct NodePoolDefaults {
10081 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 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 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#[derive(Clone, Default, PartialEq)]
10119#[non_exhaustive]
10120pub struct NodeConfigDefaults {
10121 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10123
10124 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10126
10127 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10129
10130 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
10226#[non_exhaustive]
10227pub struct ClusterUpdate {
10228 pub desired_node_version: std::string::String,
10240
10241 pub desired_monitoring_service: std::string::String,
10253
10254 pub desired_addons_config: std::option::Option<crate::model::AddonsConfig>,
10256
10257 pub desired_node_pool_id: std::string::String,
10262
10263 pub desired_image_type: std::string::String,
10266
10267 pub desired_database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
10269
10270 pub desired_workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
10272
10273 pub desired_mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
10276
10277 pub desired_shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
10279
10280 pub desired_cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
10282
10283 pub desired_dns_config: std::option::Option<crate::model::DNSConfig>,
10285
10286 pub desired_node_pool_autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
10291
10292 pub desired_locations: std::vec::Vec<std::string::String>,
10301
10302 #[deprecated]
10308 pub desired_master_authorized_networks_config:
10309 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
10310
10311 pub desired_cluster_autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
10313
10314 pub desired_binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
10316
10317 pub desired_logging_service: std::string::String,
10329
10330 pub desired_resource_usage_export_config:
10332 std::option::Option<crate::model::ResourceUsageExportConfig>,
10333
10334 pub desired_vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
10336
10337 #[deprecated]
10351 pub desired_private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
10352
10353 pub desired_intra_node_visibility_config:
10355 std::option::Option<crate::model::IntraNodeVisibilityConfig>,
10356
10357 pub desired_default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
10359
10360 pub desired_release_channel: std::option::Option<crate::model::ReleaseChannel>,
10362
10363 pub desired_l4ilb_subsetting_config: std::option::Option<crate::model::ILBSubsettingConfig>,
10365
10366 pub desired_datapath_provider: crate::model::DatapathProvider,
10368
10369 pub desired_private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
10371
10372 pub desired_notification_config: std::option::Option<crate::model::NotificationConfig>,
10374
10375 pub desired_authenticator_groups_config:
10377 std::option::Option<crate::model::AuthenticatorGroupsConfig>,
10378
10379 pub desired_logging_config: std::option::Option<crate::model::LoggingConfig>,
10381
10382 pub desired_monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
10384
10385 pub desired_identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
10387
10388 pub desired_service_external_ips_config:
10391 std::option::Option<crate::model::ServiceExternalIPsConfig>,
10392
10393 #[deprecated]
10400 pub desired_enable_private_endpoint: std::option::Option<bool>,
10401
10402 pub desired_default_enable_private_nodes: std::option::Option<bool>,
10408
10409 pub desired_control_plane_endpoints_config:
10415 std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
10416
10417 pub desired_master_version: std::string::String,
10428
10429 pub desired_gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10431
10432 pub desired_node_pool_auto_config_network_tags: std::option::Option<crate::model::NetworkTags>,
10435
10436 pub desired_pod_autoscaling: std::option::Option<crate::model::PodAutoscaling>,
10438
10439 pub desired_gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
10441
10442 pub etag: std::string::String,
10446
10447 pub desired_node_pool_logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10449
10450 pub desired_fleet: std::option::Option<crate::model::Fleet>,
10452
10453 pub desired_stack_type: crate::model::StackType,
10457
10458 pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
10461
10462 pub removed_additional_pod_ranges_config:
10466 std::option::Option<crate::model::AdditionalPodRangesConfig>,
10467
10468 pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
10470
10471 pub desired_security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
10473
10474 pub desired_network_performance_config:
10476 std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
10477
10478 pub desired_enable_fqdn_network_policy: std::option::Option<bool>,
10480
10481 pub desired_autopilot_workload_policy_config:
10483 std::option::Option<crate::model::WorkloadPolicyConfig>,
10484
10485 pub desired_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
10487
10488 pub desired_containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10490
10491 pub desired_enable_multi_networking: std::option::Option<bool>,
10493
10494 pub desired_node_pool_auto_config_resource_manager_tags:
10497 std::option::Option<crate::model::ResourceManagerTags>,
10498
10499 pub desired_in_transit_encryption_config:
10501 std::option::Option<crate::model::InTransitEncryptionConfig>,
10502
10503 pub desired_enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
10505
10506 pub desired_secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
10508
10509 pub desired_compliance_posture_config:
10511 std::option::Option<crate::model::CompliancePostureConfig>,
10512
10513 pub desired_node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10515
10516 pub desired_node_pool_auto_config_kubelet_config:
10519 std::option::Option<crate::model::NodeKubeletConfig>,
10520
10521 #[deprecated]
10530 pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
10531
10532 pub desired_rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
10535
10536 pub desired_additional_ip_ranges_config:
10538 std::option::Option<crate::model::DesiredAdditionalIPRangesConfig>,
10539
10540 pub desired_enterprise_config: std::option::Option<crate::model::DesiredEnterpriseConfig>,
10542
10543 pub desired_auto_ipam_config: std::option::Option<crate::model::AutoIpamConfig>,
10545
10546 pub desired_disable_l4_lb_firewall_reconciliation: std::option::Option<bool>,
10548
10549 pub desired_node_pool_auto_config_linux_node_config:
10554 std::option::Option<crate::model::LinuxNodeConfig>,
10555
10556 pub desired_user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
10558
10559 pub desired_anonymous_authentication_config:
10562 std::option::Option<crate::model::AnonymousAuthenticationConfig>,
10563
10564 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 #[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 #[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 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 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 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 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 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 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 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 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 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 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
11876#[non_exhaustive]
11877pub struct AdditionalPodRangesConfig {
11878 pub pod_range_names: std::vec::Vec<std::string::String>,
11880
11881 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 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 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#[derive(Clone, Default, PartialEq)]
11924#[non_exhaustive]
11925pub struct AdditionalIPRangesConfig {
11926 pub subnetwork: std::string::String,
11931
11932 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 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 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#[derive(Clone, Default, PartialEq)]
11973#[non_exhaustive]
11974pub struct DesiredAdditionalIPRangesConfig {
11975 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 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#[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#[derive(Clone, Default, PartialEq)]
12026#[non_exhaustive]
12027pub struct RangeInfo {
12028 pub range_name: std::string::String,
12030
12031 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 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 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#[derive(Clone, Default, PartialEq)]
12063#[non_exhaustive]
12064pub struct DesiredEnterpriseConfig {
12065 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 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#[derive(Clone, Default, PartialEq)]
12095#[non_exhaustive]
12096pub struct Operation {
12097 pub name: std::string::String,
12099
12100 #[deprecated]
12105 pub zone: std::string::String,
12106
12107 pub operation_type: crate::model::operation::Type,
12109
12110 pub status: crate::model::operation::Status,
12112
12113 pub detail: std::string::String,
12115
12116 #[deprecated]
12119 pub status_message: std::string::String,
12120
12121 pub self_link: std::string::String,
12124
12125 pub target_link: std::string::String,
12143
12144 pub location: std::string::String,
12150
12151 pub start_time: std::string::String,
12154
12155 pub end_time: std::string::String,
12158
12159 pub progress: std::option::Option<crate::model::OperationProgress>,
12161
12162 #[deprecated]
12165 pub cluster_conditions: std::vec::Vec<crate::model::StatusCondition>,
12166
12167 #[deprecated]
12170 pub nodepool_conditions: std::vec::Vec<crate::model::StatusCondition>,
12171
12172 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 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 #[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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 #[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 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 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
12324pub mod operation {
12326 #[allow(unused_imports)]
12327 use super::*;
12328
12329 #[derive(Clone, Debug, PartialEq)]
12345 #[non_exhaustive]
12346 pub enum Status {
12347 Unspecified,
12349 Pending,
12351 Running,
12353 Done,
12355 Aborting,
12357 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 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 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 #[derive(Clone, Debug, PartialEq)]
12491 #[non_exhaustive]
12492 pub enum Type {
12493 Unspecified,
12495 CreateCluster,
12504 DeleteCluster,
12513 UpgradeMaster,
12523 UpgradeNodes,
12538 RepairCluster,
12543 UpdateCluster,
12557 CreateNodePool,
12565 DeleteNodePool,
12568 SetNodePoolManagement,
12574 AutoRepairNodes,
12580 #[deprecated]
12585 AutoUpgradeNodes,
12586 #[deprecated]
12591 SetLabels,
12592 #[deprecated]
12597 SetMasterAuth,
12598 SetNodePoolSize,
12601 #[deprecated]
12606 SetNetworkPolicy,
12607 #[deprecated]
12612 SetMaintenancePolicy,
12613 ResizeCluster,
12620 FleetFeatureUpgrade,
12623 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 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 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#[derive(Clone, Default, PartialEq)]
12816#[non_exhaustive]
12817pub struct OperationProgress {
12818 pub name: std::string::String,
12821
12822 pub status: crate::model::operation::Status,
12825
12826 pub metrics: std::vec::Vec<crate::model::operation_progress::Metric>,
12833
12834 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 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 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 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 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
12889pub mod operation_progress {
12891 #[allow(unused_imports)]
12892 use super::*;
12893
12894 #[derive(Clone, Default, PartialEq)]
12896 #[non_exhaustive]
12897 pub struct Metric {
12898 pub name: std::string::String,
12900
12901 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 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 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 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 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 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 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 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 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 pub mod metric {
13021 #[allow(unused_imports)]
13022 use super::*;
13023
13024 #[derive(Clone, Debug, PartialEq)]
13026 #[non_exhaustive]
13027 pub enum Value {
13028 IntValue(i64),
13030 DoubleValue(f64),
13032 StringValue(std::string::String),
13034 }
13035 }
13036}
13037
13038#[derive(Clone, Default, PartialEq)]
13040#[non_exhaustive]
13041pub struct CreateClusterRequest {
13042 #[deprecated]
13046 pub project_id: std::string::String,
13047
13048 #[deprecated]
13053 pub zone: std::string::String,
13054
13055 pub cluster: std::option::Option<crate::model::Cluster>,
13058
13059 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 #[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 #[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 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 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 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#[derive(Clone, Default, PartialEq)]
13118#[non_exhaustive]
13119pub struct GetClusterRequest {
13120 #[deprecated]
13124 pub project_id: std::string::String,
13125
13126 #[deprecated]
13131 pub zone: std::string::String,
13132
13133 #[deprecated]
13136 pub cluster_id: std::string::String,
13137
13138 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 #[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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
13186#[non_exhaustive]
13187pub struct UpdateClusterRequest {
13188 #[deprecated]
13192 pub project_id: std::string::String,
13193
13194 #[deprecated]
13199 pub zone: std::string::String,
13200
13201 #[deprecated]
13204 pub cluster_id: std::string::String,
13205
13206 pub update: std::option::Option<crate::model::ClusterUpdate>,
13208
13209 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 #[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 #[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 #[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 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 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 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#[derive(Clone, Default, PartialEq)]
13275#[non_exhaustive]
13276pub struct UpdateNodePoolRequest {
13277 #[deprecated]
13281 pub project_id: std::string::String,
13282
13283 #[deprecated]
13288 pub zone: std::string::String,
13289
13290 #[deprecated]
13293 pub cluster_id: std::string::String,
13294
13295 #[deprecated]
13298 pub node_pool_id: std::string::String,
13299
13300 pub node_version: std::string::String,
13312
13313 pub image_type: std::string::String,
13317
13318 pub name: std::string::String,
13322
13323 pub locations: std::vec::Vec<std::string::String>,
13329
13330 pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
13332
13333 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
13335
13336 pub tags: std::option::Option<crate::model::NetworkTags>,
13340
13341 pub taints: std::option::Option<crate::model::NodeTaints>,
13345
13346 pub labels: std::option::Option<crate::model::NodeLabels>,
13350
13351 pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
13353
13354 pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
13356
13357 pub node_network_config: std::option::Option<crate::model::NodeNetworkConfig>,
13359
13360 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
13362
13363 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
13366
13367 pub gvnic: std::option::Option<crate::model::VirtualNIC>,
13369
13370 pub etag: std::string::String,
13374
13375 pub fast_socket: std::option::Option<crate::model::FastSocket>,
13377
13378 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
13380
13381 pub resource_labels: std::option::Option<crate::model::ResourceLabels>,
13384
13385 pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
13387
13388 pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
13393
13394 pub machine_type: std::string::String,
13399
13400 pub disk_type: std::string::String,
13405
13406 pub disk_size_gb: i64,
13411
13412 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
13416
13417 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
13421
13422 pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
13424
13425 pub storage_pools: std::vec::Vec<std::string::String>,
13428
13429 pub max_run_duration: std::option::Option<wkt::Duration>,
13432
13433 pub flex_start: std::option::Option<bool>,
13435
13436 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 #[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 #[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 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
13939#[non_exhaustive]
13940pub struct SetNodePoolAutoscalingRequest {
13941 #[deprecated]
13945 pub project_id: std::string::String,
13946
13947 #[deprecated]
13952 pub zone: std::string::String,
13953
13954 #[deprecated]
13957 pub cluster_id: std::string::String,
13958
13959 #[deprecated]
13962 pub node_pool_id: std::string::String,
13963
13964 pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
13966
13967 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 #[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 #[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 #[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 #[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 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 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 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#[derive(Clone, Default, PartialEq)]
14041#[non_exhaustive]
14042pub struct SetLoggingServiceRequest {
14043 #[deprecated]
14047 pub project_id: std::string::String,
14048
14049 #[deprecated]
14054 pub zone: std::string::String,
14055
14056 #[deprecated]
14059 pub cluster_id: std::string::String,
14060
14061 pub logging_service: std::string::String,
14073
14074 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 #[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 #[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 #[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 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 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#[derive(Clone, Default, PartialEq)]
14128#[non_exhaustive]
14129pub struct SetMonitoringServiceRequest {
14130 #[deprecated]
14134 pub project_id: std::string::String,
14135
14136 #[deprecated]
14141 pub zone: std::string::String,
14142
14143 #[deprecated]
14146 pub cluster_id: std::string::String,
14147
14148 pub monitoring_service: std::string::String,
14160
14161 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 #[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 #[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 #[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 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 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#[derive(Clone, Default, PartialEq)]
14218#[non_exhaustive]
14219pub struct SetAddonsConfigRequest {
14220 #[deprecated]
14224 pub project_id: std::string::String,
14225
14226 #[deprecated]
14231 pub zone: std::string::String,
14232
14233 #[deprecated]
14236 pub cluster_id: std::string::String,
14237
14238 pub addons_config: std::option::Option<crate::model::AddonsConfig>,
14241
14242 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 #[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 #[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 #[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 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 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 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#[derive(Clone, Default, PartialEq)]
14308#[non_exhaustive]
14309pub struct SetLocationsRequest {
14310 #[deprecated]
14314 pub project_id: std::string::String,
14315
14316 #[deprecated]
14321 pub zone: std::string::String,
14322
14323 #[deprecated]
14326 pub cluster_id: std::string::String,
14327
14328 pub locations: std::vec::Vec<std::string::String>,
14336
14337 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 #[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 #[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 #[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 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 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#[derive(Clone, Default, PartialEq)]
14396#[non_exhaustive]
14397pub struct UpdateMasterRequest {
14398 #[deprecated]
14402 pub project_id: std::string::String,
14403
14404 #[deprecated]
14409 pub zone: std::string::String,
14410
14411 #[deprecated]
14414 pub cluster_id: std::string::String,
14415
14416 pub master_version: std::string::String,
14427
14428 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 #[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 #[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 #[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 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 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#[derive(Clone, Default, PartialEq)]
14482#[non_exhaustive]
14483pub struct SetMasterAuthRequest {
14484 #[deprecated]
14488 pub project_id: std::string::String,
14489
14490 #[deprecated]
14495 pub zone: std::string::String,
14496
14497 #[deprecated]
14500 pub cluster_id: std::string::String,
14501
14502 pub action: crate::model::set_master_auth_request::Action,
14504
14505 pub update: std::option::Option<crate::model::MasterAuth>,
14507
14508 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 #[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 #[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 #[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 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 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 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 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
14581pub mod set_master_auth_request {
14583 #[allow(unused_imports)]
14584 use super::*;
14585
14586 #[derive(Clone, Debug, PartialEq)]
14602 #[non_exhaustive]
14603 pub enum Action {
14604 Unknown,
14606 SetPassword,
14608 GeneratePassword,
14610 SetUsername,
14615 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 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 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#[derive(Clone, Default, PartialEq)]
14731#[non_exhaustive]
14732pub struct DeleteClusterRequest {
14733 #[deprecated]
14737 pub project_id: std::string::String,
14738
14739 #[deprecated]
14744 pub zone: std::string::String,
14745
14746 #[deprecated]
14749 pub cluster_id: std::string::String,
14750
14751 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 #[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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
14799#[non_exhaustive]
14800pub struct ListClustersRequest {
14801 #[deprecated]
14805 pub project_id: std::string::String,
14806
14807 #[deprecated]
14812 pub zone: std::string::String,
14813
14814 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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
14856#[non_exhaustive]
14857pub struct ListClustersResponse {
14858 pub clusters: std::vec::Vec<crate::model::Cluster>,
14861
14862 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 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 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#[derive(Clone, Default, PartialEq)]
14905#[non_exhaustive]
14906pub struct GetOperationRequest {
14907 #[deprecated]
14911 pub project_id: std::string::String,
14912
14913 #[deprecated]
14918 pub zone: std::string::String,
14919
14920 #[deprecated]
14923 pub operation_id: std::string::String,
14924
14925 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 #[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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
14973#[non_exhaustive]
14974pub struct ListOperationsRequest {
14975 #[deprecated]
14979 pub project_id: std::string::String,
14980
14981 #[deprecated]
14986 pub zone: std::string::String,
14987
14988 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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
15030#[non_exhaustive]
15031pub struct CancelOperationRequest {
15032 #[deprecated]
15036 pub project_id: std::string::String,
15037
15038 #[deprecated]
15043 pub zone: std::string::String,
15044
15045 #[deprecated]
15048 pub operation_id: std::string::String,
15049
15050 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 #[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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
15098#[non_exhaustive]
15099pub struct ListOperationsResponse {
15100 pub operations: std::vec::Vec<crate::model::Operation>,
15102
15103 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 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 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#[derive(Clone, Default, PartialEq)]
15146#[non_exhaustive]
15147pub struct GetServerConfigRequest {
15148 #[deprecated]
15152 pub project_id: std::string::String,
15153
15154 #[deprecated]
15159 pub zone: std::string::String,
15160
15161 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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
15202#[non_exhaustive]
15203pub struct ServerConfig {
15204 pub default_cluster_version: std::string::String,
15206
15207 pub valid_node_versions: std::vec::Vec<std::string::String>,
15209
15210 pub default_image_type: std::string::String,
15212
15213 pub valid_image_types: std::vec::Vec<std::string::String>,
15215
15216 pub valid_master_versions: std::vec::Vec<std::string::String>,
15218
15219 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 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 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 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 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 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 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
15299pub mod server_config {
15301 #[allow(unused_imports)]
15302 use super::*;
15303
15304 #[derive(Clone, Default, PartialEq)]
15306 #[non_exhaustive]
15307 pub struct ReleaseChannelConfig {
15308 pub channel: crate::model::release_channel::Channel,
15310
15311 pub default_version: std::string::String,
15313
15314 pub valid_versions: std::vec::Vec<std::string::String>,
15316
15317 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
15376#[non_exhaustive]
15377pub struct CreateNodePoolRequest {
15378 #[deprecated]
15382 pub project_id: std::string::String,
15383
15384 #[deprecated]
15389 pub zone: std::string::String,
15390
15391 #[deprecated]
15394 pub cluster_id: std::string::String,
15395
15396 pub node_pool: std::option::Option<crate::model::NodePool>,
15398
15399 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 #[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 #[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 #[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 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 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 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#[derive(Clone, Default, PartialEq)]
15466#[non_exhaustive]
15467pub struct DeleteNodePoolRequest {
15468 #[deprecated]
15472 pub project_id: std::string::String,
15473
15474 #[deprecated]
15479 pub zone: std::string::String,
15480
15481 #[deprecated]
15484 pub cluster_id: std::string::String,
15485
15486 #[deprecated]
15489 pub node_pool_id: std::string::String,
15490
15491 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 #[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 #[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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
15547#[non_exhaustive]
15548pub struct ListNodePoolsRequest {
15549 #[deprecated]
15553 pub project_id: std::string::String,
15554
15555 #[deprecated]
15560 pub zone: std::string::String,
15561
15562 #[deprecated]
15565 pub cluster_id: std::string::String,
15566
15567 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 #[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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
15615#[non_exhaustive]
15616pub struct GetNodePoolRequest {
15617 #[deprecated]
15621 pub project_id: std::string::String,
15622
15623 #[deprecated]
15628 pub zone: std::string::String,
15629
15630 #[deprecated]
15633 pub cluster_id: std::string::String,
15634
15635 #[deprecated]
15638 pub node_pool_id: std::string::String,
15639
15640 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 #[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 #[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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
15696#[non_exhaustive]
15697pub struct BlueGreenSettings {
15698 pub node_pool_soak_duration: std::option::Option<wkt::Duration>,
15701
15702 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 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 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 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 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 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
15788pub mod blue_green_settings {
15790 #[allow(unused_imports)]
15791 use super::*;
15792
15793 #[derive(Clone, Default, PartialEq)]
15795 #[non_exhaustive]
15796 pub struct StandardRolloutPolicy {
15797 pub batch_soak_duration: std::option::Option<wkt::Duration>,
15799
15800 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 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 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 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 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 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 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 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 pub mod standard_rollout_policy {
15908 #[allow(unused_imports)]
15909 use super::*;
15910
15911 #[derive(Clone, Debug, PartialEq)]
15913 #[non_exhaustive]
15914 pub enum UpdateBatchSize {
15915 BatchPercentage(f32),
15918 BatchNodeCount(i32),
15920 }
15921 }
15922
15923 #[derive(Clone, Debug, PartialEq)]
15925 #[non_exhaustive]
15926 pub enum RolloutPolicy {
15927 StandardRolloutPolicy(
15929 std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
15930 ),
15931 }
15932}
15933
15934#[derive(Clone, Default, PartialEq)]
15941#[non_exhaustive]
15942pub struct NodePool {
15943 pub name: std::string::String,
15945
15946 pub config: std::option::Option<crate::model::NodeConfig>,
15948
15949 pub initial_node_count: i32,
15955
15956 pub locations: std::vec::Vec<std::string::String>,
15967
15968 pub network_config: std::option::Option<crate::model::NodeNetworkConfig>,
15971
15972 pub self_link: std::string::String,
15974
15975 pub version: std::string::String,
15979
15980 pub instance_group_urls: std::vec::Vec<std::string::String>,
15986
15987 pub status: crate::model::node_pool::Status,
15989
15990 #[deprecated]
15994 pub status_message: std::string::String,
15995
15996 pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
15999
16000 pub management: std::option::Option<crate::model::NodeManagement>,
16002
16003 pub max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
16006
16007 pub conditions: std::vec::Vec<crate::model::StatusCondition>,
16009
16010 pub pod_ipv4_cidr_size: i32,
16012
16013 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
16015
16016 pub placement_policy: std::option::Option<crate::model::node_pool::PlacementPolicy>,
16018
16019 pub update_info: std::option::Option<crate::model::node_pool::UpdateInfo>,
16022
16023 pub etag: std::string::String,
16027
16028 pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
16030
16031 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 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 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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
16314pub mod node_pool {
16316 #[allow(unused_imports)]
16317 use super::*;
16318
16319 #[derive(Clone, Default, PartialEq)]
16368 #[non_exhaustive]
16369 pub struct UpgradeSettings {
16370 pub max_surge: i32,
16373
16374 pub max_unavailable: i32,
16378
16379 pub strategy: std::option::Option<crate::model::NodePoolUpdateStrategy>,
16381
16382 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 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 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 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 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 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 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 #[derive(Clone, Default, PartialEq)]
16451 #[non_exhaustive]
16452 pub struct UpdateInfo {
16453 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 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 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 pub mod update_info {
16492 #[allow(unused_imports)]
16493 use super::*;
16494
16495 #[derive(Clone, Default, PartialEq)]
16497 #[non_exhaustive]
16498 pub struct BlueGreenInfo {
16499 pub phase: crate::model::node_pool::update_info::blue_green_info::Phase,
16501
16502 pub blue_instance_group_urls: std::vec::Vec<std::string::String>,
16506
16507 pub green_instance_group_urls: std::vec::Vec<std::string::String>,
16511
16512 pub blue_pool_deletion_start_time: std::string::String,
16515
16516 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 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 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 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 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 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 pub mod blue_green_info {
16587 #[allow(unused_imports)]
16588 use super::*;
16589
16590 #[derive(Clone, Debug, PartialEq)]
16606 #[non_exhaustive]
16607 pub enum Phase {
16608 Unspecified,
16610 UpdateStarted,
16612 CreatingGreenPool,
16614 CordoningBluePool,
16616 DrainingBluePool,
16618 NodePoolSoaking,
16620 DeletingBluePool,
16622 RollbackStarted,
16624 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 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 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 #[derive(Clone, Default, PartialEq)]
16764 #[non_exhaustive]
16765 pub struct PlacementPolicy {
16766 pub r#type: crate::model::node_pool::placement_policy::Type,
16768
16769 pub tpu_topology: std::string::String,
16772
16773 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 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 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 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 pub mod placement_policy {
16819 #[allow(unused_imports)]
16820 use super::*;
16821
16822 #[derive(Clone, Debug, PartialEq)]
16838 #[non_exhaustive]
16839 pub enum Type {
16840 Unspecified,
16843 Compact,
16846 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 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 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 #[derive(Clone, Default, PartialEq)]
16955 #[non_exhaustive]
16956 pub struct QueuedProvisioning {
16957 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 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 #[derive(Clone, Debug, PartialEq)]
16999 #[non_exhaustive]
17000 pub enum Status {
17001 Unspecified,
17003 Provisioning,
17005 Running,
17008 RunningWithError,
17013 Reconciling,
17017 Stopping,
17019 Error,
17022 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 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 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#[derive(Clone, Default, PartialEq)]
17154#[non_exhaustive]
17155pub struct NodeManagement {
17156 pub auto_upgrade: bool,
17160
17161 pub auto_repair: bool,
17166
17167 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
17217#[non_exhaustive]
17218pub struct BestEffortProvisioning {
17219 pub enabled: bool,
17223
17224 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17239 self.enabled = v.into();
17240 self
17241 }
17242
17243 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#[derive(Clone, Default, PartialEq)]
17259#[non_exhaustive]
17260pub struct AutoUpgradeOptions {
17261 pub auto_upgrade_start_time: std::string::String,
17265
17266 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 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 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#[derive(Clone, Default, PartialEq)]
17302#[non_exhaustive]
17303pub struct MaintenancePolicy {
17304 pub window: std::option::Option<crate::model::MaintenanceWindow>,
17306
17307 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 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 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 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#[derive(Clone, Default, PartialEq)]
17358#[non_exhaustive]
17359pub struct MaintenanceWindow {
17360 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 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 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 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 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 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 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
17472pub 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(std::boxed::Box<crate::model::DailyMaintenanceWindow>),
17482 RecurringWindow(std::boxed::Box<crate::model::RecurringTimeWindow>),
17486 }
17487}
17488
17489#[derive(Clone, Default, PartialEq)]
17491#[non_exhaustive]
17492pub struct TimeWindow {
17493 pub start_time: std::option::Option<wkt::Timestamp>,
17495
17496 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 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 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 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 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 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 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 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
17599pub 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(std::boxed::Box<crate::model::MaintenanceExclusionOptions>),
17610 }
17611}
17612
17613#[derive(Clone, Default, PartialEq)]
17615#[non_exhaustive]
17616pub struct MaintenanceExclusionOptions {
17617 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 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
17645pub mod maintenance_exclusion_options {
17647 #[allow(unused_imports)]
17648 use super::*;
17649
17650 #[derive(Clone, Debug, PartialEq)]
17666 #[non_exhaustive]
17667 pub enum Scope {
17668 NoUpgrades,
17672 NoMinorUpgrades,
17675 NoMinorOrNodeUpgrades,
17679 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 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 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#[derive(Clone, Default, PartialEq)]
17792#[non_exhaustive]
17793pub struct RecurringTimeWindow {
17794 pub window: std::option::Option<crate::model::TimeWindow>,
17796
17797 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 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 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 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#[derive(Clone, Default, PartialEq)]
17874#[non_exhaustive]
17875pub struct DailyMaintenanceWindow {
17876 pub start_time: std::string::String,
17880
17881 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 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 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#[derive(Clone, Default, PartialEq)]
17917#[non_exhaustive]
17918pub struct SetNodePoolManagementRequest {
17919 #[deprecated]
17923 pub project_id: std::string::String,
17924
17925 #[deprecated]
17930 pub zone: std::string::String,
17931
17932 #[deprecated]
17935 pub cluster_id: std::string::String,
17936
17937 #[deprecated]
17940 pub node_pool_id: std::string::String,
17941
17942 pub management: std::option::Option<crate::model::NodeManagement>,
17944
17945 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 #[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 #[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 #[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 #[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 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 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 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#[derive(Clone, Default, PartialEq)]
18019#[non_exhaustive]
18020pub struct SetNodePoolSizeRequest {
18021 #[deprecated]
18025 pub project_id: std::string::String,
18026
18027 #[deprecated]
18032 pub zone: std::string::String,
18033
18034 #[deprecated]
18037 pub cluster_id: std::string::String,
18038
18039 #[deprecated]
18042 pub node_pool_id: std::string::String,
18043
18044 pub node_count: i32,
18046
18047 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 #[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 #[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 #[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 #[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 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 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#[derive(Clone, Default, PartialEq)]
18110#[non_exhaustive]
18111pub struct CompleteNodePoolUpgradeRequest {
18112 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 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#[derive(Clone, Default, PartialEq)]
18142#[non_exhaustive]
18143pub struct RollbackNodePoolUpgradeRequest {
18144 #[deprecated]
18148 pub project_id: std::string::String,
18149
18150 #[deprecated]
18155 pub zone: std::string::String,
18156
18157 #[deprecated]
18160 pub cluster_id: std::string::String,
18161
18162 #[deprecated]
18165 pub node_pool_id: std::string::String,
18166
18167 pub name: std::string::String,
18171
18172 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 #[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 #[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 #[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 #[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 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 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#[derive(Clone, Default, PartialEq)]
18233#[non_exhaustive]
18234pub struct ListNodePoolsResponse {
18235 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 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#[derive(Clone, Default, PartialEq)]
18269#[non_exhaustive]
18270pub struct ClusterAutoscaling {
18271 pub enable_node_autoprovisioning: bool,
18273
18274 pub resource_limits: std::vec::Vec<crate::model::ResourceLimit>,
18277
18278 pub autoscaling_profile: crate::model::cluster_autoscaling::AutoscalingProfile,
18280
18281 pub autoprovisioning_node_pool_defaults:
18284 std::option::Option<crate::model::AutoprovisioningNodePoolDefaults>,
18285
18286 pub autoprovisioning_locations: std::vec::Vec<std::string::String>,
18290
18291 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 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 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 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 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 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 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 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 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
18387pub mod cluster_autoscaling {
18389 #[allow(unused_imports)]
18390 use super::*;
18391
18392 #[derive(Clone, Debug, PartialEq)]
18408 #[non_exhaustive]
18409 pub enum AutoscalingProfile {
18410 ProfileUnspecified,
18412 OptimizeUtilization,
18414 Balanced,
18416 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 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 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#[derive(Clone, Default, PartialEq)]
18528#[non_exhaustive]
18529pub struct AutoprovisioningNodePoolDefaults {
18530 pub oauth_scopes: std::vec::Vec<std::string::String>,
18532
18533 pub service_account: std::string::String,
18535
18536 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
18538
18539 pub management: std::option::Option<crate::model::NodeManagement>,
18541
18542 #[deprecated]
18554 pub min_cpu_platform: std::string::String,
18555
18556 pub disk_size_gb: i32,
18561
18562 pub disk_type: std::string::String,
18567
18568 pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
18570
18571 pub boot_disk_kms_key: std::string::String,
18578
18579 pub image_type: std::string::String,
18583
18584 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
18734#[non_exhaustive]
18735pub struct ResourceLimit {
18736 pub resource_type: std::string::String,
18738
18739 pub minimum: i64,
18741
18742 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 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 pub fn set_minimum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18761 self.minimum = v.into();
18762 self
18763 }
18764
18765 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#[derive(Clone, Default, PartialEq)]
18781#[non_exhaustive]
18782pub struct DefaultComputeClassConfig {
18783 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 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#[derive(Clone, Default, PartialEq)]
18810#[non_exhaustive]
18811pub struct NodePoolAutoscaling {
18812 pub enabled: bool,
18814
18815 pub min_node_count: i32,
18818
18819 pub max_node_count: i32,
18822
18823 pub autoprovisioned: bool,
18825
18826 pub location_policy: crate::model::node_pool_autoscaling::LocationPolicy,
18828
18829 pub total_min_node_count: i32,
18834
18835 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18851 self.enabled = v.into();
18852 self
18853 }
18854
18855 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 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 pub fn set_autoprovisioned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18869 self.autoprovisioned = v.into();
18870 self
18871 }
18872
18873 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 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 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
18903pub mod node_pool_autoscaling {
18905 #[allow(unused_imports)]
18906 use super::*;
18907
18908 #[derive(Clone, Debug, PartialEq)]
18925 #[non_exhaustive]
18926 pub enum LocationPolicy {
18927 Unspecified,
18929 Balanced,
18932 Any,
18934 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 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 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#[derive(Clone, Default, PartialEq)]
19047#[non_exhaustive]
19048pub struct SetLabelsRequest {
19049 #[deprecated]
19053 pub project_id: std::string::String,
19054
19055 #[deprecated]
19060 pub zone: std::string::String,
19061
19062 #[deprecated]
19065 pub cluster_id: std::string::String,
19066
19067 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
19069
19070 pub label_fingerprint: std::string::String,
19077
19078 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 #[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 #[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 #[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 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 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 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#[derive(Clone, Default, PartialEq)]
19148#[non_exhaustive]
19149pub struct SetLegacyAbacRequest {
19150 #[deprecated]
19154 pub project_id: std::string::String,
19155
19156 #[deprecated]
19161 pub zone: std::string::String,
19162
19163 #[deprecated]
19166 pub cluster_id: std::string::String,
19167
19168 pub enabled: bool,
19170
19171 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 #[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 #[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 #[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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19206 self.enabled = v.into();
19207 self
19208 }
19209
19210 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#[derive(Clone, Default, PartialEq)]
19226#[non_exhaustive]
19227pub struct StartIPRotationRequest {
19228 #[deprecated]
19232 pub project_id: std::string::String,
19233
19234 #[deprecated]
19239 pub zone: std::string::String,
19240
19241 #[deprecated]
19244 pub cluster_id: std::string::String,
19245
19246 pub name: std::string::String,
19249
19250 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 #[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 #[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 #[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 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 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#[derive(Clone, Default, PartialEq)]
19303#[non_exhaustive]
19304pub struct CompleteIPRotationRequest {
19305 #[deprecated]
19309 pub project_id: std::string::String,
19310
19311 #[deprecated]
19316 pub zone: std::string::String,
19317
19318 #[deprecated]
19321 pub cluster_id: std::string::String,
19322
19323 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 #[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 #[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 #[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 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#[derive(Clone, Default, PartialEq)]
19371#[non_exhaustive]
19372pub struct AcceleratorConfig {
19373 pub accelerator_count: i64,
19375
19376 pub accelerator_type: std::string::String,
19379
19380 pub gpu_partition_size: std::string::String,
19384
19385 pub gpu_sharing_config: std::option::Option<crate::model::GPUSharingConfig>,
19387
19388 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
19473#[non_exhaustive]
19474pub struct GPUSharingConfig {
19475 pub max_shared_clients_per_gpu: i64,
19477
19478 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 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 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 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
19521pub mod gpu_sharing_config {
19523 #[allow(unused_imports)]
19524 use super::*;
19525
19526 #[derive(Clone, Debug, PartialEq)]
19542 #[non_exhaustive]
19543 pub enum GPUSharingStrategy {
19544 Unspecified,
19546 TimeSharing,
19548 Mps,
19550 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 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 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#[derive(Clone, Default, PartialEq)]
19662#[non_exhaustive]
19663pub struct GPUDriverInstallationConfig {
19664 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 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 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
19701pub mod gpu_driver_installation_config {
19703 #[allow(unused_imports)]
19704 use super::*;
19705
19706 #[derive(Clone, Debug, PartialEq)]
19722 #[non_exhaustive]
19723 pub enum GPUDriverVersion {
19724 Unspecified,
19726 InstallationDisabled,
19728 Default,
19730 Latest,
19732 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 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 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#[derive(Clone, Default, PartialEq)]
19849#[non_exhaustive]
19850pub struct WorkloadMetadataConfig {
19851 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 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
19879pub mod workload_metadata_config {
19881 #[allow(unused_imports)]
19882 use super::*;
19883
19884 #[derive(Clone, Debug, PartialEq)]
19901 #[non_exhaustive]
19902 pub enum Mode {
19903 Unspecified,
19905 GceMetadata,
19907 GkeMetadata,
19913 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 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 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#[derive(Clone, Default, PartialEq)]
20024#[non_exhaustive]
20025pub struct SetNetworkPolicyRequest {
20026 #[deprecated]
20030 pub project_id: std::string::String,
20031
20032 #[deprecated]
20037 pub zone: std::string::String,
20038
20039 #[deprecated]
20042 pub cluster_id: std::string::String,
20043
20044 pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
20046
20047 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 #[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 #[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 #[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 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 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 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#[derive(Clone, Default, PartialEq)]
20113#[non_exhaustive]
20114pub struct SetMaintenancePolicyRequest {
20115 pub project_id: std::string::String,
20118
20119 pub zone: std::string::String,
20123
20124 pub cluster_id: std::string::String,
20126
20127 pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
20130
20131 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
20196#[non_exhaustive]
20197pub struct StatusCondition {
20198 #[deprecated]
20201 pub code: crate::model::status_condition::Code,
20202
20203 pub message: std::string::String,
20205
20206 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 #[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 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 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
20246pub mod status_condition {
20248 #[allow(unused_imports)]
20249 use super::*;
20250
20251 #[derive(Clone, Debug, PartialEq)]
20267 #[non_exhaustive]
20268 pub enum Code {
20269 Unknown,
20271 GceStockout,
20274 GkeServiceAccountDeleted,
20277 GceQuotaExceeded,
20279 SetByOperator,
20281 CloudKmsKeyError,
20284 CaExpiring,
20286 NodeServiceAccountMissingPermissions,
20288 CloudKmsKeyDestroyed,
20291 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 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 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#[derive(Clone, Default, PartialEq)]
20438#[non_exhaustive]
20439pub struct NetworkConfig {
20440 pub network: std::string::String,
20445
20446 pub subnetwork: std::string::String,
20451
20452 pub enable_intra_node_visibility: bool,
20455
20456 pub default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
20461
20462 pub enable_l4ilb_subsetting: bool,
20464
20465 pub datapath_provider: crate::model::DatapathProvider,
20468
20469 pub private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
20473
20474 pub dns_config: std::option::Option<crate::model::DNSConfig>,
20476
20477 pub service_external_ips_config: std::option::Option<crate::model::ServiceExternalIPsConfig>,
20480
20481 pub gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
20484
20485 pub enable_multi_networking: bool,
20487
20488 pub network_performance_config:
20490 std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
20491
20492 pub enable_fqdn_network_policy: std::option::Option<bool>,
20494
20495 pub in_transit_encryption_config: std::option::Option<crate::model::InTransitEncryptionConfig>,
20498
20499 pub enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
20501
20502 pub default_enable_private_nodes: std::option::Option<bool>,
20510
20511 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
20765pub mod network_config {
20767 #[allow(unused_imports)]
20768 use super::*;
20769
20770 #[derive(Clone, Default, PartialEq)]
20772 #[non_exhaustive]
20773 pub struct ClusterNetworkPerformanceConfig {
20774 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 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 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 pub mod cluster_network_performance_config {
20821 #[allow(unused_imports)]
20822 use super::*;
20823
20824 #[derive(Clone, Debug, PartialEq)]
20840 #[non_exhaustive]
20841 pub enum Tier {
20842 Unspecified,
20844 Tier1,
20846 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 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 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#[derive(Clone, Default, PartialEq)]
20956#[non_exhaustive]
20957pub struct GatewayAPIConfig {
20958 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 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
20985pub mod gateway_api_config {
20987 #[allow(unused_imports)]
20988 use super::*;
20989
20990 #[derive(Clone, Debug, PartialEq)]
21007 #[non_exhaustive]
21008 pub enum Channel {
21009 Unspecified,
21011 Disabled,
21013 #[deprecated]
21016 Experimental,
21017 Standard,
21019 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 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 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#[derive(Clone, Default, PartialEq)]
21135#[non_exhaustive]
21136pub struct ServiceExternalIPsConfig {
21137 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 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#[derive(Clone, Default, PartialEq)]
21164#[non_exhaustive]
21165pub struct GetOpenIDConfigRequest {
21166 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 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#[derive(Clone, Default, PartialEq)]
21194#[non_exhaustive]
21195pub struct GetOpenIDConfigResponse {
21196 pub issuer: std::string::String,
21198
21199 pub jwks_uri: std::string::String,
21201
21202 pub response_types_supported: std::vec::Vec<std::string::String>,
21204
21205 pub subject_types_supported: std::vec::Vec<std::string::String>,
21207
21208 pub id_token_signing_alg_values_supported: std::vec::Vec<std::string::String>,
21210
21211 pub claims_supported: std::vec::Vec<std::string::String>,
21213
21214 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
21304#[non_exhaustive]
21305pub struct GetJSONWebKeysRequest {
21306 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 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#[derive(Clone, Default, PartialEq)]
21333#[non_exhaustive]
21334pub struct Jwk {
21335 pub kty: std::string::String,
21337
21338 pub alg: std::string::String,
21340
21341 pub r#use: std::string::String,
21343
21344 pub kid: std::string::String,
21346
21347 pub n: std::string::String,
21349
21350 pub e: std::string::String,
21352
21353 pub x: std::string::String,
21355
21356 pub y: std::string::String,
21358
21359 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
21433#[non_exhaustive]
21434pub struct GetJSONWebKeysResponse {
21435 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 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#[derive(Clone, Default, PartialEq)]
21468#[non_exhaustive]
21469pub struct CheckAutopilotCompatibilityRequest {
21470 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 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#[derive(Clone, Default, PartialEq)]
21498#[non_exhaustive]
21499pub struct AutopilotCompatibilityIssue {
21500 pub last_observation: std::option::Option<wkt::Timestamp>,
21502
21503 pub constraint_type: std::string::String,
21505
21506 pub incompatibility_type: crate::model::autopilot_compatibility_issue::IssueType,
21508
21509 pub subjects: std::vec::Vec<std::string::String>,
21511
21512 pub documentation_url: std::string::String,
21514
21515 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 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 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 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 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 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 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 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
21594pub mod autopilot_compatibility_issue {
21596 #[allow(unused_imports)]
21597 use super::*;
21598
21599 #[derive(Clone, Debug, PartialEq)]
21615 #[non_exhaustive]
21616 pub enum IssueType {
21617 Unspecified,
21619 Incompatibility,
21622 AdditionalConfigRequired,
21625 PassedWithOptionalConfig,
21629 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 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 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#[derive(Clone, Default, PartialEq)]
21749#[non_exhaustive]
21750pub struct CheckAutopilotCompatibilityResponse {
21751 pub issues: std::vec::Vec<crate::model::AutopilotCompatibilityIssue>,
21753
21754 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 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 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#[derive(Clone, Default, PartialEq)]
21796#[non_exhaustive]
21797pub struct ReleaseChannel {
21798 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 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
21825pub mod release_channel {
21827 #[allow(unused_imports)]
21828 use super::*;
21829
21830 #[derive(Clone, Debug, PartialEq)]
21846 #[non_exhaustive]
21847 pub enum Channel {
21848 Unspecified,
21850 Rapid,
21857 Regular,
21861 Stable,
21864 Extended,
21867 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 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 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#[derive(Clone, Default, PartialEq)]
21988#[non_exhaustive]
21989pub struct CostManagementConfig {
21990 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 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#[derive(Clone, Default, PartialEq)]
22017#[non_exhaustive]
22018pub struct IntraNodeVisibilityConfig {
22019 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 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#[derive(Clone, Default, PartialEq)]
22046#[non_exhaustive]
22047pub struct ILBSubsettingConfig {
22048 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 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#[derive(Clone, Default, PartialEq)]
22074#[non_exhaustive]
22075pub struct DNSConfig {
22076 pub cluster_dns: crate::model::dns_config::Provider,
22078
22079 pub cluster_dns_scope: crate::model::dns_config::DNSScope,
22081
22082 pub cluster_dns_domain: std::string::String,
22084
22085 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 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 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 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 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
22139pub mod dns_config {
22141 #[allow(unused_imports)]
22142 use super::*;
22143
22144 #[derive(Clone, Debug, PartialEq)]
22160 #[non_exhaustive]
22161 pub enum Provider {
22162 Unspecified,
22164 PlatformDefault,
22166 CloudDns,
22168 KubeDns,
22170 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 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 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 #[derive(Clone, Debug, PartialEq)]
22299 #[non_exhaustive]
22300 pub enum DNSScope {
22301 Unspecified,
22303 ClusterScope,
22305 VpcScope,
22307 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 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 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#[derive(Clone, Default, PartialEq)]
22418#[non_exhaustive]
22419pub struct MaxPodsConstraint {
22420 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 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#[derive(Clone, Default, PartialEq)]
22447#[non_exhaustive]
22448pub struct WorkloadIdentityConfig {
22449 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 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#[derive(Clone, Default, PartialEq)]
22476#[non_exhaustive]
22477pub struct IdentityServiceConfig {
22478 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 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#[derive(Clone, Default, PartialEq)]
22504#[non_exhaustive]
22505pub struct MeshCertificates {
22506 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 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 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#[derive(Clone, Default, PartialEq)]
22554#[non_exhaustive]
22555pub struct DatabaseEncryption {
22556 pub key_name: std::string::String,
22559
22560 pub state: crate::model::database_encryption::State,
22562
22563 pub current_state: std::option::Option<crate::model::database_encryption::CurrentState>,
22565
22566 pub decryption_keys: std::vec::Vec<std::string::String>,
22571
22572 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 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 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 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 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 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 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
22646pub mod database_encryption {
22648 #[allow(unused_imports)]
22649 use super::*;
22650
22651 #[derive(Clone, Default, PartialEq)]
22654 #[non_exhaustive]
22655 pub struct OperationError {
22656 pub key_name: std::string::String,
22658
22659 pub error_message: std::string::String,
22661
22662 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 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 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 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 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 #[derive(Clone, Debug, PartialEq)]
22729 #[non_exhaustive]
22730 pub enum State {
22731 Unknown,
22733 Encrypted,
22735 Decrypted,
22738 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 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 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 #[derive(Clone, Debug, PartialEq)]
22862 #[non_exhaustive]
22863 pub enum CurrentState {
22864 Unspecified,
22866 Encrypted,
22868 Decrypted,
22871 EncryptionPending,
22874 EncryptionError,
22877 DecryptionPending,
22879 DecryptionError,
22881 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 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 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#[derive(Clone, Default, PartialEq)]
23021#[non_exhaustive]
23022pub struct ListUsableSubnetworksRequest {
23023 pub parent: std::string::String,
23026
23027 pub filter: std::string::String,
23032
23033 pub page_size: i32,
23038
23039 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
23085#[non_exhaustive]
23086pub struct ListUsableSubnetworksResponse {
23087 pub subnetworks: std::vec::Vec<crate::model::UsableSubnetwork>,
23089
23090 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 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 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#[derive(Clone, Default, PartialEq)]
23144#[non_exhaustive]
23145pub struct UsableSubnetworkSecondaryRange {
23146 pub range_name: std::string::String,
23149
23150 pub ip_cidr_range: std::string::String,
23152
23153 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 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 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 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
23194pub mod usable_subnetwork_secondary_range {
23196 #[allow(unused_imports)]
23197 use super::*;
23198
23199 #[derive(Clone, Debug, PartialEq)]
23215 #[non_exhaustive]
23216 pub enum Status {
23217 Unknown,
23219 Unused,
23221 InUseService,
23225 InUseShareablePod,
23229 InUseManagedPod,
23232 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 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 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#[derive(Clone, Default, PartialEq)]
23354#[non_exhaustive]
23355pub struct UsableSubnetwork {
23356 pub subnetwork: std::string::String,
23359
23360 pub network: std::string::String,
23363
23364 pub ip_cidr_range: std::string::String,
23366
23367 pub secondary_ip_ranges: std::vec::Vec<crate::model::UsableSubnetworkSecondaryRange>,
23369
23370 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
23428#[non_exhaustive]
23429pub struct ResourceUsageExportConfig {
23430 pub bigquery_destination:
23432 std::option::Option<crate::model::resource_usage_export_config::BigQueryDestination>,
23433
23434 pub enable_network_egress_metering: bool,
23437
23438 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 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 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 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 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 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
23503pub mod resource_usage_export_config {
23505 #[allow(unused_imports)]
23506 use super::*;
23507
23508 #[derive(Clone, Default, PartialEq)]
23510 #[non_exhaustive]
23511 pub struct BigQueryDestination {
23512 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 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 #[derive(Clone, Default, PartialEq)]
23538 #[non_exhaustive]
23539 pub struct ConsumptionMeteringConfig {
23540 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 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#[derive(Clone, Default, PartialEq)]
23571#[non_exhaustive]
23572pub struct VerticalPodAutoscaling {
23573 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 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#[derive(Clone, Default, PartialEq)]
23600#[non_exhaustive]
23601pub struct DefaultSnatStatus {
23602 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 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#[derive(Clone, Default, PartialEq)]
23628#[non_exhaustive]
23629pub struct ShieldedNodes {
23630 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 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#[derive(Clone, Default, PartialEq)]
23656#[non_exhaustive]
23657pub struct VirtualNIC {
23658 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 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#[derive(Clone, Default, PartialEq)]
23684#[non_exhaustive]
23685pub struct FastSocket {
23686 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 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#[derive(Clone, Default, PartialEq)]
23712#[non_exhaustive]
23713pub struct NotificationConfig {
23714 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 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 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
23750pub mod notification_config {
23752 #[allow(unused_imports)]
23753 use super::*;
23754
23755 #[derive(Clone, Default, PartialEq)]
23757 #[non_exhaustive]
23758 pub struct PubSub {
23759 pub enabled: bool,
23761
23762 pub topic: std::string::String,
23765
23766 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23781 self.enabled = v.into();
23782 self
23783 }
23784
23785 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 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 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 #[derive(Clone, Default, PartialEq)]
23821 #[non_exhaustive]
23822 pub struct Filter {
23823 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 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 #[derive(Clone, Debug, PartialEq)]
23869 #[non_exhaustive]
23870 pub enum EventType {
23871 Unspecified,
23873 UpgradeAvailableEvent,
23875 UpgradeEvent,
23877 SecurityBulletinEvent,
23879 UpgradeInfoEvent,
23881 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 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 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#[derive(Clone, Default, PartialEq)]
24003#[non_exhaustive]
24004pub struct ConfidentialNodes {
24005 pub enabled: bool,
24007
24008 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24021 self.enabled = v.into();
24022 self
24023 }
24024
24025 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
24043pub mod confidential_nodes {
24045 #[allow(unused_imports)]
24046 use super::*;
24047
24048 #[derive(Clone, Debug, PartialEq)]
24064 #[non_exhaustive]
24065 pub enum ConfidentialInstanceType {
24066 Unspecified,
24068 Sev,
24070 SevSnp,
24072 Tdx,
24074 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 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 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#[derive(Clone, Default, PartialEq)]
24195#[non_exhaustive]
24196pub struct UpgradeEvent {
24197 pub resource_type: crate::model::UpgradeResourceType,
24199
24200 pub operation: std::string::String,
24202
24203 pub operation_start_time: std::option::Option<wkt::Timestamp>,
24205
24206 pub current_version: std::string::String,
24208
24209 pub target_version: std::string::String,
24211
24212 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
24285#[non_exhaustive]
24286pub struct UpgradeInfoEvent {
24287 pub resource_type: crate::model::UpgradeResourceType,
24289
24290 pub operation: std::string::String,
24292
24293 pub start_time: std::option::Option<wkt::Timestamp>,
24295
24296 pub end_time: std::option::Option<wkt::Timestamp>,
24298
24299 pub current_version: std::string::String,
24301
24302 pub target_version: std::string::String,
24304
24305 pub resource: std::string::String,
24308
24309 pub state: crate::model::upgrade_info_event::State,
24311
24312 pub standard_support_end_time: std::option::Option<wkt::Timestamp>,
24314
24315 pub extended_support_end_time: std::option::Option<wkt::Timestamp>,
24317
24318 pub description: std::string::String,
24320
24321 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
24468pub mod upgrade_info_event {
24470 #[allow(unused_imports)]
24471 use super::*;
24472
24473 #[derive(Clone, Debug, PartialEq)]
24489 #[non_exhaustive]
24490 pub enum State {
24491 Unspecified,
24493 Started,
24495 Succeeded,
24497 Failed,
24499 Canceled,
24501 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 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 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 #[derive(Clone, Debug, PartialEq)]
24635 #[non_exhaustive]
24636 pub enum EventType {
24637 Unspecified,
24639 EndOfSupport,
24642 CosMilestoneVersionUpdate,
24646 UpgradeLifecycle,
24648 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 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 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#[derive(Clone, Default, PartialEq)]
24767#[non_exhaustive]
24768pub struct UpgradeAvailableEvent {
24769 pub version: std::string::String,
24771
24772 pub resource_type: crate::model::UpgradeResourceType,
24774
24775 pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
24778
24779 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
24840#[non_exhaustive]
24841pub struct SecurityBulletinEvent {
24842 pub resource_type_affected: std::string::String,
24846
24847 pub bulletin_id: std::string::String,
24849
24850 pub cve_ids: std::vec::Vec<std::string::String>,
24852
24853 pub severity: std::string::String,
24855
24856 pub bulletin_uri: std::string::String,
24858
24859 pub brief_description: std::string::String,
24862
24863 pub affected_supported_minors: std::vec::Vec<std::string::String>,
24865
24866 pub patched_versions: std::vec::Vec<std::string::String>,
24868
24869 pub suggested_upgrade_target: std::string::String,
24875
24876 pub manual_steps_required: bool,
24879
24880 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 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 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
24995#[non_exhaustive]
24996pub struct Autopilot {
24997 pub enabled: bool,
24999
25000 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25013 self.enabled = v.into();
25014 self
25015 }
25016
25017 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 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#[derive(Clone, Default, PartialEq)]
25044#[non_exhaustive]
25045pub struct WorkloadPolicyConfig {
25046 pub allow_net_admin: std::option::Option<bool>,
25048
25049 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
25109#[non_exhaustive]
25110pub struct LoggingConfig {
25111 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 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 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#[derive(Clone, Default, PartialEq)]
25149#[non_exhaustive]
25150pub struct LoggingComponentConfig {
25151 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 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
25180pub mod logging_component_config {
25182 #[allow(unused_imports)]
25183 use super::*;
25184
25185 #[derive(Clone, Debug, PartialEq)]
25201 #[non_exhaustive]
25202 pub enum Component {
25203 Unspecified,
25205 SystemComponents,
25207 Workloads,
25209 Apiserver,
25211 Scheduler,
25213 ControllerManager,
25215 KcpSshd,
25217 KcpConnection,
25219 KcpHpa,
25221 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 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 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#[derive(Clone, Default, PartialEq)]
25362#[non_exhaustive]
25363pub struct RayClusterLoggingConfig {
25364 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 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#[derive(Clone, Default, PartialEq)]
25390#[non_exhaustive]
25391pub struct MonitoringConfig {
25392 pub component_config: std::option::Option<crate::model::MonitoringComponentConfig>,
25394
25395 pub managed_prometheus_config: std::option::Option<crate::model::ManagedPrometheusConfig>,
25398
25399 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
25478#[non_exhaustive]
25479pub struct AdvancedDatapathObservabilityConfig {
25480 pub enable_metrics: bool,
25482
25483 pub relay_mode: crate::model::advanced_datapath_observability_config::RelayMode,
25485
25486 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 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 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 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 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
25539pub mod advanced_datapath_observability_config {
25541 #[allow(unused_imports)]
25542 use super::*;
25543
25544 #[derive(Clone, Debug, PartialEq)]
25560 #[non_exhaustive]
25561 pub enum RelayMode {
25562 Unspecified,
25564 Disabled,
25566 InternalVpcLb,
25568 ExternalLb,
25570 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 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 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#[derive(Clone, Default, PartialEq)]
25687#[non_exhaustive]
25688pub struct RayClusterMonitoringConfig {
25689 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 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#[derive(Clone, Default, PartialEq)]
25715#[non_exhaustive]
25716pub struct NodePoolLoggingConfig {
25717 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 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 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#[derive(Clone, Default, PartialEq)]
25755#[non_exhaustive]
25756pub struct LoggingVariantConfig {
25757 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 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
25784pub mod logging_variant_config {
25786 #[allow(unused_imports)]
25787 use super::*;
25788
25789 #[derive(Clone, Debug, PartialEq)]
25805 #[non_exhaustive]
25806 pub enum Variant {
25807 Unspecified,
25809 Default,
25811 MaxThroughput,
25813 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 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 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#[derive(Clone, Default, PartialEq)]
25924#[non_exhaustive]
25925pub struct MonitoringComponentConfig {
25926 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 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
25956pub mod monitoring_component_config {
25958 #[allow(unused_imports)]
25959 use super::*;
25960
25961 #[derive(Clone, Debug, PartialEq)]
25977 #[non_exhaustive]
25978 pub enum Component {
25979 Unspecified,
25981 SystemComponents,
25983 Apiserver,
25985 Scheduler,
25987 ControllerManager,
25989 Storage,
25991 Hpa,
25993 Pod,
25995 Daemonset,
25997 Deployment,
25999 Statefulset,
26001 Cadvisor,
26003 Kubelet,
26005 Dcgm,
26007 Jobset,
26009 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 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 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#[derive(Clone, Default, PartialEq)]
26181#[non_exhaustive]
26182pub struct ManagedPrometheusConfig {
26183 pub enabled: bool,
26185
26186 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 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26199 self.enabled = v.into();
26200 self
26201 }
26202
26203 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 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#[derive(Clone, Default, PartialEq)]
26231#[non_exhaustive]
26232pub struct AutoMonitoringConfig {
26233 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 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
26260pub mod auto_monitoring_config {
26262 #[allow(unused_imports)]
26263 use super::*;
26264
26265 #[derive(Clone, Debug, PartialEq)]
26281 #[non_exhaustive]
26282 pub enum Scope {
26283 Unspecified,
26285 All,
26287 None,
26289 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 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 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#[derive(Clone, Default, PartialEq)]
26401#[non_exhaustive]
26402pub struct PodAutoscaling {
26403 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 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 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
26439pub mod pod_autoscaling {
26441 #[allow(unused_imports)]
26442 use super::*;
26443
26444 #[derive(Clone, Debug, PartialEq)]
26460 #[non_exhaustive]
26461 pub enum HPAProfile {
26462 Unspecified,
26464 None,
26466 Performance,
26470 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 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 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#[derive(Clone, Default, PartialEq)]
26581#[non_exhaustive]
26582pub struct Fleet {
26583 pub project: std::string::String,
26587
26588 pub membership: std::string::String,
26592
26593 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 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 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 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#[derive(Clone, Default, PartialEq)]
26632#[non_exhaustive]
26633pub struct ControlPlaneEndpointsConfig {
26634 pub dns_endpoint_config:
26636 std::option::Option<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
26637
26638 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 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 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 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 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
26693pub mod control_plane_endpoints_config {
26695 #[allow(unused_imports)]
26696 use super::*;
26697
26698 #[derive(Clone, Default, PartialEq)]
26700 #[non_exhaustive]
26701 pub struct DNSEndpointConfig {
26702 pub endpoint: std::string::String,
26710
26711 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 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 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 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 #[derive(Clone, Default, PartialEq)]
26756 #[non_exhaustive]
26757 pub struct IPEndpointsConfig {
26758 pub enabled: std::option::Option<bool>,
26760
26761 pub enable_public_endpoint: std::option::Option<bool>,
26766
26767 pub global_access: std::option::Option<bool>,
26775
26776 pub authorized_networks_config:
26782 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
26783
26784 pub public_endpoint: std::string::String,
26787
26788 pub private_endpoint: std::string::String,
26791
26792 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 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 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
26920#[non_exhaustive]
26921pub struct LocalNvmeSsdBlockConfig {
26922 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 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#[derive(Clone, Default, PartialEq)]
26965#[non_exhaustive]
26966pub struct EphemeralStorageLocalSsdConfig {
26967 pub local_ssd_count: i32,
26987
26988 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 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 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#[derive(Clone, Default, PartialEq)]
27025#[non_exhaustive]
27026pub struct ResourceManagerTags {
27027 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 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#[derive(Clone, Default, PartialEq)]
27063#[non_exhaustive]
27064pub struct EnterpriseConfig {
27065 pub cluster_tier: crate::model::enterprise_config::ClusterTier,
27067
27068 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 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 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
27104pub mod enterprise_config {
27106 #[allow(unused_imports)]
27107 use super::*;
27108
27109 #[derive(Clone, Debug, PartialEq)]
27125 #[non_exhaustive]
27126 pub enum ClusterTier {
27127 Unspecified,
27129 Standard,
27131 Enterprise,
27133 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 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 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#[derive(Clone, Default, PartialEq)]
27244#[non_exhaustive]
27245pub struct SecretManagerConfig {
27246 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 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 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#[derive(Clone, Default, PartialEq)]
27284#[non_exhaustive]
27285pub struct BootDisk {
27286 pub disk_type: std::string::String,
27289
27290 pub size_gb: i64,
27292
27293 pub provisioned_iops: i64,
27295
27296 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
27341#[non_exhaustive]
27342pub struct SecondaryBootDisk {
27343 pub mode: crate::model::secondary_boot_disk::Mode,
27345
27346 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 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 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
27379pub mod secondary_boot_disk {
27381 #[allow(unused_imports)]
27382 use super::*;
27383
27384 #[derive(Clone, Debug, PartialEq)]
27401 #[non_exhaustive]
27402 pub enum Mode {
27403 Unspecified,
27405 ContainerImageCache,
27408 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 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 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#[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#[derive(Clone, Default, PartialEq)]
27534#[non_exhaustive]
27535pub struct FetchClusterUpgradeInfoRequest {
27536 pub name: std::string::String,
27540
27541 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 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 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#[derive(Clone, Default, PartialEq)]
27573#[non_exhaustive]
27574pub struct ClusterUpgradeInfo {
27575 pub minor_target_version: std::option::Option<std::string::String>,
27577
27578 pub patch_target_version: std::option::Option<std::string::String>,
27580
27581 pub auto_upgrade_status: std::vec::Vec<crate::model::cluster_upgrade_info::AutoUpgradeStatus>,
27583
27584 pub paused_reason: std::vec::Vec<crate::model::cluster_upgrade_info::AutoUpgradePausedReason>,
27586
27587 pub upgrade_details: std::vec::Vec<crate::model::UpgradeDetails>,
27589
27590 pub end_of_standard_support_timestamp: std::option::Option<std::string::String>,
27592
27593 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 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 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 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 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 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 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 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 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 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 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 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
27722pub mod cluster_upgrade_info {
27724 #[allow(unused_imports)]
27725 use super::*;
27726
27727 #[derive(Clone, Debug, PartialEq)]
27743 #[non_exhaustive]
27744 pub enum AutoUpgradeStatus {
27745 Unknown,
27747 Active,
27749 MinorUpgradePaused,
27752 UpgradePaused,
27754 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 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 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 #[derive(Clone, Debug, PartialEq)]
27884 #[non_exhaustive]
27885 pub enum AutoUpgradePausedReason {
27886 Unspecified,
27888 MaintenanceWindow,
27891 MaintenanceExclusionNoUpgrades,
27894 MaintenanceExclusionNoMinorUpgrades,
27897 ClusterDisruptionBudget,
27900 ClusterDisruptionBudgetMinorUpgrade,
27903 SystemConfig,
27905 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 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 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#[derive(Clone, Default, PartialEq)]
28053#[non_exhaustive]
28054pub struct UpgradeDetails {
28055 pub state: crate::model::upgrade_details::State,
28057
28058 pub start_time: std::option::Option<wkt::Timestamp>,
28060
28061 pub end_time: std::option::Option<wkt::Timestamp>,
28063
28064 pub initial_version: std::string::String,
28066
28067 pub target_version: std::string::String,
28069
28070 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 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 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 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 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 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 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 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 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
28154pub mod upgrade_details {
28156 #[allow(unused_imports)]
28157 use super::*;
28158
28159 #[derive(Clone, Debug, PartialEq)]
28175 #[non_exhaustive]
28176 pub enum State {
28177 Unknown,
28179 Failed,
28181 Succeeded,
28183 Canceled,
28185 Running,
28187 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 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 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 #[derive(Clone, Debug, PartialEq)]
28321 #[non_exhaustive]
28322 pub enum StartType {
28323 Unspecified,
28325 Automatic,
28327 Manual,
28329 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 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 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#[derive(Clone, Default, PartialEq)]
28441#[non_exhaustive]
28442pub struct FetchNodePoolUpgradeInfoRequest {
28443 pub name: std::string::String,
28448
28449 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 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 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#[derive(Clone, Default, PartialEq)]
28481#[non_exhaustive]
28482pub struct NodePoolUpgradeInfo {
28483 pub minor_target_version: std::option::Option<std::string::String>,
28485
28486 pub patch_target_version: std::option::Option<std::string::String>,
28488
28489 pub auto_upgrade_status: std::vec::Vec<crate::model::node_pool_upgrade_info::AutoUpgradeStatus>,
28491
28492 pub paused_reason: std::vec::Vec<crate::model::node_pool_upgrade_info::AutoUpgradePausedReason>,
28494
28495 pub upgrade_details: std::vec::Vec<crate::model::UpgradeDetails>,
28497
28498 pub end_of_standard_support_timestamp: std::option::Option<std::string::String>,
28500
28501 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 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 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 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 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 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 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 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 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 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 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 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
28630pub mod node_pool_upgrade_info {
28632 #[allow(unused_imports)]
28633 use super::*;
28634
28635 #[derive(Clone, Debug, PartialEq)]
28651 #[non_exhaustive]
28652 pub enum AutoUpgradeStatus {
28653 Unknown,
28655 Active,
28657 MinorUpgradePaused,
28660 UpgradePaused,
28662 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 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 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 #[derive(Clone, Debug, PartialEq)]
28792 #[non_exhaustive]
28793 pub enum AutoUpgradePausedReason {
28794 Unspecified,
28796 MaintenanceWindow,
28799 MaintenanceExclusionNoUpgrades,
28802 MaintenanceExclusionNoMinorUpgrades,
28805 SystemConfig,
28807 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 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 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#[derive(Clone, Default, PartialEq)]
28938#[non_exhaustive]
28939pub struct GkeAutoUpgradeConfig {
28940 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 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
28970pub mod gke_auto_upgrade_config {
28972 #[allow(unused_imports)]
28973 use super::*;
28974
28975 #[derive(Clone, Debug, PartialEq)]
28992 #[non_exhaustive]
28993 pub enum PatchMode {
28994 Unspecified,
28998 Accelerated,
29001 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 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 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#[derive(Clone, Debug, PartialEq)]
29122#[non_exhaustive]
29123pub enum PrivateIPv6GoogleAccess {
29124 PrivateIpv6GoogleAccessUnspecified,
29126 PrivateIpv6GoogleAccessDisabled,
29128 PrivateIpv6GoogleAccessToGoogle,
29130 PrivateIpv6GoogleAccessBidirectional,
29132 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 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 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#[derive(Clone, Debug, PartialEq)]
29272#[non_exhaustive]
29273pub enum UpgradeResourceType {
29274 Unspecified,
29276 Master,
29278 NodePool,
29280 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 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 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#[derive(Clone, Debug, PartialEq)]
29405#[non_exhaustive]
29406pub enum DatapathProvider {
29407 Unspecified,
29409 LegacyDatapath,
29411 AdvancedDatapath,
29416 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 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 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#[derive(Clone, Debug, PartialEq)]
29540#[non_exhaustive]
29541pub enum NodePoolUpdateStrategy {
29542 Unspecified,
29545 BlueGreen,
29547 Surge,
29550 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 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 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#[derive(Clone, Debug, PartialEq)]
29674#[non_exhaustive]
29675pub enum StackType {
29676 Unspecified,
29678 Ipv4,
29680 Ipv4Ipv6,
29682 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 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 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#[derive(Clone, Debug, PartialEq)]
29806#[non_exhaustive]
29807pub enum IPv6AccessType {
29808 Ipv6AccessTypeUnspecified,
29810 Internal,
29812 External,
29814 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 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 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#[derive(Clone, Debug, PartialEq)]
29940#[non_exhaustive]
29941pub enum InTransitEncryptionConfig {
29942 Unspecified,
29945 InTransitEncryptionDisabled,
29947 InTransitEncryptionInterNodeTransparent,
29949 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 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 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}