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 node_kernel_module_loading:
115 std::option::Option<crate::model::linux_node_config::NodeKernelModuleLoading>,
116
117 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
118}
119
120impl LinuxNodeConfig {
121 pub fn new() -> Self {
122 std::default::Default::default()
123 }
124
125 pub fn set_sysctls<T, K, V>(mut self, v: T) -> Self
127 where
128 T: std::iter::IntoIterator<Item = (K, V)>,
129 K: std::convert::Into<std::string::String>,
130 V: std::convert::Into<std::string::String>,
131 {
132 use std::iter::Iterator;
133 self.sysctls = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
134 self
135 }
136
137 pub fn set_cgroup_mode<T: std::convert::Into<crate::model::linux_node_config::CgroupMode>>(
139 mut self,
140 v: T,
141 ) -> Self {
142 self.cgroup_mode = v.into();
143 self
144 }
145
146 pub fn set_hugepages<T>(mut self, v: T) -> Self
148 where
149 T: std::convert::Into<crate::model::linux_node_config::HugepagesConfig>,
150 {
151 self.hugepages = std::option::Option::Some(v.into());
152 self
153 }
154
155 pub fn set_or_clear_hugepages<T>(mut self, v: std::option::Option<T>) -> Self
157 where
158 T: std::convert::Into<crate::model::linux_node_config::HugepagesConfig>,
159 {
160 self.hugepages = v.map(|x| x.into());
161 self
162 }
163
164 pub fn set_transparent_hugepage_enabled<
166 T: std::convert::Into<crate::model::linux_node_config::TransparentHugepageEnabled>,
167 >(
168 mut self,
169 v: T,
170 ) -> Self {
171 self.transparent_hugepage_enabled = v.into();
172 self
173 }
174
175 pub fn set_transparent_hugepage_defrag<
177 T: std::convert::Into<crate::model::linux_node_config::TransparentHugepageDefrag>,
178 >(
179 mut self,
180 v: T,
181 ) -> Self {
182 self.transparent_hugepage_defrag = v.into();
183 self
184 }
185
186 pub fn set_node_kernel_module_loading<T>(mut self, v: T) -> Self
188 where
189 T: std::convert::Into<crate::model::linux_node_config::NodeKernelModuleLoading>,
190 {
191 self.node_kernel_module_loading = std::option::Option::Some(v.into());
192 self
193 }
194
195 pub fn set_or_clear_node_kernel_module_loading<T>(mut self, v: std::option::Option<T>) -> Self
197 where
198 T: std::convert::Into<crate::model::linux_node_config::NodeKernelModuleLoading>,
199 {
200 self.node_kernel_module_loading = v.map(|x| x.into());
201 self
202 }
203}
204
205impl wkt::message::Message for LinuxNodeConfig {
206 fn typename() -> &'static str {
207 "type.googleapis.com/google.container.v1.LinuxNodeConfig"
208 }
209}
210
211pub mod linux_node_config {
213 #[allow(unused_imports)]
214 use super::*;
215
216 #[derive(Clone, Default, PartialEq)]
218 #[non_exhaustive]
219 pub struct HugepagesConfig {
220 pub hugepage_size2m: std::option::Option<i32>,
222
223 pub hugepage_size1g: std::option::Option<i32>,
225
226 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
227 }
228
229 impl HugepagesConfig {
230 pub fn new() -> Self {
231 std::default::Default::default()
232 }
233
234 pub fn set_hugepage_size2m<T>(mut self, v: T) -> Self
236 where
237 T: std::convert::Into<i32>,
238 {
239 self.hugepage_size2m = std::option::Option::Some(v.into());
240 self
241 }
242
243 pub fn set_or_clear_hugepage_size2m<T>(mut self, v: std::option::Option<T>) -> Self
245 where
246 T: std::convert::Into<i32>,
247 {
248 self.hugepage_size2m = v.map(|x| x.into());
249 self
250 }
251
252 pub fn set_hugepage_size1g<T>(mut self, v: T) -> Self
254 where
255 T: std::convert::Into<i32>,
256 {
257 self.hugepage_size1g = std::option::Option::Some(v.into());
258 self
259 }
260
261 pub fn set_or_clear_hugepage_size1g<T>(mut self, v: std::option::Option<T>) -> Self
263 where
264 T: std::convert::Into<i32>,
265 {
266 self.hugepage_size1g = v.map(|x| x.into());
267 self
268 }
269 }
270
271 impl wkt::message::Message for HugepagesConfig {
272 fn typename() -> &'static str {
273 "type.googleapis.com/google.container.v1.LinuxNodeConfig.HugepagesConfig"
274 }
275 }
276
277 #[derive(Clone, Default, PartialEq)]
279 #[non_exhaustive]
280 pub struct NodeKernelModuleLoading {
281 pub policy: crate::model::linux_node_config::node_kernel_module_loading::Policy,
283
284 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
285 }
286
287 impl NodeKernelModuleLoading {
288 pub fn new() -> Self {
289 std::default::Default::default()
290 }
291
292 pub fn set_policy<
294 T: std::convert::Into<crate::model::linux_node_config::node_kernel_module_loading::Policy>,
295 >(
296 mut self,
297 v: T,
298 ) -> Self {
299 self.policy = v.into();
300 self
301 }
302 }
303
304 impl wkt::message::Message for NodeKernelModuleLoading {
305 fn typename() -> &'static str {
306 "type.googleapis.com/google.container.v1.LinuxNodeConfig.NodeKernelModuleLoading"
307 }
308 }
309
310 pub mod node_kernel_module_loading {
312 #[allow(unused_imports)]
313 use super::*;
314
315 #[derive(Clone, Debug, PartialEq)]
331 #[non_exhaustive]
332 pub enum Policy {
333 Unspecified,
339 EnforceSignedModules,
345 DoNotEnforceSignedModules,
351 UnknownValue(policy::UnknownValue),
356 }
357
358 #[doc(hidden)]
359 pub mod policy {
360 #[allow(unused_imports)]
361 use super::*;
362 #[derive(Clone, Debug, PartialEq)]
363 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
364 }
365
366 impl Policy {
367 pub fn value(&self) -> std::option::Option<i32> {
372 match self {
373 Self::Unspecified => std::option::Option::Some(0),
374 Self::EnforceSignedModules => std::option::Option::Some(1),
375 Self::DoNotEnforceSignedModules => std::option::Option::Some(2),
376 Self::UnknownValue(u) => u.0.value(),
377 }
378 }
379
380 pub fn name(&self) -> std::option::Option<&str> {
385 match self {
386 Self::Unspecified => std::option::Option::Some("POLICY_UNSPECIFIED"),
387 Self::EnforceSignedModules => {
388 std::option::Option::Some("ENFORCE_SIGNED_MODULES")
389 }
390 Self::DoNotEnforceSignedModules => {
391 std::option::Option::Some("DO_NOT_ENFORCE_SIGNED_MODULES")
392 }
393 Self::UnknownValue(u) => u.0.name(),
394 }
395 }
396 }
397
398 impl std::default::Default for Policy {
399 fn default() -> Self {
400 use std::convert::From;
401 Self::from(0)
402 }
403 }
404
405 impl std::fmt::Display for Policy {
406 fn fmt(
407 &self,
408 f: &mut std::fmt::Formatter<'_>,
409 ) -> std::result::Result<(), std::fmt::Error> {
410 wkt::internal::display_enum(f, self.name(), self.value())
411 }
412 }
413
414 impl std::convert::From<i32> for Policy {
415 fn from(value: i32) -> Self {
416 match value {
417 0 => Self::Unspecified,
418 1 => Self::EnforceSignedModules,
419 2 => Self::DoNotEnforceSignedModules,
420 _ => Self::UnknownValue(policy::UnknownValue(
421 wkt::internal::UnknownEnumValue::Integer(value),
422 )),
423 }
424 }
425 }
426
427 impl std::convert::From<&str> for Policy {
428 fn from(value: &str) -> Self {
429 use std::string::ToString;
430 match value {
431 "POLICY_UNSPECIFIED" => Self::Unspecified,
432 "ENFORCE_SIGNED_MODULES" => Self::EnforceSignedModules,
433 "DO_NOT_ENFORCE_SIGNED_MODULES" => Self::DoNotEnforceSignedModules,
434 _ => Self::UnknownValue(policy::UnknownValue(
435 wkt::internal::UnknownEnumValue::String(value.to_string()),
436 )),
437 }
438 }
439 }
440
441 impl serde::ser::Serialize for Policy {
442 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
443 where
444 S: serde::Serializer,
445 {
446 match self {
447 Self::Unspecified => serializer.serialize_i32(0),
448 Self::EnforceSignedModules => serializer.serialize_i32(1),
449 Self::DoNotEnforceSignedModules => serializer.serialize_i32(2),
450 Self::UnknownValue(u) => u.0.serialize(serializer),
451 }
452 }
453 }
454
455 impl<'de> serde::de::Deserialize<'de> for Policy {
456 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
457 where
458 D: serde::Deserializer<'de>,
459 {
460 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Policy>::new(
461 ".google.container.v1.LinuxNodeConfig.NodeKernelModuleLoading.Policy",
462 ))
463 }
464 }
465 }
466
467 #[derive(Clone, Debug, PartialEq)]
483 #[non_exhaustive]
484 pub enum CgroupMode {
485 Unspecified,
488 V1,
491 V2,
494 UnknownValue(cgroup_mode::UnknownValue),
499 }
500
501 #[doc(hidden)]
502 pub mod cgroup_mode {
503 #[allow(unused_imports)]
504 use super::*;
505 #[derive(Clone, Debug, PartialEq)]
506 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
507 }
508
509 impl CgroupMode {
510 pub fn value(&self) -> std::option::Option<i32> {
515 match self {
516 Self::Unspecified => std::option::Option::Some(0),
517 Self::V1 => std::option::Option::Some(1),
518 Self::V2 => std::option::Option::Some(2),
519 Self::UnknownValue(u) => u.0.value(),
520 }
521 }
522
523 pub fn name(&self) -> std::option::Option<&str> {
528 match self {
529 Self::Unspecified => std::option::Option::Some("CGROUP_MODE_UNSPECIFIED"),
530 Self::V1 => std::option::Option::Some("CGROUP_MODE_V1"),
531 Self::V2 => std::option::Option::Some("CGROUP_MODE_V2"),
532 Self::UnknownValue(u) => u.0.name(),
533 }
534 }
535 }
536
537 impl std::default::Default for CgroupMode {
538 fn default() -> Self {
539 use std::convert::From;
540 Self::from(0)
541 }
542 }
543
544 impl std::fmt::Display for CgroupMode {
545 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
546 wkt::internal::display_enum(f, self.name(), self.value())
547 }
548 }
549
550 impl std::convert::From<i32> for CgroupMode {
551 fn from(value: i32) -> Self {
552 match value {
553 0 => Self::Unspecified,
554 1 => Self::V1,
555 2 => Self::V2,
556 _ => Self::UnknownValue(cgroup_mode::UnknownValue(
557 wkt::internal::UnknownEnumValue::Integer(value),
558 )),
559 }
560 }
561 }
562
563 impl std::convert::From<&str> for CgroupMode {
564 fn from(value: &str) -> Self {
565 use std::string::ToString;
566 match value {
567 "CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
568 "CGROUP_MODE_V1" => Self::V1,
569 "CGROUP_MODE_V2" => Self::V2,
570 _ => Self::UnknownValue(cgroup_mode::UnknownValue(
571 wkt::internal::UnknownEnumValue::String(value.to_string()),
572 )),
573 }
574 }
575 }
576
577 impl serde::ser::Serialize for CgroupMode {
578 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
579 where
580 S: serde::Serializer,
581 {
582 match self {
583 Self::Unspecified => serializer.serialize_i32(0),
584 Self::V1 => serializer.serialize_i32(1),
585 Self::V2 => serializer.serialize_i32(2),
586 Self::UnknownValue(u) => u.0.serialize(serializer),
587 }
588 }
589 }
590
591 impl<'de> serde::de::Deserialize<'de> for CgroupMode {
592 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
593 where
594 D: serde::Deserializer<'de>,
595 {
596 deserializer.deserialize_any(wkt::internal::EnumVisitor::<CgroupMode>::new(
597 ".google.container.v1.LinuxNodeConfig.CgroupMode",
598 ))
599 }
600 }
601
602 #[derive(Clone, Debug, PartialEq)]
618 #[non_exhaustive]
619 pub enum TransparentHugepageEnabled {
620 Unspecified,
622 Always,
624 Madvise,
627 Never,
629 UnknownValue(transparent_hugepage_enabled::UnknownValue),
634 }
635
636 #[doc(hidden)]
637 pub mod transparent_hugepage_enabled {
638 #[allow(unused_imports)]
639 use super::*;
640 #[derive(Clone, Debug, PartialEq)]
641 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
642 }
643
644 impl TransparentHugepageEnabled {
645 pub fn value(&self) -> std::option::Option<i32> {
650 match self {
651 Self::Unspecified => std::option::Option::Some(0),
652 Self::Always => std::option::Option::Some(1),
653 Self::Madvise => std::option::Option::Some(2),
654 Self::Never => std::option::Option::Some(3),
655 Self::UnknownValue(u) => u.0.value(),
656 }
657 }
658
659 pub fn name(&self) -> std::option::Option<&str> {
664 match self {
665 Self::Unspecified => {
666 std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED")
667 }
668 Self::Always => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS"),
669 Self::Madvise => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_MADVISE"),
670 Self::Never => std::option::Option::Some("TRANSPARENT_HUGEPAGE_ENABLED_NEVER"),
671 Self::UnknownValue(u) => u.0.name(),
672 }
673 }
674 }
675
676 impl std::default::Default for TransparentHugepageEnabled {
677 fn default() -> Self {
678 use std::convert::From;
679 Self::from(0)
680 }
681 }
682
683 impl std::fmt::Display for TransparentHugepageEnabled {
684 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
685 wkt::internal::display_enum(f, self.name(), self.value())
686 }
687 }
688
689 impl std::convert::From<i32> for TransparentHugepageEnabled {
690 fn from(value: i32) -> Self {
691 match value {
692 0 => Self::Unspecified,
693 1 => Self::Always,
694 2 => Self::Madvise,
695 3 => Self::Never,
696 _ => Self::UnknownValue(transparent_hugepage_enabled::UnknownValue(
697 wkt::internal::UnknownEnumValue::Integer(value),
698 )),
699 }
700 }
701 }
702
703 impl std::convert::From<&str> for TransparentHugepageEnabled {
704 fn from(value: &str) -> Self {
705 use std::string::ToString;
706 match value {
707 "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED" => Self::Unspecified,
708 "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS" => Self::Always,
709 "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE" => Self::Madvise,
710 "TRANSPARENT_HUGEPAGE_ENABLED_NEVER" => Self::Never,
711 _ => Self::UnknownValue(transparent_hugepage_enabled::UnknownValue(
712 wkt::internal::UnknownEnumValue::String(value.to_string()),
713 )),
714 }
715 }
716 }
717
718 impl serde::ser::Serialize for TransparentHugepageEnabled {
719 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
720 where
721 S: serde::Serializer,
722 {
723 match self {
724 Self::Unspecified => serializer.serialize_i32(0),
725 Self::Always => serializer.serialize_i32(1),
726 Self::Madvise => serializer.serialize_i32(2),
727 Self::Never => serializer.serialize_i32(3),
728 Self::UnknownValue(u) => u.0.serialize(serializer),
729 }
730 }
731 }
732
733 impl<'de> serde::de::Deserialize<'de> for TransparentHugepageEnabled {
734 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
735 where
736 D: serde::Deserializer<'de>,
737 {
738 deserializer.deserialize_any(
739 wkt::internal::EnumVisitor::<TransparentHugepageEnabled>::new(
740 ".google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled",
741 ),
742 )
743 }
744 }
745
746 #[derive(Clone, Debug, PartialEq)]
762 #[non_exhaustive]
763 pub enum TransparentHugepageDefrag {
764 Unspecified,
766 Always,
770 Defer,
775 DeferWithMadvise,
781 Madvise,
785 Never,
788 UnknownValue(transparent_hugepage_defrag::UnknownValue),
793 }
794
795 #[doc(hidden)]
796 pub mod transparent_hugepage_defrag {
797 #[allow(unused_imports)]
798 use super::*;
799 #[derive(Clone, Debug, PartialEq)]
800 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
801 }
802
803 impl TransparentHugepageDefrag {
804 pub fn value(&self) -> std::option::Option<i32> {
809 match self {
810 Self::Unspecified => std::option::Option::Some(0),
811 Self::Always => std::option::Option::Some(1),
812 Self::Defer => std::option::Option::Some(2),
813 Self::DeferWithMadvise => std::option::Option::Some(3),
814 Self::Madvise => std::option::Option::Some(4),
815 Self::Never => std::option::Option::Some(5),
816 Self::UnknownValue(u) => u.0.value(),
817 }
818 }
819
820 pub fn name(&self) -> std::option::Option<&str> {
825 match self {
826 Self::Unspecified => {
827 std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED")
828 }
829 Self::Always => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS"),
830 Self::Defer => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_DEFER"),
831 Self::DeferWithMadvise => {
832 std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE")
833 }
834 Self::Madvise => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE"),
835 Self::Never => std::option::Option::Some("TRANSPARENT_HUGEPAGE_DEFRAG_NEVER"),
836 Self::UnknownValue(u) => u.0.name(),
837 }
838 }
839 }
840
841 impl std::default::Default for TransparentHugepageDefrag {
842 fn default() -> Self {
843 use std::convert::From;
844 Self::from(0)
845 }
846 }
847
848 impl std::fmt::Display for TransparentHugepageDefrag {
849 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
850 wkt::internal::display_enum(f, self.name(), self.value())
851 }
852 }
853
854 impl std::convert::From<i32> for TransparentHugepageDefrag {
855 fn from(value: i32) -> Self {
856 match value {
857 0 => Self::Unspecified,
858 1 => Self::Always,
859 2 => Self::Defer,
860 3 => Self::DeferWithMadvise,
861 4 => Self::Madvise,
862 5 => Self::Never,
863 _ => Self::UnknownValue(transparent_hugepage_defrag::UnknownValue(
864 wkt::internal::UnknownEnumValue::Integer(value),
865 )),
866 }
867 }
868 }
869
870 impl std::convert::From<&str> for TransparentHugepageDefrag {
871 fn from(value: &str) -> Self {
872 use std::string::ToString;
873 match value {
874 "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED" => Self::Unspecified,
875 "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS" => Self::Always,
876 "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER" => Self::Defer,
877 "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE" => Self::DeferWithMadvise,
878 "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE" => Self::Madvise,
879 "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER" => Self::Never,
880 _ => Self::UnknownValue(transparent_hugepage_defrag::UnknownValue(
881 wkt::internal::UnknownEnumValue::String(value.to_string()),
882 )),
883 }
884 }
885 }
886
887 impl serde::ser::Serialize for TransparentHugepageDefrag {
888 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
889 where
890 S: serde::Serializer,
891 {
892 match self {
893 Self::Unspecified => serializer.serialize_i32(0),
894 Self::Always => serializer.serialize_i32(1),
895 Self::Defer => serializer.serialize_i32(2),
896 Self::DeferWithMadvise => serializer.serialize_i32(3),
897 Self::Madvise => serializer.serialize_i32(4),
898 Self::Never => serializer.serialize_i32(5),
899 Self::UnknownValue(u) => u.0.serialize(serializer),
900 }
901 }
902 }
903
904 impl<'de> serde::de::Deserialize<'de> for TransparentHugepageDefrag {
905 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
906 where
907 D: serde::Deserializer<'de>,
908 {
909 deserializer.deserialize_any(
910 wkt::internal::EnumVisitor::<TransparentHugepageDefrag>::new(
911 ".google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag",
912 ),
913 )
914 }
915 }
916}
917
918#[derive(Clone, Default, PartialEq)]
922#[non_exhaustive]
923pub struct WindowsNodeConfig {
924 pub os_version: crate::model::windows_node_config::OSVersion,
926
927 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
928}
929
930impl WindowsNodeConfig {
931 pub fn new() -> Self {
932 std::default::Default::default()
933 }
934
935 pub fn set_os_version<T: std::convert::Into<crate::model::windows_node_config::OSVersion>>(
937 mut self,
938 v: T,
939 ) -> Self {
940 self.os_version = v.into();
941 self
942 }
943}
944
945impl wkt::message::Message for WindowsNodeConfig {
946 fn typename() -> &'static str {
947 "type.googleapis.com/google.container.v1.WindowsNodeConfig"
948 }
949}
950
951pub mod windows_node_config {
953 #[allow(unused_imports)]
954 use super::*;
955
956 #[derive(Clone, Debug, PartialEq)]
972 #[non_exhaustive]
973 pub enum OSVersion {
974 Unspecified,
976 Ltsc2019,
978 Ltsc2022,
980 UnknownValue(os_version::UnknownValue),
985 }
986
987 #[doc(hidden)]
988 pub mod os_version {
989 #[allow(unused_imports)]
990 use super::*;
991 #[derive(Clone, Debug, PartialEq)]
992 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
993 }
994
995 impl OSVersion {
996 pub fn value(&self) -> std::option::Option<i32> {
1001 match self {
1002 Self::Unspecified => std::option::Option::Some(0),
1003 Self::Ltsc2019 => std::option::Option::Some(1),
1004 Self::Ltsc2022 => std::option::Option::Some(2),
1005 Self::UnknownValue(u) => u.0.value(),
1006 }
1007 }
1008
1009 pub fn name(&self) -> std::option::Option<&str> {
1014 match self {
1015 Self::Unspecified => std::option::Option::Some("OS_VERSION_UNSPECIFIED"),
1016 Self::Ltsc2019 => std::option::Option::Some("OS_VERSION_LTSC2019"),
1017 Self::Ltsc2022 => std::option::Option::Some("OS_VERSION_LTSC2022"),
1018 Self::UnknownValue(u) => u.0.name(),
1019 }
1020 }
1021 }
1022
1023 impl std::default::Default for OSVersion {
1024 fn default() -> Self {
1025 use std::convert::From;
1026 Self::from(0)
1027 }
1028 }
1029
1030 impl std::fmt::Display for OSVersion {
1031 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1032 wkt::internal::display_enum(f, self.name(), self.value())
1033 }
1034 }
1035
1036 impl std::convert::From<i32> for OSVersion {
1037 fn from(value: i32) -> Self {
1038 match value {
1039 0 => Self::Unspecified,
1040 1 => Self::Ltsc2019,
1041 2 => Self::Ltsc2022,
1042 _ => Self::UnknownValue(os_version::UnknownValue(
1043 wkt::internal::UnknownEnumValue::Integer(value),
1044 )),
1045 }
1046 }
1047 }
1048
1049 impl std::convert::From<&str> for OSVersion {
1050 fn from(value: &str) -> Self {
1051 use std::string::ToString;
1052 match value {
1053 "OS_VERSION_UNSPECIFIED" => Self::Unspecified,
1054 "OS_VERSION_LTSC2019" => Self::Ltsc2019,
1055 "OS_VERSION_LTSC2022" => Self::Ltsc2022,
1056 _ => Self::UnknownValue(os_version::UnknownValue(
1057 wkt::internal::UnknownEnumValue::String(value.to_string()),
1058 )),
1059 }
1060 }
1061 }
1062
1063 impl serde::ser::Serialize for OSVersion {
1064 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1065 where
1066 S: serde::Serializer,
1067 {
1068 match self {
1069 Self::Unspecified => serializer.serialize_i32(0),
1070 Self::Ltsc2019 => serializer.serialize_i32(1),
1071 Self::Ltsc2022 => serializer.serialize_i32(2),
1072 Self::UnknownValue(u) => u.0.serialize(serializer),
1073 }
1074 }
1075 }
1076
1077 impl<'de> serde::de::Deserialize<'de> for OSVersion {
1078 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1079 where
1080 D: serde::Deserializer<'de>,
1081 {
1082 deserializer.deserialize_any(wkt::internal::EnumVisitor::<OSVersion>::new(
1083 ".google.container.v1.WindowsNodeConfig.OSVersion",
1084 ))
1085 }
1086 }
1087}
1088
1089#[derive(Clone, Default, PartialEq)]
1091#[non_exhaustive]
1092pub struct NodeKubeletConfig {
1093 pub cpu_manager_policy: std::string::String,
1104
1105 pub topology_manager: std::option::Option<crate::model::TopologyManager>,
1109
1110 pub memory_manager: std::option::Option<crate::model::MemoryManager>,
1114
1115 pub cpu_cfs_quota: std::option::Option<wkt::BoolValue>,
1127
1128 pub cpu_cfs_quota_period: std::string::String,
1135
1136 pub pod_pids_limit: i64,
1142
1143 pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
1145
1146 pub image_gc_low_threshold_percent: i32,
1155
1156 pub image_gc_high_threshold_percent: i32,
1165
1166 pub image_minimum_gc_age: std::string::String,
1177
1178 pub image_maximum_gc_age: std::string::String,
1190
1191 pub container_log_max_size: std::string::String,
1205
1206 pub container_log_max_files: i32,
1213
1214 pub allowed_unsafe_sysctls: std::vec::Vec<std::string::String>,
1228
1229 pub eviction_soft: std::option::Option<crate::model::EvictionSignals>,
1233
1234 pub eviction_soft_grace_period: std::option::Option<crate::model::EvictionGracePeriod>,
1239
1240 pub eviction_minimum_reclaim: std::option::Option<crate::model::EvictionMinimumReclaim>,
1245
1246 pub eviction_max_pod_grace_period_seconds: i32,
1252
1253 pub max_parallel_image_pulls: i32,
1261
1262 pub single_process_oom_kill: std::option::Option<bool>,
1267
1268 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1269}
1270
1271impl NodeKubeletConfig {
1272 pub fn new() -> Self {
1273 std::default::Default::default()
1274 }
1275
1276 pub fn set_cpu_manager_policy<T: std::convert::Into<std::string::String>>(
1278 mut self,
1279 v: T,
1280 ) -> Self {
1281 self.cpu_manager_policy = v.into();
1282 self
1283 }
1284
1285 pub fn set_topology_manager<T>(mut self, v: T) -> Self
1287 where
1288 T: std::convert::Into<crate::model::TopologyManager>,
1289 {
1290 self.topology_manager = std::option::Option::Some(v.into());
1291 self
1292 }
1293
1294 pub fn set_or_clear_topology_manager<T>(mut self, v: std::option::Option<T>) -> Self
1296 where
1297 T: std::convert::Into<crate::model::TopologyManager>,
1298 {
1299 self.topology_manager = v.map(|x| x.into());
1300 self
1301 }
1302
1303 pub fn set_memory_manager<T>(mut self, v: T) -> Self
1305 where
1306 T: std::convert::Into<crate::model::MemoryManager>,
1307 {
1308 self.memory_manager = std::option::Option::Some(v.into());
1309 self
1310 }
1311
1312 pub fn set_or_clear_memory_manager<T>(mut self, v: std::option::Option<T>) -> Self
1314 where
1315 T: std::convert::Into<crate::model::MemoryManager>,
1316 {
1317 self.memory_manager = v.map(|x| x.into());
1318 self
1319 }
1320
1321 pub fn set_cpu_cfs_quota<T>(mut self, v: T) -> Self
1323 where
1324 T: std::convert::Into<wkt::BoolValue>,
1325 {
1326 self.cpu_cfs_quota = std::option::Option::Some(v.into());
1327 self
1328 }
1329
1330 pub fn set_or_clear_cpu_cfs_quota<T>(mut self, v: std::option::Option<T>) -> Self
1332 where
1333 T: std::convert::Into<wkt::BoolValue>,
1334 {
1335 self.cpu_cfs_quota = v.map(|x| x.into());
1336 self
1337 }
1338
1339 pub fn set_cpu_cfs_quota_period<T: std::convert::Into<std::string::String>>(
1341 mut self,
1342 v: T,
1343 ) -> Self {
1344 self.cpu_cfs_quota_period = v.into();
1345 self
1346 }
1347
1348 pub fn set_pod_pids_limit<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1350 self.pod_pids_limit = v.into();
1351 self
1352 }
1353
1354 pub fn set_insecure_kubelet_readonly_port_enabled<T>(mut self, v: T) -> Self
1356 where
1357 T: std::convert::Into<bool>,
1358 {
1359 self.insecure_kubelet_readonly_port_enabled = std::option::Option::Some(v.into());
1360 self
1361 }
1362
1363 pub fn set_or_clear_insecure_kubelet_readonly_port_enabled<T>(
1365 mut self,
1366 v: std::option::Option<T>,
1367 ) -> Self
1368 where
1369 T: std::convert::Into<bool>,
1370 {
1371 self.insecure_kubelet_readonly_port_enabled = v.map(|x| x.into());
1372 self
1373 }
1374
1375 pub fn set_image_gc_low_threshold_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1377 self.image_gc_low_threshold_percent = v.into();
1378 self
1379 }
1380
1381 pub fn set_image_gc_high_threshold_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1383 self.image_gc_high_threshold_percent = v.into();
1384 self
1385 }
1386
1387 pub fn set_image_minimum_gc_age<T: std::convert::Into<std::string::String>>(
1389 mut self,
1390 v: T,
1391 ) -> Self {
1392 self.image_minimum_gc_age = v.into();
1393 self
1394 }
1395
1396 pub fn set_image_maximum_gc_age<T: std::convert::Into<std::string::String>>(
1398 mut self,
1399 v: T,
1400 ) -> Self {
1401 self.image_maximum_gc_age = v.into();
1402 self
1403 }
1404
1405 pub fn set_container_log_max_size<T: std::convert::Into<std::string::String>>(
1407 mut self,
1408 v: T,
1409 ) -> Self {
1410 self.container_log_max_size = v.into();
1411 self
1412 }
1413
1414 pub fn set_container_log_max_files<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1416 self.container_log_max_files = v.into();
1417 self
1418 }
1419
1420 pub fn set_allowed_unsafe_sysctls<T, V>(mut self, v: T) -> Self
1422 where
1423 T: std::iter::IntoIterator<Item = V>,
1424 V: std::convert::Into<std::string::String>,
1425 {
1426 use std::iter::Iterator;
1427 self.allowed_unsafe_sysctls = v.into_iter().map(|i| i.into()).collect();
1428 self
1429 }
1430
1431 pub fn set_eviction_soft<T>(mut self, v: T) -> Self
1433 where
1434 T: std::convert::Into<crate::model::EvictionSignals>,
1435 {
1436 self.eviction_soft = std::option::Option::Some(v.into());
1437 self
1438 }
1439
1440 pub fn set_or_clear_eviction_soft<T>(mut self, v: std::option::Option<T>) -> Self
1442 where
1443 T: std::convert::Into<crate::model::EvictionSignals>,
1444 {
1445 self.eviction_soft = v.map(|x| x.into());
1446 self
1447 }
1448
1449 pub fn set_eviction_soft_grace_period<T>(mut self, v: T) -> Self
1451 where
1452 T: std::convert::Into<crate::model::EvictionGracePeriod>,
1453 {
1454 self.eviction_soft_grace_period = std::option::Option::Some(v.into());
1455 self
1456 }
1457
1458 pub fn set_or_clear_eviction_soft_grace_period<T>(mut self, v: std::option::Option<T>) -> Self
1460 where
1461 T: std::convert::Into<crate::model::EvictionGracePeriod>,
1462 {
1463 self.eviction_soft_grace_period = v.map(|x| x.into());
1464 self
1465 }
1466
1467 pub fn set_eviction_minimum_reclaim<T>(mut self, v: T) -> Self
1469 where
1470 T: std::convert::Into<crate::model::EvictionMinimumReclaim>,
1471 {
1472 self.eviction_minimum_reclaim = std::option::Option::Some(v.into());
1473 self
1474 }
1475
1476 pub fn set_or_clear_eviction_minimum_reclaim<T>(mut self, v: std::option::Option<T>) -> Self
1478 where
1479 T: std::convert::Into<crate::model::EvictionMinimumReclaim>,
1480 {
1481 self.eviction_minimum_reclaim = v.map(|x| x.into());
1482 self
1483 }
1484
1485 pub fn set_eviction_max_pod_grace_period_seconds<T: std::convert::Into<i32>>(
1487 mut self,
1488 v: T,
1489 ) -> Self {
1490 self.eviction_max_pod_grace_period_seconds = v.into();
1491 self
1492 }
1493
1494 pub fn set_max_parallel_image_pulls<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1496 self.max_parallel_image_pulls = v.into();
1497 self
1498 }
1499
1500 pub fn set_single_process_oom_kill<T>(mut self, v: T) -> Self
1502 where
1503 T: std::convert::Into<bool>,
1504 {
1505 self.single_process_oom_kill = std::option::Option::Some(v.into());
1506 self
1507 }
1508
1509 pub fn set_or_clear_single_process_oom_kill<T>(mut self, v: std::option::Option<T>) -> Self
1511 where
1512 T: std::convert::Into<bool>,
1513 {
1514 self.single_process_oom_kill = v.map(|x| x.into());
1515 self
1516 }
1517}
1518
1519impl wkt::message::Message for NodeKubeletConfig {
1520 fn typename() -> &'static str {
1521 "type.googleapis.com/google.container.v1.NodeKubeletConfig"
1522 }
1523}
1524
1525#[derive(Clone, Default, PartialEq)]
1529#[non_exhaustive]
1530pub struct TopologyManager {
1531 pub policy: std::string::String,
1552
1553 pub scope: std::string::String,
1562
1563 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1564}
1565
1566impl TopologyManager {
1567 pub fn new() -> Self {
1568 std::default::Default::default()
1569 }
1570
1571 pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1573 self.policy = v.into();
1574 self
1575 }
1576
1577 pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1579 self.scope = v.into();
1580 self
1581 }
1582}
1583
1584impl wkt::message::Message for TopologyManager {
1585 fn typename() -> &'static str {
1586 "type.googleapis.com/google.container.v1.TopologyManager"
1587 }
1588}
1589
1590#[derive(Clone, Default, PartialEq)]
1594#[non_exhaustive]
1595pub struct MemoryManager {
1596 pub policy: std::string::String,
1606
1607 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1608}
1609
1610impl MemoryManager {
1611 pub fn new() -> Self {
1612 std::default::Default::default()
1613 }
1614
1615 pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1617 self.policy = v.into();
1618 self
1619 }
1620}
1621
1622impl wkt::message::Message for MemoryManager {
1623 fn typename() -> &'static str {
1624 "type.googleapis.com/google.container.v1.MemoryManager"
1625 }
1626}
1627
1628#[derive(Clone, Default, PartialEq)]
1633#[non_exhaustive]
1634pub struct EvictionSignals {
1635 pub memory_available: std::string::String,
1642
1643 pub nodefs_available: std::string::String,
1650
1651 pub nodefs_inodes_free: std::string::String,
1658
1659 pub imagefs_available: std::string::String,
1668
1669 pub imagefs_inodes_free: std::string::String,
1676
1677 pub pid_available: std::string::String,
1683
1684 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1685}
1686
1687impl EvictionSignals {
1688 pub fn new() -> Self {
1689 std::default::Default::default()
1690 }
1691
1692 pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1694 mut self,
1695 v: T,
1696 ) -> Self {
1697 self.memory_available = v.into();
1698 self
1699 }
1700
1701 pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1703 mut self,
1704 v: T,
1705 ) -> Self {
1706 self.nodefs_available = v.into();
1707 self
1708 }
1709
1710 pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1712 mut self,
1713 v: T,
1714 ) -> Self {
1715 self.nodefs_inodes_free = v.into();
1716 self
1717 }
1718
1719 pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1721 mut self,
1722 v: T,
1723 ) -> Self {
1724 self.imagefs_available = v.into();
1725 self
1726 }
1727
1728 pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1730 mut self,
1731 v: T,
1732 ) -> Self {
1733 self.imagefs_inodes_free = v.into();
1734 self
1735 }
1736
1737 pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1739 self.pid_available = v.into();
1740 self
1741 }
1742}
1743
1744impl wkt::message::Message for EvictionSignals {
1745 fn typename() -> &'static str {
1746 "type.googleapis.com/google.container.v1.EvictionSignals"
1747 }
1748}
1749
1750#[derive(Clone, Default, PartialEq)]
1752#[non_exhaustive]
1753pub struct EvictionGracePeriod {
1754 pub memory_available: std::string::String,
1758
1759 pub nodefs_available: std::string::String,
1763
1764 pub nodefs_inodes_free: std::string::String,
1768
1769 pub imagefs_available: std::string::String,
1773
1774 pub imagefs_inodes_free: std::string::String,
1778
1779 pub pid_available: std::string::String,
1783
1784 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1785}
1786
1787impl EvictionGracePeriod {
1788 pub fn new() -> Self {
1789 std::default::Default::default()
1790 }
1791
1792 pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1794 mut self,
1795 v: T,
1796 ) -> Self {
1797 self.memory_available = v.into();
1798 self
1799 }
1800
1801 pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1803 mut self,
1804 v: T,
1805 ) -> Self {
1806 self.nodefs_available = v.into();
1807 self
1808 }
1809
1810 pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1812 mut self,
1813 v: T,
1814 ) -> Self {
1815 self.nodefs_inodes_free = v.into();
1816 self
1817 }
1818
1819 pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1821 mut self,
1822 v: T,
1823 ) -> Self {
1824 self.imagefs_available = v.into();
1825 self
1826 }
1827
1828 pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1830 mut self,
1831 v: T,
1832 ) -> Self {
1833 self.imagefs_inodes_free = v.into();
1834 self
1835 }
1836
1837 pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1839 self.pid_available = v.into();
1840 self
1841 }
1842}
1843
1844impl wkt::message::Message for EvictionGracePeriod {
1845 fn typename() -> &'static str {
1846 "type.googleapis.com/google.container.v1.EvictionGracePeriod"
1847 }
1848}
1849
1850#[derive(Clone, Default, PartialEq)]
1853#[non_exhaustive]
1854pub struct EvictionMinimumReclaim {
1855 pub memory_available: std::string::String,
1859
1860 pub nodefs_available: std::string::String,
1864
1865 pub nodefs_inodes_free: std::string::String,
1870
1871 pub imagefs_available: std::string::String,
1876
1877 pub imagefs_inodes_free: std::string::String,
1882
1883 pub pid_available: std::string::String,
1887
1888 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1889}
1890
1891impl EvictionMinimumReclaim {
1892 pub fn new() -> Self {
1893 std::default::Default::default()
1894 }
1895
1896 pub fn set_memory_available<T: std::convert::Into<std::string::String>>(
1898 mut self,
1899 v: T,
1900 ) -> Self {
1901 self.memory_available = v.into();
1902 self
1903 }
1904
1905 pub fn set_nodefs_available<T: std::convert::Into<std::string::String>>(
1907 mut self,
1908 v: T,
1909 ) -> Self {
1910 self.nodefs_available = v.into();
1911 self
1912 }
1913
1914 pub fn set_nodefs_inodes_free<T: std::convert::Into<std::string::String>>(
1916 mut self,
1917 v: T,
1918 ) -> Self {
1919 self.nodefs_inodes_free = v.into();
1920 self
1921 }
1922
1923 pub fn set_imagefs_available<T: std::convert::Into<std::string::String>>(
1925 mut self,
1926 v: T,
1927 ) -> Self {
1928 self.imagefs_available = v.into();
1929 self
1930 }
1931
1932 pub fn set_imagefs_inodes_free<T: std::convert::Into<std::string::String>>(
1934 mut self,
1935 v: T,
1936 ) -> Self {
1937 self.imagefs_inodes_free = v.into();
1938 self
1939 }
1940
1941 pub fn set_pid_available<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1943 self.pid_available = v.into();
1944 self
1945 }
1946}
1947
1948impl wkt::message::Message for EvictionMinimumReclaim {
1949 fn typename() -> &'static str {
1950 "type.googleapis.com/google.container.v1.EvictionMinimumReclaim"
1951 }
1952}
1953
1954#[derive(Clone, Default, PartialEq)]
1963#[non_exhaustive]
1964pub struct NodeConfig {
1965 pub machine_type: std::string::String,
1970
1971 pub disk_size_gb: i32,
1976
1977 pub oauth_scopes: std::vec::Vec<std::string::String>,
1992
1993 pub service_account: std::string::String,
1997
1998 pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
2031
2032 pub image_type: std::string::String,
2037
2038 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2047
2048 pub local_ssd_count: i32,
2055
2056 pub tags: std::vec::Vec<std::string::String>,
2061
2062 pub preemptible: bool,
2066
2067 pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
2072
2073 pub disk_type: std::string::String,
2078
2079 pub min_cpu_platform: std::string::String,
2087
2088 pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
2090
2091 pub taints: std::vec::Vec<crate::model::NodeTaint>,
2096
2097 pub sandbox_config: std::option::Option<crate::model::SandboxConfig>,
2099
2100 pub node_group: std::string::String,
2105
2106 pub reservation_affinity: std::option::Option<crate::model::ReservationAffinity>,
2111
2112 pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
2114
2115 pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
2117
2118 pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
2120
2121 pub boot_disk_kms_key: std::string::String,
2128
2129 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
2131
2132 pub advanced_machine_features: std::option::Option<crate::model::AdvancedMachineFeatures>,
2134
2135 pub gvnic: std::option::Option<crate::model::VirtualNIC>,
2137
2138 pub spot: bool,
2141
2142 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
2145
2146 pub fast_socket: std::option::Option<crate::model::FastSocket>,
2148
2149 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
2152
2153 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
2155
2156 pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
2158
2159 pub local_nvme_ssd_block_config: std::option::Option<crate::model::LocalNvmeSsdBlockConfig>,
2161
2162 pub ephemeral_storage_local_ssd_config:
2165 std::option::Option<crate::model::EphemeralStorageLocalSsdConfig>,
2166
2167 pub sole_tenant_config: std::option::Option<crate::model::SoleTenantConfig>,
2169
2170 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
2172
2173 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
2175
2176 pub enable_confidential_storage: bool,
2178
2179 pub secondary_boot_disks: std::vec::Vec<crate::model::SecondaryBootDisk>,
2181
2182 pub storage_pools: std::vec::Vec<std::string::String>,
2184
2185 pub secondary_boot_disk_update_strategy:
2187 std::option::Option<crate::model::SecondaryBootDiskUpdateStrategy>,
2188
2189 pub max_run_duration: std::option::Option<wkt::Duration>,
2192
2193 pub local_ssd_encryption_mode:
2196 std::option::Option<crate::model::node_config::LocalSsdEncryptionMode>,
2197
2198 pub effective_cgroup_mode: crate::model::node_config::EffectiveCgroupMode,
2203
2204 pub flex_start: std::option::Option<bool>,
2206
2207 pub boot_disk: std::option::Option<crate::model::BootDisk>,
2209
2210 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2211}
2212
2213impl NodeConfig {
2214 pub fn new() -> Self {
2215 std::default::Default::default()
2216 }
2217
2218 pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2220 self.machine_type = v.into();
2221 self
2222 }
2223
2224 pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2226 self.disk_size_gb = v.into();
2227 self
2228 }
2229
2230 pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
2232 where
2233 T: std::iter::IntoIterator<Item = V>,
2234 V: std::convert::Into<std::string::String>,
2235 {
2236 use std::iter::Iterator;
2237 self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
2238 self
2239 }
2240
2241 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2243 self.service_account = v.into();
2244 self
2245 }
2246
2247 pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
2249 where
2250 T: std::iter::IntoIterator<Item = (K, V)>,
2251 K: std::convert::Into<std::string::String>,
2252 V: std::convert::Into<std::string::String>,
2253 {
2254 use std::iter::Iterator;
2255 self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2256 self
2257 }
2258
2259 pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2261 self.image_type = v.into();
2262 self
2263 }
2264
2265 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2267 where
2268 T: std::iter::IntoIterator<Item = (K, V)>,
2269 K: std::convert::Into<std::string::String>,
2270 V: std::convert::Into<std::string::String>,
2271 {
2272 use std::iter::Iterator;
2273 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2274 self
2275 }
2276
2277 pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2279 self.local_ssd_count = v.into();
2280 self
2281 }
2282
2283 pub fn set_tags<T, V>(mut self, v: T) -> Self
2285 where
2286 T: std::iter::IntoIterator<Item = V>,
2287 V: std::convert::Into<std::string::String>,
2288 {
2289 use std::iter::Iterator;
2290 self.tags = v.into_iter().map(|i| i.into()).collect();
2291 self
2292 }
2293
2294 pub fn set_preemptible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2296 self.preemptible = v.into();
2297 self
2298 }
2299
2300 pub fn set_accelerators<T, V>(mut self, v: T) -> Self
2302 where
2303 T: std::iter::IntoIterator<Item = V>,
2304 V: std::convert::Into<crate::model::AcceleratorConfig>,
2305 {
2306 use std::iter::Iterator;
2307 self.accelerators = v.into_iter().map(|i| i.into()).collect();
2308 self
2309 }
2310
2311 pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2313 self.disk_type = v.into();
2314 self
2315 }
2316
2317 pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
2319 mut self,
2320 v: T,
2321 ) -> Self {
2322 self.min_cpu_platform = v.into();
2323 self
2324 }
2325
2326 pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
2328 where
2329 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
2330 {
2331 self.workload_metadata_config = std::option::Option::Some(v.into());
2332 self
2333 }
2334
2335 pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
2337 where
2338 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
2339 {
2340 self.workload_metadata_config = v.map(|x| x.into());
2341 self
2342 }
2343
2344 pub fn set_taints<T, V>(mut self, v: T) -> Self
2346 where
2347 T: std::iter::IntoIterator<Item = V>,
2348 V: std::convert::Into<crate::model::NodeTaint>,
2349 {
2350 use std::iter::Iterator;
2351 self.taints = v.into_iter().map(|i| i.into()).collect();
2352 self
2353 }
2354
2355 pub fn set_sandbox_config<T>(mut self, v: T) -> Self
2357 where
2358 T: std::convert::Into<crate::model::SandboxConfig>,
2359 {
2360 self.sandbox_config = std::option::Option::Some(v.into());
2361 self
2362 }
2363
2364 pub fn set_or_clear_sandbox_config<T>(mut self, v: std::option::Option<T>) -> Self
2366 where
2367 T: std::convert::Into<crate::model::SandboxConfig>,
2368 {
2369 self.sandbox_config = v.map(|x| x.into());
2370 self
2371 }
2372
2373 pub fn set_node_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2375 self.node_group = v.into();
2376 self
2377 }
2378
2379 pub fn set_reservation_affinity<T>(mut self, v: T) -> Self
2381 where
2382 T: std::convert::Into<crate::model::ReservationAffinity>,
2383 {
2384 self.reservation_affinity = std::option::Option::Some(v.into());
2385 self
2386 }
2387
2388 pub fn set_or_clear_reservation_affinity<T>(mut self, v: std::option::Option<T>) -> Self
2390 where
2391 T: std::convert::Into<crate::model::ReservationAffinity>,
2392 {
2393 self.reservation_affinity = v.map(|x| x.into());
2394 self
2395 }
2396
2397 pub fn set_shielded_instance_config<T>(mut self, v: T) -> Self
2399 where
2400 T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
2401 {
2402 self.shielded_instance_config = std::option::Option::Some(v.into());
2403 self
2404 }
2405
2406 pub fn set_or_clear_shielded_instance_config<T>(mut self, v: std::option::Option<T>) -> Self
2408 where
2409 T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
2410 {
2411 self.shielded_instance_config = v.map(|x| x.into());
2412 self
2413 }
2414
2415 pub fn set_linux_node_config<T>(mut self, v: T) -> Self
2417 where
2418 T: std::convert::Into<crate::model::LinuxNodeConfig>,
2419 {
2420 self.linux_node_config = std::option::Option::Some(v.into());
2421 self
2422 }
2423
2424 pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
2426 where
2427 T: std::convert::Into<crate::model::LinuxNodeConfig>,
2428 {
2429 self.linux_node_config = v.map(|x| x.into());
2430 self
2431 }
2432
2433 pub fn set_kubelet_config<T>(mut self, v: T) -> Self
2435 where
2436 T: std::convert::Into<crate::model::NodeKubeletConfig>,
2437 {
2438 self.kubelet_config = std::option::Option::Some(v.into());
2439 self
2440 }
2441
2442 pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
2444 where
2445 T: std::convert::Into<crate::model::NodeKubeletConfig>,
2446 {
2447 self.kubelet_config = v.map(|x| x.into());
2448 self
2449 }
2450
2451 pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
2453 mut self,
2454 v: T,
2455 ) -> Self {
2456 self.boot_disk_kms_key = v.into();
2457 self
2458 }
2459
2460 pub fn set_gcfs_config<T>(mut self, v: T) -> Self
2462 where
2463 T: std::convert::Into<crate::model::GcfsConfig>,
2464 {
2465 self.gcfs_config = std::option::Option::Some(v.into());
2466 self
2467 }
2468
2469 pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
2471 where
2472 T: std::convert::Into<crate::model::GcfsConfig>,
2473 {
2474 self.gcfs_config = v.map(|x| x.into());
2475 self
2476 }
2477
2478 pub fn set_advanced_machine_features<T>(mut self, v: T) -> Self
2480 where
2481 T: std::convert::Into<crate::model::AdvancedMachineFeatures>,
2482 {
2483 self.advanced_machine_features = std::option::Option::Some(v.into());
2484 self
2485 }
2486
2487 pub fn set_or_clear_advanced_machine_features<T>(mut self, v: std::option::Option<T>) -> Self
2489 where
2490 T: std::convert::Into<crate::model::AdvancedMachineFeatures>,
2491 {
2492 self.advanced_machine_features = v.map(|x| x.into());
2493 self
2494 }
2495
2496 pub fn set_gvnic<T>(mut self, v: T) -> Self
2498 where
2499 T: std::convert::Into<crate::model::VirtualNIC>,
2500 {
2501 self.gvnic = std::option::Option::Some(v.into());
2502 self
2503 }
2504
2505 pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
2507 where
2508 T: std::convert::Into<crate::model::VirtualNIC>,
2509 {
2510 self.gvnic = v.map(|x| x.into());
2511 self
2512 }
2513
2514 pub fn set_spot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2516 self.spot = v.into();
2517 self
2518 }
2519
2520 pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
2522 where
2523 T: std::convert::Into<crate::model::ConfidentialNodes>,
2524 {
2525 self.confidential_nodes = std::option::Option::Some(v.into());
2526 self
2527 }
2528
2529 pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
2531 where
2532 T: std::convert::Into<crate::model::ConfidentialNodes>,
2533 {
2534 self.confidential_nodes = v.map(|x| x.into());
2535 self
2536 }
2537
2538 pub fn set_fast_socket<T>(mut self, v: T) -> Self
2540 where
2541 T: std::convert::Into<crate::model::FastSocket>,
2542 {
2543 self.fast_socket = std::option::Option::Some(v.into());
2544 self
2545 }
2546
2547 pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
2549 where
2550 T: std::convert::Into<crate::model::FastSocket>,
2551 {
2552 self.fast_socket = v.map(|x| x.into());
2553 self
2554 }
2555
2556 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2558 where
2559 T: std::iter::IntoIterator<Item = (K, V)>,
2560 K: std::convert::Into<std::string::String>,
2561 V: std::convert::Into<std::string::String>,
2562 {
2563 use std::iter::Iterator;
2564 self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2565 self
2566 }
2567
2568 pub fn set_logging_config<T>(mut self, v: T) -> Self
2570 where
2571 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
2572 {
2573 self.logging_config = std::option::Option::Some(v.into());
2574 self
2575 }
2576
2577 pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
2579 where
2580 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
2581 {
2582 self.logging_config = v.map(|x| x.into());
2583 self
2584 }
2585
2586 pub fn set_windows_node_config<T>(mut self, v: T) -> Self
2588 where
2589 T: std::convert::Into<crate::model::WindowsNodeConfig>,
2590 {
2591 self.windows_node_config = std::option::Option::Some(v.into());
2592 self
2593 }
2594
2595 pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
2597 where
2598 T: std::convert::Into<crate::model::WindowsNodeConfig>,
2599 {
2600 self.windows_node_config = v.map(|x| x.into());
2601 self
2602 }
2603
2604 pub fn set_local_nvme_ssd_block_config<T>(mut self, v: T) -> Self
2606 where
2607 T: std::convert::Into<crate::model::LocalNvmeSsdBlockConfig>,
2608 {
2609 self.local_nvme_ssd_block_config = std::option::Option::Some(v.into());
2610 self
2611 }
2612
2613 pub fn set_or_clear_local_nvme_ssd_block_config<T>(mut self, v: std::option::Option<T>) -> Self
2615 where
2616 T: std::convert::Into<crate::model::LocalNvmeSsdBlockConfig>,
2617 {
2618 self.local_nvme_ssd_block_config = v.map(|x| x.into());
2619 self
2620 }
2621
2622 pub fn set_ephemeral_storage_local_ssd_config<T>(mut self, v: T) -> Self
2624 where
2625 T: std::convert::Into<crate::model::EphemeralStorageLocalSsdConfig>,
2626 {
2627 self.ephemeral_storage_local_ssd_config = std::option::Option::Some(v.into());
2628 self
2629 }
2630
2631 pub fn set_or_clear_ephemeral_storage_local_ssd_config<T>(
2633 mut self,
2634 v: std::option::Option<T>,
2635 ) -> Self
2636 where
2637 T: std::convert::Into<crate::model::EphemeralStorageLocalSsdConfig>,
2638 {
2639 self.ephemeral_storage_local_ssd_config = v.map(|x| x.into());
2640 self
2641 }
2642
2643 pub fn set_sole_tenant_config<T>(mut self, v: T) -> Self
2645 where
2646 T: std::convert::Into<crate::model::SoleTenantConfig>,
2647 {
2648 self.sole_tenant_config = std::option::Option::Some(v.into());
2649 self
2650 }
2651
2652 pub fn set_or_clear_sole_tenant_config<T>(mut self, v: std::option::Option<T>) -> Self
2654 where
2655 T: std::convert::Into<crate::model::SoleTenantConfig>,
2656 {
2657 self.sole_tenant_config = v.map(|x| x.into());
2658 self
2659 }
2660
2661 pub fn set_containerd_config<T>(mut self, v: T) -> Self
2663 where
2664 T: std::convert::Into<crate::model::ContainerdConfig>,
2665 {
2666 self.containerd_config = std::option::Option::Some(v.into());
2667 self
2668 }
2669
2670 pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
2672 where
2673 T: std::convert::Into<crate::model::ContainerdConfig>,
2674 {
2675 self.containerd_config = v.map(|x| x.into());
2676 self
2677 }
2678
2679 pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
2681 where
2682 T: std::convert::Into<crate::model::ResourceManagerTags>,
2683 {
2684 self.resource_manager_tags = std::option::Option::Some(v.into());
2685 self
2686 }
2687
2688 pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
2690 where
2691 T: std::convert::Into<crate::model::ResourceManagerTags>,
2692 {
2693 self.resource_manager_tags = v.map(|x| x.into());
2694 self
2695 }
2696
2697 pub fn set_enable_confidential_storage<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2699 self.enable_confidential_storage = v.into();
2700 self
2701 }
2702
2703 pub fn set_secondary_boot_disks<T, V>(mut self, v: T) -> Self
2705 where
2706 T: std::iter::IntoIterator<Item = V>,
2707 V: std::convert::Into<crate::model::SecondaryBootDisk>,
2708 {
2709 use std::iter::Iterator;
2710 self.secondary_boot_disks = v.into_iter().map(|i| i.into()).collect();
2711 self
2712 }
2713
2714 pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
2716 where
2717 T: std::iter::IntoIterator<Item = V>,
2718 V: std::convert::Into<std::string::String>,
2719 {
2720 use std::iter::Iterator;
2721 self.storage_pools = v.into_iter().map(|i| i.into()).collect();
2722 self
2723 }
2724
2725 pub fn set_secondary_boot_disk_update_strategy<T>(mut self, v: T) -> Self
2727 where
2728 T: std::convert::Into<crate::model::SecondaryBootDiskUpdateStrategy>,
2729 {
2730 self.secondary_boot_disk_update_strategy = std::option::Option::Some(v.into());
2731 self
2732 }
2733
2734 pub fn set_or_clear_secondary_boot_disk_update_strategy<T>(
2736 mut self,
2737 v: std::option::Option<T>,
2738 ) -> Self
2739 where
2740 T: std::convert::Into<crate::model::SecondaryBootDiskUpdateStrategy>,
2741 {
2742 self.secondary_boot_disk_update_strategy = v.map(|x| x.into());
2743 self
2744 }
2745
2746 pub fn set_max_run_duration<T>(mut self, v: T) -> Self
2748 where
2749 T: std::convert::Into<wkt::Duration>,
2750 {
2751 self.max_run_duration = std::option::Option::Some(v.into());
2752 self
2753 }
2754
2755 pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
2757 where
2758 T: std::convert::Into<wkt::Duration>,
2759 {
2760 self.max_run_duration = v.map(|x| x.into());
2761 self
2762 }
2763
2764 pub fn set_local_ssd_encryption_mode<T>(mut self, v: T) -> Self
2766 where
2767 T: std::convert::Into<crate::model::node_config::LocalSsdEncryptionMode>,
2768 {
2769 self.local_ssd_encryption_mode = std::option::Option::Some(v.into());
2770 self
2771 }
2772
2773 pub fn set_or_clear_local_ssd_encryption_mode<T>(mut self, v: std::option::Option<T>) -> Self
2775 where
2776 T: std::convert::Into<crate::model::node_config::LocalSsdEncryptionMode>,
2777 {
2778 self.local_ssd_encryption_mode = v.map(|x| x.into());
2779 self
2780 }
2781
2782 pub fn set_effective_cgroup_mode<
2784 T: std::convert::Into<crate::model::node_config::EffectiveCgroupMode>,
2785 >(
2786 mut self,
2787 v: T,
2788 ) -> Self {
2789 self.effective_cgroup_mode = v.into();
2790 self
2791 }
2792
2793 pub fn set_flex_start<T>(mut self, v: T) -> Self
2795 where
2796 T: std::convert::Into<bool>,
2797 {
2798 self.flex_start = std::option::Option::Some(v.into());
2799 self
2800 }
2801
2802 pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
2804 where
2805 T: std::convert::Into<bool>,
2806 {
2807 self.flex_start = v.map(|x| x.into());
2808 self
2809 }
2810
2811 pub fn set_boot_disk<T>(mut self, v: T) -> Self
2813 where
2814 T: std::convert::Into<crate::model::BootDisk>,
2815 {
2816 self.boot_disk = std::option::Option::Some(v.into());
2817 self
2818 }
2819
2820 pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
2822 where
2823 T: std::convert::Into<crate::model::BootDisk>,
2824 {
2825 self.boot_disk = v.map(|x| x.into());
2826 self
2827 }
2828}
2829
2830impl wkt::message::Message for NodeConfig {
2831 fn typename() -> &'static str {
2832 "type.googleapis.com/google.container.v1.NodeConfig"
2833 }
2834}
2835
2836pub mod node_config {
2838 #[allow(unused_imports)]
2839 use super::*;
2840
2841 #[derive(Clone, Debug, PartialEq)]
2858 #[non_exhaustive]
2859 pub enum LocalSsdEncryptionMode {
2860 Unspecified,
2864 StandardEncryption,
2868 EphemeralKeyEncryption,
2873 UnknownValue(local_ssd_encryption_mode::UnknownValue),
2878 }
2879
2880 #[doc(hidden)]
2881 pub mod local_ssd_encryption_mode {
2882 #[allow(unused_imports)]
2883 use super::*;
2884 #[derive(Clone, Debug, PartialEq)]
2885 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2886 }
2887
2888 impl LocalSsdEncryptionMode {
2889 pub fn value(&self) -> std::option::Option<i32> {
2894 match self {
2895 Self::Unspecified => std::option::Option::Some(0),
2896 Self::StandardEncryption => std::option::Option::Some(1),
2897 Self::EphemeralKeyEncryption => std::option::Option::Some(2),
2898 Self::UnknownValue(u) => u.0.value(),
2899 }
2900 }
2901
2902 pub fn name(&self) -> std::option::Option<&str> {
2907 match self {
2908 Self::Unspecified => {
2909 std::option::Option::Some("LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED")
2910 }
2911 Self::StandardEncryption => std::option::Option::Some("STANDARD_ENCRYPTION"),
2912 Self::EphemeralKeyEncryption => {
2913 std::option::Option::Some("EPHEMERAL_KEY_ENCRYPTION")
2914 }
2915 Self::UnknownValue(u) => u.0.name(),
2916 }
2917 }
2918 }
2919
2920 impl std::default::Default for LocalSsdEncryptionMode {
2921 fn default() -> Self {
2922 use std::convert::From;
2923 Self::from(0)
2924 }
2925 }
2926
2927 impl std::fmt::Display for LocalSsdEncryptionMode {
2928 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2929 wkt::internal::display_enum(f, self.name(), self.value())
2930 }
2931 }
2932
2933 impl std::convert::From<i32> for LocalSsdEncryptionMode {
2934 fn from(value: i32) -> Self {
2935 match value {
2936 0 => Self::Unspecified,
2937 1 => Self::StandardEncryption,
2938 2 => Self::EphemeralKeyEncryption,
2939 _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
2940 wkt::internal::UnknownEnumValue::Integer(value),
2941 )),
2942 }
2943 }
2944 }
2945
2946 impl std::convert::From<&str> for LocalSsdEncryptionMode {
2947 fn from(value: &str) -> Self {
2948 use std::string::ToString;
2949 match value {
2950 "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED" => Self::Unspecified,
2951 "STANDARD_ENCRYPTION" => Self::StandardEncryption,
2952 "EPHEMERAL_KEY_ENCRYPTION" => Self::EphemeralKeyEncryption,
2953 _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
2954 wkt::internal::UnknownEnumValue::String(value.to_string()),
2955 )),
2956 }
2957 }
2958 }
2959
2960 impl serde::ser::Serialize for LocalSsdEncryptionMode {
2961 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2962 where
2963 S: serde::Serializer,
2964 {
2965 match self {
2966 Self::Unspecified => serializer.serialize_i32(0),
2967 Self::StandardEncryption => serializer.serialize_i32(1),
2968 Self::EphemeralKeyEncryption => serializer.serialize_i32(2),
2969 Self::UnknownValue(u) => u.0.serialize(serializer),
2970 }
2971 }
2972 }
2973
2974 impl<'de> serde::de::Deserialize<'de> for LocalSsdEncryptionMode {
2975 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2976 where
2977 D: serde::Deserializer<'de>,
2978 {
2979 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocalSsdEncryptionMode>::new(
2980 ".google.container.v1.NodeConfig.LocalSsdEncryptionMode",
2981 ))
2982 }
2983 }
2984
2985 #[derive(Clone, Debug, PartialEq)]
3001 #[non_exhaustive]
3002 pub enum EffectiveCgroupMode {
3003 Unspecified,
3006 V1,
3009 V2,
3012 UnknownValue(effective_cgroup_mode::UnknownValue),
3017 }
3018
3019 #[doc(hidden)]
3020 pub mod effective_cgroup_mode {
3021 #[allow(unused_imports)]
3022 use super::*;
3023 #[derive(Clone, Debug, PartialEq)]
3024 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3025 }
3026
3027 impl EffectiveCgroupMode {
3028 pub fn value(&self) -> std::option::Option<i32> {
3033 match self {
3034 Self::Unspecified => std::option::Option::Some(0),
3035 Self::V1 => std::option::Option::Some(1),
3036 Self::V2 => std::option::Option::Some(2),
3037 Self::UnknownValue(u) => u.0.value(),
3038 }
3039 }
3040
3041 pub fn name(&self) -> std::option::Option<&str> {
3046 match self {
3047 Self::Unspecified => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_UNSPECIFIED"),
3048 Self::V1 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V1"),
3049 Self::V2 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V2"),
3050 Self::UnknownValue(u) => u.0.name(),
3051 }
3052 }
3053 }
3054
3055 impl std::default::Default for EffectiveCgroupMode {
3056 fn default() -> Self {
3057 use std::convert::From;
3058 Self::from(0)
3059 }
3060 }
3061
3062 impl std::fmt::Display for EffectiveCgroupMode {
3063 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3064 wkt::internal::display_enum(f, self.name(), self.value())
3065 }
3066 }
3067
3068 impl std::convert::From<i32> for EffectiveCgroupMode {
3069 fn from(value: i32) -> Self {
3070 match value {
3071 0 => Self::Unspecified,
3072 1 => Self::V1,
3073 2 => Self::V2,
3074 _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
3075 wkt::internal::UnknownEnumValue::Integer(value),
3076 )),
3077 }
3078 }
3079 }
3080
3081 impl std::convert::From<&str> for EffectiveCgroupMode {
3082 fn from(value: &str) -> Self {
3083 use std::string::ToString;
3084 match value {
3085 "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
3086 "EFFECTIVE_CGROUP_MODE_V1" => Self::V1,
3087 "EFFECTIVE_CGROUP_MODE_V2" => Self::V2,
3088 _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
3089 wkt::internal::UnknownEnumValue::String(value.to_string()),
3090 )),
3091 }
3092 }
3093 }
3094
3095 impl serde::ser::Serialize for EffectiveCgroupMode {
3096 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3097 where
3098 S: serde::Serializer,
3099 {
3100 match self {
3101 Self::Unspecified => serializer.serialize_i32(0),
3102 Self::V1 => serializer.serialize_i32(1),
3103 Self::V2 => serializer.serialize_i32(2),
3104 Self::UnknownValue(u) => u.0.serialize(serializer),
3105 }
3106 }
3107 }
3108
3109 impl<'de> serde::de::Deserialize<'de> for EffectiveCgroupMode {
3110 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3111 where
3112 D: serde::Deserializer<'de>,
3113 {
3114 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EffectiveCgroupMode>::new(
3115 ".google.container.v1.NodeConfig.EffectiveCgroupMode",
3116 ))
3117 }
3118 }
3119}
3120
3121#[derive(Clone, Default, PartialEq)]
3123#[non_exhaustive]
3124pub struct AdvancedMachineFeatures {
3125 pub threads_per_core: std::option::Option<i64>,
3129
3130 pub enable_nested_virtualization: std::option::Option<bool>,
3132
3133 pub performance_monitoring_unit:
3136 std::option::Option<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
3137
3138 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3139}
3140
3141impl AdvancedMachineFeatures {
3142 pub fn new() -> Self {
3143 std::default::Default::default()
3144 }
3145
3146 pub fn set_threads_per_core<T>(mut self, v: T) -> Self
3148 where
3149 T: std::convert::Into<i64>,
3150 {
3151 self.threads_per_core = std::option::Option::Some(v.into());
3152 self
3153 }
3154
3155 pub fn set_or_clear_threads_per_core<T>(mut self, v: std::option::Option<T>) -> Self
3157 where
3158 T: std::convert::Into<i64>,
3159 {
3160 self.threads_per_core = v.map(|x| x.into());
3161 self
3162 }
3163
3164 pub fn set_enable_nested_virtualization<T>(mut self, v: T) -> Self
3166 where
3167 T: std::convert::Into<bool>,
3168 {
3169 self.enable_nested_virtualization = std::option::Option::Some(v.into());
3170 self
3171 }
3172
3173 pub fn set_or_clear_enable_nested_virtualization<T>(mut self, v: std::option::Option<T>) -> Self
3175 where
3176 T: std::convert::Into<bool>,
3177 {
3178 self.enable_nested_virtualization = v.map(|x| x.into());
3179 self
3180 }
3181
3182 pub fn set_performance_monitoring_unit<T>(mut self, v: T) -> Self
3184 where
3185 T: std::convert::Into<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
3186 {
3187 self.performance_monitoring_unit = std::option::Option::Some(v.into());
3188 self
3189 }
3190
3191 pub fn set_or_clear_performance_monitoring_unit<T>(mut self, v: std::option::Option<T>) -> Self
3193 where
3194 T: std::convert::Into<crate::model::advanced_machine_features::PerformanceMonitoringUnit>,
3195 {
3196 self.performance_monitoring_unit = v.map(|x| x.into());
3197 self
3198 }
3199}
3200
3201impl wkt::message::Message for AdvancedMachineFeatures {
3202 fn typename() -> &'static str {
3203 "type.googleapis.com/google.container.v1.AdvancedMachineFeatures"
3204 }
3205}
3206
3207pub mod advanced_machine_features {
3209 #[allow(unused_imports)]
3210 use super::*;
3211
3212 #[derive(Clone, Debug, PartialEq)]
3228 #[non_exhaustive]
3229 pub enum PerformanceMonitoringUnit {
3230 Unspecified,
3232 Architectural,
3234 Standard,
3236 Enhanced,
3238 UnknownValue(performance_monitoring_unit::UnknownValue),
3243 }
3244
3245 #[doc(hidden)]
3246 pub mod performance_monitoring_unit {
3247 #[allow(unused_imports)]
3248 use super::*;
3249 #[derive(Clone, Debug, PartialEq)]
3250 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3251 }
3252
3253 impl PerformanceMonitoringUnit {
3254 pub fn value(&self) -> std::option::Option<i32> {
3259 match self {
3260 Self::Unspecified => std::option::Option::Some(0),
3261 Self::Architectural => std::option::Option::Some(1),
3262 Self::Standard => std::option::Option::Some(2),
3263 Self::Enhanced => std::option::Option::Some(3),
3264 Self::UnknownValue(u) => u.0.value(),
3265 }
3266 }
3267
3268 pub fn name(&self) -> std::option::Option<&str> {
3273 match self {
3274 Self::Unspecified => {
3275 std::option::Option::Some("PERFORMANCE_MONITORING_UNIT_UNSPECIFIED")
3276 }
3277 Self::Architectural => std::option::Option::Some("ARCHITECTURAL"),
3278 Self::Standard => std::option::Option::Some("STANDARD"),
3279 Self::Enhanced => std::option::Option::Some("ENHANCED"),
3280 Self::UnknownValue(u) => u.0.name(),
3281 }
3282 }
3283 }
3284
3285 impl std::default::Default for PerformanceMonitoringUnit {
3286 fn default() -> Self {
3287 use std::convert::From;
3288 Self::from(0)
3289 }
3290 }
3291
3292 impl std::fmt::Display for PerformanceMonitoringUnit {
3293 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3294 wkt::internal::display_enum(f, self.name(), self.value())
3295 }
3296 }
3297
3298 impl std::convert::From<i32> for PerformanceMonitoringUnit {
3299 fn from(value: i32) -> Self {
3300 match value {
3301 0 => Self::Unspecified,
3302 1 => Self::Architectural,
3303 2 => Self::Standard,
3304 3 => Self::Enhanced,
3305 _ => Self::UnknownValue(performance_monitoring_unit::UnknownValue(
3306 wkt::internal::UnknownEnumValue::Integer(value),
3307 )),
3308 }
3309 }
3310 }
3311
3312 impl std::convert::From<&str> for PerformanceMonitoringUnit {
3313 fn from(value: &str) -> Self {
3314 use std::string::ToString;
3315 match value {
3316 "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED" => Self::Unspecified,
3317 "ARCHITECTURAL" => Self::Architectural,
3318 "STANDARD" => Self::Standard,
3319 "ENHANCED" => Self::Enhanced,
3320 _ => Self::UnknownValue(performance_monitoring_unit::UnknownValue(
3321 wkt::internal::UnknownEnumValue::String(value.to_string()),
3322 )),
3323 }
3324 }
3325 }
3326
3327 impl serde::ser::Serialize for PerformanceMonitoringUnit {
3328 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3329 where
3330 S: serde::Serializer,
3331 {
3332 match self {
3333 Self::Unspecified => serializer.serialize_i32(0),
3334 Self::Architectural => serializer.serialize_i32(1),
3335 Self::Standard => serializer.serialize_i32(2),
3336 Self::Enhanced => serializer.serialize_i32(3),
3337 Self::UnknownValue(u) => u.0.serialize(serializer),
3338 }
3339 }
3340 }
3341
3342 impl<'de> serde::de::Deserialize<'de> for PerformanceMonitoringUnit {
3343 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3344 where
3345 D: serde::Deserializer<'de>,
3346 {
3347 deserializer.deserialize_any(
3348 wkt::internal::EnumVisitor::<PerformanceMonitoringUnit>::new(
3349 ".google.container.v1.AdvancedMachineFeatures.PerformanceMonitoringUnit",
3350 ),
3351 )
3352 }
3353 }
3354}
3355
3356#[derive(Clone, Default, PartialEq)]
3358#[non_exhaustive]
3359pub struct NodeNetworkConfig {
3360 pub create_pod_range: bool,
3372
3373 pub pod_range: std::string::String,
3382
3383 pub pod_ipv4_cidr_block: std::string::String,
3400
3401 pub enable_private_nodes: std::option::Option<bool>,
3405
3406 pub network_performance_config:
3408 std::option::Option<crate::model::node_network_config::NetworkPerformanceConfig>,
3409
3410 pub pod_cidr_overprovision_config:
3423 std::option::Option<crate::model::PodCIDROverprovisionConfig>,
3424
3425 pub additional_node_network_configs: std::vec::Vec<crate::model::AdditionalNodeNetworkConfig>,
3428
3429 pub additional_pod_network_configs: std::vec::Vec<crate::model::AdditionalPodNetworkConfig>,
3432
3433 pub pod_ipv4_range_utilization: f64,
3437
3438 pub subnetwork: std::string::String,
3444
3445 pub network_tier_config: std::option::Option<crate::model::NetworkTierConfig>,
3449
3450 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3451}
3452
3453impl NodeNetworkConfig {
3454 pub fn new() -> Self {
3455 std::default::Default::default()
3456 }
3457
3458 pub fn set_create_pod_range<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3460 self.create_pod_range = v.into();
3461 self
3462 }
3463
3464 pub fn set_pod_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3466 self.pod_range = v.into();
3467 self
3468 }
3469
3470 pub fn set_pod_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
3472 mut self,
3473 v: T,
3474 ) -> Self {
3475 self.pod_ipv4_cidr_block = v.into();
3476 self
3477 }
3478
3479 pub fn set_enable_private_nodes<T>(mut self, v: T) -> Self
3481 where
3482 T: std::convert::Into<bool>,
3483 {
3484 self.enable_private_nodes = std::option::Option::Some(v.into());
3485 self
3486 }
3487
3488 pub fn set_or_clear_enable_private_nodes<T>(mut self, v: std::option::Option<T>) -> Self
3490 where
3491 T: std::convert::Into<bool>,
3492 {
3493 self.enable_private_nodes = v.map(|x| x.into());
3494 self
3495 }
3496
3497 pub fn set_network_performance_config<T>(mut self, v: T) -> Self
3499 where
3500 T: std::convert::Into<crate::model::node_network_config::NetworkPerformanceConfig>,
3501 {
3502 self.network_performance_config = std::option::Option::Some(v.into());
3503 self
3504 }
3505
3506 pub fn set_or_clear_network_performance_config<T>(mut self, v: std::option::Option<T>) -> Self
3508 where
3509 T: std::convert::Into<crate::model::node_network_config::NetworkPerformanceConfig>,
3510 {
3511 self.network_performance_config = v.map(|x| x.into());
3512 self
3513 }
3514
3515 pub fn set_pod_cidr_overprovision_config<T>(mut self, v: T) -> Self
3517 where
3518 T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
3519 {
3520 self.pod_cidr_overprovision_config = std::option::Option::Some(v.into());
3521 self
3522 }
3523
3524 pub fn set_or_clear_pod_cidr_overprovision_config<T>(
3526 mut self,
3527 v: std::option::Option<T>,
3528 ) -> Self
3529 where
3530 T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
3531 {
3532 self.pod_cidr_overprovision_config = v.map(|x| x.into());
3533 self
3534 }
3535
3536 pub fn set_additional_node_network_configs<T, V>(mut self, v: T) -> Self
3538 where
3539 T: std::iter::IntoIterator<Item = V>,
3540 V: std::convert::Into<crate::model::AdditionalNodeNetworkConfig>,
3541 {
3542 use std::iter::Iterator;
3543 self.additional_node_network_configs = v.into_iter().map(|i| i.into()).collect();
3544 self
3545 }
3546
3547 pub fn set_additional_pod_network_configs<T, V>(mut self, v: T) -> Self
3549 where
3550 T: std::iter::IntoIterator<Item = V>,
3551 V: std::convert::Into<crate::model::AdditionalPodNetworkConfig>,
3552 {
3553 use std::iter::Iterator;
3554 self.additional_pod_network_configs = v.into_iter().map(|i| i.into()).collect();
3555 self
3556 }
3557
3558 pub fn set_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3560 self.pod_ipv4_range_utilization = v.into();
3561 self
3562 }
3563
3564 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3566 self.subnetwork = v.into();
3567 self
3568 }
3569
3570 pub fn set_network_tier_config<T>(mut self, v: T) -> Self
3572 where
3573 T: std::convert::Into<crate::model::NetworkTierConfig>,
3574 {
3575 self.network_tier_config = std::option::Option::Some(v.into());
3576 self
3577 }
3578
3579 pub fn set_or_clear_network_tier_config<T>(mut self, v: std::option::Option<T>) -> Self
3581 where
3582 T: std::convert::Into<crate::model::NetworkTierConfig>,
3583 {
3584 self.network_tier_config = v.map(|x| x.into());
3585 self
3586 }
3587}
3588
3589impl wkt::message::Message for NodeNetworkConfig {
3590 fn typename() -> &'static str {
3591 "type.googleapis.com/google.container.v1.NodeNetworkConfig"
3592 }
3593}
3594
3595pub mod node_network_config {
3597 #[allow(unused_imports)]
3598 use super::*;
3599
3600 #[derive(Clone, Default, PartialEq)]
3602 #[non_exhaustive]
3603 pub struct NetworkPerformanceConfig {
3604 pub total_egress_bandwidth_tier: std::option::Option<
3606 crate::model::node_network_config::network_performance_config::Tier,
3607 >,
3608
3609 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3610 }
3611
3612 impl NetworkPerformanceConfig {
3613 pub fn new() -> Self {
3614 std::default::Default::default()
3615 }
3616
3617 pub fn set_total_egress_bandwidth_tier<T>(mut self, v: T) -> Self
3619 where
3620 T: std::convert::Into<
3621 crate::model::node_network_config::network_performance_config::Tier,
3622 >,
3623 {
3624 self.total_egress_bandwidth_tier = std::option::Option::Some(v.into());
3625 self
3626 }
3627
3628 pub fn set_or_clear_total_egress_bandwidth_tier<T>(
3630 mut self,
3631 v: std::option::Option<T>,
3632 ) -> Self
3633 where
3634 T: std::convert::Into<
3635 crate::model::node_network_config::network_performance_config::Tier,
3636 >,
3637 {
3638 self.total_egress_bandwidth_tier = v.map(|x| x.into());
3639 self
3640 }
3641 }
3642
3643 impl wkt::message::Message for NetworkPerformanceConfig {
3644 fn typename() -> &'static str {
3645 "type.googleapis.com/google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig"
3646 }
3647 }
3648
3649 pub mod network_performance_config {
3651 #[allow(unused_imports)]
3652 use super::*;
3653
3654 #[derive(Clone, Debug, PartialEq)]
3670 #[non_exhaustive]
3671 pub enum Tier {
3672 Unspecified,
3674 Tier1,
3676 UnknownValue(tier::UnknownValue),
3681 }
3682
3683 #[doc(hidden)]
3684 pub mod tier {
3685 #[allow(unused_imports)]
3686 use super::*;
3687 #[derive(Clone, Debug, PartialEq)]
3688 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3689 }
3690
3691 impl Tier {
3692 pub fn value(&self) -> std::option::Option<i32> {
3697 match self {
3698 Self::Unspecified => std::option::Option::Some(0),
3699 Self::Tier1 => std::option::Option::Some(1),
3700 Self::UnknownValue(u) => u.0.value(),
3701 }
3702 }
3703
3704 pub fn name(&self) -> std::option::Option<&str> {
3709 match self {
3710 Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
3711 Self::Tier1 => std::option::Option::Some("TIER_1"),
3712 Self::UnknownValue(u) => u.0.name(),
3713 }
3714 }
3715 }
3716
3717 impl std::default::Default for Tier {
3718 fn default() -> Self {
3719 use std::convert::From;
3720 Self::from(0)
3721 }
3722 }
3723
3724 impl std::fmt::Display for Tier {
3725 fn fmt(
3726 &self,
3727 f: &mut std::fmt::Formatter<'_>,
3728 ) -> std::result::Result<(), std::fmt::Error> {
3729 wkt::internal::display_enum(f, self.name(), self.value())
3730 }
3731 }
3732
3733 impl std::convert::From<i32> for Tier {
3734 fn from(value: i32) -> Self {
3735 match value {
3736 0 => Self::Unspecified,
3737 1 => Self::Tier1,
3738 _ => Self::UnknownValue(tier::UnknownValue(
3739 wkt::internal::UnknownEnumValue::Integer(value),
3740 )),
3741 }
3742 }
3743 }
3744
3745 impl std::convert::From<&str> for Tier {
3746 fn from(value: &str) -> Self {
3747 use std::string::ToString;
3748 match value {
3749 "TIER_UNSPECIFIED" => Self::Unspecified,
3750 "TIER_1" => Self::Tier1,
3751 _ => Self::UnknownValue(tier::UnknownValue(
3752 wkt::internal::UnknownEnumValue::String(value.to_string()),
3753 )),
3754 }
3755 }
3756 }
3757
3758 impl serde::ser::Serialize for Tier {
3759 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3760 where
3761 S: serde::Serializer,
3762 {
3763 match self {
3764 Self::Unspecified => serializer.serialize_i32(0),
3765 Self::Tier1 => serializer.serialize_i32(1),
3766 Self::UnknownValue(u) => u.0.serialize(serializer),
3767 }
3768 }
3769 }
3770
3771 impl<'de> serde::de::Deserialize<'de> for Tier {
3772 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3773 where
3774 D: serde::Deserializer<'de>,
3775 {
3776 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
3777 ".google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier",
3778 ))
3779 }
3780 }
3781 }
3782}
3783
3784#[derive(Clone, Default, PartialEq)]
3787#[non_exhaustive]
3788pub struct AdditionalNodeNetworkConfig {
3789 pub network: std::string::String,
3791
3792 pub subnetwork: std::string::String,
3794
3795 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3796}
3797
3798impl AdditionalNodeNetworkConfig {
3799 pub fn new() -> Self {
3800 std::default::Default::default()
3801 }
3802
3803 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3805 self.network = v.into();
3806 self
3807 }
3808
3809 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3811 self.subnetwork = v.into();
3812 self
3813 }
3814}
3815
3816impl wkt::message::Message for AdditionalNodeNetworkConfig {
3817 fn typename() -> &'static str {
3818 "type.googleapis.com/google.container.v1.AdditionalNodeNetworkConfig"
3819 }
3820}
3821
3822#[derive(Clone, Default, PartialEq)]
3825#[non_exhaustive]
3826pub struct AdditionalPodNetworkConfig {
3827 pub subnetwork: std::string::String,
3829
3830 pub secondary_pod_range: std::string::String,
3833
3834 pub max_pods_per_node: std::option::Option<crate::model::MaxPodsConstraint>,
3836
3837 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3838}
3839
3840impl AdditionalPodNetworkConfig {
3841 pub fn new() -> Self {
3842 std::default::Default::default()
3843 }
3844
3845 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3847 self.subnetwork = v.into();
3848 self
3849 }
3850
3851 pub fn set_secondary_pod_range<T: std::convert::Into<std::string::String>>(
3853 mut self,
3854 v: T,
3855 ) -> Self {
3856 self.secondary_pod_range = v.into();
3857 self
3858 }
3859
3860 pub fn set_max_pods_per_node<T>(mut self, v: T) -> Self
3862 where
3863 T: std::convert::Into<crate::model::MaxPodsConstraint>,
3864 {
3865 self.max_pods_per_node = std::option::Option::Some(v.into());
3866 self
3867 }
3868
3869 pub fn set_or_clear_max_pods_per_node<T>(mut self, v: std::option::Option<T>) -> Self
3871 where
3872 T: std::convert::Into<crate::model::MaxPodsConstraint>,
3873 {
3874 self.max_pods_per_node = v.map(|x| x.into());
3875 self
3876 }
3877}
3878
3879impl wkt::message::Message for AdditionalPodNetworkConfig {
3880 fn typename() -> &'static str {
3881 "type.googleapis.com/google.container.v1.AdditionalPodNetworkConfig"
3882 }
3883}
3884
3885#[derive(Clone, Default, PartialEq)]
3887#[non_exhaustive]
3888pub struct ShieldedInstanceConfig {
3889 pub enable_secure_boot: bool,
3895
3896 pub enable_integrity_monitoring: bool,
3903
3904 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3905}
3906
3907impl ShieldedInstanceConfig {
3908 pub fn new() -> Self {
3909 std::default::Default::default()
3910 }
3911
3912 pub fn set_enable_secure_boot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3914 self.enable_secure_boot = v.into();
3915 self
3916 }
3917
3918 pub fn set_enable_integrity_monitoring<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3920 self.enable_integrity_monitoring = v.into();
3921 self
3922 }
3923}
3924
3925impl wkt::message::Message for ShieldedInstanceConfig {
3926 fn typename() -> &'static str {
3927 "type.googleapis.com/google.container.v1.ShieldedInstanceConfig"
3928 }
3929}
3930
3931#[derive(Clone, Default, PartialEq)]
3933#[non_exhaustive]
3934pub struct SandboxConfig {
3935 pub r#type: crate::model::sandbox_config::Type,
3937
3938 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3939}
3940
3941impl SandboxConfig {
3942 pub fn new() -> Self {
3943 std::default::Default::default()
3944 }
3945
3946 pub fn set_type<T: std::convert::Into<crate::model::sandbox_config::Type>>(
3948 mut self,
3949 v: T,
3950 ) -> Self {
3951 self.r#type = v.into();
3952 self
3953 }
3954}
3955
3956impl wkt::message::Message for SandboxConfig {
3957 fn typename() -> &'static str {
3958 "type.googleapis.com/google.container.v1.SandboxConfig"
3959 }
3960}
3961
3962pub mod sandbox_config {
3964 #[allow(unused_imports)]
3965 use super::*;
3966
3967 #[derive(Clone, Debug, PartialEq)]
3983 #[non_exhaustive]
3984 pub enum Type {
3985 Unspecified,
3987 Gvisor,
3989 UnknownValue(r#type::UnknownValue),
3994 }
3995
3996 #[doc(hidden)]
3997 pub mod r#type {
3998 #[allow(unused_imports)]
3999 use super::*;
4000 #[derive(Clone, Debug, PartialEq)]
4001 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4002 }
4003
4004 impl Type {
4005 pub fn value(&self) -> std::option::Option<i32> {
4010 match self {
4011 Self::Unspecified => std::option::Option::Some(0),
4012 Self::Gvisor => std::option::Option::Some(1),
4013 Self::UnknownValue(u) => u.0.value(),
4014 }
4015 }
4016
4017 pub fn name(&self) -> std::option::Option<&str> {
4022 match self {
4023 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
4024 Self::Gvisor => std::option::Option::Some("GVISOR"),
4025 Self::UnknownValue(u) => u.0.name(),
4026 }
4027 }
4028 }
4029
4030 impl std::default::Default for Type {
4031 fn default() -> Self {
4032 use std::convert::From;
4033 Self::from(0)
4034 }
4035 }
4036
4037 impl std::fmt::Display for Type {
4038 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4039 wkt::internal::display_enum(f, self.name(), self.value())
4040 }
4041 }
4042
4043 impl std::convert::From<i32> for Type {
4044 fn from(value: i32) -> Self {
4045 match value {
4046 0 => Self::Unspecified,
4047 1 => Self::Gvisor,
4048 _ => Self::UnknownValue(r#type::UnknownValue(
4049 wkt::internal::UnknownEnumValue::Integer(value),
4050 )),
4051 }
4052 }
4053 }
4054
4055 impl std::convert::From<&str> for Type {
4056 fn from(value: &str) -> Self {
4057 use std::string::ToString;
4058 match value {
4059 "UNSPECIFIED" => Self::Unspecified,
4060 "GVISOR" => Self::Gvisor,
4061 _ => Self::UnknownValue(r#type::UnknownValue(
4062 wkt::internal::UnknownEnumValue::String(value.to_string()),
4063 )),
4064 }
4065 }
4066 }
4067
4068 impl serde::ser::Serialize for Type {
4069 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4070 where
4071 S: serde::Serializer,
4072 {
4073 match self {
4074 Self::Unspecified => serializer.serialize_i32(0),
4075 Self::Gvisor => serializer.serialize_i32(1),
4076 Self::UnknownValue(u) => u.0.serialize(serializer),
4077 }
4078 }
4079 }
4080
4081 impl<'de> serde::de::Deserialize<'de> for Type {
4082 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4083 where
4084 D: serde::Deserializer<'de>,
4085 {
4086 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
4087 ".google.container.v1.SandboxConfig.Type",
4088 ))
4089 }
4090 }
4091}
4092
4093#[derive(Clone, Default, PartialEq)]
4096#[non_exhaustive]
4097pub struct GcfsConfig {
4098 pub enabled: bool,
4100
4101 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4102}
4103
4104impl GcfsConfig {
4105 pub fn new() -> Self {
4106 std::default::Default::default()
4107 }
4108
4109 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4111 self.enabled = v.into();
4112 self
4113 }
4114}
4115
4116impl wkt::message::Message for GcfsConfig {
4117 fn typename() -> &'static str {
4118 "type.googleapis.com/google.container.v1.GcfsConfig"
4119 }
4120}
4121
4122#[derive(Clone, Default, PartialEq)]
4126#[non_exhaustive]
4127pub struct ReservationAffinity {
4128 pub consume_reservation_type: crate::model::reservation_affinity::Type,
4130
4131 pub key: std::string::String,
4136
4137 pub values: std::vec::Vec<std::string::String>,
4139
4140 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4141}
4142
4143impl ReservationAffinity {
4144 pub fn new() -> Self {
4145 std::default::Default::default()
4146 }
4147
4148 pub fn set_consume_reservation_type<
4150 T: std::convert::Into<crate::model::reservation_affinity::Type>,
4151 >(
4152 mut self,
4153 v: T,
4154 ) -> Self {
4155 self.consume_reservation_type = v.into();
4156 self
4157 }
4158
4159 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4161 self.key = v.into();
4162 self
4163 }
4164
4165 pub fn set_values<T, V>(mut self, v: T) -> Self
4167 where
4168 T: std::iter::IntoIterator<Item = V>,
4169 V: std::convert::Into<std::string::String>,
4170 {
4171 use std::iter::Iterator;
4172 self.values = v.into_iter().map(|i| i.into()).collect();
4173 self
4174 }
4175}
4176
4177impl wkt::message::Message for ReservationAffinity {
4178 fn typename() -> &'static str {
4179 "type.googleapis.com/google.container.v1.ReservationAffinity"
4180 }
4181}
4182
4183pub mod reservation_affinity {
4185 #[allow(unused_imports)]
4186 use super::*;
4187
4188 #[derive(Clone, Debug, PartialEq)]
4204 #[non_exhaustive]
4205 pub enum Type {
4206 Unspecified,
4208 NoReservation,
4210 AnyReservation,
4212 SpecificReservation,
4215 UnknownValue(r#type::UnknownValue),
4220 }
4221
4222 #[doc(hidden)]
4223 pub mod r#type {
4224 #[allow(unused_imports)]
4225 use super::*;
4226 #[derive(Clone, Debug, PartialEq)]
4227 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4228 }
4229
4230 impl Type {
4231 pub fn value(&self) -> std::option::Option<i32> {
4236 match self {
4237 Self::Unspecified => std::option::Option::Some(0),
4238 Self::NoReservation => std::option::Option::Some(1),
4239 Self::AnyReservation => std::option::Option::Some(2),
4240 Self::SpecificReservation => std::option::Option::Some(3),
4241 Self::UnknownValue(u) => u.0.value(),
4242 }
4243 }
4244
4245 pub fn name(&self) -> std::option::Option<&str> {
4250 match self {
4251 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
4252 Self::NoReservation => std::option::Option::Some("NO_RESERVATION"),
4253 Self::AnyReservation => std::option::Option::Some("ANY_RESERVATION"),
4254 Self::SpecificReservation => std::option::Option::Some("SPECIFIC_RESERVATION"),
4255 Self::UnknownValue(u) => u.0.name(),
4256 }
4257 }
4258 }
4259
4260 impl std::default::Default for Type {
4261 fn default() -> Self {
4262 use std::convert::From;
4263 Self::from(0)
4264 }
4265 }
4266
4267 impl std::fmt::Display for Type {
4268 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4269 wkt::internal::display_enum(f, self.name(), self.value())
4270 }
4271 }
4272
4273 impl std::convert::From<i32> for Type {
4274 fn from(value: i32) -> Self {
4275 match value {
4276 0 => Self::Unspecified,
4277 1 => Self::NoReservation,
4278 2 => Self::AnyReservation,
4279 3 => Self::SpecificReservation,
4280 _ => Self::UnknownValue(r#type::UnknownValue(
4281 wkt::internal::UnknownEnumValue::Integer(value),
4282 )),
4283 }
4284 }
4285 }
4286
4287 impl std::convert::From<&str> for Type {
4288 fn from(value: &str) -> Self {
4289 use std::string::ToString;
4290 match value {
4291 "UNSPECIFIED" => Self::Unspecified,
4292 "NO_RESERVATION" => Self::NoReservation,
4293 "ANY_RESERVATION" => Self::AnyReservation,
4294 "SPECIFIC_RESERVATION" => Self::SpecificReservation,
4295 _ => Self::UnknownValue(r#type::UnknownValue(
4296 wkt::internal::UnknownEnumValue::String(value.to_string()),
4297 )),
4298 }
4299 }
4300 }
4301
4302 impl serde::ser::Serialize for Type {
4303 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4304 where
4305 S: serde::Serializer,
4306 {
4307 match self {
4308 Self::Unspecified => serializer.serialize_i32(0),
4309 Self::NoReservation => serializer.serialize_i32(1),
4310 Self::AnyReservation => serializer.serialize_i32(2),
4311 Self::SpecificReservation => serializer.serialize_i32(3),
4312 Self::UnknownValue(u) => u.0.serialize(serializer),
4313 }
4314 }
4315 }
4316
4317 impl<'de> serde::de::Deserialize<'de> for Type {
4318 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4319 where
4320 D: serde::Deserializer<'de>,
4321 {
4322 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
4323 ".google.container.v1.ReservationAffinity.Type",
4324 ))
4325 }
4326 }
4327}
4328
4329#[derive(Clone, Default, PartialEq)]
4332#[non_exhaustive]
4333pub struct SoleTenantConfig {
4334 pub node_affinities: std::vec::Vec<crate::model::sole_tenant_config::NodeAffinity>,
4336
4337 pub min_node_cpus: std::option::Option<i32>,
4341
4342 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4343}
4344
4345impl SoleTenantConfig {
4346 pub fn new() -> Self {
4347 std::default::Default::default()
4348 }
4349
4350 pub fn set_node_affinities<T, V>(mut self, v: T) -> Self
4352 where
4353 T: std::iter::IntoIterator<Item = V>,
4354 V: std::convert::Into<crate::model::sole_tenant_config::NodeAffinity>,
4355 {
4356 use std::iter::Iterator;
4357 self.node_affinities = v.into_iter().map(|i| i.into()).collect();
4358 self
4359 }
4360
4361 pub fn set_min_node_cpus<T>(mut self, v: T) -> Self
4363 where
4364 T: std::convert::Into<i32>,
4365 {
4366 self.min_node_cpus = std::option::Option::Some(v.into());
4367 self
4368 }
4369
4370 pub fn set_or_clear_min_node_cpus<T>(mut self, v: std::option::Option<T>) -> Self
4372 where
4373 T: std::convert::Into<i32>,
4374 {
4375 self.min_node_cpus = v.map(|x| x.into());
4376 self
4377 }
4378}
4379
4380impl wkt::message::Message for SoleTenantConfig {
4381 fn typename() -> &'static str {
4382 "type.googleapis.com/google.container.v1.SoleTenantConfig"
4383 }
4384}
4385
4386pub mod sole_tenant_config {
4388 #[allow(unused_imports)]
4389 use super::*;
4390
4391 #[derive(Clone, Default, PartialEq)]
4395 #[non_exhaustive]
4396 pub struct NodeAffinity {
4397 pub key: std::string::String,
4399
4400 pub operator: crate::model::sole_tenant_config::node_affinity::Operator,
4402
4403 pub values: std::vec::Vec<std::string::String>,
4405
4406 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4407 }
4408
4409 impl NodeAffinity {
4410 pub fn new() -> Self {
4411 std::default::Default::default()
4412 }
4413
4414 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4416 self.key = v.into();
4417 self
4418 }
4419
4420 pub fn set_operator<
4422 T: std::convert::Into<crate::model::sole_tenant_config::node_affinity::Operator>,
4423 >(
4424 mut self,
4425 v: T,
4426 ) -> Self {
4427 self.operator = v.into();
4428 self
4429 }
4430
4431 pub fn set_values<T, V>(mut self, v: T) -> Self
4433 where
4434 T: std::iter::IntoIterator<Item = V>,
4435 V: std::convert::Into<std::string::String>,
4436 {
4437 use std::iter::Iterator;
4438 self.values = v.into_iter().map(|i| i.into()).collect();
4439 self
4440 }
4441 }
4442
4443 impl wkt::message::Message for NodeAffinity {
4444 fn typename() -> &'static str {
4445 "type.googleapis.com/google.container.v1.SoleTenantConfig.NodeAffinity"
4446 }
4447 }
4448
4449 pub mod node_affinity {
4451 #[allow(unused_imports)]
4452 use super::*;
4453
4454 #[derive(Clone, Debug, PartialEq)]
4471 #[non_exhaustive]
4472 pub enum Operator {
4473 Unspecified,
4475 In,
4477 NotIn,
4479 UnknownValue(operator::UnknownValue),
4484 }
4485
4486 #[doc(hidden)]
4487 pub mod operator {
4488 #[allow(unused_imports)]
4489 use super::*;
4490 #[derive(Clone, Debug, PartialEq)]
4491 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4492 }
4493
4494 impl Operator {
4495 pub fn value(&self) -> std::option::Option<i32> {
4500 match self {
4501 Self::Unspecified => std::option::Option::Some(0),
4502 Self::In => std::option::Option::Some(1),
4503 Self::NotIn => std::option::Option::Some(2),
4504 Self::UnknownValue(u) => u.0.value(),
4505 }
4506 }
4507
4508 pub fn name(&self) -> std::option::Option<&str> {
4513 match self {
4514 Self::Unspecified => std::option::Option::Some("OPERATOR_UNSPECIFIED"),
4515 Self::In => std::option::Option::Some("IN"),
4516 Self::NotIn => std::option::Option::Some("NOT_IN"),
4517 Self::UnknownValue(u) => u.0.name(),
4518 }
4519 }
4520 }
4521
4522 impl std::default::Default for Operator {
4523 fn default() -> Self {
4524 use std::convert::From;
4525 Self::from(0)
4526 }
4527 }
4528
4529 impl std::fmt::Display for Operator {
4530 fn fmt(
4531 &self,
4532 f: &mut std::fmt::Formatter<'_>,
4533 ) -> std::result::Result<(), std::fmt::Error> {
4534 wkt::internal::display_enum(f, self.name(), self.value())
4535 }
4536 }
4537
4538 impl std::convert::From<i32> for Operator {
4539 fn from(value: i32) -> Self {
4540 match value {
4541 0 => Self::Unspecified,
4542 1 => Self::In,
4543 2 => Self::NotIn,
4544 _ => Self::UnknownValue(operator::UnknownValue(
4545 wkt::internal::UnknownEnumValue::Integer(value),
4546 )),
4547 }
4548 }
4549 }
4550
4551 impl std::convert::From<&str> for Operator {
4552 fn from(value: &str) -> Self {
4553 use std::string::ToString;
4554 match value {
4555 "OPERATOR_UNSPECIFIED" => Self::Unspecified,
4556 "IN" => Self::In,
4557 "NOT_IN" => Self::NotIn,
4558 _ => Self::UnknownValue(operator::UnknownValue(
4559 wkt::internal::UnknownEnumValue::String(value.to_string()),
4560 )),
4561 }
4562 }
4563 }
4564
4565 impl serde::ser::Serialize for Operator {
4566 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4567 where
4568 S: serde::Serializer,
4569 {
4570 match self {
4571 Self::Unspecified => serializer.serialize_i32(0),
4572 Self::In => serializer.serialize_i32(1),
4573 Self::NotIn => serializer.serialize_i32(2),
4574 Self::UnknownValue(u) => u.0.serialize(serializer),
4575 }
4576 }
4577 }
4578
4579 impl<'de> serde::de::Deserialize<'de> for Operator {
4580 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4581 where
4582 D: serde::Deserializer<'de>,
4583 {
4584 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operator>::new(
4585 ".google.container.v1.SoleTenantConfig.NodeAffinity.Operator",
4586 ))
4587 }
4588 }
4589 }
4590}
4591
4592#[derive(Clone, Default, PartialEq)]
4594#[non_exhaustive]
4595pub struct ContainerdConfig {
4596 pub private_registry_access_config:
4599 std::option::Option<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4600
4601 pub writable_cgroups: std::option::Option<crate::model::containerd_config::WritableCgroups>,
4604
4605 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4606}
4607
4608impl ContainerdConfig {
4609 pub fn new() -> Self {
4610 std::default::Default::default()
4611 }
4612
4613 pub fn set_private_registry_access_config<T>(mut self, v: T) -> Self
4615 where
4616 T: std::convert::Into<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4617 {
4618 self.private_registry_access_config = std::option::Option::Some(v.into());
4619 self
4620 }
4621
4622 pub fn set_or_clear_private_registry_access_config<T>(
4624 mut self,
4625 v: std::option::Option<T>,
4626 ) -> Self
4627 where
4628 T: std::convert::Into<crate::model::containerd_config::PrivateRegistryAccessConfig>,
4629 {
4630 self.private_registry_access_config = v.map(|x| x.into());
4631 self
4632 }
4633
4634 pub fn set_writable_cgroups<T>(mut self, v: T) -> Self
4636 where
4637 T: std::convert::Into<crate::model::containerd_config::WritableCgroups>,
4638 {
4639 self.writable_cgroups = std::option::Option::Some(v.into());
4640 self
4641 }
4642
4643 pub fn set_or_clear_writable_cgroups<T>(mut self, v: std::option::Option<T>) -> Self
4645 where
4646 T: std::convert::Into<crate::model::containerd_config::WritableCgroups>,
4647 {
4648 self.writable_cgroups = v.map(|x| x.into());
4649 self
4650 }
4651}
4652
4653impl wkt::message::Message for ContainerdConfig {
4654 fn typename() -> &'static str {
4655 "type.googleapis.com/google.container.v1.ContainerdConfig"
4656 }
4657}
4658
4659pub mod containerd_config {
4661 #[allow(unused_imports)]
4662 use super::*;
4663
4664 #[derive(Clone, Default, PartialEq)]
4667 #[non_exhaustive]
4668 pub struct PrivateRegistryAccessConfig {
4669
4670 pub enabled: bool,
4672
4673 pub certificate_authority_domain_config: std::vec::Vec<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>,
4675
4676 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4677 }
4678
4679 impl PrivateRegistryAccessConfig {
4680 pub fn new() -> Self {
4681 std::default::Default::default()
4682 }
4683
4684 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4686 self.enabled = v.into();
4687 self
4688 }
4689
4690 pub fn set_certificate_authority_domain_config<T, V>(mut self, v: T) -> Self
4692 where
4693 T: std::iter::IntoIterator<Item = V>,
4694 V: std::convert::Into<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>
4695 {
4696 use std::iter::Iterator;
4697 self.certificate_authority_domain_config = v.into_iter().map(|i| i.into()).collect();
4698 self
4699 }
4700 }
4701
4702 impl wkt::message::Message for PrivateRegistryAccessConfig {
4703 fn typename() -> &'static str {
4704 "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig"
4705 }
4706 }
4707
4708 pub mod private_registry_access_config {
4710 #[allow(unused_imports)]
4711 use super::*;
4712
4713 #[derive(Clone, Default, PartialEq)]
4716 #[non_exhaustive]
4717 pub struct CertificateAuthorityDomainConfig {
4718
4719 pub fqdns: std::vec::Vec<std::string::String>,
4727
4728 pub certificate_config: std::option::Option<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig>,
4732
4733 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4734 }
4735
4736 impl CertificateAuthorityDomainConfig {
4737 pub fn new() -> Self {
4738 std::default::Default::default()
4739 }
4740
4741 pub fn set_fqdns<T, V>(mut self, v: T) -> Self
4743 where
4744 T: std::iter::IntoIterator<Item = V>,
4745 V: std::convert::Into<std::string::String>,
4746 {
4747 use std::iter::Iterator;
4748 self.fqdns = v.into_iter().map(|i| i.into()).collect();
4749 self
4750 }
4751
4752 pub fn set_certificate_config<T: std::convert::Into<std::option::Option<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig>>>(mut self, v: T) -> Self
4757 {
4758 self.certificate_config = v.into();
4759 self
4760 }
4761
4762 pub fn gcp_secret_manager_certificate_config(&self) -> std::option::Option<&std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>>{
4766 #[allow(unreachable_patterns)]
4767 self.certificate_config.as_ref().and_then(|v| match v {
4768 crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(v) => std::option::Option::Some(v),
4769 _ => std::option::Option::None,
4770 })
4771 }
4772
4773 pub fn set_gcp_secret_manager_certificate_config<T: std::convert::Into<std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>>>(mut self, v: T) -> Self{
4779 self.certificate_config = std::option::Option::Some(
4780 crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(
4781 v.into()
4782 )
4783 );
4784 self
4785 }
4786 }
4787
4788 impl wkt::message::Message for CertificateAuthorityDomainConfig {
4789 fn typename() -> &'static str {
4790 "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"
4791 }
4792 }
4793
4794 pub mod certificate_authority_domain_config {
4796 #[allow(unused_imports)]
4797 use super::*;
4798
4799 #[derive(Clone, Default, PartialEq)]
4802 #[non_exhaustive]
4803 pub struct GCPSecretManagerCertificateConfig {
4804 pub secret_uri: std::string::String,
4808
4809 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4810 }
4811
4812 impl GCPSecretManagerCertificateConfig {
4813 pub fn new() -> Self {
4814 std::default::Default::default()
4815 }
4816
4817 pub fn set_secret_uri<T: std::convert::Into<std::string::String>>(
4819 mut self,
4820 v: T,
4821 ) -> Self {
4822 self.secret_uri = v.into();
4823 self
4824 }
4825 }
4826
4827 impl wkt::message::Message for GCPSecretManagerCertificateConfig {
4828 fn typename() -> &'static str {
4829 "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"
4830 }
4831 }
4832
4833 #[derive(Clone, Debug, PartialEq)]
4837 #[non_exhaustive]
4838 pub enum CertificateConfig {
4839 GcpSecretManagerCertificateConfig(std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>),
4841 }
4842 }
4843 }
4844
4845 #[derive(Clone, Default, PartialEq)]
4847 #[non_exhaustive]
4848 pub struct WritableCgroups {
4849 pub enabled: bool,
4851
4852 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4853 }
4854
4855 impl WritableCgroups {
4856 pub fn new() -> Self {
4857 std::default::Default::default()
4858 }
4859
4860 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4862 self.enabled = v.into();
4863 self
4864 }
4865 }
4866
4867 impl wkt::message::Message for WritableCgroups {
4868 fn typename() -> &'static str {
4869 "type.googleapis.com/google.container.v1.ContainerdConfig.WritableCgroups"
4870 }
4871 }
4872}
4873
4874#[derive(Clone, Default, PartialEq)]
4881#[non_exhaustive]
4882pub struct NodeTaint {
4883 pub key: std::string::String,
4885
4886 pub value: std::string::String,
4888
4889 pub effect: crate::model::node_taint::Effect,
4891
4892 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4893}
4894
4895impl NodeTaint {
4896 pub fn new() -> Self {
4897 std::default::Default::default()
4898 }
4899
4900 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4902 self.key = v.into();
4903 self
4904 }
4905
4906 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4908 self.value = v.into();
4909 self
4910 }
4911
4912 pub fn set_effect<T: std::convert::Into<crate::model::node_taint::Effect>>(
4914 mut self,
4915 v: T,
4916 ) -> Self {
4917 self.effect = v.into();
4918 self
4919 }
4920}
4921
4922impl wkt::message::Message for NodeTaint {
4923 fn typename() -> &'static str {
4924 "type.googleapis.com/google.container.v1.NodeTaint"
4925 }
4926}
4927
4928pub mod node_taint {
4930 #[allow(unused_imports)]
4931 use super::*;
4932
4933 #[derive(Clone, Debug, PartialEq)]
4949 #[non_exhaustive]
4950 pub enum Effect {
4951 Unspecified,
4953 NoSchedule,
4955 PreferNoSchedule,
4957 NoExecute,
4959 UnknownValue(effect::UnknownValue),
4964 }
4965
4966 #[doc(hidden)]
4967 pub mod effect {
4968 #[allow(unused_imports)]
4969 use super::*;
4970 #[derive(Clone, Debug, PartialEq)]
4971 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4972 }
4973
4974 impl Effect {
4975 pub fn value(&self) -> std::option::Option<i32> {
4980 match self {
4981 Self::Unspecified => std::option::Option::Some(0),
4982 Self::NoSchedule => std::option::Option::Some(1),
4983 Self::PreferNoSchedule => std::option::Option::Some(2),
4984 Self::NoExecute => std::option::Option::Some(3),
4985 Self::UnknownValue(u) => u.0.value(),
4986 }
4987 }
4988
4989 pub fn name(&self) -> std::option::Option<&str> {
4994 match self {
4995 Self::Unspecified => std::option::Option::Some("EFFECT_UNSPECIFIED"),
4996 Self::NoSchedule => std::option::Option::Some("NO_SCHEDULE"),
4997 Self::PreferNoSchedule => std::option::Option::Some("PREFER_NO_SCHEDULE"),
4998 Self::NoExecute => std::option::Option::Some("NO_EXECUTE"),
4999 Self::UnknownValue(u) => u.0.name(),
5000 }
5001 }
5002 }
5003
5004 impl std::default::Default for Effect {
5005 fn default() -> Self {
5006 use std::convert::From;
5007 Self::from(0)
5008 }
5009 }
5010
5011 impl std::fmt::Display for Effect {
5012 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5013 wkt::internal::display_enum(f, self.name(), self.value())
5014 }
5015 }
5016
5017 impl std::convert::From<i32> for Effect {
5018 fn from(value: i32) -> Self {
5019 match value {
5020 0 => Self::Unspecified,
5021 1 => Self::NoSchedule,
5022 2 => Self::PreferNoSchedule,
5023 3 => Self::NoExecute,
5024 _ => Self::UnknownValue(effect::UnknownValue(
5025 wkt::internal::UnknownEnumValue::Integer(value),
5026 )),
5027 }
5028 }
5029 }
5030
5031 impl std::convert::From<&str> for Effect {
5032 fn from(value: &str) -> Self {
5033 use std::string::ToString;
5034 match value {
5035 "EFFECT_UNSPECIFIED" => Self::Unspecified,
5036 "NO_SCHEDULE" => Self::NoSchedule,
5037 "PREFER_NO_SCHEDULE" => Self::PreferNoSchedule,
5038 "NO_EXECUTE" => Self::NoExecute,
5039 _ => Self::UnknownValue(effect::UnknownValue(
5040 wkt::internal::UnknownEnumValue::String(value.to_string()),
5041 )),
5042 }
5043 }
5044 }
5045
5046 impl serde::ser::Serialize for Effect {
5047 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5048 where
5049 S: serde::Serializer,
5050 {
5051 match self {
5052 Self::Unspecified => serializer.serialize_i32(0),
5053 Self::NoSchedule => serializer.serialize_i32(1),
5054 Self::PreferNoSchedule => serializer.serialize_i32(2),
5055 Self::NoExecute => serializer.serialize_i32(3),
5056 Self::UnknownValue(u) => u.0.serialize(serializer),
5057 }
5058 }
5059 }
5060
5061 impl<'de> serde::de::Deserialize<'de> for Effect {
5062 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5063 where
5064 D: serde::Deserializer<'de>,
5065 {
5066 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Effect>::new(
5067 ".google.container.v1.NodeTaint.Effect",
5068 ))
5069 }
5070 }
5071}
5072
5073#[derive(Clone, Default, PartialEq)]
5076#[non_exhaustive]
5077pub struct NodeTaints {
5078 pub taints: std::vec::Vec<crate::model::NodeTaint>,
5080
5081 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5082}
5083
5084impl NodeTaints {
5085 pub fn new() -> Self {
5086 std::default::Default::default()
5087 }
5088
5089 pub fn set_taints<T, V>(mut self, v: T) -> Self
5091 where
5092 T: std::iter::IntoIterator<Item = V>,
5093 V: std::convert::Into<crate::model::NodeTaint>,
5094 {
5095 use std::iter::Iterator;
5096 self.taints = v.into_iter().map(|i| i.into()).collect();
5097 self
5098 }
5099}
5100
5101impl wkt::message::Message for NodeTaints {
5102 fn typename() -> &'static str {
5103 "type.googleapis.com/google.container.v1.NodeTaints"
5104 }
5105}
5106
5107#[derive(Clone, Default, PartialEq)]
5110#[non_exhaustive]
5111pub struct NodeLabels {
5112 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5114
5115 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5116}
5117
5118impl NodeLabels {
5119 pub fn new() -> Self {
5120 std::default::Default::default()
5121 }
5122
5123 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5125 where
5126 T: std::iter::IntoIterator<Item = (K, V)>,
5127 K: std::convert::Into<std::string::String>,
5128 V: std::convert::Into<std::string::String>,
5129 {
5130 use std::iter::Iterator;
5131 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5132 self
5133 }
5134}
5135
5136impl wkt::message::Message for NodeLabels {
5137 fn typename() -> &'static str {
5138 "type.googleapis.com/google.container.v1.NodeLabels"
5139 }
5140}
5141
5142#[derive(Clone, Default, PartialEq)]
5145#[non_exhaustive]
5146pub struct ResourceLabels {
5147 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5149
5150 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5151}
5152
5153impl ResourceLabels {
5154 pub fn new() -> Self {
5155 std::default::Default::default()
5156 }
5157
5158 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5160 where
5161 T: std::iter::IntoIterator<Item = (K, V)>,
5162 K: std::convert::Into<std::string::String>,
5163 V: std::convert::Into<std::string::String>,
5164 {
5165 use std::iter::Iterator;
5166 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5167 self
5168 }
5169}
5170
5171impl wkt::message::Message for ResourceLabels {
5172 fn typename() -> &'static str {
5173 "type.googleapis.com/google.container.v1.ResourceLabels"
5174 }
5175}
5176
5177#[derive(Clone, Default, PartialEq)]
5180#[non_exhaustive]
5181pub struct NetworkTags {
5182 pub tags: std::vec::Vec<std::string::String>,
5184
5185 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5186}
5187
5188impl NetworkTags {
5189 pub fn new() -> Self {
5190 std::default::Default::default()
5191 }
5192
5193 pub fn set_tags<T, V>(mut self, v: T) -> Self
5195 where
5196 T: std::iter::IntoIterator<Item = V>,
5197 V: std::convert::Into<std::string::String>,
5198 {
5199 use std::iter::Iterator;
5200 self.tags = v.into_iter().map(|i| i.into()).collect();
5201 self
5202 }
5203}
5204
5205impl wkt::message::Message for NetworkTags {
5206 fn typename() -> &'static str {
5207 "type.googleapis.com/google.container.v1.NetworkTags"
5208 }
5209}
5210
5211#[derive(Clone, Default, PartialEq)]
5215#[non_exhaustive]
5216pub struct MasterAuth {
5217 #[deprecated]
5226 pub username: std::string::String,
5227
5228 #[deprecated]
5238 pub password: std::string::String,
5239
5240 pub client_certificate_config: std::option::Option<crate::model::ClientCertificateConfig>,
5244
5245 pub cluster_ca_certificate: std::string::String,
5248
5249 pub client_certificate: std::string::String,
5253
5254 pub client_key: std::string::String,
5257
5258 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5259}
5260
5261impl MasterAuth {
5262 pub fn new() -> Self {
5263 std::default::Default::default()
5264 }
5265
5266 #[deprecated]
5268 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5269 self.username = v.into();
5270 self
5271 }
5272
5273 #[deprecated]
5275 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5276 self.password = v.into();
5277 self
5278 }
5279
5280 pub fn set_client_certificate_config<T>(mut self, v: T) -> Self
5282 where
5283 T: std::convert::Into<crate::model::ClientCertificateConfig>,
5284 {
5285 self.client_certificate_config = std::option::Option::Some(v.into());
5286 self
5287 }
5288
5289 pub fn set_or_clear_client_certificate_config<T>(mut self, v: std::option::Option<T>) -> Self
5291 where
5292 T: std::convert::Into<crate::model::ClientCertificateConfig>,
5293 {
5294 self.client_certificate_config = v.map(|x| x.into());
5295 self
5296 }
5297
5298 pub fn set_cluster_ca_certificate<T: std::convert::Into<std::string::String>>(
5300 mut self,
5301 v: T,
5302 ) -> Self {
5303 self.cluster_ca_certificate = v.into();
5304 self
5305 }
5306
5307 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
5309 mut self,
5310 v: T,
5311 ) -> Self {
5312 self.client_certificate = v.into();
5313 self
5314 }
5315
5316 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5318 self.client_key = v.into();
5319 self
5320 }
5321}
5322
5323impl wkt::message::Message for MasterAuth {
5324 fn typename() -> &'static str {
5325 "type.googleapis.com/google.container.v1.MasterAuth"
5326 }
5327}
5328
5329#[derive(Clone, Default, PartialEq)]
5331#[non_exhaustive]
5332pub struct ClientCertificateConfig {
5333 pub issue_client_certificate: bool,
5335
5336 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5337}
5338
5339impl ClientCertificateConfig {
5340 pub fn new() -> Self {
5341 std::default::Default::default()
5342 }
5343
5344 pub fn set_issue_client_certificate<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5346 self.issue_client_certificate = v.into();
5347 self
5348 }
5349}
5350
5351impl wkt::message::Message for ClientCertificateConfig {
5352 fn typename() -> &'static str {
5353 "type.googleapis.com/google.container.v1.ClientCertificateConfig"
5354 }
5355}
5356
5357#[derive(Clone, Default, PartialEq)]
5360#[non_exhaustive]
5361pub struct AddonsConfig {
5362 pub http_load_balancing: std::option::Option<crate::model::HttpLoadBalancing>,
5365
5366 pub horizontal_pod_autoscaling: std::option::Option<crate::model::HorizontalPodAutoscaling>,
5370
5371 #[deprecated]
5377 pub kubernetes_dashboard: std::option::Option<crate::model::KubernetesDashboard>,
5378
5379 pub network_policy_config: std::option::Option<crate::model::NetworkPolicyConfig>,
5383
5384 pub cloud_run_config: std::option::Option<crate::model::CloudRunConfig>,
5387
5388 pub dns_cache_config: std::option::Option<crate::model::DnsCacheConfig>,
5390
5391 pub config_connector_config: std::option::Option<crate::model::ConfigConnectorConfig>,
5395
5396 pub gce_persistent_disk_csi_driver_config:
5398 std::option::Option<crate::model::GcePersistentDiskCsiDriverConfig>,
5399
5400 pub gcp_filestore_csi_driver_config:
5402 std::option::Option<crate::model::GcpFilestoreCsiDriverConfig>,
5403
5404 pub gke_backup_agent_config: std::option::Option<crate::model::GkeBackupAgentConfig>,
5406
5407 pub gcs_fuse_csi_driver_config: std::option::Option<crate::model::GcsFuseCsiDriverConfig>,
5409
5410 pub stateful_ha_config: std::option::Option<crate::model::StatefulHAConfig>,
5412
5413 pub parallelstore_csi_driver_config:
5415 std::option::Option<crate::model::ParallelstoreCsiDriverConfig>,
5416
5417 pub ray_operator_config: std::option::Option<crate::model::RayOperatorConfig>,
5419
5420 pub high_scale_checkpointing_config:
5422 std::option::Option<crate::model::HighScaleCheckpointingConfig>,
5423
5424 pub lustre_csi_driver_config: std::option::Option<crate::model::LustreCsiDriverConfig>,
5426
5427 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5428}
5429
5430impl AddonsConfig {
5431 pub fn new() -> Self {
5432 std::default::Default::default()
5433 }
5434
5435 pub fn set_http_load_balancing<T>(mut self, v: T) -> Self
5437 where
5438 T: std::convert::Into<crate::model::HttpLoadBalancing>,
5439 {
5440 self.http_load_balancing = std::option::Option::Some(v.into());
5441 self
5442 }
5443
5444 pub fn set_or_clear_http_load_balancing<T>(mut self, v: std::option::Option<T>) -> Self
5446 where
5447 T: std::convert::Into<crate::model::HttpLoadBalancing>,
5448 {
5449 self.http_load_balancing = v.map(|x| x.into());
5450 self
5451 }
5452
5453 pub fn set_horizontal_pod_autoscaling<T>(mut self, v: T) -> Self
5455 where
5456 T: std::convert::Into<crate::model::HorizontalPodAutoscaling>,
5457 {
5458 self.horizontal_pod_autoscaling = std::option::Option::Some(v.into());
5459 self
5460 }
5461
5462 pub fn set_or_clear_horizontal_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
5464 where
5465 T: std::convert::Into<crate::model::HorizontalPodAutoscaling>,
5466 {
5467 self.horizontal_pod_autoscaling = v.map(|x| x.into());
5468 self
5469 }
5470
5471 #[deprecated]
5473 pub fn set_kubernetes_dashboard<T>(mut self, v: T) -> Self
5474 where
5475 T: std::convert::Into<crate::model::KubernetesDashboard>,
5476 {
5477 self.kubernetes_dashboard = std::option::Option::Some(v.into());
5478 self
5479 }
5480
5481 #[deprecated]
5483 pub fn set_or_clear_kubernetes_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
5484 where
5485 T: std::convert::Into<crate::model::KubernetesDashboard>,
5486 {
5487 self.kubernetes_dashboard = v.map(|x| x.into());
5488 self
5489 }
5490
5491 pub fn set_network_policy_config<T>(mut self, v: T) -> Self
5493 where
5494 T: std::convert::Into<crate::model::NetworkPolicyConfig>,
5495 {
5496 self.network_policy_config = std::option::Option::Some(v.into());
5497 self
5498 }
5499
5500 pub fn set_or_clear_network_policy_config<T>(mut self, v: std::option::Option<T>) -> Self
5502 where
5503 T: std::convert::Into<crate::model::NetworkPolicyConfig>,
5504 {
5505 self.network_policy_config = v.map(|x| x.into());
5506 self
5507 }
5508
5509 pub fn set_cloud_run_config<T>(mut self, v: T) -> Self
5511 where
5512 T: std::convert::Into<crate::model::CloudRunConfig>,
5513 {
5514 self.cloud_run_config = std::option::Option::Some(v.into());
5515 self
5516 }
5517
5518 pub fn set_or_clear_cloud_run_config<T>(mut self, v: std::option::Option<T>) -> Self
5520 where
5521 T: std::convert::Into<crate::model::CloudRunConfig>,
5522 {
5523 self.cloud_run_config = v.map(|x| x.into());
5524 self
5525 }
5526
5527 pub fn set_dns_cache_config<T>(mut self, v: T) -> Self
5529 where
5530 T: std::convert::Into<crate::model::DnsCacheConfig>,
5531 {
5532 self.dns_cache_config = std::option::Option::Some(v.into());
5533 self
5534 }
5535
5536 pub fn set_or_clear_dns_cache_config<T>(mut self, v: std::option::Option<T>) -> Self
5538 where
5539 T: std::convert::Into<crate::model::DnsCacheConfig>,
5540 {
5541 self.dns_cache_config = v.map(|x| x.into());
5542 self
5543 }
5544
5545 pub fn set_config_connector_config<T>(mut self, v: T) -> Self
5547 where
5548 T: std::convert::Into<crate::model::ConfigConnectorConfig>,
5549 {
5550 self.config_connector_config = std::option::Option::Some(v.into());
5551 self
5552 }
5553
5554 pub fn set_or_clear_config_connector_config<T>(mut self, v: std::option::Option<T>) -> Self
5556 where
5557 T: std::convert::Into<crate::model::ConfigConnectorConfig>,
5558 {
5559 self.config_connector_config = v.map(|x| x.into());
5560 self
5561 }
5562
5563 pub fn set_gce_persistent_disk_csi_driver_config<T>(mut self, v: T) -> Self
5565 where
5566 T: std::convert::Into<crate::model::GcePersistentDiskCsiDriverConfig>,
5567 {
5568 self.gce_persistent_disk_csi_driver_config = std::option::Option::Some(v.into());
5569 self
5570 }
5571
5572 pub fn set_or_clear_gce_persistent_disk_csi_driver_config<T>(
5574 mut self,
5575 v: std::option::Option<T>,
5576 ) -> Self
5577 where
5578 T: std::convert::Into<crate::model::GcePersistentDiskCsiDriverConfig>,
5579 {
5580 self.gce_persistent_disk_csi_driver_config = v.map(|x| x.into());
5581 self
5582 }
5583
5584 pub fn set_gcp_filestore_csi_driver_config<T>(mut self, v: T) -> Self
5586 where
5587 T: std::convert::Into<crate::model::GcpFilestoreCsiDriverConfig>,
5588 {
5589 self.gcp_filestore_csi_driver_config = std::option::Option::Some(v.into());
5590 self
5591 }
5592
5593 pub fn set_or_clear_gcp_filestore_csi_driver_config<T>(
5595 mut self,
5596 v: std::option::Option<T>,
5597 ) -> Self
5598 where
5599 T: std::convert::Into<crate::model::GcpFilestoreCsiDriverConfig>,
5600 {
5601 self.gcp_filestore_csi_driver_config = v.map(|x| x.into());
5602 self
5603 }
5604
5605 pub fn set_gke_backup_agent_config<T>(mut self, v: T) -> Self
5607 where
5608 T: std::convert::Into<crate::model::GkeBackupAgentConfig>,
5609 {
5610 self.gke_backup_agent_config = std::option::Option::Some(v.into());
5611 self
5612 }
5613
5614 pub fn set_or_clear_gke_backup_agent_config<T>(mut self, v: std::option::Option<T>) -> Self
5616 where
5617 T: std::convert::Into<crate::model::GkeBackupAgentConfig>,
5618 {
5619 self.gke_backup_agent_config = v.map(|x| x.into());
5620 self
5621 }
5622
5623 pub fn set_gcs_fuse_csi_driver_config<T>(mut self, v: T) -> Self
5625 where
5626 T: std::convert::Into<crate::model::GcsFuseCsiDriverConfig>,
5627 {
5628 self.gcs_fuse_csi_driver_config = std::option::Option::Some(v.into());
5629 self
5630 }
5631
5632 pub fn set_or_clear_gcs_fuse_csi_driver_config<T>(mut self, v: std::option::Option<T>) -> Self
5634 where
5635 T: std::convert::Into<crate::model::GcsFuseCsiDriverConfig>,
5636 {
5637 self.gcs_fuse_csi_driver_config = v.map(|x| x.into());
5638 self
5639 }
5640
5641 pub fn set_stateful_ha_config<T>(mut self, v: T) -> Self
5643 where
5644 T: std::convert::Into<crate::model::StatefulHAConfig>,
5645 {
5646 self.stateful_ha_config = std::option::Option::Some(v.into());
5647 self
5648 }
5649
5650 pub fn set_or_clear_stateful_ha_config<T>(mut self, v: std::option::Option<T>) -> Self
5652 where
5653 T: std::convert::Into<crate::model::StatefulHAConfig>,
5654 {
5655 self.stateful_ha_config = v.map(|x| x.into());
5656 self
5657 }
5658
5659 pub fn set_parallelstore_csi_driver_config<T>(mut self, v: T) -> Self
5661 where
5662 T: std::convert::Into<crate::model::ParallelstoreCsiDriverConfig>,
5663 {
5664 self.parallelstore_csi_driver_config = std::option::Option::Some(v.into());
5665 self
5666 }
5667
5668 pub fn set_or_clear_parallelstore_csi_driver_config<T>(
5670 mut self,
5671 v: std::option::Option<T>,
5672 ) -> Self
5673 where
5674 T: std::convert::Into<crate::model::ParallelstoreCsiDriverConfig>,
5675 {
5676 self.parallelstore_csi_driver_config = v.map(|x| x.into());
5677 self
5678 }
5679
5680 pub fn set_ray_operator_config<T>(mut self, v: T) -> Self
5682 where
5683 T: std::convert::Into<crate::model::RayOperatorConfig>,
5684 {
5685 self.ray_operator_config = std::option::Option::Some(v.into());
5686 self
5687 }
5688
5689 pub fn set_or_clear_ray_operator_config<T>(mut self, v: std::option::Option<T>) -> Self
5691 where
5692 T: std::convert::Into<crate::model::RayOperatorConfig>,
5693 {
5694 self.ray_operator_config = v.map(|x| x.into());
5695 self
5696 }
5697
5698 pub fn set_high_scale_checkpointing_config<T>(mut self, v: T) -> Self
5700 where
5701 T: std::convert::Into<crate::model::HighScaleCheckpointingConfig>,
5702 {
5703 self.high_scale_checkpointing_config = std::option::Option::Some(v.into());
5704 self
5705 }
5706
5707 pub fn set_or_clear_high_scale_checkpointing_config<T>(
5709 mut self,
5710 v: std::option::Option<T>,
5711 ) -> Self
5712 where
5713 T: std::convert::Into<crate::model::HighScaleCheckpointingConfig>,
5714 {
5715 self.high_scale_checkpointing_config = v.map(|x| x.into());
5716 self
5717 }
5718
5719 pub fn set_lustre_csi_driver_config<T>(mut self, v: T) -> Self
5721 where
5722 T: std::convert::Into<crate::model::LustreCsiDriverConfig>,
5723 {
5724 self.lustre_csi_driver_config = std::option::Option::Some(v.into());
5725 self
5726 }
5727
5728 pub fn set_or_clear_lustre_csi_driver_config<T>(mut self, v: std::option::Option<T>) -> Self
5730 where
5731 T: std::convert::Into<crate::model::LustreCsiDriverConfig>,
5732 {
5733 self.lustre_csi_driver_config = v.map(|x| x.into());
5734 self
5735 }
5736}
5737
5738impl wkt::message::Message for AddonsConfig {
5739 fn typename() -> &'static str {
5740 "type.googleapis.com/google.container.v1.AddonsConfig"
5741 }
5742}
5743
5744#[derive(Clone, Default, PartialEq)]
5747#[non_exhaustive]
5748pub struct HttpLoadBalancing {
5749 pub disabled: bool,
5753
5754 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5755}
5756
5757impl HttpLoadBalancing {
5758 pub fn new() -> Self {
5759 std::default::Default::default()
5760 }
5761
5762 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5764 self.disabled = v.into();
5765 self
5766 }
5767}
5768
5769impl wkt::message::Message for HttpLoadBalancing {
5770 fn typename() -> &'static str {
5771 "type.googleapis.com/google.container.v1.HttpLoadBalancing"
5772 }
5773}
5774
5775#[derive(Clone, Default, PartialEq)]
5779#[non_exhaustive]
5780pub struct HorizontalPodAutoscaling {
5781 pub disabled: bool,
5785
5786 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5787}
5788
5789impl HorizontalPodAutoscaling {
5790 pub fn new() -> Self {
5791 std::default::Default::default()
5792 }
5793
5794 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5796 self.disabled = v.into();
5797 self
5798 }
5799}
5800
5801impl wkt::message::Message for HorizontalPodAutoscaling {
5802 fn typename() -> &'static str {
5803 "type.googleapis.com/google.container.v1.HorizontalPodAutoscaling"
5804 }
5805}
5806
5807#[derive(Clone, Default, PartialEq)]
5809#[non_exhaustive]
5810pub struct KubernetesDashboard {
5811 pub disabled: bool,
5813
5814 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5815}
5816
5817impl KubernetesDashboard {
5818 pub fn new() -> Self {
5819 std::default::Default::default()
5820 }
5821
5822 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5824 self.disabled = v.into();
5825 self
5826 }
5827}
5828
5829impl wkt::message::Message for KubernetesDashboard {
5830 fn typename() -> &'static str {
5831 "type.googleapis.com/google.container.v1.KubernetesDashboard"
5832 }
5833}
5834
5835#[derive(Clone, Default, PartialEq)]
5839#[non_exhaustive]
5840pub struct NetworkPolicyConfig {
5841 pub disabled: bool,
5843
5844 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5845}
5846
5847impl NetworkPolicyConfig {
5848 pub fn new() -> Self {
5849 std::default::Default::default()
5850 }
5851
5852 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5854 self.disabled = v.into();
5855 self
5856 }
5857}
5858
5859impl wkt::message::Message for NetworkPolicyConfig {
5860 fn typename() -> &'static str {
5861 "type.googleapis.com/google.container.v1.NetworkPolicyConfig"
5862 }
5863}
5864
5865#[derive(Clone, Default, PartialEq)]
5867#[non_exhaustive]
5868pub struct DnsCacheConfig {
5869 pub enabled: bool,
5871
5872 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5873}
5874
5875impl DnsCacheConfig {
5876 pub fn new() -> Self {
5877 std::default::Default::default()
5878 }
5879
5880 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5882 self.enabled = v.into();
5883 self
5884 }
5885}
5886
5887impl wkt::message::Message for DnsCacheConfig {
5888 fn typename() -> &'static str {
5889 "type.googleapis.com/google.container.v1.DnsCacheConfig"
5890 }
5891}
5892
5893#[derive(Clone, Default, PartialEq)]
5895#[non_exhaustive]
5896pub struct PrivateClusterMasterGlobalAccessConfig {
5897 pub enabled: bool,
5899
5900 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5901}
5902
5903impl PrivateClusterMasterGlobalAccessConfig {
5904 pub fn new() -> Self {
5905 std::default::Default::default()
5906 }
5907
5908 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5910 self.enabled = v.into();
5911 self
5912 }
5913}
5914
5915impl wkt::message::Message for PrivateClusterMasterGlobalAccessConfig {
5916 fn typename() -> &'static str {
5917 "type.googleapis.com/google.container.v1.PrivateClusterMasterGlobalAccessConfig"
5918 }
5919}
5920
5921#[derive(Clone, Default, PartialEq)]
5923#[non_exhaustive]
5924pub struct PrivateClusterConfig {
5925 #[deprecated]
5935 pub enable_private_nodes: bool,
5936
5937 #[deprecated]
5946 pub enable_private_endpoint: bool,
5947
5948 pub master_ipv4_cidr_block: std::string::String,
5953
5954 #[deprecated]
5962 pub private_endpoint: std::string::String,
5963
5964 #[deprecated]
5972 pub public_endpoint: std::string::String,
5973
5974 pub peering_name: std::string::String,
5976
5977 #[deprecated]
5983 pub master_global_access_config:
5984 std::option::Option<crate::model::PrivateClusterMasterGlobalAccessConfig>,
5985
5986 #[deprecated]
5995 pub private_endpoint_subnetwork: std::string::String,
5996
5997 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5998}
5999
6000impl PrivateClusterConfig {
6001 pub fn new() -> Self {
6002 std::default::Default::default()
6003 }
6004
6005 #[deprecated]
6007 pub fn set_enable_private_nodes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6008 self.enable_private_nodes = v.into();
6009 self
6010 }
6011
6012 #[deprecated]
6014 pub fn set_enable_private_endpoint<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6015 self.enable_private_endpoint = v.into();
6016 self
6017 }
6018
6019 pub fn set_master_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
6021 mut self,
6022 v: T,
6023 ) -> Self {
6024 self.master_ipv4_cidr_block = v.into();
6025 self
6026 }
6027
6028 #[deprecated]
6030 pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
6031 mut self,
6032 v: T,
6033 ) -> Self {
6034 self.private_endpoint = v.into();
6035 self
6036 }
6037
6038 #[deprecated]
6040 pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6041 self.public_endpoint = v.into();
6042 self
6043 }
6044
6045 pub fn set_peering_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6047 self.peering_name = v.into();
6048 self
6049 }
6050
6051 #[deprecated]
6053 pub fn set_master_global_access_config<T>(mut self, v: T) -> Self
6054 where
6055 T: std::convert::Into<crate::model::PrivateClusterMasterGlobalAccessConfig>,
6056 {
6057 self.master_global_access_config = std::option::Option::Some(v.into());
6058 self
6059 }
6060
6061 #[deprecated]
6063 pub fn set_or_clear_master_global_access_config<T>(mut self, v: std::option::Option<T>) -> Self
6064 where
6065 T: std::convert::Into<crate::model::PrivateClusterMasterGlobalAccessConfig>,
6066 {
6067 self.master_global_access_config = v.map(|x| x.into());
6068 self
6069 }
6070
6071 #[deprecated]
6073 pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
6074 mut self,
6075 v: T,
6076 ) -> Self {
6077 self.private_endpoint_subnetwork = v.into();
6078 self
6079 }
6080}
6081
6082impl wkt::message::Message for PrivateClusterConfig {
6083 fn typename() -> &'static str {
6084 "type.googleapis.com/google.container.v1.PrivateClusterConfig"
6085 }
6086}
6087
6088#[derive(Clone, Default, PartialEq)]
6090#[non_exhaustive]
6091pub struct AuthenticatorGroupsConfig {
6092 pub enabled: bool,
6095
6096 pub security_group: std::string::String,
6099
6100 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6101}
6102
6103impl AuthenticatorGroupsConfig {
6104 pub fn new() -> Self {
6105 std::default::Default::default()
6106 }
6107
6108 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6110 self.enabled = v.into();
6111 self
6112 }
6113
6114 pub fn set_security_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6116 self.security_group = v.into();
6117 self
6118 }
6119}
6120
6121impl wkt::message::Message for AuthenticatorGroupsConfig {
6122 fn typename() -> &'static str {
6123 "type.googleapis.com/google.container.v1.AuthenticatorGroupsConfig"
6124 }
6125}
6126
6127#[derive(Clone, Default, PartialEq)]
6129#[non_exhaustive]
6130pub struct CloudRunConfig {
6131 pub disabled: bool,
6133
6134 pub load_balancer_type: crate::model::cloud_run_config::LoadBalancerType,
6136
6137 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6138}
6139
6140impl CloudRunConfig {
6141 pub fn new() -> Self {
6142 std::default::Default::default()
6143 }
6144
6145 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6147 self.disabled = v.into();
6148 self
6149 }
6150
6151 pub fn set_load_balancer_type<
6153 T: std::convert::Into<crate::model::cloud_run_config::LoadBalancerType>,
6154 >(
6155 mut self,
6156 v: T,
6157 ) -> Self {
6158 self.load_balancer_type = v.into();
6159 self
6160 }
6161}
6162
6163impl wkt::message::Message for CloudRunConfig {
6164 fn typename() -> &'static str {
6165 "type.googleapis.com/google.container.v1.CloudRunConfig"
6166 }
6167}
6168
6169pub mod cloud_run_config {
6171 #[allow(unused_imports)]
6172 use super::*;
6173
6174 #[derive(Clone, Debug, PartialEq)]
6190 #[non_exhaustive]
6191 pub enum LoadBalancerType {
6192 Unspecified,
6194 External,
6196 Internal,
6198 UnknownValue(load_balancer_type::UnknownValue),
6203 }
6204
6205 #[doc(hidden)]
6206 pub mod load_balancer_type {
6207 #[allow(unused_imports)]
6208 use super::*;
6209 #[derive(Clone, Debug, PartialEq)]
6210 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6211 }
6212
6213 impl LoadBalancerType {
6214 pub fn value(&self) -> std::option::Option<i32> {
6219 match self {
6220 Self::Unspecified => std::option::Option::Some(0),
6221 Self::External => std::option::Option::Some(1),
6222 Self::Internal => std::option::Option::Some(2),
6223 Self::UnknownValue(u) => u.0.value(),
6224 }
6225 }
6226
6227 pub fn name(&self) -> std::option::Option<&str> {
6232 match self {
6233 Self::Unspecified => std::option::Option::Some("LOAD_BALANCER_TYPE_UNSPECIFIED"),
6234 Self::External => std::option::Option::Some("LOAD_BALANCER_TYPE_EXTERNAL"),
6235 Self::Internal => std::option::Option::Some("LOAD_BALANCER_TYPE_INTERNAL"),
6236 Self::UnknownValue(u) => u.0.name(),
6237 }
6238 }
6239 }
6240
6241 impl std::default::Default for LoadBalancerType {
6242 fn default() -> Self {
6243 use std::convert::From;
6244 Self::from(0)
6245 }
6246 }
6247
6248 impl std::fmt::Display for LoadBalancerType {
6249 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6250 wkt::internal::display_enum(f, self.name(), self.value())
6251 }
6252 }
6253
6254 impl std::convert::From<i32> for LoadBalancerType {
6255 fn from(value: i32) -> Self {
6256 match value {
6257 0 => Self::Unspecified,
6258 1 => Self::External,
6259 2 => Self::Internal,
6260 _ => Self::UnknownValue(load_balancer_type::UnknownValue(
6261 wkt::internal::UnknownEnumValue::Integer(value),
6262 )),
6263 }
6264 }
6265 }
6266
6267 impl std::convert::From<&str> for LoadBalancerType {
6268 fn from(value: &str) -> Self {
6269 use std::string::ToString;
6270 match value {
6271 "LOAD_BALANCER_TYPE_UNSPECIFIED" => Self::Unspecified,
6272 "LOAD_BALANCER_TYPE_EXTERNAL" => Self::External,
6273 "LOAD_BALANCER_TYPE_INTERNAL" => Self::Internal,
6274 _ => Self::UnknownValue(load_balancer_type::UnknownValue(
6275 wkt::internal::UnknownEnumValue::String(value.to_string()),
6276 )),
6277 }
6278 }
6279 }
6280
6281 impl serde::ser::Serialize for LoadBalancerType {
6282 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6283 where
6284 S: serde::Serializer,
6285 {
6286 match self {
6287 Self::Unspecified => serializer.serialize_i32(0),
6288 Self::External => serializer.serialize_i32(1),
6289 Self::Internal => serializer.serialize_i32(2),
6290 Self::UnknownValue(u) => u.0.serialize(serializer),
6291 }
6292 }
6293 }
6294
6295 impl<'de> serde::de::Deserialize<'de> for LoadBalancerType {
6296 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6297 where
6298 D: serde::Deserializer<'de>,
6299 {
6300 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoadBalancerType>::new(
6301 ".google.container.v1.CloudRunConfig.LoadBalancerType",
6302 ))
6303 }
6304 }
6305}
6306
6307#[derive(Clone, Default, PartialEq)]
6309#[non_exhaustive]
6310pub struct ConfigConnectorConfig {
6311 pub enabled: bool,
6313
6314 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6315}
6316
6317impl ConfigConnectorConfig {
6318 pub fn new() -> Self {
6319 std::default::Default::default()
6320 }
6321
6322 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6324 self.enabled = v.into();
6325 self
6326 }
6327}
6328
6329impl wkt::message::Message for ConfigConnectorConfig {
6330 fn typename() -> &'static str {
6331 "type.googleapis.com/google.container.v1.ConfigConnectorConfig"
6332 }
6333}
6334
6335#[derive(Clone, Default, PartialEq)]
6337#[non_exhaustive]
6338pub struct GcePersistentDiskCsiDriverConfig {
6339 pub enabled: bool,
6341
6342 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6343}
6344
6345impl GcePersistentDiskCsiDriverConfig {
6346 pub fn new() -> Self {
6347 std::default::Default::default()
6348 }
6349
6350 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6352 self.enabled = v.into();
6353 self
6354 }
6355}
6356
6357impl wkt::message::Message for GcePersistentDiskCsiDriverConfig {
6358 fn typename() -> &'static str {
6359 "type.googleapis.com/google.container.v1.GcePersistentDiskCsiDriverConfig"
6360 }
6361}
6362
6363#[derive(Clone, Default, PartialEq)]
6365#[non_exhaustive]
6366pub struct GcpFilestoreCsiDriverConfig {
6367 pub enabled: bool,
6369
6370 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6371}
6372
6373impl GcpFilestoreCsiDriverConfig {
6374 pub fn new() -> Self {
6375 std::default::Default::default()
6376 }
6377
6378 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6380 self.enabled = v.into();
6381 self
6382 }
6383}
6384
6385impl wkt::message::Message for GcpFilestoreCsiDriverConfig {
6386 fn typename() -> &'static str {
6387 "type.googleapis.com/google.container.v1.GcpFilestoreCsiDriverConfig"
6388 }
6389}
6390
6391#[derive(Clone, Default, PartialEq)]
6393#[non_exhaustive]
6394pub struct GcsFuseCsiDriverConfig {
6395 pub enabled: bool,
6397
6398 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6399}
6400
6401impl GcsFuseCsiDriverConfig {
6402 pub fn new() -> Self {
6403 std::default::Default::default()
6404 }
6405
6406 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6408 self.enabled = v.into();
6409 self
6410 }
6411}
6412
6413impl wkt::message::Message for GcsFuseCsiDriverConfig {
6414 fn typename() -> &'static str {
6415 "type.googleapis.com/google.container.v1.GcsFuseCsiDriverConfig"
6416 }
6417}
6418
6419#[derive(Clone, Default, PartialEq)]
6421#[non_exhaustive]
6422pub struct ParallelstoreCsiDriverConfig {
6423 pub enabled: bool,
6426
6427 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6428}
6429
6430impl ParallelstoreCsiDriverConfig {
6431 pub fn new() -> Self {
6432 std::default::Default::default()
6433 }
6434
6435 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6437 self.enabled = v.into();
6438 self
6439 }
6440}
6441
6442impl wkt::message::Message for ParallelstoreCsiDriverConfig {
6443 fn typename() -> &'static str {
6444 "type.googleapis.com/google.container.v1.ParallelstoreCsiDriverConfig"
6445 }
6446}
6447
6448#[derive(Clone, Default, PartialEq)]
6450#[non_exhaustive]
6451pub struct HighScaleCheckpointingConfig {
6452 pub enabled: bool,
6455
6456 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6457}
6458
6459impl HighScaleCheckpointingConfig {
6460 pub fn new() -> Self {
6461 std::default::Default::default()
6462 }
6463
6464 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6466 self.enabled = v.into();
6467 self
6468 }
6469}
6470
6471impl wkt::message::Message for HighScaleCheckpointingConfig {
6472 fn typename() -> &'static str {
6473 "type.googleapis.com/google.container.v1.HighScaleCheckpointingConfig"
6474 }
6475}
6476
6477#[derive(Clone, Default, PartialEq)]
6479#[non_exhaustive]
6480pub struct LustreCsiDriverConfig {
6481 pub enabled: bool,
6483
6484 #[deprecated]
6497 pub enable_legacy_lustre_port: bool,
6498
6499 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6500}
6501
6502impl LustreCsiDriverConfig {
6503 pub fn new() -> Self {
6504 std::default::Default::default()
6505 }
6506
6507 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6509 self.enabled = v.into();
6510 self
6511 }
6512
6513 #[deprecated]
6515 pub fn set_enable_legacy_lustre_port<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6516 self.enable_legacy_lustre_port = v.into();
6517 self
6518 }
6519}
6520
6521impl wkt::message::Message for LustreCsiDriverConfig {
6522 fn typename() -> &'static str {
6523 "type.googleapis.com/google.container.v1.LustreCsiDriverConfig"
6524 }
6525}
6526
6527#[derive(Clone, Default, PartialEq)]
6529#[non_exhaustive]
6530pub struct RayOperatorConfig {
6531 pub enabled: bool,
6533
6534 pub ray_cluster_logging_config: std::option::Option<crate::model::RayClusterLoggingConfig>,
6536
6537 pub ray_cluster_monitoring_config:
6539 std::option::Option<crate::model::RayClusterMonitoringConfig>,
6540
6541 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6542}
6543
6544impl RayOperatorConfig {
6545 pub fn new() -> Self {
6546 std::default::Default::default()
6547 }
6548
6549 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6551 self.enabled = v.into();
6552 self
6553 }
6554
6555 pub fn set_ray_cluster_logging_config<T>(mut self, v: T) -> Self
6557 where
6558 T: std::convert::Into<crate::model::RayClusterLoggingConfig>,
6559 {
6560 self.ray_cluster_logging_config = std::option::Option::Some(v.into());
6561 self
6562 }
6563
6564 pub fn set_or_clear_ray_cluster_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
6566 where
6567 T: std::convert::Into<crate::model::RayClusterLoggingConfig>,
6568 {
6569 self.ray_cluster_logging_config = v.map(|x| x.into());
6570 self
6571 }
6572
6573 pub fn set_ray_cluster_monitoring_config<T>(mut self, v: T) -> Self
6575 where
6576 T: std::convert::Into<crate::model::RayClusterMonitoringConfig>,
6577 {
6578 self.ray_cluster_monitoring_config = std::option::Option::Some(v.into());
6579 self
6580 }
6581
6582 pub fn set_or_clear_ray_cluster_monitoring_config<T>(
6584 mut self,
6585 v: std::option::Option<T>,
6586 ) -> Self
6587 where
6588 T: std::convert::Into<crate::model::RayClusterMonitoringConfig>,
6589 {
6590 self.ray_cluster_monitoring_config = v.map(|x| x.into());
6591 self
6592 }
6593}
6594
6595impl wkt::message::Message for RayOperatorConfig {
6596 fn typename() -> &'static str {
6597 "type.googleapis.com/google.container.v1.RayOperatorConfig"
6598 }
6599}
6600
6601#[derive(Clone, Default, PartialEq)]
6603#[non_exhaustive]
6604pub struct GkeBackupAgentConfig {
6605 pub enabled: bool,
6607
6608 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6609}
6610
6611impl GkeBackupAgentConfig {
6612 pub fn new() -> Self {
6613 std::default::Default::default()
6614 }
6615
6616 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6618 self.enabled = v.into();
6619 self
6620 }
6621}
6622
6623impl wkt::message::Message for GkeBackupAgentConfig {
6624 fn typename() -> &'static str {
6625 "type.googleapis.com/google.container.v1.GkeBackupAgentConfig"
6626 }
6627}
6628
6629#[derive(Clone, Default, PartialEq)]
6631#[non_exhaustive]
6632pub struct StatefulHAConfig {
6633 pub enabled: bool,
6635
6636 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6637}
6638
6639impl StatefulHAConfig {
6640 pub fn new() -> Self {
6641 std::default::Default::default()
6642 }
6643
6644 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6646 self.enabled = v.into();
6647 self
6648 }
6649}
6650
6651impl wkt::message::Message for StatefulHAConfig {
6652 fn typename() -> &'static str {
6653 "type.googleapis.com/google.container.v1.StatefulHAConfig"
6654 }
6655}
6656
6657#[derive(Clone, Default, PartialEq)]
6662#[non_exhaustive]
6663pub struct MasterAuthorizedNetworksConfig {
6664 pub enabled: bool,
6666
6667 pub cidr_blocks: std::vec::Vec<crate::model::master_authorized_networks_config::CidrBlock>,
6670
6671 pub gcp_public_cidrs_access_enabled: std::option::Option<bool>,
6673
6674 pub private_endpoint_enforcement_enabled: std::option::Option<bool>,
6676
6677 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6678}
6679
6680impl MasterAuthorizedNetworksConfig {
6681 pub fn new() -> Self {
6682 std::default::Default::default()
6683 }
6684
6685 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6687 self.enabled = v.into();
6688 self
6689 }
6690
6691 pub fn set_cidr_blocks<T, V>(mut self, v: T) -> Self
6693 where
6694 T: std::iter::IntoIterator<Item = V>,
6695 V: std::convert::Into<crate::model::master_authorized_networks_config::CidrBlock>,
6696 {
6697 use std::iter::Iterator;
6698 self.cidr_blocks = v.into_iter().map(|i| i.into()).collect();
6699 self
6700 }
6701
6702 pub fn set_gcp_public_cidrs_access_enabled<T>(mut self, v: T) -> Self
6704 where
6705 T: std::convert::Into<bool>,
6706 {
6707 self.gcp_public_cidrs_access_enabled = std::option::Option::Some(v.into());
6708 self
6709 }
6710
6711 pub fn set_or_clear_gcp_public_cidrs_access_enabled<T>(
6713 mut self,
6714 v: std::option::Option<T>,
6715 ) -> Self
6716 where
6717 T: std::convert::Into<bool>,
6718 {
6719 self.gcp_public_cidrs_access_enabled = v.map(|x| x.into());
6720 self
6721 }
6722
6723 pub fn set_private_endpoint_enforcement_enabled<T>(mut self, v: T) -> Self
6725 where
6726 T: std::convert::Into<bool>,
6727 {
6728 self.private_endpoint_enforcement_enabled = std::option::Option::Some(v.into());
6729 self
6730 }
6731
6732 pub fn set_or_clear_private_endpoint_enforcement_enabled<T>(
6734 mut self,
6735 v: std::option::Option<T>,
6736 ) -> Self
6737 where
6738 T: std::convert::Into<bool>,
6739 {
6740 self.private_endpoint_enforcement_enabled = v.map(|x| x.into());
6741 self
6742 }
6743}
6744
6745impl wkt::message::Message for MasterAuthorizedNetworksConfig {
6746 fn typename() -> &'static str {
6747 "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig"
6748 }
6749}
6750
6751pub mod master_authorized_networks_config {
6753 #[allow(unused_imports)]
6754 use super::*;
6755
6756 #[derive(Clone, Default, PartialEq)]
6758 #[non_exhaustive]
6759 pub struct CidrBlock {
6760 pub display_name: std::string::String,
6762
6763 pub cidr_block: std::string::String,
6765
6766 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6767 }
6768
6769 impl CidrBlock {
6770 pub fn new() -> Self {
6771 std::default::Default::default()
6772 }
6773
6774 pub fn set_display_name<T: std::convert::Into<std::string::String>>(
6776 mut self,
6777 v: T,
6778 ) -> Self {
6779 self.display_name = v.into();
6780 self
6781 }
6782
6783 pub fn set_cidr_block<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6785 self.cidr_block = v.into();
6786 self
6787 }
6788 }
6789
6790 impl wkt::message::Message for CidrBlock {
6791 fn typename() -> &'static str {
6792 "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock"
6793 }
6794 }
6795}
6796
6797#[derive(Clone, Default, PartialEq)]
6800#[non_exhaustive]
6801pub struct LegacyAbac {
6802 pub enabled: bool,
6807
6808 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6809}
6810
6811impl LegacyAbac {
6812 pub fn new() -> Self {
6813 std::default::Default::default()
6814 }
6815
6816 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6818 self.enabled = v.into();
6819 self
6820 }
6821}
6822
6823impl wkt::message::Message for LegacyAbac {
6824 fn typename() -> &'static str {
6825 "type.googleapis.com/google.container.v1.LegacyAbac"
6826 }
6827}
6828
6829#[derive(Clone, Default, PartialEq)]
6832#[non_exhaustive]
6833pub struct NetworkPolicy {
6834 pub provider: crate::model::network_policy::Provider,
6836
6837 pub enabled: bool,
6839
6840 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6841}
6842
6843impl NetworkPolicy {
6844 pub fn new() -> Self {
6845 std::default::Default::default()
6846 }
6847
6848 pub fn set_provider<T: std::convert::Into<crate::model::network_policy::Provider>>(
6850 mut self,
6851 v: T,
6852 ) -> Self {
6853 self.provider = v.into();
6854 self
6855 }
6856
6857 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6859 self.enabled = v.into();
6860 self
6861 }
6862}
6863
6864impl wkt::message::Message for NetworkPolicy {
6865 fn typename() -> &'static str {
6866 "type.googleapis.com/google.container.v1.NetworkPolicy"
6867 }
6868}
6869
6870pub mod network_policy {
6872 #[allow(unused_imports)]
6873 use super::*;
6874
6875 #[derive(Clone, Debug, PartialEq)]
6891 #[non_exhaustive]
6892 pub enum Provider {
6893 Unspecified,
6895 Calico,
6897 UnknownValue(provider::UnknownValue),
6902 }
6903
6904 #[doc(hidden)]
6905 pub mod provider {
6906 #[allow(unused_imports)]
6907 use super::*;
6908 #[derive(Clone, Debug, PartialEq)]
6909 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6910 }
6911
6912 impl Provider {
6913 pub fn value(&self) -> std::option::Option<i32> {
6918 match self {
6919 Self::Unspecified => std::option::Option::Some(0),
6920 Self::Calico => std::option::Option::Some(1),
6921 Self::UnknownValue(u) => u.0.value(),
6922 }
6923 }
6924
6925 pub fn name(&self) -> std::option::Option<&str> {
6930 match self {
6931 Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
6932 Self::Calico => std::option::Option::Some("CALICO"),
6933 Self::UnknownValue(u) => u.0.name(),
6934 }
6935 }
6936 }
6937
6938 impl std::default::Default for Provider {
6939 fn default() -> Self {
6940 use std::convert::From;
6941 Self::from(0)
6942 }
6943 }
6944
6945 impl std::fmt::Display for Provider {
6946 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6947 wkt::internal::display_enum(f, self.name(), self.value())
6948 }
6949 }
6950
6951 impl std::convert::From<i32> for Provider {
6952 fn from(value: i32) -> Self {
6953 match value {
6954 0 => Self::Unspecified,
6955 1 => Self::Calico,
6956 _ => Self::UnknownValue(provider::UnknownValue(
6957 wkt::internal::UnknownEnumValue::Integer(value),
6958 )),
6959 }
6960 }
6961 }
6962
6963 impl std::convert::From<&str> for Provider {
6964 fn from(value: &str) -> Self {
6965 use std::string::ToString;
6966 match value {
6967 "PROVIDER_UNSPECIFIED" => Self::Unspecified,
6968 "CALICO" => Self::Calico,
6969 _ => Self::UnknownValue(provider::UnknownValue(
6970 wkt::internal::UnknownEnumValue::String(value.to_string()),
6971 )),
6972 }
6973 }
6974 }
6975
6976 impl serde::ser::Serialize for Provider {
6977 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6978 where
6979 S: serde::Serializer,
6980 {
6981 match self {
6982 Self::Unspecified => serializer.serialize_i32(0),
6983 Self::Calico => serializer.serialize_i32(1),
6984 Self::UnknownValue(u) => u.0.serialize(serializer),
6985 }
6986 }
6987 }
6988
6989 impl<'de> serde::de::Deserialize<'de> for Provider {
6990 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6991 where
6992 D: serde::Deserializer<'de>,
6993 {
6994 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
6995 ".google.container.v1.NetworkPolicy.Provider",
6996 ))
6997 }
6998 }
6999}
7000
7001#[derive(Clone, Default, PartialEq)]
7003#[non_exhaustive]
7004pub struct BinaryAuthorization {
7005 #[deprecated]
7009 pub enabled: bool,
7010
7011 pub evaluation_mode: crate::model::binary_authorization::EvaluationMode,
7014
7015 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7016}
7017
7018impl BinaryAuthorization {
7019 pub fn new() -> Self {
7020 std::default::Default::default()
7021 }
7022
7023 #[deprecated]
7025 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7026 self.enabled = v.into();
7027 self
7028 }
7029
7030 pub fn set_evaluation_mode<
7032 T: std::convert::Into<crate::model::binary_authorization::EvaluationMode>,
7033 >(
7034 mut self,
7035 v: T,
7036 ) -> Self {
7037 self.evaluation_mode = v.into();
7038 self
7039 }
7040}
7041
7042impl wkt::message::Message for BinaryAuthorization {
7043 fn typename() -> &'static str {
7044 "type.googleapis.com/google.container.v1.BinaryAuthorization"
7045 }
7046}
7047
7048pub mod binary_authorization {
7050 #[allow(unused_imports)]
7051 use super::*;
7052
7053 #[derive(Clone, Debug, PartialEq)]
7069 #[non_exhaustive]
7070 pub enum EvaluationMode {
7071 Unspecified,
7073 Disabled,
7075 ProjectSingletonPolicyEnforce,
7079 UnknownValue(evaluation_mode::UnknownValue),
7084 }
7085
7086 #[doc(hidden)]
7087 pub mod evaluation_mode {
7088 #[allow(unused_imports)]
7089 use super::*;
7090 #[derive(Clone, Debug, PartialEq)]
7091 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7092 }
7093
7094 impl EvaluationMode {
7095 pub fn value(&self) -> std::option::Option<i32> {
7100 match self {
7101 Self::Unspecified => std::option::Option::Some(0),
7102 Self::Disabled => std::option::Option::Some(1),
7103 Self::ProjectSingletonPolicyEnforce => std::option::Option::Some(2),
7104 Self::UnknownValue(u) => u.0.value(),
7105 }
7106 }
7107
7108 pub fn name(&self) -> std::option::Option<&str> {
7113 match self {
7114 Self::Unspecified => std::option::Option::Some("EVALUATION_MODE_UNSPECIFIED"),
7115 Self::Disabled => std::option::Option::Some("DISABLED"),
7116 Self::ProjectSingletonPolicyEnforce => {
7117 std::option::Option::Some("PROJECT_SINGLETON_POLICY_ENFORCE")
7118 }
7119 Self::UnknownValue(u) => u.0.name(),
7120 }
7121 }
7122 }
7123
7124 impl std::default::Default for EvaluationMode {
7125 fn default() -> Self {
7126 use std::convert::From;
7127 Self::from(0)
7128 }
7129 }
7130
7131 impl std::fmt::Display for EvaluationMode {
7132 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7133 wkt::internal::display_enum(f, self.name(), self.value())
7134 }
7135 }
7136
7137 impl std::convert::From<i32> for EvaluationMode {
7138 fn from(value: i32) -> Self {
7139 match value {
7140 0 => Self::Unspecified,
7141 1 => Self::Disabled,
7142 2 => Self::ProjectSingletonPolicyEnforce,
7143 _ => Self::UnknownValue(evaluation_mode::UnknownValue(
7144 wkt::internal::UnknownEnumValue::Integer(value),
7145 )),
7146 }
7147 }
7148 }
7149
7150 impl std::convert::From<&str> for EvaluationMode {
7151 fn from(value: &str) -> Self {
7152 use std::string::ToString;
7153 match value {
7154 "EVALUATION_MODE_UNSPECIFIED" => Self::Unspecified,
7155 "DISABLED" => Self::Disabled,
7156 "PROJECT_SINGLETON_POLICY_ENFORCE" => Self::ProjectSingletonPolicyEnforce,
7157 _ => Self::UnknownValue(evaluation_mode::UnknownValue(
7158 wkt::internal::UnknownEnumValue::String(value.to_string()),
7159 )),
7160 }
7161 }
7162 }
7163
7164 impl serde::ser::Serialize for EvaluationMode {
7165 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7166 where
7167 S: serde::Serializer,
7168 {
7169 match self {
7170 Self::Unspecified => serializer.serialize_i32(0),
7171 Self::Disabled => serializer.serialize_i32(1),
7172 Self::ProjectSingletonPolicyEnforce => serializer.serialize_i32(2),
7173 Self::UnknownValue(u) => u.0.serialize(serializer),
7174 }
7175 }
7176 }
7177
7178 impl<'de> serde::de::Deserialize<'de> for EvaluationMode {
7179 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7180 where
7181 D: serde::Deserializer<'de>,
7182 {
7183 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationMode>::new(
7184 ".google.container.v1.BinaryAuthorization.EvaluationMode",
7185 ))
7186 }
7187 }
7188}
7189
7190#[derive(Clone, Default, PartialEq)]
7193#[non_exhaustive]
7194pub struct PodCIDROverprovisionConfig {
7195 pub disable: bool,
7198
7199 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7200}
7201
7202impl PodCIDROverprovisionConfig {
7203 pub fn new() -> Self {
7204 std::default::Default::default()
7205 }
7206
7207 pub fn set_disable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7209 self.disable = v.into();
7210 self
7211 }
7212}
7213
7214impl wkt::message::Message for PodCIDROverprovisionConfig {
7215 fn typename() -> &'static str {
7216 "type.googleapis.com/google.container.v1.PodCIDROverprovisionConfig"
7217 }
7218}
7219
7220#[derive(Clone, Default, PartialEq)]
7222#[non_exhaustive]
7223pub struct IPAllocationPolicy {
7224 pub use_ip_aliases: bool,
7229
7230 pub create_subnetwork: bool,
7234
7235 pub subnetwork_name: std::string::String,
7239
7240 #[deprecated]
7242 pub cluster_ipv4_cidr: std::string::String,
7243
7244 #[deprecated]
7246 pub node_ipv4_cidr: std::string::String,
7247
7248 #[deprecated]
7250 pub services_ipv4_cidr: std::string::String,
7251
7252 pub cluster_secondary_range_name: std::string::String,
7260
7261 pub services_secondary_range_name: std::string::String,
7269
7270 pub cluster_ipv4_cidr_block: std::string::String,
7286
7287 pub node_ipv4_cidr_block: std::string::String,
7302
7303 pub services_ipv4_cidr_block: std::string::String,
7319
7320 #[deprecated]
7339 pub tpu_ipv4_cidr_block: std::string::String,
7340
7341 pub use_routes: bool,
7346
7347 pub stack_type: crate::model::StackType,
7349
7350 pub ipv6_access_type: crate::model::IPv6AccessType,
7352
7353 pub pod_cidr_overprovision_config:
7366 std::option::Option<crate::model::PodCIDROverprovisionConfig>,
7367
7368 pub subnet_ipv6_cidr_block: std::string::String,
7370
7371 pub services_ipv6_cidr_block: std::string::String,
7373
7374 pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
7379
7380 pub default_pod_ipv4_range_utilization: f64,
7384
7385 pub additional_ip_ranges_configs: std::vec::Vec<crate::model::AdditionalIPRangesConfig>,
7391
7392 pub auto_ipam_config: std::option::Option<crate::model::AutoIpamConfig>,
7394
7395 pub network_tier_config: std::option::Option<crate::model::NetworkTierConfig>,
7399
7400 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7401}
7402
7403impl IPAllocationPolicy {
7404 pub fn new() -> Self {
7405 std::default::Default::default()
7406 }
7407
7408 pub fn set_use_ip_aliases<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7410 self.use_ip_aliases = v.into();
7411 self
7412 }
7413
7414 pub fn set_create_subnetwork<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7416 self.create_subnetwork = v.into();
7417 self
7418 }
7419
7420 pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7422 self.subnetwork_name = v.into();
7423 self
7424 }
7425
7426 #[deprecated]
7428 pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
7429 mut self,
7430 v: T,
7431 ) -> Self {
7432 self.cluster_ipv4_cidr = v.into();
7433 self
7434 }
7435
7436 #[deprecated]
7438 pub fn set_node_ipv4_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7439 self.node_ipv4_cidr = v.into();
7440 self
7441 }
7442
7443 #[deprecated]
7445 pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
7446 mut self,
7447 v: T,
7448 ) -> Self {
7449 self.services_ipv4_cidr = v.into();
7450 self
7451 }
7452
7453 pub fn set_cluster_secondary_range_name<T: std::convert::Into<std::string::String>>(
7455 mut self,
7456 v: T,
7457 ) -> Self {
7458 self.cluster_secondary_range_name = v.into();
7459 self
7460 }
7461
7462 pub fn set_services_secondary_range_name<T: std::convert::Into<std::string::String>>(
7464 mut self,
7465 v: T,
7466 ) -> Self {
7467 self.services_secondary_range_name = v.into();
7468 self
7469 }
7470
7471 pub fn set_cluster_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7473 mut self,
7474 v: T,
7475 ) -> Self {
7476 self.cluster_ipv4_cidr_block = v.into();
7477 self
7478 }
7479
7480 pub fn set_node_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7482 mut self,
7483 v: T,
7484 ) -> Self {
7485 self.node_ipv4_cidr_block = v.into();
7486 self
7487 }
7488
7489 pub fn set_services_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7491 mut self,
7492 v: T,
7493 ) -> Self {
7494 self.services_ipv4_cidr_block = v.into();
7495 self
7496 }
7497
7498 #[deprecated]
7500 pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
7501 mut self,
7502 v: T,
7503 ) -> Self {
7504 self.tpu_ipv4_cidr_block = v.into();
7505 self
7506 }
7507
7508 pub fn set_use_routes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7510 self.use_routes = v.into();
7511 self
7512 }
7513
7514 pub fn set_stack_type<T: std::convert::Into<crate::model::StackType>>(mut self, v: T) -> Self {
7516 self.stack_type = v.into();
7517 self
7518 }
7519
7520 pub fn set_ipv6_access_type<T: std::convert::Into<crate::model::IPv6AccessType>>(
7522 mut self,
7523 v: T,
7524 ) -> Self {
7525 self.ipv6_access_type = v.into();
7526 self
7527 }
7528
7529 pub fn set_pod_cidr_overprovision_config<T>(mut self, v: T) -> Self
7531 where
7532 T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
7533 {
7534 self.pod_cidr_overprovision_config = std::option::Option::Some(v.into());
7535 self
7536 }
7537
7538 pub fn set_or_clear_pod_cidr_overprovision_config<T>(
7540 mut self,
7541 v: std::option::Option<T>,
7542 ) -> Self
7543 where
7544 T: std::convert::Into<crate::model::PodCIDROverprovisionConfig>,
7545 {
7546 self.pod_cidr_overprovision_config = v.map(|x| x.into());
7547 self
7548 }
7549
7550 pub fn set_subnet_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
7552 mut self,
7553 v: T,
7554 ) -> Self {
7555 self.subnet_ipv6_cidr_block = v.into();
7556 self
7557 }
7558
7559 pub fn set_services_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
7561 mut self,
7562 v: T,
7563 ) -> Self {
7564 self.services_ipv6_cidr_block = v.into();
7565 self
7566 }
7567
7568 pub fn set_additional_pod_ranges_config<T>(mut self, v: T) -> Self
7570 where
7571 T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
7572 {
7573 self.additional_pod_ranges_config = std::option::Option::Some(v.into());
7574 self
7575 }
7576
7577 pub fn set_or_clear_additional_pod_ranges_config<T>(mut self, v: std::option::Option<T>) -> Self
7579 where
7580 T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
7581 {
7582 self.additional_pod_ranges_config = v.map(|x| x.into());
7583 self
7584 }
7585
7586 pub fn set_default_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(
7588 mut self,
7589 v: T,
7590 ) -> Self {
7591 self.default_pod_ipv4_range_utilization = v.into();
7592 self
7593 }
7594
7595 pub fn set_additional_ip_ranges_configs<T, V>(mut self, v: T) -> Self
7597 where
7598 T: std::iter::IntoIterator<Item = V>,
7599 V: std::convert::Into<crate::model::AdditionalIPRangesConfig>,
7600 {
7601 use std::iter::Iterator;
7602 self.additional_ip_ranges_configs = v.into_iter().map(|i| i.into()).collect();
7603 self
7604 }
7605
7606 pub fn set_auto_ipam_config<T>(mut self, v: T) -> Self
7608 where
7609 T: std::convert::Into<crate::model::AutoIpamConfig>,
7610 {
7611 self.auto_ipam_config = std::option::Option::Some(v.into());
7612 self
7613 }
7614
7615 pub fn set_or_clear_auto_ipam_config<T>(mut self, v: std::option::Option<T>) -> Self
7617 where
7618 T: std::convert::Into<crate::model::AutoIpamConfig>,
7619 {
7620 self.auto_ipam_config = v.map(|x| x.into());
7621 self
7622 }
7623
7624 pub fn set_network_tier_config<T>(mut self, v: T) -> Self
7626 where
7627 T: std::convert::Into<crate::model::NetworkTierConfig>,
7628 {
7629 self.network_tier_config = std::option::Option::Some(v.into());
7630 self
7631 }
7632
7633 pub fn set_or_clear_network_tier_config<T>(mut self, v: std::option::Option<T>) -> Self
7635 where
7636 T: std::convert::Into<crate::model::NetworkTierConfig>,
7637 {
7638 self.network_tier_config = v.map(|x| x.into());
7639 self
7640 }
7641}
7642
7643impl wkt::message::Message for IPAllocationPolicy {
7644 fn typename() -> &'static str {
7645 "type.googleapis.com/google.container.v1.IPAllocationPolicy"
7646 }
7647}
7648
7649#[derive(Clone, Default, PartialEq)]
7651#[non_exhaustive]
7652pub struct Cluster {
7653 pub name: std::string::String,
7661
7662 pub description: std::string::String,
7664
7665 #[deprecated]
7677 pub initial_node_count: i32,
7678
7679 #[deprecated]
7691 pub node_config: std::option::Option<crate::model::NodeConfig>,
7692
7693 pub master_auth: std::option::Option<crate::model::MasterAuth>,
7699
7700 pub logging_service: std::string::String,
7712
7713 pub monitoring_service: std::string::String,
7725
7726 pub network: std::string::String,
7731
7732 pub cluster_ipv4_cidr: std::string::String,
7737
7738 pub addons_config: std::option::Option<crate::model::AddonsConfig>,
7740
7741 pub subnetwork: std::string::String,
7745
7746 pub node_pools: std::vec::Vec<crate::model::NodePool>,
7750
7751 pub locations: std::vec::Vec<std::string::String>,
7763
7764 pub enable_kubernetes_alpha: bool,
7771
7772 pub alpha_cluster_feature_gates: std::vec::Vec<std::string::String>,
7776
7777 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
7780
7781 pub label_fingerprint: std::string::String,
7783
7784 pub legacy_abac: std::option::Option<crate::model::LegacyAbac>,
7786
7787 pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
7789
7790 pub ip_allocation_policy: std::option::Option<crate::model::IPAllocationPolicy>,
7792
7793 #[deprecated]
7801 pub master_authorized_networks_config:
7802 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
7803
7804 pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
7806
7807 pub binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
7809
7810 pub autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
7812
7813 pub network_config: std::option::Option<crate::model::NetworkConfig>,
7815
7816 pub default_max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
7820
7821 pub resource_usage_export_config: std::option::Option<crate::model::ResourceUsageExportConfig>,
7824
7825 pub authenticator_groups_config: std::option::Option<crate::model::AuthenticatorGroupsConfig>,
7827
7828 pub private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
7830
7831 pub database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
7833
7834 pub vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
7836
7837 pub shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
7839
7840 pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
7847
7848 pub workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
7850
7851 pub mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
7854
7855 pub cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
7857
7858 pub notification_config: std::option::Option<crate::model::NotificationConfig>,
7860
7861 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
7864
7865 pub identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
7867
7868 pub self_link: std::string::String,
7870
7871 #[deprecated]
7876 pub zone: std::string::String,
7877
7878 pub endpoint: std::string::String,
7885
7886 pub initial_cluster_version: std::string::String,
7900
7901 pub current_master_version: std::string::String,
7903
7904 #[deprecated]
7910 pub current_node_version: std::string::String,
7911
7912 pub create_time: std::string::String,
7915
7916 pub status: crate::model::cluster::Status,
7918
7919 #[deprecated]
7923 pub status_message: std::string::String,
7924
7925 pub node_ipv4_cidr_size: i32,
7930
7931 pub services_ipv4_cidr: std::string::String,
7937
7938 #[deprecated]
7940 pub instance_group_urls: std::vec::Vec<std::string::String>,
7941
7942 #[deprecated]
7945 pub current_node_count: i32,
7946
7947 pub expire_time: std::string::String,
7950
7951 pub location: std::string::String,
7957
7958 #[deprecated]
7962 pub enable_tpu: bool,
7963
7964 #[deprecated]
7970 pub tpu_ipv4_cidr_block: std::string::String,
7971
7972 pub conditions: std::vec::Vec<crate::model::StatusCondition>,
7974
7975 pub autopilot: std::option::Option<crate::model::Autopilot>,
7977
7978 pub id: std::string::String,
7980
7981 pub node_pool_defaults: std::option::Option<crate::model::NodePoolDefaults>,
7984
7985 pub logging_config: std::option::Option<crate::model::LoggingConfig>,
7987
7988 pub monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
7990
7991 pub node_pool_auto_config: std::option::Option<crate::model::NodePoolAutoConfig>,
7994
7995 pub pod_autoscaling: std::option::Option<crate::model::PodAutoscaling>,
7997
7998 pub etag: std::string::String,
8002
8003 pub fleet: std::option::Option<crate::model::Fleet>,
8005
8006 pub security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
8008
8009 pub control_plane_endpoints_config:
8011 std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
8012
8013 pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
8015
8016 #[deprecated]
8021 pub enterprise_config: std::option::Option<crate::model::EnterpriseConfig>,
8022
8023 pub secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
8025
8026 pub compliance_posture_config: std::option::Option<crate::model::CompliancePostureConfig>,
8028
8029 pub satisfies_pzs: std::option::Option<bool>,
8031
8032 pub satisfies_pzi: std::option::Option<bool>,
8034
8035 pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
8037
8038 pub rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
8041
8042 pub gke_auto_upgrade_config: std::option::Option<crate::model::GkeAutoUpgradeConfig>,
8044
8045 pub anonymous_authentication_config:
8048 std::option::Option<crate::model::AnonymousAuthenticationConfig>,
8049
8050 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8051}
8052
8053impl Cluster {
8054 pub fn new() -> Self {
8055 std::default::Default::default()
8056 }
8057
8058 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8060 self.name = v.into();
8061 self
8062 }
8063
8064 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8066 self.description = v.into();
8067 self
8068 }
8069
8070 #[deprecated]
8072 pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8073 self.initial_node_count = v.into();
8074 self
8075 }
8076
8077 #[deprecated]
8079 pub fn set_node_config<T>(mut self, v: T) -> Self
8080 where
8081 T: std::convert::Into<crate::model::NodeConfig>,
8082 {
8083 self.node_config = std::option::Option::Some(v.into());
8084 self
8085 }
8086
8087 #[deprecated]
8089 pub fn set_or_clear_node_config<T>(mut self, v: std::option::Option<T>) -> Self
8090 where
8091 T: std::convert::Into<crate::model::NodeConfig>,
8092 {
8093 self.node_config = v.map(|x| x.into());
8094 self
8095 }
8096
8097 pub fn set_master_auth<T>(mut self, v: T) -> Self
8099 where
8100 T: std::convert::Into<crate::model::MasterAuth>,
8101 {
8102 self.master_auth = std::option::Option::Some(v.into());
8103 self
8104 }
8105
8106 pub fn set_or_clear_master_auth<T>(mut self, v: std::option::Option<T>) -> Self
8108 where
8109 T: std::convert::Into<crate::model::MasterAuth>,
8110 {
8111 self.master_auth = v.map(|x| x.into());
8112 self
8113 }
8114
8115 pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8117 self.logging_service = v.into();
8118 self
8119 }
8120
8121 pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
8123 mut self,
8124 v: T,
8125 ) -> Self {
8126 self.monitoring_service = v.into();
8127 self
8128 }
8129
8130 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8132 self.network = v.into();
8133 self
8134 }
8135
8136 pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
8138 mut self,
8139 v: T,
8140 ) -> Self {
8141 self.cluster_ipv4_cidr = v.into();
8142 self
8143 }
8144
8145 pub fn set_addons_config<T>(mut self, v: T) -> Self
8147 where
8148 T: std::convert::Into<crate::model::AddonsConfig>,
8149 {
8150 self.addons_config = std::option::Option::Some(v.into());
8151 self
8152 }
8153
8154 pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
8156 where
8157 T: std::convert::Into<crate::model::AddonsConfig>,
8158 {
8159 self.addons_config = v.map(|x| x.into());
8160 self
8161 }
8162
8163 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8165 self.subnetwork = v.into();
8166 self
8167 }
8168
8169 pub fn set_node_pools<T, V>(mut self, v: T) -> Self
8171 where
8172 T: std::iter::IntoIterator<Item = V>,
8173 V: std::convert::Into<crate::model::NodePool>,
8174 {
8175 use std::iter::Iterator;
8176 self.node_pools = v.into_iter().map(|i| i.into()).collect();
8177 self
8178 }
8179
8180 pub fn set_locations<T, V>(mut self, v: T) -> Self
8182 where
8183 T: std::iter::IntoIterator<Item = V>,
8184 V: std::convert::Into<std::string::String>,
8185 {
8186 use std::iter::Iterator;
8187 self.locations = v.into_iter().map(|i| i.into()).collect();
8188 self
8189 }
8190
8191 pub fn set_enable_kubernetes_alpha<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8193 self.enable_kubernetes_alpha = v.into();
8194 self
8195 }
8196
8197 pub fn set_alpha_cluster_feature_gates<T, V>(mut self, v: T) -> Self
8199 where
8200 T: std::iter::IntoIterator<Item = V>,
8201 V: std::convert::Into<std::string::String>,
8202 {
8203 use std::iter::Iterator;
8204 self.alpha_cluster_feature_gates = v.into_iter().map(|i| i.into()).collect();
8205 self
8206 }
8207
8208 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
8210 where
8211 T: std::iter::IntoIterator<Item = (K, V)>,
8212 K: std::convert::Into<std::string::String>,
8213 V: std::convert::Into<std::string::String>,
8214 {
8215 use std::iter::Iterator;
8216 self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8217 self
8218 }
8219
8220 pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
8222 mut self,
8223 v: T,
8224 ) -> Self {
8225 self.label_fingerprint = v.into();
8226 self
8227 }
8228
8229 pub fn set_legacy_abac<T>(mut self, v: T) -> Self
8231 where
8232 T: std::convert::Into<crate::model::LegacyAbac>,
8233 {
8234 self.legacy_abac = std::option::Option::Some(v.into());
8235 self
8236 }
8237
8238 pub fn set_or_clear_legacy_abac<T>(mut self, v: std::option::Option<T>) -> Self
8240 where
8241 T: std::convert::Into<crate::model::LegacyAbac>,
8242 {
8243 self.legacy_abac = v.map(|x| x.into());
8244 self
8245 }
8246
8247 pub fn set_network_policy<T>(mut self, v: T) -> Self
8249 where
8250 T: std::convert::Into<crate::model::NetworkPolicy>,
8251 {
8252 self.network_policy = std::option::Option::Some(v.into());
8253 self
8254 }
8255
8256 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
8258 where
8259 T: std::convert::Into<crate::model::NetworkPolicy>,
8260 {
8261 self.network_policy = v.map(|x| x.into());
8262 self
8263 }
8264
8265 pub fn set_ip_allocation_policy<T>(mut self, v: T) -> Self
8267 where
8268 T: std::convert::Into<crate::model::IPAllocationPolicy>,
8269 {
8270 self.ip_allocation_policy = std::option::Option::Some(v.into());
8271 self
8272 }
8273
8274 pub fn set_or_clear_ip_allocation_policy<T>(mut self, v: std::option::Option<T>) -> Self
8276 where
8277 T: std::convert::Into<crate::model::IPAllocationPolicy>,
8278 {
8279 self.ip_allocation_policy = v.map(|x| x.into());
8280 self
8281 }
8282
8283 #[deprecated]
8285 pub fn set_master_authorized_networks_config<T>(mut self, v: T) -> Self
8286 where
8287 T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
8288 {
8289 self.master_authorized_networks_config = std::option::Option::Some(v.into());
8290 self
8291 }
8292
8293 #[deprecated]
8295 pub fn set_or_clear_master_authorized_networks_config<T>(
8296 mut self,
8297 v: std::option::Option<T>,
8298 ) -> Self
8299 where
8300 T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
8301 {
8302 self.master_authorized_networks_config = v.map(|x| x.into());
8303 self
8304 }
8305
8306 pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
8308 where
8309 T: std::convert::Into<crate::model::MaintenancePolicy>,
8310 {
8311 self.maintenance_policy = std::option::Option::Some(v.into());
8312 self
8313 }
8314
8315 pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
8317 where
8318 T: std::convert::Into<crate::model::MaintenancePolicy>,
8319 {
8320 self.maintenance_policy = v.map(|x| x.into());
8321 self
8322 }
8323
8324 pub fn set_binary_authorization<T>(mut self, v: T) -> Self
8326 where
8327 T: std::convert::Into<crate::model::BinaryAuthorization>,
8328 {
8329 self.binary_authorization = std::option::Option::Some(v.into());
8330 self
8331 }
8332
8333 pub fn set_or_clear_binary_authorization<T>(mut self, v: std::option::Option<T>) -> Self
8335 where
8336 T: std::convert::Into<crate::model::BinaryAuthorization>,
8337 {
8338 self.binary_authorization = v.map(|x| x.into());
8339 self
8340 }
8341
8342 pub fn set_autoscaling<T>(mut self, v: T) -> Self
8344 where
8345 T: std::convert::Into<crate::model::ClusterAutoscaling>,
8346 {
8347 self.autoscaling = std::option::Option::Some(v.into());
8348 self
8349 }
8350
8351 pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8353 where
8354 T: std::convert::Into<crate::model::ClusterAutoscaling>,
8355 {
8356 self.autoscaling = v.map(|x| x.into());
8357 self
8358 }
8359
8360 pub fn set_network_config<T>(mut self, v: T) -> Self
8362 where
8363 T: std::convert::Into<crate::model::NetworkConfig>,
8364 {
8365 self.network_config = std::option::Option::Some(v.into());
8366 self
8367 }
8368
8369 pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
8371 where
8372 T: std::convert::Into<crate::model::NetworkConfig>,
8373 {
8374 self.network_config = v.map(|x| x.into());
8375 self
8376 }
8377
8378 pub fn set_default_max_pods_constraint<T>(mut self, v: T) -> Self
8380 where
8381 T: std::convert::Into<crate::model::MaxPodsConstraint>,
8382 {
8383 self.default_max_pods_constraint = std::option::Option::Some(v.into());
8384 self
8385 }
8386
8387 pub fn set_or_clear_default_max_pods_constraint<T>(mut self, v: std::option::Option<T>) -> Self
8389 where
8390 T: std::convert::Into<crate::model::MaxPodsConstraint>,
8391 {
8392 self.default_max_pods_constraint = v.map(|x| x.into());
8393 self
8394 }
8395
8396 pub fn set_resource_usage_export_config<T>(mut self, v: T) -> Self
8398 where
8399 T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
8400 {
8401 self.resource_usage_export_config = std::option::Option::Some(v.into());
8402 self
8403 }
8404
8405 pub fn set_or_clear_resource_usage_export_config<T>(mut self, v: std::option::Option<T>) -> Self
8407 where
8408 T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
8409 {
8410 self.resource_usage_export_config = v.map(|x| x.into());
8411 self
8412 }
8413
8414 pub fn set_authenticator_groups_config<T>(mut self, v: T) -> Self
8416 where
8417 T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
8418 {
8419 self.authenticator_groups_config = std::option::Option::Some(v.into());
8420 self
8421 }
8422
8423 pub fn set_or_clear_authenticator_groups_config<T>(mut self, v: std::option::Option<T>) -> Self
8425 where
8426 T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
8427 {
8428 self.authenticator_groups_config = v.map(|x| x.into());
8429 self
8430 }
8431
8432 pub fn set_private_cluster_config<T>(mut self, v: T) -> Self
8434 where
8435 T: std::convert::Into<crate::model::PrivateClusterConfig>,
8436 {
8437 self.private_cluster_config = std::option::Option::Some(v.into());
8438 self
8439 }
8440
8441 pub fn set_or_clear_private_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
8443 where
8444 T: std::convert::Into<crate::model::PrivateClusterConfig>,
8445 {
8446 self.private_cluster_config = v.map(|x| x.into());
8447 self
8448 }
8449
8450 pub fn set_database_encryption<T>(mut self, v: T) -> Self
8452 where
8453 T: std::convert::Into<crate::model::DatabaseEncryption>,
8454 {
8455 self.database_encryption = std::option::Option::Some(v.into());
8456 self
8457 }
8458
8459 pub fn set_or_clear_database_encryption<T>(mut self, v: std::option::Option<T>) -> Self
8461 where
8462 T: std::convert::Into<crate::model::DatabaseEncryption>,
8463 {
8464 self.database_encryption = v.map(|x| x.into());
8465 self
8466 }
8467
8468 pub fn set_vertical_pod_autoscaling<T>(mut self, v: T) -> Self
8470 where
8471 T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
8472 {
8473 self.vertical_pod_autoscaling = std::option::Option::Some(v.into());
8474 self
8475 }
8476
8477 pub fn set_or_clear_vertical_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8479 where
8480 T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
8481 {
8482 self.vertical_pod_autoscaling = v.map(|x| x.into());
8483 self
8484 }
8485
8486 pub fn set_shielded_nodes<T>(mut self, v: T) -> Self
8488 where
8489 T: std::convert::Into<crate::model::ShieldedNodes>,
8490 {
8491 self.shielded_nodes = std::option::Option::Some(v.into());
8492 self
8493 }
8494
8495 pub fn set_or_clear_shielded_nodes<T>(mut self, v: std::option::Option<T>) -> Self
8497 where
8498 T: std::convert::Into<crate::model::ShieldedNodes>,
8499 {
8500 self.shielded_nodes = v.map(|x| x.into());
8501 self
8502 }
8503
8504 pub fn set_release_channel<T>(mut self, v: T) -> Self
8506 where
8507 T: std::convert::Into<crate::model::ReleaseChannel>,
8508 {
8509 self.release_channel = std::option::Option::Some(v.into());
8510 self
8511 }
8512
8513 pub fn set_or_clear_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
8515 where
8516 T: std::convert::Into<crate::model::ReleaseChannel>,
8517 {
8518 self.release_channel = v.map(|x| x.into());
8519 self
8520 }
8521
8522 pub fn set_workload_identity_config<T>(mut self, v: T) -> Self
8524 where
8525 T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
8526 {
8527 self.workload_identity_config = std::option::Option::Some(v.into());
8528 self
8529 }
8530
8531 pub fn set_or_clear_workload_identity_config<T>(mut self, v: std::option::Option<T>) -> Self
8533 where
8534 T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
8535 {
8536 self.workload_identity_config = v.map(|x| x.into());
8537 self
8538 }
8539
8540 pub fn set_mesh_certificates<T>(mut self, v: T) -> Self
8542 where
8543 T: std::convert::Into<crate::model::MeshCertificates>,
8544 {
8545 self.mesh_certificates = std::option::Option::Some(v.into());
8546 self
8547 }
8548
8549 pub fn set_or_clear_mesh_certificates<T>(mut self, v: std::option::Option<T>) -> Self
8551 where
8552 T: std::convert::Into<crate::model::MeshCertificates>,
8553 {
8554 self.mesh_certificates = v.map(|x| x.into());
8555 self
8556 }
8557
8558 pub fn set_cost_management_config<T>(mut self, v: T) -> Self
8560 where
8561 T: std::convert::Into<crate::model::CostManagementConfig>,
8562 {
8563 self.cost_management_config = std::option::Option::Some(v.into());
8564 self
8565 }
8566
8567 pub fn set_or_clear_cost_management_config<T>(mut self, v: std::option::Option<T>) -> Self
8569 where
8570 T: std::convert::Into<crate::model::CostManagementConfig>,
8571 {
8572 self.cost_management_config = v.map(|x| x.into());
8573 self
8574 }
8575
8576 pub fn set_notification_config<T>(mut self, v: T) -> Self
8578 where
8579 T: std::convert::Into<crate::model::NotificationConfig>,
8580 {
8581 self.notification_config = std::option::Option::Some(v.into());
8582 self
8583 }
8584
8585 pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
8587 where
8588 T: std::convert::Into<crate::model::NotificationConfig>,
8589 {
8590 self.notification_config = v.map(|x| x.into());
8591 self
8592 }
8593
8594 pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
8596 where
8597 T: std::convert::Into<crate::model::ConfidentialNodes>,
8598 {
8599 self.confidential_nodes = std::option::Option::Some(v.into());
8600 self
8601 }
8602
8603 pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
8605 where
8606 T: std::convert::Into<crate::model::ConfidentialNodes>,
8607 {
8608 self.confidential_nodes = v.map(|x| x.into());
8609 self
8610 }
8611
8612 pub fn set_identity_service_config<T>(mut self, v: T) -> Self
8614 where
8615 T: std::convert::Into<crate::model::IdentityServiceConfig>,
8616 {
8617 self.identity_service_config = std::option::Option::Some(v.into());
8618 self
8619 }
8620
8621 pub fn set_or_clear_identity_service_config<T>(mut self, v: std::option::Option<T>) -> Self
8623 where
8624 T: std::convert::Into<crate::model::IdentityServiceConfig>,
8625 {
8626 self.identity_service_config = v.map(|x| x.into());
8627 self
8628 }
8629
8630 pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8632 self.self_link = v.into();
8633 self
8634 }
8635
8636 #[deprecated]
8638 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8639 self.zone = v.into();
8640 self
8641 }
8642
8643 pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8645 self.endpoint = v.into();
8646 self
8647 }
8648
8649 pub fn set_initial_cluster_version<T: std::convert::Into<std::string::String>>(
8651 mut self,
8652 v: T,
8653 ) -> Self {
8654 self.initial_cluster_version = v.into();
8655 self
8656 }
8657
8658 pub fn set_current_master_version<T: std::convert::Into<std::string::String>>(
8660 mut self,
8661 v: T,
8662 ) -> Self {
8663 self.current_master_version = v.into();
8664 self
8665 }
8666
8667 #[deprecated]
8669 pub fn set_current_node_version<T: std::convert::Into<std::string::String>>(
8670 mut self,
8671 v: T,
8672 ) -> Self {
8673 self.current_node_version = v.into();
8674 self
8675 }
8676
8677 pub fn set_create_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8679 self.create_time = v.into();
8680 self
8681 }
8682
8683 pub fn set_status<T: std::convert::Into<crate::model::cluster::Status>>(
8685 mut self,
8686 v: T,
8687 ) -> Self {
8688 self.status = v.into();
8689 self
8690 }
8691
8692 #[deprecated]
8694 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8695 self.status_message = v.into();
8696 self
8697 }
8698
8699 pub fn set_node_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8701 self.node_ipv4_cidr_size = v.into();
8702 self
8703 }
8704
8705 pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
8707 mut self,
8708 v: T,
8709 ) -> Self {
8710 self.services_ipv4_cidr = v.into();
8711 self
8712 }
8713
8714 #[deprecated]
8716 pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
8717 where
8718 T: std::iter::IntoIterator<Item = V>,
8719 V: std::convert::Into<std::string::String>,
8720 {
8721 use std::iter::Iterator;
8722 self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
8723 self
8724 }
8725
8726 #[deprecated]
8728 pub fn set_current_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8729 self.current_node_count = v.into();
8730 self
8731 }
8732
8733 pub fn set_expire_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8735 self.expire_time = v.into();
8736 self
8737 }
8738
8739 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8741 self.location = v.into();
8742 self
8743 }
8744
8745 #[deprecated]
8747 pub fn set_enable_tpu<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8748 self.enable_tpu = v.into();
8749 self
8750 }
8751
8752 #[deprecated]
8754 pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
8755 mut self,
8756 v: T,
8757 ) -> Self {
8758 self.tpu_ipv4_cidr_block = v.into();
8759 self
8760 }
8761
8762 pub fn set_conditions<T, V>(mut self, v: T) -> Self
8764 where
8765 T: std::iter::IntoIterator<Item = V>,
8766 V: std::convert::Into<crate::model::StatusCondition>,
8767 {
8768 use std::iter::Iterator;
8769 self.conditions = v.into_iter().map(|i| i.into()).collect();
8770 self
8771 }
8772
8773 pub fn set_autopilot<T>(mut self, v: T) -> Self
8775 where
8776 T: std::convert::Into<crate::model::Autopilot>,
8777 {
8778 self.autopilot = std::option::Option::Some(v.into());
8779 self
8780 }
8781
8782 pub fn set_or_clear_autopilot<T>(mut self, v: std::option::Option<T>) -> Self
8784 where
8785 T: std::convert::Into<crate::model::Autopilot>,
8786 {
8787 self.autopilot = v.map(|x| x.into());
8788 self
8789 }
8790
8791 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8793 self.id = v.into();
8794 self
8795 }
8796
8797 pub fn set_node_pool_defaults<T>(mut self, v: T) -> Self
8799 where
8800 T: std::convert::Into<crate::model::NodePoolDefaults>,
8801 {
8802 self.node_pool_defaults = std::option::Option::Some(v.into());
8803 self
8804 }
8805
8806 pub fn set_or_clear_node_pool_defaults<T>(mut self, v: std::option::Option<T>) -> Self
8808 where
8809 T: std::convert::Into<crate::model::NodePoolDefaults>,
8810 {
8811 self.node_pool_defaults = v.map(|x| x.into());
8812 self
8813 }
8814
8815 pub fn set_logging_config<T>(mut self, v: T) -> Self
8817 where
8818 T: std::convert::Into<crate::model::LoggingConfig>,
8819 {
8820 self.logging_config = std::option::Option::Some(v.into());
8821 self
8822 }
8823
8824 pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
8826 where
8827 T: std::convert::Into<crate::model::LoggingConfig>,
8828 {
8829 self.logging_config = v.map(|x| x.into());
8830 self
8831 }
8832
8833 pub fn set_monitoring_config<T>(mut self, v: T) -> Self
8835 where
8836 T: std::convert::Into<crate::model::MonitoringConfig>,
8837 {
8838 self.monitoring_config = std::option::Option::Some(v.into());
8839 self
8840 }
8841
8842 pub fn set_or_clear_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
8844 where
8845 T: std::convert::Into<crate::model::MonitoringConfig>,
8846 {
8847 self.monitoring_config = v.map(|x| x.into());
8848 self
8849 }
8850
8851 pub fn set_node_pool_auto_config<T>(mut self, v: T) -> Self
8853 where
8854 T: std::convert::Into<crate::model::NodePoolAutoConfig>,
8855 {
8856 self.node_pool_auto_config = std::option::Option::Some(v.into());
8857 self
8858 }
8859
8860 pub fn set_or_clear_node_pool_auto_config<T>(mut self, v: std::option::Option<T>) -> Self
8862 where
8863 T: std::convert::Into<crate::model::NodePoolAutoConfig>,
8864 {
8865 self.node_pool_auto_config = v.map(|x| x.into());
8866 self
8867 }
8868
8869 pub fn set_pod_autoscaling<T>(mut self, v: T) -> Self
8871 where
8872 T: std::convert::Into<crate::model::PodAutoscaling>,
8873 {
8874 self.pod_autoscaling = std::option::Option::Some(v.into());
8875 self
8876 }
8877
8878 pub fn set_or_clear_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
8880 where
8881 T: std::convert::Into<crate::model::PodAutoscaling>,
8882 {
8883 self.pod_autoscaling = v.map(|x| x.into());
8884 self
8885 }
8886
8887 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8889 self.etag = v.into();
8890 self
8891 }
8892
8893 pub fn set_fleet<T>(mut self, v: T) -> Self
8895 where
8896 T: std::convert::Into<crate::model::Fleet>,
8897 {
8898 self.fleet = std::option::Option::Some(v.into());
8899 self
8900 }
8901
8902 pub fn set_or_clear_fleet<T>(mut self, v: std::option::Option<T>) -> Self
8904 where
8905 T: std::convert::Into<crate::model::Fleet>,
8906 {
8907 self.fleet = v.map(|x| x.into());
8908 self
8909 }
8910
8911 pub fn set_security_posture_config<T>(mut self, v: T) -> Self
8913 where
8914 T: std::convert::Into<crate::model::SecurityPostureConfig>,
8915 {
8916 self.security_posture_config = std::option::Option::Some(v.into());
8917 self
8918 }
8919
8920 pub fn set_or_clear_security_posture_config<T>(mut self, v: std::option::Option<T>) -> Self
8922 where
8923 T: std::convert::Into<crate::model::SecurityPostureConfig>,
8924 {
8925 self.security_posture_config = v.map(|x| x.into());
8926 self
8927 }
8928
8929 pub fn set_control_plane_endpoints_config<T>(mut self, v: T) -> Self
8931 where
8932 T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
8933 {
8934 self.control_plane_endpoints_config = std::option::Option::Some(v.into());
8935 self
8936 }
8937
8938 pub fn set_or_clear_control_plane_endpoints_config<T>(
8940 mut self,
8941 v: std::option::Option<T>,
8942 ) -> Self
8943 where
8944 T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
8945 {
8946 self.control_plane_endpoints_config = v.map(|x| x.into());
8947 self
8948 }
8949
8950 pub fn set_enable_k8s_beta_apis<T>(mut self, v: T) -> Self
8952 where
8953 T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
8954 {
8955 self.enable_k8s_beta_apis = std::option::Option::Some(v.into());
8956 self
8957 }
8958
8959 pub fn set_or_clear_enable_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
8961 where
8962 T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
8963 {
8964 self.enable_k8s_beta_apis = v.map(|x| x.into());
8965 self
8966 }
8967
8968 #[deprecated]
8970 pub fn set_enterprise_config<T>(mut self, v: T) -> Self
8971 where
8972 T: std::convert::Into<crate::model::EnterpriseConfig>,
8973 {
8974 self.enterprise_config = std::option::Option::Some(v.into());
8975 self
8976 }
8977
8978 #[deprecated]
8980 pub fn set_or_clear_enterprise_config<T>(mut self, v: std::option::Option<T>) -> Self
8981 where
8982 T: std::convert::Into<crate::model::EnterpriseConfig>,
8983 {
8984 self.enterprise_config = v.map(|x| x.into());
8985 self
8986 }
8987
8988 pub fn set_secret_manager_config<T>(mut self, v: T) -> Self
8990 where
8991 T: std::convert::Into<crate::model::SecretManagerConfig>,
8992 {
8993 self.secret_manager_config = std::option::Option::Some(v.into());
8994 self
8995 }
8996
8997 pub fn set_or_clear_secret_manager_config<T>(mut self, v: std::option::Option<T>) -> Self
8999 where
9000 T: std::convert::Into<crate::model::SecretManagerConfig>,
9001 {
9002 self.secret_manager_config = v.map(|x| x.into());
9003 self
9004 }
9005
9006 pub fn set_compliance_posture_config<T>(mut self, v: T) -> Self
9008 where
9009 T: std::convert::Into<crate::model::CompliancePostureConfig>,
9010 {
9011 self.compliance_posture_config = std::option::Option::Some(v.into());
9012 self
9013 }
9014
9015 pub fn set_or_clear_compliance_posture_config<T>(mut self, v: std::option::Option<T>) -> Self
9017 where
9018 T: std::convert::Into<crate::model::CompliancePostureConfig>,
9019 {
9020 self.compliance_posture_config = v.map(|x| x.into());
9021 self
9022 }
9023
9024 pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
9026 where
9027 T: std::convert::Into<bool>,
9028 {
9029 self.satisfies_pzs = std::option::Option::Some(v.into());
9030 self
9031 }
9032
9033 pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
9035 where
9036 T: std::convert::Into<bool>,
9037 {
9038 self.satisfies_pzs = v.map(|x| x.into());
9039 self
9040 }
9041
9042 pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
9044 where
9045 T: std::convert::Into<bool>,
9046 {
9047 self.satisfies_pzi = std::option::Option::Some(v.into());
9048 self
9049 }
9050
9051 pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
9053 where
9054 T: std::convert::Into<bool>,
9055 {
9056 self.satisfies_pzi = v.map(|x| x.into());
9057 self
9058 }
9059
9060 pub fn set_user_managed_keys_config<T>(mut self, v: T) -> Self
9062 where
9063 T: std::convert::Into<crate::model::UserManagedKeysConfig>,
9064 {
9065 self.user_managed_keys_config = std::option::Option::Some(v.into());
9066 self
9067 }
9068
9069 pub fn set_or_clear_user_managed_keys_config<T>(mut self, v: std::option::Option<T>) -> Self
9071 where
9072 T: std::convert::Into<crate::model::UserManagedKeysConfig>,
9073 {
9074 self.user_managed_keys_config = v.map(|x| x.into());
9075 self
9076 }
9077
9078 pub fn set_rbac_binding_config<T>(mut self, v: T) -> Self
9080 where
9081 T: std::convert::Into<crate::model::RBACBindingConfig>,
9082 {
9083 self.rbac_binding_config = std::option::Option::Some(v.into());
9084 self
9085 }
9086
9087 pub fn set_or_clear_rbac_binding_config<T>(mut self, v: std::option::Option<T>) -> Self
9089 where
9090 T: std::convert::Into<crate::model::RBACBindingConfig>,
9091 {
9092 self.rbac_binding_config = v.map(|x| x.into());
9093 self
9094 }
9095
9096 pub fn set_gke_auto_upgrade_config<T>(mut self, v: T) -> Self
9098 where
9099 T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
9100 {
9101 self.gke_auto_upgrade_config = std::option::Option::Some(v.into());
9102 self
9103 }
9104
9105 pub fn set_or_clear_gke_auto_upgrade_config<T>(mut self, v: std::option::Option<T>) -> Self
9107 where
9108 T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
9109 {
9110 self.gke_auto_upgrade_config = v.map(|x| x.into());
9111 self
9112 }
9113
9114 pub fn set_anonymous_authentication_config<T>(mut self, v: T) -> Self
9116 where
9117 T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
9118 {
9119 self.anonymous_authentication_config = std::option::Option::Some(v.into());
9120 self
9121 }
9122
9123 pub fn set_or_clear_anonymous_authentication_config<T>(
9125 mut self,
9126 v: std::option::Option<T>,
9127 ) -> Self
9128 where
9129 T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
9130 {
9131 self.anonymous_authentication_config = v.map(|x| x.into());
9132 self
9133 }
9134}
9135
9136impl wkt::message::Message for Cluster {
9137 fn typename() -> &'static str {
9138 "type.googleapis.com/google.container.v1.Cluster"
9139 }
9140}
9141
9142pub mod cluster {
9144 #[allow(unused_imports)]
9145 use super::*;
9146
9147 #[derive(Clone, Debug, PartialEq)]
9163 #[non_exhaustive]
9164 pub enum Status {
9165 Unspecified,
9167 Provisioning,
9169 Running,
9172 Reconciling,
9176 Stopping,
9178 Error,
9181 Degraded,
9184 UnknownValue(status::UnknownValue),
9189 }
9190
9191 #[doc(hidden)]
9192 pub mod status {
9193 #[allow(unused_imports)]
9194 use super::*;
9195 #[derive(Clone, Debug, PartialEq)]
9196 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9197 }
9198
9199 impl Status {
9200 pub fn value(&self) -> std::option::Option<i32> {
9205 match self {
9206 Self::Unspecified => std::option::Option::Some(0),
9207 Self::Provisioning => std::option::Option::Some(1),
9208 Self::Running => std::option::Option::Some(2),
9209 Self::Reconciling => std::option::Option::Some(3),
9210 Self::Stopping => std::option::Option::Some(4),
9211 Self::Error => std::option::Option::Some(5),
9212 Self::Degraded => std::option::Option::Some(6),
9213 Self::UnknownValue(u) => u.0.value(),
9214 }
9215 }
9216
9217 pub fn name(&self) -> std::option::Option<&str> {
9222 match self {
9223 Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
9224 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
9225 Self::Running => std::option::Option::Some("RUNNING"),
9226 Self::Reconciling => std::option::Option::Some("RECONCILING"),
9227 Self::Stopping => std::option::Option::Some("STOPPING"),
9228 Self::Error => std::option::Option::Some("ERROR"),
9229 Self::Degraded => std::option::Option::Some("DEGRADED"),
9230 Self::UnknownValue(u) => u.0.name(),
9231 }
9232 }
9233 }
9234
9235 impl std::default::Default for Status {
9236 fn default() -> Self {
9237 use std::convert::From;
9238 Self::from(0)
9239 }
9240 }
9241
9242 impl std::fmt::Display for Status {
9243 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9244 wkt::internal::display_enum(f, self.name(), self.value())
9245 }
9246 }
9247
9248 impl std::convert::From<i32> for Status {
9249 fn from(value: i32) -> Self {
9250 match value {
9251 0 => Self::Unspecified,
9252 1 => Self::Provisioning,
9253 2 => Self::Running,
9254 3 => Self::Reconciling,
9255 4 => Self::Stopping,
9256 5 => Self::Error,
9257 6 => Self::Degraded,
9258 _ => Self::UnknownValue(status::UnknownValue(
9259 wkt::internal::UnknownEnumValue::Integer(value),
9260 )),
9261 }
9262 }
9263 }
9264
9265 impl std::convert::From<&str> for Status {
9266 fn from(value: &str) -> Self {
9267 use std::string::ToString;
9268 match value {
9269 "STATUS_UNSPECIFIED" => Self::Unspecified,
9270 "PROVISIONING" => Self::Provisioning,
9271 "RUNNING" => Self::Running,
9272 "RECONCILING" => Self::Reconciling,
9273 "STOPPING" => Self::Stopping,
9274 "ERROR" => Self::Error,
9275 "DEGRADED" => Self::Degraded,
9276 _ => Self::UnknownValue(status::UnknownValue(
9277 wkt::internal::UnknownEnumValue::String(value.to_string()),
9278 )),
9279 }
9280 }
9281 }
9282
9283 impl serde::ser::Serialize for Status {
9284 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9285 where
9286 S: serde::Serializer,
9287 {
9288 match self {
9289 Self::Unspecified => serializer.serialize_i32(0),
9290 Self::Provisioning => serializer.serialize_i32(1),
9291 Self::Running => serializer.serialize_i32(2),
9292 Self::Reconciling => serializer.serialize_i32(3),
9293 Self::Stopping => serializer.serialize_i32(4),
9294 Self::Error => serializer.serialize_i32(5),
9295 Self::Degraded => serializer.serialize_i32(6),
9296 Self::UnknownValue(u) => u.0.serialize(serializer),
9297 }
9298 }
9299 }
9300
9301 impl<'de> serde::de::Deserialize<'de> for Status {
9302 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9303 where
9304 D: serde::Deserializer<'de>,
9305 {
9306 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
9307 ".google.container.v1.Cluster.Status",
9308 ))
9309 }
9310 }
9311}
9312
9313#[derive(Clone, Default, PartialEq)]
9316#[non_exhaustive]
9317pub struct RBACBindingConfig {
9318 pub enable_insecure_binding_system_unauthenticated: std::option::Option<bool>,
9321
9322 pub enable_insecure_binding_system_authenticated: std::option::Option<bool>,
9325
9326 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9327}
9328
9329impl RBACBindingConfig {
9330 pub fn new() -> Self {
9331 std::default::Default::default()
9332 }
9333
9334 pub fn set_enable_insecure_binding_system_unauthenticated<T>(mut self, v: T) -> Self
9336 where
9337 T: std::convert::Into<bool>,
9338 {
9339 self.enable_insecure_binding_system_unauthenticated = std::option::Option::Some(v.into());
9340 self
9341 }
9342
9343 pub fn set_or_clear_enable_insecure_binding_system_unauthenticated<T>(
9345 mut self,
9346 v: std::option::Option<T>,
9347 ) -> Self
9348 where
9349 T: std::convert::Into<bool>,
9350 {
9351 self.enable_insecure_binding_system_unauthenticated = v.map(|x| x.into());
9352 self
9353 }
9354
9355 pub fn set_enable_insecure_binding_system_authenticated<T>(mut self, v: T) -> Self
9357 where
9358 T: std::convert::Into<bool>,
9359 {
9360 self.enable_insecure_binding_system_authenticated = std::option::Option::Some(v.into());
9361 self
9362 }
9363
9364 pub fn set_or_clear_enable_insecure_binding_system_authenticated<T>(
9366 mut self,
9367 v: std::option::Option<T>,
9368 ) -> Self
9369 where
9370 T: std::convert::Into<bool>,
9371 {
9372 self.enable_insecure_binding_system_authenticated = v.map(|x| x.into());
9373 self
9374 }
9375}
9376
9377impl wkt::message::Message for RBACBindingConfig {
9378 fn typename() -> &'static str {
9379 "type.googleapis.com/google.container.v1.RBACBindingConfig"
9380 }
9381}
9382
9383#[derive(Clone, Default, PartialEq)]
9386#[non_exhaustive]
9387pub struct UserManagedKeysConfig {
9388 pub cluster_ca: std::string::String,
9391
9392 pub etcd_api_ca: std::string::String,
9395
9396 pub etcd_peer_ca: std::string::String,
9399
9400 pub service_account_signing_keys: std::vec::Vec<std::string::String>,
9406
9407 pub service_account_verification_keys: std::vec::Vec<std::string::String>,
9413
9414 pub aggregation_ca: std::string::String,
9417
9418 pub control_plane_disk_encryption_key: std::string::String,
9421
9422 pub gkeops_etcd_backup_encryption_key: std::string::String,
9425
9426 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9427}
9428
9429impl UserManagedKeysConfig {
9430 pub fn new() -> Self {
9431 std::default::Default::default()
9432 }
9433
9434 pub fn set_cluster_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9436 self.cluster_ca = v.into();
9437 self
9438 }
9439
9440 pub fn set_etcd_api_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9442 self.etcd_api_ca = v.into();
9443 self
9444 }
9445
9446 pub fn set_etcd_peer_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9448 self.etcd_peer_ca = v.into();
9449 self
9450 }
9451
9452 pub fn set_service_account_signing_keys<T, V>(mut self, v: T) -> Self
9454 where
9455 T: std::iter::IntoIterator<Item = V>,
9456 V: std::convert::Into<std::string::String>,
9457 {
9458 use std::iter::Iterator;
9459 self.service_account_signing_keys = v.into_iter().map(|i| i.into()).collect();
9460 self
9461 }
9462
9463 pub fn set_service_account_verification_keys<T, V>(mut self, v: T) -> Self
9465 where
9466 T: std::iter::IntoIterator<Item = V>,
9467 V: std::convert::Into<std::string::String>,
9468 {
9469 use std::iter::Iterator;
9470 self.service_account_verification_keys = v.into_iter().map(|i| i.into()).collect();
9471 self
9472 }
9473
9474 pub fn set_aggregation_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9476 self.aggregation_ca = v.into();
9477 self
9478 }
9479
9480 pub fn set_control_plane_disk_encryption_key<T: std::convert::Into<std::string::String>>(
9482 mut self,
9483 v: T,
9484 ) -> Self {
9485 self.control_plane_disk_encryption_key = v.into();
9486 self
9487 }
9488
9489 pub fn set_gkeops_etcd_backup_encryption_key<T: std::convert::Into<std::string::String>>(
9491 mut self,
9492 v: T,
9493 ) -> Self {
9494 self.gkeops_etcd_backup_encryption_key = v.into();
9495 self
9496 }
9497}
9498
9499impl wkt::message::Message for UserManagedKeysConfig {
9500 fn typename() -> &'static str {
9501 "type.googleapis.com/google.container.v1.UserManagedKeysConfig"
9502 }
9503}
9504
9505#[derive(Clone, Default, PartialEq)]
9508#[non_exhaustive]
9509pub struct AnonymousAuthenticationConfig {
9510 pub mode: crate::model::anonymous_authentication_config::Mode,
9512
9513 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9514}
9515
9516impl AnonymousAuthenticationConfig {
9517 pub fn new() -> Self {
9518 std::default::Default::default()
9519 }
9520
9521 pub fn set_mode<T: std::convert::Into<crate::model::anonymous_authentication_config::Mode>>(
9523 mut self,
9524 v: T,
9525 ) -> Self {
9526 self.mode = v.into();
9527 self
9528 }
9529}
9530
9531impl wkt::message::Message for AnonymousAuthenticationConfig {
9532 fn typename() -> &'static str {
9533 "type.googleapis.com/google.container.v1.AnonymousAuthenticationConfig"
9534 }
9535}
9536
9537pub mod anonymous_authentication_config {
9539 #[allow(unused_imports)]
9540 use super::*;
9541
9542 #[derive(Clone, Debug, PartialEq)]
9559 #[non_exhaustive]
9560 pub enum Mode {
9561 Unspecified,
9563 Enabled,
9565 Limited,
9567 UnknownValue(mode::UnknownValue),
9572 }
9573
9574 #[doc(hidden)]
9575 pub mod mode {
9576 #[allow(unused_imports)]
9577 use super::*;
9578 #[derive(Clone, Debug, PartialEq)]
9579 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9580 }
9581
9582 impl Mode {
9583 pub fn value(&self) -> std::option::Option<i32> {
9588 match self {
9589 Self::Unspecified => std::option::Option::Some(0),
9590 Self::Enabled => std::option::Option::Some(1),
9591 Self::Limited => std::option::Option::Some(2),
9592 Self::UnknownValue(u) => u.0.value(),
9593 }
9594 }
9595
9596 pub fn name(&self) -> std::option::Option<&str> {
9601 match self {
9602 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
9603 Self::Enabled => std::option::Option::Some("ENABLED"),
9604 Self::Limited => std::option::Option::Some("LIMITED"),
9605 Self::UnknownValue(u) => u.0.name(),
9606 }
9607 }
9608 }
9609
9610 impl std::default::Default for Mode {
9611 fn default() -> Self {
9612 use std::convert::From;
9613 Self::from(0)
9614 }
9615 }
9616
9617 impl std::fmt::Display for Mode {
9618 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9619 wkt::internal::display_enum(f, self.name(), self.value())
9620 }
9621 }
9622
9623 impl std::convert::From<i32> for Mode {
9624 fn from(value: i32) -> Self {
9625 match value {
9626 0 => Self::Unspecified,
9627 1 => Self::Enabled,
9628 2 => Self::Limited,
9629 _ => Self::UnknownValue(mode::UnknownValue(
9630 wkt::internal::UnknownEnumValue::Integer(value),
9631 )),
9632 }
9633 }
9634 }
9635
9636 impl std::convert::From<&str> for Mode {
9637 fn from(value: &str) -> Self {
9638 use std::string::ToString;
9639 match value {
9640 "MODE_UNSPECIFIED" => Self::Unspecified,
9641 "ENABLED" => Self::Enabled,
9642 "LIMITED" => Self::Limited,
9643 _ => Self::UnknownValue(mode::UnknownValue(
9644 wkt::internal::UnknownEnumValue::String(value.to_string()),
9645 )),
9646 }
9647 }
9648 }
9649
9650 impl serde::ser::Serialize for Mode {
9651 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9652 where
9653 S: serde::Serializer,
9654 {
9655 match self {
9656 Self::Unspecified => serializer.serialize_i32(0),
9657 Self::Enabled => serializer.serialize_i32(1),
9658 Self::Limited => serializer.serialize_i32(2),
9659 Self::UnknownValue(u) => u.0.serialize(serializer),
9660 }
9661 }
9662 }
9663
9664 impl<'de> serde::de::Deserialize<'de> for Mode {
9665 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9666 where
9667 D: serde::Deserializer<'de>,
9668 {
9669 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
9670 ".google.container.v1.AnonymousAuthenticationConfig.Mode",
9671 ))
9672 }
9673 }
9674}
9675
9676#[derive(Clone, Default, PartialEq)]
9679#[non_exhaustive]
9680pub struct CompliancePostureConfig {
9681 pub mode: std::option::Option<crate::model::compliance_posture_config::Mode>,
9683
9684 pub compliance_standards:
9686 std::vec::Vec<crate::model::compliance_posture_config::ComplianceStandard>,
9687
9688 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9689}
9690
9691impl CompliancePostureConfig {
9692 pub fn new() -> Self {
9693 std::default::Default::default()
9694 }
9695
9696 pub fn set_mode<T>(mut self, v: T) -> Self
9698 where
9699 T: std::convert::Into<crate::model::compliance_posture_config::Mode>,
9700 {
9701 self.mode = std::option::Option::Some(v.into());
9702 self
9703 }
9704
9705 pub fn set_or_clear_mode<T>(mut self, v: std::option::Option<T>) -> Self
9707 where
9708 T: std::convert::Into<crate::model::compliance_posture_config::Mode>,
9709 {
9710 self.mode = v.map(|x| x.into());
9711 self
9712 }
9713
9714 pub fn set_compliance_standards<T, V>(mut self, v: T) -> Self
9716 where
9717 T: std::iter::IntoIterator<Item = V>,
9718 V: std::convert::Into<crate::model::compliance_posture_config::ComplianceStandard>,
9719 {
9720 use std::iter::Iterator;
9721 self.compliance_standards = v.into_iter().map(|i| i.into()).collect();
9722 self
9723 }
9724}
9725
9726impl wkt::message::Message for CompliancePostureConfig {
9727 fn typename() -> &'static str {
9728 "type.googleapis.com/google.container.v1.CompliancePostureConfig"
9729 }
9730}
9731
9732pub mod compliance_posture_config {
9734 #[allow(unused_imports)]
9735 use super::*;
9736
9737 #[derive(Clone, Default, PartialEq)]
9739 #[non_exhaustive]
9740 pub struct ComplianceStandard {
9741 pub standard: std::option::Option<std::string::String>,
9743
9744 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9745 }
9746
9747 impl ComplianceStandard {
9748 pub fn new() -> Self {
9749 std::default::Default::default()
9750 }
9751
9752 pub fn set_standard<T>(mut self, v: T) -> Self
9754 where
9755 T: std::convert::Into<std::string::String>,
9756 {
9757 self.standard = std::option::Option::Some(v.into());
9758 self
9759 }
9760
9761 pub fn set_or_clear_standard<T>(mut self, v: std::option::Option<T>) -> Self
9763 where
9764 T: std::convert::Into<std::string::String>,
9765 {
9766 self.standard = v.map(|x| x.into());
9767 self
9768 }
9769 }
9770
9771 impl wkt::message::Message for ComplianceStandard {
9772 fn typename() -> &'static str {
9773 "type.googleapis.com/google.container.v1.CompliancePostureConfig.ComplianceStandard"
9774 }
9775 }
9776
9777 #[derive(Clone, Debug, PartialEq)]
9793 #[non_exhaustive]
9794 pub enum Mode {
9795 Unspecified,
9797 Disabled,
9799 Enabled,
9801 UnknownValue(mode::UnknownValue),
9806 }
9807
9808 #[doc(hidden)]
9809 pub mod mode {
9810 #[allow(unused_imports)]
9811 use super::*;
9812 #[derive(Clone, Debug, PartialEq)]
9813 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9814 }
9815
9816 impl Mode {
9817 pub fn value(&self) -> std::option::Option<i32> {
9822 match self {
9823 Self::Unspecified => std::option::Option::Some(0),
9824 Self::Disabled => std::option::Option::Some(1),
9825 Self::Enabled => std::option::Option::Some(2),
9826 Self::UnknownValue(u) => u.0.value(),
9827 }
9828 }
9829
9830 pub fn name(&self) -> std::option::Option<&str> {
9835 match self {
9836 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
9837 Self::Disabled => std::option::Option::Some("DISABLED"),
9838 Self::Enabled => std::option::Option::Some("ENABLED"),
9839 Self::UnknownValue(u) => u.0.name(),
9840 }
9841 }
9842 }
9843
9844 impl std::default::Default for Mode {
9845 fn default() -> Self {
9846 use std::convert::From;
9847 Self::from(0)
9848 }
9849 }
9850
9851 impl std::fmt::Display for Mode {
9852 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9853 wkt::internal::display_enum(f, self.name(), self.value())
9854 }
9855 }
9856
9857 impl std::convert::From<i32> for Mode {
9858 fn from(value: i32) -> Self {
9859 match value {
9860 0 => Self::Unspecified,
9861 1 => Self::Disabled,
9862 2 => Self::Enabled,
9863 _ => Self::UnknownValue(mode::UnknownValue(
9864 wkt::internal::UnknownEnumValue::Integer(value),
9865 )),
9866 }
9867 }
9868 }
9869
9870 impl std::convert::From<&str> for Mode {
9871 fn from(value: &str) -> Self {
9872 use std::string::ToString;
9873 match value {
9874 "MODE_UNSPECIFIED" => Self::Unspecified,
9875 "DISABLED" => Self::Disabled,
9876 "ENABLED" => Self::Enabled,
9877 _ => Self::UnknownValue(mode::UnknownValue(
9878 wkt::internal::UnknownEnumValue::String(value.to_string()),
9879 )),
9880 }
9881 }
9882 }
9883
9884 impl serde::ser::Serialize for Mode {
9885 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9886 where
9887 S: serde::Serializer,
9888 {
9889 match self {
9890 Self::Unspecified => serializer.serialize_i32(0),
9891 Self::Disabled => serializer.serialize_i32(1),
9892 Self::Enabled => serializer.serialize_i32(2),
9893 Self::UnknownValue(u) => u.0.serialize(serializer),
9894 }
9895 }
9896 }
9897
9898 impl<'de> serde::de::Deserialize<'de> for Mode {
9899 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9900 where
9901 D: serde::Deserializer<'de>,
9902 {
9903 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
9904 ".google.container.v1.CompliancePostureConfig.Mode",
9905 ))
9906 }
9907 }
9908}
9909
9910#[derive(Clone, Default, PartialEq)]
9912#[non_exhaustive]
9913pub struct K8sBetaAPIConfig {
9914 pub enabled_apis: std::vec::Vec<std::string::String>,
9916
9917 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9918}
9919
9920impl K8sBetaAPIConfig {
9921 pub fn new() -> Self {
9922 std::default::Default::default()
9923 }
9924
9925 pub fn set_enabled_apis<T, V>(mut self, v: T) -> Self
9927 where
9928 T: std::iter::IntoIterator<Item = V>,
9929 V: std::convert::Into<std::string::String>,
9930 {
9931 use std::iter::Iterator;
9932 self.enabled_apis = v.into_iter().map(|i| i.into()).collect();
9933 self
9934 }
9935}
9936
9937impl wkt::message::Message for K8sBetaAPIConfig {
9938 fn typename() -> &'static str {
9939 "type.googleapis.com/google.container.v1.K8sBetaAPIConfig"
9940 }
9941}
9942
9943#[derive(Clone, Default, PartialEq)]
9946#[non_exhaustive]
9947pub struct SecurityPostureConfig {
9948 pub mode: std::option::Option<crate::model::security_posture_config::Mode>,
9950
9951 pub vulnerability_mode:
9953 std::option::Option<crate::model::security_posture_config::VulnerabilityMode>,
9954
9955 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9956}
9957
9958impl SecurityPostureConfig {
9959 pub fn new() -> Self {
9960 std::default::Default::default()
9961 }
9962
9963 pub fn set_mode<T>(mut self, v: T) -> Self
9965 where
9966 T: std::convert::Into<crate::model::security_posture_config::Mode>,
9967 {
9968 self.mode = std::option::Option::Some(v.into());
9969 self
9970 }
9971
9972 pub fn set_or_clear_mode<T>(mut self, v: std::option::Option<T>) -> Self
9974 where
9975 T: std::convert::Into<crate::model::security_posture_config::Mode>,
9976 {
9977 self.mode = v.map(|x| x.into());
9978 self
9979 }
9980
9981 pub fn set_vulnerability_mode<T>(mut self, v: T) -> Self
9983 where
9984 T: std::convert::Into<crate::model::security_posture_config::VulnerabilityMode>,
9985 {
9986 self.vulnerability_mode = std::option::Option::Some(v.into());
9987 self
9988 }
9989
9990 pub fn set_or_clear_vulnerability_mode<T>(mut self, v: std::option::Option<T>) -> Self
9992 where
9993 T: std::convert::Into<crate::model::security_posture_config::VulnerabilityMode>,
9994 {
9995 self.vulnerability_mode = v.map(|x| x.into());
9996 self
9997 }
9998}
9999
10000impl wkt::message::Message for SecurityPostureConfig {
10001 fn typename() -> &'static str {
10002 "type.googleapis.com/google.container.v1.SecurityPostureConfig"
10003 }
10004}
10005
10006pub mod security_posture_config {
10008 #[allow(unused_imports)]
10009 use super::*;
10010
10011 #[derive(Clone, Debug, PartialEq)]
10027 #[non_exhaustive]
10028 pub enum Mode {
10029 Unspecified,
10031 Disabled,
10033 Basic,
10035 Enterprise,
10037 UnknownValue(mode::UnknownValue),
10042 }
10043
10044 #[doc(hidden)]
10045 pub mod mode {
10046 #[allow(unused_imports)]
10047 use super::*;
10048 #[derive(Clone, Debug, PartialEq)]
10049 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10050 }
10051
10052 impl Mode {
10053 pub fn value(&self) -> std::option::Option<i32> {
10058 match self {
10059 Self::Unspecified => std::option::Option::Some(0),
10060 Self::Disabled => std::option::Option::Some(1),
10061 Self::Basic => std::option::Option::Some(2),
10062 Self::Enterprise => std::option::Option::Some(3),
10063 Self::UnknownValue(u) => u.0.value(),
10064 }
10065 }
10066
10067 pub fn name(&self) -> std::option::Option<&str> {
10072 match self {
10073 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
10074 Self::Disabled => std::option::Option::Some("DISABLED"),
10075 Self::Basic => std::option::Option::Some("BASIC"),
10076 Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
10077 Self::UnknownValue(u) => u.0.name(),
10078 }
10079 }
10080 }
10081
10082 impl std::default::Default for Mode {
10083 fn default() -> Self {
10084 use std::convert::From;
10085 Self::from(0)
10086 }
10087 }
10088
10089 impl std::fmt::Display for Mode {
10090 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10091 wkt::internal::display_enum(f, self.name(), self.value())
10092 }
10093 }
10094
10095 impl std::convert::From<i32> for Mode {
10096 fn from(value: i32) -> Self {
10097 match value {
10098 0 => Self::Unspecified,
10099 1 => Self::Disabled,
10100 2 => Self::Basic,
10101 3 => Self::Enterprise,
10102 _ => Self::UnknownValue(mode::UnknownValue(
10103 wkt::internal::UnknownEnumValue::Integer(value),
10104 )),
10105 }
10106 }
10107 }
10108
10109 impl std::convert::From<&str> for Mode {
10110 fn from(value: &str) -> Self {
10111 use std::string::ToString;
10112 match value {
10113 "MODE_UNSPECIFIED" => Self::Unspecified,
10114 "DISABLED" => Self::Disabled,
10115 "BASIC" => Self::Basic,
10116 "ENTERPRISE" => Self::Enterprise,
10117 _ => Self::UnknownValue(mode::UnknownValue(
10118 wkt::internal::UnknownEnumValue::String(value.to_string()),
10119 )),
10120 }
10121 }
10122 }
10123
10124 impl serde::ser::Serialize for Mode {
10125 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10126 where
10127 S: serde::Serializer,
10128 {
10129 match self {
10130 Self::Unspecified => serializer.serialize_i32(0),
10131 Self::Disabled => serializer.serialize_i32(1),
10132 Self::Basic => serializer.serialize_i32(2),
10133 Self::Enterprise => serializer.serialize_i32(3),
10134 Self::UnknownValue(u) => u.0.serialize(serializer),
10135 }
10136 }
10137 }
10138
10139 impl<'de> serde::de::Deserialize<'de> for Mode {
10140 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10141 where
10142 D: serde::Deserializer<'de>,
10143 {
10144 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
10145 ".google.container.v1.SecurityPostureConfig.Mode",
10146 ))
10147 }
10148 }
10149
10150 #[derive(Clone, Debug, PartialEq)]
10166 #[non_exhaustive]
10167 pub enum VulnerabilityMode {
10168 Unspecified,
10170 VulnerabilityDisabled,
10172 VulnerabilityBasic,
10174 VulnerabilityEnterprise,
10177 UnknownValue(vulnerability_mode::UnknownValue),
10182 }
10183
10184 #[doc(hidden)]
10185 pub mod vulnerability_mode {
10186 #[allow(unused_imports)]
10187 use super::*;
10188 #[derive(Clone, Debug, PartialEq)]
10189 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10190 }
10191
10192 impl VulnerabilityMode {
10193 pub fn value(&self) -> std::option::Option<i32> {
10198 match self {
10199 Self::Unspecified => std::option::Option::Some(0),
10200 Self::VulnerabilityDisabled => std::option::Option::Some(1),
10201 Self::VulnerabilityBasic => std::option::Option::Some(2),
10202 Self::VulnerabilityEnterprise => std::option::Option::Some(3),
10203 Self::UnknownValue(u) => u.0.value(),
10204 }
10205 }
10206
10207 pub fn name(&self) -> std::option::Option<&str> {
10212 match self {
10213 Self::Unspecified => std::option::Option::Some("VULNERABILITY_MODE_UNSPECIFIED"),
10214 Self::VulnerabilityDisabled => std::option::Option::Some("VULNERABILITY_DISABLED"),
10215 Self::VulnerabilityBasic => std::option::Option::Some("VULNERABILITY_BASIC"),
10216 Self::VulnerabilityEnterprise => {
10217 std::option::Option::Some("VULNERABILITY_ENTERPRISE")
10218 }
10219 Self::UnknownValue(u) => u.0.name(),
10220 }
10221 }
10222 }
10223
10224 impl std::default::Default for VulnerabilityMode {
10225 fn default() -> Self {
10226 use std::convert::From;
10227 Self::from(0)
10228 }
10229 }
10230
10231 impl std::fmt::Display for VulnerabilityMode {
10232 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10233 wkt::internal::display_enum(f, self.name(), self.value())
10234 }
10235 }
10236
10237 impl std::convert::From<i32> for VulnerabilityMode {
10238 fn from(value: i32) -> Self {
10239 match value {
10240 0 => Self::Unspecified,
10241 1 => Self::VulnerabilityDisabled,
10242 2 => Self::VulnerabilityBasic,
10243 3 => Self::VulnerabilityEnterprise,
10244 _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
10245 wkt::internal::UnknownEnumValue::Integer(value),
10246 )),
10247 }
10248 }
10249 }
10250
10251 impl std::convert::From<&str> for VulnerabilityMode {
10252 fn from(value: &str) -> Self {
10253 use std::string::ToString;
10254 match value {
10255 "VULNERABILITY_MODE_UNSPECIFIED" => Self::Unspecified,
10256 "VULNERABILITY_DISABLED" => Self::VulnerabilityDisabled,
10257 "VULNERABILITY_BASIC" => Self::VulnerabilityBasic,
10258 "VULNERABILITY_ENTERPRISE" => Self::VulnerabilityEnterprise,
10259 _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
10260 wkt::internal::UnknownEnumValue::String(value.to_string()),
10261 )),
10262 }
10263 }
10264 }
10265
10266 impl serde::ser::Serialize for VulnerabilityMode {
10267 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10268 where
10269 S: serde::Serializer,
10270 {
10271 match self {
10272 Self::Unspecified => serializer.serialize_i32(0),
10273 Self::VulnerabilityDisabled => serializer.serialize_i32(1),
10274 Self::VulnerabilityBasic => serializer.serialize_i32(2),
10275 Self::VulnerabilityEnterprise => serializer.serialize_i32(3),
10276 Self::UnknownValue(u) => u.0.serialize(serializer),
10277 }
10278 }
10279 }
10280
10281 impl<'de> serde::de::Deserialize<'de> for VulnerabilityMode {
10282 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10283 where
10284 D: serde::Deserializer<'de>,
10285 {
10286 deserializer.deserialize_any(wkt::internal::EnumVisitor::<VulnerabilityMode>::new(
10287 ".google.container.v1.SecurityPostureConfig.VulnerabilityMode",
10288 ))
10289 }
10290 }
10291}
10292
10293#[derive(Clone, Default, PartialEq)]
10296#[non_exhaustive]
10297pub struct NodePoolAutoConfig {
10298 pub network_tags: std::option::Option<crate::model::NetworkTags>,
10303
10304 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
10307
10308 pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10312
10313 pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
10315
10316 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10317}
10318
10319impl NodePoolAutoConfig {
10320 pub fn new() -> Self {
10321 std::default::Default::default()
10322 }
10323
10324 pub fn set_network_tags<T>(mut self, v: T) -> Self
10326 where
10327 T: std::convert::Into<crate::model::NetworkTags>,
10328 {
10329 self.network_tags = std::option::Option::Some(v.into());
10330 self
10331 }
10332
10333 pub fn set_or_clear_network_tags<T>(mut self, v: std::option::Option<T>) -> Self
10335 where
10336 T: std::convert::Into<crate::model::NetworkTags>,
10337 {
10338 self.network_tags = v.map(|x| x.into());
10339 self
10340 }
10341
10342 pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
10344 where
10345 T: std::convert::Into<crate::model::ResourceManagerTags>,
10346 {
10347 self.resource_manager_tags = std::option::Option::Some(v.into());
10348 self
10349 }
10350
10351 pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
10353 where
10354 T: std::convert::Into<crate::model::ResourceManagerTags>,
10355 {
10356 self.resource_manager_tags = v.map(|x| x.into());
10357 self
10358 }
10359
10360 pub fn set_node_kubelet_config<T>(mut self, v: T) -> Self
10362 where
10363 T: std::convert::Into<crate::model::NodeKubeletConfig>,
10364 {
10365 self.node_kubelet_config = std::option::Option::Some(v.into());
10366 self
10367 }
10368
10369 pub fn set_or_clear_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
10371 where
10372 T: std::convert::Into<crate::model::NodeKubeletConfig>,
10373 {
10374 self.node_kubelet_config = v.map(|x| x.into());
10375 self
10376 }
10377
10378 pub fn set_linux_node_config<T>(mut self, v: T) -> Self
10380 where
10381 T: std::convert::Into<crate::model::LinuxNodeConfig>,
10382 {
10383 self.linux_node_config = std::option::Option::Some(v.into());
10384 self
10385 }
10386
10387 pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
10389 where
10390 T: std::convert::Into<crate::model::LinuxNodeConfig>,
10391 {
10392 self.linux_node_config = v.map(|x| x.into());
10393 self
10394 }
10395}
10396
10397impl wkt::message::Message for NodePoolAutoConfig {
10398 fn typename() -> &'static str {
10399 "type.googleapis.com/google.container.v1.NodePoolAutoConfig"
10400 }
10401}
10402
10403#[derive(Clone, Default, PartialEq)]
10405#[non_exhaustive]
10406pub struct NodePoolDefaults {
10407 pub node_config_defaults: std::option::Option<crate::model::NodeConfigDefaults>,
10409
10410 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10411}
10412
10413impl NodePoolDefaults {
10414 pub fn new() -> Self {
10415 std::default::Default::default()
10416 }
10417
10418 pub fn set_node_config_defaults<T>(mut self, v: T) -> Self
10420 where
10421 T: std::convert::Into<crate::model::NodeConfigDefaults>,
10422 {
10423 self.node_config_defaults = std::option::Option::Some(v.into());
10424 self
10425 }
10426
10427 pub fn set_or_clear_node_config_defaults<T>(mut self, v: std::option::Option<T>) -> Self
10429 where
10430 T: std::convert::Into<crate::model::NodeConfigDefaults>,
10431 {
10432 self.node_config_defaults = v.map(|x| x.into());
10433 self
10434 }
10435}
10436
10437impl wkt::message::Message for NodePoolDefaults {
10438 fn typename() -> &'static str {
10439 "type.googleapis.com/google.container.v1.NodePoolDefaults"
10440 }
10441}
10442
10443#[derive(Clone, Default, PartialEq)]
10445#[non_exhaustive]
10446pub struct NodeConfigDefaults {
10447 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10449
10450 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10452
10453 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10455
10456 pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10460
10461 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10462}
10463
10464impl NodeConfigDefaults {
10465 pub fn new() -> Self {
10466 std::default::Default::default()
10467 }
10468
10469 pub fn set_gcfs_config<T>(mut self, v: T) -> Self
10471 where
10472 T: std::convert::Into<crate::model::GcfsConfig>,
10473 {
10474 self.gcfs_config = std::option::Option::Some(v.into());
10475 self
10476 }
10477
10478 pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
10480 where
10481 T: std::convert::Into<crate::model::GcfsConfig>,
10482 {
10483 self.gcfs_config = v.map(|x| x.into());
10484 self
10485 }
10486
10487 pub fn set_logging_config<T>(mut self, v: T) -> Self
10489 where
10490 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
10491 {
10492 self.logging_config = std::option::Option::Some(v.into());
10493 self
10494 }
10495
10496 pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
10498 where
10499 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
10500 {
10501 self.logging_config = v.map(|x| x.into());
10502 self
10503 }
10504
10505 pub fn set_containerd_config<T>(mut self, v: T) -> Self
10507 where
10508 T: std::convert::Into<crate::model::ContainerdConfig>,
10509 {
10510 self.containerd_config = std::option::Option::Some(v.into());
10511 self
10512 }
10513
10514 pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
10516 where
10517 T: std::convert::Into<crate::model::ContainerdConfig>,
10518 {
10519 self.containerd_config = v.map(|x| x.into());
10520 self
10521 }
10522
10523 pub fn set_node_kubelet_config<T>(mut self, v: T) -> Self
10525 where
10526 T: std::convert::Into<crate::model::NodeKubeletConfig>,
10527 {
10528 self.node_kubelet_config = std::option::Option::Some(v.into());
10529 self
10530 }
10531
10532 pub fn set_or_clear_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
10534 where
10535 T: std::convert::Into<crate::model::NodeKubeletConfig>,
10536 {
10537 self.node_kubelet_config = v.map(|x| x.into());
10538 self
10539 }
10540}
10541
10542impl wkt::message::Message for NodeConfigDefaults {
10543 fn typename() -> &'static str {
10544 "type.googleapis.com/google.container.v1.NodeConfigDefaults"
10545 }
10546}
10547
10548#[derive(Clone, Default, PartialEq)]
10552#[non_exhaustive]
10553pub struct ClusterUpdate {
10554 pub desired_node_version: std::string::String,
10566
10567 pub desired_monitoring_service: std::string::String,
10579
10580 pub desired_addons_config: std::option::Option<crate::model::AddonsConfig>,
10582
10583 pub desired_node_pool_id: std::string::String,
10588
10589 pub desired_image_type: std::string::String,
10592
10593 pub desired_database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
10595
10596 pub desired_workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
10598
10599 pub desired_mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
10602
10603 pub desired_shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
10605
10606 pub desired_cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
10608
10609 pub desired_dns_config: std::option::Option<crate::model::DNSConfig>,
10611
10612 pub desired_node_pool_autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
10617
10618 pub desired_locations: std::vec::Vec<std::string::String>,
10627
10628 #[deprecated]
10634 pub desired_master_authorized_networks_config:
10635 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
10636
10637 pub desired_cluster_autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
10639
10640 pub desired_binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
10642
10643 pub desired_logging_service: std::string::String,
10655
10656 pub desired_resource_usage_export_config:
10658 std::option::Option<crate::model::ResourceUsageExportConfig>,
10659
10660 pub desired_vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
10662
10663 #[deprecated]
10677 pub desired_private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
10678
10679 pub desired_intra_node_visibility_config:
10681 std::option::Option<crate::model::IntraNodeVisibilityConfig>,
10682
10683 pub desired_default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
10685
10686 pub desired_release_channel: std::option::Option<crate::model::ReleaseChannel>,
10688
10689 pub desired_l4ilb_subsetting_config: std::option::Option<crate::model::ILBSubsettingConfig>,
10691
10692 pub desired_datapath_provider: crate::model::DatapathProvider,
10694
10695 pub desired_private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
10697
10698 pub desired_notification_config: std::option::Option<crate::model::NotificationConfig>,
10700
10701 pub desired_authenticator_groups_config:
10703 std::option::Option<crate::model::AuthenticatorGroupsConfig>,
10704
10705 pub desired_logging_config: std::option::Option<crate::model::LoggingConfig>,
10707
10708 pub desired_monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
10710
10711 pub desired_identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
10713
10714 pub desired_service_external_ips_config:
10717 std::option::Option<crate::model::ServiceExternalIPsConfig>,
10718
10719 #[deprecated]
10726 pub desired_enable_private_endpoint: std::option::Option<bool>,
10727
10728 pub desired_default_enable_private_nodes: std::option::Option<bool>,
10734
10735 pub desired_control_plane_endpoints_config:
10741 std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
10742
10743 pub desired_master_version: std::string::String,
10754
10755 pub desired_gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10757
10758 pub desired_node_pool_auto_config_network_tags: std::option::Option<crate::model::NetworkTags>,
10761
10762 pub desired_pod_autoscaling: std::option::Option<crate::model::PodAutoscaling>,
10764
10765 pub desired_gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
10767
10768 pub etag: std::string::String,
10772
10773 pub desired_node_pool_logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10775
10776 pub desired_fleet: std::option::Option<crate::model::Fleet>,
10778
10779 pub desired_stack_type: crate::model::StackType,
10783
10784 pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
10787
10788 pub removed_additional_pod_ranges_config:
10792 std::option::Option<crate::model::AdditionalPodRangesConfig>,
10793
10794 pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
10796
10797 pub desired_security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
10799
10800 pub desired_network_performance_config:
10802 std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
10803
10804 pub desired_enable_fqdn_network_policy: std::option::Option<bool>,
10806
10807 pub desired_autopilot_workload_policy_config:
10809 std::option::Option<crate::model::WorkloadPolicyConfig>,
10810
10811 pub desired_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
10813
10814 pub desired_containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10816
10817 pub desired_enable_multi_networking: std::option::Option<bool>,
10819
10820 pub desired_node_pool_auto_config_resource_manager_tags:
10823 std::option::Option<crate::model::ResourceManagerTags>,
10824
10825 pub desired_in_transit_encryption_config:
10827 std::option::Option<crate::model::InTransitEncryptionConfig>,
10828
10829 pub desired_enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
10831
10832 pub desired_secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
10834
10835 pub desired_compliance_posture_config:
10837 std::option::Option<crate::model::CompliancePostureConfig>,
10838
10839 pub desired_node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10841
10842 pub desired_node_pool_auto_config_kubelet_config:
10845 std::option::Option<crate::model::NodeKubeletConfig>,
10846
10847 #[deprecated]
10856 pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
10857
10858 pub desired_rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
10861
10862 pub desired_additional_ip_ranges_config:
10864 std::option::Option<crate::model::DesiredAdditionalIPRangesConfig>,
10865
10866 #[deprecated]
10871 pub desired_enterprise_config: std::option::Option<crate::model::DesiredEnterpriseConfig>,
10872
10873 pub desired_auto_ipam_config: std::option::Option<crate::model::AutoIpamConfig>,
10875
10876 pub desired_disable_l4_lb_firewall_reconciliation: std::option::Option<bool>,
10878
10879 pub desired_node_pool_auto_config_linux_node_config:
10884 std::option::Option<crate::model::LinuxNodeConfig>,
10885
10886 pub desired_user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
10888
10889 pub desired_anonymous_authentication_config:
10892 std::option::Option<crate::model::AnonymousAuthenticationConfig>,
10893
10894 pub gke_auto_upgrade_config: std::option::Option<crate::model::GkeAutoUpgradeConfig>,
10896
10897 pub desired_network_tier_config: std::option::Option<crate::model::NetworkTierConfig>,
10899
10900 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10901}
10902
10903impl ClusterUpdate {
10904 pub fn new() -> Self {
10905 std::default::Default::default()
10906 }
10907
10908 pub fn set_desired_node_version<T: std::convert::Into<std::string::String>>(
10910 mut self,
10911 v: T,
10912 ) -> Self {
10913 self.desired_node_version = v.into();
10914 self
10915 }
10916
10917 pub fn set_desired_monitoring_service<T: std::convert::Into<std::string::String>>(
10919 mut self,
10920 v: T,
10921 ) -> Self {
10922 self.desired_monitoring_service = v.into();
10923 self
10924 }
10925
10926 pub fn set_desired_addons_config<T>(mut self, v: T) -> Self
10928 where
10929 T: std::convert::Into<crate::model::AddonsConfig>,
10930 {
10931 self.desired_addons_config = std::option::Option::Some(v.into());
10932 self
10933 }
10934
10935 pub fn set_or_clear_desired_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
10937 where
10938 T: std::convert::Into<crate::model::AddonsConfig>,
10939 {
10940 self.desired_addons_config = v.map(|x| x.into());
10941 self
10942 }
10943
10944 pub fn set_desired_node_pool_id<T: std::convert::Into<std::string::String>>(
10946 mut self,
10947 v: T,
10948 ) -> Self {
10949 self.desired_node_pool_id = v.into();
10950 self
10951 }
10952
10953 pub fn set_desired_image_type<T: std::convert::Into<std::string::String>>(
10955 mut self,
10956 v: T,
10957 ) -> Self {
10958 self.desired_image_type = v.into();
10959 self
10960 }
10961
10962 pub fn set_desired_database_encryption<T>(mut self, v: T) -> Self
10964 where
10965 T: std::convert::Into<crate::model::DatabaseEncryption>,
10966 {
10967 self.desired_database_encryption = std::option::Option::Some(v.into());
10968 self
10969 }
10970
10971 pub fn set_or_clear_desired_database_encryption<T>(mut self, v: std::option::Option<T>) -> Self
10973 where
10974 T: std::convert::Into<crate::model::DatabaseEncryption>,
10975 {
10976 self.desired_database_encryption = v.map(|x| x.into());
10977 self
10978 }
10979
10980 pub fn set_desired_workload_identity_config<T>(mut self, v: T) -> Self
10982 where
10983 T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
10984 {
10985 self.desired_workload_identity_config = std::option::Option::Some(v.into());
10986 self
10987 }
10988
10989 pub fn set_or_clear_desired_workload_identity_config<T>(
10991 mut self,
10992 v: std::option::Option<T>,
10993 ) -> Self
10994 where
10995 T: std::convert::Into<crate::model::WorkloadIdentityConfig>,
10996 {
10997 self.desired_workload_identity_config = v.map(|x| x.into());
10998 self
10999 }
11000
11001 pub fn set_desired_mesh_certificates<T>(mut self, v: T) -> Self
11003 where
11004 T: std::convert::Into<crate::model::MeshCertificates>,
11005 {
11006 self.desired_mesh_certificates = std::option::Option::Some(v.into());
11007 self
11008 }
11009
11010 pub fn set_or_clear_desired_mesh_certificates<T>(mut self, v: std::option::Option<T>) -> Self
11012 where
11013 T: std::convert::Into<crate::model::MeshCertificates>,
11014 {
11015 self.desired_mesh_certificates = v.map(|x| x.into());
11016 self
11017 }
11018
11019 pub fn set_desired_shielded_nodes<T>(mut self, v: T) -> Self
11021 where
11022 T: std::convert::Into<crate::model::ShieldedNodes>,
11023 {
11024 self.desired_shielded_nodes = std::option::Option::Some(v.into());
11025 self
11026 }
11027
11028 pub fn set_or_clear_desired_shielded_nodes<T>(mut self, v: std::option::Option<T>) -> Self
11030 where
11031 T: std::convert::Into<crate::model::ShieldedNodes>,
11032 {
11033 self.desired_shielded_nodes = v.map(|x| x.into());
11034 self
11035 }
11036
11037 pub fn set_desired_cost_management_config<T>(mut self, v: T) -> Self
11039 where
11040 T: std::convert::Into<crate::model::CostManagementConfig>,
11041 {
11042 self.desired_cost_management_config = std::option::Option::Some(v.into());
11043 self
11044 }
11045
11046 pub fn set_or_clear_desired_cost_management_config<T>(
11048 mut self,
11049 v: std::option::Option<T>,
11050 ) -> Self
11051 where
11052 T: std::convert::Into<crate::model::CostManagementConfig>,
11053 {
11054 self.desired_cost_management_config = v.map(|x| x.into());
11055 self
11056 }
11057
11058 pub fn set_desired_dns_config<T>(mut self, v: T) -> Self
11060 where
11061 T: std::convert::Into<crate::model::DNSConfig>,
11062 {
11063 self.desired_dns_config = std::option::Option::Some(v.into());
11064 self
11065 }
11066
11067 pub fn set_or_clear_desired_dns_config<T>(mut self, v: std::option::Option<T>) -> Self
11069 where
11070 T: std::convert::Into<crate::model::DNSConfig>,
11071 {
11072 self.desired_dns_config = v.map(|x| x.into());
11073 self
11074 }
11075
11076 pub fn set_desired_node_pool_autoscaling<T>(mut self, v: T) -> Self
11078 where
11079 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
11080 {
11081 self.desired_node_pool_autoscaling = std::option::Option::Some(v.into());
11082 self
11083 }
11084
11085 pub fn set_or_clear_desired_node_pool_autoscaling<T>(
11087 mut self,
11088 v: std::option::Option<T>,
11089 ) -> Self
11090 where
11091 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
11092 {
11093 self.desired_node_pool_autoscaling = v.map(|x| x.into());
11094 self
11095 }
11096
11097 pub fn set_desired_locations<T, V>(mut self, v: T) -> Self
11099 where
11100 T: std::iter::IntoIterator<Item = V>,
11101 V: std::convert::Into<std::string::String>,
11102 {
11103 use std::iter::Iterator;
11104 self.desired_locations = v.into_iter().map(|i| i.into()).collect();
11105 self
11106 }
11107
11108 #[deprecated]
11110 pub fn set_desired_master_authorized_networks_config<T>(mut self, v: T) -> Self
11111 where
11112 T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
11113 {
11114 self.desired_master_authorized_networks_config = std::option::Option::Some(v.into());
11115 self
11116 }
11117
11118 #[deprecated]
11120 pub fn set_or_clear_desired_master_authorized_networks_config<T>(
11121 mut self,
11122 v: std::option::Option<T>,
11123 ) -> Self
11124 where
11125 T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
11126 {
11127 self.desired_master_authorized_networks_config = v.map(|x| x.into());
11128 self
11129 }
11130
11131 pub fn set_desired_cluster_autoscaling<T>(mut self, v: T) -> Self
11133 where
11134 T: std::convert::Into<crate::model::ClusterAutoscaling>,
11135 {
11136 self.desired_cluster_autoscaling = std::option::Option::Some(v.into());
11137 self
11138 }
11139
11140 pub fn set_or_clear_desired_cluster_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
11142 where
11143 T: std::convert::Into<crate::model::ClusterAutoscaling>,
11144 {
11145 self.desired_cluster_autoscaling = v.map(|x| x.into());
11146 self
11147 }
11148
11149 pub fn set_desired_binary_authorization<T>(mut self, v: T) -> Self
11151 where
11152 T: std::convert::Into<crate::model::BinaryAuthorization>,
11153 {
11154 self.desired_binary_authorization = std::option::Option::Some(v.into());
11155 self
11156 }
11157
11158 pub fn set_or_clear_desired_binary_authorization<T>(mut self, v: std::option::Option<T>) -> Self
11160 where
11161 T: std::convert::Into<crate::model::BinaryAuthorization>,
11162 {
11163 self.desired_binary_authorization = v.map(|x| x.into());
11164 self
11165 }
11166
11167 pub fn set_desired_logging_service<T: std::convert::Into<std::string::String>>(
11169 mut self,
11170 v: T,
11171 ) -> Self {
11172 self.desired_logging_service = v.into();
11173 self
11174 }
11175
11176 pub fn set_desired_resource_usage_export_config<T>(mut self, v: T) -> Self
11178 where
11179 T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
11180 {
11181 self.desired_resource_usage_export_config = std::option::Option::Some(v.into());
11182 self
11183 }
11184
11185 pub fn set_or_clear_desired_resource_usage_export_config<T>(
11187 mut self,
11188 v: std::option::Option<T>,
11189 ) -> Self
11190 where
11191 T: std::convert::Into<crate::model::ResourceUsageExportConfig>,
11192 {
11193 self.desired_resource_usage_export_config = v.map(|x| x.into());
11194 self
11195 }
11196
11197 pub fn set_desired_vertical_pod_autoscaling<T>(mut self, v: T) -> Self
11199 where
11200 T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
11201 {
11202 self.desired_vertical_pod_autoscaling = std::option::Option::Some(v.into());
11203 self
11204 }
11205
11206 pub fn set_or_clear_desired_vertical_pod_autoscaling<T>(
11208 mut self,
11209 v: std::option::Option<T>,
11210 ) -> Self
11211 where
11212 T: std::convert::Into<crate::model::VerticalPodAutoscaling>,
11213 {
11214 self.desired_vertical_pod_autoscaling = v.map(|x| x.into());
11215 self
11216 }
11217
11218 #[deprecated]
11220 pub fn set_desired_private_cluster_config<T>(mut self, v: T) -> Self
11221 where
11222 T: std::convert::Into<crate::model::PrivateClusterConfig>,
11223 {
11224 self.desired_private_cluster_config = std::option::Option::Some(v.into());
11225 self
11226 }
11227
11228 #[deprecated]
11230 pub fn set_or_clear_desired_private_cluster_config<T>(
11231 mut self,
11232 v: std::option::Option<T>,
11233 ) -> Self
11234 where
11235 T: std::convert::Into<crate::model::PrivateClusterConfig>,
11236 {
11237 self.desired_private_cluster_config = v.map(|x| x.into());
11238 self
11239 }
11240
11241 pub fn set_desired_intra_node_visibility_config<T>(mut self, v: T) -> Self
11243 where
11244 T: std::convert::Into<crate::model::IntraNodeVisibilityConfig>,
11245 {
11246 self.desired_intra_node_visibility_config = std::option::Option::Some(v.into());
11247 self
11248 }
11249
11250 pub fn set_or_clear_desired_intra_node_visibility_config<T>(
11252 mut self,
11253 v: std::option::Option<T>,
11254 ) -> Self
11255 where
11256 T: std::convert::Into<crate::model::IntraNodeVisibilityConfig>,
11257 {
11258 self.desired_intra_node_visibility_config = v.map(|x| x.into());
11259 self
11260 }
11261
11262 pub fn set_desired_default_snat_status<T>(mut self, v: T) -> Self
11264 where
11265 T: std::convert::Into<crate::model::DefaultSnatStatus>,
11266 {
11267 self.desired_default_snat_status = std::option::Option::Some(v.into());
11268 self
11269 }
11270
11271 pub fn set_or_clear_desired_default_snat_status<T>(mut self, v: std::option::Option<T>) -> Self
11273 where
11274 T: std::convert::Into<crate::model::DefaultSnatStatus>,
11275 {
11276 self.desired_default_snat_status = v.map(|x| x.into());
11277 self
11278 }
11279
11280 pub fn set_desired_release_channel<T>(mut self, v: T) -> Self
11282 where
11283 T: std::convert::Into<crate::model::ReleaseChannel>,
11284 {
11285 self.desired_release_channel = std::option::Option::Some(v.into());
11286 self
11287 }
11288
11289 pub fn set_or_clear_desired_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
11291 where
11292 T: std::convert::Into<crate::model::ReleaseChannel>,
11293 {
11294 self.desired_release_channel = v.map(|x| x.into());
11295 self
11296 }
11297
11298 pub fn set_desired_l4ilb_subsetting_config<T>(mut self, v: T) -> Self
11300 where
11301 T: std::convert::Into<crate::model::ILBSubsettingConfig>,
11302 {
11303 self.desired_l4ilb_subsetting_config = std::option::Option::Some(v.into());
11304 self
11305 }
11306
11307 pub fn set_or_clear_desired_l4ilb_subsetting_config<T>(
11309 mut self,
11310 v: std::option::Option<T>,
11311 ) -> Self
11312 where
11313 T: std::convert::Into<crate::model::ILBSubsettingConfig>,
11314 {
11315 self.desired_l4ilb_subsetting_config = v.map(|x| x.into());
11316 self
11317 }
11318
11319 pub fn set_desired_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
11321 mut self,
11322 v: T,
11323 ) -> Self {
11324 self.desired_datapath_provider = v.into();
11325 self
11326 }
11327
11328 pub fn set_desired_private_ipv6_google_access<
11330 T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
11331 >(
11332 mut self,
11333 v: T,
11334 ) -> Self {
11335 self.desired_private_ipv6_google_access = v.into();
11336 self
11337 }
11338
11339 pub fn set_desired_notification_config<T>(mut self, v: T) -> Self
11341 where
11342 T: std::convert::Into<crate::model::NotificationConfig>,
11343 {
11344 self.desired_notification_config = std::option::Option::Some(v.into());
11345 self
11346 }
11347
11348 pub fn set_or_clear_desired_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
11350 where
11351 T: std::convert::Into<crate::model::NotificationConfig>,
11352 {
11353 self.desired_notification_config = v.map(|x| x.into());
11354 self
11355 }
11356
11357 pub fn set_desired_authenticator_groups_config<T>(mut self, v: T) -> Self
11359 where
11360 T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
11361 {
11362 self.desired_authenticator_groups_config = std::option::Option::Some(v.into());
11363 self
11364 }
11365
11366 pub fn set_or_clear_desired_authenticator_groups_config<T>(
11368 mut self,
11369 v: std::option::Option<T>,
11370 ) -> Self
11371 where
11372 T: std::convert::Into<crate::model::AuthenticatorGroupsConfig>,
11373 {
11374 self.desired_authenticator_groups_config = v.map(|x| x.into());
11375 self
11376 }
11377
11378 pub fn set_desired_logging_config<T>(mut self, v: T) -> Self
11380 where
11381 T: std::convert::Into<crate::model::LoggingConfig>,
11382 {
11383 self.desired_logging_config = std::option::Option::Some(v.into());
11384 self
11385 }
11386
11387 pub fn set_or_clear_desired_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
11389 where
11390 T: std::convert::Into<crate::model::LoggingConfig>,
11391 {
11392 self.desired_logging_config = v.map(|x| x.into());
11393 self
11394 }
11395
11396 pub fn set_desired_monitoring_config<T>(mut self, v: T) -> Self
11398 where
11399 T: std::convert::Into<crate::model::MonitoringConfig>,
11400 {
11401 self.desired_monitoring_config = std::option::Option::Some(v.into());
11402 self
11403 }
11404
11405 pub fn set_or_clear_desired_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
11407 where
11408 T: std::convert::Into<crate::model::MonitoringConfig>,
11409 {
11410 self.desired_monitoring_config = v.map(|x| x.into());
11411 self
11412 }
11413
11414 pub fn set_desired_identity_service_config<T>(mut self, v: T) -> Self
11416 where
11417 T: std::convert::Into<crate::model::IdentityServiceConfig>,
11418 {
11419 self.desired_identity_service_config = std::option::Option::Some(v.into());
11420 self
11421 }
11422
11423 pub fn set_or_clear_desired_identity_service_config<T>(
11425 mut self,
11426 v: std::option::Option<T>,
11427 ) -> Self
11428 where
11429 T: std::convert::Into<crate::model::IdentityServiceConfig>,
11430 {
11431 self.desired_identity_service_config = v.map(|x| x.into());
11432 self
11433 }
11434
11435 pub fn set_desired_service_external_ips_config<T>(mut self, v: T) -> Self
11437 where
11438 T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
11439 {
11440 self.desired_service_external_ips_config = std::option::Option::Some(v.into());
11441 self
11442 }
11443
11444 pub fn set_or_clear_desired_service_external_ips_config<T>(
11446 mut self,
11447 v: std::option::Option<T>,
11448 ) -> Self
11449 where
11450 T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
11451 {
11452 self.desired_service_external_ips_config = v.map(|x| x.into());
11453 self
11454 }
11455
11456 #[deprecated]
11458 pub fn set_desired_enable_private_endpoint<T>(mut self, v: T) -> Self
11459 where
11460 T: std::convert::Into<bool>,
11461 {
11462 self.desired_enable_private_endpoint = std::option::Option::Some(v.into());
11463 self
11464 }
11465
11466 #[deprecated]
11468 pub fn set_or_clear_desired_enable_private_endpoint<T>(
11469 mut self,
11470 v: std::option::Option<T>,
11471 ) -> Self
11472 where
11473 T: std::convert::Into<bool>,
11474 {
11475 self.desired_enable_private_endpoint = v.map(|x| x.into());
11476 self
11477 }
11478
11479 pub fn set_desired_default_enable_private_nodes<T>(mut self, v: T) -> Self
11481 where
11482 T: std::convert::Into<bool>,
11483 {
11484 self.desired_default_enable_private_nodes = std::option::Option::Some(v.into());
11485 self
11486 }
11487
11488 pub fn set_or_clear_desired_default_enable_private_nodes<T>(
11490 mut self,
11491 v: std::option::Option<T>,
11492 ) -> Self
11493 where
11494 T: std::convert::Into<bool>,
11495 {
11496 self.desired_default_enable_private_nodes = v.map(|x| x.into());
11497 self
11498 }
11499
11500 pub fn set_desired_control_plane_endpoints_config<T>(mut self, v: T) -> Self
11502 where
11503 T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
11504 {
11505 self.desired_control_plane_endpoints_config = std::option::Option::Some(v.into());
11506 self
11507 }
11508
11509 pub fn set_or_clear_desired_control_plane_endpoints_config<T>(
11511 mut self,
11512 v: std::option::Option<T>,
11513 ) -> Self
11514 where
11515 T: std::convert::Into<crate::model::ControlPlaneEndpointsConfig>,
11516 {
11517 self.desired_control_plane_endpoints_config = v.map(|x| x.into());
11518 self
11519 }
11520
11521 pub fn set_desired_master_version<T: std::convert::Into<std::string::String>>(
11523 mut self,
11524 v: T,
11525 ) -> Self {
11526 self.desired_master_version = v.into();
11527 self
11528 }
11529
11530 pub fn set_desired_gcfs_config<T>(mut self, v: T) -> Self
11532 where
11533 T: std::convert::Into<crate::model::GcfsConfig>,
11534 {
11535 self.desired_gcfs_config = std::option::Option::Some(v.into());
11536 self
11537 }
11538
11539 pub fn set_or_clear_desired_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
11541 where
11542 T: std::convert::Into<crate::model::GcfsConfig>,
11543 {
11544 self.desired_gcfs_config = v.map(|x| x.into());
11545 self
11546 }
11547
11548 pub fn set_desired_node_pool_auto_config_network_tags<T>(mut self, v: T) -> Self
11550 where
11551 T: std::convert::Into<crate::model::NetworkTags>,
11552 {
11553 self.desired_node_pool_auto_config_network_tags = std::option::Option::Some(v.into());
11554 self
11555 }
11556
11557 pub fn set_or_clear_desired_node_pool_auto_config_network_tags<T>(
11559 mut self,
11560 v: std::option::Option<T>,
11561 ) -> Self
11562 where
11563 T: std::convert::Into<crate::model::NetworkTags>,
11564 {
11565 self.desired_node_pool_auto_config_network_tags = v.map(|x| x.into());
11566 self
11567 }
11568
11569 pub fn set_desired_pod_autoscaling<T>(mut self, v: T) -> Self
11571 where
11572 T: std::convert::Into<crate::model::PodAutoscaling>,
11573 {
11574 self.desired_pod_autoscaling = std::option::Option::Some(v.into());
11575 self
11576 }
11577
11578 pub fn set_or_clear_desired_pod_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
11580 where
11581 T: std::convert::Into<crate::model::PodAutoscaling>,
11582 {
11583 self.desired_pod_autoscaling = v.map(|x| x.into());
11584 self
11585 }
11586
11587 pub fn set_desired_gateway_api_config<T>(mut self, v: T) -> Self
11589 where
11590 T: std::convert::Into<crate::model::GatewayAPIConfig>,
11591 {
11592 self.desired_gateway_api_config = std::option::Option::Some(v.into());
11593 self
11594 }
11595
11596 pub fn set_or_clear_desired_gateway_api_config<T>(mut self, v: std::option::Option<T>) -> Self
11598 where
11599 T: std::convert::Into<crate::model::GatewayAPIConfig>,
11600 {
11601 self.desired_gateway_api_config = v.map(|x| x.into());
11602 self
11603 }
11604
11605 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11607 self.etag = v.into();
11608 self
11609 }
11610
11611 pub fn set_desired_node_pool_logging_config<T>(mut self, v: T) -> Self
11613 where
11614 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
11615 {
11616 self.desired_node_pool_logging_config = std::option::Option::Some(v.into());
11617 self
11618 }
11619
11620 pub fn set_or_clear_desired_node_pool_logging_config<T>(
11622 mut self,
11623 v: std::option::Option<T>,
11624 ) -> Self
11625 where
11626 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
11627 {
11628 self.desired_node_pool_logging_config = v.map(|x| x.into());
11629 self
11630 }
11631
11632 pub fn set_desired_fleet<T>(mut self, v: T) -> Self
11634 where
11635 T: std::convert::Into<crate::model::Fleet>,
11636 {
11637 self.desired_fleet = std::option::Option::Some(v.into());
11638 self
11639 }
11640
11641 pub fn set_or_clear_desired_fleet<T>(mut self, v: std::option::Option<T>) -> Self
11643 where
11644 T: std::convert::Into<crate::model::Fleet>,
11645 {
11646 self.desired_fleet = v.map(|x| x.into());
11647 self
11648 }
11649
11650 pub fn set_desired_stack_type<T: std::convert::Into<crate::model::StackType>>(
11652 mut self,
11653 v: T,
11654 ) -> Self {
11655 self.desired_stack_type = v.into();
11656 self
11657 }
11658
11659 pub fn set_additional_pod_ranges_config<T>(mut self, v: T) -> Self
11661 where
11662 T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11663 {
11664 self.additional_pod_ranges_config = std::option::Option::Some(v.into());
11665 self
11666 }
11667
11668 pub fn set_or_clear_additional_pod_ranges_config<T>(mut self, v: std::option::Option<T>) -> Self
11670 where
11671 T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11672 {
11673 self.additional_pod_ranges_config = v.map(|x| x.into());
11674 self
11675 }
11676
11677 pub fn set_removed_additional_pod_ranges_config<T>(mut self, v: T) -> Self
11679 where
11680 T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11681 {
11682 self.removed_additional_pod_ranges_config = std::option::Option::Some(v.into());
11683 self
11684 }
11685
11686 pub fn set_or_clear_removed_additional_pod_ranges_config<T>(
11688 mut self,
11689 v: std::option::Option<T>,
11690 ) -> Self
11691 where
11692 T: std::convert::Into<crate::model::AdditionalPodRangesConfig>,
11693 {
11694 self.removed_additional_pod_ranges_config = v.map(|x| x.into());
11695 self
11696 }
11697
11698 pub fn set_enable_k8s_beta_apis<T>(mut self, v: T) -> Self
11700 where
11701 T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11702 {
11703 self.enable_k8s_beta_apis = std::option::Option::Some(v.into());
11704 self
11705 }
11706
11707 pub fn set_or_clear_enable_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
11709 where
11710 T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11711 {
11712 self.enable_k8s_beta_apis = v.map(|x| x.into());
11713 self
11714 }
11715
11716 pub fn set_desired_security_posture_config<T>(mut self, v: T) -> Self
11718 where
11719 T: std::convert::Into<crate::model::SecurityPostureConfig>,
11720 {
11721 self.desired_security_posture_config = std::option::Option::Some(v.into());
11722 self
11723 }
11724
11725 pub fn set_or_clear_desired_security_posture_config<T>(
11727 mut self,
11728 v: std::option::Option<T>,
11729 ) -> Self
11730 where
11731 T: std::convert::Into<crate::model::SecurityPostureConfig>,
11732 {
11733 self.desired_security_posture_config = v.map(|x| x.into());
11734 self
11735 }
11736
11737 pub fn set_desired_network_performance_config<T>(mut self, v: T) -> Self
11739 where
11740 T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
11741 {
11742 self.desired_network_performance_config = std::option::Option::Some(v.into());
11743 self
11744 }
11745
11746 pub fn set_or_clear_desired_network_performance_config<T>(
11748 mut self,
11749 v: std::option::Option<T>,
11750 ) -> Self
11751 where
11752 T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
11753 {
11754 self.desired_network_performance_config = v.map(|x| x.into());
11755 self
11756 }
11757
11758 pub fn set_desired_enable_fqdn_network_policy<T>(mut self, v: T) -> Self
11760 where
11761 T: std::convert::Into<bool>,
11762 {
11763 self.desired_enable_fqdn_network_policy = std::option::Option::Some(v.into());
11764 self
11765 }
11766
11767 pub fn set_or_clear_desired_enable_fqdn_network_policy<T>(
11769 mut self,
11770 v: std::option::Option<T>,
11771 ) -> Self
11772 where
11773 T: std::convert::Into<bool>,
11774 {
11775 self.desired_enable_fqdn_network_policy = v.map(|x| x.into());
11776 self
11777 }
11778
11779 pub fn set_desired_autopilot_workload_policy_config<T>(mut self, v: T) -> Self
11781 where
11782 T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
11783 {
11784 self.desired_autopilot_workload_policy_config = std::option::Option::Some(v.into());
11785 self
11786 }
11787
11788 pub fn set_or_clear_desired_autopilot_workload_policy_config<T>(
11790 mut self,
11791 v: std::option::Option<T>,
11792 ) -> Self
11793 where
11794 T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
11795 {
11796 self.desired_autopilot_workload_policy_config = v.map(|x| x.into());
11797 self
11798 }
11799
11800 pub fn set_desired_k8s_beta_apis<T>(mut self, v: T) -> Self
11802 where
11803 T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11804 {
11805 self.desired_k8s_beta_apis = std::option::Option::Some(v.into());
11806 self
11807 }
11808
11809 pub fn set_or_clear_desired_k8s_beta_apis<T>(mut self, v: std::option::Option<T>) -> Self
11811 where
11812 T: std::convert::Into<crate::model::K8sBetaAPIConfig>,
11813 {
11814 self.desired_k8s_beta_apis = v.map(|x| x.into());
11815 self
11816 }
11817
11818 pub fn set_desired_containerd_config<T>(mut self, v: T) -> Self
11820 where
11821 T: std::convert::Into<crate::model::ContainerdConfig>,
11822 {
11823 self.desired_containerd_config = std::option::Option::Some(v.into());
11824 self
11825 }
11826
11827 pub fn set_or_clear_desired_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
11829 where
11830 T: std::convert::Into<crate::model::ContainerdConfig>,
11831 {
11832 self.desired_containerd_config = v.map(|x| x.into());
11833 self
11834 }
11835
11836 pub fn set_desired_enable_multi_networking<T>(mut self, v: T) -> Self
11838 where
11839 T: std::convert::Into<bool>,
11840 {
11841 self.desired_enable_multi_networking = std::option::Option::Some(v.into());
11842 self
11843 }
11844
11845 pub fn set_or_clear_desired_enable_multi_networking<T>(
11847 mut self,
11848 v: std::option::Option<T>,
11849 ) -> Self
11850 where
11851 T: std::convert::Into<bool>,
11852 {
11853 self.desired_enable_multi_networking = v.map(|x| x.into());
11854 self
11855 }
11856
11857 pub fn set_desired_node_pool_auto_config_resource_manager_tags<T>(mut self, v: T) -> Self
11859 where
11860 T: std::convert::Into<crate::model::ResourceManagerTags>,
11861 {
11862 self.desired_node_pool_auto_config_resource_manager_tags =
11863 std::option::Option::Some(v.into());
11864 self
11865 }
11866
11867 pub fn set_or_clear_desired_node_pool_auto_config_resource_manager_tags<T>(
11869 mut self,
11870 v: std::option::Option<T>,
11871 ) -> Self
11872 where
11873 T: std::convert::Into<crate::model::ResourceManagerTags>,
11874 {
11875 self.desired_node_pool_auto_config_resource_manager_tags = v.map(|x| x.into());
11876 self
11877 }
11878
11879 pub fn set_desired_in_transit_encryption_config<T>(mut self, v: T) -> Self
11881 where
11882 T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
11883 {
11884 self.desired_in_transit_encryption_config = std::option::Option::Some(v.into());
11885 self
11886 }
11887
11888 pub fn set_or_clear_desired_in_transit_encryption_config<T>(
11890 mut self,
11891 v: std::option::Option<T>,
11892 ) -> Self
11893 where
11894 T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
11895 {
11896 self.desired_in_transit_encryption_config = v.map(|x| x.into());
11897 self
11898 }
11899
11900 pub fn set_desired_enable_cilium_clusterwide_network_policy<T>(mut self, v: T) -> Self
11902 where
11903 T: std::convert::Into<bool>,
11904 {
11905 self.desired_enable_cilium_clusterwide_network_policy = std::option::Option::Some(v.into());
11906 self
11907 }
11908
11909 pub fn set_or_clear_desired_enable_cilium_clusterwide_network_policy<T>(
11911 mut self,
11912 v: std::option::Option<T>,
11913 ) -> Self
11914 where
11915 T: std::convert::Into<bool>,
11916 {
11917 self.desired_enable_cilium_clusterwide_network_policy = v.map(|x| x.into());
11918 self
11919 }
11920
11921 pub fn set_desired_secret_manager_config<T>(mut self, v: T) -> Self
11923 where
11924 T: std::convert::Into<crate::model::SecretManagerConfig>,
11925 {
11926 self.desired_secret_manager_config = std::option::Option::Some(v.into());
11927 self
11928 }
11929
11930 pub fn set_or_clear_desired_secret_manager_config<T>(
11932 mut self,
11933 v: std::option::Option<T>,
11934 ) -> Self
11935 where
11936 T: std::convert::Into<crate::model::SecretManagerConfig>,
11937 {
11938 self.desired_secret_manager_config = v.map(|x| x.into());
11939 self
11940 }
11941
11942 pub fn set_desired_compliance_posture_config<T>(mut self, v: T) -> Self
11944 where
11945 T: std::convert::Into<crate::model::CompliancePostureConfig>,
11946 {
11947 self.desired_compliance_posture_config = std::option::Option::Some(v.into());
11948 self
11949 }
11950
11951 pub fn set_or_clear_desired_compliance_posture_config<T>(
11953 mut self,
11954 v: std::option::Option<T>,
11955 ) -> Self
11956 where
11957 T: std::convert::Into<crate::model::CompliancePostureConfig>,
11958 {
11959 self.desired_compliance_posture_config = v.map(|x| x.into());
11960 self
11961 }
11962
11963 pub fn set_desired_node_kubelet_config<T>(mut self, v: T) -> Self
11965 where
11966 T: std::convert::Into<crate::model::NodeKubeletConfig>,
11967 {
11968 self.desired_node_kubelet_config = std::option::Option::Some(v.into());
11969 self
11970 }
11971
11972 pub fn set_or_clear_desired_node_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
11974 where
11975 T: std::convert::Into<crate::model::NodeKubeletConfig>,
11976 {
11977 self.desired_node_kubelet_config = v.map(|x| x.into());
11978 self
11979 }
11980
11981 pub fn set_desired_node_pool_auto_config_kubelet_config<T>(mut self, v: T) -> Self
11983 where
11984 T: std::convert::Into<crate::model::NodeKubeletConfig>,
11985 {
11986 self.desired_node_pool_auto_config_kubelet_config = std::option::Option::Some(v.into());
11987 self
11988 }
11989
11990 pub fn set_or_clear_desired_node_pool_auto_config_kubelet_config<T>(
11992 mut self,
11993 v: std::option::Option<T>,
11994 ) -> Self
11995 where
11996 T: std::convert::Into<crate::model::NodeKubeletConfig>,
11997 {
11998 self.desired_node_pool_auto_config_kubelet_config = v.map(|x| x.into());
11999 self
12000 }
12001
12002 #[deprecated]
12004 pub fn set_user_managed_keys_config<T>(mut self, v: T) -> Self
12005 where
12006 T: std::convert::Into<crate::model::UserManagedKeysConfig>,
12007 {
12008 self.user_managed_keys_config = std::option::Option::Some(v.into());
12009 self
12010 }
12011
12012 #[deprecated]
12014 pub fn set_or_clear_user_managed_keys_config<T>(mut self, v: std::option::Option<T>) -> Self
12015 where
12016 T: std::convert::Into<crate::model::UserManagedKeysConfig>,
12017 {
12018 self.user_managed_keys_config = v.map(|x| x.into());
12019 self
12020 }
12021
12022 pub fn set_desired_rbac_binding_config<T>(mut self, v: T) -> Self
12024 where
12025 T: std::convert::Into<crate::model::RBACBindingConfig>,
12026 {
12027 self.desired_rbac_binding_config = std::option::Option::Some(v.into());
12028 self
12029 }
12030
12031 pub fn set_or_clear_desired_rbac_binding_config<T>(mut self, v: std::option::Option<T>) -> Self
12033 where
12034 T: std::convert::Into<crate::model::RBACBindingConfig>,
12035 {
12036 self.desired_rbac_binding_config = v.map(|x| x.into());
12037 self
12038 }
12039
12040 pub fn set_desired_additional_ip_ranges_config<T>(mut self, v: T) -> Self
12042 where
12043 T: std::convert::Into<crate::model::DesiredAdditionalIPRangesConfig>,
12044 {
12045 self.desired_additional_ip_ranges_config = std::option::Option::Some(v.into());
12046 self
12047 }
12048
12049 pub fn set_or_clear_desired_additional_ip_ranges_config<T>(
12051 mut self,
12052 v: std::option::Option<T>,
12053 ) -> Self
12054 where
12055 T: std::convert::Into<crate::model::DesiredAdditionalIPRangesConfig>,
12056 {
12057 self.desired_additional_ip_ranges_config = v.map(|x| x.into());
12058 self
12059 }
12060
12061 #[deprecated]
12063 pub fn set_desired_enterprise_config<T>(mut self, v: T) -> Self
12064 where
12065 T: std::convert::Into<crate::model::DesiredEnterpriseConfig>,
12066 {
12067 self.desired_enterprise_config = std::option::Option::Some(v.into());
12068 self
12069 }
12070
12071 #[deprecated]
12073 pub fn set_or_clear_desired_enterprise_config<T>(mut self, v: std::option::Option<T>) -> Self
12074 where
12075 T: std::convert::Into<crate::model::DesiredEnterpriseConfig>,
12076 {
12077 self.desired_enterprise_config = v.map(|x| x.into());
12078 self
12079 }
12080
12081 pub fn set_desired_auto_ipam_config<T>(mut self, v: T) -> Self
12083 where
12084 T: std::convert::Into<crate::model::AutoIpamConfig>,
12085 {
12086 self.desired_auto_ipam_config = std::option::Option::Some(v.into());
12087 self
12088 }
12089
12090 pub fn set_or_clear_desired_auto_ipam_config<T>(mut self, v: std::option::Option<T>) -> Self
12092 where
12093 T: std::convert::Into<crate::model::AutoIpamConfig>,
12094 {
12095 self.desired_auto_ipam_config = v.map(|x| x.into());
12096 self
12097 }
12098
12099 pub fn set_desired_disable_l4_lb_firewall_reconciliation<T>(mut self, v: T) -> Self
12101 where
12102 T: std::convert::Into<bool>,
12103 {
12104 self.desired_disable_l4_lb_firewall_reconciliation = std::option::Option::Some(v.into());
12105 self
12106 }
12107
12108 pub fn set_or_clear_desired_disable_l4_lb_firewall_reconciliation<T>(
12110 mut self,
12111 v: std::option::Option<T>,
12112 ) -> Self
12113 where
12114 T: std::convert::Into<bool>,
12115 {
12116 self.desired_disable_l4_lb_firewall_reconciliation = v.map(|x| x.into());
12117 self
12118 }
12119
12120 pub fn set_desired_node_pool_auto_config_linux_node_config<T>(mut self, v: T) -> Self
12122 where
12123 T: std::convert::Into<crate::model::LinuxNodeConfig>,
12124 {
12125 self.desired_node_pool_auto_config_linux_node_config = std::option::Option::Some(v.into());
12126 self
12127 }
12128
12129 pub fn set_or_clear_desired_node_pool_auto_config_linux_node_config<T>(
12131 mut self,
12132 v: std::option::Option<T>,
12133 ) -> Self
12134 where
12135 T: std::convert::Into<crate::model::LinuxNodeConfig>,
12136 {
12137 self.desired_node_pool_auto_config_linux_node_config = v.map(|x| x.into());
12138 self
12139 }
12140
12141 pub fn set_desired_user_managed_keys_config<T>(mut self, v: T) -> Self
12143 where
12144 T: std::convert::Into<crate::model::UserManagedKeysConfig>,
12145 {
12146 self.desired_user_managed_keys_config = std::option::Option::Some(v.into());
12147 self
12148 }
12149
12150 pub fn set_or_clear_desired_user_managed_keys_config<T>(
12152 mut self,
12153 v: std::option::Option<T>,
12154 ) -> Self
12155 where
12156 T: std::convert::Into<crate::model::UserManagedKeysConfig>,
12157 {
12158 self.desired_user_managed_keys_config = v.map(|x| x.into());
12159 self
12160 }
12161
12162 pub fn set_desired_anonymous_authentication_config<T>(mut self, v: T) -> Self
12164 where
12165 T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
12166 {
12167 self.desired_anonymous_authentication_config = std::option::Option::Some(v.into());
12168 self
12169 }
12170
12171 pub fn set_or_clear_desired_anonymous_authentication_config<T>(
12173 mut self,
12174 v: std::option::Option<T>,
12175 ) -> Self
12176 where
12177 T: std::convert::Into<crate::model::AnonymousAuthenticationConfig>,
12178 {
12179 self.desired_anonymous_authentication_config = v.map(|x| x.into());
12180 self
12181 }
12182
12183 pub fn set_gke_auto_upgrade_config<T>(mut self, v: T) -> Self
12185 where
12186 T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
12187 {
12188 self.gke_auto_upgrade_config = std::option::Option::Some(v.into());
12189 self
12190 }
12191
12192 pub fn set_or_clear_gke_auto_upgrade_config<T>(mut self, v: std::option::Option<T>) -> Self
12194 where
12195 T: std::convert::Into<crate::model::GkeAutoUpgradeConfig>,
12196 {
12197 self.gke_auto_upgrade_config = v.map(|x| x.into());
12198 self
12199 }
12200
12201 pub fn set_desired_network_tier_config<T>(mut self, v: T) -> Self
12203 where
12204 T: std::convert::Into<crate::model::NetworkTierConfig>,
12205 {
12206 self.desired_network_tier_config = std::option::Option::Some(v.into());
12207 self
12208 }
12209
12210 pub fn set_or_clear_desired_network_tier_config<T>(mut self, v: std::option::Option<T>) -> Self
12212 where
12213 T: std::convert::Into<crate::model::NetworkTierConfig>,
12214 {
12215 self.desired_network_tier_config = v.map(|x| x.into());
12216 self
12217 }
12218}
12219
12220impl wkt::message::Message for ClusterUpdate {
12221 fn typename() -> &'static str {
12222 "type.googleapis.com/google.container.v1.ClusterUpdate"
12223 }
12224}
12225
12226#[derive(Clone, Default, PartialEq)]
12229#[non_exhaustive]
12230pub struct AdditionalPodRangesConfig {
12231 pub pod_range_names: std::vec::Vec<std::string::String>,
12233
12234 pub pod_range_info: std::vec::Vec<crate::model::RangeInfo>,
12236
12237 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12238}
12239
12240impl AdditionalPodRangesConfig {
12241 pub fn new() -> Self {
12242 std::default::Default::default()
12243 }
12244
12245 pub fn set_pod_range_names<T, V>(mut self, v: T) -> Self
12247 where
12248 T: std::iter::IntoIterator<Item = V>,
12249 V: std::convert::Into<std::string::String>,
12250 {
12251 use std::iter::Iterator;
12252 self.pod_range_names = v.into_iter().map(|i| i.into()).collect();
12253 self
12254 }
12255
12256 pub fn set_pod_range_info<T, V>(mut self, v: T) -> Self
12258 where
12259 T: std::iter::IntoIterator<Item = V>,
12260 V: std::convert::Into<crate::model::RangeInfo>,
12261 {
12262 use std::iter::Iterator;
12263 self.pod_range_info = v.into_iter().map(|i| i.into()).collect();
12264 self
12265 }
12266}
12267
12268impl wkt::message::Message for AdditionalPodRangesConfig {
12269 fn typename() -> &'static str {
12270 "type.googleapis.com/google.container.v1.AdditionalPodRangesConfig"
12271 }
12272}
12273
12274#[derive(Clone, Default, PartialEq)]
12277#[non_exhaustive]
12278pub struct AdditionalIPRangesConfig {
12279 pub subnetwork: std::string::String,
12284
12285 pub pod_ipv4_range_names: std::vec::Vec<std::string::String>,
12290
12291 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12292}
12293
12294impl AdditionalIPRangesConfig {
12295 pub fn new() -> Self {
12296 std::default::Default::default()
12297 }
12298
12299 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12301 self.subnetwork = v.into();
12302 self
12303 }
12304
12305 pub fn set_pod_ipv4_range_names<T, V>(mut self, v: T) -> Self
12307 where
12308 T: std::iter::IntoIterator<Item = V>,
12309 V: std::convert::Into<std::string::String>,
12310 {
12311 use std::iter::Iterator;
12312 self.pod_ipv4_range_names = v.into_iter().map(|i| i.into()).collect();
12313 self
12314 }
12315}
12316
12317impl wkt::message::Message for AdditionalIPRangesConfig {
12318 fn typename() -> &'static str {
12319 "type.googleapis.com/google.container.v1.AdditionalIPRangesConfig"
12320 }
12321}
12322
12323#[derive(Clone, Default, PartialEq)]
12326#[non_exhaustive]
12327pub struct DesiredAdditionalIPRangesConfig {
12328 pub additional_ip_ranges_configs: std::vec::Vec<crate::model::AdditionalIPRangesConfig>,
12331
12332 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12333}
12334
12335impl DesiredAdditionalIPRangesConfig {
12336 pub fn new() -> Self {
12337 std::default::Default::default()
12338 }
12339
12340 pub fn set_additional_ip_ranges_configs<T, V>(mut self, v: T) -> Self
12342 where
12343 T: std::iter::IntoIterator<Item = V>,
12344 V: std::convert::Into<crate::model::AdditionalIPRangesConfig>,
12345 {
12346 use std::iter::Iterator;
12347 self.additional_ip_ranges_configs = v.into_iter().map(|i| i.into()).collect();
12348 self
12349 }
12350}
12351
12352impl wkt::message::Message for DesiredAdditionalIPRangesConfig {
12353 fn typename() -> &'static str {
12354 "type.googleapis.com/google.container.v1.DesiredAdditionalIPRangesConfig"
12355 }
12356}
12357
12358#[derive(Clone, Default, PartialEq)]
12360#[non_exhaustive]
12361pub struct AutoIpamConfig {
12362 pub enabled: std::option::Option<bool>,
12364
12365 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12366}
12367
12368impl AutoIpamConfig {
12369 pub fn new() -> Self {
12370 std::default::Default::default()
12371 }
12372
12373 pub fn set_enabled<T>(mut self, v: T) -> Self
12375 where
12376 T: std::convert::Into<bool>,
12377 {
12378 self.enabled = std::option::Option::Some(v.into());
12379 self
12380 }
12381
12382 pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
12384 where
12385 T: std::convert::Into<bool>,
12386 {
12387 self.enabled = v.map(|x| x.into());
12388 self
12389 }
12390}
12391
12392impl wkt::message::Message for AutoIpamConfig {
12393 fn typename() -> &'static str {
12394 "type.googleapis.com/google.container.v1.AutoIpamConfig"
12395 }
12396}
12397
12398#[derive(Clone, Default, PartialEq)]
12400#[non_exhaustive]
12401pub struct RangeInfo {
12402 pub range_name: std::string::String,
12404
12405 pub utilization: f64,
12407
12408 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12409}
12410
12411impl RangeInfo {
12412 pub fn new() -> Self {
12413 std::default::Default::default()
12414 }
12415
12416 pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12418 self.range_name = v.into();
12419 self
12420 }
12421
12422 pub fn set_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12424 self.utilization = v.into();
12425 self
12426 }
12427}
12428
12429impl wkt::message::Message for RangeInfo {
12430 fn typename() -> &'static str {
12431 "type.googleapis.com/google.container.v1.RangeInfo"
12432 }
12433}
12434
12435#[derive(Clone, Default, PartialEq)]
12440#[non_exhaustive]
12441#[deprecated]
12442pub struct DesiredEnterpriseConfig {
12443 pub desired_tier: crate::model::enterprise_config::ClusterTier,
12445
12446 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12447}
12448
12449impl DesiredEnterpriseConfig {
12450 pub fn new() -> Self {
12451 std::default::Default::default()
12452 }
12453
12454 pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
12456 mut self,
12457 v: T,
12458 ) -> Self {
12459 self.desired_tier = v.into();
12460 self
12461 }
12462}
12463
12464impl wkt::message::Message for DesiredEnterpriseConfig {
12465 fn typename() -> &'static str {
12466 "type.googleapis.com/google.container.v1.DesiredEnterpriseConfig"
12467 }
12468}
12469
12470#[derive(Clone, Default, PartialEq)]
12473#[non_exhaustive]
12474pub struct Operation {
12475 pub name: std::string::String,
12477
12478 #[deprecated]
12483 pub zone: std::string::String,
12484
12485 pub operation_type: crate::model::operation::Type,
12487
12488 pub status: crate::model::operation::Status,
12490
12491 pub detail: std::string::String,
12493
12494 #[deprecated]
12497 pub status_message: std::string::String,
12498
12499 pub self_link: std::string::String,
12502
12503 pub target_link: std::string::String,
12521
12522 pub location: std::string::String,
12528
12529 pub start_time: std::string::String,
12532
12533 pub end_time: std::string::String,
12536
12537 pub progress: std::option::Option<crate::model::OperationProgress>,
12539
12540 #[deprecated]
12543 pub cluster_conditions: std::vec::Vec<crate::model::StatusCondition>,
12544
12545 #[deprecated]
12548 pub nodepool_conditions: std::vec::Vec<crate::model::StatusCondition>,
12549
12550 pub error: std::option::Option<rpc::model::Status>,
12552
12553 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12554}
12555
12556impl Operation {
12557 pub fn new() -> Self {
12558 std::default::Default::default()
12559 }
12560
12561 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12563 self.name = v.into();
12564 self
12565 }
12566
12567 #[deprecated]
12569 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12570 self.zone = v.into();
12571 self
12572 }
12573
12574 pub fn set_operation_type<T: std::convert::Into<crate::model::operation::Type>>(
12576 mut self,
12577 v: T,
12578 ) -> Self {
12579 self.operation_type = v.into();
12580 self
12581 }
12582
12583 pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
12585 mut self,
12586 v: T,
12587 ) -> Self {
12588 self.status = v.into();
12589 self
12590 }
12591
12592 pub fn set_detail<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12594 self.detail = v.into();
12595 self
12596 }
12597
12598 #[deprecated]
12600 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12601 self.status_message = v.into();
12602 self
12603 }
12604
12605 pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12607 self.self_link = v.into();
12608 self
12609 }
12610
12611 pub fn set_target_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12613 self.target_link = v.into();
12614 self
12615 }
12616
12617 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12619 self.location = v.into();
12620 self
12621 }
12622
12623 pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12625 self.start_time = v.into();
12626 self
12627 }
12628
12629 pub fn set_end_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12631 self.end_time = v.into();
12632 self
12633 }
12634
12635 pub fn set_progress<T>(mut self, v: T) -> Self
12637 where
12638 T: std::convert::Into<crate::model::OperationProgress>,
12639 {
12640 self.progress = std::option::Option::Some(v.into());
12641 self
12642 }
12643
12644 pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
12646 where
12647 T: std::convert::Into<crate::model::OperationProgress>,
12648 {
12649 self.progress = v.map(|x| x.into());
12650 self
12651 }
12652
12653 #[deprecated]
12655 pub fn set_cluster_conditions<T, V>(mut self, v: T) -> Self
12656 where
12657 T: std::iter::IntoIterator<Item = V>,
12658 V: std::convert::Into<crate::model::StatusCondition>,
12659 {
12660 use std::iter::Iterator;
12661 self.cluster_conditions = v.into_iter().map(|i| i.into()).collect();
12662 self
12663 }
12664
12665 #[deprecated]
12667 pub fn set_nodepool_conditions<T, V>(mut self, v: T) -> Self
12668 where
12669 T: std::iter::IntoIterator<Item = V>,
12670 V: std::convert::Into<crate::model::StatusCondition>,
12671 {
12672 use std::iter::Iterator;
12673 self.nodepool_conditions = v.into_iter().map(|i| i.into()).collect();
12674 self
12675 }
12676
12677 pub fn set_error<T>(mut self, v: T) -> Self
12679 where
12680 T: std::convert::Into<rpc::model::Status>,
12681 {
12682 self.error = std::option::Option::Some(v.into());
12683 self
12684 }
12685
12686 pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
12688 where
12689 T: std::convert::Into<rpc::model::Status>,
12690 {
12691 self.error = v.map(|x| x.into());
12692 self
12693 }
12694}
12695
12696impl wkt::message::Message for Operation {
12697 fn typename() -> &'static str {
12698 "type.googleapis.com/google.container.v1.Operation"
12699 }
12700}
12701
12702pub mod operation {
12704 #[allow(unused_imports)]
12705 use super::*;
12706
12707 #[derive(Clone, Debug, PartialEq)]
12723 #[non_exhaustive]
12724 pub enum Status {
12725 Unspecified,
12727 Pending,
12729 Running,
12731 Done,
12733 Aborting,
12735 UnknownValue(status::UnknownValue),
12740 }
12741
12742 #[doc(hidden)]
12743 pub mod status {
12744 #[allow(unused_imports)]
12745 use super::*;
12746 #[derive(Clone, Debug, PartialEq)]
12747 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12748 }
12749
12750 impl Status {
12751 pub fn value(&self) -> std::option::Option<i32> {
12756 match self {
12757 Self::Unspecified => std::option::Option::Some(0),
12758 Self::Pending => std::option::Option::Some(1),
12759 Self::Running => std::option::Option::Some(2),
12760 Self::Done => std::option::Option::Some(3),
12761 Self::Aborting => std::option::Option::Some(4),
12762 Self::UnknownValue(u) => u.0.value(),
12763 }
12764 }
12765
12766 pub fn name(&self) -> std::option::Option<&str> {
12771 match self {
12772 Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
12773 Self::Pending => std::option::Option::Some("PENDING"),
12774 Self::Running => std::option::Option::Some("RUNNING"),
12775 Self::Done => std::option::Option::Some("DONE"),
12776 Self::Aborting => std::option::Option::Some("ABORTING"),
12777 Self::UnknownValue(u) => u.0.name(),
12778 }
12779 }
12780 }
12781
12782 impl std::default::Default for Status {
12783 fn default() -> Self {
12784 use std::convert::From;
12785 Self::from(0)
12786 }
12787 }
12788
12789 impl std::fmt::Display for Status {
12790 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12791 wkt::internal::display_enum(f, self.name(), self.value())
12792 }
12793 }
12794
12795 impl std::convert::From<i32> for Status {
12796 fn from(value: i32) -> Self {
12797 match value {
12798 0 => Self::Unspecified,
12799 1 => Self::Pending,
12800 2 => Self::Running,
12801 3 => Self::Done,
12802 4 => Self::Aborting,
12803 _ => Self::UnknownValue(status::UnknownValue(
12804 wkt::internal::UnknownEnumValue::Integer(value),
12805 )),
12806 }
12807 }
12808 }
12809
12810 impl std::convert::From<&str> for Status {
12811 fn from(value: &str) -> Self {
12812 use std::string::ToString;
12813 match value {
12814 "STATUS_UNSPECIFIED" => Self::Unspecified,
12815 "PENDING" => Self::Pending,
12816 "RUNNING" => Self::Running,
12817 "DONE" => Self::Done,
12818 "ABORTING" => Self::Aborting,
12819 _ => Self::UnknownValue(status::UnknownValue(
12820 wkt::internal::UnknownEnumValue::String(value.to_string()),
12821 )),
12822 }
12823 }
12824 }
12825
12826 impl serde::ser::Serialize for Status {
12827 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12828 where
12829 S: serde::Serializer,
12830 {
12831 match self {
12832 Self::Unspecified => serializer.serialize_i32(0),
12833 Self::Pending => serializer.serialize_i32(1),
12834 Self::Running => serializer.serialize_i32(2),
12835 Self::Done => serializer.serialize_i32(3),
12836 Self::Aborting => serializer.serialize_i32(4),
12837 Self::UnknownValue(u) => u.0.serialize(serializer),
12838 }
12839 }
12840 }
12841
12842 impl<'de> serde::de::Deserialize<'de> for Status {
12843 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12844 where
12845 D: serde::Deserializer<'de>,
12846 {
12847 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
12848 ".google.container.v1.Operation.Status",
12849 ))
12850 }
12851 }
12852
12853 #[derive(Clone, Debug, PartialEq)]
12869 #[non_exhaustive]
12870 pub enum Type {
12871 Unspecified,
12873 CreateCluster,
12882 DeleteCluster,
12891 UpgradeMaster,
12901 UpgradeNodes,
12916 RepairCluster,
12921 UpdateCluster,
12935 CreateNodePool,
12943 DeleteNodePool,
12946 SetNodePoolManagement,
12952 AutoRepairNodes,
12958 #[deprecated]
12963 AutoUpgradeNodes,
12964 #[deprecated]
12969 SetLabels,
12970 #[deprecated]
12975 SetMasterAuth,
12976 SetNodePoolSize,
12979 #[deprecated]
12984 SetNetworkPolicy,
12985 #[deprecated]
12990 SetMaintenancePolicy,
12991 ResizeCluster,
12998 FleetFeatureUpgrade,
13001 UnknownValue(r#type::UnknownValue),
13006 }
13007
13008 #[doc(hidden)]
13009 pub mod r#type {
13010 #[allow(unused_imports)]
13011 use super::*;
13012 #[derive(Clone, Debug, PartialEq)]
13013 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13014 }
13015
13016 impl Type {
13017 pub fn value(&self) -> std::option::Option<i32> {
13022 match self {
13023 Self::Unspecified => std::option::Option::Some(0),
13024 Self::CreateCluster => std::option::Option::Some(1),
13025 Self::DeleteCluster => std::option::Option::Some(2),
13026 Self::UpgradeMaster => std::option::Option::Some(3),
13027 Self::UpgradeNodes => std::option::Option::Some(4),
13028 Self::RepairCluster => std::option::Option::Some(5),
13029 Self::UpdateCluster => std::option::Option::Some(6),
13030 Self::CreateNodePool => std::option::Option::Some(7),
13031 Self::DeleteNodePool => std::option::Option::Some(8),
13032 Self::SetNodePoolManagement => std::option::Option::Some(9),
13033 Self::AutoRepairNodes => std::option::Option::Some(10),
13034 Self::AutoUpgradeNodes => std::option::Option::Some(11),
13035 Self::SetLabels => std::option::Option::Some(12),
13036 Self::SetMasterAuth => std::option::Option::Some(13),
13037 Self::SetNodePoolSize => std::option::Option::Some(14),
13038 Self::SetNetworkPolicy => std::option::Option::Some(15),
13039 Self::SetMaintenancePolicy => std::option::Option::Some(16),
13040 Self::ResizeCluster => std::option::Option::Some(18),
13041 Self::FleetFeatureUpgrade => std::option::Option::Some(19),
13042 Self::UnknownValue(u) => u.0.value(),
13043 }
13044 }
13045
13046 pub fn name(&self) -> std::option::Option<&str> {
13051 match self {
13052 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
13053 Self::CreateCluster => std::option::Option::Some("CREATE_CLUSTER"),
13054 Self::DeleteCluster => std::option::Option::Some("DELETE_CLUSTER"),
13055 Self::UpgradeMaster => std::option::Option::Some("UPGRADE_MASTER"),
13056 Self::UpgradeNodes => std::option::Option::Some("UPGRADE_NODES"),
13057 Self::RepairCluster => std::option::Option::Some("REPAIR_CLUSTER"),
13058 Self::UpdateCluster => std::option::Option::Some("UPDATE_CLUSTER"),
13059 Self::CreateNodePool => std::option::Option::Some("CREATE_NODE_POOL"),
13060 Self::DeleteNodePool => std::option::Option::Some("DELETE_NODE_POOL"),
13061 Self::SetNodePoolManagement => {
13062 std::option::Option::Some("SET_NODE_POOL_MANAGEMENT")
13063 }
13064 Self::AutoRepairNodes => std::option::Option::Some("AUTO_REPAIR_NODES"),
13065 Self::AutoUpgradeNodes => std::option::Option::Some("AUTO_UPGRADE_NODES"),
13066 Self::SetLabels => std::option::Option::Some("SET_LABELS"),
13067 Self::SetMasterAuth => std::option::Option::Some("SET_MASTER_AUTH"),
13068 Self::SetNodePoolSize => std::option::Option::Some("SET_NODE_POOL_SIZE"),
13069 Self::SetNetworkPolicy => std::option::Option::Some("SET_NETWORK_POLICY"),
13070 Self::SetMaintenancePolicy => std::option::Option::Some("SET_MAINTENANCE_POLICY"),
13071 Self::ResizeCluster => std::option::Option::Some("RESIZE_CLUSTER"),
13072 Self::FleetFeatureUpgrade => std::option::Option::Some("FLEET_FEATURE_UPGRADE"),
13073 Self::UnknownValue(u) => u.0.name(),
13074 }
13075 }
13076 }
13077
13078 impl std::default::Default for Type {
13079 fn default() -> Self {
13080 use std::convert::From;
13081 Self::from(0)
13082 }
13083 }
13084
13085 impl std::fmt::Display for Type {
13086 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13087 wkt::internal::display_enum(f, self.name(), self.value())
13088 }
13089 }
13090
13091 impl std::convert::From<i32> for Type {
13092 fn from(value: i32) -> Self {
13093 match value {
13094 0 => Self::Unspecified,
13095 1 => Self::CreateCluster,
13096 2 => Self::DeleteCluster,
13097 3 => Self::UpgradeMaster,
13098 4 => Self::UpgradeNodes,
13099 5 => Self::RepairCluster,
13100 6 => Self::UpdateCluster,
13101 7 => Self::CreateNodePool,
13102 8 => Self::DeleteNodePool,
13103 9 => Self::SetNodePoolManagement,
13104 10 => Self::AutoRepairNodes,
13105 11 => Self::AutoUpgradeNodes,
13106 12 => Self::SetLabels,
13107 13 => Self::SetMasterAuth,
13108 14 => Self::SetNodePoolSize,
13109 15 => Self::SetNetworkPolicy,
13110 16 => Self::SetMaintenancePolicy,
13111 18 => Self::ResizeCluster,
13112 19 => Self::FleetFeatureUpgrade,
13113 _ => Self::UnknownValue(r#type::UnknownValue(
13114 wkt::internal::UnknownEnumValue::Integer(value),
13115 )),
13116 }
13117 }
13118 }
13119
13120 impl std::convert::From<&str> for Type {
13121 fn from(value: &str) -> Self {
13122 use std::string::ToString;
13123 match value {
13124 "TYPE_UNSPECIFIED" => Self::Unspecified,
13125 "CREATE_CLUSTER" => Self::CreateCluster,
13126 "DELETE_CLUSTER" => Self::DeleteCluster,
13127 "UPGRADE_MASTER" => Self::UpgradeMaster,
13128 "UPGRADE_NODES" => Self::UpgradeNodes,
13129 "REPAIR_CLUSTER" => Self::RepairCluster,
13130 "UPDATE_CLUSTER" => Self::UpdateCluster,
13131 "CREATE_NODE_POOL" => Self::CreateNodePool,
13132 "DELETE_NODE_POOL" => Self::DeleteNodePool,
13133 "SET_NODE_POOL_MANAGEMENT" => Self::SetNodePoolManagement,
13134 "AUTO_REPAIR_NODES" => Self::AutoRepairNodes,
13135 "AUTO_UPGRADE_NODES" => Self::AutoUpgradeNodes,
13136 "SET_LABELS" => Self::SetLabels,
13137 "SET_MASTER_AUTH" => Self::SetMasterAuth,
13138 "SET_NODE_POOL_SIZE" => Self::SetNodePoolSize,
13139 "SET_NETWORK_POLICY" => Self::SetNetworkPolicy,
13140 "SET_MAINTENANCE_POLICY" => Self::SetMaintenancePolicy,
13141 "RESIZE_CLUSTER" => Self::ResizeCluster,
13142 "FLEET_FEATURE_UPGRADE" => Self::FleetFeatureUpgrade,
13143 _ => Self::UnknownValue(r#type::UnknownValue(
13144 wkt::internal::UnknownEnumValue::String(value.to_string()),
13145 )),
13146 }
13147 }
13148 }
13149
13150 impl serde::ser::Serialize for Type {
13151 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13152 where
13153 S: serde::Serializer,
13154 {
13155 match self {
13156 Self::Unspecified => serializer.serialize_i32(0),
13157 Self::CreateCluster => serializer.serialize_i32(1),
13158 Self::DeleteCluster => serializer.serialize_i32(2),
13159 Self::UpgradeMaster => serializer.serialize_i32(3),
13160 Self::UpgradeNodes => serializer.serialize_i32(4),
13161 Self::RepairCluster => serializer.serialize_i32(5),
13162 Self::UpdateCluster => serializer.serialize_i32(6),
13163 Self::CreateNodePool => serializer.serialize_i32(7),
13164 Self::DeleteNodePool => serializer.serialize_i32(8),
13165 Self::SetNodePoolManagement => serializer.serialize_i32(9),
13166 Self::AutoRepairNodes => serializer.serialize_i32(10),
13167 Self::AutoUpgradeNodes => serializer.serialize_i32(11),
13168 Self::SetLabels => serializer.serialize_i32(12),
13169 Self::SetMasterAuth => serializer.serialize_i32(13),
13170 Self::SetNodePoolSize => serializer.serialize_i32(14),
13171 Self::SetNetworkPolicy => serializer.serialize_i32(15),
13172 Self::SetMaintenancePolicy => serializer.serialize_i32(16),
13173 Self::ResizeCluster => serializer.serialize_i32(18),
13174 Self::FleetFeatureUpgrade => serializer.serialize_i32(19),
13175 Self::UnknownValue(u) => u.0.serialize(serializer),
13176 }
13177 }
13178 }
13179
13180 impl<'de> serde::de::Deserialize<'de> for Type {
13181 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13182 where
13183 D: serde::Deserializer<'de>,
13184 {
13185 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
13186 ".google.container.v1.Operation.Type",
13187 ))
13188 }
13189 }
13190}
13191
13192#[derive(Clone, Default, PartialEq)]
13194#[non_exhaustive]
13195pub struct OperationProgress {
13196 pub name: std::string::String,
13199
13200 pub status: crate::model::operation::Status,
13203
13204 pub metrics: std::vec::Vec<crate::model::operation_progress::Metric>,
13211
13212 pub stages: std::vec::Vec<crate::model::OperationProgress>,
13214
13215 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13216}
13217
13218impl OperationProgress {
13219 pub fn new() -> Self {
13220 std::default::Default::default()
13221 }
13222
13223 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13225 self.name = v.into();
13226 self
13227 }
13228
13229 pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
13231 mut self,
13232 v: T,
13233 ) -> Self {
13234 self.status = v.into();
13235 self
13236 }
13237
13238 pub fn set_metrics<T, V>(mut self, v: T) -> Self
13240 where
13241 T: std::iter::IntoIterator<Item = V>,
13242 V: std::convert::Into<crate::model::operation_progress::Metric>,
13243 {
13244 use std::iter::Iterator;
13245 self.metrics = v.into_iter().map(|i| i.into()).collect();
13246 self
13247 }
13248
13249 pub fn set_stages<T, V>(mut self, v: T) -> Self
13251 where
13252 T: std::iter::IntoIterator<Item = V>,
13253 V: std::convert::Into<crate::model::OperationProgress>,
13254 {
13255 use std::iter::Iterator;
13256 self.stages = v.into_iter().map(|i| i.into()).collect();
13257 self
13258 }
13259}
13260
13261impl wkt::message::Message for OperationProgress {
13262 fn typename() -> &'static str {
13263 "type.googleapis.com/google.container.v1.OperationProgress"
13264 }
13265}
13266
13267pub mod operation_progress {
13269 #[allow(unused_imports)]
13270 use super::*;
13271
13272 #[derive(Clone, Default, PartialEq)]
13274 #[non_exhaustive]
13275 pub struct Metric {
13276 pub name: std::string::String,
13278
13279 pub value: std::option::Option<crate::model::operation_progress::metric::Value>,
13281
13282 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13283 }
13284
13285 impl Metric {
13286 pub fn new() -> Self {
13287 std::default::Default::default()
13288 }
13289
13290 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13292 self.name = v.into();
13293 self
13294 }
13295
13296 pub fn set_value<
13301 T: std::convert::Into<
13302 std::option::Option<crate::model::operation_progress::metric::Value>,
13303 >,
13304 >(
13305 mut self,
13306 v: T,
13307 ) -> Self {
13308 self.value = v.into();
13309 self
13310 }
13311
13312 pub fn int_value(&self) -> std::option::Option<&i64> {
13316 #[allow(unreachable_patterns)]
13317 self.value.as_ref().and_then(|v| match v {
13318 crate::model::operation_progress::metric::Value::IntValue(v) => {
13319 std::option::Option::Some(v)
13320 }
13321 _ => std::option::Option::None,
13322 })
13323 }
13324
13325 pub fn set_int_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13331 self.value = std::option::Option::Some(
13332 crate::model::operation_progress::metric::Value::IntValue(v.into()),
13333 );
13334 self
13335 }
13336
13337 pub fn double_value(&self) -> std::option::Option<&f64> {
13341 #[allow(unreachable_patterns)]
13342 self.value.as_ref().and_then(|v| match v {
13343 crate::model::operation_progress::metric::Value::DoubleValue(v) => {
13344 std::option::Option::Some(v)
13345 }
13346 _ => std::option::Option::None,
13347 })
13348 }
13349
13350 pub fn set_double_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
13356 self.value = std::option::Option::Some(
13357 crate::model::operation_progress::metric::Value::DoubleValue(v.into()),
13358 );
13359 self
13360 }
13361
13362 pub fn string_value(&self) -> std::option::Option<&std::string::String> {
13366 #[allow(unreachable_patterns)]
13367 self.value.as_ref().and_then(|v| match v {
13368 crate::model::operation_progress::metric::Value::StringValue(v) => {
13369 std::option::Option::Some(v)
13370 }
13371 _ => std::option::Option::None,
13372 })
13373 }
13374
13375 pub fn set_string_value<T: std::convert::Into<std::string::String>>(
13381 mut self,
13382 v: T,
13383 ) -> Self {
13384 self.value = std::option::Option::Some(
13385 crate::model::operation_progress::metric::Value::StringValue(v.into()),
13386 );
13387 self
13388 }
13389 }
13390
13391 impl wkt::message::Message for Metric {
13392 fn typename() -> &'static str {
13393 "type.googleapis.com/google.container.v1.OperationProgress.Metric"
13394 }
13395 }
13396
13397 pub mod metric {
13399 #[allow(unused_imports)]
13400 use super::*;
13401
13402 #[derive(Clone, Debug, PartialEq)]
13404 #[non_exhaustive]
13405 pub enum Value {
13406 IntValue(i64),
13408 DoubleValue(f64),
13410 StringValue(std::string::String),
13412 }
13413 }
13414}
13415
13416#[derive(Clone, Default, PartialEq)]
13418#[non_exhaustive]
13419pub struct CreateClusterRequest {
13420 #[deprecated]
13424 pub project_id: std::string::String,
13425
13426 #[deprecated]
13431 pub zone: std::string::String,
13432
13433 pub cluster: std::option::Option<crate::model::Cluster>,
13436
13437 pub parent: std::string::String,
13440
13441 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13442}
13443
13444impl CreateClusterRequest {
13445 pub fn new() -> Self {
13446 std::default::Default::default()
13447 }
13448
13449 #[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 pub fn set_cluster<T>(mut self, v: T) -> Self
13465 where
13466 T: std::convert::Into<crate::model::Cluster>,
13467 {
13468 self.cluster = std::option::Option::Some(v.into());
13469 self
13470 }
13471
13472 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
13474 where
13475 T: std::convert::Into<crate::model::Cluster>,
13476 {
13477 self.cluster = v.map(|x| x.into());
13478 self
13479 }
13480
13481 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13483 self.parent = v.into();
13484 self
13485 }
13486}
13487
13488impl wkt::message::Message for CreateClusterRequest {
13489 fn typename() -> &'static str {
13490 "type.googleapis.com/google.container.v1.CreateClusterRequest"
13491 }
13492}
13493
13494#[derive(Clone, Default, PartialEq)]
13496#[non_exhaustive]
13497pub struct GetClusterRequest {
13498 #[deprecated]
13502 pub project_id: std::string::String,
13503
13504 #[deprecated]
13509 pub zone: std::string::String,
13510
13511 #[deprecated]
13514 pub cluster_id: std::string::String,
13515
13516 pub name: std::string::String,
13519
13520 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13521}
13522
13523impl GetClusterRequest {
13524 pub fn new() -> Self {
13525 std::default::Default::default()
13526 }
13527
13528 #[deprecated]
13530 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13531 self.project_id = v.into();
13532 self
13533 }
13534
13535 #[deprecated]
13537 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13538 self.zone = v.into();
13539 self
13540 }
13541
13542 #[deprecated]
13544 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13545 self.cluster_id = v.into();
13546 self
13547 }
13548
13549 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13551 self.name = v.into();
13552 self
13553 }
13554}
13555
13556impl wkt::message::Message for GetClusterRequest {
13557 fn typename() -> &'static str {
13558 "type.googleapis.com/google.container.v1.GetClusterRequest"
13559 }
13560}
13561
13562#[derive(Clone, Default, PartialEq)]
13564#[non_exhaustive]
13565pub struct UpdateClusterRequest {
13566 #[deprecated]
13570 pub project_id: std::string::String,
13571
13572 #[deprecated]
13577 pub zone: std::string::String,
13578
13579 #[deprecated]
13582 pub cluster_id: std::string::String,
13583
13584 pub update: std::option::Option<crate::model::ClusterUpdate>,
13586
13587 pub name: std::string::String,
13590
13591 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13592}
13593
13594impl UpdateClusterRequest {
13595 pub fn new() -> Self {
13596 std::default::Default::default()
13597 }
13598
13599 #[deprecated]
13601 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13602 self.project_id = v.into();
13603 self
13604 }
13605
13606 #[deprecated]
13608 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13609 self.zone = v.into();
13610 self
13611 }
13612
13613 #[deprecated]
13615 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13616 self.cluster_id = v.into();
13617 self
13618 }
13619
13620 pub fn set_update<T>(mut self, v: T) -> Self
13622 where
13623 T: std::convert::Into<crate::model::ClusterUpdate>,
13624 {
13625 self.update = std::option::Option::Some(v.into());
13626 self
13627 }
13628
13629 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
13631 where
13632 T: std::convert::Into<crate::model::ClusterUpdate>,
13633 {
13634 self.update = v.map(|x| x.into());
13635 self
13636 }
13637
13638 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13640 self.name = v.into();
13641 self
13642 }
13643}
13644
13645impl wkt::message::Message for UpdateClusterRequest {
13646 fn typename() -> &'static str {
13647 "type.googleapis.com/google.container.v1.UpdateClusterRequest"
13648 }
13649}
13650
13651#[derive(Clone, Default, PartialEq)]
13653#[non_exhaustive]
13654pub struct UpdateNodePoolRequest {
13655 #[deprecated]
13659 pub project_id: std::string::String,
13660
13661 #[deprecated]
13666 pub zone: std::string::String,
13667
13668 #[deprecated]
13671 pub cluster_id: std::string::String,
13672
13673 #[deprecated]
13676 pub node_pool_id: std::string::String,
13677
13678 pub node_version: std::string::String,
13690
13691 pub image_type: std::string::String,
13695
13696 pub name: std::string::String,
13700
13701 pub locations: std::vec::Vec<std::string::String>,
13715
13716 pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
13718
13719 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
13721
13722 pub tags: std::option::Option<crate::model::NetworkTags>,
13726
13727 pub taints: std::option::Option<crate::model::NodeTaints>,
13731
13732 pub labels: std::option::Option<crate::model::NodeLabels>,
13736
13737 pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
13739
13740 pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
13742
13743 pub node_network_config: std::option::Option<crate::model::NodeNetworkConfig>,
13745
13746 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
13748
13749 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
13752
13753 pub gvnic: std::option::Option<crate::model::VirtualNIC>,
13755
13756 pub etag: std::string::String,
13760
13761 pub fast_socket: std::option::Option<crate::model::FastSocket>,
13763
13764 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
13766
13767 pub resource_labels: std::option::Option<crate::model::ResourceLabels>,
13770
13771 pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
13773
13774 pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
13779
13780 pub machine_type: std::string::String,
13785
13786 pub disk_type: std::string::String,
13791
13792 pub disk_size_gb: i64,
13797
13798 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
13802
13803 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
13807
13808 pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
13810
13811 pub storage_pools: std::vec::Vec<std::string::String>,
13814
13815 pub max_run_duration: std::option::Option<wkt::Duration>,
13818
13819 pub flex_start: std::option::Option<bool>,
13821
13822 pub boot_disk: std::option::Option<crate::model::BootDisk>,
13826
13827 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13828}
13829
13830impl UpdateNodePoolRequest {
13831 pub fn new() -> Self {
13832 std::default::Default::default()
13833 }
13834
13835 #[deprecated]
13837 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13838 self.project_id = v.into();
13839 self
13840 }
13841
13842 #[deprecated]
13844 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13845 self.zone = v.into();
13846 self
13847 }
13848
13849 #[deprecated]
13851 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13852 self.cluster_id = v.into();
13853 self
13854 }
13855
13856 #[deprecated]
13858 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13859 self.node_pool_id = v.into();
13860 self
13861 }
13862
13863 pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13865 self.node_version = v.into();
13866 self
13867 }
13868
13869 pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13871 self.image_type = v.into();
13872 self
13873 }
13874
13875 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13877 self.name = v.into();
13878 self
13879 }
13880
13881 pub fn set_locations<T, V>(mut self, v: T) -> Self
13883 where
13884 T: std::iter::IntoIterator<Item = V>,
13885 V: std::convert::Into<std::string::String>,
13886 {
13887 use std::iter::Iterator;
13888 self.locations = v.into_iter().map(|i| i.into()).collect();
13889 self
13890 }
13891
13892 pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
13894 where
13895 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
13896 {
13897 self.workload_metadata_config = std::option::Option::Some(v.into());
13898 self
13899 }
13900
13901 pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
13903 where
13904 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
13905 {
13906 self.workload_metadata_config = v.map(|x| x.into());
13907 self
13908 }
13909
13910 pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
13912 where
13913 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
13914 {
13915 self.upgrade_settings = std::option::Option::Some(v.into());
13916 self
13917 }
13918
13919 pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
13921 where
13922 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
13923 {
13924 self.upgrade_settings = v.map(|x| x.into());
13925 self
13926 }
13927
13928 pub fn set_tags<T>(mut self, v: T) -> Self
13930 where
13931 T: std::convert::Into<crate::model::NetworkTags>,
13932 {
13933 self.tags = std::option::Option::Some(v.into());
13934 self
13935 }
13936
13937 pub fn set_or_clear_tags<T>(mut self, v: std::option::Option<T>) -> Self
13939 where
13940 T: std::convert::Into<crate::model::NetworkTags>,
13941 {
13942 self.tags = v.map(|x| x.into());
13943 self
13944 }
13945
13946 pub fn set_taints<T>(mut self, v: T) -> Self
13948 where
13949 T: std::convert::Into<crate::model::NodeTaints>,
13950 {
13951 self.taints = std::option::Option::Some(v.into());
13952 self
13953 }
13954
13955 pub fn set_or_clear_taints<T>(mut self, v: std::option::Option<T>) -> Self
13957 where
13958 T: std::convert::Into<crate::model::NodeTaints>,
13959 {
13960 self.taints = v.map(|x| x.into());
13961 self
13962 }
13963
13964 pub fn set_labels<T>(mut self, v: T) -> Self
13966 where
13967 T: std::convert::Into<crate::model::NodeLabels>,
13968 {
13969 self.labels = std::option::Option::Some(v.into());
13970 self
13971 }
13972
13973 pub fn set_or_clear_labels<T>(mut self, v: std::option::Option<T>) -> Self
13975 where
13976 T: std::convert::Into<crate::model::NodeLabels>,
13977 {
13978 self.labels = v.map(|x| x.into());
13979 self
13980 }
13981
13982 pub fn set_linux_node_config<T>(mut self, v: T) -> Self
13984 where
13985 T: std::convert::Into<crate::model::LinuxNodeConfig>,
13986 {
13987 self.linux_node_config = std::option::Option::Some(v.into());
13988 self
13989 }
13990
13991 pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
13993 where
13994 T: std::convert::Into<crate::model::LinuxNodeConfig>,
13995 {
13996 self.linux_node_config = v.map(|x| x.into());
13997 self
13998 }
13999
14000 pub fn set_kubelet_config<T>(mut self, v: T) -> Self
14002 where
14003 T: std::convert::Into<crate::model::NodeKubeletConfig>,
14004 {
14005 self.kubelet_config = std::option::Option::Some(v.into());
14006 self
14007 }
14008
14009 pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
14011 where
14012 T: std::convert::Into<crate::model::NodeKubeletConfig>,
14013 {
14014 self.kubelet_config = v.map(|x| x.into());
14015 self
14016 }
14017
14018 pub fn set_node_network_config<T>(mut self, v: T) -> Self
14020 where
14021 T: std::convert::Into<crate::model::NodeNetworkConfig>,
14022 {
14023 self.node_network_config = std::option::Option::Some(v.into());
14024 self
14025 }
14026
14027 pub fn set_or_clear_node_network_config<T>(mut self, v: std::option::Option<T>) -> Self
14029 where
14030 T: std::convert::Into<crate::model::NodeNetworkConfig>,
14031 {
14032 self.node_network_config = v.map(|x| x.into());
14033 self
14034 }
14035
14036 pub fn set_gcfs_config<T>(mut self, v: T) -> Self
14038 where
14039 T: std::convert::Into<crate::model::GcfsConfig>,
14040 {
14041 self.gcfs_config = std::option::Option::Some(v.into());
14042 self
14043 }
14044
14045 pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
14047 where
14048 T: std::convert::Into<crate::model::GcfsConfig>,
14049 {
14050 self.gcfs_config = v.map(|x| x.into());
14051 self
14052 }
14053
14054 pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
14056 where
14057 T: std::convert::Into<crate::model::ConfidentialNodes>,
14058 {
14059 self.confidential_nodes = std::option::Option::Some(v.into());
14060 self
14061 }
14062
14063 pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
14065 where
14066 T: std::convert::Into<crate::model::ConfidentialNodes>,
14067 {
14068 self.confidential_nodes = v.map(|x| x.into());
14069 self
14070 }
14071
14072 pub fn set_gvnic<T>(mut self, v: T) -> Self
14074 where
14075 T: std::convert::Into<crate::model::VirtualNIC>,
14076 {
14077 self.gvnic = std::option::Option::Some(v.into());
14078 self
14079 }
14080
14081 pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
14083 where
14084 T: std::convert::Into<crate::model::VirtualNIC>,
14085 {
14086 self.gvnic = v.map(|x| x.into());
14087 self
14088 }
14089
14090 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14092 self.etag = v.into();
14093 self
14094 }
14095
14096 pub fn set_fast_socket<T>(mut self, v: T) -> Self
14098 where
14099 T: std::convert::Into<crate::model::FastSocket>,
14100 {
14101 self.fast_socket = std::option::Option::Some(v.into());
14102 self
14103 }
14104
14105 pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
14107 where
14108 T: std::convert::Into<crate::model::FastSocket>,
14109 {
14110 self.fast_socket = v.map(|x| x.into());
14111 self
14112 }
14113
14114 pub fn set_logging_config<T>(mut self, v: T) -> Self
14116 where
14117 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
14118 {
14119 self.logging_config = std::option::Option::Some(v.into());
14120 self
14121 }
14122
14123 pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
14125 where
14126 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
14127 {
14128 self.logging_config = v.map(|x| x.into());
14129 self
14130 }
14131
14132 pub fn set_resource_labels<T>(mut self, v: T) -> Self
14134 where
14135 T: std::convert::Into<crate::model::ResourceLabels>,
14136 {
14137 self.resource_labels = std::option::Option::Some(v.into());
14138 self
14139 }
14140
14141 pub fn set_or_clear_resource_labels<T>(mut self, v: std::option::Option<T>) -> Self
14143 where
14144 T: std::convert::Into<crate::model::ResourceLabels>,
14145 {
14146 self.resource_labels = v.map(|x| x.into());
14147 self
14148 }
14149
14150 pub fn set_windows_node_config<T>(mut self, v: T) -> Self
14152 where
14153 T: std::convert::Into<crate::model::WindowsNodeConfig>,
14154 {
14155 self.windows_node_config = std::option::Option::Some(v.into());
14156 self
14157 }
14158
14159 pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
14161 where
14162 T: std::convert::Into<crate::model::WindowsNodeConfig>,
14163 {
14164 self.windows_node_config = v.map(|x| x.into());
14165 self
14166 }
14167
14168 pub fn set_accelerators<T, V>(mut self, v: T) -> Self
14170 where
14171 T: std::iter::IntoIterator<Item = V>,
14172 V: std::convert::Into<crate::model::AcceleratorConfig>,
14173 {
14174 use std::iter::Iterator;
14175 self.accelerators = v.into_iter().map(|i| i.into()).collect();
14176 self
14177 }
14178
14179 pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14181 self.machine_type = v.into();
14182 self
14183 }
14184
14185 pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14187 self.disk_type = v.into();
14188 self
14189 }
14190
14191 pub fn set_disk_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14193 self.disk_size_gb = v.into();
14194 self
14195 }
14196
14197 pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
14199 where
14200 T: std::convert::Into<crate::model::ResourceManagerTags>,
14201 {
14202 self.resource_manager_tags = std::option::Option::Some(v.into());
14203 self
14204 }
14205
14206 pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
14208 where
14209 T: std::convert::Into<crate::model::ResourceManagerTags>,
14210 {
14211 self.resource_manager_tags = v.map(|x| x.into());
14212 self
14213 }
14214
14215 pub fn set_containerd_config<T>(mut self, v: T) -> Self
14217 where
14218 T: std::convert::Into<crate::model::ContainerdConfig>,
14219 {
14220 self.containerd_config = std::option::Option::Some(v.into());
14221 self
14222 }
14223
14224 pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
14226 where
14227 T: std::convert::Into<crate::model::ContainerdConfig>,
14228 {
14229 self.containerd_config = v.map(|x| x.into());
14230 self
14231 }
14232
14233 pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
14235 where
14236 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
14237 {
14238 self.queued_provisioning = std::option::Option::Some(v.into());
14239 self
14240 }
14241
14242 pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
14244 where
14245 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
14246 {
14247 self.queued_provisioning = v.map(|x| x.into());
14248 self
14249 }
14250
14251 pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
14253 where
14254 T: std::iter::IntoIterator<Item = V>,
14255 V: std::convert::Into<std::string::String>,
14256 {
14257 use std::iter::Iterator;
14258 self.storage_pools = v.into_iter().map(|i| i.into()).collect();
14259 self
14260 }
14261
14262 pub fn set_max_run_duration<T>(mut self, v: T) -> Self
14264 where
14265 T: std::convert::Into<wkt::Duration>,
14266 {
14267 self.max_run_duration = std::option::Option::Some(v.into());
14268 self
14269 }
14270
14271 pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
14273 where
14274 T: std::convert::Into<wkt::Duration>,
14275 {
14276 self.max_run_duration = v.map(|x| x.into());
14277 self
14278 }
14279
14280 pub fn set_flex_start<T>(mut self, v: T) -> Self
14282 where
14283 T: std::convert::Into<bool>,
14284 {
14285 self.flex_start = std::option::Option::Some(v.into());
14286 self
14287 }
14288
14289 pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
14291 where
14292 T: std::convert::Into<bool>,
14293 {
14294 self.flex_start = v.map(|x| x.into());
14295 self
14296 }
14297
14298 pub fn set_boot_disk<T>(mut self, v: T) -> Self
14300 where
14301 T: std::convert::Into<crate::model::BootDisk>,
14302 {
14303 self.boot_disk = std::option::Option::Some(v.into());
14304 self
14305 }
14306
14307 pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
14309 where
14310 T: std::convert::Into<crate::model::BootDisk>,
14311 {
14312 self.boot_disk = v.map(|x| x.into());
14313 self
14314 }
14315}
14316
14317impl wkt::message::Message for UpdateNodePoolRequest {
14318 fn typename() -> &'static str {
14319 "type.googleapis.com/google.container.v1.UpdateNodePoolRequest"
14320 }
14321}
14322
14323#[derive(Clone, Default, PartialEq)]
14325#[non_exhaustive]
14326pub struct SetNodePoolAutoscalingRequest {
14327 #[deprecated]
14331 pub project_id: std::string::String,
14332
14333 #[deprecated]
14338 pub zone: std::string::String,
14339
14340 #[deprecated]
14343 pub cluster_id: std::string::String,
14344
14345 #[deprecated]
14348 pub node_pool_id: std::string::String,
14349
14350 pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
14352
14353 pub name: std::string::String,
14357
14358 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14359}
14360
14361impl SetNodePoolAutoscalingRequest {
14362 pub fn new() -> Self {
14363 std::default::Default::default()
14364 }
14365
14366 #[deprecated]
14368 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14369 self.project_id = v.into();
14370 self
14371 }
14372
14373 #[deprecated]
14375 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14376 self.zone = v.into();
14377 self
14378 }
14379
14380 #[deprecated]
14382 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14383 self.cluster_id = v.into();
14384 self
14385 }
14386
14387 #[deprecated]
14389 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14390 self.node_pool_id = v.into();
14391 self
14392 }
14393
14394 pub fn set_autoscaling<T>(mut self, v: T) -> Self
14396 where
14397 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
14398 {
14399 self.autoscaling = std::option::Option::Some(v.into());
14400 self
14401 }
14402
14403 pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
14405 where
14406 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
14407 {
14408 self.autoscaling = v.map(|x| x.into());
14409 self
14410 }
14411
14412 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14414 self.name = v.into();
14415 self
14416 }
14417}
14418
14419impl wkt::message::Message for SetNodePoolAutoscalingRequest {
14420 fn typename() -> &'static str {
14421 "type.googleapis.com/google.container.v1.SetNodePoolAutoscalingRequest"
14422 }
14423}
14424
14425#[derive(Clone, Default, PartialEq)]
14427#[non_exhaustive]
14428pub struct SetLoggingServiceRequest {
14429 #[deprecated]
14433 pub project_id: std::string::String,
14434
14435 #[deprecated]
14440 pub zone: std::string::String,
14441
14442 #[deprecated]
14445 pub cluster_id: std::string::String,
14446
14447 pub logging_service: std::string::String,
14459
14460 pub name: std::string::String,
14463
14464 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14465}
14466
14467impl SetLoggingServiceRequest {
14468 pub fn new() -> Self {
14469 std::default::Default::default()
14470 }
14471
14472 #[deprecated]
14474 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14475 self.project_id = v.into();
14476 self
14477 }
14478
14479 #[deprecated]
14481 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14482 self.zone = v.into();
14483 self
14484 }
14485
14486 #[deprecated]
14488 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14489 self.cluster_id = v.into();
14490 self
14491 }
14492
14493 pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14495 self.logging_service = v.into();
14496 self
14497 }
14498
14499 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14501 self.name = v.into();
14502 self
14503 }
14504}
14505
14506impl wkt::message::Message for SetLoggingServiceRequest {
14507 fn typename() -> &'static str {
14508 "type.googleapis.com/google.container.v1.SetLoggingServiceRequest"
14509 }
14510}
14511
14512#[derive(Clone, Default, PartialEq)]
14514#[non_exhaustive]
14515pub struct SetMonitoringServiceRequest {
14516 #[deprecated]
14520 pub project_id: std::string::String,
14521
14522 #[deprecated]
14527 pub zone: std::string::String,
14528
14529 #[deprecated]
14532 pub cluster_id: std::string::String,
14533
14534 pub monitoring_service: std::string::String,
14546
14547 pub name: std::string::String,
14550
14551 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14552}
14553
14554impl SetMonitoringServiceRequest {
14555 pub fn new() -> Self {
14556 std::default::Default::default()
14557 }
14558
14559 #[deprecated]
14561 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14562 self.project_id = v.into();
14563 self
14564 }
14565
14566 #[deprecated]
14568 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14569 self.zone = v.into();
14570 self
14571 }
14572
14573 #[deprecated]
14575 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14576 self.cluster_id = v.into();
14577 self
14578 }
14579
14580 pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
14582 mut self,
14583 v: T,
14584 ) -> Self {
14585 self.monitoring_service = v.into();
14586 self
14587 }
14588
14589 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14591 self.name = v.into();
14592 self
14593 }
14594}
14595
14596impl wkt::message::Message for SetMonitoringServiceRequest {
14597 fn typename() -> &'static str {
14598 "type.googleapis.com/google.container.v1.SetMonitoringServiceRequest"
14599 }
14600}
14601
14602#[derive(Clone, Default, PartialEq)]
14604#[non_exhaustive]
14605pub struct SetAddonsConfigRequest {
14606 #[deprecated]
14610 pub project_id: std::string::String,
14611
14612 #[deprecated]
14617 pub zone: std::string::String,
14618
14619 #[deprecated]
14622 pub cluster_id: std::string::String,
14623
14624 pub addons_config: std::option::Option<crate::model::AddonsConfig>,
14627
14628 pub name: std::string::String,
14631
14632 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14633}
14634
14635impl SetAddonsConfigRequest {
14636 pub fn new() -> Self {
14637 std::default::Default::default()
14638 }
14639
14640 #[deprecated]
14642 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14643 self.project_id = v.into();
14644 self
14645 }
14646
14647 #[deprecated]
14649 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14650 self.zone = v.into();
14651 self
14652 }
14653
14654 #[deprecated]
14656 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14657 self.cluster_id = v.into();
14658 self
14659 }
14660
14661 pub fn set_addons_config<T>(mut self, v: T) -> Self
14663 where
14664 T: std::convert::Into<crate::model::AddonsConfig>,
14665 {
14666 self.addons_config = std::option::Option::Some(v.into());
14667 self
14668 }
14669
14670 pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
14672 where
14673 T: std::convert::Into<crate::model::AddonsConfig>,
14674 {
14675 self.addons_config = v.map(|x| x.into());
14676 self
14677 }
14678
14679 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14681 self.name = v.into();
14682 self
14683 }
14684}
14685
14686impl wkt::message::Message for SetAddonsConfigRequest {
14687 fn typename() -> &'static str {
14688 "type.googleapis.com/google.container.v1.SetAddonsConfigRequest"
14689 }
14690}
14691
14692#[derive(Clone, Default, PartialEq)]
14694#[non_exhaustive]
14695pub struct SetLocationsRequest {
14696 #[deprecated]
14700 pub project_id: std::string::String,
14701
14702 #[deprecated]
14707 pub zone: std::string::String,
14708
14709 #[deprecated]
14712 pub cluster_id: std::string::String,
14713
14714 pub locations: std::vec::Vec<std::string::String>,
14722
14723 pub name: std::string::String,
14726
14727 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14728}
14729
14730impl SetLocationsRequest {
14731 pub fn new() -> Self {
14732 std::default::Default::default()
14733 }
14734
14735 #[deprecated]
14737 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14738 self.project_id = v.into();
14739 self
14740 }
14741
14742 #[deprecated]
14744 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14745 self.zone = v.into();
14746 self
14747 }
14748
14749 #[deprecated]
14751 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14752 self.cluster_id = v.into();
14753 self
14754 }
14755
14756 pub fn set_locations<T, V>(mut self, v: T) -> Self
14758 where
14759 T: std::iter::IntoIterator<Item = V>,
14760 V: std::convert::Into<std::string::String>,
14761 {
14762 use std::iter::Iterator;
14763 self.locations = v.into_iter().map(|i| i.into()).collect();
14764 self
14765 }
14766
14767 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14769 self.name = v.into();
14770 self
14771 }
14772}
14773
14774impl wkt::message::Message for SetLocationsRequest {
14775 fn typename() -> &'static str {
14776 "type.googleapis.com/google.container.v1.SetLocationsRequest"
14777 }
14778}
14779
14780#[derive(Clone, Default, PartialEq)]
14782#[non_exhaustive]
14783pub struct UpdateMasterRequest {
14784 #[deprecated]
14788 pub project_id: std::string::String,
14789
14790 #[deprecated]
14795 pub zone: std::string::String,
14796
14797 #[deprecated]
14800 pub cluster_id: std::string::String,
14801
14802 pub master_version: std::string::String,
14813
14814 pub name: std::string::String,
14817
14818 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14819}
14820
14821impl UpdateMasterRequest {
14822 pub fn new() -> Self {
14823 std::default::Default::default()
14824 }
14825
14826 #[deprecated]
14828 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14829 self.project_id = v.into();
14830 self
14831 }
14832
14833 #[deprecated]
14835 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14836 self.zone = v.into();
14837 self
14838 }
14839
14840 #[deprecated]
14842 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14843 self.cluster_id = v.into();
14844 self
14845 }
14846
14847 pub fn set_master_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14849 self.master_version = v.into();
14850 self
14851 }
14852
14853 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14855 self.name = v.into();
14856 self
14857 }
14858}
14859
14860impl wkt::message::Message for UpdateMasterRequest {
14861 fn typename() -> &'static str {
14862 "type.googleapis.com/google.container.v1.UpdateMasterRequest"
14863 }
14864}
14865
14866#[derive(Clone, Default, PartialEq)]
14868#[non_exhaustive]
14869pub struct SetMasterAuthRequest {
14870 #[deprecated]
14874 pub project_id: std::string::String,
14875
14876 #[deprecated]
14881 pub zone: std::string::String,
14882
14883 #[deprecated]
14886 pub cluster_id: std::string::String,
14887
14888 pub action: crate::model::set_master_auth_request::Action,
14890
14891 pub update: std::option::Option<crate::model::MasterAuth>,
14893
14894 pub name: std::string::String,
14897
14898 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14899}
14900
14901impl SetMasterAuthRequest {
14902 pub fn new() -> Self {
14903 std::default::Default::default()
14904 }
14905
14906 #[deprecated]
14908 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14909 self.project_id = v.into();
14910 self
14911 }
14912
14913 #[deprecated]
14915 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14916 self.zone = v.into();
14917 self
14918 }
14919
14920 #[deprecated]
14922 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14923 self.cluster_id = v.into();
14924 self
14925 }
14926
14927 pub fn set_action<T: std::convert::Into<crate::model::set_master_auth_request::Action>>(
14929 mut self,
14930 v: T,
14931 ) -> Self {
14932 self.action = v.into();
14933 self
14934 }
14935
14936 pub fn set_update<T>(mut self, v: T) -> Self
14938 where
14939 T: std::convert::Into<crate::model::MasterAuth>,
14940 {
14941 self.update = std::option::Option::Some(v.into());
14942 self
14943 }
14944
14945 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
14947 where
14948 T: std::convert::Into<crate::model::MasterAuth>,
14949 {
14950 self.update = v.map(|x| x.into());
14951 self
14952 }
14953
14954 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14956 self.name = v.into();
14957 self
14958 }
14959}
14960
14961impl wkt::message::Message for SetMasterAuthRequest {
14962 fn typename() -> &'static str {
14963 "type.googleapis.com/google.container.v1.SetMasterAuthRequest"
14964 }
14965}
14966
14967pub mod set_master_auth_request {
14969 #[allow(unused_imports)]
14970 use super::*;
14971
14972 #[derive(Clone, Debug, PartialEq)]
14988 #[non_exhaustive]
14989 pub enum Action {
14990 Unknown,
14992 SetPassword,
14994 GeneratePassword,
14996 SetUsername,
15001 UnknownValue(action::UnknownValue),
15006 }
15007
15008 #[doc(hidden)]
15009 pub mod action {
15010 #[allow(unused_imports)]
15011 use super::*;
15012 #[derive(Clone, Debug, PartialEq)]
15013 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15014 }
15015
15016 impl Action {
15017 pub fn value(&self) -> std::option::Option<i32> {
15022 match self {
15023 Self::Unknown => std::option::Option::Some(0),
15024 Self::SetPassword => std::option::Option::Some(1),
15025 Self::GeneratePassword => std::option::Option::Some(2),
15026 Self::SetUsername => std::option::Option::Some(3),
15027 Self::UnknownValue(u) => u.0.value(),
15028 }
15029 }
15030
15031 pub fn name(&self) -> std::option::Option<&str> {
15036 match self {
15037 Self::Unknown => std::option::Option::Some("UNKNOWN"),
15038 Self::SetPassword => std::option::Option::Some("SET_PASSWORD"),
15039 Self::GeneratePassword => std::option::Option::Some("GENERATE_PASSWORD"),
15040 Self::SetUsername => std::option::Option::Some("SET_USERNAME"),
15041 Self::UnknownValue(u) => u.0.name(),
15042 }
15043 }
15044 }
15045
15046 impl std::default::Default for Action {
15047 fn default() -> Self {
15048 use std::convert::From;
15049 Self::from(0)
15050 }
15051 }
15052
15053 impl std::fmt::Display for Action {
15054 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15055 wkt::internal::display_enum(f, self.name(), self.value())
15056 }
15057 }
15058
15059 impl std::convert::From<i32> for Action {
15060 fn from(value: i32) -> Self {
15061 match value {
15062 0 => Self::Unknown,
15063 1 => Self::SetPassword,
15064 2 => Self::GeneratePassword,
15065 3 => Self::SetUsername,
15066 _ => Self::UnknownValue(action::UnknownValue(
15067 wkt::internal::UnknownEnumValue::Integer(value),
15068 )),
15069 }
15070 }
15071 }
15072
15073 impl std::convert::From<&str> for Action {
15074 fn from(value: &str) -> Self {
15075 use std::string::ToString;
15076 match value {
15077 "UNKNOWN" => Self::Unknown,
15078 "SET_PASSWORD" => Self::SetPassword,
15079 "GENERATE_PASSWORD" => Self::GeneratePassword,
15080 "SET_USERNAME" => Self::SetUsername,
15081 _ => Self::UnknownValue(action::UnknownValue(
15082 wkt::internal::UnknownEnumValue::String(value.to_string()),
15083 )),
15084 }
15085 }
15086 }
15087
15088 impl serde::ser::Serialize for Action {
15089 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15090 where
15091 S: serde::Serializer,
15092 {
15093 match self {
15094 Self::Unknown => serializer.serialize_i32(0),
15095 Self::SetPassword => serializer.serialize_i32(1),
15096 Self::GeneratePassword => serializer.serialize_i32(2),
15097 Self::SetUsername => serializer.serialize_i32(3),
15098 Self::UnknownValue(u) => u.0.serialize(serializer),
15099 }
15100 }
15101 }
15102
15103 impl<'de> serde::de::Deserialize<'de> for Action {
15104 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15105 where
15106 D: serde::Deserializer<'de>,
15107 {
15108 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
15109 ".google.container.v1.SetMasterAuthRequest.Action",
15110 ))
15111 }
15112 }
15113}
15114
15115#[derive(Clone, Default, PartialEq)]
15117#[non_exhaustive]
15118pub struct DeleteClusterRequest {
15119 #[deprecated]
15123 pub project_id: std::string::String,
15124
15125 #[deprecated]
15130 pub zone: std::string::String,
15131
15132 #[deprecated]
15135 pub cluster_id: std::string::String,
15136
15137 pub name: std::string::String,
15140
15141 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15142}
15143
15144impl DeleteClusterRequest {
15145 pub fn new() -> Self {
15146 std::default::Default::default()
15147 }
15148
15149 #[deprecated]
15151 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15152 self.project_id = v.into();
15153 self
15154 }
15155
15156 #[deprecated]
15158 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15159 self.zone = v.into();
15160 self
15161 }
15162
15163 #[deprecated]
15165 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15166 self.cluster_id = v.into();
15167 self
15168 }
15169
15170 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15172 self.name = v.into();
15173 self
15174 }
15175}
15176
15177impl wkt::message::Message for DeleteClusterRequest {
15178 fn typename() -> &'static str {
15179 "type.googleapis.com/google.container.v1.DeleteClusterRequest"
15180 }
15181}
15182
15183#[derive(Clone, Default, PartialEq)]
15185#[non_exhaustive]
15186pub struct ListClustersRequest {
15187 #[deprecated]
15191 pub project_id: std::string::String,
15192
15193 #[deprecated]
15198 pub zone: std::string::String,
15199
15200 pub parent: std::string::String,
15204
15205 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15206}
15207
15208impl ListClustersRequest {
15209 pub fn new() -> Self {
15210 std::default::Default::default()
15211 }
15212
15213 #[deprecated]
15215 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15216 self.project_id = v.into();
15217 self
15218 }
15219
15220 #[deprecated]
15222 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15223 self.zone = v.into();
15224 self
15225 }
15226
15227 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15229 self.parent = v.into();
15230 self
15231 }
15232}
15233
15234impl wkt::message::Message for ListClustersRequest {
15235 fn typename() -> &'static str {
15236 "type.googleapis.com/google.container.v1.ListClustersRequest"
15237 }
15238}
15239
15240#[derive(Clone, Default, PartialEq)]
15242#[non_exhaustive]
15243pub struct ListClustersResponse {
15244 pub clusters: std::vec::Vec<crate::model::Cluster>,
15247
15248 pub missing_zones: std::vec::Vec<std::string::String>,
15251
15252 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15253}
15254
15255impl ListClustersResponse {
15256 pub fn new() -> Self {
15257 std::default::Default::default()
15258 }
15259
15260 pub fn set_clusters<T, V>(mut self, v: T) -> Self
15262 where
15263 T: std::iter::IntoIterator<Item = V>,
15264 V: std::convert::Into<crate::model::Cluster>,
15265 {
15266 use std::iter::Iterator;
15267 self.clusters = v.into_iter().map(|i| i.into()).collect();
15268 self
15269 }
15270
15271 pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
15273 where
15274 T: std::iter::IntoIterator<Item = V>,
15275 V: std::convert::Into<std::string::String>,
15276 {
15277 use std::iter::Iterator;
15278 self.missing_zones = v.into_iter().map(|i| i.into()).collect();
15279 self
15280 }
15281}
15282
15283impl wkt::message::Message for ListClustersResponse {
15284 fn typename() -> &'static str {
15285 "type.googleapis.com/google.container.v1.ListClustersResponse"
15286 }
15287}
15288
15289#[derive(Clone, Default, PartialEq)]
15291#[non_exhaustive]
15292pub struct GetOperationRequest {
15293 #[deprecated]
15297 pub project_id: std::string::String,
15298
15299 #[deprecated]
15304 pub zone: std::string::String,
15305
15306 #[deprecated]
15309 pub operation_id: std::string::String,
15310
15311 pub name: std::string::String,
15314
15315 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15316}
15317
15318impl GetOperationRequest {
15319 pub fn new() -> Self {
15320 std::default::Default::default()
15321 }
15322
15323 #[deprecated]
15325 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15326 self.project_id = v.into();
15327 self
15328 }
15329
15330 #[deprecated]
15332 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15333 self.zone = v.into();
15334 self
15335 }
15336
15337 #[deprecated]
15339 pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15340 self.operation_id = v.into();
15341 self
15342 }
15343
15344 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15346 self.name = v.into();
15347 self
15348 }
15349}
15350
15351impl wkt::message::Message for GetOperationRequest {
15352 fn typename() -> &'static str {
15353 "type.googleapis.com/google.container.v1.GetOperationRequest"
15354 }
15355}
15356
15357#[derive(Clone, Default, PartialEq)]
15359#[non_exhaustive]
15360pub struct ListOperationsRequest {
15361 #[deprecated]
15365 pub project_id: std::string::String,
15366
15367 #[deprecated]
15372 pub zone: std::string::String,
15373
15374 pub parent: std::string::String,
15378
15379 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15380}
15381
15382impl ListOperationsRequest {
15383 pub fn new() -> Self {
15384 std::default::Default::default()
15385 }
15386
15387 #[deprecated]
15389 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15390 self.project_id = v.into();
15391 self
15392 }
15393
15394 #[deprecated]
15396 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15397 self.zone = v.into();
15398 self
15399 }
15400
15401 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15403 self.parent = v.into();
15404 self
15405 }
15406}
15407
15408impl wkt::message::Message for ListOperationsRequest {
15409 fn typename() -> &'static str {
15410 "type.googleapis.com/google.container.v1.ListOperationsRequest"
15411 }
15412}
15413
15414#[derive(Clone, Default, PartialEq)]
15416#[non_exhaustive]
15417pub struct CancelOperationRequest {
15418 #[deprecated]
15422 pub project_id: std::string::String,
15423
15424 #[deprecated]
15429 pub zone: std::string::String,
15430
15431 #[deprecated]
15434 pub operation_id: std::string::String,
15435
15436 pub name: std::string::String,
15439
15440 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15441}
15442
15443impl CancelOperationRequest {
15444 pub fn new() -> Self {
15445 std::default::Default::default()
15446 }
15447
15448 #[deprecated]
15450 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15451 self.project_id = v.into();
15452 self
15453 }
15454
15455 #[deprecated]
15457 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15458 self.zone = v.into();
15459 self
15460 }
15461
15462 #[deprecated]
15464 pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15465 self.operation_id = v.into();
15466 self
15467 }
15468
15469 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15471 self.name = v.into();
15472 self
15473 }
15474}
15475
15476impl wkt::message::Message for CancelOperationRequest {
15477 fn typename() -> &'static str {
15478 "type.googleapis.com/google.container.v1.CancelOperationRequest"
15479 }
15480}
15481
15482#[derive(Clone, Default, PartialEq)]
15484#[non_exhaustive]
15485pub struct ListOperationsResponse {
15486 pub operations: std::vec::Vec<crate::model::Operation>,
15488
15489 pub missing_zones: std::vec::Vec<std::string::String>,
15492
15493 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15494}
15495
15496impl ListOperationsResponse {
15497 pub fn new() -> Self {
15498 std::default::Default::default()
15499 }
15500
15501 pub fn set_operations<T, V>(mut self, v: T) -> Self
15503 where
15504 T: std::iter::IntoIterator<Item = V>,
15505 V: std::convert::Into<crate::model::Operation>,
15506 {
15507 use std::iter::Iterator;
15508 self.operations = v.into_iter().map(|i| i.into()).collect();
15509 self
15510 }
15511
15512 pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
15514 where
15515 T: std::iter::IntoIterator<Item = V>,
15516 V: std::convert::Into<std::string::String>,
15517 {
15518 use std::iter::Iterator;
15519 self.missing_zones = v.into_iter().map(|i| i.into()).collect();
15520 self
15521 }
15522}
15523
15524impl wkt::message::Message for ListOperationsResponse {
15525 fn typename() -> &'static str {
15526 "type.googleapis.com/google.container.v1.ListOperationsResponse"
15527 }
15528}
15529
15530#[derive(Clone, Default, PartialEq)]
15532#[non_exhaustive]
15533pub struct GetServerConfigRequest {
15534 #[deprecated]
15538 pub project_id: std::string::String,
15539
15540 #[deprecated]
15545 pub zone: std::string::String,
15546
15547 pub name: std::string::String,
15550
15551 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15552}
15553
15554impl GetServerConfigRequest {
15555 pub fn new() -> Self {
15556 std::default::Default::default()
15557 }
15558
15559 #[deprecated]
15561 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15562 self.project_id = v.into();
15563 self
15564 }
15565
15566 #[deprecated]
15568 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15569 self.zone = v.into();
15570 self
15571 }
15572
15573 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15575 self.name = v.into();
15576 self
15577 }
15578}
15579
15580impl wkt::message::Message for GetServerConfigRequest {
15581 fn typename() -> &'static str {
15582 "type.googleapis.com/google.container.v1.GetServerConfigRequest"
15583 }
15584}
15585
15586#[derive(Clone, Default, PartialEq)]
15588#[non_exhaustive]
15589pub struct ServerConfig {
15590 pub default_cluster_version: std::string::String,
15592
15593 pub valid_node_versions: std::vec::Vec<std::string::String>,
15595
15596 pub default_image_type: std::string::String,
15598
15599 pub valid_image_types: std::vec::Vec<std::string::String>,
15601
15602 pub valid_master_versions: std::vec::Vec<std::string::String>,
15604
15605 pub channels: std::vec::Vec<crate::model::server_config::ReleaseChannelConfig>,
15607
15608 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15609}
15610
15611impl ServerConfig {
15612 pub fn new() -> Self {
15613 std::default::Default::default()
15614 }
15615
15616 pub fn set_default_cluster_version<T: std::convert::Into<std::string::String>>(
15618 mut self,
15619 v: T,
15620 ) -> Self {
15621 self.default_cluster_version = v.into();
15622 self
15623 }
15624
15625 pub fn set_valid_node_versions<T, V>(mut self, v: T) -> Self
15627 where
15628 T: std::iter::IntoIterator<Item = V>,
15629 V: std::convert::Into<std::string::String>,
15630 {
15631 use std::iter::Iterator;
15632 self.valid_node_versions = v.into_iter().map(|i| i.into()).collect();
15633 self
15634 }
15635
15636 pub fn set_default_image_type<T: std::convert::Into<std::string::String>>(
15638 mut self,
15639 v: T,
15640 ) -> Self {
15641 self.default_image_type = v.into();
15642 self
15643 }
15644
15645 pub fn set_valid_image_types<T, V>(mut self, v: T) -> Self
15647 where
15648 T: std::iter::IntoIterator<Item = V>,
15649 V: std::convert::Into<std::string::String>,
15650 {
15651 use std::iter::Iterator;
15652 self.valid_image_types = v.into_iter().map(|i| i.into()).collect();
15653 self
15654 }
15655
15656 pub fn set_valid_master_versions<T, V>(mut self, v: T) -> Self
15658 where
15659 T: std::iter::IntoIterator<Item = V>,
15660 V: std::convert::Into<std::string::String>,
15661 {
15662 use std::iter::Iterator;
15663 self.valid_master_versions = v.into_iter().map(|i| i.into()).collect();
15664 self
15665 }
15666
15667 pub fn set_channels<T, V>(mut self, v: T) -> Self
15669 where
15670 T: std::iter::IntoIterator<Item = V>,
15671 V: std::convert::Into<crate::model::server_config::ReleaseChannelConfig>,
15672 {
15673 use std::iter::Iterator;
15674 self.channels = v.into_iter().map(|i| i.into()).collect();
15675 self
15676 }
15677}
15678
15679impl wkt::message::Message for ServerConfig {
15680 fn typename() -> &'static str {
15681 "type.googleapis.com/google.container.v1.ServerConfig"
15682 }
15683}
15684
15685pub mod server_config {
15687 #[allow(unused_imports)]
15688 use super::*;
15689
15690 #[derive(Clone, Default, PartialEq)]
15692 #[non_exhaustive]
15693 pub struct ReleaseChannelConfig {
15694 pub channel: crate::model::release_channel::Channel,
15696
15697 pub default_version: std::string::String,
15699
15700 pub valid_versions: std::vec::Vec<std::string::String>,
15702
15703 pub upgrade_target_version: std::string::String,
15705
15706 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15707 }
15708
15709 impl ReleaseChannelConfig {
15710 pub fn new() -> Self {
15711 std::default::Default::default()
15712 }
15713
15714 pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
15716 mut self,
15717 v: T,
15718 ) -> Self {
15719 self.channel = v.into();
15720 self
15721 }
15722
15723 pub fn set_default_version<T: std::convert::Into<std::string::String>>(
15725 mut self,
15726 v: T,
15727 ) -> Self {
15728 self.default_version = v.into();
15729 self
15730 }
15731
15732 pub fn set_valid_versions<T, V>(mut self, v: T) -> Self
15734 where
15735 T: std::iter::IntoIterator<Item = V>,
15736 V: std::convert::Into<std::string::String>,
15737 {
15738 use std::iter::Iterator;
15739 self.valid_versions = v.into_iter().map(|i| i.into()).collect();
15740 self
15741 }
15742
15743 pub fn set_upgrade_target_version<T: std::convert::Into<std::string::String>>(
15745 mut self,
15746 v: T,
15747 ) -> Self {
15748 self.upgrade_target_version = v.into();
15749 self
15750 }
15751 }
15752
15753 impl wkt::message::Message for ReleaseChannelConfig {
15754 fn typename() -> &'static str {
15755 "type.googleapis.com/google.container.v1.ServerConfig.ReleaseChannelConfig"
15756 }
15757 }
15758}
15759
15760#[derive(Clone, Default, PartialEq)]
15762#[non_exhaustive]
15763pub struct CreateNodePoolRequest {
15764 #[deprecated]
15768 pub project_id: std::string::String,
15769
15770 #[deprecated]
15775 pub zone: std::string::String,
15776
15777 #[deprecated]
15780 pub cluster_id: std::string::String,
15781
15782 pub node_pool: std::option::Option<crate::model::NodePool>,
15784
15785 pub parent: std::string::String,
15789
15790 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15791}
15792
15793impl CreateNodePoolRequest {
15794 pub fn new() -> Self {
15795 std::default::Default::default()
15796 }
15797
15798 #[deprecated]
15800 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15801 self.project_id = v.into();
15802 self
15803 }
15804
15805 #[deprecated]
15807 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15808 self.zone = v.into();
15809 self
15810 }
15811
15812 #[deprecated]
15814 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15815 self.cluster_id = v.into();
15816 self
15817 }
15818
15819 pub fn set_node_pool<T>(mut self, v: T) -> Self
15821 where
15822 T: std::convert::Into<crate::model::NodePool>,
15823 {
15824 self.node_pool = std::option::Option::Some(v.into());
15825 self
15826 }
15827
15828 pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
15830 where
15831 T: std::convert::Into<crate::model::NodePool>,
15832 {
15833 self.node_pool = v.map(|x| x.into());
15834 self
15835 }
15836
15837 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15839 self.parent = v.into();
15840 self
15841 }
15842}
15843
15844impl wkt::message::Message for CreateNodePoolRequest {
15845 fn typename() -> &'static str {
15846 "type.googleapis.com/google.container.v1.CreateNodePoolRequest"
15847 }
15848}
15849
15850#[derive(Clone, Default, PartialEq)]
15852#[non_exhaustive]
15853pub struct DeleteNodePoolRequest {
15854 #[deprecated]
15858 pub project_id: std::string::String,
15859
15860 #[deprecated]
15865 pub zone: std::string::String,
15866
15867 #[deprecated]
15870 pub cluster_id: std::string::String,
15871
15872 #[deprecated]
15875 pub node_pool_id: std::string::String,
15876
15877 pub name: std::string::String,
15881
15882 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15883}
15884
15885impl DeleteNodePoolRequest {
15886 pub fn new() -> Self {
15887 std::default::Default::default()
15888 }
15889
15890 #[deprecated]
15892 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15893 self.project_id = v.into();
15894 self
15895 }
15896
15897 #[deprecated]
15899 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15900 self.zone = v.into();
15901 self
15902 }
15903
15904 #[deprecated]
15906 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15907 self.cluster_id = v.into();
15908 self
15909 }
15910
15911 #[deprecated]
15913 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15914 self.node_pool_id = v.into();
15915 self
15916 }
15917
15918 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15920 self.name = v.into();
15921 self
15922 }
15923}
15924
15925impl wkt::message::Message for DeleteNodePoolRequest {
15926 fn typename() -> &'static str {
15927 "type.googleapis.com/google.container.v1.DeleteNodePoolRequest"
15928 }
15929}
15930
15931#[derive(Clone, Default, PartialEq)]
15933#[non_exhaustive]
15934pub struct ListNodePoolsRequest {
15935 #[deprecated]
15939 pub project_id: std::string::String,
15940
15941 #[deprecated]
15946 pub zone: std::string::String,
15947
15948 #[deprecated]
15951 pub cluster_id: std::string::String,
15952
15953 pub parent: std::string::String,
15956
15957 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15958}
15959
15960impl ListNodePoolsRequest {
15961 pub fn new() -> Self {
15962 std::default::Default::default()
15963 }
15964
15965 #[deprecated]
15967 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15968 self.project_id = v.into();
15969 self
15970 }
15971
15972 #[deprecated]
15974 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15975 self.zone = v.into();
15976 self
15977 }
15978
15979 #[deprecated]
15981 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15982 self.cluster_id = v.into();
15983 self
15984 }
15985
15986 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15988 self.parent = v.into();
15989 self
15990 }
15991}
15992
15993impl wkt::message::Message for ListNodePoolsRequest {
15994 fn typename() -> &'static str {
15995 "type.googleapis.com/google.container.v1.ListNodePoolsRequest"
15996 }
15997}
15998
15999#[derive(Clone, Default, PartialEq)]
16001#[non_exhaustive]
16002pub struct GetNodePoolRequest {
16003 #[deprecated]
16007 pub project_id: std::string::String,
16008
16009 #[deprecated]
16014 pub zone: std::string::String,
16015
16016 #[deprecated]
16019 pub cluster_id: std::string::String,
16020
16021 #[deprecated]
16024 pub node_pool_id: std::string::String,
16025
16026 pub name: std::string::String,
16030
16031 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16032}
16033
16034impl GetNodePoolRequest {
16035 pub fn new() -> Self {
16036 std::default::Default::default()
16037 }
16038
16039 #[deprecated]
16041 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16042 self.project_id = v.into();
16043 self
16044 }
16045
16046 #[deprecated]
16048 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16049 self.zone = v.into();
16050 self
16051 }
16052
16053 #[deprecated]
16055 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16056 self.cluster_id = v.into();
16057 self
16058 }
16059
16060 #[deprecated]
16062 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16063 self.node_pool_id = v.into();
16064 self
16065 }
16066
16067 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16069 self.name = v.into();
16070 self
16071 }
16072}
16073
16074impl wkt::message::Message for GetNodePoolRequest {
16075 fn typename() -> &'static str {
16076 "type.googleapis.com/google.container.v1.GetNodePoolRequest"
16077 }
16078}
16079
16080#[derive(Clone, Default, PartialEq)]
16082#[non_exhaustive]
16083pub struct BlueGreenSettings {
16084 pub node_pool_soak_duration: std::option::Option<wkt::Duration>,
16087
16088 pub rollout_policy: std::option::Option<crate::model::blue_green_settings::RolloutPolicy>,
16090
16091 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16092}
16093
16094impl BlueGreenSettings {
16095 pub fn new() -> Self {
16096 std::default::Default::default()
16097 }
16098
16099 pub fn set_node_pool_soak_duration<T>(mut self, v: T) -> Self
16101 where
16102 T: std::convert::Into<wkt::Duration>,
16103 {
16104 self.node_pool_soak_duration = std::option::Option::Some(v.into());
16105 self
16106 }
16107
16108 pub fn set_or_clear_node_pool_soak_duration<T>(mut self, v: std::option::Option<T>) -> Self
16110 where
16111 T: std::convert::Into<wkt::Duration>,
16112 {
16113 self.node_pool_soak_duration = v.map(|x| x.into());
16114 self
16115 }
16116
16117 pub fn set_rollout_policy<
16122 T: std::convert::Into<std::option::Option<crate::model::blue_green_settings::RolloutPolicy>>,
16123 >(
16124 mut self,
16125 v: T,
16126 ) -> Self {
16127 self.rollout_policy = v.into();
16128 self
16129 }
16130
16131 pub fn standard_rollout_policy(
16135 &self,
16136 ) -> std::option::Option<
16137 &std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
16138 > {
16139 #[allow(unreachable_patterns)]
16140 self.rollout_policy.as_ref().and_then(|v| match v {
16141 crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v) => {
16142 std::option::Option::Some(v)
16143 }
16144 _ => std::option::Option::None,
16145 })
16146 }
16147
16148 pub fn set_standard_rollout_policy<
16154 T: std::convert::Into<
16155 std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
16156 >,
16157 >(
16158 mut self,
16159 v: T,
16160 ) -> Self {
16161 self.rollout_policy = std::option::Option::Some(
16162 crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v.into()),
16163 );
16164 self
16165 }
16166
16167 pub fn autoscaled_rollout_policy(
16171 &self,
16172 ) -> std::option::Option<
16173 &std::boxed::Box<crate::model::blue_green_settings::AutoscaledRolloutPolicy>,
16174 > {
16175 #[allow(unreachable_patterns)]
16176 self.rollout_policy.as_ref().and_then(|v| match v {
16177 crate::model::blue_green_settings::RolloutPolicy::AutoscaledRolloutPolicy(v) => {
16178 std::option::Option::Some(v)
16179 }
16180 _ => std::option::Option::None,
16181 })
16182 }
16183
16184 pub fn set_autoscaled_rollout_policy<
16190 T: std::convert::Into<
16191 std::boxed::Box<crate::model::blue_green_settings::AutoscaledRolloutPolicy>,
16192 >,
16193 >(
16194 mut self,
16195 v: T,
16196 ) -> Self {
16197 self.rollout_policy = std::option::Option::Some(
16198 crate::model::blue_green_settings::RolloutPolicy::AutoscaledRolloutPolicy(v.into()),
16199 );
16200 self
16201 }
16202}
16203
16204impl wkt::message::Message for BlueGreenSettings {
16205 fn typename() -> &'static str {
16206 "type.googleapis.com/google.container.v1.BlueGreenSettings"
16207 }
16208}
16209
16210pub mod blue_green_settings {
16212 #[allow(unused_imports)]
16213 use super::*;
16214
16215 #[derive(Clone, Default, PartialEq)]
16217 #[non_exhaustive]
16218 pub struct StandardRolloutPolicy {
16219 pub batch_soak_duration: std::option::Option<wkt::Duration>,
16221
16222 pub update_batch_size: std::option::Option<
16224 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
16225 >,
16226
16227 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16228 }
16229
16230 impl StandardRolloutPolicy {
16231 pub fn new() -> Self {
16232 std::default::Default::default()
16233 }
16234
16235 pub fn set_batch_soak_duration<T>(mut self, v: T) -> Self
16237 where
16238 T: std::convert::Into<wkt::Duration>,
16239 {
16240 self.batch_soak_duration = std::option::Option::Some(v.into());
16241 self
16242 }
16243
16244 pub fn set_or_clear_batch_soak_duration<T>(mut self, v: std::option::Option<T>) -> Self
16246 where
16247 T: std::convert::Into<wkt::Duration>,
16248 {
16249 self.batch_soak_duration = v.map(|x| x.into());
16250 self
16251 }
16252
16253 pub fn set_update_batch_size<
16258 T: std::convert::Into<
16259 std::option::Option<
16260 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
16261 >,
16262 >,
16263 >(
16264 mut self,
16265 v: T,
16266 ) -> Self {
16267 self.update_batch_size = v.into();
16268 self
16269 }
16270
16271 pub fn batch_percentage(&self) -> std::option::Option<&f32> {
16275 #[allow(unreachable_patterns)]
16276 self.update_batch_size.as_ref().and_then(|v| match v {
16277 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(v) => std::option::Option::Some(v),
16278 _ => std::option::Option::None,
16279 })
16280 }
16281
16282 pub fn set_batch_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
16288 self.update_batch_size = std::option::Option::Some(
16289 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(
16290 v.into()
16291 )
16292 );
16293 self
16294 }
16295
16296 pub fn batch_node_count(&self) -> std::option::Option<&i32> {
16300 #[allow(unreachable_patterns)]
16301 self.update_batch_size.as_ref().and_then(|v| match v {
16302 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(v) => std::option::Option::Some(v),
16303 _ => std::option::Option::None,
16304 })
16305 }
16306
16307 pub fn set_batch_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16313 self.update_batch_size = std::option::Option::Some(
16314 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(
16315 v.into()
16316 )
16317 );
16318 self
16319 }
16320 }
16321
16322 impl wkt::message::Message for StandardRolloutPolicy {
16323 fn typename() -> &'static str {
16324 "type.googleapis.com/google.container.v1.BlueGreenSettings.StandardRolloutPolicy"
16325 }
16326 }
16327
16328 pub mod standard_rollout_policy {
16330 #[allow(unused_imports)]
16331 use super::*;
16332
16333 #[derive(Clone, Debug, PartialEq)]
16335 #[non_exhaustive]
16336 pub enum UpdateBatchSize {
16337 BatchPercentage(f32),
16340 BatchNodeCount(i32),
16342 }
16343 }
16344
16345 #[derive(Clone, Default, PartialEq)]
16348 #[non_exhaustive]
16349 pub struct AutoscaledRolloutPolicy {
16350 pub wait_for_drain_duration: std::option::Option<wkt::Duration>,
16354
16355 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16356 }
16357
16358 impl AutoscaledRolloutPolicy {
16359 pub fn new() -> Self {
16360 std::default::Default::default()
16361 }
16362
16363 pub fn set_wait_for_drain_duration<T>(mut self, v: T) -> Self
16365 where
16366 T: std::convert::Into<wkt::Duration>,
16367 {
16368 self.wait_for_drain_duration = std::option::Option::Some(v.into());
16369 self
16370 }
16371
16372 pub fn set_or_clear_wait_for_drain_duration<T>(mut self, v: std::option::Option<T>) -> Self
16374 where
16375 T: std::convert::Into<wkt::Duration>,
16376 {
16377 self.wait_for_drain_duration = v.map(|x| x.into());
16378 self
16379 }
16380 }
16381
16382 impl wkt::message::Message for AutoscaledRolloutPolicy {
16383 fn typename() -> &'static str {
16384 "type.googleapis.com/google.container.v1.BlueGreenSettings.AutoscaledRolloutPolicy"
16385 }
16386 }
16387
16388 #[derive(Clone, Debug, PartialEq)]
16390 #[non_exhaustive]
16391 pub enum RolloutPolicy {
16392 StandardRolloutPolicy(
16394 std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
16395 ),
16396 AutoscaledRolloutPolicy(
16398 std::boxed::Box<crate::model::blue_green_settings::AutoscaledRolloutPolicy>,
16399 ),
16400 }
16401}
16402
16403#[derive(Clone, Default, PartialEq)]
16410#[non_exhaustive]
16411pub struct NodePool {
16412 pub name: std::string::String,
16414
16415 pub config: std::option::Option<crate::model::NodeConfig>,
16417
16418 pub initial_node_count: i32,
16424
16425 pub locations: std::vec::Vec<std::string::String>,
16436
16437 pub network_config: std::option::Option<crate::model::NodeNetworkConfig>,
16440
16441 pub self_link: std::string::String,
16443
16444 pub version: std::string::String,
16448
16449 pub instance_group_urls: std::vec::Vec<std::string::String>,
16455
16456 pub status: crate::model::node_pool::Status,
16458
16459 #[deprecated]
16463 pub status_message: std::string::String,
16464
16465 pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
16468
16469 pub management: std::option::Option<crate::model::NodeManagement>,
16471
16472 pub max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
16475
16476 pub conditions: std::vec::Vec<crate::model::StatusCondition>,
16478
16479 pub pod_ipv4_cidr_size: i32,
16481
16482 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
16484
16485 pub placement_policy: std::option::Option<crate::model::node_pool::PlacementPolicy>,
16487
16488 pub update_info: std::option::Option<crate::model::node_pool::UpdateInfo>,
16491
16492 pub etag: std::string::String,
16496
16497 pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
16499
16500 pub best_effort_provisioning: std::option::Option<crate::model::BestEffortProvisioning>,
16502
16503 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16504}
16505
16506impl NodePool {
16507 pub fn new() -> Self {
16508 std::default::Default::default()
16509 }
16510
16511 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16513 self.name = v.into();
16514 self
16515 }
16516
16517 pub fn set_config<T>(mut self, v: T) -> Self
16519 where
16520 T: std::convert::Into<crate::model::NodeConfig>,
16521 {
16522 self.config = std::option::Option::Some(v.into());
16523 self
16524 }
16525
16526 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
16528 where
16529 T: std::convert::Into<crate::model::NodeConfig>,
16530 {
16531 self.config = v.map(|x| x.into());
16532 self
16533 }
16534
16535 pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16537 self.initial_node_count = v.into();
16538 self
16539 }
16540
16541 pub fn set_locations<T, V>(mut self, v: T) -> Self
16543 where
16544 T: std::iter::IntoIterator<Item = V>,
16545 V: std::convert::Into<std::string::String>,
16546 {
16547 use std::iter::Iterator;
16548 self.locations = v.into_iter().map(|i| i.into()).collect();
16549 self
16550 }
16551
16552 pub fn set_network_config<T>(mut self, v: T) -> Self
16554 where
16555 T: std::convert::Into<crate::model::NodeNetworkConfig>,
16556 {
16557 self.network_config = std::option::Option::Some(v.into());
16558 self
16559 }
16560
16561 pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
16563 where
16564 T: std::convert::Into<crate::model::NodeNetworkConfig>,
16565 {
16566 self.network_config = v.map(|x| x.into());
16567 self
16568 }
16569
16570 pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16572 self.self_link = v.into();
16573 self
16574 }
16575
16576 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16578 self.version = v.into();
16579 self
16580 }
16581
16582 pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
16584 where
16585 T: std::iter::IntoIterator<Item = V>,
16586 V: std::convert::Into<std::string::String>,
16587 {
16588 use std::iter::Iterator;
16589 self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
16590 self
16591 }
16592
16593 pub fn set_status<T: std::convert::Into<crate::model::node_pool::Status>>(
16595 mut self,
16596 v: T,
16597 ) -> Self {
16598 self.status = v.into();
16599 self
16600 }
16601
16602 #[deprecated]
16604 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16605 self.status_message = v.into();
16606 self
16607 }
16608
16609 pub fn set_autoscaling<T>(mut self, v: T) -> Self
16611 where
16612 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
16613 {
16614 self.autoscaling = std::option::Option::Some(v.into());
16615 self
16616 }
16617
16618 pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
16620 where
16621 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
16622 {
16623 self.autoscaling = v.map(|x| x.into());
16624 self
16625 }
16626
16627 pub fn set_management<T>(mut self, v: T) -> Self
16629 where
16630 T: std::convert::Into<crate::model::NodeManagement>,
16631 {
16632 self.management = std::option::Option::Some(v.into());
16633 self
16634 }
16635
16636 pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
16638 where
16639 T: std::convert::Into<crate::model::NodeManagement>,
16640 {
16641 self.management = v.map(|x| x.into());
16642 self
16643 }
16644
16645 pub fn set_max_pods_constraint<T>(mut self, v: T) -> Self
16647 where
16648 T: std::convert::Into<crate::model::MaxPodsConstraint>,
16649 {
16650 self.max_pods_constraint = std::option::Option::Some(v.into());
16651 self
16652 }
16653
16654 pub fn set_or_clear_max_pods_constraint<T>(mut self, v: std::option::Option<T>) -> Self
16656 where
16657 T: std::convert::Into<crate::model::MaxPodsConstraint>,
16658 {
16659 self.max_pods_constraint = v.map(|x| x.into());
16660 self
16661 }
16662
16663 pub fn set_conditions<T, V>(mut self, v: T) -> Self
16665 where
16666 T: std::iter::IntoIterator<Item = V>,
16667 V: std::convert::Into<crate::model::StatusCondition>,
16668 {
16669 use std::iter::Iterator;
16670 self.conditions = v.into_iter().map(|i| i.into()).collect();
16671 self
16672 }
16673
16674 pub fn set_pod_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16676 self.pod_ipv4_cidr_size = v.into();
16677 self
16678 }
16679
16680 pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
16682 where
16683 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
16684 {
16685 self.upgrade_settings = std::option::Option::Some(v.into());
16686 self
16687 }
16688
16689 pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
16691 where
16692 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
16693 {
16694 self.upgrade_settings = v.map(|x| x.into());
16695 self
16696 }
16697
16698 pub fn set_placement_policy<T>(mut self, v: T) -> Self
16700 where
16701 T: std::convert::Into<crate::model::node_pool::PlacementPolicy>,
16702 {
16703 self.placement_policy = std::option::Option::Some(v.into());
16704 self
16705 }
16706
16707 pub fn set_or_clear_placement_policy<T>(mut self, v: std::option::Option<T>) -> Self
16709 where
16710 T: std::convert::Into<crate::model::node_pool::PlacementPolicy>,
16711 {
16712 self.placement_policy = v.map(|x| x.into());
16713 self
16714 }
16715
16716 pub fn set_update_info<T>(mut self, v: T) -> Self
16718 where
16719 T: std::convert::Into<crate::model::node_pool::UpdateInfo>,
16720 {
16721 self.update_info = std::option::Option::Some(v.into());
16722 self
16723 }
16724
16725 pub fn set_or_clear_update_info<T>(mut self, v: std::option::Option<T>) -> Self
16727 where
16728 T: std::convert::Into<crate::model::node_pool::UpdateInfo>,
16729 {
16730 self.update_info = v.map(|x| x.into());
16731 self
16732 }
16733
16734 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16736 self.etag = v.into();
16737 self
16738 }
16739
16740 pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
16742 where
16743 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
16744 {
16745 self.queued_provisioning = std::option::Option::Some(v.into());
16746 self
16747 }
16748
16749 pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
16751 where
16752 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
16753 {
16754 self.queued_provisioning = v.map(|x| x.into());
16755 self
16756 }
16757
16758 pub fn set_best_effort_provisioning<T>(mut self, v: T) -> Self
16760 where
16761 T: std::convert::Into<crate::model::BestEffortProvisioning>,
16762 {
16763 self.best_effort_provisioning = std::option::Option::Some(v.into());
16764 self
16765 }
16766
16767 pub fn set_or_clear_best_effort_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
16769 where
16770 T: std::convert::Into<crate::model::BestEffortProvisioning>,
16771 {
16772 self.best_effort_provisioning = v.map(|x| x.into());
16773 self
16774 }
16775}
16776
16777impl wkt::message::Message for NodePool {
16778 fn typename() -> &'static str {
16779 "type.googleapis.com/google.container.v1.NodePool"
16780 }
16781}
16782
16783pub mod node_pool {
16785 #[allow(unused_imports)]
16786 use super::*;
16787
16788 #[derive(Clone, Default, PartialEq)]
16837 #[non_exhaustive]
16838 pub struct UpgradeSettings {
16839 pub max_surge: i32,
16842
16843 pub max_unavailable: i32,
16847
16848 pub strategy: std::option::Option<crate::model::NodePoolUpdateStrategy>,
16850
16851 pub blue_green_settings: std::option::Option<crate::model::BlueGreenSettings>,
16853
16854 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16855 }
16856
16857 impl UpgradeSettings {
16858 pub fn new() -> Self {
16859 std::default::Default::default()
16860 }
16861
16862 pub fn set_max_surge<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16864 self.max_surge = v.into();
16865 self
16866 }
16867
16868 pub fn set_max_unavailable<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16870 self.max_unavailable = v.into();
16871 self
16872 }
16873
16874 pub fn set_strategy<T>(mut self, v: T) -> Self
16876 where
16877 T: std::convert::Into<crate::model::NodePoolUpdateStrategy>,
16878 {
16879 self.strategy = std::option::Option::Some(v.into());
16880 self
16881 }
16882
16883 pub fn set_or_clear_strategy<T>(mut self, v: std::option::Option<T>) -> Self
16885 where
16886 T: std::convert::Into<crate::model::NodePoolUpdateStrategy>,
16887 {
16888 self.strategy = v.map(|x| x.into());
16889 self
16890 }
16891
16892 pub fn set_blue_green_settings<T>(mut self, v: T) -> Self
16894 where
16895 T: std::convert::Into<crate::model::BlueGreenSettings>,
16896 {
16897 self.blue_green_settings = std::option::Option::Some(v.into());
16898 self
16899 }
16900
16901 pub fn set_or_clear_blue_green_settings<T>(mut self, v: std::option::Option<T>) -> Self
16903 where
16904 T: std::convert::Into<crate::model::BlueGreenSettings>,
16905 {
16906 self.blue_green_settings = v.map(|x| x.into());
16907 self
16908 }
16909 }
16910
16911 impl wkt::message::Message for UpgradeSettings {
16912 fn typename() -> &'static str {
16913 "type.googleapis.com/google.container.v1.NodePool.UpgradeSettings"
16914 }
16915 }
16916
16917 #[derive(Clone, Default, PartialEq)]
16920 #[non_exhaustive]
16921 pub struct UpdateInfo {
16922 pub blue_green_info:
16924 std::option::Option<crate::model::node_pool::update_info::BlueGreenInfo>,
16925
16926 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16927 }
16928
16929 impl UpdateInfo {
16930 pub fn new() -> Self {
16931 std::default::Default::default()
16932 }
16933
16934 pub fn set_blue_green_info<T>(mut self, v: T) -> Self
16936 where
16937 T: std::convert::Into<crate::model::node_pool::update_info::BlueGreenInfo>,
16938 {
16939 self.blue_green_info = std::option::Option::Some(v.into());
16940 self
16941 }
16942
16943 pub fn set_or_clear_blue_green_info<T>(mut self, v: std::option::Option<T>) -> Self
16945 where
16946 T: std::convert::Into<crate::model::node_pool::update_info::BlueGreenInfo>,
16947 {
16948 self.blue_green_info = v.map(|x| x.into());
16949 self
16950 }
16951 }
16952
16953 impl wkt::message::Message for UpdateInfo {
16954 fn typename() -> &'static str {
16955 "type.googleapis.com/google.container.v1.NodePool.UpdateInfo"
16956 }
16957 }
16958
16959 pub mod update_info {
16961 #[allow(unused_imports)]
16962 use super::*;
16963
16964 #[derive(Clone, Default, PartialEq)]
16966 #[non_exhaustive]
16967 pub struct BlueGreenInfo {
16968 pub phase: crate::model::node_pool::update_info::blue_green_info::Phase,
16970
16971 pub blue_instance_group_urls: std::vec::Vec<std::string::String>,
16975
16976 pub green_instance_group_urls: std::vec::Vec<std::string::String>,
16980
16981 pub blue_pool_deletion_start_time: std::string::String,
16984
16985 pub green_pool_version: std::string::String,
16987
16988 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16989 }
16990
16991 impl BlueGreenInfo {
16992 pub fn new() -> Self {
16993 std::default::Default::default()
16994 }
16995
16996 pub fn set_phase<
16998 T: std::convert::Into<crate::model::node_pool::update_info::blue_green_info::Phase>,
16999 >(
17000 mut self,
17001 v: T,
17002 ) -> Self {
17003 self.phase = v.into();
17004 self
17005 }
17006
17007 pub fn set_blue_instance_group_urls<T, V>(mut self, v: T) -> Self
17009 where
17010 T: std::iter::IntoIterator<Item = V>,
17011 V: std::convert::Into<std::string::String>,
17012 {
17013 use std::iter::Iterator;
17014 self.blue_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
17015 self
17016 }
17017
17018 pub fn set_green_instance_group_urls<T, V>(mut self, v: T) -> Self
17020 where
17021 T: std::iter::IntoIterator<Item = V>,
17022 V: std::convert::Into<std::string::String>,
17023 {
17024 use std::iter::Iterator;
17025 self.green_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
17026 self
17027 }
17028
17029 pub fn set_blue_pool_deletion_start_time<T: std::convert::Into<std::string::String>>(
17031 mut self,
17032 v: T,
17033 ) -> Self {
17034 self.blue_pool_deletion_start_time = v.into();
17035 self
17036 }
17037
17038 pub fn set_green_pool_version<T: std::convert::Into<std::string::String>>(
17040 mut self,
17041 v: T,
17042 ) -> Self {
17043 self.green_pool_version = v.into();
17044 self
17045 }
17046 }
17047
17048 impl wkt::message::Message for BlueGreenInfo {
17049 fn typename() -> &'static str {
17050 "type.googleapis.com/google.container.v1.NodePool.UpdateInfo.BlueGreenInfo"
17051 }
17052 }
17053
17054 pub mod blue_green_info {
17056 #[allow(unused_imports)]
17057 use super::*;
17058
17059 #[derive(Clone, Debug, PartialEq)]
17075 #[non_exhaustive]
17076 pub enum Phase {
17077 Unspecified,
17079 UpdateStarted,
17081 CreatingGreenPool,
17083 CordoningBluePool,
17085 DrainingBluePool,
17087 NodePoolSoaking,
17089 DeletingBluePool,
17091 RollbackStarted,
17093 UnknownValue(phase::UnknownValue),
17098 }
17099
17100 #[doc(hidden)]
17101 pub mod phase {
17102 #[allow(unused_imports)]
17103 use super::*;
17104 #[derive(Clone, Debug, PartialEq)]
17105 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17106 }
17107
17108 impl Phase {
17109 pub fn value(&self) -> std::option::Option<i32> {
17114 match self {
17115 Self::Unspecified => std::option::Option::Some(0),
17116 Self::UpdateStarted => std::option::Option::Some(1),
17117 Self::CreatingGreenPool => std::option::Option::Some(2),
17118 Self::CordoningBluePool => std::option::Option::Some(3),
17119 Self::DrainingBluePool => std::option::Option::Some(4),
17120 Self::NodePoolSoaking => std::option::Option::Some(5),
17121 Self::DeletingBluePool => std::option::Option::Some(6),
17122 Self::RollbackStarted => std::option::Option::Some(7),
17123 Self::UnknownValue(u) => u.0.value(),
17124 }
17125 }
17126
17127 pub fn name(&self) -> std::option::Option<&str> {
17132 match self {
17133 Self::Unspecified => std::option::Option::Some("PHASE_UNSPECIFIED"),
17134 Self::UpdateStarted => std::option::Option::Some("UPDATE_STARTED"),
17135 Self::CreatingGreenPool => std::option::Option::Some("CREATING_GREEN_POOL"),
17136 Self::CordoningBluePool => std::option::Option::Some("CORDONING_BLUE_POOL"),
17137 Self::DrainingBluePool => std::option::Option::Some("DRAINING_BLUE_POOL"),
17138 Self::NodePoolSoaking => std::option::Option::Some("NODE_POOL_SOAKING"),
17139 Self::DeletingBluePool => std::option::Option::Some("DELETING_BLUE_POOL"),
17140 Self::RollbackStarted => std::option::Option::Some("ROLLBACK_STARTED"),
17141 Self::UnknownValue(u) => u.0.name(),
17142 }
17143 }
17144 }
17145
17146 impl std::default::Default for Phase {
17147 fn default() -> Self {
17148 use std::convert::From;
17149 Self::from(0)
17150 }
17151 }
17152
17153 impl std::fmt::Display for Phase {
17154 fn fmt(
17155 &self,
17156 f: &mut std::fmt::Formatter<'_>,
17157 ) -> std::result::Result<(), std::fmt::Error> {
17158 wkt::internal::display_enum(f, self.name(), self.value())
17159 }
17160 }
17161
17162 impl std::convert::From<i32> for Phase {
17163 fn from(value: i32) -> Self {
17164 match value {
17165 0 => Self::Unspecified,
17166 1 => Self::UpdateStarted,
17167 2 => Self::CreatingGreenPool,
17168 3 => Self::CordoningBluePool,
17169 4 => Self::DrainingBluePool,
17170 5 => Self::NodePoolSoaking,
17171 6 => Self::DeletingBluePool,
17172 7 => Self::RollbackStarted,
17173 _ => Self::UnknownValue(phase::UnknownValue(
17174 wkt::internal::UnknownEnumValue::Integer(value),
17175 )),
17176 }
17177 }
17178 }
17179
17180 impl std::convert::From<&str> for Phase {
17181 fn from(value: &str) -> Self {
17182 use std::string::ToString;
17183 match value {
17184 "PHASE_UNSPECIFIED" => Self::Unspecified,
17185 "UPDATE_STARTED" => Self::UpdateStarted,
17186 "CREATING_GREEN_POOL" => Self::CreatingGreenPool,
17187 "CORDONING_BLUE_POOL" => Self::CordoningBluePool,
17188 "DRAINING_BLUE_POOL" => Self::DrainingBluePool,
17189 "NODE_POOL_SOAKING" => Self::NodePoolSoaking,
17190 "DELETING_BLUE_POOL" => Self::DeletingBluePool,
17191 "ROLLBACK_STARTED" => Self::RollbackStarted,
17192 _ => Self::UnknownValue(phase::UnknownValue(
17193 wkt::internal::UnknownEnumValue::String(value.to_string()),
17194 )),
17195 }
17196 }
17197 }
17198
17199 impl serde::ser::Serialize for Phase {
17200 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17201 where
17202 S: serde::Serializer,
17203 {
17204 match self {
17205 Self::Unspecified => serializer.serialize_i32(0),
17206 Self::UpdateStarted => serializer.serialize_i32(1),
17207 Self::CreatingGreenPool => serializer.serialize_i32(2),
17208 Self::CordoningBluePool => serializer.serialize_i32(3),
17209 Self::DrainingBluePool => serializer.serialize_i32(4),
17210 Self::NodePoolSoaking => serializer.serialize_i32(5),
17211 Self::DeletingBluePool => serializer.serialize_i32(6),
17212 Self::RollbackStarted => serializer.serialize_i32(7),
17213 Self::UnknownValue(u) => u.0.serialize(serializer),
17214 }
17215 }
17216 }
17217
17218 impl<'de> serde::de::Deserialize<'de> for Phase {
17219 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17220 where
17221 D: serde::Deserializer<'de>,
17222 {
17223 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Phase>::new(
17224 ".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase",
17225 ))
17226 }
17227 }
17228 }
17229 }
17230
17231 #[derive(Clone, Default, PartialEq)]
17233 #[non_exhaustive]
17234 pub struct PlacementPolicy {
17235 pub r#type: crate::model::node_pool::placement_policy::Type,
17237
17238 pub tpu_topology: std::string::String,
17241
17242 pub policy_name: std::string::String,
17246
17247 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17248 }
17249
17250 impl PlacementPolicy {
17251 pub fn new() -> Self {
17252 std::default::Default::default()
17253 }
17254
17255 pub fn set_type<T: std::convert::Into<crate::model::node_pool::placement_policy::Type>>(
17257 mut self,
17258 v: T,
17259 ) -> Self {
17260 self.r#type = v.into();
17261 self
17262 }
17263
17264 pub fn set_tpu_topology<T: std::convert::Into<std::string::String>>(
17266 mut self,
17267 v: T,
17268 ) -> Self {
17269 self.tpu_topology = v.into();
17270 self
17271 }
17272
17273 pub fn set_policy_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17275 self.policy_name = v.into();
17276 self
17277 }
17278 }
17279
17280 impl wkt::message::Message for PlacementPolicy {
17281 fn typename() -> &'static str {
17282 "type.googleapis.com/google.container.v1.NodePool.PlacementPolicy"
17283 }
17284 }
17285
17286 pub mod placement_policy {
17288 #[allow(unused_imports)]
17289 use super::*;
17290
17291 #[derive(Clone, Debug, PartialEq)]
17307 #[non_exhaustive]
17308 pub enum Type {
17309 Unspecified,
17312 Compact,
17315 UnknownValue(r#type::UnknownValue),
17320 }
17321
17322 #[doc(hidden)]
17323 pub mod r#type {
17324 #[allow(unused_imports)]
17325 use super::*;
17326 #[derive(Clone, Debug, PartialEq)]
17327 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17328 }
17329
17330 impl Type {
17331 pub fn value(&self) -> std::option::Option<i32> {
17336 match self {
17337 Self::Unspecified => std::option::Option::Some(0),
17338 Self::Compact => std::option::Option::Some(1),
17339 Self::UnknownValue(u) => u.0.value(),
17340 }
17341 }
17342
17343 pub fn name(&self) -> std::option::Option<&str> {
17348 match self {
17349 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
17350 Self::Compact => std::option::Option::Some("COMPACT"),
17351 Self::UnknownValue(u) => u.0.name(),
17352 }
17353 }
17354 }
17355
17356 impl std::default::Default for Type {
17357 fn default() -> Self {
17358 use std::convert::From;
17359 Self::from(0)
17360 }
17361 }
17362
17363 impl std::fmt::Display for Type {
17364 fn fmt(
17365 &self,
17366 f: &mut std::fmt::Formatter<'_>,
17367 ) -> std::result::Result<(), std::fmt::Error> {
17368 wkt::internal::display_enum(f, self.name(), self.value())
17369 }
17370 }
17371
17372 impl std::convert::From<i32> for Type {
17373 fn from(value: i32) -> Self {
17374 match value {
17375 0 => Self::Unspecified,
17376 1 => Self::Compact,
17377 _ => Self::UnknownValue(r#type::UnknownValue(
17378 wkt::internal::UnknownEnumValue::Integer(value),
17379 )),
17380 }
17381 }
17382 }
17383
17384 impl std::convert::From<&str> for Type {
17385 fn from(value: &str) -> Self {
17386 use std::string::ToString;
17387 match value {
17388 "TYPE_UNSPECIFIED" => Self::Unspecified,
17389 "COMPACT" => Self::Compact,
17390 _ => Self::UnknownValue(r#type::UnknownValue(
17391 wkt::internal::UnknownEnumValue::String(value.to_string()),
17392 )),
17393 }
17394 }
17395 }
17396
17397 impl serde::ser::Serialize for Type {
17398 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17399 where
17400 S: serde::Serializer,
17401 {
17402 match self {
17403 Self::Unspecified => serializer.serialize_i32(0),
17404 Self::Compact => serializer.serialize_i32(1),
17405 Self::UnknownValue(u) => u.0.serialize(serializer),
17406 }
17407 }
17408 }
17409
17410 impl<'de> serde::de::Deserialize<'de> for Type {
17411 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17412 where
17413 D: serde::Deserializer<'de>,
17414 {
17415 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
17416 ".google.container.v1.NodePool.PlacementPolicy.Type",
17417 ))
17418 }
17419 }
17420 }
17421
17422 #[derive(Clone, Default, PartialEq)]
17424 #[non_exhaustive]
17425 pub struct QueuedProvisioning {
17426 pub enabled: bool,
17430
17431 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17432 }
17433
17434 impl QueuedProvisioning {
17435 pub fn new() -> Self {
17436 std::default::Default::default()
17437 }
17438
17439 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17441 self.enabled = v.into();
17442 self
17443 }
17444 }
17445
17446 impl wkt::message::Message for QueuedProvisioning {
17447 fn typename() -> &'static str {
17448 "type.googleapis.com/google.container.v1.NodePool.QueuedProvisioning"
17449 }
17450 }
17451
17452 #[derive(Clone, Debug, PartialEq)]
17468 #[non_exhaustive]
17469 pub enum Status {
17470 Unspecified,
17472 Provisioning,
17474 Running,
17477 RunningWithError,
17482 Reconciling,
17486 Stopping,
17488 Error,
17491 UnknownValue(status::UnknownValue),
17496 }
17497
17498 #[doc(hidden)]
17499 pub mod status {
17500 #[allow(unused_imports)]
17501 use super::*;
17502 #[derive(Clone, Debug, PartialEq)]
17503 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17504 }
17505
17506 impl Status {
17507 pub fn value(&self) -> std::option::Option<i32> {
17512 match self {
17513 Self::Unspecified => std::option::Option::Some(0),
17514 Self::Provisioning => std::option::Option::Some(1),
17515 Self::Running => std::option::Option::Some(2),
17516 Self::RunningWithError => std::option::Option::Some(3),
17517 Self::Reconciling => std::option::Option::Some(4),
17518 Self::Stopping => std::option::Option::Some(5),
17519 Self::Error => std::option::Option::Some(6),
17520 Self::UnknownValue(u) => u.0.value(),
17521 }
17522 }
17523
17524 pub fn name(&self) -> std::option::Option<&str> {
17529 match self {
17530 Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
17531 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
17532 Self::Running => std::option::Option::Some("RUNNING"),
17533 Self::RunningWithError => std::option::Option::Some("RUNNING_WITH_ERROR"),
17534 Self::Reconciling => std::option::Option::Some("RECONCILING"),
17535 Self::Stopping => std::option::Option::Some("STOPPING"),
17536 Self::Error => std::option::Option::Some("ERROR"),
17537 Self::UnknownValue(u) => u.0.name(),
17538 }
17539 }
17540 }
17541
17542 impl std::default::Default for Status {
17543 fn default() -> Self {
17544 use std::convert::From;
17545 Self::from(0)
17546 }
17547 }
17548
17549 impl std::fmt::Display for Status {
17550 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17551 wkt::internal::display_enum(f, self.name(), self.value())
17552 }
17553 }
17554
17555 impl std::convert::From<i32> for Status {
17556 fn from(value: i32) -> Self {
17557 match value {
17558 0 => Self::Unspecified,
17559 1 => Self::Provisioning,
17560 2 => Self::Running,
17561 3 => Self::RunningWithError,
17562 4 => Self::Reconciling,
17563 5 => Self::Stopping,
17564 6 => Self::Error,
17565 _ => Self::UnknownValue(status::UnknownValue(
17566 wkt::internal::UnknownEnumValue::Integer(value),
17567 )),
17568 }
17569 }
17570 }
17571
17572 impl std::convert::From<&str> for Status {
17573 fn from(value: &str) -> Self {
17574 use std::string::ToString;
17575 match value {
17576 "STATUS_UNSPECIFIED" => Self::Unspecified,
17577 "PROVISIONING" => Self::Provisioning,
17578 "RUNNING" => Self::Running,
17579 "RUNNING_WITH_ERROR" => Self::RunningWithError,
17580 "RECONCILING" => Self::Reconciling,
17581 "STOPPING" => Self::Stopping,
17582 "ERROR" => Self::Error,
17583 _ => Self::UnknownValue(status::UnknownValue(
17584 wkt::internal::UnknownEnumValue::String(value.to_string()),
17585 )),
17586 }
17587 }
17588 }
17589
17590 impl serde::ser::Serialize for Status {
17591 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17592 where
17593 S: serde::Serializer,
17594 {
17595 match self {
17596 Self::Unspecified => serializer.serialize_i32(0),
17597 Self::Provisioning => serializer.serialize_i32(1),
17598 Self::Running => serializer.serialize_i32(2),
17599 Self::RunningWithError => serializer.serialize_i32(3),
17600 Self::Reconciling => serializer.serialize_i32(4),
17601 Self::Stopping => serializer.serialize_i32(5),
17602 Self::Error => serializer.serialize_i32(6),
17603 Self::UnknownValue(u) => u.0.serialize(serializer),
17604 }
17605 }
17606 }
17607
17608 impl<'de> serde::de::Deserialize<'de> for Status {
17609 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17610 where
17611 D: serde::Deserializer<'de>,
17612 {
17613 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
17614 ".google.container.v1.NodePool.Status",
17615 ))
17616 }
17617 }
17618}
17619
17620#[derive(Clone, Default, PartialEq)]
17623#[non_exhaustive]
17624pub struct NodeManagement {
17625 pub auto_upgrade: bool,
17629
17630 pub auto_repair: bool,
17635
17636 pub upgrade_options: std::option::Option<crate::model::AutoUpgradeOptions>,
17638
17639 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17640}
17641
17642impl NodeManagement {
17643 pub fn new() -> Self {
17644 std::default::Default::default()
17645 }
17646
17647 pub fn set_auto_upgrade<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17649 self.auto_upgrade = v.into();
17650 self
17651 }
17652
17653 pub fn set_auto_repair<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17655 self.auto_repair = v.into();
17656 self
17657 }
17658
17659 pub fn set_upgrade_options<T>(mut self, v: T) -> Self
17661 where
17662 T: std::convert::Into<crate::model::AutoUpgradeOptions>,
17663 {
17664 self.upgrade_options = std::option::Option::Some(v.into());
17665 self
17666 }
17667
17668 pub fn set_or_clear_upgrade_options<T>(mut self, v: std::option::Option<T>) -> Self
17670 where
17671 T: std::convert::Into<crate::model::AutoUpgradeOptions>,
17672 {
17673 self.upgrade_options = v.map(|x| x.into());
17674 self
17675 }
17676}
17677
17678impl wkt::message::Message for NodeManagement {
17679 fn typename() -> &'static str {
17680 "type.googleapis.com/google.container.v1.NodeManagement"
17681 }
17682}
17683
17684#[derive(Clone, Default, PartialEq)]
17686#[non_exhaustive]
17687pub struct BestEffortProvisioning {
17688 pub enabled: bool,
17692
17693 pub min_provision_nodes: i32,
17697
17698 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17699}
17700
17701impl BestEffortProvisioning {
17702 pub fn new() -> Self {
17703 std::default::Default::default()
17704 }
17705
17706 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17708 self.enabled = v.into();
17709 self
17710 }
17711
17712 pub fn set_min_provision_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17714 self.min_provision_nodes = v.into();
17715 self
17716 }
17717}
17718
17719impl wkt::message::Message for BestEffortProvisioning {
17720 fn typename() -> &'static str {
17721 "type.googleapis.com/google.container.v1.BestEffortProvisioning"
17722 }
17723}
17724
17725#[derive(Clone, Default, PartialEq)]
17728#[non_exhaustive]
17729pub struct AutoUpgradeOptions {
17730 pub auto_upgrade_start_time: std::string::String,
17734
17735 pub description: std::string::String,
17738
17739 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17740}
17741
17742impl AutoUpgradeOptions {
17743 pub fn new() -> Self {
17744 std::default::Default::default()
17745 }
17746
17747 pub fn set_auto_upgrade_start_time<T: std::convert::Into<std::string::String>>(
17749 mut self,
17750 v: T,
17751 ) -> Self {
17752 self.auto_upgrade_start_time = v.into();
17753 self
17754 }
17755
17756 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17758 self.description = v.into();
17759 self
17760 }
17761}
17762
17763impl wkt::message::Message for AutoUpgradeOptions {
17764 fn typename() -> &'static str {
17765 "type.googleapis.com/google.container.v1.AutoUpgradeOptions"
17766 }
17767}
17768
17769#[derive(Clone, Default, PartialEq)]
17771#[non_exhaustive]
17772pub struct MaintenancePolicy {
17773 pub window: std::option::Option<crate::model::MaintenanceWindow>,
17775
17776 pub resource_version: std::string::String,
17782
17783 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17784}
17785
17786impl MaintenancePolicy {
17787 pub fn new() -> Self {
17788 std::default::Default::default()
17789 }
17790
17791 pub fn set_window<T>(mut self, v: T) -> Self
17793 where
17794 T: std::convert::Into<crate::model::MaintenanceWindow>,
17795 {
17796 self.window = std::option::Option::Some(v.into());
17797 self
17798 }
17799
17800 pub fn set_or_clear_window<T>(mut self, v: std::option::Option<T>) -> Self
17802 where
17803 T: std::convert::Into<crate::model::MaintenanceWindow>,
17804 {
17805 self.window = v.map(|x| x.into());
17806 self
17807 }
17808
17809 pub fn set_resource_version<T: std::convert::Into<std::string::String>>(
17811 mut self,
17812 v: T,
17813 ) -> Self {
17814 self.resource_version = v.into();
17815 self
17816 }
17817}
17818
17819impl wkt::message::Message for MaintenancePolicy {
17820 fn typename() -> &'static str {
17821 "type.googleapis.com/google.container.v1.MaintenancePolicy"
17822 }
17823}
17824
17825#[derive(Clone, Default, PartialEq)]
17827#[non_exhaustive]
17828pub struct MaintenanceWindow {
17829 pub maintenance_exclusions:
17832 std::collections::HashMap<std::string::String, crate::model::TimeWindow>,
17833
17834 pub policy: std::option::Option<crate::model::maintenance_window::Policy>,
17835
17836 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17837}
17838
17839impl MaintenanceWindow {
17840 pub fn new() -> Self {
17841 std::default::Default::default()
17842 }
17843
17844 pub fn set_maintenance_exclusions<T, K, V>(mut self, v: T) -> Self
17846 where
17847 T: std::iter::IntoIterator<Item = (K, V)>,
17848 K: std::convert::Into<std::string::String>,
17849 V: std::convert::Into<crate::model::TimeWindow>,
17850 {
17851 use std::iter::Iterator;
17852 self.maintenance_exclusions = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17853 self
17854 }
17855
17856 pub fn set_policy<
17861 T: std::convert::Into<std::option::Option<crate::model::maintenance_window::Policy>>,
17862 >(
17863 mut self,
17864 v: T,
17865 ) -> Self {
17866 self.policy = v.into();
17867 self
17868 }
17869
17870 pub fn daily_maintenance_window(
17874 &self,
17875 ) -> std::option::Option<&std::boxed::Box<crate::model::DailyMaintenanceWindow>> {
17876 #[allow(unreachable_patterns)]
17877 self.policy.as_ref().and_then(|v| match v {
17878 crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v) => {
17879 std::option::Option::Some(v)
17880 }
17881 _ => std::option::Option::None,
17882 })
17883 }
17884
17885 pub fn set_daily_maintenance_window<
17891 T: std::convert::Into<std::boxed::Box<crate::model::DailyMaintenanceWindow>>,
17892 >(
17893 mut self,
17894 v: T,
17895 ) -> Self {
17896 self.policy = std::option::Option::Some(
17897 crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v.into()),
17898 );
17899 self
17900 }
17901
17902 pub fn recurring_window(
17906 &self,
17907 ) -> std::option::Option<&std::boxed::Box<crate::model::RecurringTimeWindow>> {
17908 #[allow(unreachable_patterns)]
17909 self.policy.as_ref().and_then(|v| match v {
17910 crate::model::maintenance_window::Policy::RecurringWindow(v) => {
17911 std::option::Option::Some(v)
17912 }
17913 _ => std::option::Option::None,
17914 })
17915 }
17916
17917 pub fn set_recurring_window<
17923 T: std::convert::Into<std::boxed::Box<crate::model::RecurringTimeWindow>>,
17924 >(
17925 mut self,
17926 v: T,
17927 ) -> Self {
17928 self.policy = std::option::Option::Some(
17929 crate::model::maintenance_window::Policy::RecurringWindow(v.into()),
17930 );
17931 self
17932 }
17933}
17934
17935impl wkt::message::Message for MaintenanceWindow {
17936 fn typename() -> &'static str {
17937 "type.googleapis.com/google.container.v1.MaintenanceWindow"
17938 }
17939}
17940
17941pub mod maintenance_window {
17943 #[allow(unused_imports)]
17944 use super::*;
17945
17946 #[derive(Clone, Debug, PartialEq)]
17947 #[non_exhaustive]
17948 pub enum Policy {
17949 DailyMaintenanceWindow(std::boxed::Box<crate::model::DailyMaintenanceWindow>),
17951 RecurringWindow(std::boxed::Box<crate::model::RecurringTimeWindow>),
17955 }
17956}
17957
17958#[derive(Clone, Default, PartialEq)]
17960#[non_exhaustive]
17961pub struct TimeWindow {
17962 pub start_time: std::option::Option<wkt::Timestamp>,
17964
17965 pub end_time: std::option::Option<wkt::Timestamp>,
17968
17969 pub options: std::option::Option<crate::model::time_window::Options>,
17970
17971 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17972}
17973
17974impl TimeWindow {
17975 pub fn new() -> Self {
17976 std::default::Default::default()
17977 }
17978
17979 pub fn set_start_time<T>(mut self, v: T) -> Self
17981 where
17982 T: std::convert::Into<wkt::Timestamp>,
17983 {
17984 self.start_time = std::option::Option::Some(v.into());
17985 self
17986 }
17987
17988 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
17990 where
17991 T: std::convert::Into<wkt::Timestamp>,
17992 {
17993 self.start_time = v.map(|x| x.into());
17994 self
17995 }
17996
17997 pub fn set_end_time<T>(mut self, v: T) -> Self
17999 where
18000 T: std::convert::Into<wkt::Timestamp>,
18001 {
18002 self.end_time = std::option::Option::Some(v.into());
18003 self
18004 }
18005
18006 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
18008 where
18009 T: std::convert::Into<wkt::Timestamp>,
18010 {
18011 self.end_time = v.map(|x| x.into());
18012 self
18013 }
18014
18015 pub fn set_options<
18020 T: std::convert::Into<std::option::Option<crate::model::time_window::Options>>,
18021 >(
18022 mut self,
18023 v: T,
18024 ) -> Self {
18025 self.options = v.into();
18026 self
18027 }
18028
18029 pub fn maintenance_exclusion_options(
18033 &self,
18034 ) -> std::option::Option<&std::boxed::Box<crate::model::MaintenanceExclusionOptions>> {
18035 #[allow(unreachable_patterns)]
18036 self.options.as_ref().and_then(|v| match v {
18037 crate::model::time_window::Options::MaintenanceExclusionOptions(v) => {
18038 std::option::Option::Some(v)
18039 }
18040 _ => std::option::Option::None,
18041 })
18042 }
18043
18044 pub fn set_maintenance_exclusion_options<
18050 T: std::convert::Into<std::boxed::Box<crate::model::MaintenanceExclusionOptions>>,
18051 >(
18052 mut self,
18053 v: T,
18054 ) -> Self {
18055 self.options = std::option::Option::Some(
18056 crate::model::time_window::Options::MaintenanceExclusionOptions(v.into()),
18057 );
18058 self
18059 }
18060}
18061
18062impl wkt::message::Message for TimeWindow {
18063 fn typename() -> &'static str {
18064 "type.googleapis.com/google.container.v1.TimeWindow"
18065 }
18066}
18067
18068pub mod time_window {
18070 #[allow(unused_imports)]
18071 use super::*;
18072
18073 #[derive(Clone, Debug, PartialEq)]
18074 #[non_exhaustive]
18075 pub enum Options {
18076 MaintenanceExclusionOptions(std::boxed::Box<crate::model::MaintenanceExclusionOptions>),
18079 }
18080}
18081
18082#[derive(Clone, Default, PartialEq)]
18084#[non_exhaustive]
18085pub struct MaintenanceExclusionOptions {
18086 pub scope: crate::model::maintenance_exclusion_options::Scope,
18089
18090 pub end_time_behavior: crate::model::maintenance_exclusion_options::EndTimeBehavior,
18092
18093 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18094}
18095
18096impl MaintenanceExclusionOptions {
18097 pub fn new() -> Self {
18098 std::default::Default::default()
18099 }
18100
18101 pub fn set_scope<T: std::convert::Into<crate::model::maintenance_exclusion_options::Scope>>(
18103 mut self,
18104 v: T,
18105 ) -> Self {
18106 self.scope = v.into();
18107 self
18108 }
18109
18110 pub fn set_end_time_behavior<
18112 T: std::convert::Into<crate::model::maintenance_exclusion_options::EndTimeBehavior>,
18113 >(
18114 mut self,
18115 v: T,
18116 ) -> Self {
18117 self.end_time_behavior = v.into();
18118 self
18119 }
18120}
18121
18122impl wkt::message::Message for MaintenanceExclusionOptions {
18123 fn typename() -> &'static str {
18124 "type.googleapis.com/google.container.v1.MaintenanceExclusionOptions"
18125 }
18126}
18127
18128pub mod maintenance_exclusion_options {
18130 #[allow(unused_imports)]
18131 use super::*;
18132
18133 #[derive(Clone, Debug, PartialEq)]
18149 #[non_exhaustive]
18150 pub enum Scope {
18151 NoUpgrades,
18155 NoMinorUpgrades,
18158 NoMinorOrNodeUpgrades,
18162 UnknownValue(scope::UnknownValue),
18167 }
18168
18169 #[doc(hidden)]
18170 pub mod scope {
18171 #[allow(unused_imports)]
18172 use super::*;
18173 #[derive(Clone, Debug, PartialEq)]
18174 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18175 }
18176
18177 impl Scope {
18178 pub fn value(&self) -> std::option::Option<i32> {
18183 match self {
18184 Self::NoUpgrades => std::option::Option::Some(0),
18185 Self::NoMinorUpgrades => std::option::Option::Some(1),
18186 Self::NoMinorOrNodeUpgrades => std::option::Option::Some(2),
18187 Self::UnknownValue(u) => u.0.value(),
18188 }
18189 }
18190
18191 pub fn name(&self) -> std::option::Option<&str> {
18196 match self {
18197 Self::NoUpgrades => std::option::Option::Some("NO_UPGRADES"),
18198 Self::NoMinorUpgrades => std::option::Option::Some("NO_MINOR_UPGRADES"),
18199 Self::NoMinorOrNodeUpgrades => {
18200 std::option::Option::Some("NO_MINOR_OR_NODE_UPGRADES")
18201 }
18202 Self::UnknownValue(u) => u.0.name(),
18203 }
18204 }
18205 }
18206
18207 impl std::default::Default for Scope {
18208 fn default() -> Self {
18209 use std::convert::From;
18210 Self::from(0)
18211 }
18212 }
18213
18214 impl std::fmt::Display for Scope {
18215 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18216 wkt::internal::display_enum(f, self.name(), self.value())
18217 }
18218 }
18219
18220 impl std::convert::From<i32> for Scope {
18221 fn from(value: i32) -> Self {
18222 match value {
18223 0 => Self::NoUpgrades,
18224 1 => Self::NoMinorUpgrades,
18225 2 => Self::NoMinorOrNodeUpgrades,
18226 _ => Self::UnknownValue(scope::UnknownValue(
18227 wkt::internal::UnknownEnumValue::Integer(value),
18228 )),
18229 }
18230 }
18231 }
18232
18233 impl std::convert::From<&str> for Scope {
18234 fn from(value: &str) -> Self {
18235 use std::string::ToString;
18236 match value {
18237 "NO_UPGRADES" => Self::NoUpgrades,
18238 "NO_MINOR_UPGRADES" => Self::NoMinorUpgrades,
18239 "NO_MINOR_OR_NODE_UPGRADES" => Self::NoMinorOrNodeUpgrades,
18240 _ => Self::UnknownValue(scope::UnknownValue(
18241 wkt::internal::UnknownEnumValue::String(value.to_string()),
18242 )),
18243 }
18244 }
18245 }
18246
18247 impl serde::ser::Serialize for Scope {
18248 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18249 where
18250 S: serde::Serializer,
18251 {
18252 match self {
18253 Self::NoUpgrades => serializer.serialize_i32(0),
18254 Self::NoMinorUpgrades => serializer.serialize_i32(1),
18255 Self::NoMinorOrNodeUpgrades => serializer.serialize_i32(2),
18256 Self::UnknownValue(u) => u.0.serialize(serializer),
18257 }
18258 }
18259 }
18260
18261 impl<'de> serde::de::Deserialize<'de> for Scope {
18262 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18263 where
18264 D: serde::Deserializer<'de>,
18265 {
18266 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
18267 ".google.container.v1.MaintenanceExclusionOptions.Scope",
18268 ))
18269 }
18270 }
18271
18272 #[derive(Clone, Debug, PartialEq)]
18288 #[non_exhaustive]
18289 pub enum EndTimeBehavior {
18290 Unspecified,
18293 UntilEndOfSupport,
18296 UnknownValue(end_time_behavior::UnknownValue),
18301 }
18302
18303 #[doc(hidden)]
18304 pub mod end_time_behavior {
18305 #[allow(unused_imports)]
18306 use super::*;
18307 #[derive(Clone, Debug, PartialEq)]
18308 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18309 }
18310
18311 impl EndTimeBehavior {
18312 pub fn value(&self) -> std::option::Option<i32> {
18317 match self {
18318 Self::Unspecified => std::option::Option::Some(0),
18319 Self::UntilEndOfSupport => std::option::Option::Some(1),
18320 Self::UnknownValue(u) => u.0.value(),
18321 }
18322 }
18323
18324 pub fn name(&self) -> std::option::Option<&str> {
18329 match self {
18330 Self::Unspecified => std::option::Option::Some("END_TIME_BEHAVIOR_UNSPECIFIED"),
18331 Self::UntilEndOfSupport => std::option::Option::Some("UNTIL_END_OF_SUPPORT"),
18332 Self::UnknownValue(u) => u.0.name(),
18333 }
18334 }
18335 }
18336
18337 impl std::default::Default for EndTimeBehavior {
18338 fn default() -> Self {
18339 use std::convert::From;
18340 Self::from(0)
18341 }
18342 }
18343
18344 impl std::fmt::Display for EndTimeBehavior {
18345 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18346 wkt::internal::display_enum(f, self.name(), self.value())
18347 }
18348 }
18349
18350 impl std::convert::From<i32> for EndTimeBehavior {
18351 fn from(value: i32) -> Self {
18352 match value {
18353 0 => Self::Unspecified,
18354 1 => Self::UntilEndOfSupport,
18355 _ => Self::UnknownValue(end_time_behavior::UnknownValue(
18356 wkt::internal::UnknownEnumValue::Integer(value),
18357 )),
18358 }
18359 }
18360 }
18361
18362 impl std::convert::From<&str> for EndTimeBehavior {
18363 fn from(value: &str) -> Self {
18364 use std::string::ToString;
18365 match value {
18366 "END_TIME_BEHAVIOR_UNSPECIFIED" => Self::Unspecified,
18367 "UNTIL_END_OF_SUPPORT" => Self::UntilEndOfSupport,
18368 _ => Self::UnknownValue(end_time_behavior::UnknownValue(
18369 wkt::internal::UnknownEnumValue::String(value.to_string()),
18370 )),
18371 }
18372 }
18373 }
18374
18375 impl serde::ser::Serialize for EndTimeBehavior {
18376 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18377 where
18378 S: serde::Serializer,
18379 {
18380 match self {
18381 Self::Unspecified => serializer.serialize_i32(0),
18382 Self::UntilEndOfSupport => serializer.serialize_i32(1),
18383 Self::UnknownValue(u) => u.0.serialize(serializer),
18384 }
18385 }
18386 }
18387
18388 impl<'de> serde::de::Deserialize<'de> for EndTimeBehavior {
18389 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18390 where
18391 D: serde::Deserializer<'de>,
18392 {
18393 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EndTimeBehavior>::new(
18394 ".google.container.v1.MaintenanceExclusionOptions.EndTimeBehavior",
18395 ))
18396 }
18397 }
18398}
18399
18400#[derive(Clone, Default, PartialEq)]
18402#[non_exhaustive]
18403pub struct RecurringTimeWindow {
18404 pub window: std::option::Option<crate::model::TimeWindow>,
18406
18407 pub recurrence: std::string::String,
18442
18443 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18444}
18445
18446impl RecurringTimeWindow {
18447 pub fn new() -> Self {
18448 std::default::Default::default()
18449 }
18450
18451 pub fn set_window<T>(mut self, v: T) -> Self
18453 where
18454 T: std::convert::Into<crate::model::TimeWindow>,
18455 {
18456 self.window = std::option::Option::Some(v.into());
18457 self
18458 }
18459
18460 pub fn set_or_clear_window<T>(mut self, v: std::option::Option<T>) -> Self
18462 where
18463 T: std::convert::Into<crate::model::TimeWindow>,
18464 {
18465 self.window = v.map(|x| x.into());
18466 self
18467 }
18468
18469 pub fn set_recurrence<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18471 self.recurrence = v.into();
18472 self
18473 }
18474}
18475
18476impl wkt::message::Message for RecurringTimeWindow {
18477 fn typename() -> &'static str {
18478 "type.googleapis.com/google.container.v1.RecurringTimeWindow"
18479 }
18480}
18481
18482#[derive(Clone, Default, PartialEq)]
18484#[non_exhaustive]
18485pub struct DailyMaintenanceWindow {
18486 pub start_time: std::string::String,
18490
18491 pub duration: std::string::String,
18496
18497 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18498}
18499
18500impl DailyMaintenanceWindow {
18501 pub fn new() -> Self {
18502 std::default::Default::default()
18503 }
18504
18505 pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18507 self.start_time = v.into();
18508 self
18509 }
18510
18511 pub fn set_duration<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18513 self.duration = v.into();
18514 self
18515 }
18516}
18517
18518impl wkt::message::Message for DailyMaintenanceWindow {
18519 fn typename() -> &'static str {
18520 "type.googleapis.com/google.container.v1.DailyMaintenanceWindow"
18521 }
18522}
18523
18524#[derive(Clone, Default, PartialEq)]
18527#[non_exhaustive]
18528pub struct SetNodePoolManagementRequest {
18529 #[deprecated]
18533 pub project_id: std::string::String,
18534
18535 #[deprecated]
18540 pub zone: std::string::String,
18541
18542 #[deprecated]
18545 pub cluster_id: std::string::String,
18546
18547 #[deprecated]
18550 pub node_pool_id: std::string::String,
18551
18552 pub management: std::option::Option<crate::model::NodeManagement>,
18554
18555 pub name: std::string::String,
18559
18560 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18561}
18562
18563impl SetNodePoolManagementRequest {
18564 pub fn new() -> Self {
18565 std::default::Default::default()
18566 }
18567
18568 #[deprecated]
18570 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18571 self.project_id = v.into();
18572 self
18573 }
18574
18575 #[deprecated]
18577 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18578 self.zone = v.into();
18579 self
18580 }
18581
18582 #[deprecated]
18584 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18585 self.cluster_id = v.into();
18586 self
18587 }
18588
18589 #[deprecated]
18591 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18592 self.node_pool_id = v.into();
18593 self
18594 }
18595
18596 pub fn set_management<T>(mut self, v: T) -> Self
18598 where
18599 T: std::convert::Into<crate::model::NodeManagement>,
18600 {
18601 self.management = std::option::Option::Some(v.into());
18602 self
18603 }
18604
18605 pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
18607 where
18608 T: std::convert::Into<crate::model::NodeManagement>,
18609 {
18610 self.management = v.map(|x| x.into());
18611 self
18612 }
18613
18614 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18616 self.name = v.into();
18617 self
18618 }
18619}
18620
18621impl wkt::message::Message for SetNodePoolManagementRequest {
18622 fn typename() -> &'static str {
18623 "type.googleapis.com/google.container.v1.SetNodePoolManagementRequest"
18624 }
18625}
18626
18627#[derive(Clone, Default, PartialEq)]
18629#[non_exhaustive]
18630pub struct SetNodePoolSizeRequest {
18631 #[deprecated]
18635 pub project_id: std::string::String,
18636
18637 #[deprecated]
18642 pub zone: std::string::String,
18643
18644 #[deprecated]
18647 pub cluster_id: std::string::String,
18648
18649 #[deprecated]
18652 pub node_pool_id: std::string::String,
18653
18654 pub node_count: i32,
18656
18657 pub name: std::string::String,
18661
18662 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18663}
18664
18665impl SetNodePoolSizeRequest {
18666 pub fn new() -> Self {
18667 std::default::Default::default()
18668 }
18669
18670 #[deprecated]
18672 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18673 self.project_id = v.into();
18674 self
18675 }
18676
18677 #[deprecated]
18679 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18680 self.zone = v.into();
18681 self
18682 }
18683
18684 #[deprecated]
18686 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18687 self.cluster_id = v.into();
18688 self
18689 }
18690
18691 #[deprecated]
18693 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18694 self.node_pool_id = v.into();
18695 self
18696 }
18697
18698 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18700 self.node_count = v.into();
18701 self
18702 }
18703
18704 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18706 self.name = v.into();
18707 self
18708 }
18709}
18710
18711impl wkt::message::Message for SetNodePoolSizeRequest {
18712 fn typename() -> &'static str {
18713 "type.googleapis.com/google.container.v1.SetNodePoolSizeRequest"
18714 }
18715}
18716
18717#[derive(Clone, Default, PartialEq)]
18720#[non_exhaustive]
18721pub struct CompleteNodePoolUpgradeRequest {
18722 pub name: std::string::String,
18726
18727 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18728}
18729
18730impl CompleteNodePoolUpgradeRequest {
18731 pub fn new() -> Self {
18732 std::default::Default::default()
18733 }
18734
18735 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18737 self.name = v.into();
18738 self
18739 }
18740}
18741
18742impl wkt::message::Message for CompleteNodePoolUpgradeRequest {
18743 fn typename() -> &'static str {
18744 "type.googleapis.com/google.container.v1.CompleteNodePoolUpgradeRequest"
18745 }
18746}
18747
18748#[derive(Clone, Default, PartialEq)]
18752#[non_exhaustive]
18753pub struct RollbackNodePoolUpgradeRequest {
18754 #[deprecated]
18758 pub project_id: std::string::String,
18759
18760 #[deprecated]
18765 pub zone: std::string::String,
18766
18767 #[deprecated]
18770 pub cluster_id: std::string::String,
18771
18772 #[deprecated]
18775 pub node_pool_id: std::string::String,
18776
18777 pub name: std::string::String,
18781
18782 pub respect_pdb: bool,
18785
18786 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18787}
18788
18789impl RollbackNodePoolUpgradeRequest {
18790 pub fn new() -> Self {
18791 std::default::Default::default()
18792 }
18793
18794 #[deprecated]
18796 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18797 self.project_id = v.into();
18798 self
18799 }
18800
18801 #[deprecated]
18803 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18804 self.zone = v.into();
18805 self
18806 }
18807
18808 #[deprecated]
18810 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18811 self.cluster_id = v.into();
18812 self
18813 }
18814
18815 #[deprecated]
18817 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18818 self.node_pool_id = v.into();
18819 self
18820 }
18821
18822 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18824 self.name = v.into();
18825 self
18826 }
18827
18828 pub fn set_respect_pdb<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18830 self.respect_pdb = v.into();
18831 self
18832 }
18833}
18834
18835impl wkt::message::Message for RollbackNodePoolUpgradeRequest {
18836 fn typename() -> &'static str {
18837 "type.googleapis.com/google.container.v1.RollbackNodePoolUpgradeRequest"
18838 }
18839}
18840
18841#[derive(Clone, Default, PartialEq)]
18843#[non_exhaustive]
18844pub struct ListNodePoolsResponse {
18845 pub node_pools: std::vec::Vec<crate::model::NodePool>,
18847
18848 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18849}
18850
18851impl ListNodePoolsResponse {
18852 pub fn new() -> Self {
18853 std::default::Default::default()
18854 }
18855
18856 pub fn set_node_pools<T, V>(mut self, v: T) -> Self
18858 where
18859 T: std::iter::IntoIterator<Item = V>,
18860 V: std::convert::Into<crate::model::NodePool>,
18861 {
18862 use std::iter::Iterator;
18863 self.node_pools = v.into_iter().map(|i| i.into()).collect();
18864 self
18865 }
18866}
18867
18868impl wkt::message::Message for ListNodePoolsResponse {
18869 fn typename() -> &'static str {
18870 "type.googleapis.com/google.container.v1.ListNodePoolsResponse"
18871 }
18872}
18873
18874#[derive(Clone, Default, PartialEq)]
18879#[non_exhaustive]
18880pub struct ClusterAutoscaling {
18881 pub enable_node_autoprovisioning: bool,
18883
18884 pub resource_limits: std::vec::Vec<crate::model::ResourceLimit>,
18887
18888 pub autoscaling_profile: crate::model::cluster_autoscaling::AutoscalingProfile,
18890
18891 pub autoprovisioning_node_pool_defaults:
18894 std::option::Option<crate::model::AutoprovisioningNodePoolDefaults>,
18895
18896 pub autoprovisioning_locations: std::vec::Vec<std::string::String>,
18900
18901 pub default_compute_class_config: std::option::Option<crate::model::DefaultComputeClassConfig>,
18903
18904 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18905}
18906
18907impl ClusterAutoscaling {
18908 pub fn new() -> Self {
18909 std::default::Default::default()
18910 }
18911
18912 pub fn set_enable_node_autoprovisioning<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18914 self.enable_node_autoprovisioning = v.into();
18915 self
18916 }
18917
18918 pub fn set_resource_limits<T, V>(mut self, v: T) -> Self
18920 where
18921 T: std::iter::IntoIterator<Item = V>,
18922 V: std::convert::Into<crate::model::ResourceLimit>,
18923 {
18924 use std::iter::Iterator;
18925 self.resource_limits = v.into_iter().map(|i| i.into()).collect();
18926 self
18927 }
18928
18929 pub fn set_autoscaling_profile<
18931 T: std::convert::Into<crate::model::cluster_autoscaling::AutoscalingProfile>,
18932 >(
18933 mut self,
18934 v: T,
18935 ) -> Self {
18936 self.autoscaling_profile = v.into();
18937 self
18938 }
18939
18940 pub fn set_autoprovisioning_node_pool_defaults<T>(mut self, v: T) -> Self
18942 where
18943 T: std::convert::Into<crate::model::AutoprovisioningNodePoolDefaults>,
18944 {
18945 self.autoprovisioning_node_pool_defaults = std::option::Option::Some(v.into());
18946 self
18947 }
18948
18949 pub fn set_or_clear_autoprovisioning_node_pool_defaults<T>(
18951 mut self,
18952 v: std::option::Option<T>,
18953 ) -> Self
18954 where
18955 T: std::convert::Into<crate::model::AutoprovisioningNodePoolDefaults>,
18956 {
18957 self.autoprovisioning_node_pool_defaults = v.map(|x| x.into());
18958 self
18959 }
18960
18961 pub fn set_autoprovisioning_locations<T, V>(mut self, v: T) -> Self
18963 where
18964 T: std::iter::IntoIterator<Item = V>,
18965 V: std::convert::Into<std::string::String>,
18966 {
18967 use std::iter::Iterator;
18968 self.autoprovisioning_locations = v.into_iter().map(|i| i.into()).collect();
18969 self
18970 }
18971
18972 pub fn set_default_compute_class_config<T>(mut self, v: T) -> Self
18974 where
18975 T: std::convert::Into<crate::model::DefaultComputeClassConfig>,
18976 {
18977 self.default_compute_class_config = std::option::Option::Some(v.into());
18978 self
18979 }
18980
18981 pub fn set_or_clear_default_compute_class_config<T>(mut self, v: std::option::Option<T>) -> Self
18983 where
18984 T: std::convert::Into<crate::model::DefaultComputeClassConfig>,
18985 {
18986 self.default_compute_class_config = v.map(|x| x.into());
18987 self
18988 }
18989}
18990
18991impl wkt::message::Message for ClusterAutoscaling {
18992 fn typename() -> &'static str {
18993 "type.googleapis.com/google.container.v1.ClusterAutoscaling"
18994 }
18995}
18996
18997pub mod cluster_autoscaling {
18999 #[allow(unused_imports)]
19000 use super::*;
19001
19002 #[derive(Clone, Debug, PartialEq)]
19018 #[non_exhaustive]
19019 pub enum AutoscalingProfile {
19020 ProfileUnspecified,
19022 OptimizeUtilization,
19024 Balanced,
19026 UnknownValue(autoscaling_profile::UnknownValue),
19031 }
19032
19033 #[doc(hidden)]
19034 pub mod autoscaling_profile {
19035 #[allow(unused_imports)]
19036 use super::*;
19037 #[derive(Clone, Debug, PartialEq)]
19038 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19039 }
19040
19041 impl AutoscalingProfile {
19042 pub fn value(&self) -> std::option::Option<i32> {
19047 match self {
19048 Self::ProfileUnspecified => std::option::Option::Some(0),
19049 Self::OptimizeUtilization => std::option::Option::Some(1),
19050 Self::Balanced => std::option::Option::Some(2),
19051 Self::UnknownValue(u) => u.0.value(),
19052 }
19053 }
19054
19055 pub fn name(&self) -> std::option::Option<&str> {
19060 match self {
19061 Self::ProfileUnspecified => std::option::Option::Some("PROFILE_UNSPECIFIED"),
19062 Self::OptimizeUtilization => std::option::Option::Some("OPTIMIZE_UTILIZATION"),
19063 Self::Balanced => std::option::Option::Some("BALANCED"),
19064 Self::UnknownValue(u) => u.0.name(),
19065 }
19066 }
19067 }
19068
19069 impl std::default::Default for AutoscalingProfile {
19070 fn default() -> Self {
19071 use std::convert::From;
19072 Self::from(0)
19073 }
19074 }
19075
19076 impl std::fmt::Display for AutoscalingProfile {
19077 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19078 wkt::internal::display_enum(f, self.name(), self.value())
19079 }
19080 }
19081
19082 impl std::convert::From<i32> for AutoscalingProfile {
19083 fn from(value: i32) -> Self {
19084 match value {
19085 0 => Self::ProfileUnspecified,
19086 1 => Self::OptimizeUtilization,
19087 2 => Self::Balanced,
19088 _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
19089 wkt::internal::UnknownEnumValue::Integer(value),
19090 )),
19091 }
19092 }
19093 }
19094
19095 impl std::convert::From<&str> for AutoscalingProfile {
19096 fn from(value: &str) -> Self {
19097 use std::string::ToString;
19098 match value {
19099 "PROFILE_UNSPECIFIED" => Self::ProfileUnspecified,
19100 "OPTIMIZE_UTILIZATION" => Self::OptimizeUtilization,
19101 "BALANCED" => Self::Balanced,
19102 _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
19103 wkt::internal::UnknownEnumValue::String(value.to_string()),
19104 )),
19105 }
19106 }
19107 }
19108
19109 impl serde::ser::Serialize for AutoscalingProfile {
19110 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19111 where
19112 S: serde::Serializer,
19113 {
19114 match self {
19115 Self::ProfileUnspecified => serializer.serialize_i32(0),
19116 Self::OptimizeUtilization => serializer.serialize_i32(1),
19117 Self::Balanced => serializer.serialize_i32(2),
19118 Self::UnknownValue(u) => u.0.serialize(serializer),
19119 }
19120 }
19121 }
19122
19123 impl<'de> serde::de::Deserialize<'de> for AutoscalingProfile {
19124 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19125 where
19126 D: serde::Deserializer<'de>,
19127 {
19128 deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoscalingProfile>::new(
19129 ".google.container.v1.ClusterAutoscaling.AutoscalingProfile",
19130 ))
19131 }
19132 }
19133}
19134
19135#[derive(Clone, Default, PartialEq)]
19138#[non_exhaustive]
19139pub struct AutoprovisioningNodePoolDefaults {
19140 pub oauth_scopes: std::vec::Vec<std::string::String>,
19142
19143 pub service_account: std::string::String,
19145
19146 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
19148
19149 pub management: std::option::Option<crate::model::NodeManagement>,
19151
19152 #[deprecated]
19164 pub min_cpu_platform: std::string::String,
19165
19166 pub disk_size_gb: i32,
19171
19172 pub disk_type: std::string::String,
19177
19178 pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
19180
19181 pub boot_disk_kms_key: std::string::String,
19188
19189 pub image_type: std::string::String,
19193
19194 pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
19196
19197 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19198}
19199
19200impl AutoprovisioningNodePoolDefaults {
19201 pub fn new() -> Self {
19202 std::default::Default::default()
19203 }
19204
19205 pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
19207 where
19208 T: std::iter::IntoIterator<Item = V>,
19209 V: std::convert::Into<std::string::String>,
19210 {
19211 use std::iter::Iterator;
19212 self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
19213 self
19214 }
19215
19216 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19218 self.service_account = v.into();
19219 self
19220 }
19221
19222 pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
19224 where
19225 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
19226 {
19227 self.upgrade_settings = std::option::Option::Some(v.into());
19228 self
19229 }
19230
19231 pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
19233 where
19234 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
19235 {
19236 self.upgrade_settings = v.map(|x| x.into());
19237 self
19238 }
19239
19240 pub fn set_management<T>(mut self, v: T) -> Self
19242 where
19243 T: std::convert::Into<crate::model::NodeManagement>,
19244 {
19245 self.management = std::option::Option::Some(v.into());
19246 self
19247 }
19248
19249 pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
19251 where
19252 T: std::convert::Into<crate::model::NodeManagement>,
19253 {
19254 self.management = v.map(|x| x.into());
19255 self
19256 }
19257
19258 #[deprecated]
19260 pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
19261 mut self,
19262 v: T,
19263 ) -> Self {
19264 self.min_cpu_platform = v.into();
19265 self
19266 }
19267
19268 pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19270 self.disk_size_gb = v.into();
19271 self
19272 }
19273
19274 pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19276 self.disk_type = v.into();
19277 self
19278 }
19279
19280 pub fn set_shielded_instance_config<T>(mut self, v: T) -> Self
19282 where
19283 T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
19284 {
19285 self.shielded_instance_config = std::option::Option::Some(v.into());
19286 self
19287 }
19288
19289 pub fn set_or_clear_shielded_instance_config<T>(mut self, v: std::option::Option<T>) -> Self
19291 where
19292 T: std::convert::Into<crate::model::ShieldedInstanceConfig>,
19293 {
19294 self.shielded_instance_config = v.map(|x| x.into());
19295 self
19296 }
19297
19298 pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
19300 mut self,
19301 v: T,
19302 ) -> Self {
19303 self.boot_disk_kms_key = v.into();
19304 self
19305 }
19306
19307 pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19309 self.image_type = v.into();
19310 self
19311 }
19312
19313 pub fn set_insecure_kubelet_readonly_port_enabled<T>(mut self, v: T) -> Self
19315 where
19316 T: std::convert::Into<bool>,
19317 {
19318 self.insecure_kubelet_readonly_port_enabled = std::option::Option::Some(v.into());
19319 self
19320 }
19321
19322 pub fn set_or_clear_insecure_kubelet_readonly_port_enabled<T>(
19324 mut self,
19325 v: std::option::Option<T>,
19326 ) -> Self
19327 where
19328 T: std::convert::Into<bool>,
19329 {
19330 self.insecure_kubelet_readonly_port_enabled = v.map(|x| x.into());
19331 self
19332 }
19333}
19334
19335impl wkt::message::Message for AutoprovisioningNodePoolDefaults {
19336 fn typename() -> &'static str {
19337 "type.googleapis.com/google.container.v1.AutoprovisioningNodePoolDefaults"
19338 }
19339}
19340
19341#[derive(Clone, Default, PartialEq)]
19344#[non_exhaustive]
19345pub struct ResourceLimit {
19346 pub resource_type: std::string::String,
19348
19349 pub minimum: i64,
19351
19352 pub maximum: i64,
19354
19355 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19356}
19357
19358impl ResourceLimit {
19359 pub fn new() -> Self {
19360 std::default::Default::default()
19361 }
19362
19363 pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19365 self.resource_type = v.into();
19366 self
19367 }
19368
19369 pub fn set_minimum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19371 self.minimum = v.into();
19372 self
19373 }
19374
19375 pub fn set_maximum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19377 self.maximum = v.into();
19378 self
19379 }
19380}
19381
19382impl wkt::message::Message for ResourceLimit {
19383 fn typename() -> &'static str {
19384 "type.googleapis.com/google.container.v1.ResourceLimit"
19385 }
19386}
19387
19388#[derive(Clone, Default, PartialEq)]
19391#[non_exhaustive]
19392pub struct DefaultComputeClassConfig {
19393 pub enabled: bool,
19395
19396 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19397}
19398
19399impl DefaultComputeClassConfig {
19400 pub fn new() -> Self {
19401 std::default::Default::default()
19402 }
19403
19404 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19406 self.enabled = v.into();
19407 self
19408 }
19409}
19410
19411impl wkt::message::Message for DefaultComputeClassConfig {
19412 fn typename() -> &'static str {
19413 "type.googleapis.com/google.container.v1.DefaultComputeClassConfig"
19414 }
19415}
19416
19417#[derive(Clone, Default, PartialEq)]
19420#[non_exhaustive]
19421pub struct NodePoolAutoscaling {
19422 pub enabled: bool,
19424
19425 pub min_node_count: i32,
19428
19429 pub max_node_count: i32,
19432
19433 pub autoprovisioned: bool,
19435
19436 pub location_policy: crate::model::node_pool_autoscaling::LocationPolicy,
19438
19439 pub total_min_node_count: i32,
19444
19445 pub total_max_node_count: i32,
19450
19451 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19452}
19453
19454impl NodePoolAutoscaling {
19455 pub fn new() -> Self {
19456 std::default::Default::default()
19457 }
19458
19459 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19461 self.enabled = v.into();
19462 self
19463 }
19464
19465 pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19467 self.min_node_count = v.into();
19468 self
19469 }
19470
19471 pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19473 self.max_node_count = v.into();
19474 self
19475 }
19476
19477 pub fn set_autoprovisioned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19479 self.autoprovisioned = v.into();
19480 self
19481 }
19482
19483 pub fn set_location_policy<
19485 T: std::convert::Into<crate::model::node_pool_autoscaling::LocationPolicy>,
19486 >(
19487 mut self,
19488 v: T,
19489 ) -> Self {
19490 self.location_policy = v.into();
19491 self
19492 }
19493
19494 pub fn set_total_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19496 self.total_min_node_count = v.into();
19497 self
19498 }
19499
19500 pub fn set_total_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19502 self.total_max_node_count = v.into();
19503 self
19504 }
19505}
19506
19507impl wkt::message::Message for NodePoolAutoscaling {
19508 fn typename() -> &'static str {
19509 "type.googleapis.com/google.container.v1.NodePoolAutoscaling"
19510 }
19511}
19512
19513pub mod node_pool_autoscaling {
19515 #[allow(unused_imports)]
19516 use super::*;
19517
19518 #[derive(Clone, Debug, PartialEq)]
19535 #[non_exhaustive]
19536 pub enum LocationPolicy {
19537 Unspecified,
19539 Balanced,
19542 Any,
19544 UnknownValue(location_policy::UnknownValue),
19549 }
19550
19551 #[doc(hidden)]
19552 pub mod location_policy {
19553 #[allow(unused_imports)]
19554 use super::*;
19555 #[derive(Clone, Debug, PartialEq)]
19556 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19557 }
19558
19559 impl LocationPolicy {
19560 pub fn value(&self) -> std::option::Option<i32> {
19565 match self {
19566 Self::Unspecified => std::option::Option::Some(0),
19567 Self::Balanced => std::option::Option::Some(1),
19568 Self::Any => std::option::Option::Some(2),
19569 Self::UnknownValue(u) => u.0.value(),
19570 }
19571 }
19572
19573 pub fn name(&self) -> std::option::Option<&str> {
19578 match self {
19579 Self::Unspecified => std::option::Option::Some("LOCATION_POLICY_UNSPECIFIED"),
19580 Self::Balanced => std::option::Option::Some("BALANCED"),
19581 Self::Any => std::option::Option::Some("ANY"),
19582 Self::UnknownValue(u) => u.0.name(),
19583 }
19584 }
19585 }
19586
19587 impl std::default::Default for LocationPolicy {
19588 fn default() -> Self {
19589 use std::convert::From;
19590 Self::from(0)
19591 }
19592 }
19593
19594 impl std::fmt::Display for LocationPolicy {
19595 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19596 wkt::internal::display_enum(f, self.name(), self.value())
19597 }
19598 }
19599
19600 impl std::convert::From<i32> for LocationPolicy {
19601 fn from(value: i32) -> Self {
19602 match value {
19603 0 => Self::Unspecified,
19604 1 => Self::Balanced,
19605 2 => Self::Any,
19606 _ => Self::UnknownValue(location_policy::UnknownValue(
19607 wkt::internal::UnknownEnumValue::Integer(value),
19608 )),
19609 }
19610 }
19611 }
19612
19613 impl std::convert::From<&str> for LocationPolicy {
19614 fn from(value: &str) -> Self {
19615 use std::string::ToString;
19616 match value {
19617 "LOCATION_POLICY_UNSPECIFIED" => Self::Unspecified,
19618 "BALANCED" => Self::Balanced,
19619 "ANY" => Self::Any,
19620 _ => Self::UnknownValue(location_policy::UnknownValue(
19621 wkt::internal::UnknownEnumValue::String(value.to_string()),
19622 )),
19623 }
19624 }
19625 }
19626
19627 impl serde::ser::Serialize for LocationPolicy {
19628 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19629 where
19630 S: serde::Serializer,
19631 {
19632 match self {
19633 Self::Unspecified => serializer.serialize_i32(0),
19634 Self::Balanced => serializer.serialize_i32(1),
19635 Self::Any => serializer.serialize_i32(2),
19636 Self::UnknownValue(u) => u.0.serialize(serializer),
19637 }
19638 }
19639 }
19640
19641 impl<'de> serde::de::Deserialize<'de> for LocationPolicy {
19642 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19643 where
19644 D: serde::Deserializer<'de>,
19645 {
19646 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationPolicy>::new(
19647 ".google.container.v1.NodePoolAutoscaling.LocationPolicy",
19648 ))
19649 }
19650 }
19651}
19652
19653#[derive(Clone, Default, PartialEq)]
19657#[non_exhaustive]
19658pub struct SetLabelsRequest {
19659 #[deprecated]
19663 pub project_id: std::string::String,
19664
19665 #[deprecated]
19670 pub zone: std::string::String,
19671
19672 #[deprecated]
19675 pub cluster_id: std::string::String,
19676
19677 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
19679
19680 pub label_fingerprint: std::string::String,
19687
19688 pub name: std::string::String,
19691
19692 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19693}
19694
19695impl SetLabelsRequest {
19696 pub fn new() -> Self {
19697 std::default::Default::default()
19698 }
19699
19700 #[deprecated]
19702 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19703 self.project_id = v.into();
19704 self
19705 }
19706
19707 #[deprecated]
19709 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19710 self.zone = v.into();
19711 self
19712 }
19713
19714 #[deprecated]
19716 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19717 self.cluster_id = v.into();
19718 self
19719 }
19720
19721 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
19723 where
19724 T: std::iter::IntoIterator<Item = (K, V)>,
19725 K: std::convert::Into<std::string::String>,
19726 V: std::convert::Into<std::string::String>,
19727 {
19728 use std::iter::Iterator;
19729 self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19730 self
19731 }
19732
19733 pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
19735 mut self,
19736 v: T,
19737 ) -> Self {
19738 self.label_fingerprint = v.into();
19739 self
19740 }
19741
19742 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19744 self.name = v.into();
19745 self
19746 }
19747}
19748
19749impl wkt::message::Message for SetLabelsRequest {
19750 fn typename() -> &'static str {
19751 "type.googleapis.com/google.container.v1.SetLabelsRequest"
19752 }
19753}
19754
19755#[derive(Clone, Default, PartialEq)]
19758#[non_exhaustive]
19759pub struct SetLegacyAbacRequest {
19760 #[deprecated]
19764 pub project_id: std::string::String,
19765
19766 #[deprecated]
19771 pub zone: std::string::String,
19772
19773 #[deprecated]
19776 pub cluster_id: std::string::String,
19777
19778 pub enabled: bool,
19780
19781 pub name: std::string::String,
19784
19785 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19786}
19787
19788impl SetLegacyAbacRequest {
19789 pub fn new() -> Self {
19790 std::default::Default::default()
19791 }
19792
19793 #[deprecated]
19795 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19796 self.project_id = v.into();
19797 self
19798 }
19799
19800 #[deprecated]
19802 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19803 self.zone = v.into();
19804 self
19805 }
19806
19807 #[deprecated]
19809 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19810 self.cluster_id = v.into();
19811 self
19812 }
19813
19814 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19816 self.enabled = v.into();
19817 self
19818 }
19819
19820 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19822 self.name = v.into();
19823 self
19824 }
19825}
19826
19827impl wkt::message::Message for SetLegacyAbacRequest {
19828 fn typename() -> &'static str {
19829 "type.googleapis.com/google.container.v1.SetLegacyAbacRequest"
19830 }
19831}
19832
19833#[derive(Clone, Default, PartialEq)]
19836#[non_exhaustive]
19837pub struct StartIPRotationRequest {
19838 #[deprecated]
19842 pub project_id: std::string::String,
19843
19844 #[deprecated]
19849 pub zone: std::string::String,
19850
19851 #[deprecated]
19854 pub cluster_id: std::string::String,
19855
19856 pub name: std::string::String,
19859
19860 pub rotate_credentials: bool,
19862
19863 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19864}
19865
19866impl StartIPRotationRequest {
19867 pub fn new() -> Self {
19868 std::default::Default::default()
19869 }
19870
19871 #[deprecated]
19873 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19874 self.project_id = v.into();
19875 self
19876 }
19877
19878 #[deprecated]
19880 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19881 self.zone = v.into();
19882 self
19883 }
19884
19885 #[deprecated]
19887 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19888 self.cluster_id = v.into();
19889 self
19890 }
19891
19892 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19894 self.name = v.into();
19895 self
19896 }
19897
19898 pub fn set_rotate_credentials<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19900 self.rotate_credentials = v.into();
19901 self
19902 }
19903}
19904
19905impl wkt::message::Message for StartIPRotationRequest {
19906 fn typename() -> &'static str {
19907 "type.googleapis.com/google.container.v1.StartIPRotationRequest"
19908 }
19909}
19910
19911#[derive(Clone, Default, PartialEq)]
19913#[non_exhaustive]
19914pub struct CompleteIPRotationRequest {
19915 #[deprecated]
19919 pub project_id: std::string::String,
19920
19921 #[deprecated]
19926 pub zone: std::string::String,
19927
19928 #[deprecated]
19931 pub cluster_id: std::string::String,
19932
19933 pub name: std::string::String,
19936
19937 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19938}
19939
19940impl CompleteIPRotationRequest {
19941 pub fn new() -> Self {
19942 std::default::Default::default()
19943 }
19944
19945 #[deprecated]
19947 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19948 self.project_id = v.into();
19949 self
19950 }
19951
19952 #[deprecated]
19954 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19955 self.zone = v.into();
19956 self
19957 }
19958
19959 #[deprecated]
19961 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19962 self.cluster_id = v.into();
19963 self
19964 }
19965
19966 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19968 self.name = v.into();
19969 self
19970 }
19971}
19972
19973impl wkt::message::Message for CompleteIPRotationRequest {
19974 fn typename() -> &'static str {
19975 "type.googleapis.com/google.container.v1.CompleteIPRotationRequest"
19976 }
19977}
19978
19979#[derive(Clone, Default, PartialEq)]
19981#[non_exhaustive]
19982pub struct AcceleratorConfig {
19983 pub accelerator_count: i64,
19985
19986 pub accelerator_type: std::string::String,
19989
19990 pub gpu_partition_size: std::string::String,
19994
19995 pub gpu_sharing_config: std::option::Option<crate::model::GPUSharingConfig>,
19997
19998 pub gpu_driver_installation_config:
20000 std::option::Option<crate::model::GPUDriverInstallationConfig>,
20001
20002 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20003}
20004
20005impl AcceleratorConfig {
20006 pub fn new() -> Self {
20007 std::default::Default::default()
20008 }
20009
20010 pub fn set_accelerator_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
20012 self.accelerator_count = v.into();
20013 self
20014 }
20015
20016 pub fn set_accelerator_type<T: std::convert::Into<std::string::String>>(
20018 mut self,
20019 v: T,
20020 ) -> Self {
20021 self.accelerator_type = v.into();
20022 self
20023 }
20024
20025 pub fn set_gpu_partition_size<T: std::convert::Into<std::string::String>>(
20027 mut self,
20028 v: T,
20029 ) -> Self {
20030 self.gpu_partition_size = v.into();
20031 self
20032 }
20033
20034 pub fn set_gpu_sharing_config<T>(mut self, v: T) -> Self
20036 where
20037 T: std::convert::Into<crate::model::GPUSharingConfig>,
20038 {
20039 self.gpu_sharing_config = std::option::Option::Some(v.into());
20040 self
20041 }
20042
20043 pub fn set_or_clear_gpu_sharing_config<T>(mut self, v: std::option::Option<T>) -> Self
20045 where
20046 T: std::convert::Into<crate::model::GPUSharingConfig>,
20047 {
20048 self.gpu_sharing_config = v.map(|x| x.into());
20049 self
20050 }
20051
20052 pub fn set_gpu_driver_installation_config<T>(mut self, v: T) -> Self
20054 where
20055 T: std::convert::Into<crate::model::GPUDriverInstallationConfig>,
20056 {
20057 self.gpu_driver_installation_config = std::option::Option::Some(v.into());
20058 self
20059 }
20060
20061 pub fn set_or_clear_gpu_driver_installation_config<T>(
20063 mut self,
20064 v: std::option::Option<T>,
20065 ) -> Self
20066 where
20067 T: std::convert::Into<crate::model::GPUDriverInstallationConfig>,
20068 {
20069 self.gpu_driver_installation_config = v.map(|x| x.into());
20070 self
20071 }
20072}
20073
20074impl wkt::message::Message for AcceleratorConfig {
20075 fn typename() -> &'static str {
20076 "type.googleapis.com/google.container.v1.AcceleratorConfig"
20077 }
20078}
20079
20080#[derive(Clone, Default, PartialEq)]
20083#[non_exhaustive]
20084pub struct GPUSharingConfig {
20085 pub max_shared_clients_per_gpu: i64,
20087
20088 pub gpu_sharing_strategy:
20090 std::option::Option<crate::model::gpu_sharing_config::GPUSharingStrategy>,
20091
20092 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20093}
20094
20095impl GPUSharingConfig {
20096 pub fn new() -> Self {
20097 std::default::Default::default()
20098 }
20099
20100 pub fn set_max_shared_clients_per_gpu<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
20102 self.max_shared_clients_per_gpu = v.into();
20103 self
20104 }
20105
20106 pub fn set_gpu_sharing_strategy<T>(mut self, v: T) -> Self
20108 where
20109 T: std::convert::Into<crate::model::gpu_sharing_config::GPUSharingStrategy>,
20110 {
20111 self.gpu_sharing_strategy = std::option::Option::Some(v.into());
20112 self
20113 }
20114
20115 pub fn set_or_clear_gpu_sharing_strategy<T>(mut self, v: std::option::Option<T>) -> Self
20117 where
20118 T: std::convert::Into<crate::model::gpu_sharing_config::GPUSharingStrategy>,
20119 {
20120 self.gpu_sharing_strategy = v.map(|x| x.into());
20121 self
20122 }
20123}
20124
20125impl wkt::message::Message for GPUSharingConfig {
20126 fn typename() -> &'static str {
20127 "type.googleapis.com/google.container.v1.GPUSharingConfig"
20128 }
20129}
20130
20131pub mod gpu_sharing_config {
20133 #[allow(unused_imports)]
20134 use super::*;
20135
20136 #[derive(Clone, Debug, PartialEq)]
20152 #[non_exhaustive]
20153 pub enum GPUSharingStrategy {
20154 Unspecified,
20156 TimeSharing,
20158 Mps,
20160 UnknownValue(gpu_sharing_strategy::UnknownValue),
20165 }
20166
20167 #[doc(hidden)]
20168 pub mod gpu_sharing_strategy {
20169 #[allow(unused_imports)]
20170 use super::*;
20171 #[derive(Clone, Debug, PartialEq)]
20172 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20173 }
20174
20175 impl GPUSharingStrategy {
20176 pub fn value(&self) -> std::option::Option<i32> {
20181 match self {
20182 Self::Unspecified => std::option::Option::Some(0),
20183 Self::TimeSharing => std::option::Option::Some(1),
20184 Self::Mps => std::option::Option::Some(2),
20185 Self::UnknownValue(u) => u.0.value(),
20186 }
20187 }
20188
20189 pub fn name(&self) -> std::option::Option<&str> {
20194 match self {
20195 Self::Unspecified => std::option::Option::Some("GPU_SHARING_STRATEGY_UNSPECIFIED"),
20196 Self::TimeSharing => std::option::Option::Some("TIME_SHARING"),
20197 Self::Mps => std::option::Option::Some("MPS"),
20198 Self::UnknownValue(u) => u.0.name(),
20199 }
20200 }
20201 }
20202
20203 impl std::default::Default for GPUSharingStrategy {
20204 fn default() -> Self {
20205 use std::convert::From;
20206 Self::from(0)
20207 }
20208 }
20209
20210 impl std::fmt::Display for GPUSharingStrategy {
20211 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20212 wkt::internal::display_enum(f, self.name(), self.value())
20213 }
20214 }
20215
20216 impl std::convert::From<i32> for GPUSharingStrategy {
20217 fn from(value: i32) -> Self {
20218 match value {
20219 0 => Self::Unspecified,
20220 1 => Self::TimeSharing,
20221 2 => Self::Mps,
20222 _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
20223 wkt::internal::UnknownEnumValue::Integer(value),
20224 )),
20225 }
20226 }
20227 }
20228
20229 impl std::convert::From<&str> for GPUSharingStrategy {
20230 fn from(value: &str) -> Self {
20231 use std::string::ToString;
20232 match value {
20233 "GPU_SHARING_STRATEGY_UNSPECIFIED" => Self::Unspecified,
20234 "TIME_SHARING" => Self::TimeSharing,
20235 "MPS" => Self::Mps,
20236 _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
20237 wkt::internal::UnknownEnumValue::String(value.to_string()),
20238 )),
20239 }
20240 }
20241 }
20242
20243 impl serde::ser::Serialize for GPUSharingStrategy {
20244 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20245 where
20246 S: serde::Serializer,
20247 {
20248 match self {
20249 Self::Unspecified => serializer.serialize_i32(0),
20250 Self::TimeSharing => serializer.serialize_i32(1),
20251 Self::Mps => serializer.serialize_i32(2),
20252 Self::UnknownValue(u) => u.0.serialize(serializer),
20253 }
20254 }
20255 }
20256
20257 impl<'de> serde::de::Deserialize<'de> for GPUSharingStrategy {
20258 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20259 where
20260 D: serde::Deserializer<'de>,
20261 {
20262 deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUSharingStrategy>::new(
20263 ".google.container.v1.GPUSharingConfig.GPUSharingStrategy",
20264 ))
20265 }
20266 }
20267}
20268
20269#[derive(Clone, Default, PartialEq)]
20272#[non_exhaustive]
20273pub struct GPUDriverInstallationConfig {
20274 pub gpu_driver_version:
20276 std::option::Option<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
20277
20278 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20279}
20280
20281impl GPUDriverInstallationConfig {
20282 pub fn new() -> Self {
20283 std::default::Default::default()
20284 }
20285
20286 pub fn set_gpu_driver_version<T>(mut self, v: T) -> Self
20288 where
20289 T: std::convert::Into<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
20290 {
20291 self.gpu_driver_version = std::option::Option::Some(v.into());
20292 self
20293 }
20294
20295 pub fn set_or_clear_gpu_driver_version<T>(mut self, v: std::option::Option<T>) -> Self
20297 where
20298 T: std::convert::Into<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
20299 {
20300 self.gpu_driver_version = v.map(|x| x.into());
20301 self
20302 }
20303}
20304
20305impl wkt::message::Message for GPUDriverInstallationConfig {
20306 fn typename() -> &'static str {
20307 "type.googleapis.com/google.container.v1.GPUDriverInstallationConfig"
20308 }
20309}
20310
20311pub mod gpu_driver_installation_config {
20313 #[allow(unused_imports)]
20314 use super::*;
20315
20316 #[derive(Clone, Debug, PartialEq)]
20332 #[non_exhaustive]
20333 pub enum GPUDriverVersion {
20334 Unspecified,
20336 InstallationDisabled,
20338 Default,
20340 Latest,
20342 UnknownValue(gpu_driver_version::UnknownValue),
20347 }
20348
20349 #[doc(hidden)]
20350 pub mod gpu_driver_version {
20351 #[allow(unused_imports)]
20352 use super::*;
20353 #[derive(Clone, Debug, PartialEq)]
20354 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20355 }
20356
20357 impl GPUDriverVersion {
20358 pub fn value(&self) -> std::option::Option<i32> {
20363 match self {
20364 Self::Unspecified => std::option::Option::Some(0),
20365 Self::InstallationDisabled => std::option::Option::Some(1),
20366 Self::Default => std::option::Option::Some(2),
20367 Self::Latest => std::option::Option::Some(3),
20368 Self::UnknownValue(u) => u.0.value(),
20369 }
20370 }
20371
20372 pub fn name(&self) -> std::option::Option<&str> {
20377 match self {
20378 Self::Unspecified => std::option::Option::Some("GPU_DRIVER_VERSION_UNSPECIFIED"),
20379 Self::InstallationDisabled => std::option::Option::Some("INSTALLATION_DISABLED"),
20380 Self::Default => std::option::Option::Some("DEFAULT"),
20381 Self::Latest => std::option::Option::Some("LATEST"),
20382 Self::UnknownValue(u) => u.0.name(),
20383 }
20384 }
20385 }
20386
20387 impl std::default::Default for GPUDriverVersion {
20388 fn default() -> Self {
20389 use std::convert::From;
20390 Self::from(0)
20391 }
20392 }
20393
20394 impl std::fmt::Display for GPUDriverVersion {
20395 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20396 wkt::internal::display_enum(f, self.name(), self.value())
20397 }
20398 }
20399
20400 impl std::convert::From<i32> for GPUDriverVersion {
20401 fn from(value: i32) -> Self {
20402 match value {
20403 0 => Self::Unspecified,
20404 1 => Self::InstallationDisabled,
20405 2 => Self::Default,
20406 3 => Self::Latest,
20407 _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
20408 wkt::internal::UnknownEnumValue::Integer(value),
20409 )),
20410 }
20411 }
20412 }
20413
20414 impl std::convert::From<&str> for GPUDriverVersion {
20415 fn from(value: &str) -> Self {
20416 use std::string::ToString;
20417 match value {
20418 "GPU_DRIVER_VERSION_UNSPECIFIED" => Self::Unspecified,
20419 "INSTALLATION_DISABLED" => Self::InstallationDisabled,
20420 "DEFAULT" => Self::Default,
20421 "LATEST" => Self::Latest,
20422 _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
20423 wkt::internal::UnknownEnumValue::String(value.to_string()),
20424 )),
20425 }
20426 }
20427 }
20428
20429 impl serde::ser::Serialize for GPUDriverVersion {
20430 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20431 where
20432 S: serde::Serializer,
20433 {
20434 match self {
20435 Self::Unspecified => serializer.serialize_i32(0),
20436 Self::InstallationDisabled => serializer.serialize_i32(1),
20437 Self::Default => serializer.serialize_i32(2),
20438 Self::Latest => serializer.serialize_i32(3),
20439 Self::UnknownValue(u) => u.0.serialize(serializer),
20440 }
20441 }
20442 }
20443
20444 impl<'de> serde::de::Deserialize<'de> for GPUDriverVersion {
20445 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20446 where
20447 D: serde::Deserializer<'de>,
20448 {
20449 deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUDriverVersion>::new(
20450 ".google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion",
20451 ))
20452 }
20453 }
20454}
20455
20456#[derive(Clone, Default, PartialEq)]
20459#[non_exhaustive]
20460pub struct WorkloadMetadataConfig {
20461 pub mode: crate::model::workload_metadata_config::Mode,
20464
20465 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20466}
20467
20468impl WorkloadMetadataConfig {
20469 pub fn new() -> Self {
20470 std::default::Default::default()
20471 }
20472
20473 pub fn set_mode<T: std::convert::Into<crate::model::workload_metadata_config::Mode>>(
20475 mut self,
20476 v: T,
20477 ) -> Self {
20478 self.mode = v.into();
20479 self
20480 }
20481}
20482
20483impl wkt::message::Message for WorkloadMetadataConfig {
20484 fn typename() -> &'static str {
20485 "type.googleapis.com/google.container.v1.WorkloadMetadataConfig"
20486 }
20487}
20488
20489pub mod workload_metadata_config {
20491 #[allow(unused_imports)]
20492 use super::*;
20493
20494 #[derive(Clone, Debug, PartialEq)]
20511 #[non_exhaustive]
20512 pub enum Mode {
20513 Unspecified,
20515 GceMetadata,
20517 GkeMetadata,
20523 UnknownValue(mode::UnknownValue),
20528 }
20529
20530 #[doc(hidden)]
20531 pub mod mode {
20532 #[allow(unused_imports)]
20533 use super::*;
20534 #[derive(Clone, Debug, PartialEq)]
20535 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20536 }
20537
20538 impl Mode {
20539 pub fn value(&self) -> std::option::Option<i32> {
20544 match self {
20545 Self::Unspecified => std::option::Option::Some(0),
20546 Self::GceMetadata => std::option::Option::Some(1),
20547 Self::GkeMetadata => std::option::Option::Some(2),
20548 Self::UnknownValue(u) => u.0.value(),
20549 }
20550 }
20551
20552 pub fn name(&self) -> std::option::Option<&str> {
20557 match self {
20558 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
20559 Self::GceMetadata => std::option::Option::Some("GCE_METADATA"),
20560 Self::GkeMetadata => std::option::Option::Some("GKE_METADATA"),
20561 Self::UnknownValue(u) => u.0.name(),
20562 }
20563 }
20564 }
20565
20566 impl std::default::Default for Mode {
20567 fn default() -> Self {
20568 use std::convert::From;
20569 Self::from(0)
20570 }
20571 }
20572
20573 impl std::fmt::Display for Mode {
20574 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20575 wkt::internal::display_enum(f, self.name(), self.value())
20576 }
20577 }
20578
20579 impl std::convert::From<i32> for Mode {
20580 fn from(value: i32) -> Self {
20581 match value {
20582 0 => Self::Unspecified,
20583 1 => Self::GceMetadata,
20584 2 => Self::GkeMetadata,
20585 _ => Self::UnknownValue(mode::UnknownValue(
20586 wkt::internal::UnknownEnumValue::Integer(value),
20587 )),
20588 }
20589 }
20590 }
20591
20592 impl std::convert::From<&str> for Mode {
20593 fn from(value: &str) -> Self {
20594 use std::string::ToString;
20595 match value {
20596 "MODE_UNSPECIFIED" => Self::Unspecified,
20597 "GCE_METADATA" => Self::GceMetadata,
20598 "GKE_METADATA" => Self::GkeMetadata,
20599 _ => Self::UnknownValue(mode::UnknownValue(
20600 wkt::internal::UnknownEnumValue::String(value.to_string()),
20601 )),
20602 }
20603 }
20604 }
20605
20606 impl serde::ser::Serialize for Mode {
20607 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20608 where
20609 S: serde::Serializer,
20610 {
20611 match self {
20612 Self::Unspecified => serializer.serialize_i32(0),
20613 Self::GceMetadata => serializer.serialize_i32(1),
20614 Self::GkeMetadata => serializer.serialize_i32(2),
20615 Self::UnknownValue(u) => u.0.serialize(serializer),
20616 }
20617 }
20618 }
20619
20620 impl<'de> serde::de::Deserialize<'de> for Mode {
20621 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20622 where
20623 D: serde::Deserializer<'de>,
20624 {
20625 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
20626 ".google.container.v1.WorkloadMetadataConfig.Mode",
20627 ))
20628 }
20629 }
20630}
20631
20632#[derive(Clone, Default, PartialEq)]
20634#[non_exhaustive]
20635pub struct SetNetworkPolicyRequest {
20636 #[deprecated]
20640 pub project_id: std::string::String,
20641
20642 #[deprecated]
20647 pub zone: std::string::String,
20648
20649 #[deprecated]
20652 pub cluster_id: std::string::String,
20653
20654 pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
20656
20657 pub name: std::string::String,
20660
20661 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20662}
20663
20664impl SetNetworkPolicyRequest {
20665 pub fn new() -> Self {
20666 std::default::Default::default()
20667 }
20668
20669 #[deprecated]
20671 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20672 self.project_id = v.into();
20673 self
20674 }
20675
20676 #[deprecated]
20678 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20679 self.zone = v.into();
20680 self
20681 }
20682
20683 #[deprecated]
20685 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20686 self.cluster_id = v.into();
20687 self
20688 }
20689
20690 pub fn set_network_policy<T>(mut self, v: T) -> Self
20692 where
20693 T: std::convert::Into<crate::model::NetworkPolicy>,
20694 {
20695 self.network_policy = std::option::Option::Some(v.into());
20696 self
20697 }
20698
20699 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
20701 where
20702 T: std::convert::Into<crate::model::NetworkPolicy>,
20703 {
20704 self.network_policy = v.map(|x| x.into());
20705 self
20706 }
20707
20708 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20710 self.name = v.into();
20711 self
20712 }
20713}
20714
20715impl wkt::message::Message for SetNetworkPolicyRequest {
20716 fn typename() -> &'static str {
20717 "type.googleapis.com/google.container.v1.SetNetworkPolicyRequest"
20718 }
20719}
20720
20721#[derive(Clone, Default, PartialEq)]
20723#[non_exhaustive]
20724pub struct SetMaintenancePolicyRequest {
20725 pub project_id: std::string::String,
20728
20729 pub zone: std::string::String,
20733
20734 pub cluster_id: std::string::String,
20736
20737 pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
20740
20741 pub name: std::string::String,
20745
20746 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20747}
20748
20749impl SetMaintenancePolicyRequest {
20750 pub fn new() -> Self {
20751 std::default::Default::default()
20752 }
20753
20754 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20756 self.project_id = v.into();
20757 self
20758 }
20759
20760 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20762 self.zone = v.into();
20763 self
20764 }
20765
20766 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20768 self.cluster_id = v.into();
20769 self
20770 }
20771
20772 pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
20774 where
20775 T: std::convert::Into<crate::model::MaintenancePolicy>,
20776 {
20777 self.maintenance_policy = std::option::Option::Some(v.into());
20778 self
20779 }
20780
20781 pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
20783 where
20784 T: std::convert::Into<crate::model::MaintenancePolicy>,
20785 {
20786 self.maintenance_policy = v.map(|x| x.into());
20787 self
20788 }
20789
20790 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20792 self.name = v.into();
20793 self
20794 }
20795}
20796
20797impl wkt::message::Message for SetMaintenancePolicyRequest {
20798 fn typename() -> &'static str {
20799 "type.googleapis.com/google.container.v1.SetMaintenancePolicyRequest"
20800 }
20801}
20802
20803#[derive(Clone, Default, PartialEq)]
20806#[non_exhaustive]
20807pub struct StatusCondition {
20808 #[deprecated]
20811 pub code: crate::model::status_condition::Code,
20812
20813 pub message: std::string::String,
20815
20816 pub canonical_code: rpc::model::Code,
20818
20819 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20820}
20821
20822impl StatusCondition {
20823 pub fn new() -> Self {
20824 std::default::Default::default()
20825 }
20826
20827 #[deprecated]
20829 pub fn set_code<T: std::convert::Into<crate::model::status_condition::Code>>(
20830 mut self,
20831 v: T,
20832 ) -> Self {
20833 self.code = v.into();
20834 self
20835 }
20836
20837 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20839 self.message = v.into();
20840 self
20841 }
20842
20843 pub fn set_canonical_code<T: std::convert::Into<rpc::model::Code>>(mut self, v: T) -> Self {
20845 self.canonical_code = v.into();
20846 self
20847 }
20848}
20849
20850impl wkt::message::Message for StatusCondition {
20851 fn typename() -> &'static str {
20852 "type.googleapis.com/google.container.v1.StatusCondition"
20853 }
20854}
20855
20856pub mod status_condition {
20858 #[allow(unused_imports)]
20859 use super::*;
20860
20861 #[derive(Clone, Debug, PartialEq)]
20877 #[non_exhaustive]
20878 pub enum Code {
20879 Unknown,
20881 GceStockout,
20884 GkeServiceAccountDeleted,
20887 GceQuotaExceeded,
20889 SetByOperator,
20891 CloudKmsKeyError,
20894 CaExpiring,
20896 NodeServiceAccountMissingPermissions,
20898 CloudKmsKeyDestroyed,
20901 UnknownValue(code::UnknownValue),
20906 }
20907
20908 #[doc(hidden)]
20909 pub mod code {
20910 #[allow(unused_imports)]
20911 use super::*;
20912 #[derive(Clone, Debug, PartialEq)]
20913 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20914 }
20915
20916 impl Code {
20917 pub fn value(&self) -> std::option::Option<i32> {
20922 match self {
20923 Self::Unknown => std::option::Option::Some(0),
20924 Self::GceStockout => std::option::Option::Some(1),
20925 Self::GkeServiceAccountDeleted => std::option::Option::Some(2),
20926 Self::GceQuotaExceeded => std::option::Option::Some(3),
20927 Self::SetByOperator => std::option::Option::Some(4),
20928 Self::CloudKmsKeyError => std::option::Option::Some(7),
20929 Self::CaExpiring => std::option::Option::Some(9),
20930 Self::NodeServiceAccountMissingPermissions => std::option::Option::Some(10),
20931 Self::CloudKmsKeyDestroyed => std::option::Option::Some(11),
20932 Self::UnknownValue(u) => u.0.value(),
20933 }
20934 }
20935
20936 pub fn name(&self) -> std::option::Option<&str> {
20941 match self {
20942 Self::Unknown => std::option::Option::Some("UNKNOWN"),
20943 Self::GceStockout => std::option::Option::Some("GCE_STOCKOUT"),
20944 Self::GkeServiceAccountDeleted => {
20945 std::option::Option::Some("GKE_SERVICE_ACCOUNT_DELETED")
20946 }
20947 Self::GceQuotaExceeded => std::option::Option::Some("GCE_QUOTA_EXCEEDED"),
20948 Self::SetByOperator => std::option::Option::Some("SET_BY_OPERATOR"),
20949 Self::CloudKmsKeyError => std::option::Option::Some("CLOUD_KMS_KEY_ERROR"),
20950 Self::CaExpiring => std::option::Option::Some("CA_EXPIRING"),
20951 Self::NodeServiceAccountMissingPermissions => {
20952 std::option::Option::Some("NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS")
20953 }
20954 Self::CloudKmsKeyDestroyed => std::option::Option::Some("CLOUD_KMS_KEY_DESTROYED"),
20955 Self::UnknownValue(u) => u.0.name(),
20956 }
20957 }
20958 }
20959
20960 impl std::default::Default for Code {
20961 fn default() -> Self {
20962 use std::convert::From;
20963 Self::from(0)
20964 }
20965 }
20966
20967 impl std::fmt::Display for Code {
20968 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20969 wkt::internal::display_enum(f, self.name(), self.value())
20970 }
20971 }
20972
20973 impl std::convert::From<i32> for Code {
20974 fn from(value: i32) -> Self {
20975 match value {
20976 0 => Self::Unknown,
20977 1 => Self::GceStockout,
20978 2 => Self::GkeServiceAccountDeleted,
20979 3 => Self::GceQuotaExceeded,
20980 4 => Self::SetByOperator,
20981 7 => Self::CloudKmsKeyError,
20982 9 => Self::CaExpiring,
20983 10 => Self::NodeServiceAccountMissingPermissions,
20984 11 => Self::CloudKmsKeyDestroyed,
20985 _ => Self::UnknownValue(code::UnknownValue(
20986 wkt::internal::UnknownEnumValue::Integer(value),
20987 )),
20988 }
20989 }
20990 }
20991
20992 impl std::convert::From<&str> for Code {
20993 fn from(value: &str) -> Self {
20994 use std::string::ToString;
20995 match value {
20996 "UNKNOWN" => Self::Unknown,
20997 "GCE_STOCKOUT" => Self::GceStockout,
20998 "GKE_SERVICE_ACCOUNT_DELETED" => Self::GkeServiceAccountDeleted,
20999 "GCE_QUOTA_EXCEEDED" => Self::GceQuotaExceeded,
21000 "SET_BY_OPERATOR" => Self::SetByOperator,
21001 "CLOUD_KMS_KEY_ERROR" => Self::CloudKmsKeyError,
21002 "CA_EXPIRING" => Self::CaExpiring,
21003 "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS" => {
21004 Self::NodeServiceAccountMissingPermissions
21005 }
21006 "CLOUD_KMS_KEY_DESTROYED" => Self::CloudKmsKeyDestroyed,
21007 _ => Self::UnknownValue(code::UnknownValue(
21008 wkt::internal::UnknownEnumValue::String(value.to_string()),
21009 )),
21010 }
21011 }
21012 }
21013
21014 impl serde::ser::Serialize for Code {
21015 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21016 where
21017 S: serde::Serializer,
21018 {
21019 match self {
21020 Self::Unknown => serializer.serialize_i32(0),
21021 Self::GceStockout => serializer.serialize_i32(1),
21022 Self::GkeServiceAccountDeleted => serializer.serialize_i32(2),
21023 Self::GceQuotaExceeded => serializer.serialize_i32(3),
21024 Self::SetByOperator => serializer.serialize_i32(4),
21025 Self::CloudKmsKeyError => serializer.serialize_i32(7),
21026 Self::CaExpiring => serializer.serialize_i32(9),
21027 Self::NodeServiceAccountMissingPermissions => serializer.serialize_i32(10),
21028 Self::CloudKmsKeyDestroyed => serializer.serialize_i32(11),
21029 Self::UnknownValue(u) => u.0.serialize(serializer),
21030 }
21031 }
21032 }
21033
21034 impl<'de> serde::de::Deserialize<'de> for Code {
21035 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21036 where
21037 D: serde::Deserializer<'de>,
21038 {
21039 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Code>::new(
21040 ".google.container.v1.StatusCondition.Code",
21041 ))
21042 }
21043 }
21044}
21045
21046#[derive(Clone, Default, PartialEq)]
21048#[non_exhaustive]
21049pub struct NetworkConfig {
21050 pub network: std::string::String,
21055
21056 pub subnetwork: std::string::String,
21061
21062 pub enable_intra_node_visibility: bool,
21065
21066 pub default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
21071
21072 pub enable_l4ilb_subsetting: bool,
21074
21075 pub datapath_provider: crate::model::DatapathProvider,
21078
21079 pub private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
21083
21084 pub dns_config: std::option::Option<crate::model::DNSConfig>,
21086
21087 pub service_external_ips_config: std::option::Option<crate::model::ServiceExternalIPsConfig>,
21090
21091 pub gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
21094
21095 pub enable_multi_networking: bool,
21097
21098 pub network_performance_config:
21100 std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
21101
21102 pub enable_fqdn_network_policy: std::option::Option<bool>,
21104
21105 pub in_transit_encryption_config: std::option::Option<crate::model::InTransitEncryptionConfig>,
21108
21109 pub enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
21111
21112 pub default_enable_private_nodes: std::option::Option<bool>,
21120
21121 pub disable_l4_lb_firewall_reconciliation: std::option::Option<bool>,
21123
21124 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21125}
21126
21127impl NetworkConfig {
21128 pub fn new() -> Self {
21129 std::default::Default::default()
21130 }
21131
21132 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21134 self.network = v.into();
21135 self
21136 }
21137
21138 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21140 self.subnetwork = v.into();
21141 self
21142 }
21143
21144 pub fn set_enable_intra_node_visibility<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21146 self.enable_intra_node_visibility = v.into();
21147 self
21148 }
21149
21150 pub fn set_default_snat_status<T>(mut self, v: T) -> Self
21152 where
21153 T: std::convert::Into<crate::model::DefaultSnatStatus>,
21154 {
21155 self.default_snat_status = std::option::Option::Some(v.into());
21156 self
21157 }
21158
21159 pub fn set_or_clear_default_snat_status<T>(mut self, v: std::option::Option<T>) -> Self
21161 where
21162 T: std::convert::Into<crate::model::DefaultSnatStatus>,
21163 {
21164 self.default_snat_status = v.map(|x| x.into());
21165 self
21166 }
21167
21168 pub fn set_enable_l4ilb_subsetting<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21170 self.enable_l4ilb_subsetting = v.into();
21171 self
21172 }
21173
21174 pub fn set_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
21176 mut self,
21177 v: T,
21178 ) -> Self {
21179 self.datapath_provider = v.into();
21180 self
21181 }
21182
21183 pub fn set_private_ipv6_google_access<
21185 T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
21186 >(
21187 mut self,
21188 v: T,
21189 ) -> Self {
21190 self.private_ipv6_google_access = v.into();
21191 self
21192 }
21193
21194 pub fn set_dns_config<T>(mut self, v: T) -> Self
21196 where
21197 T: std::convert::Into<crate::model::DNSConfig>,
21198 {
21199 self.dns_config = std::option::Option::Some(v.into());
21200 self
21201 }
21202
21203 pub fn set_or_clear_dns_config<T>(mut self, v: std::option::Option<T>) -> Self
21205 where
21206 T: std::convert::Into<crate::model::DNSConfig>,
21207 {
21208 self.dns_config = v.map(|x| x.into());
21209 self
21210 }
21211
21212 pub fn set_service_external_ips_config<T>(mut self, v: T) -> Self
21214 where
21215 T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
21216 {
21217 self.service_external_ips_config = std::option::Option::Some(v.into());
21218 self
21219 }
21220
21221 pub fn set_or_clear_service_external_ips_config<T>(mut self, v: std::option::Option<T>) -> Self
21223 where
21224 T: std::convert::Into<crate::model::ServiceExternalIPsConfig>,
21225 {
21226 self.service_external_ips_config = v.map(|x| x.into());
21227 self
21228 }
21229
21230 pub fn set_gateway_api_config<T>(mut self, v: T) -> Self
21232 where
21233 T: std::convert::Into<crate::model::GatewayAPIConfig>,
21234 {
21235 self.gateway_api_config = std::option::Option::Some(v.into());
21236 self
21237 }
21238
21239 pub fn set_or_clear_gateway_api_config<T>(mut self, v: std::option::Option<T>) -> Self
21241 where
21242 T: std::convert::Into<crate::model::GatewayAPIConfig>,
21243 {
21244 self.gateway_api_config = v.map(|x| x.into());
21245 self
21246 }
21247
21248 pub fn set_enable_multi_networking<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21250 self.enable_multi_networking = v.into();
21251 self
21252 }
21253
21254 pub fn set_network_performance_config<T>(mut self, v: T) -> Self
21256 where
21257 T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
21258 {
21259 self.network_performance_config = std::option::Option::Some(v.into());
21260 self
21261 }
21262
21263 pub fn set_or_clear_network_performance_config<T>(mut self, v: std::option::Option<T>) -> Self
21265 where
21266 T: std::convert::Into<crate::model::network_config::ClusterNetworkPerformanceConfig>,
21267 {
21268 self.network_performance_config = v.map(|x| x.into());
21269 self
21270 }
21271
21272 pub fn set_enable_fqdn_network_policy<T>(mut self, v: T) -> Self
21274 where
21275 T: std::convert::Into<bool>,
21276 {
21277 self.enable_fqdn_network_policy = std::option::Option::Some(v.into());
21278 self
21279 }
21280
21281 pub fn set_or_clear_enable_fqdn_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
21283 where
21284 T: std::convert::Into<bool>,
21285 {
21286 self.enable_fqdn_network_policy = v.map(|x| x.into());
21287 self
21288 }
21289
21290 pub fn set_in_transit_encryption_config<T>(mut self, v: T) -> Self
21292 where
21293 T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
21294 {
21295 self.in_transit_encryption_config = std::option::Option::Some(v.into());
21296 self
21297 }
21298
21299 pub fn set_or_clear_in_transit_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
21301 where
21302 T: std::convert::Into<crate::model::InTransitEncryptionConfig>,
21303 {
21304 self.in_transit_encryption_config = v.map(|x| x.into());
21305 self
21306 }
21307
21308 pub fn set_enable_cilium_clusterwide_network_policy<T>(mut self, v: T) -> Self
21310 where
21311 T: std::convert::Into<bool>,
21312 {
21313 self.enable_cilium_clusterwide_network_policy = std::option::Option::Some(v.into());
21314 self
21315 }
21316
21317 pub fn set_or_clear_enable_cilium_clusterwide_network_policy<T>(
21319 mut self,
21320 v: std::option::Option<T>,
21321 ) -> Self
21322 where
21323 T: std::convert::Into<bool>,
21324 {
21325 self.enable_cilium_clusterwide_network_policy = v.map(|x| x.into());
21326 self
21327 }
21328
21329 pub fn set_default_enable_private_nodes<T>(mut self, v: T) -> Self
21331 where
21332 T: std::convert::Into<bool>,
21333 {
21334 self.default_enable_private_nodes = std::option::Option::Some(v.into());
21335 self
21336 }
21337
21338 pub fn set_or_clear_default_enable_private_nodes<T>(mut self, v: std::option::Option<T>) -> Self
21340 where
21341 T: std::convert::Into<bool>,
21342 {
21343 self.default_enable_private_nodes = v.map(|x| x.into());
21344 self
21345 }
21346
21347 pub fn set_disable_l4_lb_firewall_reconciliation<T>(mut self, v: T) -> Self
21349 where
21350 T: std::convert::Into<bool>,
21351 {
21352 self.disable_l4_lb_firewall_reconciliation = std::option::Option::Some(v.into());
21353 self
21354 }
21355
21356 pub fn set_or_clear_disable_l4_lb_firewall_reconciliation<T>(
21358 mut self,
21359 v: std::option::Option<T>,
21360 ) -> Self
21361 where
21362 T: std::convert::Into<bool>,
21363 {
21364 self.disable_l4_lb_firewall_reconciliation = v.map(|x| x.into());
21365 self
21366 }
21367}
21368
21369impl wkt::message::Message for NetworkConfig {
21370 fn typename() -> &'static str {
21371 "type.googleapis.com/google.container.v1.NetworkConfig"
21372 }
21373}
21374
21375pub mod network_config {
21377 #[allow(unused_imports)]
21378 use super::*;
21379
21380 #[derive(Clone, Default, PartialEq)]
21382 #[non_exhaustive]
21383 pub struct ClusterNetworkPerformanceConfig {
21384 pub total_egress_bandwidth_tier: std::option::Option<
21386 crate::model::network_config::cluster_network_performance_config::Tier,
21387 >,
21388
21389 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21390 }
21391
21392 impl ClusterNetworkPerformanceConfig {
21393 pub fn new() -> Self {
21394 std::default::Default::default()
21395 }
21396
21397 pub fn set_total_egress_bandwidth_tier<T>(mut self, v: T) -> Self
21399 where
21400 T: std::convert::Into<
21401 crate::model::network_config::cluster_network_performance_config::Tier,
21402 >,
21403 {
21404 self.total_egress_bandwidth_tier = std::option::Option::Some(v.into());
21405 self
21406 }
21407
21408 pub fn set_or_clear_total_egress_bandwidth_tier<T>(
21410 mut self,
21411 v: std::option::Option<T>,
21412 ) -> Self
21413 where
21414 T: std::convert::Into<
21415 crate::model::network_config::cluster_network_performance_config::Tier,
21416 >,
21417 {
21418 self.total_egress_bandwidth_tier = v.map(|x| x.into());
21419 self
21420 }
21421 }
21422
21423 impl wkt::message::Message for ClusterNetworkPerformanceConfig {
21424 fn typename() -> &'static str {
21425 "type.googleapis.com/google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig"
21426 }
21427 }
21428
21429 pub mod cluster_network_performance_config {
21431 #[allow(unused_imports)]
21432 use super::*;
21433
21434 #[derive(Clone, Debug, PartialEq)]
21450 #[non_exhaustive]
21451 pub enum Tier {
21452 Unspecified,
21454 Tier1,
21456 UnknownValue(tier::UnknownValue),
21461 }
21462
21463 #[doc(hidden)]
21464 pub mod tier {
21465 #[allow(unused_imports)]
21466 use super::*;
21467 #[derive(Clone, Debug, PartialEq)]
21468 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21469 }
21470
21471 impl Tier {
21472 pub fn value(&self) -> std::option::Option<i32> {
21477 match self {
21478 Self::Unspecified => std::option::Option::Some(0),
21479 Self::Tier1 => std::option::Option::Some(1),
21480 Self::UnknownValue(u) => u.0.value(),
21481 }
21482 }
21483
21484 pub fn name(&self) -> std::option::Option<&str> {
21489 match self {
21490 Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
21491 Self::Tier1 => std::option::Option::Some("TIER_1"),
21492 Self::UnknownValue(u) => u.0.name(),
21493 }
21494 }
21495 }
21496
21497 impl std::default::Default for Tier {
21498 fn default() -> Self {
21499 use std::convert::From;
21500 Self::from(0)
21501 }
21502 }
21503
21504 impl std::fmt::Display for Tier {
21505 fn fmt(
21506 &self,
21507 f: &mut std::fmt::Formatter<'_>,
21508 ) -> std::result::Result<(), std::fmt::Error> {
21509 wkt::internal::display_enum(f, self.name(), self.value())
21510 }
21511 }
21512
21513 impl std::convert::From<i32> for Tier {
21514 fn from(value: i32) -> Self {
21515 match value {
21516 0 => Self::Unspecified,
21517 1 => Self::Tier1,
21518 _ => Self::UnknownValue(tier::UnknownValue(
21519 wkt::internal::UnknownEnumValue::Integer(value),
21520 )),
21521 }
21522 }
21523 }
21524
21525 impl std::convert::From<&str> for Tier {
21526 fn from(value: &str) -> Self {
21527 use std::string::ToString;
21528 match value {
21529 "TIER_UNSPECIFIED" => Self::Unspecified,
21530 "TIER_1" => Self::Tier1,
21531 _ => Self::UnknownValue(tier::UnknownValue(
21532 wkt::internal::UnknownEnumValue::String(value.to_string()),
21533 )),
21534 }
21535 }
21536 }
21537
21538 impl serde::ser::Serialize for Tier {
21539 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21540 where
21541 S: serde::Serializer,
21542 {
21543 match self {
21544 Self::Unspecified => serializer.serialize_i32(0),
21545 Self::Tier1 => serializer.serialize_i32(1),
21546 Self::UnknownValue(u) => u.0.serialize(serializer),
21547 }
21548 }
21549 }
21550
21551 impl<'de> serde::de::Deserialize<'de> for Tier {
21552 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21553 where
21554 D: serde::Deserializer<'de>,
21555 {
21556 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
21557 ".google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier",
21558 ))
21559 }
21560 }
21561 }
21562}
21563
21564#[derive(Clone, Default, PartialEq)]
21566#[non_exhaustive]
21567pub struct GatewayAPIConfig {
21568 pub channel: crate::model::gateway_api_config::Channel,
21570
21571 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21572}
21573
21574impl GatewayAPIConfig {
21575 pub fn new() -> Self {
21576 std::default::Default::default()
21577 }
21578
21579 pub fn set_channel<T: std::convert::Into<crate::model::gateway_api_config::Channel>>(
21581 mut self,
21582 v: T,
21583 ) -> Self {
21584 self.channel = v.into();
21585 self
21586 }
21587}
21588
21589impl wkt::message::Message for GatewayAPIConfig {
21590 fn typename() -> &'static str {
21591 "type.googleapis.com/google.container.v1.GatewayAPIConfig"
21592 }
21593}
21594
21595pub mod gateway_api_config {
21597 #[allow(unused_imports)]
21598 use super::*;
21599
21600 #[derive(Clone, Debug, PartialEq)]
21617 #[non_exhaustive]
21618 pub enum Channel {
21619 Unspecified,
21621 Disabled,
21623 #[deprecated]
21626 Experimental,
21627 Standard,
21629 UnknownValue(channel::UnknownValue),
21634 }
21635
21636 #[doc(hidden)]
21637 pub mod channel {
21638 #[allow(unused_imports)]
21639 use super::*;
21640 #[derive(Clone, Debug, PartialEq)]
21641 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21642 }
21643
21644 impl Channel {
21645 pub fn value(&self) -> std::option::Option<i32> {
21650 match self {
21651 Self::Unspecified => std::option::Option::Some(0),
21652 Self::Disabled => std::option::Option::Some(1),
21653 Self::Experimental => std::option::Option::Some(3),
21654 Self::Standard => std::option::Option::Some(4),
21655 Self::UnknownValue(u) => u.0.value(),
21656 }
21657 }
21658
21659 pub fn name(&self) -> std::option::Option<&str> {
21664 match self {
21665 Self::Unspecified => std::option::Option::Some("CHANNEL_UNSPECIFIED"),
21666 Self::Disabled => std::option::Option::Some("CHANNEL_DISABLED"),
21667 Self::Experimental => std::option::Option::Some("CHANNEL_EXPERIMENTAL"),
21668 Self::Standard => std::option::Option::Some("CHANNEL_STANDARD"),
21669 Self::UnknownValue(u) => u.0.name(),
21670 }
21671 }
21672 }
21673
21674 impl std::default::Default for Channel {
21675 fn default() -> Self {
21676 use std::convert::From;
21677 Self::from(0)
21678 }
21679 }
21680
21681 impl std::fmt::Display for Channel {
21682 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21683 wkt::internal::display_enum(f, self.name(), self.value())
21684 }
21685 }
21686
21687 impl std::convert::From<i32> for Channel {
21688 fn from(value: i32) -> Self {
21689 match value {
21690 0 => Self::Unspecified,
21691 1 => Self::Disabled,
21692 3 => Self::Experimental,
21693 4 => Self::Standard,
21694 _ => Self::UnknownValue(channel::UnknownValue(
21695 wkt::internal::UnknownEnumValue::Integer(value),
21696 )),
21697 }
21698 }
21699 }
21700
21701 impl std::convert::From<&str> for Channel {
21702 fn from(value: &str) -> Self {
21703 use std::string::ToString;
21704 match value {
21705 "CHANNEL_UNSPECIFIED" => Self::Unspecified,
21706 "CHANNEL_DISABLED" => Self::Disabled,
21707 "CHANNEL_EXPERIMENTAL" => Self::Experimental,
21708 "CHANNEL_STANDARD" => Self::Standard,
21709 _ => Self::UnknownValue(channel::UnknownValue(
21710 wkt::internal::UnknownEnumValue::String(value.to_string()),
21711 )),
21712 }
21713 }
21714 }
21715
21716 impl serde::ser::Serialize for Channel {
21717 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21718 where
21719 S: serde::Serializer,
21720 {
21721 match self {
21722 Self::Unspecified => serializer.serialize_i32(0),
21723 Self::Disabled => serializer.serialize_i32(1),
21724 Self::Experimental => serializer.serialize_i32(3),
21725 Self::Standard => serializer.serialize_i32(4),
21726 Self::UnknownValue(u) => u.0.serialize(serializer),
21727 }
21728 }
21729 }
21730
21731 impl<'de> serde::de::Deserialize<'de> for Channel {
21732 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21733 where
21734 D: serde::Deserializer<'de>,
21735 {
21736 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
21737 ".google.container.v1.GatewayAPIConfig.Channel",
21738 ))
21739 }
21740 }
21741}
21742
21743#[derive(Clone, Default, PartialEq)]
21745#[non_exhaustive]
21746pub struct ServiceExternalIPsConfig {
21747 pub enabled: bool,
21749
21750 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21751}
21752
21753impl ServiceExternalIPsConfig {
21754 pub fn new() -> Self {
21755 std::default::Default::default()
21756 }
21757
21758 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21760 self.enabled = v.into();
21761 self
21762 }
21763}
21764
21765impl wkt::message::Message for ServiceExternalIPsConfig {
21766 fn typename() -> &'static str {
21767 "type.googleapis.com/google.container.v1.ServiceExternalIPsConfig"
21768 }
21769}
21770
21771#[derive(Clone, Default, PartialEq)]
21774#[non_exhaustive]
21775pub struct GetOpenIDConfigRequest {
21776 pub parent: std::string::String,
21779
21780 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21781}
21782
21783impl GetOpenIDConfigRequest {
21784 pub fn new() -> Self {
21785 std::default::Default::default()
21786 }
21787
21788 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21790 self.parent = v.into();
21791 self
21792 }
21793}
21794
21795impl wkt::message::Message for GetOpenIDConfigRequest {
21796 fn typename() -> &'static str {
21797 "type.googleapis.com/google.container.v1.GetOpenIDConfigRequest"
21798 }
21799}
21800
21801#[derive(Clone, Default, PartialEq)]
21804#[non_exhaustive]
21805pub struct GetOpenIDConfigResponse {
21806 pub issuer: std::string::String,
21808
21809 pub jwks_uri: std::string::String,
21811
21812 pub response_types_supported: std::vec::Vec<std::string::String>,
21814
21815 pub subject_types_supported: std::vec::Vec<std::string::String>,
21817
21818 pub id_token_signing_alg_values_supported: std::vec::Vec<std::string::String>,
21820
21821 pub claims_supported: std::vec::Vec<std::string::String>,
21823
21824 pub grant_types: std::vec::Vec<std::string::String>,
21826
21827 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21828}
21829
21830impl GetOpenIDConfigResponse {
21831 pub fn new() -> Self {
21832 std::default::Default::default()
21833 }
21834
21835 pub fn set_issuer<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21837 self.issuer = v.into();
21838 self
21839 }
21840
21841 pub fn set_jwks_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21843 self.jwks_uri = v.into();
21844 self
21845 }
21846
21847 pub fn set_response_types_supported<T, V>(mut self, v: T) -> Self
21849 where
21850 T: std::iter::IntoIterator<Item = V>,
21851 V: std::convert::Into<std::string::String>,
21852 {
21853 use std::iter::Iterator;
21854 self.response_types_supported = v.into_iter().map(|i| i.into()).collect();
21855 self
21856 }
21857
21858 pub fn set_subject_types_supported<T, V>(mut self, v: T) -> Self
21860 where
21861 T: std::iter::IntoIterator<Item = V>,
21862 V: std::convert::Into<std::string::String>,
21863 {
21864 use std::iter::Iterator;
21865 self.subject_types_supported = v.into_iter().map(|i| i.into()).collect();
21866 self
21867 }
21868
21869 pub fn set_id_token_signing_alg_values_supported<T, V>(mut self, v: T) -> Self
21871 where
21872 T: std::iter::IntoIterator<Item = V>,
21873 V: std::convert::Into<std::string::String>,
21874 {
21875 use std::iter::Iterator;
21876 self.id_token_signing_alg_values_supported = v.into_iter().map(|i| i.into()).collect();
21877 self
21878 }
21879
21880 pub fn set_claims_supported<T, V>(mut self, v: T) -> Self
21882 where
21883 T: std::iter::IntoIterator<Item = V>,
21884 V: std::convert::Into<std::string::String>,
21885 {
21886 use std::iter::Iterator;
21887 self.claims_supported = v.into_iter().map(|i| i.into()).collect();
21888 self
21889 }
21890
21891 pub fn set_grant_types<T, V>(mut self, v: T) -> Self
21893 where
21894 T: std::iter::IntoIterator<Item = V>,
21895 V: std::convert::Into<std::string::String>,
21896 {
21897 use std::iter::Iterator;
21898 self.grant_types = v.into_iter().map(|i| i.into()).collect();
21899 self
21900 }
21901}
21902
21903impl wkt::message::Message for GetOpenIDConfigResponse {
21904 fn typename() -> &'static str {
21905 "type.googleapis.com/google.container.v1.GetOpenIDConfigResponse"
21906 }
21907}
21908
21909#[derive(Clone, Default, PartialEq)]
21914#[non_exhaustive]
21915pub struct GetJSONWebKeysRequest {
21916 pub parent: std::string::String,
21919
21920 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21921}
21922
21923impl GetJSONWebKeysRequest {
21924 pub fn new() -> Self {
21925 std::default::Default::default()
21926 }
21927
21928 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21930 self.parent = v.into();
21931 self
21932 }
21933}
21934
21935impl wkt::message::Message for GetJSONWebKeysRequest {
21936 fn typename() -> &'static str {
21937 "type.googleapis.com/google.container.v1.GetJSONWebKeysRequest"
21938 }
21939}
21940
21941#[derive(Clone, Default, PartialEq)]
21943#[non_exhaustive]
21944pub struct Jwk {
21945 pub kty: std::string::String,
21947
21948 pub alg: std::string::String,
21950
21951 pub r#use: std::string::String,
21953
21954 pub kid: std::string::String,
21956
21957 pub n: std::string::String,
21959
21960 pub e: std::string::String,
21962
21963 pub x: std::string::String,
21965
21966 pub y: std::string::String,
21968
21969 pub crv: std::string::String,
21971
21972 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21973}
21974
21975impl Jwk {
21976 pub fn new() -> Self {
21977 std::default::Default::default()
21978 }
21979
21980 pub fn set_kty<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21982 self.kty = v.into();
21983 self
21984 }
21985
21986 pub fn set_alg<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21988 self.alg = v.into();
21989 self
21990 }
21991
21992 pub fn set_use<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21994 self.r#use = v.into();
21995 self
21996 }
21997
21998 pub fn set_kid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22000 self.kid = v.into();
22001 self
22002 }
22003
22004 pub fn set_n<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22006 self.n = v.into();
22007 self
22008 }
22009
22010 pub fn set_e<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22012 self.e = v.into();
22013 self
22014 }
22015
22016 pub fn set_x<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22018 self.x = v.into();
22019 self
22020 }
22021
22022 pub fn set_y<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22024 self.y = v.into();
22025 self
22026 }
22027
22028 pub fn set_crv<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22030 self.crv = v.into();
22031 self
22032 }
22033}
22034
22035impl wkt::message::Message for Jwk {
22036 fn typename() -> &'static str {
22037 "type.googleapis.com/google.container.v1.Jwk"
22038 }
22039}
22040
22041#[derive(Clone, Default, PartialEq)]
22043#[non_exhaustive]
22044pub struct GetJSONWebKeysResponse {
22045 pub keys: std::vec::Vec<crate::model::Jwk>,
22048
22049 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22050}
22051
22052impl GetJSONWebKeysResponse {
22053 pub fn new() -> Self {
22054 std::default::Default::default()
22055 }
22056
22057 pub fn set_keys<T, V>(mut self, v: T) -> Self
22059 where
22060 T: std::iter::IntoIterator<Item = V>,
22061 V: std::convert::Into<crate::model::Jwk>,
22062 {
22063 use std::iter::Iterator;
22064 self.keys = v.into_iter().map(|i| i.into()).collect();
22065 self
22066 }
22067}
22068
22069impl wkt::message::Message for GetJSONWebKeysResponse {
22070 fn typename() -> &'static str {
22071 "type.googleapis.com/google.container.v1.GetJSONWebKeysResponse"
22072 }
22073}
22074
22075#[derive(Clone, Default, PartialEq)]
22078#[non_exhaustive]
22079pub struct CheckAutopilotCompatibilityRequest {
22080 pub name: std::string::String,
22083
22084 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22085}
22086
22087impl CheckAutopilotCompatibilityRequest {
22088 pub fn new() -> Self {
22089 std::default::Default::default()
22090 }
22091
22092 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22094 self.name = v.into();
22095 self
22096 }
22097}
22098
22099impl wkt::message::Message for CheckAutopilotCompatibilityRequest {
22100 fn typename() -> &'static str {
22101 "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityRequest"
22102 }
22103}
22104
22105#[derive(Clone, Default, PartialEq)]
22108#[non_exhaustive]
22109pub struct AutopilotCompatibilityIssue {
22110 pub last_observation: std::option::Option<wkt::Timestamp>,
22112
22113 pub constraint_type: std::string::String,
22115
22116 pub incompatibility_type: crate::model::autopilot_compatibility_issue::IssueType,
22118
22119 pub subjects: std::vec::Vec<std::string::String>,
22121
22122 pub documentation_url: std::string::String,
22124
22125 pub description: std::string::String,
22127
22128 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22129}
22130
22131impl AutopilotCompatibilityIssue {
22132 pub fn new() -> Self {
22133 std::default::Default::default()
22134 }
22135
22136 pub fn set_last_observation<T>(mut self, v: T) -> Self
22138 where
22139 T: std::convert::Into<wkt::Timestamp>,
22140 {
22141 self.last_observation = std::option::Option::Some(v.into());
22142 self
22143 }
22144
22145 pub fn set_or_clear_last_observation<T>(mut self, v: std::option::Option<T>) -> Self
22147 where
22148 T: std::convert::Into<wkt::Timestamp>,
22149 {
22150 self.last_observation = v.map(|x| x.into());
22151 self
22152 }
22153
22154 pub fn set_constraint_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22156 self.constraint_type = v.into();
22157 self
22158 }
22159
22160 pub fn set_incompatibility_type<
22162 T: std::convert::Into<crate::model::autopilot_compatibility_issue::IssueType>,
22163 >(
22164 mut self,
22165 v: T,
22166 ) -> Self {
22167 self.incompatibility_type = v.into();
22168 self
22169 }
22170
22171 pub fn set_subjects<T, V>(mut self, v: T) -> Self
22173 where
22174 T: std::iter::IntoIterator<Item = V>,
22175 V: std::convert::Into<std::string::String>,
22176 {
22177 use std::iter::Iterator;
22178 self.subjects = v.into_iter().map(|i| i.into()).collect();
22179 self
22180 }
22181
22182 pub fn set_documentation_url<T: std::convert::Into<std::string::String>>(
22184 mut self,
22185 v: T,
22186 ) -> Self {
22187 self.documentation_url = v.into();
22188 self
22189 }
22190
22191 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22193 self.description = v.into();
22194 self
22195 }
22196}
22197
22198impl wkt::message::Message for AutopilotCompatibilityIssue {
22199 fn typename() -> &'static str {
22200 "type.googleapis.com/google.container.v1.AutopilotCompatibilityIssue"
22201 }
22202}
22203
22204pub mod autopilot_compatibility_issue {
22206 #[allow(unused_imports)]
22207 use super::*;
22208
22209 #[derive(Clone, Debug, PartialEq)]
22225 #[non_exhaustive]
22226 pub enum IssueType {
22227 Unspecified,
22229 Incompatibility,
22232 AdditionalConfigRequired,
22235 PassedWithOptionalConfig,
22239 UnknownValue(issue_type::UnknownValue),
22244 }
22245
22246 #[doc(hidden)]
22247 pub mod issue_type {
22248 #[allow(unused_imports)]
22249 use super::*;
22250 #[derive(Clone, Debug, PartialEq)]
22251 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22252 }
22253
22254 impl IssueType {
22255 pub fn value(&self) -> std::option::Option<i32> {
22260 match self {
22261 Self::Unspecified => std::option::Option::Some(0),
22262 Self::Incompatibility => std::option::Option::Some(1),
22263 Self::AdditionalConfigRequired => std::option::Option::Some(2),
22264 Self::PassedWithOptionalConfig => std::option::Option::Some(3),
22265 Self::UnknownValue(u) => u.0.value(),
22266 }
22267 }
22268
22269 pub fn name(&self) -> std::option::Option<&str> {
22274 match self {
22275 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
22276 Self::Incompatibility => std::option::Option::Some("INCOMPATIBILITY"),
22277 Self::AdditionalConfigRequired => {
22278 std::option::Option::Some("ADDITIONAL_CONFIG_REQUIRED")
22279 }
22280 Self::PassedWithOptionalConfig => {
22281 std::option::Option::Some("PASSED_WITH_OPTIONAL_CONFIG")
22282 }
22283 Self::UnknownValue(u) => u.0.name(),
22284 }
22285 }
22286 }
22287
22288 impl std::default::Default for IssueType {
22289 fn default() -> Self {
22290 use std::convert::From;
22291 Self::from(0)
22292 }
22293 }
22294
22295 impl std::fmt::Display for IssueType {
22296 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22297 wkt::internal::display_enum(f, self.name(), self.value())
22298 }
22299 }
22300
22301 impl std::convert::From<i32> for IssueType {
22302 fn from(value: i32) -> Self {
22303 match value {
22304 0 => Self::Unspecified,
22305 1 => Self::Incompatibility,
22306 2 => Self::AdditionalConfigRequired,
22307 3 => Self::PassedWithOptionalConfig,
22308 _ => Self::UnknownValue(issue_type::UnknownValue(
22309 wkt::internal::UnknownEnumValue::Integer(value),
22310 )),
22311 }
22312 }
22313 }
22314
22315 impl std::convert::From<&str> for IssueType {
22316 fn from(value: &str) -> Self {
22317 use std::string::ToString;
22318 match value {
22319 "UNSPECIFIED" => Self::Unspecified,
22320 "INCOMPATIBILITY" => Self::Incompatibility,
22321 "ADDITIONAL_CONFIG_REQUIRED" => Self::AdditionalConfigRequired,
22322 "PASSED_WITH_OPTIONAL_CONFIG" => Self::PassedWithOptionalConfig,
22323 _ => Self::UnknownValue(issue_type::UnknownValue(
22324 wkt::internal::UnknownEnumValue::String(value.to_string()),
22325 )),
22326 }
22327 }
22328 }
22329
22330 impl serde::ser::Serialize for IssueType {
22331 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22332 where
22333 S: serde::Serializer,
22334 {
22335 match self {
22336 Self::Unspecified => serializer.serialize_i32(0),
22337 Self::Incompatibility => serializer.serialize_i32(1),
22338 Self::AdditionalConfigRequired => serializer.serialize_i32(2),
22339 Self::PassedWithOptionalConfig => serializer.serialize_i32(3),
22340 Self::UnknownValue(u) => u.0.serialize(serializer),
22341 }
22342 }
22343 }
22344
22345 impl<'de> serde::de::Deserialize<'de> for IssueType {
22346 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22347 where
22348 D: serde::Deserializer<'de>,
22349 {
22350 deserializer.deserialize_any(wkt::internal::EnumVisitor::<IssueType>::new(
22351 ".google.container.v1.AutopilotCompatibilityIssue.IssueType",
22352 ))
22353 }
22354 }
22355}
22356
22357#[derive(Clone, Default, PartialEq)]
22359#[non_exhaustive]
22360pub struct CheckAutopilotCompatibilityResponse {
22361 pub issues: std::vec::Vec<crate::model::AutopilotCompatibilityIssue>,
22363
22364 pub summary: std::string::String,
22366
22367 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22368}
22369
22370impl CheckAutopilotCompatibilityResponse {
22371 pub fn new() -> Self {
22372 std::default::Default::default()
22373 }
22374
22375 pub fn set_issues<T, V>(mut self, v: T) -> Self
22377 where
22378 T: std::iter::IntoIterator<Item = V>,
22379 V: std::convert::Into<crate::model::AutopilotCompatibilityIssue>,
22380 {
22381 use std::iter::Iterator;
22382 self.issues = v.into_iter().map(|i| i.into()).collect();
22383 self
22384 }
22385
22386 pub fn set_summary<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22388 self.summary = v.into();
22389 self
22390 }
22391}
22392
22393impl wkt::message::Message for CheckAutopilotCompatibilityResponse {
22394 fn typename() -> &'static str {
22395 "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityResponse"
22396 }
22397}
22398
22399#[derive(Clone, Default, PartialEq)]
22406#[non_exhaustive]
22407pub struct ReleaseChannel {
22408 pub channel: crate::model::release_channel::Channel,
22410
22411 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22412}
22413
22414impl ReleaseChannel {
22415 pub fn new() -> Self {
22416 std::default::Default::default()
22417 }
22418
22419 pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
22421 mut self,
22422 v: T,
22423 ) -> Self {
22424 self.channel = v.into();
22425 self
22426 }
22427}
22428
22429impl wkt::message::Message for ReleaseChannel {
22430 fn typename() -> &'static str {
22431 "type.googleapis.com/google.container.v1.ReleaseChannel"
22432 }
22433}
22434
22435pub mod release_channel {
22437 #[allow(unused_imports)]
22438 use super::*;
22439
22440 #[derive(Clone, Debug, PartialEq)]
22456 #[non_exhaustive]
22457 pub enum Channel {
22458 Unspecified,
22460 Rapid,
22467 Regular,
22471 Stable,
22474 Extended,
22477 UnknownValue(channel::UnknownValue),
22482 }
22483
22484 #[doc(hidden)]
22485 pub mod channel {
22486 #[allow(unused_imports)]
22487 use super::*;
22488 #[derive(Clone, Debug, PartialEq)]
22489 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22490 }
22491
22492 impl Channel {
22493 pub fn value(&self) -> std::option::Option<i32> {
22498 match self {
22499 Self::Unspecified => std::option::Option::Some(0),
22500 Self::Rapid => std::option::Option::Some(1),
22501 Self::Regular => std::option::Option::Some(2),
22502 Self::Stable => std::option::Option::Some(3),
22503 Self::Extended => std::option::Option::Some(4),
22504 Self::UnknownValue(u) => u.0.value(),
22505 }
22506 }
22507
22508 pub fn name(&self) -> std::option::Option<&str> {
22513 match self {
22514 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
22515 Self::Rapid => std::option::Option::Some("RAPID"),
22516 Self::Regular => std::option::Option::Some("REGULAR"),
22517 Self::Stable => std::option::Option::Some("STABLE"),
22518 Self::Extended => std::option::Option::Some("EXTENDED"),
22519 Self::UnknownValue(u) => u.0.name(),
22520 }
22521 }
22522 }
22523
22524 impl std::default::Default for Channel {
22525 fn default() -> Self {
22526 use std::convert::From;
22527 Self::from(0)
22528 }
22529 }
22530
22531 impl std::fmt::Display for Channel {
22532 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22533 wkt::internal::display_enum(f, self.name(), self.value())
22534 }
22535 }
22536
22537 impl std::convert::From<i32> for Channel {
22538 fn from(value: i32) -> Self {
22539 match value {
22540 0 => Self::Unspecified,
22541 1 => Self::Rapid,
22542 2 => Self::Regular,
22543 3 => Self::Stable,
22544 4 => Self::Extended,
22545 _ => Self::UnknownValue(channel::UnknownValue(
22546 wkt::internal::UnknownEnumValue::Integer(value),
22547 )),
22548 }
22549 }
22550 }
22551
22552 impl std::convert::From<&str> for Channel {
22553 fn from(value: &str) -> Self {
22554 use std::string::ToString;
22555 match value {
22556 "UNSPECIFIED" => Self::Unspecified,
22557 "RAPID" => Self::Rapid,
22558 "REGULAR" => Self::Regular,
22559 "STABLE" => Self::Stable,
22560 "EXTENDED" => Self::Extended,
22561 _ => Self::UnknownValue(channel::UnknownValue(
22562 wkt::internal::UnknownEnumValue::String(value.to_string()),
22563 )),
22564 }
22565 }
22566 }
22567
22568 impl serde::ser::Serialize for Channel {
22569 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22570 where
22571 S: serde::Serializer,
22572 {
22573 match self {
22574 Self::Unspecified => serializer.serialize_i32(0),
22575 Self::Rapid => serializer.serialize_i32(1),
22576 Self::Regular => serializer.serialize_i32(2),
22577 Self::Stable => serializer.serialize_i32(3),
22578 Self::Extended => serializer.serialize_i32(4),
22579 Self::UnknownValue(u) => u.0.serialize(serializer),
22580 }
22581 }
22582 }
22583
22584 impl<'de> serde::de::Deserialize<'de> for Channel {
22585 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22586 where
22587 D: serde::Deserializer<'de>,
22588 {
22589 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
22590 ".google.container.v1.ReleaseChannel.Channel",
22591 ))
22592 }
22593 }
22594}
22595
22596#[derive(Clone, Default, PartialEq)]
22598#[non_exhaustive]
22599pub struct CostManagementConfig {
22600 pub enabled: bool,
22602
22603 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22604}
22605
22606impl CostManagementConfig {
22607 pub fn new() -> Self {
22608 std::default::Default::default()
22609 }
22610
22611 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22613 self.enabled = v.into();
22614 self
22615 }
22616}
22617
22618impl wkt::message::Message for CostManagementConfig {
22619 fn typename() -> &'static str {
22620 "type.googleapis.com/google.container.v1.CostManagementConfig"
22621 }
22622}
22623
22624#[derive(Clone, Default, PartialEq)]
22627#[non_exhaustive]
22628pub struct IntraNodeVisibilityConfig {
22629 pub enabled: bool,
22631
22632 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22633}
22634
22635impl IntraNodeVisibilityConfig {
22636 pub fn new() -> Self {
22637 std::default::Default::default()
22638 }
22639
22640 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22642 self.enabled = v.into();
22643 self
22644 }
22645}
22646
22647impl wkt::message::Message for IntraNodeVisibilityConfig {
22648 fn typename() -> &'static str {
22649 "type.googleapis.com/google.container.v1.IntraNodeVisibilityConfig"
22650 }
22651}
22652
22653#[derive(Clone, Default, PartialEq)]
22656#[non_exhaustive]
22657pub struct ILBSubsettingConfig {
22658 pub enabled: bool,
22660
22661 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22662}
22663
22664impl ILBSubsettingConfig {
22665 pub fn new() -> Self {
22666 std::default::Default::default()
22667 }
22668
22669 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22671 self.enabled = v.into();
22672 self
22673 }
22674}
22675
22676impl wkt::message::Message for ILBSubsettingConfig {
22677 fn typename() -> &'static str {
22678 "type.googleapis.com/google.container.v1.ILBSubsettingConfig"
22679 }
22680}
22681
22682#[derive(Clone, Default, PartialEq)]
22684#[non_exhaustive]
22685pub struct DNSConfig {
22686 pub cluster_dns: crate::model::dns_config::Provider,
22688
22689 pub cluster_dns_scope: crate::model::dns_config::DNSScope,
22691
22692 pub cluster_dns_domain: std::string::String,
22694
22695 pub additive_vpc_scope_dns_domain: std::string::String,
22697
22698 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22699}
22700
22701impl DNSConfig {
22702 pub fn new() -> Self {
22703 std::default::Default::default()
22704 }
22705
22706 pub fn set_cluster_dns<T: std::convert::Into<crate::model::dns_config::Provider>>(
22708 mut self,
22709 v: T,
22710 ) -> Self {
22711 self.cluster_dns = v.into();
22712 self
22713 }
22714
22715 pub fn set_cluster_dns_scope<T: std::convert::Into<crate::model::dns_config::DNSScope>>(
22717 mut self,
22718 v: T,
22719 ) -> Self {
22720 self.cluster_dns_scope = v.into();
22721 self
22722 }
22723
22724 pub fn set_cluster_dns_domain<T: std::convert::Into<std::string::String>>(
22726 mut self,
22727 v: T,
22728 ) -> Self {
22729 self.cluster_dns_domain = v.into();
22730 self
22731 }
22732
22733 pub fn set_additive_vpc_scope_dns_domain<T: std::convert::Into<std::string::String>>(
22735 mut self,
22736 v: T,
22737 ) -> Self {
22738 self.additive_vpc_scope_dns_domain = v.into();
22739 self
22740 }
22741}
22742
22743impl wkt::message::Message for DNSConfig {
22744 fn typename() -> &'static str {
22745 "type.googleapis.com/google.container.v1.DNSConfig"
22746 }
22747}
22748
22749pub mod dns_config {
22751 #[allow(unused_imports)]
22752 use super::*;
22753
22754 #[derive(Clone, Debug, PartialEq)]
22770 #[non_exhaustive]
22771 pub enum Provider {
22772 Unspecified,
22774 PlatformDefault,
22776 CloudDns,
22778 KubeDns,
22780 UnknownValue(provider::UnknownValue),
22785 }
22786
22787 #[doc(hidden)]
22788 pub mod provider {
22789 #[allow(unused_imports)]
22790 use super::*;
22791 #[derive(Clone, Debug, PartialEq)]
22792 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22793 }
22794
22795 impl Provider {
22796 pub fn value(&self) -> std::option::Option<i32> {
22801 match self {
22802 Self::Unspecified => std::option::Option::Some(0),
22803 Self::PlatformDefault => std::option::Option::Some(1),
22804 Self::CloudDns => std::option::Option::Some(2),
22805 Self::KubeDns => std::option::Option::Some(3),
22806 Self::UnknownValue(u) => u.0.value(),
22807 }
22808 }
22809
22810 pub fn name(&self) -> std::option::Option<&str> {
22815 match self {
22816 Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
22817 Self::PlatformDefault => std::option::Option::Some("PLATFORM_DEFAULT"),
22818 Self::CloudDns => std::option::Option::Some("CLOUD_DNS"),
22819 Self::KubeDns => std::option::Option::Some("KUBE_DNS"),
22820 Self::UnknownValue(u) => u.0.name(),
22821 }
22822 }
22823 }
22824
22825 impl std::default::Default for Provider {
22826 fn default() -> Self {
22827 use std::convert::From;
22828 Self::from(0)
22829 }
22830 }
22831
22832 impl std::fmt::Display for Provider {
22833 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22834 wkt::internal::display_enum(f, self.name(), self.value())
22835 }
22836 }
22837
22838 impl std::convert::From<i32> for Provider {
22839 fn from(value: i32) -> Self {
22840 match value {
22841 0 => Self::Unspecified,
22842 1 => Self::PlatformDefault,
22843 2 => Self::CloudDns,
22844 3 => Self::KubeDns,
22845 _ => Self::UnknownValue(provider::UnknownValue(
22846 wkt::internal::UnknownEnumValue::Integer(value),
22847 )),
22848 }
22849 }
22850 }
22851
22852 impl std::convert::From<&str> for Provider {
22853 fn from(value: &str) -> Self {
22854 use std::string::ToString;
22855 match value {
22856 "PROVIDER_UNSPECIFIED" => Self::Unspecified,
22857 "PLATFORM_DEFAULT" => Self::PlatformDefault,
22858 "CLOUD_DNS" => Self::CloudDns,
22859 "KUBE_DNS" => Self::KubeDns,
22860 _ => Self::UnknownValue(provider::UnknownValue(
22861 wkt::internal::UnknownEnumValue::String(value.to_string()),
22862 )),
22863 }
22864 }
22865 }
22866
22867 impl serde::ser::Serialize for Provider {
22868 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22869 where
22870 S: serde::Serializer,
22871 {
22872 match self {
22873 Self::Unspecified => serializer.serialize_i32(0),
22874 Self::PlatformDefault => serializer.serialize_i32(1),
22875 Self::CloudDns => serializer.serialize_i32(2),
22876 Self::KubeDns => serializer.serialize_i32(3),
22877 Self::UnknownValue(u) => u.0.serialize(serializer),
22878 }
22879 }
22880 }
22881
22882 impl<'de> serde::de::Deserialize<'de> for Provider {
22883 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22884 where
22885 D: serde::Deserializer<'de>,
22886 {
22887 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
22888 ".google.container.v1.DNSConfig.Provider",
22889 ))
22890 }
22891 }
22892
22893 #[derive(Clone, Debug, PartialEq)]
22909 #[non_exhaustive]
22910 pub enum DNSScope {
22911 Unspecified,
22913 ClusterScope,
22915 VpcScope,
22917 UnknownValue(dns_scope::UnknownValue),
22922 }
22923
22924 #[doc(hidden)]
22925 pub mod dns_scope {
22926 #[allow(unused_imports)]
22927 use super::*;
22928 #[derive(Clone, Debug, PartialEq)]
22929 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22930 }
22931
22932 impl DNSScope {
22933 pub fn value(&self) -> std::option::Option<i32> {
22938 match self {
22939 Self::Unspecified => std::option::Option::Some(0),
22940 Self::ClusterScope => std::option::Option::Some(1),
22941 Self::VpcScope => std::option::Option::Some(2),
22942 Self::UnknownValue(u) => u.0.value(),
22943 }
22944 }
22945
22946 pub fn name(&self) -> std::option::Option<&str> {
22951 match self {
22952 Self::Unspecified => std::option::Option::Some("DNS_SCOPE_UNSPECIFIED"),
22953 Self::ClusterScope => std::option::Option::Some("CLUSTER_SCOPE"),
22954 Self::VpcScope => std::option::Option::Some("VPC_SCOPE"),
22955 Self::UnknownValue(u) => u.0.name(),
22956 }
22957 }
22958 }
22959
22960 impl std::default::Default for DNSScope {
22961 fn default() -> Self {
22962 use std::convert::From;
22963 Self::from(0)
22964 }
22965 }
22966
22967 impl std::fmt::Display for DNSScope {
22968 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22969 wkt::internal::display_enum(f, self.name(), self.value())
22970 }
22971 }
22972
22973 impl std::convert::From<i32> for DNSScope {
22974 fn from(value: i32) -> Self {
22975 match value {
22976 0 => Self::Unspecified,
22977 1 => Self::ClusterScope,
22978 2 => Self::VpcScope,
22979 _ => Self::UnknownValue(dns_scope::UnknownValue(
22980 wkt::internal::UnknownEnumValue::Integer(value),
22981 )),
22982 }
22983 }
22984 }
22985
22986 impl std::convert::From<&str> for DNSScope {
22987 fn from(value: &str) -> Self {
22988 use std::string::ToString;
22989 match value {
22990 "DNS_SCOPE_UNSPECIFIED" => Self::Unspecified,
22991 "CLUSTER_SCOPE" => Self::ClusterScope,
22992 "VPC_SCOPE" => Self::VpcScope,
22993 _ => Self::UnknownValue(dns_scope::UnknownValue(
22994 wkt::internal::UnknownEnumValue::String(value.to_string()),
22995 )),
22996 }
22997 }
22998 }
22999
23000 impl serde::ser::Serialize for DNSScope {
23001 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23002 where
23003 S: serde::Serializer,
23004 {
23005 match self {
23006 Self::Unspecified => serializer.serialize_i32(0),
23007 Self::ClusterScope => serializer.serialize_i32(1),
23008 Self::VpcScope => serializer.serialize_i32(2),
23009 Self::UnknownValue(u) => u.0.serialize(serializer),
23010 }
23011 }
23012 }
23013
23014 impl<'de> serde::de::Deserialize<'de> for DNSScope {
23015 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23016 where
23017 D: serde::Deserializer<'de>,
23018 {
23019 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DNSScope>::new(
23020 ".google.container.v1.DNSConfig.DNSScope",
23021 ))
23022 }
23023 }
23024}
23025
23026#[derive(Clone, Default, PartialEq)]
23028#[non_exhaustive]
23029pub struct MaxPodsConstraint {
23030 pub max_pods_per_node: i64,
23032
23033 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23034}
23035
23036impl MaxPodsConstraint {
23037 pub fn new() -> Self {
23038 std::default::Default::default()
23039 }
23040
23041 pub fn set_max_pods_per_node<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23043 self.max_pods_per_node = v.into();
23044 self
23045 }
23046}
23047
23048impl wkt::message::Message for MaxPodsConstraint {
23049 fn typename() -> &'static str {
23050 "type.googleapis.com/google.container.v1.MaxPodsConstraint"
23051 }
23052}
23053
23054#[derive(Clone, Default, PartialEq)]
23056#[non_exhaustive]
23057pub struct WorkloadIdentityConfig {
23058 pub workload_pool: std::string::String,
23060
23061 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23062}
23063
23064impl WorkloadIdentityConfig {
23065 pub fn new() -> Self {
23066 std::default::Default::default()
23067 }
23068
23069 pub fn set_workload_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23071 self.workload_pool = v.into();
23072 self
23073 }
23074}
23075
23076impl wkt::message::Message for WorkloadIdentityConfig {
23077 fn typename() -> &'static str {
23078 "type.googleapis.com/google.container.v1.WorkloadIdentityConfig"
23079 }
23080}
23081
23082#[derive(Clone, Default, PartialEq)]
23085#[non_exhaustive]
23086pub struct IdentityServiceConfig {
23087 pub enabled: bool,
23089
23090 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23091}
23092
23093impl IdentityServiceConfig {
23094 pub fn new() -> Self {
23095 std::default::Default::default()
23096 }
23097
23098 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23100 self.enabled = v.into();
23101 self
23102 }
23103}
23104
23105impl wkt::message::Message for IdentityServiceConfig {
23106 fn typename() -> &'static str {
23107 "type.googleapis.com/google.container.v1.IdentityServiceConfig"
23108 }
23109}
23110
23111#[derive(Clone, Default, PartialEq)]
23113#[non_exhaustive]
23114pub struct MeshCertificates {
23115 pub enable_certificates: std::option::Option<wkt::BoolValue>,
23127
23128 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23129}
23130
23131impl MeshCertificates {
23132 pub fn new() -> Self {
23133 std::default::Default::default()
23134 }
23135
23136 pub fn set_enable_certificates<T>(mut self, v: T) -> Self
23138 where
23139 T: std::convert::Into<wkt::BoolValue>,
23140 {
23141 self.enable_certificates = std::option::Option::Some(v.into());
23142 self
23143 }
23144
23145 pub fn set_or_clear_enable_certificates<T>(mut self, v: std::option::Option<T>) -> Self
23147 where
23148 T: std::convert::Into<wkt::BoolValue>,
23149 {
23150 self.enable_certificates = v.map(|x| x.into());
23151 self
23152 }
23153}
23154
23155impl wkt::message::Message for MeshCertificates {
23156 fn typename() -> &'static str {
23157 "type.googleapis.com/google.container.v1.MeshCertificates"
23158 }
23159}
23160
23161#[derive(Clone, Default, PartialEq)]
23163#[non_exhaustive]
23164pub struct DatabaseEncryption {
23165 pub key_name: std::string::String,
23168
23169 pub state: crate::model::database_encryption::State,
23171
23172 pub current_state: std::option::Option<crate::model::database_encryption::CurrentState>,
23174
23175 pub decryption_keys: std::vec::Vec<std::string::String>,
23180
23181 pub last_operation_errors: std::vec::Vec<crate::model::database_encryption::OperationError>,
23184
23185 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23186}
23187
23188impl DatabaseEncryption {
23189 pub fn new() -> Self {
23190 std::default::Default::default()
23191 }
23192
23193 pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23195 self.key_name = v.into();
23196 self
23197 }
23198
23199 pub fn set_state<T: std::convert::Into<crate::model::database_encryption::State>>(
23201 mut self,
23202 v: T,
23203 ) -> Self {
23204 self.state = v.into();
23205 self
23206 }
23207
23208 pub fn set_current_state<T>(mut self, v: T) -> Self
23210 where
23211 T: std::convert::Into<crate::model::database_encryption::CurrentState>,
23212 {
23213 self.current_state = std::option::Option::Some(v.into());
23214 self
23215 }
23216
23217 pub fn set_or_clear_current_state<T>(mut self, v: std::option::Option<T>) -> Self
23219 where
23220 T: std::convert::Into<crate::model::database_encryption::CurrentState>,
23221 {
23222 self.current_state = v.map(|x| x.into());
23223 self
23224 }
23225
23226 pub fn set_decryption_keys<T, V>(mut self, v: T) -> Self
23228 where
23229 T: std::iter::IntoIterator<Item = V>,
23230 V: std::convert::Into<std::string::String>,
23231 {
23232 use std::iter::Iterator;
23233 self.decryption_keys = v.into_iter().map(|i| i.into()).collect();
23234 self
23235 }
23236
23237 pub fn set_last_operation_errors<T, V>(mut self, v: T) -> Self
23239 where
23240 T: std::iter::IntoIterator<Item = V>,
23241 V: std::convert::Into<crate::model::database_encryption::OperationError>,
23242 {
23243 use std::iter::Iterator;
23244 self.last_operation_errors = v.into_iter().map(|i| i.into()).collect();
23245 self
23246 }
23247}
23248
23249impl wkt::message::Message for DatabaseEncryption {
23250 fn typename() -> &'static str {
23251 "type.googleapis.com/google.container.v1.DatabaseEncryption"
23252 }
23253}
23254
23255pub mod database_encryption {
23257 #[allow(unused_imports)]
23258 use super::*;
23259
23260 #[derive(Clone, Default, PartialEq)]
23263 #[non_exhaustive]
23264 pub struct OperationError {
23265 pub key_name: std::string::String,
23267
23268 pub error_message: std::string::String,
23270
23271 pub timestamp: std::option::Option<wkt::Timestamp>,
23273
23274 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23275 }
23276
23277 impl OperationError {
23278 pub fn new() -> Self {
23279 std::default::Default::default()
23280 }
23281
23282 pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23284 self.key_name = v.into();
23285 self
23286 }
23287
23288 pub fn set_error_message<T: std::convert::Into<std::string::String>>(
23290 mut self,
23291 v: T,
23292 ) -> Self {
23293 self.error_message = v.into();
23294 self
23295 }
23296
23297 pub fn set_timestamp<T>(mut self, v: T) -> Self
23299 where
23300 T: std::convert::Into<wkt::Timestamp>,
23301 {
23302 self.timestamp = std::option::Option::Some(v.into());
23303 self
23304 }
23305
23306 pub fn set_or_clear_timestamp<T>(mut self, v: std::option::Option<T>) -> Self
23308 where
23309 T: std::convert::Into<wkt::Timestamp>,
23310 {
23311 self.timestamp = v.map(|x| x.into());
23312 self
23313 }
23314 }
23315
23316 impl wkt::message::Message for OperationError {
23317 fn typename() -> &'static str {
23318 "type.googleapis.com/google.container.v1.DatabaseEncryption.OperationError"
23319 }
23320 }
23321
23322 #[derive(Clone, Debug, PartialEq)]
23338 #[non_exhaustive]
23339 pub enum State {
23340 Unknown,
23342 Encrypted,
23344 Decrypted,
23347 UnknownValue(state::UnknownValue),
23352 }
23353
23354 #[doc(hidden)]
23355 pub mod state {
23356 #[allow(unused_imports)]
23357 use super::*;
23358 #[derive(Clone, Debug, PartialEq)]
23359 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23360 }
23361
23362 impl State {
23363 pub fn value(&self) -> std::option::Option<i32> {
23368 match self {
23369 Self::Unknown => std::option::Option::Some(0),
23370 Self::Encrypted => std::option::Option::Some(1),
23371 Self::Decrypted => std::option::Option::Some(2),
23372 Self::UnknownValue(u) => u.0.value(),
23373 }
23374 }
23375
23376 pub fn name(&self) -> std::option::Option<&str> {
23381 match self {
23382 Self::Unknown => std::option::Option::Some("UNKNOWN"),
23383 Self::Encrypted => std::option::Option::Some("ENCRYPTED"),
23384 Self::Decrypted => std::option::Option::Some("DECRYPTED"),
23385 Self::UnknownValue(u) => u.0.name(),
23386 }
23387 }
23388 }
23389
23390 impl std::default::Default for State {
23391 fn default() -> Self {
23392 use std::convert::From;
23393 Self::from(0)
23394 }
23395 }
23396
23397 impl std::fmt::Display for State {
23398 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23399 wkt::internal::display_enum(f, self.name(), self.value())
23400 }
23401 }
23402
23403 impl std::convert::From<i32> for State {
23404 fn from(value: i32) -> Self {
23405 match value {
23406 0 => Self::Unknown,
23407 1 => Self::Encrypted,
23408 2 => Self::Decrypted,
23409 _ => Self::UnknownValue(state::UnknownValue(
23410 wkt::internal::UnknownEnumValue::Integer(value),
23411 )),
23412 }
23413 }
23414 }
23415
23416 impl std::convert::From<&str> for State {
23417 fn from(value: &str) -> Self {
23418 use std::string::ToString;
23419 match value {
23420 "UNKNOWN" => Self::Unknown,
23421 "ENCRYPTED" => Self::Encrypted,
23422 "DECRYPTED" => Self::Decrypted,
23423 _ => Self::UnknownValue(state::UnknownValue(
23424 wkt::internal::UnknownEnumValue::String(value.to_string()),
23425 )),
23426 }
23427 }
23428 }
23429
23430 impl serde::ser::Serialize for State {
23431 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23432 where
23433 S: serde::Serializer,
23434 {
23435 match self {
23436 Self::Unknown => serializer.serialize_i32(0),
23437 Self::Encrypted => serializer.serialize_i32(1),
23438 Self::Decrypted => serializer.serialize_i32(2),
23439 Self::UnknownValue(u) => u.0.serialize(serializer),
23440 }
23441 }
23442 }
23443
23444 impl<'de> serde::de::Deserialize<'de> for State {
23445 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23446 where
23447 D: serde::Deserializer<'de>,
23448 {
23449 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
23450 ".google.container.v1.DatabaseEncryption.State",
23451 ))
23452 }
23453 }
23454
23455 #[derive(Clone, Debug, PartialEq)]
23471 #[non_exhaustive]
23472 pub enum CurrentState {
23473 Unspecified,
23475 Encrypted,
23477 Decrypted,
23480 EncryptionPending,
23483 EncryptionError,
23486 DecryptionPending,
23488 DecryptionError,
23490 UnknownValue(current_state::UnknownValue),
23495 }
23496
23497 #[doc(hidden)]
23498 pub mod current_state {
23499 #[allow(unused_imports)]
23500 use super::*;
23501 #[derive(Clone, Debug, PartialEq)]
23502 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23503 }
23504
23505 impl CurrentState {
23506 pub fn value(&self) -> std::option::Option<i32> {
23511 match self {
23512 Self::Unspecified => std::option::Option::Some(0),
23513 Self::Encrypted => std::option::Option::Some(7),
23514 Self::Decrypted => std::option::Option::Some(2),
23515 Self::EncryptionPending => std::option::Option::Some(3),
23516 Self::EncryptionError => std::option::Option::Some(4),
23517 Self::DecryptionPending => std::option::Option::Some(5),
23518 Self::DecryptionError => std::option::Option::Some(6),
23519 Self::UnknownValue(u) => u.0.value(),
23520 }
23521 }
23522
23523 pub fn name(&self) -> std::option::Option<&str> {
23528 match self {
23529 Self::Unspecified => std::option::Option::Some("CURRENT_STATE_UNSPECIFIED"),
23530 Self::Encrypted => std::option::Option::Some("CURRENT_STATE_ENCRYPTED"),
23531 Self::Decrypted => std::option::Option::Some("CURRENT_STATE_DECRYPTED"),
23532 Self::EncryptionPending => {
23533 std::option::Option::Some("CURRENT_STATE_ENCRYPTION_PENDING")
23534 }
23535 Self::EncryptionError => {
23536 std::option::Option::Some("CURRENT_STATE_ENCRYPTION_ERROR")
23537 }
23538 Self::DecryptionPending => {
23539 std::option::Option::Some("CURRENT_STATE_DECRYPTION_PENDING")
23540 }
23541 Self::DecryptionError => {
23542 std::option::Option::Some("CURRENT_STATE_DECRYPTION_ERROR")
23543 }
23544 Self::UnknownValue(u) => u.0.name(),
23545 }
23546 }
23547 }
23548
23549 impl std::default::Default for CurrentState {
23550 fn default() -> Self {
23551 use std::convert::From;
23552 Self::from(0)
23553 }
23554 }
23555
23556 impl std::fmt::Display for CurrentState {
23557 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23558 wkt::internal::display_enum(f, self.name(), self.value())
23559 }
23560 }
23561
23562 impl std::convert::From<i32> for CurrentState {
23563 fn from(value: i32) -> Self {
23564 match value {
23565 0 => Self::Unspecified,
23566 2 => Self::Decrypted,
23567 3 => Self::EncryptionPending,
23568 4 => Self::EncryptionError,
23569 5 => Self::DecryptionPending,
23570 6 => Self::DecryptionError,
23571 7 => Self::Encrypted,
23572 _ => Self::UnknownValue(current_state::UnknownValue(
23573 wkt::internal::UnknownEnumValue::Integer(value),
23574 )),
23575 }
23576 }
23577 }
23578
23579 impl std::convert::From<&str> for CurrentState {
23580 fn from(value: &str) -> Self {
23581 use std::string::ToString;
23582 match value {
23583 "CURRENT_STATE_UNSPECIFIED" => Self::Unspecified,
23584 "CURRENT_STATE_ENCRYPTED" => Self::Encrypted,
23585 "CURRENT_STATE_DECRYPTED" => Self::Decrypted,
23586 "CURRENT_STATE_ENCRYPTION_PENDING" => Self::EncryptionPending,
23587 "CURRENT_STATE_ENCRYPTION_ERROR" => Self::EncryptionError,
23588 "CURRENT_STATE_DECRYPTION_PENDING" => Self::DecryptionPending,
23589 "CURRENT_STATE_DECRYPTION_ERROR" => Self::DecryptionError,
23590 _ => Self::UnknownValue(current_state::UnknownValue(
23591 wkt::internal::UnknownEnumValue::String(value.to_string()),
23592 )),
23593 }
23594 }
23595 }
23596
23597 impl serde::ser::Serialize for CurrentState {
23598 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23599 where
23600 S: serde::Serializer,
23601 {
23602 match self {
23603 Self::Unspecified => serializer.serialize_i32(0),
23604 Self::Encrypted => serializer.serialize_i32(7),
23605 Self::Decrypted => serializer.serialize_i32(2),
23606 Self::EncryptionPending => serializer.serialize_i32(3),
23607 Self::EncryptionError => serializer.serialize_i32(4),
23608 Self::DecryptionPending => serializer.serialize_i32(5),
23609 Self::DecryptionError => serializer.serialize_i32(6),
23610 Self::UnknownValue(u) => u.0.serialize(serializer),
23611 }
23612 }
23613 }
23614
23615 impl<'de> serde::de::Deserialize<'de> for CurrentState {
23616 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23617 where
23618 D: serde::Deserializer<'de>,
23619 {
23620 deserializer.deserialize_any(wkt::internal::EnumVisitor::<CurrentState>::new(
23621 ".google.container.v1.DatabaseEncryption.CurrentState",
23622 ))
23623 }
23624 }
23625}
23626
23627#[derive(Clone, Default, PartialEq)]
23630#[non_exhaustive]
23631pub struct ListUsableSubnetworksRequest {
23632 pub parent: std::string::String,
23635
23636 pub filter: std::string::String,
23641
23642 pub page_size: i32,
23647
23648 pub page_token: std::string::String,
23651
23652 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23653}
23654
23655impl ListUsableSubnetworksRequest {
23656 pub fn new() -> Self {
23657 std::default::Default::default()
23658 }
23659
23660 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23662 self.parent = v.into();
23663 self
23664 }
23665
23666 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23668 self.filter = v.into();
23669 self
23670 }
23671
23672 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23674 self.page_size = v.into();
23675 self
23676 }
23677
23678 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23680 self.page_token = v.into();
23681 self
23682 }
23683}
23684
23685impl wkt::message::Message for ListUsableSubnetworksRequest {
23686 fn typename() -> &'static str {
23687 "type.googleapis.com/google.container.v1.ListUsableSubnetworksRequest"
23688 }
23689}
23690
23691#[derive(Clone, Default, PartialEq)]
23694#[non_exhaustive]
23695pub struct ListUsableSubnetworksResponse {
23696 pub subnetworks: std::vec::Vec<crate::model::UsableSubnetwork>,
23698
23699 pub next_page_token: std::string::String,
23704
23705 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23706}
23707
23708impl ListUsableSubnetworksResponse {
23709 pub fn new() -> Self {
23710 std::default::Default::default()
23711 }
23712
23713 pub fn set_subnetworks<T, V>(mut self, v: T) -> Self
23715 where
23716 T: std::iter::IntoIterator<Item = V>,
23717 V: std::convert::Into<crate::model::UsableSubnetwork>,
23718 {
23719 use std::iter::Iterator;
23720 self.subnetworks = v.into_iter().map(|i| i.into()).collect();
23721 self
23722 }
23723
23724 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23726 self.next_page_token = v.into();
23727 self
23728 }
23729}
23730
23731impl wkt::message::Message for ListUsableSubnetworksResponse {
23732 fn typename() -> &'static str {
23733 "type.googleapis.com/google.container.v1.ListUsableSubnetworksResponse"
23734 }
23735}
23736
23737#[doc(hidden)]
23738impl gax::paginator::internal::PageableResponse for ListUsableSubnetworksResponse {
23739 type PageItem = crate::model::UsableSubnetwork;
23740
23741 fn items(self) -> std::vec::Vec<Self::PageItem> {
23742 self.subnetworks
23743 }
23744
23745 fn next_page_token(&self) -> std::string::String {
23746 use std::clone::Clone;
23747 self.next_page_token.clone()
23748 }
23749}
23750
23751#[derive(Clone, Default, PartialEq)]
23753#[non_exhaustive]
23754pub struct UsableSubnetworkSecondaryRange {
23755 pub range_name: std::string::String,
23758
23759 pub ip_cidr_range: std::string::String,
23761
23762 pub status: crate::model::usable_subnetwork_secondary_range::Status,
23764
23765 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23766}
23767
23768impl UsableSubnetworkSecondaryRange {
23769 pub fn new() -> Self {
23770 std::default::Default::default()
23771 }
23772
23773 pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23775 self.range_name = v.into();
23776 self
23777 }
23778
23779 pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23781 self.ip_cidr_range = v.into();
23782 self
23783 }
23784
23785 pub fn set_status<
23787 T: std::convert::Into<crate::model::usable_subnetwork_secondary_range::Status>,
23788 >(
23789 mut self,
23790 v: T,
23791 ) -> Self {
23792 self.status = v.into();
23793 self
23794 }
23795}
23796
23797impl wkt::message::Message for UsableSubnetworkSecondaryRange {
23798 fn typename() -> &'static str {
23799 "type.googleapis.com/google.container.v1.UsableSubnetworkSecondaryRange"
23800 }
23801}
23802
23803pub mod usable_subnetwork_secondary_range {
23805 #[allow(unused_imports)]
23806 use super::*;
23807
23808 #[derive(Clone, Debug, PartialEq)]
23824 #[non_exhaustive]
23825 pub enum Status {
23826 Unknown,
23828 Unused,
23830 InUseService,
23834 InUseShareablePod,
23838 InUseManagedPod,
23841 UnknownValue(status::UnknownValue),
23846 }
23847
23848 #[doc(hidden)]
23849 pub mod status {
23850 #[allow(unused_imports)]
23851 use super::*;
23852 #[derive(Clone, Debug, PartialEq)]
23853 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23854 }
23855
23856 impl Status {
23857 pub fn value(&self) -> std::option::Option<i32> {
23862 match self {
23863 Self::Unknown => std::option::Option::Some(0),
23864 Self::Unused => std::option::Option::Some(1),
23865 Self::InUseService => std::option::Option::Some(2),
23866 Self::InUseShareablePod => std::option::Option::Some(3),
23867 Self::InUseManagedPod => std::option::Option::Some(4),
23868 Self::UnknownValue(u) => u.0.value(),
23869 }
23870 }
23871
23872 pub fn name(&self) -> std::option::Option<&str> {
23877 match self {
23878 Self::Unknown => std::option::Option::Some("UNKNOWN"),
23879 Self::Unused => std::option::Option::Some("UNUSED"),
23880 Self::InUseService => std::option::Option::Some("IN_USE_SERVICE"),
23881 Self::InUseShareablePod => std::option::Option::Some("IN_USE_SHAREABLE_POD"),
23882 Self::InUseManagedPod => std::option::Option::Some("IN_USE_MANAGED_POD"),
23883 Self::UnknownValue(u) => u.0.name(),
23884 }
23885 }
23886 }
23887
23888 impl std::default::Default for Status {
23889 fn default() -> Self {
23890 use std::convert::From;
23891 Self::from(0)
23892 }
23893 }
23894
23895 impl std::fmt::Display for Status {
23896 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23897 wkt::internal::display_enum(f, self.name(), self.value())
23898 }
23899 }
23900
23901 impl std::convert::From<i32> for Status {
23902 fn from(value: i32) -> Self {
23903 match value {
23904 0 => Self::Unknown,
23905 1 => Self::Unused,
23906 2 => Self::InUseService,
23907 3 => Self::InUseShareablePod,
23908 4 => Self::InUseManagedPod,
23909 _ => Self::UnknownValue(status::UnknownValue(
23910 wkt::internal::UnknownEnumValue::Integer(value),
23911 )),
23912 }
23913 }
23914 }
23915
23916 impl std::convert::From<&str> for Status {
23917 fn from(value: &str) -> Self {
23918 use std::string::ToString;
23919 match value {
23920 "UNKNOWN" => Self::Unknown,
23921 "UNUSED" => Self::Unused,
23922 "IN_USE_SERVICE" => Self::InUseService,
23923 "IN_USE_SHAREABLE_POD" => Self::InUseShareablePod,
23924 "IN_USE_MANAGED_POD" => Self::InUseManagedPod,
23925 _ => Self::UnknownValue(status::UnknownValue(
23926 wkt::internal::UnknownEnumValue::String(value.to_string()),
23927 )),
23928 }
23929 }
23930 }
23931
23932 impl serde::ser::Serialize for Status {
23933 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23934 where
23935 S: serde::Serializer,
23936 {
23937 match self {
23938 Self::Unknown => serializer.serialize_i32(0),
23939 Self::Unused => serializer.serialize_i32(1),
23940 Self::InUseService => serializer.serialize_i32(2),
23941 Self::InUseShareablePod => serializer.serialize_i32(3),
23942 Self::InUseManagedPod => serializer.serialize_i32(4),
23943 Self::UnknownValue(u) => u.0.serialize(serializer),
23944 }
23945 }
23946 }
23947
23948 impl<'de> serde::de::Deserialize<'de> for Status {
23949 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23950 where
23951 D: serde::Deserializer<'de>,
23952 {
23953 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
23954 ".google.container.v1.UsableSubnetworkSecondaryRange.Status",
23955 ))
23956 }
23957 }
23958}
23959
23960#[derive(Clone, Default, PartialEq)]
23963#[non_exhaustive]
23964pub struct UsableSubnetwork {
23965 pub subnetwork: std::string::String,
23968
23969 pub network: std::string::String,
23972
23973 pub ip_cidr_range: std::string::String,
23975
23976 pub secondary_ip_ranges: std::vec::Vec<crate::model::UsableSubnetworkSecondaryRange>,
23978
23979 pub status_message: std::string::String,
23984
23985 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23986}
23987
23988impl UsableSubnetwork {
23989 pub fn new() -> Self {
23990 std::default::Default::default()
23991 }
23992
23993 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23995 self.subnetwork = v.into();
23996 self
23997 }
23998
23999 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24001 self.network = v.into();
24002 self
24003 }
24004
24005 pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24007 self.ip_cidr_range = v.into();
24008 self
24009 }
24010
24011 pub fn set_secondary_ip_ranges<T, V>(mut self, v: T) -> Self
24013 where
24014 T: std::iter::IntoIterator<Item = V>,
24015 V: std::convert::Into<crate::model::UsableSubnetworkSecondaryRange>,
24016 {
24017 use std::iter::Iterator;
24018 self.secondary_ip_ranges = v.into_iter().map(|i| i.into()).collect();
24019 self
24020 }
24021
24022 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24024 self.status_message = v.into();
24025 self
24026 }
24027}
24028
24029impl wkt::message::Message for UsableSubnetwork {
24030 fn typename() -> &'static str {
24031 "type.googleapis.com/google.container.v1.UsableSubnetwork"
24032 }
24033}
24034
24035#[derive(Clone, Default, PartialEq)]
24037#[non_exhaustive]
24038pub struct ResourceUsageExportConfig {
24039 pub bigquery_destination:
24041 std::option::Option<crate::model::resource_usage_export_config::BigQueryDestination>,
24042
24043 pub enable_network_egress_metering: bool,
24046
24047 pub consumption_metering_config:
24049 std::option::Option<crate::model::resource_usage_export_config::ConsumptionMeteringConfig>,
24050
24051 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24052}
24053
24054impl ResourceUsageExportConfig {
24055 pub fn new() -> Self {
24056 std::default::Default::default()
24057 }
24058
24059 pub fn set_bigquery_destination<T>(mut self, v: T) -> Self
24061 where
24062 T: std::convert::Into<crate::model::resource_usage_export_config::BigQueryDestination>,
24063 {
24064 self.bigquery_destination = std::option::Option::Some(v.into());
24065 self
24066 }
24067
24068 pub fn set_or_clear_bigquery_destination<T>(mut self, v: std::option::Option<T>) -> Self
24070 where
24071 T: std::convert::Into<crate::model::resource_usage_export_config::BigQueryDestination>,
24072 {
24073 self.bigquery_destination = v.map(|x| x.into());
24074 self
24075 }
24076
24077 pub fn set_enable_network_egress_metering<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24079 self.enable_network_egress_metering = v.into();
24080 self
24081 }
24082
24083 pub fn set_consumption_metering_config<T>(mut self, v: T) -> Self
24085 where
24086 T: std::convert::Into<
24087 crate::model::resource_usage_export_config::ConsumptionMeteringConfig,
24088 >,
24089 {
24090 self.consumption_metering_config = std::option::Option::Some(v.into());
24091 self
24092 }
24093
24094 pub fn set_or_clear_consumption_metering_config<T>(mut self, v: std::option::Option<T>) -> Self
24096 where
24097 T: std::convert::Into<
24098 crate::model::resource_usage_export_config::ConsumptionMeteringConfig,
24099 >,
24100 {
24101 self.consumption_metering_config = v.map(|x| x.into());
24102 self
24103 }
24104}
24105
24106impl wkt::message::Message for ResourceUsageExportConfig {
24107 fn typename() -> &'static str {
24108 "type.googleapis.com/google.container.v1.ResourceUsageExportConfig"
24109 }
24110}
24111
24112pub mod resource_usage_export_config {
24114 #[allow(unused_imports)]
24115 use super::*;
24116
24117 #[derive(Clone, Default, PartialEq)]
24119 #[non_exhaustive]
24120 pub struct BigQueryDestination {
24121 pub dataset_id: std::string::String,
24123
24124 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24125 }
24126
24127 impl BigQueryDestination {
24128 pub fn new() -> Self {
24129 std::default::Default::default()
24130 }
24131
24132 pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24134 self.dataset_id = v.into();
24135 self
24136 }
24137 }
24138
24139 impl wkt::message::Message for BigQueryDestination {
24140 fn typename() -> &'static str {
24141 "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.BigQueryDestination"
24142 }
24143 }
24144
24145 #[derive(Clone, Default, PartialEq)]
24147 #[non_exhaustive]
24148 pub struct ConsumptionMeteringConfig {
24149 pub enabled: bool,
24153
24154 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24155 }
24156
24157 impl ConsumptionMeteringConfig {
24158 pub fn new() -> Self {
24159 std::default::Default::default()
24160 }
24161
24162 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24164 self.enabled = v.into();
24165 self
24166 }
24167 }
24168
24169 impl wkt::message::Message for ConsumptionMeteringConfig {
24170 fn typename() -> &'static str {
24171 "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig"
24172 }
24173 }
24174}
24175
24176#[derive(Clone, Default, PartialEq)]
24180#[non_exhaustive]
24181pub struct VerticalPodAutoscaling {
24182 pub enabled: bool,
24184
24185 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24186}
24187
24188impl VerticalPodAutoscaling {
24189 pub fn new() -> Self {
24190 std::default::Default::default()
24191 }
24192
24193 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24195 self.enabled = v.into();
24196 self
24197 }
24198}
24199
24200impl wkt::message::Message for VerticalPodAutoscaling {
24201 fn typename() -> &'static str {
24202 "type.googleapis.com/google.container.v1.VerticalPodAutoscaling"
24203 }
24204}
24205
24206#[derive(Clone, Default, PartialEq)]
24209#[non_exhaustive]
24210pub struct DefaultSnatStatus {
24211 pub disabled: bool,
24213
24214 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24215}
24216
24217impl DefaultSnatStatus {
24218 pub fn new() -> Self {
24219 std::default::Default::default()
24220 }
24221
24222 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24224 self.disabled = v.into();
24225 self
24226 }
24227}
24228
24229impl wkt::message::Message for DefaultSnatStatus {
24230 fn typename() -> &'static str {
24231 "type.googleapis.com/google.container.v1.DefaultSnatStatus"
24232 }
24233}
24234
24235#[derive(Clone, Default, PartialEq)]
24237#[non_exhaustive]
24238pub struct ShieldedNodes {
24239 pub enabled: bool,
24241
24242 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24243}
24244
24245impl ShieldedNodes {
24246 pub fn new() -> Self {
24247 std::default::Default::default()
24248 }
24249
24250 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24252 self.enabled = v.into();
24253 self
24254 }
24255}
24256
24257impl wkt::message::Message for ShieldedNodes {
24258 fn typename() -> &'static str {
24259 "type.googleapis.com/google.container.v1.ShieldedNodes"
24260 }
24261}
24262
24263#[derive(Clone, Default, PartialEq)]
24265#[non_exhaustive]
24266pub struct VirtualNIC {
24267 pub enabled: bool,
24269
24270 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24271}
24272
24273impl VirtualNIC {
24274 pub fn new() -> Self {
24275 std::default::Default::default()
24276 }
24277
24278 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24280 self.enabled = v.into();
24281 self
24282 }
24283}
24284
24285impl wkt::message::Message for VirtualNIC {
24286 fn typename() -> &'static str {
24287 "type.googleapis.com/google.container.v1.VirtualNIC"
24288 }
24289}
24290
24291#[derive(Clone, Default, PartialEq)]
24293#[non_exhaustive]
24294pub struct FastSocket {
24295 pub enabled: bool,
24297
24298 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24299}
24300
24301impl FastSocket {
24302 pub fn new() -> Self {
24303 std::default::Default::default()
24304 }
24305
24306 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24308 self.enabled = v.into();
24309 self
24310 }
24311}
24312
24313impl wkt::message::Message for FastSocket {
24314 fn typename() -> &'static str {
24315 "type.googleapis.com/google.container.v1.FastSocket"
24316 }
24317}
24318
24319#[derive(Clone, Default, PartialEq)]
24321#[non_exhaustive]
24322pub struct NotificationConfig {
24323 pub pubsub: std::option::Option<crate::model::notification_config::PubSub>,
24325
24326 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24327}
24328
24329impl NotificationConfig {
24330 pub fn new() -> Self {
24331 std::default::Default::default()
24332 }
24333
24334 pub fn set_pubsub<T>(mut self, v: T) -> Self
24336 where
24337 T: std::convert::Into<crate::model::notification_config::PubSub>,
24338 {
24339 self.pubsub = std::option::Option::Some(v.into());
24340 self
24341 }
24342
24343 pub fn set_or_clear_pubsub<T>(mut self, v: std::option::Option<T>) -> Self
24345 where
24346 T: std::convert::Into<crate::model::notification_config::PubSub>,
24347 {
24348 self.pubsub = v.map(|x| x.into());
24349 self
24350 }
24351}
24352
24353impl wkt::message::Message for NotificationConfig {
24354 fn typename() -> &'static str {
24355 "type.googleapis.com/google.container.v1.NotificationConfig"
24356 }
24357}
24358
24359pub mod notification_config {
24361 #[allow(unused_imports)]
24362 use super::*;
24363
24364 #[derive(Clone, Default, PartialEq)]
24366 #[non_exhaustive]
24367 pub struct PubSub {
24368 pub enabled: bool,
24370
24371 pub topic: std::string::String,
24374
24375 pub filter: std::option::Option<crate::model::notification_config::Filter>,
24379
24380 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24381 }
24382
24383 impl PubSub {
24384 pub fn new() -> Self {
24385 std::default::Default::default()
24386 }
24387
24388 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24390 self.enabled = v.into();
24391 self
24392 }
24393
24394 pub fn set_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24396 self.topic = v.into();
24397 self
24398 }
24399
24400 pub fn set_filter<T>(mut self, v: T) -> Self
24402 where
24403 T: std::convert::Into<crate::model::notification_config::Filter>,
24404 {
24405 self.filter = std::option::Option::Some(v.into());
24406 self
24407 }
24408
24409 pub fn set_or_clear_filter<T>(mut self, v: std::option::Option<T>) -> Self
24411 where
24412 T: std::convert::Into<crate::model::notification_config::Filter>,
24413 {
24414 self.filter = v.map(|x| x.into());
24415 self
24416 }
24417 }
24418
24419 impl wkt::message::Message for PubSub {
24420 fn typename() -> &'static str {
24421 "type.googleapis.com/google.container.v1.NotificationConfig.PubSub"
24422 }
24423 }
24424
24425 #[derive(Clone, Default, PartialEq)]
24430 #[non_exhaustive]
24431 pub struct Filter {
24432 pub event_type: std::vec::Vec<crate::model::notification_config::EventType>,
24434
24435 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24436 }
24437
24438 impl Filter {
24439 pub fn new() -> Self {
24440 std::default::Default::default()
24441 }
24442
24443 pub fn set_event_type<T, V>(mut self, v: T) -> Self
24445 where
24446 T: std::iter::IntoIterator<Item = V>,
24447 V: std::convert::Into<crate::model::notification_config::EventType>,
24448 {
24449 use std::iter::Iterator;
24450 self.event_type = v.into_iter().map(|i| i.into()).collect();
24451 self
24452 }
24453 }
24454
24455 impl wkt::message::Message for Filter {
24456 fn typename() -> &'static str {
24457 "type.googleapis.com/google.container.v1.NotificationConfig.Filter"
24458 }
24459 }
24460
24461 #[derive(Clone, Debug, PartialEq)]
24478 #[non_exhaustive]
24479 pub enum EventType {
24480 Unspecified,
24482 UpgradeAvailableEvent,
24484 UpgradeEvent,
24486 SecurityBulletinEvent,
24488 UpgradeInfoEvent,
24490 UnknownValue(event_type::UnknownValue),
24495 }
24496
24497 #[doc(hidden)]
24498 pub mod event_type {
24499 #[allow(unused_imports)]
24500 use super::*;
24501 #[derive(Clone, Debug, PartialEq)]
24502 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24503 }
24504
24505 impl EventType {
24506 pub fn value(&self) -> std::option::Option<i32> {
24511 match self {
24512 Self::Unspecified => std::option::Option::Some(0),
24513 Self::UpgradeAvailableEvent => std::option::Option::Some(1),
24514 Self::UpgradeEvent => std::option::Option::Some(2),
24515 Self::SecurityBulletinEvent => std::option::Option::Some(3),
24516 Self::UpgradeInfoEvent => std::option::Option::Some(4),
24517 Self::UnknownValue(u) => u.0.value(),
24518 }
24519 }
24520
24521 pub fn name(&self) -> std::option::Option<&str> {
24526 match self {
24527 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
24528 Self::UpgradeAvailableEvent => std::option::Option::Some("UPGRADE_AVAILABLE_EVENT"),
24529 Self::UpgradeEvent => std::option::Option::Some("UPGRADE_EVENT"),
24530 Self::SecurityBulletinEvent => std::option::Option::Some("SECURITY_BULLETIN_EVENT"),
24531 Self::UpgradeInfoEvent => std::option::Option::Some("UPGRADE_INFO_EVENT"),
24532 Self::UnknownValue(u) => u.0.name(),
24533 }
24534 }
24535 }
24536
24537 impl std::default::Default for EventType {
24538 fn default() -> Self {
24539 use std::convert::From;
24540 Self::from(0)
24541 }
24542 }
24543
24544 impl std::fmt::Display for EventType {
24545 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24546 wkt::internal::display_enum(f, self.name(), self.value())
24547 }
24548 }
24549
24550 impl std::convert::From<i32> for EventType {
24551 fn from(value: i32) -> Self {
24552 match value {
24553 0 => Self::Unspecified,
24554 1 => Self::UpgradeAvailableEvent,
24555 2 => Self::UpgradeEvent,
24556 3 => Self::SecurityBulletinEvent,
24557 4 => Self::UpgradeInfoEvent,
24558 _ => Self::UnknownValue(event_type::UnknownValue(
24559 wkt::internal::UnknownEnumValue::Integer(value),
24560 )),
24561 }
24562 }
24563 }
24564
24565 impl std::convert::From<&str> for EventType {
24566 fn from(value: &str) -> Self {
24567 use std::string::ToString;
24568 match value {
24569 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
24570 "UPGRADE_AVAILABLE_EVENT" => Self::UpgradeAvailableEvent,
24571 "UPGRADE_EVENT" => Self::UpgradeEvent,
24572 "SECURITY_BULLETIN_EVENT" => Self::SecurityBulletinEvent,
24573 "UPGRADE_INFO_EVENT" => Self::UpgradeInfoEvent,
24574 _ => Self::UnknownValue(event_type::UnknownValue(
24575 wkt::internal::UnknownEnumValue::String(value.to_string()),
24576 )),
24577 }
24578 }
24579 }
24580
24581 impl serde::ser::Serialize for EventType {
24582 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24583 where
24584 S: serde::Serializer,
24585 {
24586 match self {
24587 Self::Unspecified => serializer.serialize_i32(0),
24588 Self::UpgradeAvailableEvent => serializer.serialize_i32(1),
24589 Self::UpgradeEvent => serializer.serialize_i32(2),
24590 Self::SecurityBulletinEvent => serializer.serialize_i32(3),
24591 Self::UpgradeInfoEvent => serializer.serialize_i32(4),
24592 Self::UnknownValue(u) => u.0.serialize(serializer),
24593 }
24594 }
24595 }
24596
24597 impl<'de> serde::de::Deserialize<'de> for EventType {
24598 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24599 where
24600 D: serde::Deserializer<'de>,
24601 {
24602 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
24603 ".google.container.v1.NotificationConfig.EventType",
24604 ))
24605 }
24606 }
24607}
24608
24609#[derive(Clone, Default, PartialEq)]
24612#[non_exhaustive]
24613pub struct ConfidentialNodes {
24614 pub enabled: bool,
24616
24617 pub confidential_instance_type: crate::model::confidential_nodes::ConfidentialInstanceType,
24619
24620 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24621}
24622
24623impl ConfidentialNodes {
24624 pub fn new() -> Self {
24625 std::default::Default::default()
24626 }
24627
24628 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24630 self.enabled = v.into();
24631 self
24632 }
24633
24634 pub fn set_confidential_instance_type<
24636 T: std::convert::Into<crate::model::confidential_nodes::ConfidentialInstanceType>,
24637 >(
24638 mut self,
24639 v: T,
24640 ) -> Self {
24641 self.confidential_instance_type = v.into();
24642 self
24643 }
24644}
24645
24646impl wkt::message::Message for ConfidentialNodes {
24647 fn typename() -> &'static str {
24648 "type.googleapis.com/google.container.v1.ConfidentialNodes"
24649 }
24650}
24651
24652pub mod confidential_nodes {
24654 #[allow(unused_imports)]
24655 use super::*;
24656
24657 #[derive(Clone, Debug, PartialEq)]
24673 #[non_exhaustive]
24674 pub enum ConfidentialInstanceType {
24675 Unspecified,
24677 Sev,
24679 SevSnp,
24681 Tdx,
24683 UnknownValue(confidential_instance_type::UnknownValue),
24688 }
24689
24690 #[doc(hidden)]
24691 pub mod confidential_instance_type {
24692 #[allow(unused_imports)]
24693 use super::*;
24694 #[derive(Clone, Debug, PartialEq)]
24695 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24696 }
24697
24698 impl ConfidentialInstanceType {
24699 pub fn value(&self) -> std::option::Option<i32> {
24704 match self {
24705 Self::Unspecified => std::option::Option::Some(0),
24706 Self::Sev => std::option::Option::Some(1),
24707 Self::SevSnp => std::option::Option::Some(2),
24708 Self::Tdx => std::option::Option::Some(3),
24709 Self::UnknownValue(u) => u.0.value(),
24710 }
24711 }
24712
24713 pub fn name(&self) -> std::option::Option<&str> {
24718 match self {
24719 Self::Unspecified => {
24720 std::option::Option::Some("CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED")
24721 }
24722 Self::Sev => std::option::Option::Some("SEV"),
24723 Self::SevSnp => std::option::Option::Some("SEV_SNP"),
24724 Self::Tdx => std::option::Option::Some("TDX"),
24725 Self::UnknownValue(u) => u.0.name(),
24726 }
24727 }
24728 }
24729
24730 impl std::default::Default for ConfidentialInstanceType {
24731 fn default() -> Self {
24732 use std::convert::From;
24733 Self::from(0)
24734 }
24735 }
24736
24737 impl std::fmt::Display for ConfidentialInstanceType {
24738 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24739 wkt::internal::display_enum(f, self.name(), self.value())
24740 }
24741 }
24742
24743 impl std::convert::From<i32> for ConfidentialInstanceType {
24744 fn from(value: i32) -> Self {
24745 match value {
24746 0 => Self::Unspecified,
24747 1 => Self::Sev,
24748 2 => Self::SevSnp,
24749 3 => Self::Tdx,
24750 _ => Self::UnknownValue(confidential_instance_type::UnknownValue(
24751 wkt::internal::UnknownEnumValue::Integer(value),
24752 )),
24753 }
24754 }
24755 }
24756
24757 impl std::convert::From<&str> for ConfidentialInstanceType {
24758 fn from(value: &str) -> Self {
24759 use std::string::ToString;
24760 match value {
24761 "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" => Self::Unspecified,
24762 "SEV" => Self::Sev,
24763 "SEV_SNP" => Self::SevSnp,
24764 "TDX" => Self::Tdx,
24765 _ => Self::UnknownValue(confidential_instance_type::UnknownValue(
24766 wkt::internal::UnknownEnumValue::String(value.to_string()),
24767 )),
24768 }
24769 }
24770 }
24771
24772 impl serde::ser::Serialize for ConfidentialInstanceType {
24773 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24774 where
24775 S: serde::Serializer,
24776 {
24777 match self {
24778 Self::Unspecified => serializer.serialize_i32(0),
24779 Self::Sev => serializer.serialize_i32(1),
24780 Self::SevSnp => serializer.serialize_i32(2),
24781 Self::Tdx => serializer.serialize_i32(3),
24782 Self::UnknownValue(u) => u.0.serialize(serializer),
24783 }
24784 }
24785 }
24786
24787 impl<'de> serde::de::Deserialize<'de> for ConfidentialInstanceType {
24788 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24789 where
24790 D: serde::Deserializer<'de>,
24791 {
24792 deserializer.deserialize_any(
24793 wkt::internal::EnumVisitor::<ConfidentialInstanceType>::new(
24794 ".google.container.v1.ConfidentialNodes.ConfidentialInstanceType",
24795 ),
24796 )
24797 }
24798 }
24799}
24800
24801#[derive(Clone, Default, PartialEq)]
24804#[non_exhaustive]
24805pub struct UpgradeEvent {
24806 pub resource_type: crate::model::UpgradeResourceType,
24808
24809 pub operation: std::string::String,
24811
24812 pub operation_start_time: std::option::Option<wkt::Timestamp>,
24814
24815 pub current_version: std::string::String,
24817
24818 pub target_version: std::string::String,
24820
24821 pub resource: std::string::String,
24824
24825 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24826}
24827
24828impl UpgradeEvent {
24829 pub fn new() -> Self {
24830 std::default::Default::default()
24831 }
24832
24833 pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
24835 mut self,
24836 v: T,
24837 ) -> Self {
24838 self.resource_type = v.into();
24839 self
24840 }
24841
24842 pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24844 self.operation = v.into();
24845 self
24846 }
24847
24848 pub fn set_operation_start_time<T>(mut self, v: T) -> Self
24850 where
24851 T: std::convert::Into<wkt::Timestamp>,
24852 {
24853 self.operation_start_time = std::option::Option::Some(v.into());
24854 self
24855 }
24856
24857 pub fn set_or_clear_operation_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24859 where
24860 T: std::convert::Into<wkt::Timestamp>,
24861 {
24862 self.operation_start_time = v.map(|x| x.into());
24863 self
24864 }
24865
24866 pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24868 self.current_version = v.into();
24869 self
24870 }
24871
24872 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24874 self.target_version = v.into();
24875 self
24876 }
24877
24878 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24880 self.resource = v.into();
24881 self
24882 }
24883}
24884
24885impl wkt::message::Message for UpgradeEvent {
24886 fn typename() -> &'static str {
24887 "type.googleapis.com/google.container.v1.UpgradeEvent"
24888 }
24889}
24890
24891#[derive(Clone, Default, PartialEq)]
24894#[non_exhaustive]
24895pub struct UpgradeInfoEvent {
24896 pub resource_type: crate::model::UpgradeResourceType,
24898
24899 pub operation: std::string::String,
24901
24902 pub start_time: std::option::Option<wkt::Timestamp>,
24904
24905 pub end_time: std::option::Option<wkt::Timestamp>,
24907
24908 pub current_version: std::string::String,
24910
24911 pub target_version: std::string::String,
24913
24914 pub resource: std::string::String,
24917
24918 pub state: crate::model::upgrade_info_event::State,
24920
24921 pub standard_support_end_time: std::option::Option<wkt::Timestamp>,
24923
24924 pub extended_support_end_time: std::option::Option<wkt::Timestamp>,
24926
24927 pub description: std::string::String,
24929
24930 pub event_type: crate::model::upgrade_info_event::EventType,
24932
24933 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24934}
24935
24936impl UpgradeInfoEvent {
24937 pub fn new() -> Self {
24938 std::default::Default::default()
24939 }
24940
24941 pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
24943 mut self,
24944 v: T,
24945 ) -> Self {
24946 self.resource_type = v.into();
24947 self
24948 }
24949
24950 pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24952 self.operation = v.into();
24953 self
24954 }
24955
24956 pub fn set_start_time<T>(mut self, v: T) -> Self
24958 where
24959 T: std::convert::Into<wkt::Timestamp>,
24960 {
24961 self.start_time = std::option::Option::Some(v.into());
24962 self
24963 }
24964
24965 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24967 where
24968 T: std::convert::Into<wkt::Timestamp>,
24969 {
24970 self.start_time = v.map(|x| x.into());
24971 self
24972 }
24973
24974 pub fn set_end_time<T>(mut self, v: T) -> Self
24976 where
24977 T: std::convert::Into<wkt::Timestamp>,
24978 {
24979 self.end_time = std::option::Option::Some(v.into());
24980 self
24981 }
24982
24983 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24985 where
24986 T: std::convert::Into<wkt::Timestamp>,
24987 {
24988 self.end_time = v.map(|x| x.into());
24989 self
24990 }
24991
24992 pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24994 self.current_version = v.into();
24995 self
24996 }
24997
24998 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25000 self.target_version = v.into();
25001 self
25002 }
25003
25004 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25006 self.resource = v.into();
25007 self
25008 }
25009
25010 pub fn set_state<T: std::convert::Into<crate::model::upgrade_info_event::State>>(
25012 mut self,
25013 v: T,
25014 ) -> Self {
25015 self.state = v.into();
25016 self
25017 }
25018
25019 pub fn set_standard_support_end_time<T>(mut self, v: T) -> Self
25021 where
25022 T: std::convert::Into<wkt::Timestamp>,
25023 {
25024 self.standard_support_end_time = std::option::Option::Some(v.into());
25025 self
25026 }
25027
25028 pub fn set_or_clear_standard_support_end_time<T>(mut self, v: std::option::Option<T>) -> Self
25030 where
25031 T: std::convert::Into<wkt::Timestamp>,
25032 {
25033 self.standard_support_end_time = v.map(|x| x.into());
25034 self
25035 }
25036
25037 pub fn set_extended_support_end_time<T>(mut self, v: T) -> Self
25039 where
25040 T: std::convert::Into<wkt::Timestamp>,
25041 {
25042 self.extended_support_end_time = std::option::Option::Some(v.into());
25043 self
25044 }
25045
25046 pub fn set_or_clear_extended_support_end_time<T>(mut self, v: std::option::Option<T>) -> Self
25048 where
25049 T: std::convert::Into<wkt::Timestamp>,
25050 {
25051 self.extended_support_end_time = v.map(|x| x.into());
25052 self
25053 }
25054
25055 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25057 self.description = v.into();
25058 self
25059 }
25060
25061 pub fn set_event_type<T: std::convert::Into<crate::model::upgrade_info_event::EventType>>(
25063 mut self,
25064 v: T,
25065 ) -> Self {
25066 self.event_type = v.into();
25067 self
25068 }
25069}
25070
25071impl wkt::message::Message for UpgradeInfoEvent {
25072 fn typename() -> &'static str {
25073 "type.googleapis.com/google.container.v1.UpgradeInfoEvent"
25074 }
25075}
25076
25077pub mod upgrade_info_event {
25079 #[allow(unused_imports)]
25080 use super::*;
25081
25082 #[derive(Clone, Debug, PartialEq)]
25098 #[non_exhaustive]
25099 pub enum State {
25100 Unspecified,
25102 Started,
25104 Succeeded,
25106 Failed,
25108 Canceled,
25110 UnknownValue(state::UnknownValue),
25115 }
25116
25117 #[doc(hidden)]
25118 pub mod state {
25119 #[allow(unused_imports)]
25120 use super::*;
25121 #[derive(Clone, Debug, PartialEq)]
25122 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25123 }
25124
25125 impl State {
25126 pub fn value(&self) -> std::option::Option<i32> {
25131 match self {
25132 Self::Unspecified => std::option::Option::Some(0),
25133 Self::Started => std::option::Option::Some(3),
25134 Self::Succeeded => std::option::Option::Some(4),
25135 Self::Failed => std::option::Option::Some(5),
25136 Self::Canceled => std::option::Option::Some(6),
25137 Self::UnknownValue(u) => u.0.value(),
25138 }
25139 }
25140
25141 pub fn name(&self) -> std::option::Option<&str> {
25146 match self {
25147 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
25148 Self::Started => std::option::Option::Some("STARTED"),
25149 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
25150 Self::Failed => std::option::Option::Some("FAILED"),
25151 Self::Canceled => std::option::Option::Some("CANCELED"),
25152 Self::UnknownValue(u) => u.0.name(),
25153 }
25154 }
25155 }
25156
25157 impl std::default::Default for State {
25158 fn default() -> Self {
25159 use std::convert::From;
25160 Self::from(0)
25161 }
25162 }
25163
25164 impl std::fmt::Display for State {
25165 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25166 wkt::internal::display_enum(f, self.name(), self.value())
25167 }
25168 }
25169
25170 impl std::convert::From<i32> for State {
25171 fn from(value: i32) -> Self {
25172 match value {
25173 0 => Self::Unspecified,
25174 3 => Self::Started,
25175 4 => Self::Succeeded,
25176 5 => Self::Failed,
25177 6 => Self::Canceled,
25178 _ => Self::UnknownValue(state::UnknownValue(
25179 wkt::internal::UnknownEnumValue::Integer(value),
25180 )),
25181 }
25182 }
25183 }
25184
25185 impl std::convert::From<&str> for State {
25186 fn from(value: &str) -> Self {
25187 use std::string::ToString;
25188 match value {
25189 "STATE_UNSPECIFIED" => Self::Unspecified,
25190 "STARTED" => Self::Started,
25191 "SUCCEEDED" => Self::Succeeded,
25192 "FAILED" => Self::Failed,
25193 "CANCELED" => Self::Canceled,
25194 _ => Self::UnknownValue(state::UnknownValue(
25195 wkt::internal::UnknownEnumValue::String(value.to_string()),
25196 )),
25197 }
25198 }
25199 }
25200
25201 impl serde::ser::Serialize for State {
25202 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25203 where
25204 S: serde::Serializer,
25205 {
25206 match self {
25207 Self::Unspecified => serializer.serialize_i32(0),
25208 Self::Started => serializer.serialize_i32(3),
25209 Self::Succeeded => serializer.serialize_i32(4),
25210 Self::Failed => serializer.serialize_i32(5),
25211 Self::Canceled => serializer.serialize_i32(6),
25212 Self::UnknownValue(u) => u.0.serialize(serializer),
25213 }
25214 }
25215 }
25216
25217 impl<'de> serde::de::Deserialize<'de> for State {
25218 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25219 where
25220 D: serde::Deserializer<'de>,
25221 {
25222 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
25223 ".google.container.v1.UpgradeInfoEvent.State",
25224 ))
25225 }
25226 }
25227
25228 #[derive(Clone, Debug, PartialEq)]
25244 #[non_exhaustive]
25245 pub enum EventType {
25246 Unspecified,
25248 EndOfSupport,
25251 CosMilestoneVersionUpdate,
25255 UpgradeLifecycle,
25257 UnknownValue(event_type::UnknownValue),
25262 }
25263
25264 #[doc(hidden)]
25265 pub mod event_type {
25266 #[allow(unused_imports)]
25267 use super::*;
25268 #[derive(Clone, Debug, PartialEq)]
25269 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25270 }
25271
25272 impl EventType {
25273 pub fn value(&self) -> std::option::Option<i32> {
25278 match self {
25279 Self::Unspecified => std::option::Option::Some(0),
25280 Self::EndOfSupport => std::option::Option::Some(1),
25281 Self::CosMilestoneVersionUpdate => std::option::Option::Some(2),
25282 Self::UpgradeLifecycle => std::option::Option::Some(3),
25283 Self::UnknownValue(u) => u.0.value(),
25284 }
25285 }
25286
25287 pub fn name(&self) -> std::option::Option<&str> {
25292 match self {
25293 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
25294 Self::EndOfSupport => std::option::Option::Some("END_OF_SUPPORT"),
25295 Self::CosMilestoneVersionUpdate => {
25296 std::option::Option::Some("COS_MILESTONE_VERSION_UPDATE")
25297 }
25298 Self::UpgradeLifecycle => std::option::Option::Some("UPGRADE_LIFECYCLE"),
25299 Self::UnknownValue(u) => u.0.name(),
25300 }
25301 }
25302 }
25303
25304 impl std::default::Default for EventType {
25305 fn default() -> Self {
25306 use std::convert::From;
25307 Self::from(0)
25308 }
25309 }
25310
25311 impl std::fmt::Display for EventType {
25312 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25313 wkt::internal::display_enum(f, self.name(), self.value())
25314 }
25315 }
25316
25317 impl std::convert::From<i32> for EventType {
25318 fn from(value: i32) -> Self {
25319 match value {
25320 0 => Self::Unspecified,
25321 1 => Self::EndOfSupport,
25322 2 => Self::CosMilestoneVersionUpdate,
25323 3 => Self::UpgradeLifecycle,
25324 _ => Self::UnknownValue(event_type::UnknownValue(
25325 wkt::internal::UnknownEnumValue::Integer(value),
25326 )),
25327 }
25328 }
25329 }
25330
25331 impl std::convert::From<&str> for EventType {
25332 fn from(value: &str) -> Self {
25333 use std::string::ToString;
25334 match value {
25335 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
25336 "END_OF_SUPPORT" => Self::EndOfSupport,
25337 "COS_MILESTONE_VERSION_UPDATE" => Self::CosMilestoneVersionUpdate,
25338 "UPGRADE_LIFECYCLE" => Self::UpgradeLifecycle,
25339 _ => Self::UnknownValue(event_type::UnknownValue(
25340 wkt::internal::UnknownEnumValue::String(value.to_string()),
25341 )),
25342 }
25343 }
25344 }
25345
25346 impl serde::ser::Serialize for EventType {
25347 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25348 where
25349 S: serde::Serializer,
25350 {
25351 match self {
25352 Self::Unspecified => serializer.serialize_i32(0),
25353 Self::EndOfSupport => serializer.serialize_i32(1),
25354 Self::CosMilestoneVersionUpdate => serializer.serialize_i32(2),
25355 Self::UpgradeLifecycle => serializer.serialize_i32(3),
25356 Self::UnknownValue(u) => u.0.serialize(serializer),
25357 }
25358 }
25359 }
25360
25361 impl<'de> serde::de::Deserialize<'de> for EventType {
25362 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25363 where
25364 D: serde::Deserializer<'de>,
25365 {
25366 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
25367 ".google.container.v1.UpgradeInfoEvent.EventType",
25368 ))
25369 }
25370 }
25371}
25372
25373#[derive(Clone, Default, PartialEq)]
25376#[non_exhaustive]
25377pub struct UpgradeAvailableEvent {
25378 pub version: std::string::String,
25380
25381 pub resource_type: crate::model::UpgradeResourceType,
25383
25384 pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
25387
25388 pub resource: std::string::String,
25391
25392 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25393}
25394
25395impl UpgradeAvailableEvent {
25396 pub fn new() -> Self {
25397 std::default::Default::default()
25398 }
25399
25400 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25402 self.version = v.into();
25403 self
25404 }
25405
25406 pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
25408 mut self,
25409 v: T,
25410 ) -> Self {
25411 self.resource_type = v.into();
25412 self
25413 }
25414
25415 pub fn set_release_channel<T>(mut self, v: T) -> Self
25417 where
25418 T: std::convert::Into<crate::model::ReleaseChannel>,
25419 {
25420 self.release_channel = std::option::Option::Some(v.into());
25421 self
25422 }
25423
25424 pub fn set_or_clear_release_channel<T>(mut self, v: std::option::Option<T>) -> Self
25426 where
25427 T: std::convert::Into<crate::model::ReleaseChannel>,
25428 {
25429 self.release_channel = v.map(|x| x.into());
25430 self
25431 }
25432
25433 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25435 self.resource = v.into();
25436 self
25437 }
25438}
25439
25440impl wkt::message::Message for UpgradeAvailableEvent {
25441 fn typename() -> &'static str {
25442 "type.googleapis.com/google.container.v1.UpgradeAvailableEvent"
25443 }
25444}
25445
25446#[derive(Clone, Default, PartialEq)]
25449#[non_exhaustive]
25450pub struct SecurityBulletinEvent {
25451 pub resource_type_affected: std::string::String,
25455
25456 pub bulletin_id: std::string::String,
25458
25459 pub cve_ids: std::vec::Vec<std::string::String>,
25461
25462 pub severity: std::string::String,
25464
25465 pub bulletin_uri: std::string::String,
25467
25468 pub brief_description: std::string::String,
25471
25472 pub affected_supported_minors: std::vec::Vec<std::string::String>,
25474
25475 pub patched_versions: std::vec::Vec<std::string::String>,
25477
25478 pub suggested_upgrade_target: std::string::String,
25484
25485 pub manual_steps_required: bool,
25488
25489 pub mitigated_versions: std::vec::Vec<std::string::String>,
25491
25492 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25493}
25494
25495impl SecurityBulletinEvent {
25496 pub fn new() -> Self {
25497 std::default::Default::default()
25498 }
25499
25500 pub fn set_resource_type_affected<T: std::convert::Into<std::string::String>>(
25502 mut self,
25503 v: T,
25504 ) -> Self {
25505 self.resource_type_affected = v.into();
25506 self
25507 }
25508
25509 pub fn set_bulletin_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25511 self.bulletin_id = v.into();
25512 self
25513 }
25514
25515 pub fn set_cve_ids<T, V>(mut self, v: T) -> Self
25517 where
25518 T: std::iter::IntoIterator<Item = V>,
25519 V: std::convert::Into<std::string::String>,
25520 {
25521 use std::iter::Iterator;
25522 self.cve_ids = v.into_iter().map(|i| i.into()).collect();
25523 self
25524 }
25525
25526 pub fn set_severity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25528 self.severity = v.into();
25529 self
25530 }
25531
25532 pub fn set_bulletin_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25534 self.bulletin_uri = v.into();
25535 self
25536 }
25537
25538 pub fn set_brief_description<T: std::convert::Into<std::string::String>>(
25540 mut self,
25541 v: T,
25542 ) -> Self {
25543 self.brief_description = v.into();
25544 self
25545 }
25546
25547 pub fn set_affected_supported_minors<T, V>(mut self, v: T) -> Self
25549 where
25550 T: std::iter::IntoIterator<Item = V>,
25551 V: std::convert::Into<std::string::String>,
25552 {
25553 use std::iter::Iterator;
25554 self.affected_supported_minors = v.into_iter().map(|i| i.into()).collect();
25555 self
25556 }
25557
25558 pub fn set_patched_versions<T, V>(mut self, v: T) -> Self
25560 where
25561 T: std::iter::IntoIterator<Item = V>,
25562 V: std::convert::Into<std::string::String>,
25563 {
25564 use std::iter::Iterator;
25565 self.patched_versions = v.into_iter().map(|i| i.into()).collect();
25566 self
25567 }
25568
25569 pub fn set_suggested_upgrade_target<T: std::convert::Into<std::string::String>>(
25571 mut self,
25572 v: T,
25573 ) -> Self {
25574 self.suggested_upgrade_target = v.into();
25575 self
25576 }
25577
25578 pub fn set_manual_steps_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25580 self.manual_steps_required = v.into();
25581 self
25582 }
25583
25584 pub fn set_mitigated_versions<T, V>(mut self, v: T) -> Self
25586 where
25587 T: std::iter::IntoIterator<Item = V>,
25588 V: std::convert::Into<std::string::String>,
25589 {
25590 use std::iter::Iterator;
25591 self.mitigated_versions = v.into_iter().map(|i| i.into()).collect();
25592 self
25593 }
25594}
25595
25596impl wkt::message::Message for SecurityBulletinEvent {
25597 fn typename() -> &'static str {
25598 "type.googleapis.com/google.container.v1.SecurityBulletinEvent"
25599 }
25600}
25601
25602#[derive(Clone, Default, PartialEq)]
25604#[non_exhaustive]
25605pub struct Autopilot {
25606 pub enabled: bool,
25608
25609 pub workload_policy_config: std::option::Option<crate::model::WorkloadPolicyConfig>,
25611
25612 pub privileged_admission_config: std::option::Option<crate::model::PrivilegedAdmissionConfig>,
25615
25616 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25617}
25618
25619impl Autopilot {
25620 pub fn new() -> Self {
25621 std::default::Default::default()
25622 }
25623
25624 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25626 self.enabled = v.into();
25627 self
25628 }
25629
25630 pub fn set_workload_policy_config<T>(mut self, v: T) -> Self
25632 where
25633 T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
25634 {
25635 self.workload_policy_config = std::option::Option::Some(v.into());
25636 self
25637 }
25638
25639 pub fn set_or_clear_workload_policy_config<T>(mut self, v: std::option::Option<T>) -> Self
25641 where
25642 T: std::convert::Into<crate::model::WorkloadPolicyConfig>,
25643 {
25644 self.workload_policy_config = v.map(|x| x.into());
25645 self
25646 }
25647
25648 pub fn set_privileged_admission_config<T>(mut self, v: T) -> Self
25650 where
25651 T: std::convert::Into<crate::model::PrivilegedAdmissionConfig>,
25652 {
25653 self.privileged_admission_config = std::option::Option::Some(v.into());
25654 self
25655 }
25656
25657 pub fn set_or_clear_privileged_admission_config<T>(mut self, v: std::option::Option<T>) -> Self
25659 where
25660 T: std::convert::Into<crate::model::PrivilegedAdmissionConfig>,
25661 {
25662 self.privileged_admission_config = v.map(|x| x.into());
25663 self
25664 }
25665}
25666
25667impl wkt::message::Message for Autopilot {
25668 fn typename() -> &'static str {
25669 "type.googleapis.com/google.container.v1.Autopilot"
25670 }
25671}
25672
25673#[derive(Clone, Default, PartialEq)]
25676#[non_exhaustive]
25677pub struct PrivilegedAdmissionConfig {
25678 pub allowlist_paths: std::vec::Vec<std::string::String>,
25690
25691 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25692}
25693
25694impl PrivilegedAdmissionConfig {
25695 pub fn new() -> Self {
25696 std::default::Default::default()
25697 }
25698
25699 pub fn set_allowlist_paths<T, V>(mut self, v: T) -> Self
25701 where
25702 T: std::iter::IntoIterator<Item = V>,
25703 V: std::convert::Into<std::string::String>,
25704 {
25705 use std::iter::Iterator;
25706 self.allowlist_paths = v.into_iter().map(|i| i.into()).collect();
25707 self
25708 }
25709}
25710
25711impl wkt::message::Message for PrivilegedAdmissionConfig {
25712 fn typename() -> &'static str {
25713 "type.googleapis.com/google.container.v1.PrivilegedAdmissionConfig"
25714 }
25715}
25716
25717#[derive(Clone, Default, PartialEq)]
25719#[non_exhaustive]
25720pub struct WorkloadPolicyConfig {
25721 pub allow_net_admin: std::option::Option<bool>,
25723
25724 pub autopilot_compatibility_auditing_enabled: std::option::Option<bool>,
25727
25728 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25729}
25730
25731impl WorkloadPolicyConfig {
25732 pub fn new() -> Self {
25733 std::default::Default::default()
25734 }
25735
25736 pub fn set_allow_net_admin<T>(mut self, v: T) -> Self
25738 where
25739 T: std::convert::Into<bool>,
25740 {
25741 self.allow_net_admin = std::option::Option::Some(v.into());
25742 self
25743 }
25744
25745 pub fn set_or_clear_allow_net_admin<T>(mut self, v: std::option::Option<T>) -> Self
25747 where
25748 T: std::convert::Into<bool>,
25749 {
25750 self.allow_net_admin = v.map(|x| x.into());
25751 self
25752 }
25753
25754 pub fn set_autopilot_compatibility_auditing_enabled<T>(mut self, v: T) -> Self
25756 where
25757 T: std::convert::Into<bool>,
25758 {
25759 self.autopilot_compatibility_auditing_enabled = std::option::Option::Some(v.into());
25760 self
25761 }
25762
25763 pub fn set_or_clear_autopilot_compatibility_auditing_enabled<T>(
25765 mut self,
25766 v: std::option::Option<T>,
25767 ) -> Self
25768 where
25769 T: std::convert::Into<bool>,
25770 {
25771 self.autopilot_compatibility_auditing_enabled = v.map(|x| x.into());
25772 self
25773 }
25774}
25775
25776impl wkt::message::Message for WorkloadPolicyConfig {
25777 fn typename() -> &'static str {
25778 "type.googleapis.com/google.container.v1.WorkloadPolicyConfig"
25779 }
25780}
25781
25782#[derive(Clone, Default, PartialEq)]
25784#[non_exhaustive]
25785pub struct LoggingConfig {
25786 pub component_config: std::option::Option<crate::model::LoggingComponentConfig>,
25788
25789 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25790}
25791
25792impl LoggingConfig {
25793 pub fn new() -> Self {
25794 std::default::Default::default()
25795 }
25796
25797 pub fn set_component_config<T>(mut self, v: T) -> Self
25799 where
25800 T: std::convert::Into<crate::model::LoggingComponentConfig>,
25801 {
25802 self.component_config = std::option::Option::Some(v.into());
25803 self
25804 }
25805
25806 pub fn set_or_clear_component_config<T>(mut self, v: std::option::Option<T>) -> Self
25808 where
25809 T: std::convert::Into<crate::model::LoggingComponentConfig>,
25810 {
25811 self.component_config = v.map(|x| x.into());
25812 self
25813 }
25814}
25815
25816impl wkt::message::Message for LoggingConfig {
25817 fn typename() -> &'static str {
25818 "type.googleapis.com/google.container.v1.LoggingConfig"
25819 }
25820}
25821
25822#[derive(Clone, Default, PartialEq)]
25824#[non_exhaustive]
25825pub struct LoggingComponentConfig {
25826 pub enable_components: std::vec::Vec<crate::model::logging_component_config::Component>,
25828
25829 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25830}
25831
25832impl LoggingComponentConfig {
25833 pub fn new() -> Self {
25834 std::default::Default::default()
25835 }
25836
25837 pub fn set_enable_components<T, V>(mut self, v: T) -> Self
25839 where
25840 T: std::iter::IntoIterator<Item = V>,
25841 V: std::convert::Into<crate::model::logging_component_config::Component>,
25842 {
25843 use std::iter::Iterator;
25844 self.enable_components = v.into_iter().map(|i| i.into()).collect();
25845 self
25846 }
25847}
25848
25849impl wkt::message::Message for LoggingComponentConfig {
25850 fn typename() -> &'static str {
25851 "type.googleapis.com/google.container.v1.LoggingComponentConfig"
25852 }
25853}
25854
25855pub mod logging_component_config {
25857 #[allow(unused_imports)]
25858 use super::*;
25859
25860 #[derive(Clone, Debug, PartialEq)]
25876 #[non_exhaustive]
25877 pub enum Component {
25878 Unspecified,
25880 SystemComponents,
25882 Workloads,
25884 Apiserver,
25886 Scheduler,
25888 ControllerManager,
25890 KcpSshd,
25892 KcpConnection,
25894 KcpHpa,
25896 UnknownValue(component::UnknownValue),
25901 }
25902
25903 #[doc(hidden)]
25904 pub mod component {
25905 #[allow(unused_imports)]
25906 use super::*;
25907 #[derive(Clone, Debug, PartialEq)]
25908 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25909 }
25910
25911 impl Component {
25912 pub fn value(&self) -> std::option::Option<i32> {
25917 match self {
25918 Self::Unspecified => std::option::Option::Some(0),
25919 Self::SystemComponents => std::option::Option::Some(1),
25920 Self::Workloads => std::option::Option::Some(2),
25921 Self::Apiserver => std::option::Option::Some(3),
25922 Self::Scheduler => std::option::Option::Some(4),
25923 Self::ControllerManager => std::option::Option::Some(5),
25924 Self::KcpSshd => std::option::Option::Some(7),
25925 Self::KcpConnection => std::option::Option::Some(8),
25926 Self::KcpHpa => std::option::Option::Some(9),
25927 Self::UnknownValue(u) => u.0.value(),
25928 }
25929 }
25930
25931 pub fn name(&self) -> std::option::Option<&str> {
25936 match self {
25937 Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
25938 Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
25939 Self::Workloads => std::option::Option::Some("WORKLOADS"),
25940 Self::Apiserver => std::option::Option::Some("APISERVER"),
25941 Self::Scheduler => std::option::Option::Some("SCHEDULER"),
25942 Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
25943 Self::KcpSshd => std::option::Option::Some("KCP_SSHD"),
25944 Self::KcpConnection => std::option::Option::Some("KCP_CONNECTION"),
25945 Self::KcpHpa => std::option::Option::Some("KCP_HPA"),
25946 Self::UnknownValue(u) => u.0.name(),
25947 }
25948 }
25949 }
25950
25951 impl std::default::Default for Component {
25952 fn default() -> Self {
25953 use std::convert::From;
25954 Self::from(0)
25955 }
25956 }
25957
25958 impl std::fmt::Display for Component {
25959 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25960 wkt::internal::display_enum(f, self.name(), self.value())
25961 }
25962 }
25963
25964 impl std::convert::From<i32> for Component {
25965 fn from(value: i32) -> Self {
25966 match value {
25967 0 => Self::Unspecified,
25968 1 => Self::SystemComponents,
25969 2 => Self::Workloads,
25970 3 => Self::Apiserver,
25971 4 => Self::Scheduler,
25972 5 => Self::ControllerManager,
25973 7 => Self::KcpSshd,
25974 8 => Self::KcpConnection,
25975 9 => Self::KcpHpa,
25976 _ => Self::UnknownValue(component::UnknownValue(
25977 wkt::internal::UnknownEnumValue::Integer(value),
25978 )),
25979 }
25980 }
25981 }
25982
25983 impl std::convert::From<&str> for Component {
25984 fn from(value: &str) -> Self {
25985 use std::string::ToString;
25986 match value {
25987 "COMPONENT_UNSPECIFIED" => Self::Unspecified,
25988 "SYSTEM_COMPONENTS" => Self::SystemComponents,
25989 "WORKLOADS" => Self::Workloads,
25990 "APISERVER" => Self::Apiserver,
25991 "SCHEDULER" => Self::Scheduler,
25992 "CONTROLLER_MANAGER" => Self::ControllerManager,
25993 "KCP_SSHD" => Self::KcpSshd,
25994 "KCP_CONNECTION" => Self::KcpConnection,
25995 "KCP_HPA" => Self::KcpHpa,
25996 _ => Self::UnknownValue(component::UnknownValue(
25997 wkt::internal::UnknownEnumValue::String(value.to_string()),
25998 )),
25999 }
26000 }
26001 }
26002
26003 impl serde::ser::Serialize for Component {
26004 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26005 where
26006 S: serde::Serializer,
26007 {
26008 match self {
26009 Self::Unspecified => serializer.serialize_i32(0),
26010 Self::SystemComponents => serializer.serialize_i32(1),
26011 Self::Workloads => serializer.serialize_i32(2),
26012 Self::Apiserver => serializer.serialize_i32(3),
26013 Self::Scheduler => serializer.serialize_i32(4),
26014 Self::ControllerManager => serializer.serialize_i32(5),
26015 Self::KcpSshd => serializer.serialize_i32(7),
26016 Self::KcpConnection => serializer.serialize_i32(8),
26017 Self::KcpHpa => serializer.serialize_i32(9),
26018 Self::UnknownValue(u) => u.0.serialize(serializer),
26019 }
26020 }
26021 }
26022
26023 impl<'de> serde::de::Deserialize<'de> for Component {
26024 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26025 where
26026 D: serde::Deserializer<'de>,
26027 {
26028 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
26029 ".google.container.v1.LoggingComponentConfig.Component",
26030 ))
26031 }
26032 }
26033}
26034
26035#[derive(Clone, Default, PartialEq)]
26037#[non_exhaustive]
26038pub struct RayClusterLoggingConfig {
26039 pub enabled: bool,
26041
26042 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26043}
26044
26045impl RayClusterLoggingConfig {
26046 pub fn new() -> Self {
26047 std::default::Default::default()
26048 }
26049
26050 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26052 self.enabled = v.into();
26053 self
26054 }
26055}
26056
26057impl wkt::message::Message for RayClusterLoggingConfig {
26058 fn typename() -> &'static str {
26059 "type.googleapis.com/google.container.v1.RayClusterLoggingConfig"
26060 }
26061}
26062
26063#[derive(Clone, Default, PartialEq)]
26065#[non_exhaustive]
26066pub struct MonitoringConfig {
26067 pub component_config: std::option::Option<crate::model::MonitoringComponentConfig>,
26069
26070 pub managed_prometheus_config: std::option::Option<crate::model::ManagedPrometheusConfig>,
26073
26074 pub advanced_datapath_observability_config:
26076 std::option::Option<crate::model::AdvancedDatapathObservabilityConfig>,
26077
26078 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26079}
26080
26081impl MonitoringConfig {
26082 pub fn new() -> Self {
26083 std::default::Default::default()
26084 }
26085
26086 pub fn set_component_config<T>(mut self, v: T) -> Self
26088 where
26089 T: std::convert::Into<crate::model::MonitoringComponentConfig>,
26090 {
26091 self.component_config = std::option::Option::Some(v.into());
26092 self
26093 }
26094
26095 pub fn set_or_clear_component_config<T>(mut self, v: std::option::Option<T>) -> Self
26097 where
26098 T: std::convert::Into<crate::model::MonitoringComponentConfig>,
26099 {
26100 self.component_config = v.map(|x| x.into());
26101 self
26102 }
26103
26104 pub fn set_managed_prometheus_config<T>(mut self, v: T) -> Self
26106 where
26107 T: std::convert::Into<crate::model::ManagedPrometheusConfig>,
26108 {
26109 self.managed_prometheus_config = std::option::Option::Some(v.into());
26110 self
26111 }
26112
26113 pub fn set_or_clear_managed_prometheus_config<T>(mut self, v: std::option::Option<T>) -> Self
26115 where
26116 T: std::convert::Into<crate::model::ManagedPrometheusConfig>,
26117 {
26118 self.managed_prometheus_config = v.map(|x| x.into());
26119 self
26120 }
26121
26122 pub fn set_advanced_datapath_observability_config<T>(mut self, v: T) -> Self
26124 where
26125 T: std::convert::Into<crate::model::AdvancedDatapathObservabilityConfig>,
26126 {
26127 self.advanced_datapath_observability_config = std::option::Option::Some(v.into());
26128 self
26129 }
26130
26131 pub fn set_or_clear_advanced_datapath_observability_config<T>(
26133 mut self,
26134 v: std::option::Option<T>,
26135 ) -> Self
26136 where
26137 T: std::convert::Into<crate::model::AdvancedDatapathObservabilityConfig>,
26138 {
26139 self.advanced_datapath_observability_config = v.map(|x| x.into());
26140 self
26141 }
26142}
26143
26144impl wkt::message::Message for MonitoringConfig {
26145 fn typename() -> &'static str {
26146 "type.googleapis.com/google.container.v1.MonitoringConfig"
26147 }
26148}
26149
26150#[derive(Clone, Default, PartialEq)]
26153#[non_exhaustive]
26154pub struct AdvancedDatapathObservabilityConfig {
26155 pub enable_metrics: bool,
26157
26158 pub relay_mode: crate::model::advanced_datapath_observability_config::RelayMode,
26160
26161 pub enable_relay: std::option::Option<bool>,
26163
26164 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26165}
26166
26167impl AdvancedDatapathObservabilityConfig {
26168 pub fn new() -> Self {
26169 std::default::Default::default()
26170 }
26171
26172 pub fn set_enable_metrics<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26174 self.enable_metrics = v.into();
26175 self
26176 }
26177
26178 pub fn set_relay_mode<
26180 T: std::convert::Into<crate::model::advanced_datapath_observability_config::RelayMode>,
26181 >(
26182 mut self,
26183 v: T,
26184 ) -> Self {
26185 self.relay_mode = v.into();
26186 self
26187 }
26188
26189 pub fn set_enable_relay<T>(mut self, v: T) -> Self
26191 where
26192 T: std::convert::Into<bool>,
26193 {
26194 self.enable_relay = std::option::Option::Some(v.into());
26195 self
26196 }
26197
26198 pub fn set_or_clear_enable_relay<T>(mut self, v: std::option::Option<T>) -> Self
26200 where
26201 T: std::convert::Into<bool>,
26202 {
26203 self.enable_relay = v.map(|x| x.into());
26204 self
26205 }
26206}
26207
26208impl wkt::message::Message for AdvancedDatapathObservabilityConfig {
26209 fn typename() -> &'static str {
26210 "type.googleapis.com/google.container.v1.AdvancedDatapathObservabilityConfig"
26211 }
26212}
26213
26214pub mod advanced_datapath_observability_config {
26216 #[allow(unused_imports)]
26217 use super::*;
26218
26219 #[derive(Clone, Debug, PartialEq)]
26235 #[non_exhaustive]
26236 pub enum RelayMode {
26237 Unspecified,
26239 Disabled,
26241 InternalVpcLb,
26243 ExternalLb,
26245 UnknownValue(relay_mode::UnknownValue),
26250 }
26251
26252 #[doc(hidden)]
26253 pub mod relay_mode {
26254 #[allow(unused_imports)]
26255 use super::*;
26256 #[derive(Clone, Debug, PartialEq)]
26257 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26258 }
26259
26260 impl RelayMode {
26261 pub fn value(&self) -> std::option::Option<i32> {
26266 match self {
26267 Self::Unspecified => std::option::Option::Some(0),
26268 Self::Disabled => std::option::Option::Some(1),
26269 Self::InternalVpcLb => std::option::Option::Some(3),
26270 Self::ExternalLb => std::option::Option::Some(4),
26271 Self::UnknownValue(u) => u.0.value(),
26272 }
26273 }
26274
26275 pub fn name(&self) -> std::option::Option<&str> {
26280 match self {
26281 Self::Unspecified => std::option::Option::Some("RELAY_MODE_UNSPECIFIED"),
26282 Self::Disabled => std::option::Option::Some("DISABLED"),
26283 Self::InternalVpcLb => std::option::Option::Some("INTERNAL_VPC_LB"),
26284 Self::ExternalLb => std::option::Option::Some("EXTERNAL_LB"),
26285 Self::UnknownValue(u) => u.0.name(),
26286 }
26287 }
26288 }
26289
26290 impl std::default::Default for RelayMode {
26291 fn default() -> Self {
26292 use std::convert::From;
26293 Self::from(0)
26294 }
26295 }
26296
26297 impl std::fmt::Display for RelayMode {
26298 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26299 wkt::internal::display_enum(f, self.name(), self.value())
26300 }
26301 }
26302
26303 impl std::convert::From<i32> for RelayMode {
26304 fn from(value: i32) -> Self {
26305 match value {
26306 0 => Self::Unspecified,
26307 1 => Self::Disabled,
26308 3 => Self::InternalVpcLb,
26309 4 => Self::ExternalLb,
26310 _ => Self::UnknownValue(relay_mode::UnknownValue(
26311 wkt::internal::UnknownEnumValue::Integer(value),
26312 )),
26313 }
26314 }
26315 }
26316
26317 impl std::convert::From<&str> for RelayMode {
26318 fn from(value: &str) -> Self {
26319 use std::string::ToString;
26320 match value {
26321 "RELAY_MODE_UNSPECIFIED" => Self::Unspecified,
26322 "DISABLED" => Self::Disabled,
26323 "INTERNAL_VPC_LB" => Self::InternalVpcLb,
26324 "EXTERNAL_LB" => Self::ExternalLb,
26325 _ => Self::UnknownValue(relay_mode::UnknownValue(
26326 wkt::internal::UnknownEnumValue::String(value.to_string()),
26327 )),
26328 }
26329 }
26330 }
26331
26332 impl serde::ser::Serialize for RelayMode {
26333 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26334 where
26335 S: serde::Serializer,
26336 {
26337 match self {
26338 Self::Unspecified => serializer.serialize_i32(0),
26339 Self::Disabled => serializer.serialize_i32(1),
26340 Self::InternalVpcLb => serializer.serialize_i32(3),
26341 Self::ExternalLb => serializer.serialize_i32(4),
26342 Self::UnknownValue(u) => u.0.serialize(serializer),
26343 }
26344 }
26345 }
26346
26347 impl<'de> serde::de::Deserialize<'de> for RelayMode {
26348 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26349 where
26350 D: serde::Deserializer<'de>,
26351 {
26352 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelayMode>::new(
26353 ".google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode",
26354 ))
26355 }
26356 }
26357}
26358
26359#[derive(Clone, Default, PartialEq)]
26362#[non_exhaustive]
26363pub struct RayClusterMonitoringConfig {
26364 pub enabled: bool,
26366
26367 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26368}
26369
26370impl RayClusterMonitoringConfig {
26371 pub fn new() -> Self {
26372 std::default::Default::default()
26373 }
26374
26375 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26377 self.enabled = v.into();
26378 self
26379 }
26380}
26381
26382impl wkt::message::Message for RayClusterMonitoringConfig {
26383 fn typename() -> &'static str {
26384 "type.googleapis.com/google.container.v1.RayClusterMonitoringConfig"
26385 }
26386}
26387
26388#[derive(Clone, Default, PartialEq)]
26390#[non_exhaustive]
26391pub struct NodePoolLoggingConfig {
26392 pub variant_config: std::option::Option<crate::model::LoggingVariantConfig>,
26394
26395 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26396}
26397
26398impl NodePoolLoggingConfig {
26399 pub fn new() -> Self {
26400 std::default::Default::default()
26401 }
26402
26403 pub fn set_variant_config<T>(mut self, v: T) -> Self
26405 where
26406 T: std::convert::Into<crate::model::LoggingVariantConfig>,
26407 {
26408 self.variant_config = std::option::Option::Some(v.into());
26409 self
26410 }
26411
26412 pub fn set_or_clear_variant_config<T>(mut self, v: std::option::Option<T>) -> Self
26414 where
26415 T: std::convert::Into<crate::model::LoggingVariantConfig>,
26416 {
26417 self.variant_config = v.map(|x| x.into());
26418 self
26419 }
26420}
26421
26422impl wkt::message::Message for NodePoolLoggingConfig {
26423 fn typename() -> &'static str {
26424 "type.googleapis.com/google.container.v1.NodePoolLoggingConfig"
26425 }
26426}
26427
26428#[derive(Clone, Default, PartialEq)]
26430#[non_exhaustive]
26431pub struct LoggingVariantConfig {
26432 pub variant: crate::model::logging_variant_config::Variant,
26434
26435 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26436}
26437
26438impl LoggingVariantConfig {
26439 pub fn new() -> Self {
26440 std::default::Default::default()
26441 }
26442
26443 pub fn set_variant<T: std::convert::Into<crate::model::logging_variant_config::Variant>>(
26445 mut self,
26446 v: T,
26447 ) -> Self {
26448 self.variant = v.into();
26449 self
26450 }
26451}
26452
26453impl wkt::message::Message for LoggingVariantConfig {
26454 fn typename() -> &'static str {
26455 "type.googleapis.com/google.container.v1.LoggingVariantConfig"
26456 }
26457}
26458
26459pub mod logging_variant_config {
26461 #[allow(unused_imports)]
26462 use super::*;
26463
26464 #[derive(Clone, Debug, PartialEq)]
26480 #[non_exhaustive]
26481 pub enum Variant {
26482 Unspecified,
26484 Default,
26486 MaxThroughput,
26488 UnknownValue(variant::UnknownValue),
26493 }
26494
26495 #[doc(hidden)]
26496 pub mod variant {
26497 #[allow(unused_imports)]
26498 use super::*;
26499 #[derive(Clone, Debug, PartialEq)]
26500 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26501 }
26502
26503 impl Variant {
26504 pub fn value(&self) -> std::option::Option<i32> {
26509 match self {
26510 Self::Unspecified => std::option::Option::Some(0),
26511 Self::Default => std::option::Option::Some(1),
26512 Self::MaxThroughput => std::option::Option::Some(2),
26513 Self::UnknownValue(u) => u.0.value(),
26514 }
26515 }
26516
26517 pub fn name(&self) -> std::option::Option<&str> {
26522 match self {
26523 Self::Unspecified => std::option::Option::Some("VARIANT_UNSPECIFIED"),
26524 Self::Default => std::option::Option::Some("DEFAULT"),
26525 Self::MaxThroughput => std::option::Option::Some("MAX_THROUGHPUT"),
26526 Self::UnknownValue(u) => u.0.name(),
26527 }
26528 }
26529 }
26530
26531 impl std::default::Default for Variant {
26532 fn default() -> Self {
26533 use std::convert::From;
26534 Self::from(0)
26535 }
26536 }
26537
26538 impl std::fmt::Display for Variant {
26539 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26540 wkt::internal::display_enum(f, self.name(), self.value())
26541 }
26542 }
26543
26544 impl std::convert::From<i32> for Variant {
26545 fn from(value: i32) -> Self {
26546 match value {
26547 0 => Self::Unspecified,
26548 1 => Self::Default,
26549 2 => Self::MaxThroughput,
26550 _ => Self::UnknownValue(variant::UnknownValue(
26551 wkt::internal::UnknownEnumValue::Integer(value),
26552 )),
26553 }
26554 }
26555 }
26556
26557 impl std::convert::From<&str> for Variant {
26558 fn from(value: &str) -> Self {
26559 use std::string::ToString;
26560 match value {
26561 "VARIANT_UNSPECIFIED" => Self::Unspecified,
26562 "DEFAULT" => Self::Default,
26563 "MAX_THROUGHPUT" => Self::MaxThroughput,
26564 _ => Self::UnknownValue(variant::UnknownValue(
26565 wkt::internal::UnknownEnumValue::String(value.to_string()),
26566 )),
26567 }
26568 }
26569 }
26570
26571 impl serde::ser::Serialize for Variant {
26572 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26573 where
26574 S: serde::Serializer,
26575 {
26576 match self {
26577 Self::Unspecified => serializer.serialize_i32(0),
26578 Self::Default => serializer.serialize_i32(1),
26579 Self::MaxThroughput => serializer.serialize_i32(2),
26580 Self::UnknownValue(u) => u.0.serialize(serializer),
26581 }
26582 }
26583 }
26584
26585 impl<'de> serde::de::Deserialize<'de> for Variant {
26586 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26587 where
26588 D: serde::Deserializer<'de>,
26589 {
26590 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Variant>::new(
26591 ".google.container.v1.LoggingVariantConfig.Variant",
26592 ))
26593 }
26594 }
26595}
26596
26597#[derive(Clone, Default, PartialEq)]
26599#[non_exhaustive]
26600pub struct MonitoringComponentConfig {
26601 pub enable_components: std::vec::Vec<crate::model::monitoring_component_config::Component>,
26604
26605 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26606}
26607
26608impl MonitoringComponentConfig {
26609 pub fn new() -> Self {
26610 std::default::Default::default()
26611 }
26612
26613 pub fn set_enable_components<T, V>(mut self, v: T) -> Self
26615 where
26616 T: std::iter::IntoIterator<Item = V>,
26617 V: std::convert::Into<crate::model::monitoring_component_config::Component>,
26618 {
26619 use std::iter::Iterator;
26620 self.enable_components = v.into_iter().map(|i| i.into()).collect();
26621 self
26622 }
26623}
26624
26625impl wkt::message::Message for MonitoringComponentConfig {
26626 fn typename() -> &'static str {
26627 "type.googleapis.com/google.container.v1.MonitoringComponentConfig"
26628 }
26629}
26630
26631pub mod monitoring_component_config {
26633 #[allow(unused_imports)]
26634 use super::*;
26635
26636 #[derive(Clone, Debug, PartialEq)]
26652 #[non_exhaustive]
26653 pub enum Component {
26654 Unspecified,
26656 SystemComponents,
26658 Apiserver,
26660 Scheduler,
26662 ControllerManager,
26664 Storage,
26666 Hpa,
26668 Pod,
26670 Daemonset,
26672 Deployment,
26674 Statefulset,
26676 Cadvisor,
26678 Kubelet,
26680 Dcgm,
26682 Jobset,
26684 UnknownValue(component::UnknownValue),
26689 }
26690
26691 #[doc(hidden)]
26692 pub mod component {
26693 #[allow(unused_imports)]
26694 use super::*;
26695 #[derive(Clone, Debug, PartialEq)]
26696 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26697 }
26698
26699 impl Component {
26700 pub fn value(&self) -> std::option::Option<i32> {
26705 match self {
26706 Self::Unspecified => std::option::Option::Some(0),
26707 Self::SystemComponents => std::option::Option::Some(1),
26708 Self::Apiserver => std::option::Option::Some(3),
26709 Self::Scheduler => std::option::Option::Some(4),
26710 Self::ControllerManager => std::option::Option::Some(5),
26711 Self::Storage => std::option::Option::Some(7),
26712 Self::Hpa => std::option::Option::Some(8),
26713 Self::Pod => std::option::Option::Some(9),
26714 Self::Daemonset => std::option::Option::Some(10),
26715 Self::Deployment => std::option::Option::Some(11),
26716 Self::Statefulset => std::option::Option::Some(12),
26717 Self::Cadvisor => std::option::Option::Some(13),
26718 Self::Kubelet => std::option::Option::Some(14),
26719 Self::Dcgm => std::option::Option::Some(15),
26720 Self::Jobset => std::option::Option::Some(16),
26721 Self::UnknownValue(u) => u.0.value(),
26722 }
26723 }
26724
26725 pub fn name(&self) -> std::option::Option<&str> {
26730 match self {
26731 Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
26732 Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
26733 Self::Apiserver => std::option::Option::Some("APISERVER"),
26734 Self::Scheduler => std::option::Option::Some("SCHEDULER"),
26735 Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
26736 Self::Storage => std::option::Option::Some("STORAGE"),
26737 Self::Hpa => std::option::Option::Some("HPA"),
26738 Self::Pod => std::option::Option::Some("POD"),
26739 Self::Daemonset => std::option::Option::Some("DAEMONSET"),
26740 Self::Deployment => std::option::Option::Some("DEPLOYMENT"),
26741 Self::Statefulset => std::option::Option::Some("STATEFULSET"),
26742 Self::Cadvisor => std::option::Option::Some("CADVISOR"),
26743 Self::Kubelet => std::option::Option::Some("KUBELET"),
26744 Self::Dcgm => std::option::Option::Some("DCGM"),
26745 Self::Jobset => std::option::Option::Some("JOBSET"),
26746 Self::UnknownValue(u) => u.0.name(),
26747 }
26748 }
26749 }
26750
26751 impl std::default::Default for Component {
26752 fn default() -> Self {
26753 use std::convert::From;
26754 Self::from(0)
26755 }
26756 }
26757
26758 impl std::fmt::Display for Component {
26759 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26760 wkt::internal::display_enum(f, self.name(), self.value())
26761 }
26762 }
26763
26764 impl std::convert::From<i32> for Component {
26765 fn from(value: i32) -> Self {
26766 match value {
26767 0 => Self::Unspecified,
26768 1 => Self::SystemComponents,
26769 3 => Self::Apiserver,
26770 4 => Self::Scheduler,
26771 5 => Self::ControllerManager,
26772 7 => Self::Storage,
26773 8 => Self::Hpa,
26774 9 => Self::Pod,
26775 10 => Self::Daemonset,
26776 11 => Self::Deployment,
26777 12 => Self::Statefulset,
26778 13 => Self::Cadvisor,
26779 14 => Self::Kubelet,
26780 15 => Self::Dcgm,
26781 16 => Self::Jobset,
26782 _ => Self::UnknownValue(component::UnknownValue(
26783 wkt::internal::UnknownEnumValue::Integer(value),
26784 )),
26785 }
26786 }
26787 }
26788
26789 impl std::convert::From<&str> for Component {
26790 fn from(value: &str) -> Self {
26791 use std::string::ToString;
26792 match value {
26793 "COMPONENT_UNSPECIFIED" => Self::Unspecified,
26794 "SYSTEM_COMPONENTS" => Self::SystemComponents,
26795 "APISERVER" => Self::Apiserver,
26796 "SCHEDULER" => Self::Scheduler,
26797 "CONTROLLER_MANAGER" => Self::ControllerManager,
26798 "STORAGE" => Self::Storage,
26799 "HPA" => Self::Hpa,
26800 "POD" => Self::Pod,
26801 "DAEMONSET" => Self::Daemonset,
26802 "DEPLOYMENT" => Self::Deployment,
26803 "STATEFULSET" => Self::Statefulset,
26804 "CADVISOR" => Self::Cadvisor,
26805 "KUBELET" => Self::Kubelet,
26806 "DCGM" => Self::Dcgm,
26807 "JOBSET" => Self::Jobset,
26808 _ => Self::UnknownValue(component::UnknownValue(
26809 wkt::internal::UnknownEnumValue::String(value.to_string()),
26810 )),
26811 }
26812 }
26813 }
26814
26815 impl serde::ser::Serialize for Component {
26816 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26817 where
26818 S: serde::Serializer,
26819 {
26820 match self {
26821 Self::Unspecified => serializer.serialize_i32(0),
26822 Self::SystemComponents => serializer.serialize_i32(1),
26823 Self::Apiserver => serializer.serialize_i32(3),
26824 Self::Scheduler => serializer.serialize_i32(4),
26825 Self::ControllerManager => serializer.serialize_i32(5),
26826 Self::Storage => serializer.serialize_i32(7),
26827 Self::Hpa => serializer.serialize_i32(8),
26828 Self::Pod => serializer.serialize_i32(9),
26829 Self::Daemonset => serializer.serialize_i32(10),
26830 Self::Deployment => serializer.serialize_i32(11),
26831 Self::Statefulset => serializer.serialize_i32(12),
26832 Self::Cadvisor => serializer.serialize_i32(13),
26833 Self::Kubelet => serializer.serialize_i32(14),
26834 Self::Dcgm => serializer.serialize_i32(15),
26835 Self::Jobset => serializer.serialize_i32(16),
26836 Self::UnknownValue(u) => u.0.serialize(serializer),
26837 }
26838 }
26839 }
26840
26841 impl<'de> serde::de::Deserialize<'de> for Component {
26842 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26843 where
26844 D: serde::Deserializer<'de>,
26845 {
26846 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
26847 ".google.container.v1.MonitoringComponentConfig.Component",
26848 ))
26849 }
26850 }
26851}
26852
26853#[derive(Clone, Default, PartialEq)]
26856#[non_exhaustive]
26857pub struct ManagedPrometheusConfig {
26858 pub enabled: bool,
26860
26861 pub auto_monitoring_config: std::option::Option<crate::model::AutoMonitoringConfig>,
26863
26864 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26865}
26866
26867impl ManagedPrometheusConfig {
26868 pub fn new() -> Self {
26869 std::default::Default::default()
26870 }
26871
26872 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
26874 self.enabled = v.into();
26875 self
26876 }
26877
26878 pub fn set_auto_monitoring_config<T>(mut self, v: T) -> Self
26880 where
26881 T: std::convert::Into<crate::model::AutoMonitoringConfig>,
26882 {
26883 self.auto_monitoring_config = std::option::Option::Some(v.into());
26884 self
26885 }
26886
26887 pub fn set_or_clear_auto_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
26889 where
26890 T: std::convert::Into<crate::model::AutoMonitoringConfig>,
26891 {
26892 self.auto_monitoring_config = v.map(|x| x.into());
26893 self
26894 }
26895}
26896
26897impl wkt::message::Message for ManagedPrometheusConfig {
26898 fn typename() -> &'static str {
26899 "type.googleapis.com/google.container.v1.ManagedPrometheusConfig"
26900 }
26901}
26902
26903#[derive(Clone, Default, PartialEq)]
26906#[non_exhaustive]
26907pub struct AutoMonitoringConfig {
26908 pub scope: crate::model::auto_monitoring_config::Scope,
26910
26911 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26912}
26913
26914impl AutoMonitoringConfig {
26915 pub fn new() -> Self {
26916 std::default::Default::default()
26917 }
26918
26919 pub fn set_scope<T: std::convert::Into<crate::model::auto_monitoring_config::Scope>>(
26921 mut self,
26922 v: T,
26923 ) -> Self {
26924 self.scope = v.into();
26925 self
26926 }
26927}
26928
26929impl wkt::message::Message for AutoMonitoringConfig {
26930 fn typename() -> &'static str {
26931 "type.googleapis.com/google.container.v1.AutoMonitoringConfig"
26932 }
26933}
26934
26935pub mod auto_monitoring_config {
26937 #[allow(unused_imports)]
26938 use super::*;
26939
26940 #[derive(Clone, Debug, PartialEq)]
26956 #[non_exhaustive]
26957 pub enum Scope {
26958 Unspecified,
26960 All,
26962 None,
26964 UnknownValue(scope::UnknownValue),
26969 }
26970
26971 #[doc(hidden)]
26972 pub mod scope {
26973 #[allow(unused_imports)]
26974 use super::*;
26975 #[derive(Clone, Debug, PartialEq)]
26976 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26977 }
26978
26979 impl Scope {
26980 pub fn value(&self) -> std::option::Option<i32> {
26985 match self {
26986 Self::Unspecified => std::option::Option::Some(0),
26987 Self::All => std::option::Option::Some(1),
26988 Self::None => std::option::Option::Some(2),
26989 Self::UnknownValue(u) => u.0.value(),
26990 }
26991 }
26992
26993 pub fn name(&self) -> std::option::Option<&str> {
26998 match self {
26999 Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
27000 Self::All => std::option::Option::Some("ALL"),
27001 Self::None => std::option::Option::Some("NONE"),
27002 Self::UnknownValue(u) => u.0.name(),
27003 }
27004 }
27005 }
27006
27007 impl std::default::Default for Scope {
27008 fn default() -> Self {
27009 use std::convert::From;
27010 Self::from(0)
27011 }
27012 }
27013
27014 impl std::fmt::Display for Scope {
27015 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27016 wkt::internal::display_enum(f, self.name(), self.value())
27017 }
27018 }
27019
27020 impl std::convert::From<i32> for Scope {
27021 fn from(value: i32) -> Self {
27022 match value {
27023 0 => Self::Unspecified,
27024 1 => Self::All,
27025 2 => Self::None,
27026 _ => Self::UnknownValue(scope::UnknownValue(
27027 wkt::internal::UnknownEnumValue::Integer(value),
27028 )),
27029 }
27030 }
27031 }
27032
27033 impl std::convert::From<&str> for Scope {
27034 fn from(value: &str) -> Self {
27035 use std::string::ToString;
27036 match value {
27037 "SCOPE_UNSPECIFIED" => Self::Unspecified,
27038 "ALL" => Self::All,
27039 "NONE" => Self::None,
27040 _ => Self::UnknownValue(scope::UnknownValue(
27041 wkt::internal::UnknownEnumValue::String(value.to_string()),
27042 )),
27043 }
27044 }
27045 }
27046
27047 impl serde::ser::Serialize for Scope {
27048 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27049 where
27050 S: serde::Serializer,
27051 {
27052 match self {
27053 Self::Unspecified => serializer.serialize_i32(0),
27054 Self::All => serializer.serialize_i32(1),
27055 Self::None => serializer.serialize_i32(2),
27056 Self::UnknownValue(u) => u.0.serialize(serializer),
27057 }
27058 }
27059 }
27060
27061 impl<'de> serde::de::Deserialize<'de> for Scope {
27062 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27063 where
27064 D: serde::Deserializer<'de>,
27065 {
27066 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
27067 ".google.container.v1.AutoMonitoringConfig.Scope",
27068 ))
27069 }
27070 }
27071}
27072
27073#[derive(Clone, Default, PartialEq)]
27076#[non_exhaustive]
27077pub struct PodAutoscaling {
27078 pub hpa_profile: std::option::Option<crate::model::pod_autoscaling::HPAProfile>,
27080
27081 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27082}
27083
27084impl PodAutoscaling {
27085 pub fn new() -> Self {
27086 std::default::Default::default()
27087 }
27088
27089 pub fn set_hpa_profile<T>(mut self, v: T) -> Self
27091 where
27092 T: std::convert::Into<crate::model::pod_autoscaling::HPAProfile>,
27093 {
27094 self.hpa_profile = std::option::Option::Some(v.into());
27095 self
27096 }
27097
27098 pub fn set_or_clear_hpa_profile<T>(mut self, v: std::option::Option<T>) -> Self
27100 where
27101 T: std::convert::Into<crate::model::pod_autoscaling::HPAProfile>,
27102 {
27103 self.hpa_profile = v.map(|x| x.into());
27104 self
27105 }
27106}
27107
27108impl wkt::message::Message for PodAutoscaling {
27109 fn typename() -> &'static str {
27110 "type.googleapis.com/google.container.v1.PodAutoscaling"
27111 }
27112}
27113
27114pub mod pod_autoscaling {
27116 #[allow(unused_imports)]
27117 use super::*;
27118
27119 #[derive(Clone, Debug, PartialEq)]
27135 #[non_exhaustive]
27136 pub enum HPAProfile {
27137 Unspecified,
27139 None,
27141 Performance,
27145 UnknownValue(hpa_profile::UnknownValue),
27150 }
27151
27152 #[doc(hidden)]
27153 pub mod hpa_profile {
27154 #[allow(unused_imports)]
27155 use super::*;
27156 #[derive(Clone, Debug, PartialEq)]
27157 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27158 }
27159
27160 impl HPAProfile {
27161 pub fn value(&self) -> std::option::Option<i32> {
27166 match self {
27167 Self::Unspecified => std::option::Option::Some(0),
27168 Self::None => std::option::Option::Some(1),
27169 Self::Performance => std::option::Option::Some(2),
27170 Self::UnknownValue(u) => u.0.value(),
27171 }
27172 }
27173
27174 pub fn name(&self) -> std::option::Option<&str> {
27179 match self {
27180 Self::Unspecified => std::option::Option::Some("HPA_PROFILE_UNSPECIFIED"),
27181 Self::None => std::option::Option::Some("NONE"),
27182 Self::Performance => std::option::Option::Some("PERFORMANCE"),
27183 Self::UnknownValue(u) => u.0.name(),
27184 }
27185 }
27186 }
27187
27188 impl std::default::Default for HPAProfile {
27189 fn default() -> Self {
27190 use std::convert::From;
27191 Self::from(0)
27192 }
27193 }
27194
27195 impl std::fmt::Display for HPAProfile {
27196 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27197 wkt::internal::display_enum(f, self.name(), self.value())
27198 }
27199 }
27200
27201 impl std::convert::From<i32> for HPAProfile {
27202 fn from(value: i32) -> Self {
27203 match value {
27204 0 => Self::Unspecified,
27205 1 => Self::None,
27206 2 => Self::Performance,
27207 _ => Self::UnknownValue(hpa_profile::UnknownValue(
27208 wkt::internal::UnknownEnumValue::Integer(value),
27209 )),
27210 }
27211 }
27212 }
27213
27214 impl std::convert::From<&str> for HPAProfile {
27215 fn from(value: &str) -> Self {
27216 use std::string::ToString;
27217 match value {
27218 "HPA_PROFILE_UNSPECIFIED" => Self::Unspecified,
27219 "NONE" => Self::None,
27220 "PERFORMANCE" => Self::Performance,
27221 _ => Self::UnknownValue(hpa_profile::UnknownValue(
27222 wkt::internal::UnknownEnumValue::String(value.to_string()),
27223 )),
27224 }
27225 }
27226 }
27227
27228 impl serde::ser::Serialize for HPAProfile {
27229 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27230 where
27231 S: serde::Serializer,
27232 {
27233 match self {
27234 Self::Unspecified => serializer.serialize_i32(0),
27235 Self::None => serializer.serialize_i32(1),
27236 Self::Performance => serializer.serialize_i32(2),
27237 Self::UnknownValue(u) => u.0.serialize(serializer),
27238 }
27239 }
27240 }
27241
27242 impl<'de> serde::de::Deserialize<'de> for HPAProfile {
27243 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27244 where
27245 D: serde::Deserializer<'de>,
27246 {
27247 deserializer.deserialize_any(wkt::internal::EnumVisitor::<HPAProfile>::new(
27248 ".google.container.v1.PodAutoscaling.HPAProfile",
27249 ))
27250 }
27251 }
27252}
27253
27254#[derive(Clone, Default, PartialEq)]
27256#[non_exhaustive]
27257pub struct Fleet {
27258 pub project: std::string::String,
27262
27263 pub membership: std::string::String,
27267
27268 pub pre_registered: bool,
27271
27272 pub membership_type: crate::model::fleet::MembershipType,
27274
27275 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27276}
27277
27278impl Fleet {
27279 pub fn new() -> Self {
27280 std::default::Default::default()
27281 }
27282
27283 pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27285 self.project = v.into();
27286 self
27287 }
27288
27289 pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27291 self.membership = v.into();
27292 self
27293 }
27294
27295 pub fn set_pre_registered<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
27297 self.pre_registered = v.into();
27298 self
27299 }
27300
27301 pub fn set_membership_type<T: std::convert::Into<crate::model::fleet::MembershipType>>(
27303 mut self,
27304 v: T,
27305 ) -> Self {
27306 self.membership_type = v.into();
27307 self
27308 }
27309}
27310
27311impl wkt::message::Message for Fleet {
27312 fn typename() -> &'static str {
27313 "type.googleapis.com/google.container.v1.Fleet"
27314 }
27315}
27316
27317pub mod fleet {
27319 #[allow(unused_imports)]
27320 use super::*;
27321
27322 #[derive(Clone, Debug, PartialEq)]
27339 #[non_exhaustive]
27340 pub enum MembershipType {
27341 Unspecified,
27343 Lightweight,
27345 UnknownValue(membership_type::UnknownValue),
27350 }
27351
27352 #[doc(hidden)]
27353 pub mod membership_type {
27354 #[allow(unused_imports)]
27355 use super::*;
27356 #[derive(Clone, Debug, PartialEq)]
27357 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27358 }
27359
27360 impl MembershipType {
27361 pub fn value(&self) -> std::option::Option<i32> {
27366 match self {
27367 Self::Unspecified => std::option::Option::Some(0),
27368 Self::Lightweight => std::option::Option::Some(1),
27369 Self::UnknownValue(u) => u.0.value(),
27370 }
27371 }
27372
27373 pub fn name(&self) -> std::option::Option<&str> {
27378 match self {
27379 Self::Unspecified => std::option::Option::Some("MEMBERSHIP_TYPE_UNSPECIFIED"),
27380 Self::Lightweight => std::option::Option::Some("LIGHTWEIGHT"),
27381 Self::UnknownValue(u) => u.0.name(),
27382 }
27383 }
27384 }
27385
27386 impl std::default::Default for MembershipType {
27387 fn default() -> Self {
27388 use std::convert::From;
27389 Self::from(0)
27390 }
27391 }
27392
27393 impl std::fmt::Display for MembershipType {
27394 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27395 wkt::internal::display_enum(f, self.name(), self.value())
27396 }
27397 }
27398
27399 impl std::convert::From<i32> for MembershipType {
27400 fn from(value: i32) -> Self {
27401 match value {
27402 0 => Self::Unspecified,
27403 1 => Self::Lightweight,
27404 _ => Self::UnknownValue(membership_type::UnknownValue(
27405 wkt::internal::UnknownEnumValue::Integer(value),
27406 )),
27407 }
27408 }
27409 }
27410
27411 impl std::convert::From<&str> for MembershipType {
27412 fn from(value: &str) -> Self {
27413 use std::string::ToString;
27414 match value {
27415 "MEMBERSHIP_TYPE_UNSPECIFIED" => Self::Unspecified,
27416 "LIGHTWEIGHT" => Self::Lightweight,
27417 _ => Self::UnknownValue(membership_type::UnknownValue(
27418 wkt::internal::UnknownEnumValue::String(value.to_string()),
27419 )),
27420 }
27421 }
27422 }
27423
27424 impl serde::ser::Serialize for MembershipType {
27425 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27426 where
27427 S: serde::Serializer,
27428 {
27429 match self {
27430 Self::Unspecified => serializer.serialize_i32(0),
27431 Self::Lightweight => serializer.serialize_i32(1),
27432 Self::UnknownValue(u) => u.0.serialize(serializer),
27433 }
27434 }
27435 }
27436
27437 impl<'de> serde::de::Deserialize<'de> for MembershipType {
27438 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27439 where
27440 D: serde::Deserializer<'de>,
27441 {
27442 deserializer.deserialize_any(wkt::internal::EnumVisitor::<MembershipType>::new(
27443 ".google.container.v1.Fleet.MembershipType",
27444 ))
27445 }
27446 }
27447}
27448
27449#[derive(Clone, Default, PartialEq)]
27451#[non_exhaustive]
27452pub struct ControlPlaneEndpointsConfig {
27453 pub dns_endpoint_config:
27455 std::option::Option<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
27456
27457 pub ip_endpoints_config:
27459 std::option::Option<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
27460
27461 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27462}
27463
27464impl ControlPlaneEndpointsConfig {
27465 pub fn new() -> Self {
27466 std::default::Default::default()
27467 }
27468
27469 pub fn set_dns_endpoint_config<T>(mut self, v: T) -> Self
27471 where
27472 T: std::convert::Into<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
27473 {
27474 self.dns_endpoint_config = std::option::Option::Some(v.into());
27475 self
27476 }
27477
27478 pub fn set_or_clear_dns_endpoint_config<T>(mut self, v: std::option::Option<T>) -> Self
27480 where
27481 T: std::convert::Into<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
27482 {
27483 self.dns_endpoint_config = v.map(|x| x.into());
27484 self
27485 }
27486
27487 pub fn set_ip_endpoints_config<T>(mut self, v: T) -> Self
27489 where
27490 T: std::convert::Into<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
27491 {
27492 self.ip_endpoints_config = std::option::Option::Some(v.into());
27493 self
27494 }
27495
27496 pub fn set_or_clear_ip_endpoints_config<T>(mut self, v: std::option::Option<T>) -> Self
27498 where
27499 T: std::convert::Into<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
27500 {
27501 self.ip_endpoints_config = v.map(|x| x.into());
27502 self
27503 }
27504}
27505
27506impl wkt::message::Message for ControlPlaneEndpointsConfig {
27507 fn typename() -> &'static str {
27508 "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig"
27509 }
27510}
27511
27512pub mod control_plane_endpoints_config {
27514 #[allow(unused_imports)]
27515 use super::*;
27516
27517 #[derive(Clone, Default, PartialEq)]
27519 #[non_exhaustive]
27520 pub struct DNSEndpointConfig {
27521 pub endpoint: std::string::String,
27529
27530 pub allow_external_traffic: std::option::Option<bool>,
27533
27534 pub enable_k8s_tokens_via_dns: std::option::Option<bool>,
27536
27537 pub enable_k8s_certs_via_dns: std::option::Option<bool>,
27539
27540 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27541 }
27542
27543 impl DNSEndpointConfig {
27544 pub fn new() -> Self {
27545 std::default::Default::default()
27546 }
27547
27548 pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27550 self.endpoint = v.into();
27551 self
27552 }
27553
27554 pub fn set_allow_external_traffic<T>(mut self, v: T) -> Self
27556 where
27557 T: std::convert::Into<bool>,
27558 {
27559 self.allow_external_traffic = std::option::Option::Some(v.into());
27560 self
27561 }
27562
27563 pub fn set_or_clear_allow_external_traffic<T>(mut self, v: std::option::Option<T>) -> Self
27565 where
27566 T: std::convert::Into<bool>,
27567 {
27568 self.allow_external_traffic = v.map(|x| x.into());
27569 self
27570 }
27571
27572 pub fn set_enable_k8s_tokens_via_dns<T>(mut self, v: T) -> Self
27574 where
27575 T: std::convert::Into<bool>,
27576 {
27577 self.enable_k8s_tokens_via_dns = std::option::Option::Some(v.into());
27578 self
27579 }
27580
27581 pub fn set_or_clear_enable_k8s_tokens_via_dns<T>(
27583 mut self,
27584 v: std::option::Option<T>,
27585 ) -> Self
27586 where
27587 T: std::convert::Into<bool>,
27588 {
27589 self.enable_k8s_tokens_via_dns = v.map(|x| x.into());
27590 self
27591 }
27592
27593 pub fn set_enable_k8s_certs_via_dns<T>(mut self, v: T) -> Self
27595 where
27596 T: std::convert::Into<bool>,
27597 {
27598 self.enable_k8s_certs_via_dns = std::option::Option::Some(v.into());
27599 self
27600 }
27601
27602 pub fn set_or_clear_enable_k8s_certs_via_dns<T>(mut self, v: std::option::Option<T>) -> Self
27604 where
27605 T: std::convert::Into<bool>,
27606 {
27607 self.enable_k8s_certs_via_dns = v.map(|x| x.into());
27608 self
27609 }
27610 }
27611
27612 impl wkt::message::Message for DNSEndpointConfig {
27613 fn typename() -> &'static str {
27614 "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig"
27615 }
27616 }
27617
27618 #[derive(Clone, Default, PartialEq)]
27620 #[non_exhaustive]
27621 pub struct IPEndpointsConfig {
27622 pub enabled: std::option::Option<bool>,
27624
27625 pub enable_public_endpoint: std::option::Option<bool>,
27630
27631 pub global_access: std::option::Option<bool>,
27639
27640 pub authorized_networks_config:
27646 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
27647
27648 pub public_endpoint: std::string::String,
27651
27652 pub private_endpoint: std::string::String,
27655
27656 pub private_endpoint_subnetwork: std::string::String,
27662
27663 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27664 }
27665
27666 impl IPEndpointsConfig {
27667 pub fn new() -> Self {
27668 std::default::Default::default()
27669 }
27670
27671 pub fn set_enabled<T>(mut self, v: T) -> Self
27673 where
27674 T: std::convert::Into<bool>,
27675 {
27676 self.enabled = std::option::Option::Some(v.into());
27677 self
27678 }
27679
27680 pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
27682 where
27683 T: std::convert::Into<bool>,
27684 {
27685 self.enabled = v.map(|x| x.into());
27686 self
27687 }
27688
27689 pub fn set_enable_public_endpoint<T>(mut self, v: T) -> Self
27691 where
27692 T: std::convert::Into<bool>,
27693 {
27694 self.enable_public_endpoint = std::option::Option::Some(v.into());
27695 self
27696 }
27697
27698 pub fn set_or_clear_enable_public_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
27700 where
27701 T: std::convert::Into<bool>,
27702 {
27703 self.enable_public_endpoint = v.map(|x| x.into());
27704 self
27705 }
27706
27707 pub fn set_global_access<T>(mut self, v: T) -> Self
27709 where
27710 T: std::convert::Into<bool>,
27711 {
27712 self.global_access = std::option::Option::Some(v.into());
27713 self
27714 }
27715
27716 pub fn set_or_clear_global_access<T>(mut self, v: std::option::Option<T>) -> Self
27718 where
27719 T: std::convert::Into<bool>,
27720 {
27721 self.global_access = v.map(|x| x.into());
27722 self
27723 }
27724
27725 pub fn set_authorized_networks_config<T>(mut self, v: T) -> Self
27727 where
27728 T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
27729 {
27730 self.authorized_networks_config = std::option::Option::Some(v.into());
27731 self
27732 }
27733
27734 pub fn set_or_clear_authorized_networks_config<T>(
27736 mut self,
27737 v: std::option::Option<T>,
27738 ) -> Self
27739 where
27740 T: std::convert::Into<crate::model::MasterAuthorizedNetworksConfig>,
27741 {
27742 self.authorized_networks_config = v.map(|x| x.into());
27743 self
27744 }
27745
27746 pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(
27748 mut self,
27749 v: T,
27750 ) -> Self {
27751 self.public_endpoint = v.into();
27752 self
27753 }
27754
27755 pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
27757 mut self,
27758 v: T,
27759 ) -> Self {
27760 self.private_endpoint = v.into();
27761 self
27762 }
27763
27764 pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
27766 mut self,
27767 v: T,
27768 ) -> Self {
27769 self.private_endpoint_subnetwork = v.into();
27770 self
27771 }
27772 }
27773
27774 impl wkt::message::Message for IPEndpointsConfig {
27775 fn typename() -> &'static str {
27776 "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig"
27777 }
27778 }
27779}
27780
27781#[derive(Clone, Default, PartialEq)]
27784#[non_exhaustive]
27785pub struct LocalNvmeSsdBlockConfig {
27786 pub local_ssd_count: i32,
27804
27805 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27806}
27807
27808impl LocalNvmeSsdBlockConfig {
27809 pub fn new() -> Self {
27810 std::default::Default::default()
27811 }
27812
27813 pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27815 self.local_ssd_count = v.into();
27816 self
27817 }
27818}
27819
27820impl wkt::message::Message for LocalNvmeSsdBlockConfig {
27821 fn typename() -> &'static str {
27822 "type.googleapis.com/google.container.v1.LocalNvmeSsdBlockConfig"
27823 }
27824}
27825
27826#[derive(Clone, Default, PartialEq)]
27829#[non_exhaustive]
27830pub struct EphemeralStorageLocalSsdConfig {
27831 pub local_ssd_count: i32,
27851
27852 pub data_cache_count: i32,
27854
27855 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27856}
27857
27858impl EphemeralStorageLocalSsdConfig {
27859 pub fn new() -> Self {
27860 std::default::Default::default()
27861 }
27862
27863 pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27865 self.local_ssd_count = v.into();
27866 self
27867 }
27868
27869 pub fn set_data_cache_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27871 self.data_cache_count = v.into();
27872 self
27873 }
27874}
27875
27876impl wkt::message::Message for EphemeralStorageLocalSsdConfig {
27877 fn typename() -> &'static str {
27878 "type.googleapis.com/google.container.v1.EphemeralStorageLocalSsdConfig"
27879 }
27880}
27881
27882#[derive(Clone, Default, PartialEq)]
27889#[non_exhaustive]
27890pub struct ResourceManagerTags {
27891 pub tags: std::collections::HashMap<std::string::String, std::string::String>,
27897
27898 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27899}
27900
27901impl ResourceManagerTags {
27902 pub fn new() -> Self {
27903 std::default::Default::default()
27904 }
27905
27906 pub fn set_tags<T, K, V>(mut self, v: T) -> Self
27908 where
27909 T: std::iter::IntoIterator<Item = (K, V)>,
27910 K: std::convert::Into<std::string::String>,
27911 V: std::convert::Into<std::string::String>,
27912 {
27913 use std::iter::Iterator;
27914 self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
27915 self
27916 }
27917}
27918
27919impl wkt::message::Message for ResourceManagerTags {
27920 fn typename() -> &'static str {
27921 "type.googleapis.com/google.container.v1.ResourceManagerTags"
27922 }
27923}
27924
27925#[derive(Clone, Default, PartialEq)]
27930#[non_exhaustive]
27931#[deprecated]
27932pub struct EnterpriseConfig {
27933 pub cluster_tier: crate::model::enterprise_config::ClusterTier,
27935
27936 pub desired_tier: crate::model::enterprise_config::ClusterTier,
27938
27939 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27940}
27941
27942impl EnterpriseConfig {
27943 pub fn new() -> Self {
27944 std::default::Default::default()
27945 }
27946
27947 pub fn set_cluster_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
27949 mut self,
27950 v: T,
27951 ) -> Self {
27952 self.cluster_tier = v.into();
27953 self
27954 }
27955
27956 pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
27958 mut self,
27959 v: T,
27960 ) -> Self {
27961 self.desired_tier = v.into();
27962 self
27963 }
27964}
27965
27966impl wkt::message::Message for EnterpriseConfig {
27967 fn typename() -> &'static str {
27968 "type.googleapis.com/google.container.v1.EnterpriseConfig"
27969 }
27970}
27971
27972pub mod enterprise_config {
27974 #[allow(unused_imports)]
27975 use super::*;
27976
27977 #[derive(Clone, Debug, PartialEq)]
27996 #[non_exhaustive]
27997 #[deprecated]
27998 pub enum ClusterTier {
27999 Unspecified,
28001 Standard,
28003 Enterprise,
28005 UnknownValue(cluster_tier::UnknownValue),
28010 }
28011
28012 #[doc(hidden)]
28013 pub mod cluster_tier {
28014 #[allow(unused_imports)]
28015 use super::*;
28016 #[derive(Clone, Debug, PartialEq)]
28017 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28018 }
28019
28020 impl ClusterTier {
28021 pub fn value(&self) -> std::option::Option<i32> {
28026 match self {
28027 Self::Unspecified => std::option::Option::Some(0),
28028 Self::Standard => std::option::Option::Some(1),
28029 Self::Enterprise => std::option::Option::Some(2),
28030 Self::UnknownValue(u) => u.0.value(),
28031 }
28032 }
28033
28034 pub fn name(&self) -> std::option::Option<&str> {
28039 match self {
28040 Self::Unspecified => std::option::Option::Some("CLUSTER_TIER_UNSPECIFIED"),
28041 Self::Standard => std::option::Option::Some("STANDARD"),
28042 Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
28043 Self::UnknownValue(u) => u.0.name(),
28044 }
28045 }
28046 }
28047
28048 impl std::default::Default for ClusterTier {
28049 fn default() -> Self {
28050 use std::convert::From;
28051 Self::from(0)
28052 }
28053 }
28054
28055 impl std::fmt::Display for ClusterTier {
28056 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28057 wkt::internal::display_enum(f, self.name(), self.value())
28058 }
28059 }
28060
28061 impl std::convert::From<i32> for ClusterTier {
28062 fn from(value: i32) -> Self {
28063 match value {
28064 0 => Self::Unspecified,
28065 1 => Self::Standard,
28066 2 => Self::Enterprise,
28067 _ => Self::UnknownValue(cluster_tier::UnknownValue(
28068 wkt::internal::UnknownEnumValue::Integer(value),
28069 )),
28070 }
28071 }
28072 }
28073
28074 impl std::convert::From<&str> for ClusterTier {
28075 fn from(value: &str) -> Self {
28076 use std::string::ToString;
28077 match value {
28078 "CLUSTER_TIER_UNSPECIFIED" => Self::Unspecified,
28079 "STANDARD" => Self::Standard,
28080 "ENTERPRISE" => Self::Enterprise,
28081 _ => Self::UnknownValue(cluster_tier::UnknownValue(
28082 wkt::internal::UnknownEnumValue::String(value.to_string()),
28083 )),
28084 }
28085 }
28086 }
28087
28088 impl serde::ser::Serialize for ClusterTier {
28089 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28090 where
28091 S: serde::Serializer,
28092 {
28093 match self {
28094 Self::Unspecified => serializer.serialize_i32(0),
28095 Self::Standard => serializer.serialize_i32(1),
28096 Self::Enterprise => serializer.serialize_i32(2),
28097 Self::UnknownValue(u) => u.0.serialize(serializer),
28098 }
28099 }
28100 }
28101
28102 impl<'de> serde::de::Deserialize<'de> for ClusterTier {
28103 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28104 where
28105 D: serde::Deserializer<'de>,
28106 {
28107 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ClusterTier>::new(
28108 ".google.container.v1.EnterpriseConfig.ClusterTier",
28109 ))
28110 }
28111 }
28112}
28113
28114#[derive(Clone, Default, PartialEq)]
28116#[non_exhaustive]
28117pub struct SecretManagerConfig {
28118 pub enabled: std::option::Option<bool>,
28120
28121 pub rotation_config: std::option::Option<crate::model::secret_manager_config::RotationConfig>,
28123
28124 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28125}
28126
28127impl SecretManagerConfig {
28128 pub fn new() -> Self {
28129 std::default::Default::default()
28130 }
28131
28132 pub fn set_enabled<T>(mut self, v: T) -> Self
28134 where
28135 T: std::convert::Into<bool>,
28136 {
28137 self.enabled = std::option::Option::Some(v.into());
28138 self
28139 }
28140
28141 pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
28143 where
28144 T: std::convert::Into<bool>,
28145 {
28146 self.enabled = v.map(|x| x.into());
28147 self
28148 }
28149
28150 pub fn set_rotation_config<T>(mut self, v: T) -> Self
28152 where
28153 T: std::convert::Into<crate::model::secret_manager_config::RotationConfig>,
28154 {
28155 self.rotation_config = std::option::Option::Some(v.into());
28156 self
28157 }
28158
28159 pub fn set_or_clear_rotation_config<T>(mut self, v: std::option::Option<T>) -> Self
28161 where
28162 T: std::convert::Into<crate::model::secret_manager_config::RotationConfig>,
28163 {
28164 self.rotation_config = v.map(|x| x.into());
28165 self
28166 }
28167}
28168
28169impl wkt::message::Message for SecretManagerConfig {
28170 fn typename() -> &'static str {
28171 "type.googleapis.com/google.container.v1.SecretManagerConfig"
28172 }
28173}
28174
28175pub mod secret_manager_config {
28177 #[allow(unused_imports)]
28178 use super::*;
28179
28180 #[derive(Clone, Default, PartialEq)]
28182 #[non_exhaustive]
28183 pub struct RotationConfig {
28184 pub enabled: std::option::Option<bool>,
28186
28187 pub rotation_interval: std::option::Option<wkt::Duration>,
28190
28191 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28192 }
28193
28194 impl RotationConfig {
28195 pub fn new() -> Self {
28196 std::default::Default::default()
28197 }
28198
28199 pub fn set_enabled<T>(mut self, v: T) -> Self
28201 where
28202 T: std::convert::Into<bool>,
28203 {
28204 self.enabled = std::option::Option::Some(v.into());
28205 self
28206 }
28207
28208 pub fn set_or_clear_enabled<T>(mut self, v: std::option::Option<T>) -> Self
28210 where
28211 T: std::convert::Into<bool>,
28212 {
28213 self.enabled = v.map(|x| x.into());
28214 self
28215 }
28216
28217 pub fn set_rotation_interval<T>(mut self, v: T) -> Self
28219 where
28220 T: std::convert::Into<wkt::Duration>,
28221 {
28222 self.rotation_interval = std::option::Option::Some(v.into());
28223 self
28224 }
28225
28226 pub fn set_or_clear_rotation_interval<T>(mut self, v: std::option::Option<T>) -> Self
28228 where
28229 T: std::convert::Into<wkt::Duration>,
28230 {
28231 self.rotation_interval = v.map(|x| x.into());
28232 self
28233 }
28234 }
28235
28236 impl wkt::message::Message for RotationConfig {
28237 fn typename() -> &'static str {
28238 "type.googleapis.com/google.container.v1.SecretManagerConfig.RotationConfig"
28239 }
28240 }
28241}
28242
28243#[derive(Clone, Default, PartialEq)]
28245#[non_exhaustive]
28246pub struct BootDisk {
28247 pub disk_type: std::string::String,
28250
28251 pub size_gb: i64,
28253
28254 pub provisioned_iops: i64,
28256
28257 pub provisioned_throughput: i64,
28259
28260 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28261}
28262
28263impl BootDisk {
28264 pub fn new() -> Self {
28265 std::default::Default::default()
28266 }
28267
28268 pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28270 self.disk_type = v.into();
28271 self
28272 }
28273
28274 pub fn set_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
28276 self.size_gb = v.into();
28277 self
28278 }
28279
28280 pub fn set_provisioned_iops<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
28282 self.provisioned_iops = v.into();
28283 self
28284 }
28285
28286 pub fn set_provisioned_throughput<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
28288 self.provisioned_throughput = v.into();
28289 self
28290 }
28291}
28292
28293impl wkt::message::Message for BootDisk {
28294 fn typename() -> &'static str {
28295 "type.googleapis.com/google.container.v1.BootDisk"
28296 }
28297}
28298
28299#[derive(Clone, Default, PartialEq)]
28302#[non_exhaustive]
28303pub struct SecondaryBootDisk {
28304 pub mode: crate::model::secondary_boot_disk::Mode,
28306
28307 pub disk_image: std::string::String,
28309
28310 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28311}
28312
28313impl SecondaryBootDisk {
28314 pub fn new() -> Self {
28315 std::default::Default::default()
28316 }
28317
28318 pub fn set_mode<T: std::convert::Into<crate::model::secondary_boot_disk::Mode>>(
28320 mut self,
28321 v: T,
28322 ) -> Self {
28323 self.mode = v.into();
28324 self
28325 }
28326
28327 pub fn set_disk_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28329 self.disk_image = v.into();
28330 self
28331 }
28332}
28333
28334impl wkt::message::Message for SecondaryBootDisk {
28335 fn typename() -> &'static str {
28336 "type.googleapis.com/google.container.v1.SecondaryBootDisk"
28337 }
28338}
28339
28340pub mod secondary_boot_disk {
28342 #[allow(unused_imports)]
28343 use super::*;
28344
28345 #[derive(Clone, Debug, PartialEq)]
28362 #[non_exhaustive]
28363 pub enum Mode {
28364 Unspecified,
28366 ContainerImageCache,
28369 UnknownValue(mode::UnknownValue),
28374 }
28375
28376 #[doc(hidden)]
28377 pub mod mode {
28378 #[allow(unused_imports)]
28379 use super::*;
28380 #[derive(Clone, Debug, PartialEq)]
28381 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28382 }
28383
28384 impl Mode {
28385 pub fn value(&self) -> std::option::Option<i32> {
28390 match self {
28391 Self::Unspecified => std::option::Option::Some(0),
28392 Self::ContainerImageCache => std::option::Option::Some(1),
28393 Self::UnknownValue(u) => u.0.value(),
28394 }
28395 }
28396
28397 pub fn name(&self) -> std::option::Option<&str> {
28402 match self {
28403 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
28404 Self::ContainerImageCache => std::option::Option::Some("CONTAINER_IMAGE_CACHE"),
28405 Self::UnknownValue(u) => u.0.name(),
28406 }
28407 }
28408 }
28409
28410 impl std::default::Default for Mode {
28411 fn default() -> Self {
28412 use std::convert::From;
28413 Self::from(0)
28414 }
28415 }
28416
28417 impl std::fmt::Display for Mode {
28418 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28419 wkt::internal::display_enum(f, self.name(), self.value())
28420 }
28421 }
28422
28423 impl std::convert::From<i32> for Mode {
28424 fn from(value: i32) -> Self {
28425 match value {
28426 0 => Self::Unspecified,
28427 1 => Self::ContainerImageCache,
28428 _ => Self::UnknownValue(mode::UnknownValue(
28429 wkt::internal::UnknownEnumValue::Integer(value),
28430 )),
28431 }
28432 }
28433 }
28434
28435 impl std::convert::From<&str> for Mode {
28436 fn from(value: &str) -> Self {
28437 use std::string::ToString;
28438 match value {
28439 "MODE_UNSPECIFIED" => Self::Unspecified,
28440 "CONTAINER_IMAGE_CACHE" => Self::ContainerImageCache,
28441 _ => Self::UnknownValue(mode::UnknownValue(
28442 wkt::internal::UnknownEnumValue::String(value.to_string()),
28443 )),
28444 }
28445 }
28446 }
28447
28448 impl serde::ser::Serialize for Mode {
28449 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28450 where
28451 S: serde::Serializer,
28452 {
28453 match self {
28454 Self::Unspecified => serializer.serialize_i32(0),
28455 Self::ContainerImageCache => serializer.serialize_i32(1),
28456 Self::UnknownValue(u) => u.0.serialize(serializer),
28457 }
28458 }
28459 }
28460
28461 impl<'de> serde::de::Deserialize<'de> for Mode {
28462 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28463 where
28464 D: serde::Deserializer<'de>,
28465 {
28466 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
28467 ".google.container.v1.SecondaryBootDisk.Mode",
28468 ))
28469 }
28470 }
28471}
28472
28473#[derive(Clone, Default, PartialEq)]
28476#[non_exhaustive]
28477pub struct SecondaryBootDiskUpdateStrategy {
28478 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28479}
28480
28481impl SecondaryBootDiskUpdateStrategy {
28482 pub fn new() -> Self {
28483 std::default::Default::default()
28484 }
28485}
28486
28487impl wkt::message::Message for SecondaryBootDiskUpdateStrategy {
28488 fn typename() -> &'static str {
28489 "type.googleapis.com/google.container.v1.SecondaryBootDiskUpdateStrategy"
28490 }
28491}
28492
28493#[derive(Clone, Default, PartialEq)]
28495#[non_exhaustive]
28496pub struct FetchClusterUpgradeInfoRequest {
28497 pub name: std::string::String,
28501
28502 pub version: std::string::String,
28504
28505 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28506}
28507
28508impl FetchClusterUpgradeInfoRequest {
28509 pub fn new() -> Self {
28510 std::default::Default::default()
28511 }
28512
28513 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28515 self.name = v.into();
28516 self
28517 }
28518
28519 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28521 self.version = v.into();
28522 self
28523 }
28524}
28525
28526impl wkt::message::Message for FetchClusterUpgradeInfoRequest {
28527 fn typename() -> &'static str {
28528 "type.googleapis.com/google.container.v1.FetchClusterUpgradeInfoRequest"
28529 }
28530}
28531
28532#[derive(Clone, Default, PartialEq)]
28534#[non_exhaustive]
28535pub struct ClusterUpgradeInfo {
28536 pub minor_target_version: std::option::Option<std::string::String>,
28538
28539 pub patch_target_version: std::option::Option<std::string::String>,
28541
28542 pub auto_upgrade_status: std::vec::Vec<crate::model::cluster_upgrade_info::AutoUpgradeStatus>,
28544
28545 pub paused_reason: std::vec::Vec<crate::model::cluster_upgrade_info::AutoUpgradePausedReason>,
28547
28548 pub upgrade_details: std::vec::Vec<crate::model::UpgradeDetails>,
28550
28551 pub end_of_standard_support_timestamp: std::option::Option<std::string::String>,
28553
28554 pub end_of_extended_support_timestamp: std::option::Option<std::string::String>,
28556
28557 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28558}
28559
28560impl ClusterUpgradeInfo {
28561 pub fn new() -> Self {
28562 std::default::Default::default()
28563 }
28564
28565 pub fn set_minor_target_version<T>(mut self, v: T) -> Self
28567 where
28568 T: std::convert::Into<std::string::String>,
28569 {
28570 self.minor_target_version = std::option::Option::Some(v.into());
28571 self
28572 }
28573
28574 pub fn set_or_clear_minor_target_version<T>(mut self, v: std::option::Option<T>) -> Self
28576 where
28577 T: std::convert::Into<std::string::String>,
28578 {
28579 self.minor_target_version = v.map(|x| x.into());
28580 self
28581 }
28582
28583 pub fn set_patch_target_version<T>(mut self, v: T) -> Self
28585 where
28586 T: std::convert::Into<std::string::String>,
28587 {
28588 self.patch_target_version = std::option::Option::Some(v.into());
28589 self
28590 }
28591
28592 pub fn set_or_clear_patch_target_version<T>(mut self, v: std::option::Option<T>) -> Self
28594 where
28595 T: std::convert::Into<std::string::String>,
28596 {
28597 self.patch_target_version = v.map(|x| x.into());
28598 self
28599 }
28600
28601 pub fn set_auto_upgrade_status<T, V>(mut self, v: T) -> Self
28603 where
28604 T: std::iter::IntoIterator<Item = V>,
28605 V: std::convert::Into<crate::model::cluster_upgrade_info::AutoUpgradeStatus>,
28606 {
28607 use std::iter::Iterator;
28608 self.auto_upgrade_status = v.into_iter().map(|i| i.into()).collect();
28609 self
28610 }
28611
28612 pub fn set_paused_reason<T, V>(mut self, v: T) -> Self
28614 where
28615 T: std::iter::IntoIterator<Item = V>,
28616 V: std::convert::Into<crate::model::cluster_upgrade_info::AutoUpgradePausedReason>,
28617 {
28618 use std::iter::Iterator;
28619 self.paused_reason = v.into_iter().map(|i| i.into()).collect();
28620 self
28621 }
28622
28623 pub fn set_upgrade_details<T, V>(mut self, v: T) -> Self
28625 where
28626 T: std::iter::IntoIterator<Item = V>,
28627 V: std::convert::Into<crate::model::UpgradeDetails>,
28628 {
28629 use std::iter::Iterator;
28630 self.upgrade_details = v.into_iter().map(|i| i.into()).collect();
28631 self
28632 }
28633
28634 pub fn set_end_of_standard_support_timestamp<T>(mut self, v: T) -> Self
28636 where
28637 T: std::convert::Into<std::string::String>,
28638 {
28639 self.end_of_standard_support_timestamp = std::option::Option::Some(v.into());
28640 self
28641 }
28642
28643 pub fn set_or_clear_end_of_standard_support_timestamp<T>(
28645 mut self,
28646 v: std::option::Option<T>,
28647 ) -> Self
28648 where
28649 T: std::convert::Into<std::string::String>,
28650 {
28651 self.end_of_standard_support_timestamp = v.map(|x| x.into());
28652 self
28653 }
28654
28655 pub fn set_end_of_extended_support_timestamp<T>(mut self, v: T) -> Self
28657 where
28658 T: std::convert::Into<std::string::String>,
28659 {
28660 self.end_of_extended_support_timestamp = std::option::Option::Some(v.into());
28661 self
28662 }
28663
28664 pub fn set_or_clear_end_of_extended_support_timestamp<T>(
28666 mut self,
28667 v: std::option::Option<T>,
28668 ) -> Self
28669 where
28670 T: std::convert::Into<std::string::String>,
28671 {
28672 self.end_of_extended_support_timestamp = v.map(|x| x.into());
28673 self
28674 }
28675}
28676
28677impl wkt::message::Message for ClusterUpgradeInfo {
28678 fn typename() -> &'static str {
28679 "type.googleapis.com/google.container.v1.ClusterUpgradeInfo"
28680 }
28681}
28682
28683pub mod cluster_upgrade_info {
28685 #[allow(unused_imports)]
28686 use super::*;
28687
28688 #[derive(Clone, Debug, PartialEq)]
28704 #[non_exhaustive]
28705 pub enum AutoUpgradeStatus {
28706 Unknown,
28708 Active,
28710 MinorUpgradePaused,
28713 UpgradePaused,
28715 UnknownValue(auto_upgrade_status::UnknownValue),
28720 }
28721
28722 #[doc(hidden)]
28723 pub mod auto_upgrade_status {
28724 #[allow(unused_imports)]
28725 use super::*;
28726 #[derive(Clone, Debug, PartialEq)]
28727 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28728 }
28729
28730 impl AutoUpgradeStatus {
28731 pub fn value(&self) -> std::option::Option<i32> {
28736 match self {
28737 Self::Unknown => std::option::Option::Some(0),
28738 Self::Active => std::option::Option::Some(1),
28739 Self::MinorUpgradePaused => std::option::Option::Some(4),
28740 Self::UpgradePaused => std::option::Option::Some(5),
28741 Self::UnknownValue(u) => u.0.value(),
28742 }
28743 }
28744
28745 pub fn name(&self) -> std::option::Option<&str> {
28750 match self {
28751 Self::Unknown => std::option::Option::Some("UNKNOWN"),
28752 Self::Active => std::option::Option::Some("ACTIVE"),
28753 Self::MinorUpgradePaused => std::option::Option::Some("MINOR_UPGRADE_PAUSED"),
28754 Self::UpgradePaused => std::option::Option::Some("UPGRADE_PAUSED"),
28755 Self::UnknownValue(u) => u.0.name(),
28756 }
28757 }
28758 }
28759
28760 impl std::default::Default for AutoUpgradeStatus {
28761 fn default() -> Self {
28762 use std::convert::From;
28763 Self::from(0)
28764 }
28765 }
28766
28767 impl std::fmt::Display for AutoUpgradeStatus {
28768 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28769 wkt::internal::display_enum(f, self.name(), self.value())
28770 }
28771 }
28772
28773 impl std::convert::From<i32> for AutoUpgradeStatus {
28774 fn from(value: i32) -> Self {
28775 match value {
28776 0 => Self::Unknown,
28777 1 => Self::Active,
28778 4 => Self::MinorUpgradePaused,
28779 5 => Self::UpgradePaused,
28780 _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
28781 wkt::internal::UnknownEnumValue::Integer(value),
28782 )),
28783 }
28784 }
28785 }
28786
28787 impl std::convert::From<&str> for AutoUpgradeStatus {
28788 fn from(value: &str) -> Self {
28789 use std::string::ToString;
28790 match value {
28791 "UNKNOWN" => Self::Unknown,
28792 "ACTIVE" => Self::Active,
28793 "MINOR_UPGRADE_PAUSED" => Self::MinorUpgradePaused,
28794 "UPGRADE_PAUSED" => Self::UpgradePaused,
28795 _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
28796 wkt::internal::UnknownEnumValue::String(value.to_string()),
28797 )),
28798 }
28799 }
28800 }
28801
28802 impl serde::ser::Serialize for AutoUpgradeStatus {
28803 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28804 where
28805 S: serde::Serializer,
28806 {
28807 match self {
28808 Self::Unknown => serializer.serialize_i32(0),
28809 Self::Active => serializer.serialize_i32(1),
28810 Self::MinorUpgradePaused => serializer.serialize_i32(4),
28811 Self::UpgradePaused => serializer.serialize_i32(5),
28812 Self::UnknownValue(u) => u.0.serialize(serializer),
28813 }
28814 }
28815 }
28816
28817 impl<'de> serde::de::Deserialize<'de> for AutoUpgradeStatus {
28818 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28819 where
28820 D: serde::Deserializer<'de>,
28821 {
28822 deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoUpgradeStatus>::new(
28823 ".google.container.v1.ClusterUpgradeInfo.AutoUpgradeStatus",
28824 ))
28825 }
28826 }
28827
28828 #[derive(Clone, Debug, PartialEq)]
28845 #[non_exhaustive]
28846 pub enum AutoUpgradePausedReason {
28847 Unspecified,
28849 MaintenanceWindow,
28852 MaintenanceExclusionNoUpgrades,
28855 MaintenanceExclusionNoMinorUpgrades,
28858 ClusterDisruptionBudget,
28861 ClusterDisruptionBudgetMinorUpgrade,
28864 SystemConfig,
28866 UnknownValue(auto_upgrade_paused_reason::UnknownValue),
28871 }
28872
28873 #[doc(hidden)]
28874 pub mod auto_upgrade_paused_reason {
28875 #[allow(unused_imports)]
28876 use super::*;
28877 #[derive(Clone, Debug, PartialEq)]
28878 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28879 }
28880
28881 impl AutoUpgradePausedReason {
28882 pub fn value(&self) -> std::option::Option<i32> {
28887 match self {
28888 Self::Unspecified => std::option::Option::Some(0),
28889 Self::MaintenanceWindow => std::option::Option::Some(1),
28890 Self::MaintenanceExclusionNoUpgrades => std::option::Option::Some(5),
28891 Self::MaintenanceExclusionNoMinorUpgrades => std::option::Option::Some(6),
28892 Self::ClusterDisruptionBudget => std::option::Option::Some(4),
28893 Self::ClusterDisruptionBudgetMinorUpgrade => std::option::Option::Some(7),
28894 Self::SystemConfig => std::option::Option::Some(8),
28895 Self::UnknownValue(u) => u.0.value(),
28896 }
28897 }
28898
28899 pub fn name(&self) -> std::option::Option<&str> {
28904 match self {
28905 Self::Unspecified => {
28906 std::option::Option::Some("AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED")
28907 }
28908 Self::MaintenanceWindow => std::option::Option::Some("MAINTENANCE_WINDOW"),
28909 Self::MaintenanceExclusionNoUpgrades => {
28910 std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_UPGRADES")
28911 }
28912 Self::MaintenanceExclusionNoMinorUpgrades => {
28913 std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES")
28914 }
28915 Self::ClusterDisruptionBudget => {
28916 std::option::Option::Some("CLUSTER_DISRUPTION_BUDGET")
28917 }
28918 Self::ClusterDisruptionBudgetMinorUpgrade => {
28919 std::option::Option::Some("CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE")
28920 }
28921 Self::SystemConfig => std::option::Option::Some("SYSTEM_CONFIG"),
28922 Self::UnknownValue(u) => u.0.name(),
28923 }
28924 }
28925 }
28926
28927 impl std::default::Default for AutoUpgradePausedReason {
28928 fn default() -> Self {
28929 use std::convert::From;
28930 Self::from(0)
28931 }
28932 }
28933
28934 impl std::fmt::Display for AutoUpgradePausedReason {
28935 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28936 wkt::internal::display_enum(f, self.name(), self.value())
28937 }
28938 }
28939
28940 impl std::convert::From<i32> for AutoUpgradePausedReason {
28941 fn from(value: i32) -> Self {
28942 match value {
28943 0 => Self::Unspecified,
28944 1 => Self::MaintenanceWindow,
28945 4 => Self::ClusterDisruptionBudget,
28946 5 => Self::MaintenanceExclusionNoUpgrades,
28947 6 => Self::MaintenanceExclusionNoMinorUpgrades,
28948 7 => Self::ClusterDisruptionBudgetMinorUpgrade,
28949 8 => Self::SystemConfig,
28950 _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
28951 wkt::internal::UnknownEnumValue::Integer(value),
28952 )),
28953 }
28954 }
28955 }
28956
28957 impl std::convert::From<&str> for AutoUpgradePausedReason {
28958 fn from(value: &str) -> Self {
28959 use std::string::ToString;
28960 match value {
28961 "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED" => Self::Unspecified,
28962 "MAINTENANCE_WINDOW" => Self::MaintenanceWindow,
28963 "MAINTENANCE_EXCLUSION_NO_UPGRADES" => Self::MaintenanceExclusionNoUpgrades,
28964 "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES" => {
28965 Self::MaintenanceExclusionNoMinorUpgrades
28966 }
28967 "CLUSTER_DISRUPTION_BUDGET" => Self::ClusterDisruptionBudget,
28968 "CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE" => {
28969 Self::ClusterDisruptionBudgetMinorUpgrade
28970 }
28971 "SYSTEM_CONFIG" => Self::SystemConfig,
28972 _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
28973 wkt::internal::UnknownEnumValue::String(value.to_string()),
28974 )),
28975 }
28976 }
28977 }
28978
28979 impl serde::ser::Serialize for AutoUpgradePausedReason {
28980 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28981 where
28982 S: serde::Serializer,
28983 {
28984 match self {
28985 Self::Unspecified => serializer.serialize_i32(0),
28986 Self::MaintenanceWindow => serializer.serialize_i32(1),
28987 Self::MaintenanceExclusionNoUpgrades => serializer.serialize_i32(5),
28988 Self::MaintenanceExclusionNoMinorUpgrades => serializer.serialize_i32(6),
28989 Self::ClusterDisruptionBudget => serializer.serialize_i32(4),
28990 Self::ClusterDisruptionBudgetMinorUpgrade => serializer.serialize_i32(7),
28991 Self::SystemConfig => serializer.serialize_i32(8),
28992 Self::UnknownValue(u) => u.0.serialize(serializer),
28993 }
28994 }
28995 }
28996
28997 impl<'de> serde::de::Deserialize<'de> for AutoUpgradePausedReason {
28998 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28999 where
29000 D: serde::Deserializer<'de>,
29001 {
29002 deserializer.deserialize_any(
29003 wkt::internal::EnumVisitor::<AutoUpgradePausedReason>::new(
29004 ".google.container.v1.ClusterUpgradeInfo.AutoUpgradePausedReason",
29005 ),
29006 )
29007 }
29008 }
29009}
29010
29011#[derive(Clone, Default, PartialEq)]
29014#[non_exhaustive]
29015pub struct UpgradeDetails {
29016 pub state: crate::model::upgrade_details::State,
29018
29019 pub start_time: std::option::Option<wkt::Timestamp>,
29021
29022 pub end_time: std::option::Option<wkt::Timestamp>,
29024
29025 pub initial_version: std::string::String,
29027
29028 pub target_version: std::string::String,
29030
29031 pub start_type: crate::model::upgrade_details::StartType,
29033
29034 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29035}
29036
29037impl UpgradeDetails {
29038 pub fn new() -> Self {
29039 std::default::Default::default()
29040 }
29041
29042 pub fn set_state<T: std::convert::Into<crate::model::upgrade_details::State>>(
29044 mut self,
29045 v: T,
29046 ) -> Self {
29047 self.state = v.into();
29048 self
29049 }
29050
29051 pub fn set_start_time<T>(mut self, v: T) -> Self
29053 where
29054 T: std::convert::Into<wkt::Timestamp>,
29055 {
29056 self.start_time = std::option::Option::Some(v.into());
29057 self
29058 }
29059
29060 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
29062 where
29063 T: std::convert::Into<wkt::Timestamp>,
29064 {
29065 self.start_time = v.map(|x| x.into());
29066 self
29067 }
29068
29069 pub fn set_end_time<T>(mut self, v: T) -> Self
29071 where
29072 T: std::convert::Into<wkt::Timestamp>,
29073 {
29074 self.end_time = std::option::Option::Some(v.into());
29075 self
29076 }
29077
29078 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
29080 where
29081 T: std::convert::Into<wkt::Timestamp>,
29082 {
29083 self.end_time = v.map(|x| x.into());
29084 self
29085 }
29086
29087 pub fn set_initial_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29089 self.initial_version = v.into();
29090 self
29091 }
29092
29093 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29095 self.target_version = v.into();
29096 self
29097 }
29098
29099 pub fn set_start_type<T: std::convert::Into<crate::model::upgrade_details::StartType>>(
29101 mut self,
29102 v: T,
29103 ) -> Self {
29104 self.start_type = v.into();
29105 self
29106 }
29107}
29108
29109impl wkt::message::Message for UpgradeDetails {
29110 fn typename() -> &'static str {
29111 "type.googleapis.com/google.container.v1.UpgradeDetails"
29112 }
29113}
29114
29115pub mod upgrade_details {
29117 #[allow(unused_imports)]
29118 use super::*;
29119
29120 #[derive(Clone, Debug, PartialEq)]
29136 #[non_exhaustive]
29137 pub enum State {
29138 Unknown,
29140 Failed,
29142 Succeeded,
29144 Canceled,
29146 Running,
29148 UnknownValue(state::UnknownValue),
29153 }
29154
29155 #[doc(hidden)]
29156 pub mod state {
29157 #[allow(unused_imports)]
29158 use super::*;
29159 #[derive(Clone, Debug, PartialEq)]
29160 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29161 }
29162
29163 impl State {
29164 pub fn value(&self) -> std::option::Option<i32> {
29169 match self {
29170 Self::Unknown => std::option::Option::Some(0),
29171 Self::Failed => std::option::Option::Some(1),
29172 Self::Succeeded => std::option::Option::Some(2),
29173 Self::Canceled => std::option::Option::Some(3),
29174 Self::Running => std::option::Option::Some(4),
29175 Self::UnknownValue(u) => u.0.value(),
29176 }
29177 }
29178
29179 pub fn name(&self) -> std::option::Option<&str> {
29184 match self {
29185 Self::Unknown => std::option::Option::Some("UNKNOWN"),
29186 Self::Failed => std::option::Option::Some("FAILED"),
29187 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
29188 Self::Canceled => std::option::Option::Some("CANCELED"),
29189 Self::Running => std::option::Option::Some("RUNNING"),
29190 Self::UnknownValue(u) => u.0.name(),
29191 }
29192 }
29193 }
29194
29195 impl std::default::Default for State {
29196 fn default() -> Self {
29197 use std::convert::From;
29198 Self::from(0)
29199 }
29200 }
29201
29202 impl std::fmt::Display for State {
29203 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29204 wkt::internal::display_enum(f, self.name(), self.value())
29205 }
29206 }
29207
29208 impl std::convert::From<i32> for State {
29209 fn from(value: i32) -> Self {
29210 match value {
29211 0 => Self::Unknown,
29212 1 => Self::Failed,
29213 2 => Self::Succeeded,
29214 3 => Self::Canceled,
29215 4 => Self::Running,
29216 _ => Self::UnknownValue(state::UnknownValue(
29217 wkt::internal::UnknownEnumValue::Integer(value),
29218 )),
29219 }
29220 }
29221 }
29222
29223 impl std::convert::From<&str> for State {
29224 fn from(value: &str) -> Self {
29225 use std::string::ToString;
29226 match value {
29227 "UNKNOWN" => Self::Unknown,
29228 "FAILED" => Self::Failed,
29229 "SUCCEEDED" => Self::Succeeded,
29230 "CANCELED" => Self::Canceled,
29231 "RUNNING" => Self::Running,
29232 _ => Self::UnknownValue(state::UnknownValue(
29233 wkt::internal::UnknownEnumValue::String(value.to_string()),
29234 )),
29235 }
29236 }
29237 }
29238
29239 impl serde::ser::Serialize for State {
29240 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29241 where
29242 S: serde::Serializer,
29243 {
29244 match self {
29245 Self::Unknown => serializer.serialize_i32(0),
29246 Self::Failed => serializer.serialize_i32(1),
29247 Self::Succeeded => serializer.serialize_i32(2),
29248 Self::Canceled => serializer.serialize_i32(3),
29249 Self::Running => serializer.serialize_i32(4),
29250 Self::UnknownValue(u) => u.0.serialize(serializer),
29251 }
29252 }
29253 }
29254
29255 impl<'de> serde::de::Deserialize<'de> for State {
29256 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29257 where
29258 D: serde::Deserializer<'de>,
29259 {
29260 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
29261 ".google.container.v1.UpgradeDetails.State",
29262 ))
29263 }
29264 }
29265
29266 #[derive(Clone, Debug, PartialEq)]
29282 #[non_exhaustive]
29283 pub enum StartType {
29284 Unspecified,
29286 Automatic,
29288 Manual,
29290 UnknownValue(start_type::UnknownValue),
29295 }
29296
29297 #[doc(hidden)]
29298 pub mod start_type {
29299 #[allow(unused_imports)]
29300 use super::*;
29301 #[derive(Clone, Debug, PartialEq)]
29302 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29303 }
29304
29305 impl StartType {
29306 pub fn value(&self) -> std::option::Option<i32> {
29311 match self {
29312 Self::Unspecified => std::option::Option::Some(0),
29313 Self::Automatic => std::option::Option::Some(1),
29314 Self::Manual => std::option::Option::Some(2),
29315 Self::UnknownValue(u) => u.0.value(),
29316 }
29317 }
29318
29319 pub fn name(&self) -> std::option::Option<&str> {
29324 match self {
29325 Self::Unspecified => std::option::Option::Some("START_TYPE_UNSPECIFIED"),
29326 Self::Automatic => std::option::Option::Some("AUTOMATIC"),
29327 Self::Manual => std::option::Option::Some("MANUAL"),
29328 Self::UnknownValue(u) => u.0.name(),
29329 }
29330 }
29331 }
29332
29333 impl std::default::Default for StartType {
29334 fn default() -> Self {
29335 use std::convert::From;
29336 Self::from(0)
29337 }
29338 }
29339
29340 impl std::fmt::Display for StartType {
29341 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29342 wkt::internal::display_enum(f, self.name(), self.value())
29343 }
29344 }
29345
29346 impl std::convert::From<i32> for StartType {
29347 fn from(value: i32) -> Self {
29348 match value {
29349 0 => Self::Unspecified,
29350 1 => Self::Automatic,
29351 2 => Self::Manual,
29352 _ => Self::UnknownValue(start_type::UnknownValue(
29353 wkt::internal::UnknownEnumValue::Integer(value),
29354 )),
29355 }
29356 }
29357 }
29358
29359 impl std::convert::From<&str> for StartType {
29360 fn from(value: &str) -> Self {
29361 use std::string::ToString;
29362 match value {
29363 "START_TYPE_UNSPECIFIED" => Self::Unspecified,
29364 "AUTOMATIC" => Self::Automatic,
29365 "MANUAL" => Self::Manual,
29366 _ => Self::UnknownValue(start_type::UnknownValue(
29367 wkt::internal::UnknownEnumValue::String(value.to_string()),
29368 )),
29369 }
29370 }
29371 }
29372
29373 impl serde::ser::Serialize for StartType {
29374 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29375 where
29376 S: serde::Serializer,
29377 {
29378 match self {
29379 Self::Unspecified => serializer.serialize_i32(0),
29380 Self::Automatic => serializer.serialize_i32(1),
29381 Self::Manual => serializer.serialize_i32(2),
29382 Self::UnknownValue(u) => u.0.serialize(serializer),
29383 }
29384 }
29385 }
29386
29387 impl<'de> serde::de::Deserialize<'de> for StartType {
29388 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29389 where
29390 D: serde::Deserializer<'de>,
29391 {
29392 deserializer.deserialize_any(wkt::internal::EnumVisitor::<StartType>::new(
29393 ".google.container.v1.UpgradeDetails.StartType",
29394 ))
29395 }
29396 }
29397}
29398
29399#[derive(Clone, Default, PartialEq)]
29402#[non_exhaustive]
29403pub struct FetchNodePoolUpgradeInfoRequest {
29404 pub name: std::string::String,
29409
29410 pub version: std::string::String,
29412
29413 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29414}
29415
29416impl FetchNodePoolUpgradeInfoRequest {
29417 pub fn new() -> Self {
29418 std::default::Default::default()
29419 }
29420
29421 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29423 self.name = v.into();
29424 self
29425 }
29426
29427 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29429 self.version = v.into();
29430 self
29431 }
29432}
29433
29434impl wkt::message::Message for FetchNodePoolUpgradeInfoRequest {
29435 fn typename() -> &'static str {
29436 "type.googleapis.com/google.container.v1.FetchNodePoolUpgradeInfoRequest"
29437 }
29438}
29439
29440#[derive(Clone, Default, PartialEq)]
29442#[non_exhaustive]
29443pub struct NodePoolUpgradeInfo {
29444 pub minor_target_version: std::option::Option<std::string::String>,
29446
29447 pub patch_target_version: std::option::Option<std::string::String>,
29449
29450 pub auto_upgrade_status: std::vec::Vec<crate::model::node_pool_upgrade_info::AutoUpgradeStatus>,
29452
29453 pub paused_reason: std::vec::Vec<crate::model::node_pool_upgrade_info::AutoUpgradePausedReason>,
29455
29456 pub upgrade_details: std::vec::Vec<crate::model::UpgradeDetails>,
29458
29459 pub end_of_standard_support_timestamp: std::option::Option<std::string::String>,
29461
29462 pub end_of_extended_support_timestamp: std::option::Option<std::string::String>,
29464
29465 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29466}
29467
29468impl NodePoolUpgradeInfo {
29469 pub fn new() -> Self {
29470 std::default::Default::default()
29471 }
29472
29473 pub fn set_minor_target_version<T>(mut self, v: T) -> Self
29475 where
29476 T: std::convert::Into<std::string::String>,
29477 {
29478 self.minor_target_version = std::option::Option::Some(v.into());
29479 self
29480 }
29481
29482 pub fn set_or_clear_minor_target_version<T>(mut self, v: std::option::Option<T>) -> Self
29484 where
29485 T: std::convert::Into<std::string::String>,
29486 {
29487 self.minor_target_version = v.map(|x| x.into());
29488 self
29489 }
29490
29491 pub fn set_patch_target_version<T>(mut self, v: T) -> Self
29493 where
29494 T: std::convert::Into<std::string::String>,
29495 {
29496 self.patch_target_version = std::option::Option::Some(v.into());
29497 self
29498 }
29499
29500 pub fn set_or_clear_patch_target_version<T>(mut self, v: std::option::Option<T>) -> Self
29502 where
29503 T: std::convert::Into<std::string::String>,
29504 {
29505 self.patch_target_version = v.map(|x| x.into());
29506 self
29507 }
29508
29509 pub fn set_auto_upgrade_status<T, V>(mut self, v: T) -> Self
29511 where
29512 T: std::iter::IntoIterator<Item = V>,
29513 V: std::convert::Into<crate::model::node_pool_upgrade_info::AutoUpgradeStatus>,
29514 {
29515 use std::iter::Iterator;
29516 self.auto_upgrade_status = v.into_iter().map(|i| i.into()).collect();
29517 self
29518 }
29519
29520 pub fn set_paused_reason<T, V>(mut self, v: T) -> Self
29522 where
29523 T: std::iter::IntoIterator<Item = V>,
29524 V: std::convert::Into<crate::model::node_pool_upgrade_info::AutoUpgradePausedReason>,
29525 {
29526 use std::iter::Iterator;
29527 self.paused_reason = v.into_iter().map(|i| i.into()).collect();
29528 self
29529 }
29530
29531 pub fn set_upgrade_details<T, V>(mut self, v: T) -> Self
29533 where
29534 T: std::iter::IntoIterator<Item = V>,
29535 V: std::convert::Into<crate::model::UpgradeDetails>,
29536 {
29537 use std::iter::Iterator;
29538 self.upgrade_details = v.into_iter().map(|i| i.into()).collect();
29539 self
29540 }
29541
29542 pub fn set_end_of_standard_support_timestamp<T>(mut self, v: T) -> Self
29544 where
29545 T: std::convert::Into<std::string::String>,
29546 {
29547 self.end_of_standard_support_timestamp = std::option::Option::Some(v.into());
29548 self
29549 }
29550
29551 pub fn set_or_clear_end_of_standard_support_timestamp<T>(
29553 mut self,
29554 v: std::option::Option<T>,
29555 ) -> Self
29556 where
29557 T: std::convert::Into<std::string::String>,
29558 {
29559 self.end_of_standard_support_timestamp = v.map(|x| x.into());
29560 self
29561 }
29562
29563 pub fn set_end_of_extended_support_timestamp<T>(mut self, v: T) -> Self
29565 where
29566 T: std::convert::Into<std::string::String>,
29567 {
29568 self.end_of_extended_support_timestamp = std::option::Option::Some(v.into());
29569 self
29570 }
29571
29572 pub fn set_or_clear_end_of_extended_support_timestamp<T>(
29574 mut self,
29575 v: std::option::Option<T>,
29576 ) -> Self
29577 where
29578 T: std::convert::Into<std::string::String>,
29579 {
29580 self.end_of_extended_support_timestamp = v.map(|x| x.into());
29581 self
29582 }
29583}
29584
29585impl wkt::message::Message for NodePoolUpgradeInfo {
29586 fn typename() -> &'static str {
29587 "type.googleapis.com/google.container.v1.NodePoolUpgradeInfo"
29588 }
29589}
29590
29591pub mod node_pool_upgrade_info {
29593 #[allow(unused_imports)]
29594 use super::*;
29595
29596 #[derive(Clone, Debug, PartialEq)]
29612 #[non_exhaustive]
29613 pub enum AutoUpgradeStatus {
29614 Unknown,
29616 Active,
29618 MinorUpgradePaused,
29621 UpgradePaused,
29623 UnknownValue(auto_upgrade_status::UnknownValue),
29628 }
29629
29630 #[doc(hidden)]
29631 pub mod auto_upgrade_status {
29632 #[allow(unused_imports)]
29633 use super::*;
29634 #[derive(Clone, Debug, PartialEq)]
29635 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29636 }
29637
29638 impl AutoUpgradeStatus {
29639 pub fn value(&self) -> std::option::Option<i32> {
29644 match self {
29645 Self::Unknown => std::option::Option::Some(0),
29646 Self::Active => std::option::Option::Some(1),
29647 Self::MinorUpgradePaused => std::option::Option::Some(2),
29648 Self::UpgradePaused => std::option::Option::Some(3),
29649 Self::UnknownValue(u) => u.0.value(),
29650 }
29651 }
29652
29653 pub fn name(&self) -> std::option::Option<&str> {
29658 match self {
29659 Self::Unknown => std::option::Option::Some("UNKNOWN"),
29660 Self::Active => std::option::Option::Some("ACTIVE"),
29661 Self::MinorUpgradePaused => std::option::Option::Some("MINOR_UPGRADE_PAUSED"),
29662 Self::UpgradePaused => std::option::Option::Some("UPGRADE_PAUSED"),
29663 Self::UnknownValue(u) => u.0.name(),
29664 }
29665 }
29666 }
29667
29668 impl std::default::Default for AutoUpgradeStatus {
29669 fn default() -> Self {
29670 use std::convert::From;
29671 Self::from(0)
29672 }
29673 }
29674
29675 impl std::fmt::Display for AutoUpgradeStatus {
29676 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29677 wkt::internal::display_enum(f, self.name(), self.value())
29678 }
29679 }
29680
29681 impl std::convert::From<i32> for AutoUpgradeStatus {
29682 fn from(value: i32) -> Self {
29683 match value {
29684 0 => Self::Unknown,
29685 1 => Self::Active,
29686 2 => Self::MinorUpgradePaused,
29687 3 => Self::UpgradePaused,
29688 _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
29689 wkt::internal::UnknownEnumValue::Integer(value),
29690 )),
29691 }
29692 }
29693 }
29694
29695 impl std::convert::From<&str> for AutoUpgradeStatus {
29696 fn from(value: &str) -> Self {
29697 use std::string::ToString;
29698 match value {
29699 "UNKNOWN" => Self::Unknown,
29700 "ACTIVE" => Self::Active,
29701 "MINOR_UPGRADE_PAUSED" => Self::MinorUpgradePaused,
29702 "UPGRADE_PAUSED" => Self::UpgradePaused,
29703 _ => Self::UnknownValue(auto_upgrade_status::UnknownValue(
29704 wkt::internal::UnknownEnumValue::String(value.to_string()),
29705 )),
29706 }
29707 }
29708 }
29709
29710 impl serde::ser::Serialize for AutoUpgradeStatus {
29711 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29712 where
29713 S: serde::Serializer,
29714 {
29715 match self {
29716 Self::Unknown => serializer.serialize_i32(0),
29717 Self::Active => serializer.serialize_i32(1),
29718 Self::MinorUpgradePaused => serializer.serialize_i32(2),
29719 Self::UpgradePaused => serializer.serialize_i32(3),
29720 Self::UnknownValue(u) => u.0.serialize(serializer),
29721 }
29722 }
29723 }
29724
29725 impl<'de> serde::de::Deserialize<'de> for AutoUpgradeStatus {
29726 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29727 where
29728 D: serde::Deserializer<'de>,
29729 {
29730 deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoUpgradeStatus>::new(
29731 ".google.container.v1.NodePoolUpgradeInfo.AutoUpgradeStatus",
29732 ))
29733 }
29734 }
29735
29736 #[derive(Clone, Debug, PartialEq)]
29753 #[non_exhaustive]
29754 pub enum AutoUpgradePausedReason {
29755 Unspecified,
29757 MaintenanceWindow,
29760 MaintenanceExclusionNoUpgrades,
29763 MaintenanceExclusionNoMinorUpgrades,
29766 SystemConfig,
29768 UnknownValue(auto_upgrade_paused_reason::UnknownValue),
29773 }
29774
29775 #[doc(hidden)]
29776 pub mod auto_upgrade_paused_reason {
29777 #[allow(unused_imports)]
29778 use super::*;
29779 #[derive(Clone, Debug, PartialEq)]
29780 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29781 }
29782
29783 impl AutoUpgradePausedReason {
29784 pub fn value(&self) -> std::option::Option<i32> {
29789 match self {
29790 Self::Unspecified => std::option::Option::Some(0),
29791 Self::MaintenanceWindow => std::option::Option::Some(1),
29792 Self::MaintenanceExclusionNoUpgrades => std::option::Option::Some(2),
29793 Self::MaintenanceExclusionNoMinorUpgrades => std::option::Option::Some(3),
29794 Self::SystemConfig => std::option::Option::Some(4),
29795 Self::UnknownValue(u) => u.0.value(),
29796 }
29797 }
29798
29799 pub fn name(&self) -> std::option::Option<&str> {
29804 match self {
29805 Self::Unspecified => {
29806 std::option::Option::Some("AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED")
29807 }
29808 Self::MaintenanceWindow => std::option::Option::Some("MAINTENANCE_WINDOW"),
29809 Self::MaintenanceExclusionNoUpgrades => {
29810 std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_UPGRADES")
29811 }
29812 Self::MaintenanceExclusionNoMinorUpgrades => {
29813 std::option::Option::Some("MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES")
29814 }
29815 Self::SystemConfig => std::option::Option::Some("SYSTEM_CONFIG"),
29816 Self::UnknownValue(u) => u.0.name(),
29817 }
29818 }
29819 }
29820
29821 impl std::default::Default for AutoUpgradePausedReason {
29822 fn default() -> Self {
29823 use std::convert::From;
29824 Self::from(0)
29825 }
29826 }
29827
29828 impl std::fmt::Display for AutoUpgradePausedReason {
29829 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29830 wkt::internal::display_enum(f, self.name(), self.value())
29831 }
29832 }
29833
29834 impl std::convert::From<i32> for AutoUpgradePausedReason {
29835 fn from(value: i32) -> Self {
29836 match value {
29837 0 => Self::Unspecified,
29838 1 => Self::MaintenanceWindow,
29839 2 => Self::MaintenanceExclusionNoUpgrades,
29840 3 => Self::MaintenanceExclusionNoMinorUpgrades,
29841 4 => Self::SystemConfig,
29842 _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
29843 wkt::internal::UnknownEnumValue::Integer(value),
29844 )),
29845 }
29846 }
29847 }
29848
29849 impl std::convert::From<&str> for AutoUpgradePausedReason {
29850 fn from(value: &str) -> Self {
29851 use std::string::ToString;
29852 match value {
29853 "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED" => Self::Unspecified,
29854 "MAINTENANCE_WINDOW" => Self::MaintenanceWindow,
29855 "MAINTENANCE_EXCLUSION_NO_UPGRADES" => Self::MaintenanceExclusionNoUpgrades,
29856 "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES" => {
29857 Self::MaintenanceExclusionNoMinorUpgrades
29858 }
29859 "SYSTEM_CONFIG" => Self::SystemConfig,
29860 _ => Self::UnknownValue(auto_upgrade_paused_reason::UnknownValue(
29861 wkt::internal::UnknownEnumValue::String(value.to_string()),
29862 )),
29863 }
29864 }
29865 }
29866
29867 impl serde::ser::Serialize for AutoUpgradePausedReason {
29868 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29869 where
29870 S: serde::Serializer,
29871 {
29872 match self {
29873 Self::Unspecified => serializer.serialize_i32(0),
29874 Self::MaintenanceWindow => serializer.serialize_i32(1),
29875 Self::MaintenanceExclusionNoUpgrades => serializer.serialize_i32(2),
29876 Self::MaintenanceExclusionNoMinorUpgrades => serializer.serialize_i32(3),
29877 Self::SystemConfig => serializer.serialize_i32(4),
29878 Self::UnknownValue(u) => u.0.serialize(serializer),
29879 }
29880 }
29881 }
29882
29883 impl<'de> serde::de::Deserialize<'de> for AutoUpgradePausedReason {
29884 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29885 where
29886 D: serde::Deserializer<'de>,
29887 {
29888 deserializer.deserialize_any(
29889 wkt::internal::EnumVisitor::<AutoUpgradePausedReason>::new(
29890 ".google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReason",
29891 ),
29892 )
29893 }
29894 }
29895}
29896
29897#[derive(Clone, Default, PartialEq)]
29899#[non_exhaustive]
29900pub struct GkeAutoUpgradeConfig {
29901 pub patch_mode: crate::model::gke_auto_upgrade_config::PatchMode,
29904
29905 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29906}
29907
29908impl GkeAutoUpgradeConfig {
29909 pub fn new() -> Self {
29910 std::default::Default::default()
29911 }
29912
29913 pub fn set_patch_mode<
29915 T: std::convert::Into<crate::model::gke_auto_upgrade_config::PatchMode>,
29916 >(
29917 mut self,
29918 v: T,
29919 ) -> Self {
29920 self.patch_mode = v.into();
29921 self
29922 }
29923}
29924
29925impl wkt::message::Message for GkeAutoUpgradeConfig {
29926 fn typename() -> &'static str {
29927 "type.googleapis.com/google.container.v1.GkeAutoUpgradeConfig"
29928 }
29929}
29930
29931pub mod gke_auto_upgrade_config {
29933 #[allow(unused_imports)]
29934 use super::*;
29935
29936 #[derive(Clone, Debug, PartialEq)]
29953 #[non_exhaustive]
29954 pub enum PatchMode {
29955 Unspecified,
29959 Accelerated,
29962 UnknownValue(patch_mode::UnknownValue),
29967 }
29968
29969 #[doc(hidden)]
29970 pub mod patch_mode {
29971 #[allow(unused_imports)]
29972 use super::*;
29973 #[derive(Clone, Debug, PartialEq)]
29974 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29975 }
29976
29977 impl PatchMode {
29978 pub fn value(&self) -> std::option::Option<i32> {
29983 match self {
29984 Self::Unspecified => std::option::Option::Some(0),
29985 Self::Accelerated => std::option::Option::Some(1),
29986 Self::UnknownValue(u) => u.0.value(),
29987 }
29988 }
29989
29990 pub fn name(&self) -> std::option::Option<&str> {
29995 match self {
29996 Self::Unspecified => std::option::Option::Some("PATCH_MODE_UNSPECIFIED"),
29997 Self::Accelerated => std::option::Option::Some("ACCELERATED"),
29998 Self::UnknownValue(u) => u.0.name(),
29999 }
30000 }
30001 }
30002
30003 impl std::default::Default for PatchMode {
30004 fn default() -> Self {
30005 use std::convert::From;
30006 Self::from(0)
30007 }
30008 }
30009
30010 impl std::fmt::Display for PatchMode {
30011 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30012 wkt::internal::display_enum(f, self.name(), self.value())
30013 }
30014 }
30015
30016 impl std::convert::From<i32> for PatchMode {
30017 fn from(value: i32) -> Self {
30018 match value {
30019 0 => Self::Unspecified,
30020 1 => Self::Accelerated,
30021 _ => Self::UnknownValue(patch_mode::UnknownValue(
30022 wkt::internal::UnknownEnumValue::Integer(value),
30023 )),
30024 }
30025 }
30026 }
30027
30028 impl std::convert::From<&str> for PatchMode {
30029 fn from(value: &str) -> Self {
30030 use std::string::ToString;
30031 match value {
30032 "PATCH_MODE_UNSPECIFIED" => Self::Unspecified,
30033 "ACCELERATED" => Self::Accelerated,
30034 _ => Self::UnknownValue(patch_mode::UnknownValue(
30035 wkt::internal::UnknownEnumValue::String(value.to_string()),
30036 )),
30037 }
30038 }
30039 }
30040
30041 impl serde::ser::Serialize for PatchMode {
30042 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30043 where
30044 S: serde::Serializer,
30045 {
30046 match self {
30047 Self::Unspecified => serializer.serialize_i32(0),
30048 Self::Accelerated => serializer.serialize_i32(1),
30049 Self::UnknownValue(u) => u.0.serialize(serializer),
30050 }
30051 }
30052 }
30053
30054 impl<'de> serde::de::Deserialize<'de> for PatchMode {
30055 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30056 where
30057 D: serde::Deserializer<'de>,
30058 {
30059 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PatchMode>::new(
30060 ".google.container.v1.GkeAutoUpgradeConfig.PatchMode",
30061 ))
30062 }
30063 }
30064}
30065
30066#[derive(Clone, Default, PartialEq)]
30068#[non_exhaustive]
30069pub struct NetworkTierConfig {
30070 pub network_tier: crate::model::network_tier_config::NetworkTier,
30072
30073 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30074}
30075
30076impl NetworkTierConfig {
30077 pub fn new() -> Self {
30078 std::default::Default::default()
30079 }
30080
30081 pub fn set_network_tier<
30083 T: std::convert::Into<crate::model::network_tier_config::NetworkTier>,
30084 >(
30085 mut self,
30086 v: T,
30087 ) -> Self {
30088 self.network_tier = v.into();
30089 self
30090 }
30091}
30092
30093impl wkt::message::Message for NetworkTierConfig {
30094 fn typename() -> &'static str {
30095 "type.googleapis.com/google.container.v1.NetworkTierConfig"
30096 }
30097}
30098
30099pub mod network_tier_config {
30101 #[allow(unused_imports)]
30102 use super::*;
30103
30104 #[derive(Clone, Debug, PartialEq)]
30120 #[non_exhaustive]
30121 pub enum NetworkTier {
30122 Unspecified,
30126 Default,
30132 Premium,
30134 Standard,
30136 UnknownValue(network_tier::UnknownValue),
30141 }
30142
30143 #[doc(hidden)]
30144 pub mod network_tier {
30145 #[allow(unused_imports)]
30146 use super::*;
30147 #[derive(Clone, Debug, PartialEq)]
30148 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30149 }
30150
30151 impl NetworkTier {
30152 pub fn value(&self) -> std::option::Option<i32> {
30157 match self {
30158 Self::Unspecified => std::option::Option::Some(0),
30159 Self::Default => std::option::Option::Some(1),
30160 Self::Premium => std::option::Option::Some(2),
30161 Self::Standard => std::option::Option::Some(3),
30162 Self::UnknownValue(u) => u.0.value(),
30163 }
30164 }
30165
30166 pub fn name(&self) -> std::option::Option<&str> {
30171 match self {
30172 Self::Unspecified => std::option::Option::Some("NETWORK_TIER_UNSPECIFIED"),
30173 Self::Default => std::option::Option::Some("NETWORK_TIER_DEFAULT"),
30174 Self::Premium => std::option::Option::Some("NETWORK_TIER_PREMIUM"),
30175 Self::Standard => std::option::Option::Some("NETWORK_TIER_STANDARD"),
30176 Self::UnknownValue(u) => u.0.name(),
30177 }
30178 }
30179 }
30180
30181 impl std::default::Default for NetworkTier {
30182 fn default() -> Self {
30183 use std::convert::From;
30184 Self::from(0)
30185 }
30186 }
30187
30188 impl std::fmt::Display for NetworkTier {
30189 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30190 wkt::internal::display_enum(f, self.name(), self.value())
30191 }
30192 }
30193
30194 impl std::convert::From<i32> for NetworkTier {
30195 fn from(value: i32) -> Self {
30196 match value {
30197 0 => Self::Unspecified,
30198 1 => Self::Default,
30199 2 => Self::Premium,
30200 3 => Self::Standard,
30201 _ => Self::UnknownValue(network_tier::UnknownValue(
30202 wkt::internal::UnknownEnumValue::Integer(value),
30203 )),
30204 }
30205 }
30206 }
30207
30208 impl std::convert::From<&str> for NetworkTier {
30209 fn from(value: &str) -> Self {
30210 use std::string::ToString;
30211 match value {
30212 "NETWORK_TIER_UNSPECIFIED" => Self::Unspecified,
30213 "NETWORK_TIER_DEFAULT" => Self::Default,
30214 "NETWORK_TIER_PREMIUM" => Self::Premium,
30215 "NETWORK_TIER_STANDARD" => Self::Standard,
30216 _ => Self::UnknownValue(network_tier::UnknownValue(
30217 wkt::internal::UnknownEnumValue::String(value.to_string()),
30218 )),
30219 }
30220 }
30221 }
30222
30223 impl serde::ser::Serialize for NetworkTier {
30224 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30225 where
30226 S: serde::Serializer,
30227 {
30228 match self {
30229 Self::Unspecified => serializer.serialize_i32(0),
30230 Self::Default => serializer.serialize_i32(1),
30231 Self::Premium => serializer.serialize_i32(2),
30232 Self::Standard => serializer.serialize_i32(3),
30233 Self::UnknownValue(u) => u.0.serialize(serializer),
30234 }
30235 }
30236 }
30237
30238 impl<'de> serde::de::Deserialize<'de> for NetworkTier {
30239 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30240 where
30241 D: serde::Deserializer<'de>,
30242 {
30243 deserializer.deserialize_any(wkt::internal::EnumVisitor::<NetworkTier>::new(
30244 ".google.container.v1.NetworkTierConfig.NetworkTier",
30245 ))
30246 }
30247 }
30248}
30249
30250#[derive(Clone, Debug, PartialEq)]
30267#[non_exhaustive]
30268pub enum PrivateIPv6GoogleAccess {
30269 PrivateIpv6GoogleAccessUnspecified,
30271 PrivateIpv6GoogleAccessDisabled,
30273 PrivateIpv6GoogleAccessToGoogle,
30275 PrivateIpv6GoogleAccessBidirectional,
30277 UnknownValue(private_i_pv_6_google_access::UnknownValue),
30282}
30283
30284#[doc(hidden)]
30285pub mod private_i_pv_6_google_access {
30286 #[allow(unused_imports)]
30287 use super::*;
30288 #[derive(Clone, Debug, PartialEq)]
30289 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30290}
30291
30292impl PrivateIPv6GoogleAccess {
30293 pub fn value(&self) -> std::option::Option<i32> {
30298 match self {
30299 Self::PrivateIpv6GoogleAccessUnspecified => std::option::Option::Some(0),
30300 Self::PrivateIpv6GoogleAccessDisabled => std::option::Option::Some(1),
30301 Self::PrivateIpv6GoogleAccessToGoogle => std::option::Option::Some(2),
30302 Self::PrivateIpv6GoogleAccessBidirectional => std::option::Option::Some(3),
30303 Self::UnknownValue(u) => u.0.value(),
30304 }
30305 }
30306
30307 pub fn name(&self) -> std::option::Option<&str> {
30312 match self {
30313 Self::PrivateIpv6GoogleAccessUnspecified => {
30314 std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED")
30315 }
30316 Self::PrivateIpv6GoogleAccessDisabled => {
30317 std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED")
30318 }
30319 Self::PrivateIpv6GoogleAccessToGoogle => {
30320 std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE")
30321 }
30322 Self::PrivateIpv6GoogleAccessBidirectional => {
30323 std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL")
30324 }
30325 Self::UnknownValue(u) => u.0.name(),
30326 }
30327 }
30328}
30329
30330impl std::default::Default for PrivateIPv6GoogleAccess {
30331 fn default() -> Self {
30332 use std::convert::From;
30333 Self::from(0)
30334 }
30335}
30336
30337impl std::fmt::Display for PrivateIPv6GoogleAccess {
30338 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30339 wkt::internal::display_enum(f, self.name(), self.value())
30340 }
30341}
30342
30343impl std::convert::From<i32> for PrivateIPv6GoogleAccess {
30344 fn from(value: i32) -> Self {
30345 match value {
30346 0 => Self::PrivateIpv6GoogleAccessUnspecified,
30347 1 => Self::PrivateIpv6GoogleAccessDisabled,
30348 2 => Self::PrivateIpv6GoogleAccessToGoogle,
30349 3 => Self::PrivateIpv6GoogleAccessBidirectional,
30350 _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
30351 wkt::internal::UnknownEnumValue::Integer(value),
30352 )),
30353 }
30354 }
30355}
30356
30357impl std::convert::From<&str> for PrivateIPv6GoogleAccess {
30358 fn from(value: &str) -> Self {
30359 use std::string::ToString;
30360 match value {
30361 "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" => Self::PrivateIpv6GoogleAccessUnspecified,
30362 "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" => Self::PrivateIpv6GoogleAccessDisabled,
30363 "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" => Self::PrivateIpv6GoogleAccessToGoogle,
30364 "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" => {
30365 Self::PrivateIpv6GoogleAccessBidirectional
30366 }
30367 _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
30368 wkt::internal::UnknownEnumValue::String(value.to_string()),
30369 )),
30370 }
30371 }
30372}
30373
30374impl serde::ser::Serialize for PrivateIPv6GoogleAccess {
30375 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30376 where
30377 S: serde::Serializer,
30378 {
30379 match self {
30380 Self::PrivateIpv6GoogleAccessUnspecified => serializer.serialize_i32(0),
30381 Self::PrivateIpv6GoogleAccessDisabled => serializer.serialize_i32(1),
30382 Self::PrivateIpv6GoogleAccessToGoogle => serializer.serialize_i32(2),
30383 Self::PrivateIpv6GoogleAccessBidirectional => serializer.serialize_i32(3),
30384 Self::UnknownValue(u) => u.0.serialize(serializer),
30385 }
30386 }
30387}
30388
30389impl<'de> serde::de::Deserialize<'de> for PrivateIPv6GoogleAccess {
30390 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30391 where
30392 D: serde::Deserializer<'de>,
30393 {
30394 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PrivateIPv6GoogleAccess>::new(
30395 ".google.container.v1.PrivateIPv6GoogleAccess",
30396 ))
30397 }
30398}
30399
30400#[derive(Clone, Debug, PartialEq)]
30417#[non_exhaustive]
30418pub enum UpgradeResourceType {
30419 Unspecified,
30421 Master,
30423 NodePool,
30425 UnknownValue(upgrade_resource_type::UnknownValue),
30430}
30431
30432#[doc(hidden)]
30433pub mod upgrade_resource_type {
30434 #[allow(unused_imports)]
30435 use super::*;
30436 #[derive(Clone, Debug, PartialEq)]
30437 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30438}
30439
30440impl UpgradeResourceType {
30441 pub fn value(&self) -> std::option::Option<i32> {
30446 match self {
30447 Self::Unspecified => std::option::Option::Some(0),
30448 Self::Master => std::option::Option::Some(1),
30449 Self::NodePool => std::option::Option::Some(2),
30450 Self::UnknownValue(u) => u.0.value(),
30451 }
30452 }
30453
30454 pub fn name(&self) -> std::option::Option<&str> {
30459 match self {
30460 Self::Unspecified => std::option::Option::Some("UPGRADE_RESOURCE_TYPE_UNSPECIFIED"),
30461 Self::Master => std::option::Option::Some("MASTER"),
30462 Self::NodePool => std::option::Option::Some("NODE_POOL"),
30463 Self::UnknownValue(u) => u.0.name(),
30464 }
30465 }
30466}
30467
30468impl std::default::Default for UpgradeResourceType {
30469 fn default() -> Self {
30470 use std::convert::From;
30471 Self::from(0)
30472 }
30473}
30474
30475impl std::fmt::Display for UpgradeResourceType {
30476 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30477 wkt::internal::display_enum(f, self.name(), self.value())
30478 }
30479}
30480
30481impl std::convert::From<i32> for UpgradeResourceType {
30482 fn from(value: i32) -> Self {
30483 match value {
30484 0 => Self::Unspecified,
30485 1 => Self::Master,
30486 2 => Self::NodePool,
30487 _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
30488 wkt::internal::UnknownEnumValue::Integer(value),
30489 )),
30490 }
30491 }
30492}
30493
30494impl std::convert::From<&str> for UpgradeResourceType {
30495 fn from(value: &str) -> Self {
30496 use std::string::ToString;
30497 match value {
30498 "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
30499 "MASTER" => Self::Master,
30500 "NODE_POOL" => Self::NodePool,
30501 _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
30502 wkt::internal::UnknownEnumValue::String(value.to_string()),
30503 )),
30504 }
30505 }
30506}
30507
30508impl serde::ser::Serialize for UpgradeResourceType {
30509 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30510 where
30511 S: serde::Serializer,
30512 {
30513 match self {
30514 Self::Unspecified => serializer.serialize_i32(0),
30515 Self::Master => serializer.serialize_i32(1),
30516 Self::NodePool => serializer.serialize_i32(2),
30517 Self::UnknownValue(u) => u.0.serialize(serializer),
30518 }
30519 }
30520}
30521
30522impl<'de> serde::de::Deserialize<'de> for UpgradeResourceType {
30523 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30524 where
30525 D: serde::Deserializer<'de>,
30526 {
30527 deserializer.deserialize_any(wkt::internal::EnumVisitor::<UpgradeResourceType>::new(
30528 ".google.container.v1.UpgradeResourceType",
30529 ))
30530 }
30531}
30532
30533#[derive(Clone, Debug, PartialEq)]
30550#[non_exhaustive]
30551pub enum DatapathProvider {
30552 Unspecified,
30554 LegacyDatapath,
30556 AdvancedDatapath,
30561 UnknownValue(datapath_provider::UnknownValue),
30566}
30567
30568#[doc(hidden)]
30569pub mod datapath_provider {
30570 #[allow(unused_imports)]
30571 use super::*;
30572 #[derive(Clone, Debug, PartialEq)]
30573 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30574}
30575
30576impl DatapathProvider {
30577 pub fn value(&self) -> std::option::Option<i32> {
30582 match self {
30583 Self::Unspecified => std::option::Option::Some(0),
30584 Self::LegacyDatapath => std::option::Option::Some(1),
30585 Self::AdvancedDatapath => std::option::Option::Some(2),
30586 Self::UnknownValue(u) => u.0.value(),
30587 }
30588 }
30589
30590 pub fn name(&self) -> std::option::Option<&str> {
30595 match self {
30596 Self::Unspecified => std::option::Option::Some("DATAPATH_PROVIDER_UNSPECIFIED"),
30597 Self::LegacyDatapath => std::option::Option::Some("LEGACY_DATAPATH"),
30598 Self::AdvancedDatapath => std::option::Option::Some("ADVANCED_DATAPATH"),
30599 Self::UnknownValue(u) => u.0.name(),
30600 }
30601 }
30602}
30603
30604impl std::default::Default for DatapathProvider {
30605 fn default() -> Self {
30606 use std::convert::From;
30607 Self::from(0)
30608 }
30609}
30610
30611impl std::fmt::Display for DatapathProvider {
30612 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30613 wkt::internal::display_enum(f, self.name(), self.value())
30614 }
30615}
30616
30617impl std::convert::From<i32> for DatapathProvider {
30618 fn from(value: i32) -> Self {
30619 match value {
30620 0 => Self::Unspecified,
30621 1 => Self::LegacyDatapath,
30622 2 => Self::AdvancedDatapath,
30623 _ => Self::UnknownValue(datapath_provider::UnknownValue(
30624 wkt::internal::UnknownEnumValue::Integer(value),
30625 )),
30626 }
30627 }
30628}
30629
30630impl std::convert::From<&str> for DatapathProvider {
30631 fn from(value: &str) -> Self {
30632 use std::string::ToString;
30633 match value {
30634 "DATAPATH_PROVIDER_UNSPECIFIED" => Self::Unspecified,
30635 "LEGACY_DATAPATH" => Self::LegacyDatapath,
30636 "ADVANCED_DATAPATH" => Self::AdvancedDatapath,
30637 _ => Self::UnknownValue(datapath_provider::UnknownValue(
30638 wkt::internal::UnknownEnumValue::String(value.to_string()),
30639 )),
30640 }
30641 }
30642}
30643
30644impl serde::ser::Serialize for DatapathProvider {
30645 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30646 where
30647 S: serde::Serializer,
30648 {
30649 match self {
30650 Self::Unspecified => serializer.serialize_i32(0),
30651 Self::LegacyDatapath => serializer.serialize_i32(1),
30652 Self::AdvancedDatapath => serializer.serialize_i32(2),
30653 Self::UnknownValue(u) => u.0.serialize(serializer),
30654 }
30655 }
30656}
30657
30658impl<'de> serde::de::Deserialize<'de> for DatapathProvider {
30659 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30660 where
30661 D: serde::Deserializer<'de>,
30662 {
30663 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatapathProvider>::new(
30664 ".google.container.v1.DatapathProvider",
30665 ))
30666 }
30667}
30668
30669#[derive(Clone, Debug, PartialEq)]
30685#[non_exhaustive]
30686pub enum NodePoolUpdateStrategy {
30687 Unspecified,
30690 BlueGreen,
30692 Surge,
30695 UnknownValue(node_pool_update_strategy::UnknownValue),
30700}
30701
30702#[doc(hidden)]
30703pub mod node_pool_update_strategy {
30704 #[allow(unused_imports)]
30705 use super::*;
30706 #[derive(Clone, Debug, PartialEq)]
30707 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30708}
30709
30710impl NodePoolUpdateStrategy {
30711 pub fn value(&self) -> std::option::Option<i32> {
30716 match self {
30717 Self::Unspecified => std::option::Option::Some(0),
30718 Self::BlueGreen => std::option::Option::Some(2),
30719 Self::Surge => std::option::Option::Some(3),
30720 Self::UnknownValue(u) => u.0.value(),
30721 }
30722 }
30723
30724 pub fn name(&self) -> std::option::Option<&str> {
30729 match self {
30730 Self::Unspecified => std::option::Option::Some("NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"),
30731 Self::BlueGreen => std::option::Option::Some("BLUE_GREEN"),
30732 Self::Surge => std::option::Option::Some("SURGE"),
30733 Self::UnknownValue(u) => u.0.name(),
30734 }
30735 }
30736}
30737
30738impl std::default::Default for NodePoolUpdateStrategy {
30739 fn default() -> Self {
30740 use std::convert::From;
30741 Self::from(0)
30742 }
30743}
30744
30745impl std::fmt::Display for NodePoolUpdateStrategy {
30746 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30747 wkt::internal::display_enum(f, self.name(), self.value())
30748 }
30749}
30750
30751impl std::convert::From<i32> for NodePoolUpdateStrategy {
30752 fn from(value: i32) -> Self {
30753 match value {
30754 0 => Self::Unspecified,
30755 2 => Self::BlueGreen,
30756 3 => Self::Surge,
30757 _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
30758 wkt::internal::UnknownEnumValue::Integer(value),
30759 )),
30760 }
30761 }
30762}
30763
30764impl std::convert::From<&str> for NodePoolUpdateStrategy {
30765 fn from(value: &str) -> Self {
30766 use std::string::ToString;
30767 match value {
30768 "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED" => Self::Unspecified,
30769 "BLUE_GREEN" => Self::BlueGreen,
30770 "SURGE" => Self::Surge,
30771 _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
30772 wkt::internal::UnknownEnumValue::String(value.to_string()),
30773 )),
30774 }
30775 }
30776}
30777
30778impl serde::ser::Serialize for NodePoolUpdateStrategy {
30779 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30780 where
30781 S: serde::Serializer,
30782 {
30783 match self {
30784 Self::Unspecified => serializer.serialize_i32(0),
30785 Self::BlueGreen => serializer.serialize_i32(2),
30786 Self::Surge => serializer.serialize_i32(3),
30787 Self::UnknownValue(u) => u.0.serialize(serializer),
30788 }
30789 }
30790}
30791
30792impl<'de> serde::de::Deserialize<'de> for NodePoolUpdateStrategy {
30793 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30794 where
30795 D: serde::Deserializer<'de>,
30796 {
30797 deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodePoolUpdateStrategy>::new(
30798 ".google.container.v1.NodePoolUpdateStrategy",
30799 ))
30800 }
30801}
30802
30803#[derive(Clone, Debug, PartialEq)]
30819#[non_exhaustive]
30820pub enum StackType {
30821 Unspecified,
30823 Ipv4,
30825 Ipv4Ipv6,
30827 UnknownValue(stack_type::UnknownValue),
30832}
30833
30834#[doc(hidden)]
30835pub mod stack_type {
30836 #[allow(unused_imports)]
30837 use super::*;
30838 #[derive(Clone, Debug, PartialEq)]
30839 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30840}
30841
30842impl StackType {
30843 pub fn value(&self) -> std::option::Option<i32> {
30848 match self {
30849 Self::Unspecified => std::option::Option::Some(0),
30850 Self::Ipv4 => std::option::Option::Some(1),
30851 Self::Ipv4Ipv6 => std::option::Option::Some(2),
30852 Self::UnknownValue(u) => u.0.value(),
30853 }
30854 }
30855
30856 pub fn name(&self) -> std::option::Option<&str> {
30861 match self {
30862 Self::Unspecified => std::option::Option::Some("STACK_TYPE_UNSPECIFIED"),
30863 Self::Ipv4 => std::option::Option::Some("IPV4"),
30864 Self::Ipv4Ipv6 => std::option::Option::Some("IPV4_IPV6"),
30865 Self::UnknownValue(u) => u.0.name(),
30866 }
30867 }
30868}
30869
30870impl std::default::Default for StackType {
30871 fn default() -> Self {
30872 use std::convert::From;
30873 Self::from(0)
30874 }
30875}
30876
30877impl std::fmt::Display for StackType {
30878 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30879 wkt::internal::display_enum(f, self.name(), self.value())
30880 }
30881}
30882
30883impl std::convert::From<i32> for StackType {
30884 fn from(value: i32) -> Self {
30885 match value {
30886 0 => Self::Unspecified,
30887 1 => Self::Ipv4,
30888 2 => Self::Ipv4Ipv6,
30889 _ => Self::UnknownValue(stack_type::UnknownValue(
30890 wkt::internal::UnknownEnumValue::Integer(value),
30891 )),
30892 }
30893 }
30894}
30895
30896impl std::convert::From<&str> for StackType {
30897 fn from(value: &str) -> Self {
30898 use std::string::ToString;
30899 match value {
30900 "STACK_TYPE_UNSPECIFIED" => Self::Unspecified,
30901 "IPV4" => Self::Ipv4,
30902 "IPV4_IPV6" => Self::Ipv4Ipv6,
30903 _ => Self::UnknownValue(stack_type::UnknownValue(
30904 wkt::internal::UnknownEnumValue::String(value.to_string()),
30905 )),
30906 }
30907 }
30908}
30909
30910impl serde::ser::Serialize for StackType {
30911 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30912 where
30913 S: serde::Serializer,
30914 {
30915 match self {
30916 Self::Unspecified => serializer.serialize_i32(0),
30917 Self::Ipv4 => serializer.serialize_i32(1),
30918 Self::Ipv4Ipv6 => serializer.serialize_i32(2),
30919 Self::UnknownValue(u) => u.0.serialize(serializer),
30920 }
30921 }
30922}
30923
30924impl<'de> serde::de::Deserialize<'de> for StackType {
30925 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30926 where
30927 D: serde::Deserializer<'de>,
30928 {
30929 deserializer.deserialize_any(wkt::internal::EnumVisitor::<StackType>::new(
30930 ".google.container.v1.StackType",
30931 ))
30932 }
30933}
30934
30935#[derive(Clone, Debug, PartialEq)]
30951#[non_exhaustive]
30952pub enum IPv6AccessType {
30953 Ipv6AccessTypeUnspecified,
30955 Internal,
30957 External,
30959 UnknownValue(i_pv_6_access_type::UnknownValue),
30964}
30965
30966#[doc(hidden)]
30967pub mod i_pv_6_access_type {
30968 #[allow(unused_imports)]
30969 use super::*;
30970 #[derive(Clone, Debug, PartialEq)]
30971 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30972}
30973
30974impl IPv6AccessType {
30975 pub fn value(&self) -> std::option::Option<i32> {
30980 match self {
30981 Self::Ipv6AccessTypeUnspecified => std::option::Option::Some(0),
30982 Self::Internal => std::option::Option::Some(1),
30983 Self::External => std::option::Option::Some(2),
30984 Self::UnknownValue(u) => u.0.value(),
30985 }
30986 }
30987
30988 pub fn name(&self) -> std::option::Option<&str> {
30993 match self {
30994 Self::Ipv6AccessTypeUnspecified => {
30995 std::option::Option::Some("IPV6_ACCESS_TYPE_UNSPECIFIED")
30996 }
30997 Self::Internal => std::option::Option::Some("INTERNAL"),
30998 Self::External => std::option::Option::Some("EXTERNAL"),
30999 Self::UnknownValue(u) => u.0.name(),
31000 }
31001 }
31002}
31003
31004impl std::default::Default for IPv6AccessType {
31005 fn default() -> Self {
31006 use std::convert::From;
31007 Self::from(0)
31008 }
31009}
31010
31011impl std::fmt::Display for IPv6AccessType {
31012 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31013 wkt::internal::display_enum(f, self.name(), self.value())
31014 }
31015}
31016
31017impl std::convert::From<i32> for IPv6AccessType {
31018 fn from(value: i32) -> Self {
31019 match value {
31020 0 => Self::Ipv6AccessTypeUnspecified,
31021 1 => Self::Internal,
31022 2 => Self::External,
31023 _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
31024 wkt::internal::UnknownEnumValue::Integer(value),
31025 )),
31026 }
31027 }
31028}
31029
31030impl std::convert::From<&str> for IPv6AccessType {
31031 fn from(value: &str) -> Self {
31032 use std::string::ToString;
31033 match value {
31034 "IPV6_ACCESS_TYPE_UNSPECIFIED" => Self::Ipv6AccessTypeUnspecified,
31035 "INTERNAL" => Self::Internal,
31036 "EXTERNAL" => Self::External,
31037 _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
31038 wkt::internal::UnknownEnumValue::String(value.to_string()),
31039 )),
31040 }
31041 }
31042}
31043
31044impl serde::ser::Serialize for IPv6AccessType {
31045 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31046 where
31047 S: serde::Serializer,
31048 {
31049 match self {
31050 Self::Ipv6AccessTypeUnspecified => serializer.serialize_i32(0),
31051 Self::Internal => serializer.serialize_i32(1),
31052 Self::External => serializer.serialize_i32(2),
31053 Self::UnknownValue(u) => u.0.serialize(serializer),
31054 }
31055 }
31056}
31057
31058impl<'de> serde::de::Deserialize<'de> for IPv6AccessType {
31059 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31060 where
31061 D: serde::Deserializer<'de>,
31062 {
31063 deserializer.deserialize_any(wkt::internal::EnumVisitor::<IPv6AccessType>::new(
31064 ".google.container.v1.IPv6AccessType",
31065 ))
31066 }
31067}
31068
31069#[derive(Clone, Debug, PartialEq)]
31085#[non_exhaustive]
31086pub enum InTransitEncryptionConfig {
31087 Unspecified,
31090 InTransitEncryptionDisabled,
31092 InTransitEncryptionInterNodeTransparent,
31094 UnknownValue(in_transit_encryption_config::UnknownValue),
31099}
31100
31101#[doc(hidden)]
31102pub mod in_transit_encryption_config {
31103 #[allow(unused_imports)]
31104 use super::*;
31105 #[derive(Clone, Debug, PartialEq)]
31106 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31107}
31108
31109impl InTransitEncryptionConfig {
31110 pub fn value(&self) -> std::option::Option<i32> {
31115 match self {
31116 Self::Unspecified => std::option::Option::Some(0),
31117 Self::InTransitEncryptionDisabled => std::option::Option::Some(1),
31118 Self::InTransitEncryptionInterNodeTransparent => std::option::Option::Some(2),
31119 Self::UnknownValue(u) => u.0.value(),
31120 }
31121 }
31122
31123 pub fn name(&self) -> std::option::Option<&str> {
31128 match self {
31129 Self::Unspecified => {
31130 std::option::Option::Some("IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED")
31131 }
31132 Self::InTransitEncryptionDisabled => {
31133 std::option::Option::Some("IN_TRANSIT_ENCRYPTION_DISABLED")
31134 }
31135 Self::InTransitEncryptionInterNodeTransparent => {
31136 std::option::Option::Some("IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT")
31137 }
31138 Self::UnknownValue(u) => u.0.name(),
31139 }
31140 }
31141}
31142
31143impl std::default::Default for InTransitEncryptionConfig {
31144 fn default() -> Self {
31145 use std::convert::From;
31146 Self::from(0)
31147 }
31148}
31149
31150impl std::fmt::Display for InTransitEncryptionConfig {
31151 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31152 wkt::internal::display_enum(f, self.name(), self.value())
31153 }
31154}
31155
31156impl std::convert::From<i32> for InTransitEncryptionConfig {
31157 fn from(value: i32) -> Self {
31158 match value {
31159 0 => Self::Unspecified,
31160 1 => Self::InTransitEncryptionDisabled,
31161 2 => Self::InTransitEncryptionInterNodeTransparent,
31162 _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
31163 wkt::internal::UnknownEnumValue::Integer(value),
31164 )),
31165 }
31166 }
31167}
31168
31169impl std::convert::From<&str> for InTransitEncryptionConfig {
31170 fn from(value: &str) -> Self {
31171 use std::string::ToString;
31172 match value {
31173 "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" => Self::Unspecified,
31174 "IN_TRANSIT_ENCRYPTION_DISABLED" => Self::InTransitEncryptionDisabled,
31175 "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" => {
31176 Self::InTransitEncryptionInterNodeTransparent
31177 }
31178 _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
31179 wkt::internal::UnknownEnumValue::String(value.to_string()),
31180 )),
31181 }
31182 }
31183}
31184
31185impl serde::ser::Serialize for InTransitEncryptionConfig {
31186 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31187 where
31188 S: serde::Serializer,
31189 {
31190 match self {
31191 Self::Unspecified => serializer.serialize_i32(0),
31192 Self::InTransitEncryptionDisabled => serializer.serialize_i32(1),
31193 Self::InTransitEncryptionInterNodeTransparent => serializer.serialize_i32(2),
31194 Self::UnknownValue(u) => u.0.serialize(serializer),
31195 }
31196 }
31197}
31198
31199impl<'de> serde::de::Deserialize<'de> for InTransitEncryptionConfig {
31200 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31201 where
31202 D: serde::Deserializer<'de>,
31203 {
31204 deserializer.deserialize_any(
31205 wkt::internal::EnumVisitor::<InTransitEncryptionConfig>::new(
31206 ".google.container.v1.InTransitEncryptionConfig",
31207 ),
31208 )
31209 }
31210}