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
34#[serde_with::serde_as]
36#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
37#[serde(default, rename_all = "camelCase")]
38#[non_exhaustive]
39pub struct LinuxNodeConfig {
40 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
60 pub sysctls: std::collections::HashMap<std::string::String, std::string::String>,
61
62 pub cgroup_mode: crate::model::linux_node_config::CgroupMode,
64
65 #[serde(skip_serializing_if = "std::option::Option::is_none")]
67 pub hugepages: std::option::Option<crate::model::linux_node_config::HugepagesConfig>,
68
69 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
70 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71}
72
73impl LinuxNodeConfig {
74 pub fn new() -> Self {
75 std::default::Default::default()
76 }
77
78 pub fn set_sysctls<T, K, V>(mut self, v: T) -> Self
80 where
81 T: std::iter::IntoIterator<Item = (K, V)>,
82 K: std::convert::Into<std::string::String>,
83 V: std::convert::Into<std::string::String>,
84 {
85 use std::iter::Iterator;
86 self.sysctls = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
87 self
88 }
89
90 pub fn set_cgroup_mode<T: std::convert::Into<crate::model::linux_node_config::CgroupMode>>(
92 mut self,
93 v: T,
94 ) -> Self {
95 self.cgroup_mode = v.into();
96 self
97 }
98
99 pub fn set_hugepages<
101 T: std::convert::Into<std::option::Option<crate::model::linux_node_config::HugepagesConfig>>,
102 >(
103 mut self,
104 v: T,
105 ) -> Self {
106 self.hugepages = v.into();
107 self
108 }
109}
110
111impl wkt::message::Message for LinuxNodeConfig {
112 fn typename() -> &'static str {
113 "type.googleapis.com/google.container.v1.LinuxNodeConfig"
114 }
115}
116
117pub mod linux_node_config {
119 #[allow(unused_imports)]
120 use super::*;
121
122 #[serde_with::serde_as]
124 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
125 #[serde(default, rename_all = "camelCase")]
126 #[non_exhaustive]
127 pub struct HugepagesConfig {
128 #[serde(rename = "hugepageSize2m")]
130 #[serde(skip_serializing_if = "std::option::Option::is_none")]
131 pub hugepage_size2m: std::option::Option<i32>,
132
133 #[serde(rename = "hugepageSize1g")]
135 #[serde(skip_serializing_if = "std::option::Option::is_none")]
136 pub hugepage_size1g: std::option::Option<i32>,
137
138 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
139 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
140 }
141
142 impl HugepagesConfig {
143 pub fn new() -> Self {
144 std::default::Default::default()
145 }
146
147 pub fn set_hugepage_size2m<T: std::convert::Into<std::option::Option<i32>>>(
149 mut self,
150 v: T,
151 ) -> Self {
152 self.hugepage_size2m = v.into();
153 self
154 }
155
156 pub fn set_hugepage_size1g<T: std::convert::Into<std::option::Option<i32>>>(
158 mut self,
159 v: T,
160 ) -> Self {
161 self.hugepage_size1g = v.into();
162 self
163 }
164 }
165
166 impl wkt::message::Message for HugepagesConfig {
167 fn typename() -> &'static str {
168 "type.googleapis.com/google.container.v1.LinuxNodeConfig.HugepagesConfig"
169 }
170 }
171
172 #[derive(Clone, Debug, PartialEq)]
188 #[non_exhaustive]
189 pub enum CgroupMode {
190 Unspecified,
193 V1,
196 V2,
199 UnknownValue(cgroup_mode::UnknownValue),
204 }
205
206 #[doc(hidden)]
207 pub mod cgroup_mode {
208 #[allow(unused_imports)]
209 use super::*;
210 #[derive(Clone, Debug, PartialEq)]
211 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
212 }
213
214 impl CgroupMode {
215 pub fn value(&self) -> std::option::Option<i32> {
220 match self {
221 Self::Unspecified => std::option::Option::Some(0),
222 Self::V1 => std::option::Option::Some(1),
223 Self::V2 => std::option::Option::Some(2),
224 Self::UnknownValue(u) => u.0.value(),
225 }
226 }
227
228 pub fn name(&self) -> std::option::Option<&str> {
233 match self {
234 Self::Unspecified => std::option::Option::Some("CGROUP_MODE_UNSPECIFIED"),
235 Self::V1 => std::option::Option::Some("CGROUP_MODE_V1"),
236 Self::V2 => std::option::Option::Some("CGROUP_MODE_V2"),
237 Self::UnknownValue(u) => u.0.name(),
238 }
239 }
240 }
241
242 impl std::default::Default for CgroupMode {
243 fn default() -> Self {
244 use std::convert::From;
245 Self::from(0)
246 }
247 }
248
249 impl std::fmt::Display for CgroupMode {
250 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
251 wkt::internal::display_enum(f, self.name(), self.value())
252 }
253 }
254
255 impl std::convert::From<i32> for CgroupMode {
256 fn from(value: i32) -> Self {
257 match value {
258 0 => Self::Unspecified,
259 1 => Self::V1,
260 2 => Self::V2,
261 _ => Self::UnknownValue(cgroup_mode::UnknownValue(
262 wkt::internal::UnknownEnumValue::Integer(value),
263 )),
264 }
265 }
266 }
267
268 impl std::convert::From<&str> for CgroupMode {
269 fn from(value: &str) -> Self {
270 use std::string::ToString;
271 match value {
272 "CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
273 "CGROUP_MODE_V1" => Self::V1,
274 "CGROUP_MODE_V2" => Self::V2,
275 _ => Self::UnknownValue(cgroup_mode::UnknownValue(
276 wkt::internal::UnknownEnumValue::String(value.to_string()),
277 )),
278 }
279 }
280 }
281
282 impl serde::ser::Serialize for CgroupMode {
283 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
284 where
285 S: serde::Serializer,
286 {
287 match self {
288 Self::Unspecified => serializer.serialize_i32(0),
289 Self::V1 => serializer.serialize_i32(1),
290 Self::V2 => serializer.serialize_i32(2),
291 Self::UnknownValue(u) => u.0.serialize(serializer),
292 }
293 }
294 }
295
296 impl<'de> serde::de::Deserialize<'de> for CgroupMode {
297 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
298 where
299 D: serde::Deserializer<'de>,
300 {
301 deserializer.deserialize_any(wkt::internal::EnumVisitor::<CgroupMode>::new(
302 ".google.container.v1.LinuxNodeConfig.CgroupMode",
303 ))
304 }
305 }
306}
307
308#[serde_with::serde_as]
312#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
313#[serde(default, rename_all = "camelCase")]
314#[non_exhaustive]
315pub struct WindowsNodeConfig {
316 pub os_version: crate::model::windows_node_config::OSVersion,
318
319 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
320 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
321}
322
323impl WindowsNodeConfig {
324 pub fn new() -> Self {
325 std::default::Default::default()
326 }
327
328 pub fn set_os_version<T: std::convert::Into<crate::model::windows_node_config::OSVersion>>(
330 mut self,
331 v: T,
332 ) -> Self {
333 self.os_version = v.into();
334 self
335 }
336}
337
338impl wkt::message::Message for WindowsNodeConfig {
339 fn typename() -> &'static str {
340 "type.googleapis.com/google.container.v1.WindowsNodeConfig"
341 }
342}
343
344pub mod windows_node_config {
346 #[allow(unused_imports)]
347 use super::*;
348
349 #[derive(Clone, Debug, PartialEq)]
365 #[non_exhaustive]
366 pub enum OSVersion {
367 Unspecified,
369 Ltsc2019,
371 Ltsc2022,
373 UnknownValue(os_version::UnknownValue),
378 }
379
380 #[doc(hidden)]
381 pub mod os_version {
382 #[allow(unused_imports)]
383 use super::*;
384 #[derive(Clone, Debug, PartialEq)]
385 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
386 }
387
388 impl OSVersion {
389 pub fn value(&self) -> std::option::Option<i32> {
394 match self {
395 Self::Unspecified => std::option::Option::Some(0),
396 Self::Ltsc2019 => std::option::Option::Some(1),
397 Self::Ltsc2022 => std::option::Option::Some(2),
398 Self::UnknownValue(u) => u.0.value(),
399 }
400 }
401
402 pub fn name(&self) -> std::option::Option<&str> {
407 match self {
408 Self::Unspecified => std::option::Option::Some("OS_VERSION_UNSPECIFIED"),
409 Self::Ltsc2019 => std::option::Option::Some("OS_VERSION_LTSC2019"),
410 Self::Ltsc2022 => std::option::Option::Some("OS_VERSION_LTSC2022"),
411 Self::UnknownValue(u) => u.0.name(),
412 }
413 }
414 }
415
416 impl std::default::Default for OSVersion {
417 fn default() -> Self {
418 use std::convert::From;
419 Self::from(0)
420 }
421 }
422
423 impl std::fmt::Display for OSVersion {
424 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
425 wkt::internal::display_enum(f, self.name(), self.value())
426 }
427 }
428
429 impl std::convert::From<i32> for OSVersion {
430 fn from(value: i32) -> Self {
431 match value {
432 0 => Self::Unspecified,
433 1 => Self::Ltsc2019,
434 2 => Self::Ltsc2022,
435 _ => Self::UnknownValue(os_version::UnknownValue(
436 wkt::internal::UnknownEnumValue::Integer(value),
437 )),
438 }
439 }
440 }
441
442 impl std::convert::From<&str> for OSVersion {
443 fn from(value: &str) -> Self {
444 use std::string::ToString;
445 match value {
446 "OS_VERSION_UNSPECIFIED" => Self::Unspecified,
447 "OS_VERSION_LTSC2019" => Self::Ltsc2019,
448 "OS_VERSION_LTSC2022" => Self::Ltsc2022,
449 _ => Self::UnknownValue(os_version::UnknownValue(
450 wkt::internal::UnknownEnumValue::String(value.to_string()),
451 )),
452 }
453 }
454 }
455
456 impl serde::ser::Serialize for OSVersion {
457 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
458 where
459 S: serde::Serializer,
460 {
461 match self {
462 Self::Unspecified => serializer.serialize_i32(0),
463 Self::Ltsc2019 => serializer.serialize_i32(1),
464 Self::Ltsc2022 => serializer.serialize_i32(2),
465 Self::UnknownValue(u) => u.0.serialize(serializer),
466 }
467 }
468 }
469
470 impl<'de> serde::de::Deserialize<'de> for OSVersion {
471 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
472 where
473 D: serde::Deserializer<'de>,
474 {
475 deserializer.deserialize_any(wkt::internal::EnumVisitor::<OSVersion>::new(
476 ".google.container.v1.WindowsNodeConfig.OSVersion",
477 ))
478 }
479 }
480}
481
482#[serde_with::serde_as]
484#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
485#[serde(default, rename_all = "camelCase")]
486#[non_exhaustive]
487pub struct NodeKubeletConfig {
488 #[serde(skip_serializing_if = "std::string::String::is_empty")]
499 pub cpu_manager_policy: std::string::String,
500
501 #[serde(skip_serializing_if = "std::option::Option::is_none")]
513 pub cpu_cfs_quota: std::option::Option<wkt::BoolValue>,
514
515 #[serde(skip_serializing_if = "std::string::String::is_empty")]
522 pub cpu_cfs_quota_period: std::string::String,
523
524 #[serde(skip_serializing_if = "wkt::internal::is_default")]
530 #[serde_as(as = "serde_with::DisplayFromStr")]
531 pub pod_pids_limit: i64,
532
533 #[serde(skip_serializing_if = "std::option::Option::is_none")]
535 pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
536
537 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
538 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
539}
540
541impl NodeKubeletConfig {
542 pub fn new() -> Self {
543 std::default::Default::default()
544 }
545
546 pub fn set_cpu_manager_policy<T: std::convert::Into<std::string::String>>(
548 mut self,
549 v: T,
550 ) -> Self {
551 self.cpu_manager_policy = v.into();
552 self
553 }
554
555 pub fn set_cpu_cfs_quota<T: std::convert::Into<std::option::Option<wkt::BoolValue>>>(
557 mut self,
558 v: T,
559 ) -> Self {
560 self.cpu_cfs_quota = v.into();
561 self
562 }
563
564 pub fn set_cpu_cfs_quota_period<T: std::convert::Into<std::string::String>>(
566 mut self,
567 v: T,
568 ) -> Self {
569 self.cpu_cfs_quota_period = v.into();
570 self
571 }
572
573 pub fn set_pod_pids_limit<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
575 self.pod_pids_limit = v.into();
576 self
577 }
578
579 pub fn set_insecure_kubelet_readonly_port_enabled<
581 T: std::convert::Into<std::option::Option<bool>>,
582 >(
583 mut self,
584 v: T,
585 ) -> Self {
586 self.insecure_kubelet_readonly_port_enabled = v.into();
587 self
588 }
589}
590
591impl wkt::message::Message for NodeKubeletConfig {
592 fn typename() -> &'static str {
593 "type.googleapis.com/google.container.v1.NodeKubeletConfig"
594 }
595}
596
597#[serde_with::serde_as]
606#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
607#[serde(default, rename_all = "camelCase")]
608#[non_exhaustive]
609pub struct NodeConfig {
610 #[serde(skip_serializing_if = "std::string::String::is_empty")]
615 pub machine_type: std::string::String,
616
617 #[serde(skip_serializing_if = "wkt::internal::is_default")]
622 pub disk_size_gb: i32,
623
624 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
640 pub oauth_scopes: std::vec::Vec<std::string::String>,
641
642 #[serde(skip_serializing_if = "std::string::String::is_empty")]
646 pub service_account: std::string::String,
647
648 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
681 pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
682
683 #[serde(skip_serializing_if = "std::string::String::is_empty")]
688 pub image_type: std::string::String,
689
690 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
699 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
700
701 #[serde(skip_serializing_if = "wkt::internal::is_default")]
708 pub local_ssd_count: i32,
709
710 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
715 pub tags: std::vec::Vec<std::string::String>,
716
717 #[serde(skip_serializing_if = "wkt::internal::is_default")]
721 pub preemptible: bool,
722
723 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
727 pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
728
729 #[serde(skip_serializing_if = "std::string::String::is_empty")]
734 pub disk_type: std::string::String,
735
736 #[serde(skip_serializing_if = "std::string::String::is_empty")]
744 pub min_cpu_platform: std::string::String,
745
746 #[serde(skip_serializing_if = "std::option::Option::is_none")]
748 pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
749
750 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
755 pub taints: std::vec::Vec<crate::model::NodeTaint>,
756
757 #[serde(skip_serializing_if = "std::option::Option::is_none")]
759 pub sandbox_config: std::option::Option<crate::model::SandboxConfig>,
760
761 #[serde(skip_serializing_if = "std::string::String::is_empty")]
766 pub node_group: std::string::String,
767
768 #[serde(skip_serializing_if = "std::option::Option::is_none")]
773 pub reservation_affinity: std::option::Option<crate::model::ReservationAffinity>,
774
775 #[serde(skip_serializing_if = "std::option::Option::is_none")]
777 pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
778
779 #[serde(skip_serializing_if = "std::option::Option::is_none")]
781 pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
782
783 #[serde(skip_serializing_if = "std::option::Option::is_none")]
785 pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
786
787 #[serde(skip_serializing_if = "std::string::String::is_empty")]
794 pub boot_disk_kms_key: std::string::String,
795
796 #[serde(skip_serializing_if = "std::option::Option::is_none")]
798 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
799
800 #[serde(skip_serializing_if = "std::option::Option::is_none")]
802 pub advanced_machine_features: std::option::Option<crate::model::AdvancedMachineFeatures>,
803
804 #[serde(skip_serializing_if = "std::option::Option::is_none")]
806 pub gvnic: std::option::Option<crate::model::VirtualNIC>,
807
808 #[serde(skip_serializing_if = "wkt::internal::is_default")]
811 pub spot: bool,
812
813 #[serde(skip_serializing_if = "std::option::Option::is_none")]
816 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
817
818 #[serde(skip_serializing_if = "std::option::Option::is_none")]
820 pub fast_socket: std::option::Option<crate::model::FastSocket>,
821
822 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
825 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
826
827 #[serde(skip_serializing_if = "std::option::Option::is_none")]
829 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
830
831 #[serde(skip_serializing_if = "std::option::Option::is_none")]
833 pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
834
835 #[serde(skip_serializing_if = "std::option::Option::is_none")]
837 pub local_nvme_ssd_block_config: std::option::Option<crate::model::LocalNvmeSsdBlockConfig>,
838
839 #[serde(skip_serializing_if = "std::option::Option::is_none")]
842 pub ephemeral_storage_local_ssd_config:
843 std::option::Option<crate::model::EphemeralStorageLocalSsdConfig>,
844
845 #[serde(skip_serializing_if = "std::option::Option::is_none")]
847 pub sole_tenant_config: std::option::Option<crate::model::SoleTenantConfig>,
848
849 #[serde(skip_serializing_if = "std::option::Option::is_none")]
851 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
852
853 #[serde(skip_serializing_if = "std::option::Option::is_none")]
855 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
856
857 #[serde(skip_serializing_if = "wkt::internal::is_default")]
859 pub enable_confidential_storage: bool,
860
861 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
863 pub secondary_boot_disks: std::vec::Vec<crate::model::SecondaryBootDisk>,
864
865 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
867 pub storage_pools: std::vec::Vec<std::string::String>,
868
869 #[serde(skip_serializing_if = "std::option::Option::is_none")]
871 pub secondary_boot_disk_update_strategy:
872 std::option::Option<crate::model::SecondaryBootDiskUpdateStrategy>,
873
874 #[serde(skip_serializing_if = "std::option::Option::is_none")]
877 pub local_ssd_encryption_mode:
878 std::option::Option<crate::model::node_config::LocalSsdEncryptionMode>,
879
880 pub effective_cgroup_mode: crate::model::node_config::EffectiveCgroupMode,
885
886 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
887 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
888}
889
890impl NodeConfig {
891 pub fn new() -> Self {
892 std::default::Default::default()
893 }
894
895 pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
897 self.machine_type = v.into();
898 self
899 }
900
901 pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
903 self.disk_size_gb = v.into();
904 self
905 }
906
907 pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
909 where
910 T: std::iter::IntoIterator<Item = V>,
911 V: std::convert::Into<std::string::String>,
912 {
913 use std::iter::Iterator;
914 self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
915 self
916 }
917
918 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
920 self.service_account = v.into();
921 self
922 }
923
924 pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
926 where
927 T: std::iter::IntoIterator<Item = (K, V)>,
928 K: std::convert::Into<std::string::String>,
929 V: std::convert::Into<std::string::String>,
930 {
931 use std::iter::Iterator;
932 self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
933 self
934 }
935
936 pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
938 self.image_type = v.into();
939 self
940 }
941
942 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
944 where
945 T: std::iter::IntoIterator<Item = (K, V)>,
946 K: std::convert::Into<std::string::String>,
947 V: std::convert::Into<std::string::String>,
948 {
949 use std::iter::Iterator;
950 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
951 self
952 }
953
954 pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
956 self.local_ssd_count = v.into();
957 self
958 }
959
960 pub fn set_tags<T, V>(mut self, v: T) -> Self
962 where
963 T: std::iter::IntoIterator<Item = V>,
964 V: std::convert::Into<std::string::String>,
965 {
966 use std::iter::Iterator;
967 self.tags = v.into_iter().map(|i| i.into()).collect();
968 self
969 }
970
971 pub fn set_preemptible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
973 self.preemptible = v.into();
974 self
975 }
976
977 pub fn set_accelerators<T, V>(mut self, v: T) -> Self
979 where
980 T: std::iter::IntoIterator<Item = V>,
981 V: std::convert::Into<crate::model::AcceleratorConfig>,
982 {
983 use std::iter::Iterator;
984 self.accelerators = v.into_iter().map(|i| i.into()).collect();
985 self
986 }
987
988 pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
990 self.disk_type = v.into();
991 self
992 }
993
994 pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
996 mut self,
997 v: T,
998 ) -> Self {
999 self.min_cpu_platform = v.into();
1000 self
1001 }
1002
1003 pub fn set_workload_metadata_config<
1005 T: std::convert::Into<std::option::Option<crate::model::WorkloadMetadataConfig>>,
1006 >(
1007 mut self,
1008 v: T,
1009 ) -> Self {
1010 self.workload_metadata_config = v.into();
1011 self
1012 }
1013
1014 pub fn set_taints<T, V>(mut self, v: T) -> Self
1016 where
1017 T: std::iter::IntoIterator<Item = V>,
1018 V: std::convert::Into<crate::model::NodeTaint>,
1019 {
1020 use std::iter::Iterator;
1021 self.taints = v.into_iter().map(|i| i.into()).collect();
1022 self
1023 }
1024
1025 pub fn set_sandbox_config<
1027 T: std::convert::Into<std::option::Option<crate::model::SandboxConfig>>,
1028 >(
1029 mut self,
1030 v: T,
1031 ) -> Self {
1032 self.sandbox_config = v.into();
1033 self
1034 }
1035
1036 pub fn set_node_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1038 self.node_group = v.into();
1039 self
1040 }
1041
1042 pub fn set_reservation_affinity<
1044 T: std::convert::Into<std::option::Option<crate::model::ReservationAffinity>>,
1045 >(
1046 mut self,
1047 v: T,
1048 ) -> Self {
1049 self.reservation_affinity = v.into();
1050 self
1051 }
1052
1053 pub fn set_shielded_instance_config<
1055 T: std::convert::Into<std::option::Option<crate::model::ShieldedInstanceConfig>>,
1056 >(
1057 mut self,
1058 v: T,
1059 ) -> Self {
1060 self.shielded_instance_config = v.into();
1061 self
1062 }
1063
1064 pub fn set_linux_node_config<
1066 T: std::convert::Into<std::option::Option<crate::model::LinuxNodeConfig>>,
1067 >(
1068 mut self,
1069 v: T,
1070 ) -> Self {
1071 self.linux_node_config = v.into();
1072 self
1073 }
1074
1075 pub fn set_kubelet_config<
1077 T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
1078 >(
1079 mut self,
1080 v: T,
1081 ) -> Self {
1082 self.kubelet_config = v.into();
1083 self
1084 }
1085
1086 pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
1088 mut self,
1089 v: T,
1090 ) -> Self {
1091 self.boot_disk_kms_key = v.into();
1092 self
1093 }
1094
1095 pub fn set_gcfs_config<T: std::convert::Into<std::option::Option<crate::model::GcfsConfig>>>(
1097 mut self,
1098 v: T,
1099 ) -> Self {
1100 self.gcfs_config = v.into();
1101 self
1102 }
1103
1104 pub fn set_advanced_machine_features<
1106 T: std::convert::Into<std::option::Option<crate::model::AdvancedMachineFeatures>>,
1107 >(
1108 mut self,
1109 v: T,
1110 ) -> Self {
1111 self.advanced_machine_features = v.into();
1112 self
1113 }
1114
1115 pub fn set_gvnic<T: std::convert::Into<std::option::Option<crate::model::VirtualNIC>>>(
1117 mut self,
1118 v: T,
1119 ) -> Self {
1120 self.gvnic = v.into();
1121 self
1122 }
1123
1124 pub fn set_spot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1126 self.spot = v.into();
1127 self
1128 }
1129
1130 pub fn set_confidential_nodes<
1132 T: std::convert::Into<std::option::Option<crate::model::ConfidentialNodes>>,
1133 >(
1134 mut self,
1135 v: T,
1136 ) -> Self {
1137 self.confidential_nodes = v.into();
1138 self
1139 }
1140
1141 pub fn set_fast_socket<T: std::convert::Into<std::option::Option<crate::model::FastSocket>>>(
1143 mut self,
1144 v: T,
1145 ) -> Self {
1146 self.fast_socket = v.into();
1147 self
1148 }
1149
1150 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
1152 where
1153 T: std::iter::IntoIterator<Item = (K, V)>,
1154 K: std::convert::Into<std::string::String>,
1155 V: std::convert::Into<std::string::String>,
1156 {
1157 use std::iter::Iterator;
1158 self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1159 self
1160 }
1161
1162 pub fn set_logging_config<
1164 T: std::convert::Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
1165 >(
1166 mut self,
1167 v: T,
1168 ) -> Self {
1169 self.logging_config = v.into();
1170 self
1171 }
1172
1173 pub fn set_windows_node_config<
1175 T: std::convert::Into<std::option::Option<crate::model::WindowsNodeConfig>>,
1176 >(
1177 mut self,
1178 v: T,
1179 ) -> Self {
1180 self.windows_node_config = v.into();
1181 self
1182 }
1183
1184 pub fn set_local_nvme_ssd_block_config<
1186 T: std::convert::Into<std::option::Option<crate::model::LocalNvmeSsdBlockConfig>>,
1187 >(
1188 mut self,
1189 v: T,
1190 ) -> Self {
1191 self.local_nvme_ssd_block_config = v.into();
1192 self
1193 }
1194
1195 pub fn set_ephemeral_storage_local_ssd_config<
1197 T: std::convert::Into<std::option::Option<crate::model::EphemeralStorageLocalSsdConfig>>,
1198 >(
1199 mut self,
1200 v: T,
1201 ) -> Self {
1202 self.ephemeral_storage_local_ssd_config = v.into();
1203 self
1204 }
1205
1206 pub fn set_sole_tenant_config<
1208 T: std::convert::Into<std::option::Option<crate::model::SoleTenantConfig>>,
1209 >(
1210 mut self,
1211 v: T,
1212 ) -> Self {
1213 self.sole_tenant_config = v.into();
1214 self
1215 }
1216
1217 pub fn set_containerd_config<
1219 T: std::convert::Into<std::option::Option<crate::model::ContainerdConfig>>,
1220 >(
1221 mut self,
1222 v: T,
1223 ) -> Self {
1224 self.containerd_config = v.into();
1225 self
1226 }
1227
1228 pub fn set_resource_manager_tags<
1230 T: std::convert::Into<std::option::Option<crate::model::ResourceManagerTags>>,
1231 >(
1232 mut self,
1233 v: T,
1234 ) -> Self {
1235 self.resource_manager_tags = v.into();
1236 self
1237 }
1238
1239 pub fn set_enable_confidential_storage<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1241 self.enable_confidential_storage = v.into();
1242 self
1243 }
1244
1245 pub fn set_secondary_boot_disks<T, V>(mut self, v: T) -> Self
1247 where
1248 T: std::iter::IntoIterator<Item = V>,
1249 V: std::convert::Into<crate::model::SecondaryBootDisk>,
1250 {
1251 use std::iter::Iterator;
1252 self.secondary_boot_disks = v.into_iter().map(|i| i.into()).collect();
1253 self
1254 }
1255
1256 pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
1258 where
1259 T: std::iter::IntoIterator<Item = V>,
1260 V: std::convert::Into<std::string::String>,
1261 {
1262 use std::iter::Iterator;
1263 self.storage_pools = v.into_iter().map(|i| i.into()).collect();
1264 self
1265 }
1266
1267 pub fn set_secondary_boot_disk_update_strategy<
1269 T: std::convert::Into<std::option::Option<crate::model::SecondaryBootDiskUpdateStrategy>>,
1270 >(
1271 mut self,
1272 v: T,
1273 ) -> Self {
1274 self.secondary_boot_disk_update_strategy = v.into();
1275 self
1276 }
1277
1278 pub fn set_local_ssd_encryption_mode<
1280 T: std::convert::Into<std::option::Option<crate::model::node_config::LocalSsdEncryptionMode>>,
1281 >(
1282 mut self,
1283 v: T,
1284 ) -> Self {
1285 self.local_ssd_encryption_mode = v.into();
1286 self
1287 }
1288
1289 pub fn set_effective_cgroup_mode<
1291 T: std::convert::Into<crate::model::node_config::EffectiveCgroupMode>,
1292 >(
1293 mut self,
1294 v: T,
1295 ) -> Self {
1296 self.effective_cgroup_mode = v.into();
1297 self
1298 }
1299}
1300
1301impl wkt::message::Message for NodeConfig {
1302 fn typename() -> &'static str {
1303 "type.googleapis.com/google.container.v1.NodeConfig"
1304 }
1305}
1306
1307pub mod node_config {
1309 #[allow(unused_imports)]
1310 use super::*;
1311
1312 #[derive(Clone, Debug, PartialEq)]
1329 #[non_exhaustive]
1330 pub enum LocalSsdEncryptionMode {
1331 Unspecified,
1335 StandardEncryption,
1339 EphemeralKeyEncryption,
1344 UnknownValue(local_ssd_encryption_mode::UnknownValue),
1349 }
1350
1351 #[doc(hidden)]
1352 pub mod local_ssd_encryption_mode {
1353 #[allow(unused_imports)]
1354 use super::*;
1355 #[derive(Clone, Debug, PartialEq)]
1356 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1357 }
1358
1359 impl LocalSsdEncryptionMode {
1360 pub fn value(&self) -> std::option::Option<i32> {
1365 match self {
1366 Self::Unspecified => std::option::Option::Some(0),
1367 Self::StandardEncryption => std::option::Option::Some(1),
1368 Self::EphemeralKeyEncryption => std::option::Option::Some(2),
1369 Self::UnknownValue(u) => u.0.value(),
1370 }
1371 }
1372
1373 pub fn name(&self) -> std::option::Option<&str> {
1378 match self {
1379 Self::Unspecified => {
1380 std::option::Option::Some("LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED")
1381 }
1382 Self::StandardEncryption => std::option::Option::Some("STANDARD_ENCRYPTION"),
1383 Self::EphemeralKeyEncryption => {
1384 std::option::Option::Some("EPHEMERAL_KEY_ENCRYPTION")
1385 }
1386 Self::UnknownValue(u) => u.0.name(),
1387 }
1388 }
1389 }
1390
1391 impl std::default::Default for LocalSsdEncryptionMode {
1392 fn default() -> Self {
1393 use std::convert::From;
1394 Self::from(0)
1395 }
1396 }
1397
1398 impl std::fmt::Display for LocalSsdEncryptionMode {
1399 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1400 wkt::internal::display_enum(f, self.name(), self.value())
1401 }
1402 }
1403
1404 impl std::convert::From<i32> for LocalSsdEncryptionMode {
1405 fn from(value: i32) -> Self {
1406 match value {
1407 0 => Self::Unspecified,
1408 1 => Self::StandardEncryption,
1409 2 => Self::EphemeralKeyEncryption,
1410 _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
1411 wkt::internal::UnknownEnumValue::Integer(value),
1412 )),
1413 }
1414 }
1415 }
1416
1417 impl std::convert::From<&str> for LocalSsdEncryptionMode {
1418 fn from(value: &str) -> Self {
1419 use std::string::ToString;
1420 match value {
1421 "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED" => Self::Unspecified,
1422 "STANDARD_ENCRYPTION" => Self::StandardEncryption,
1423 "EPHEMERAL_KEY_ENCRYPTION" => Self::EphemeralKeyEncryption,
1424 _ => Self::UnknownValue(local_ssd_encryption_mode::UnknownValue(
1425 wkt::internal::UnknownEnumValue::String(value.to_string()),
1426 )),
1427 }
1428 }
1429 }
1430
1431 impl serde::ser::Serialize for LocalSsdEncryptionMode {
1432 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1433 where
1434 S: serde::Serializer,
1435 {
1436 match self {
1437 Self::Unspecified => serializer.serialize_i32(0),
1438 Self::StandardEncryption => serializer.serialize_i32(1),
1439 Self::EphemeralKeyEncryption => serializer.serialize_i32(2),
1440 Self::UnknownValue(u) => u.0.serialize(serializer),
1441 }
1442 }
1443 }
1444
1445 impl<'de> serde::de::Deserialize<'de> for LocalSsdEncryptionMode {
1446 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1447 where
1448 D: serde::Deserializer<'de>,
1449 {
1450 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocalSsdEncryptionMode>::new(
1451 ".google.container.v1.NodeConfig.LocalSsdEncryptionMode",
1452 ))
1453 }
1454 }
1455
1456 #[derive(Clone, Debug, PartialEq)]
1472 #[non_exhaustive]
1473 pub enum EffectiveCgroupMode {
1474 Unspecified,
1477 V1,
1480 V2,
1483 UnknownValue(effective_cgroup_mode::UnknownValue),
1488 }
1489
1490 #[doc(hidden)]
1491 pub mod effective_cgroup_mode {
1492 #[allow(unused_imports)]
1493 use super::*;
1494 #[derive(Clone, Debug, PartialEq)]
1495 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1496 }
1497
1498 impl EffectiveCgroupMode {
1499 pub fn value(&self) -> std::option::Option<i32> {
1504 match self {
1505 Self::Unspecified => std::option::Option::Some(0),
1506 Self::V1 => std::option::Option::Some(1),
1507 Self::V2 => std::option::Option::Some(2),
1508 Self::UnknownValue(u) => u.0.value(),
1509 }
1510 }
1511
1512 pub fn name(&self) -> std::option::Option<&str> {
1517 match self {
1518 Self::Unspecified => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_UNSPECIFIED"),
1519 Self::V1 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V1"),
1520 Self::V2 => std::option::Option::Some("EFFECTIVE_CGROUP_MODE_V2"),
1521 Self::UnknownValue(u) => u.0.name(),
1522 }
1523 }
1524 }
1525
1526 impl std::default::Default for EffectiveCgroupMode {
1527 fn default() -> Self {
1528 use std::convert::From;
1529 Self::from(0)
1530 }
1531 }
1532
1533 impl std::fmt::Display for EffectiveCgroupMode {
1534 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1535 wkt::internal::display_enum(f, self.name(), self.value())
1536 }
1537 }
1538
1539 impl std::convert::From<i32> for EffectiveCgroupMode {
1540 fn from(value: i32) -> Self {
1541 match value {
1542 0 => Self::Unspecified,
1543 1 => Self::V1,
1544 2 => Self::V2,
1545 _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
1546 wkt::internal::UnknownEnumValue::Integer(value),
1547 )),
1548 }
1549 }
1550 }
1551
1552 impl std::convert::From<&str> for EffectiveCgroupMode {
1553 fn from(value: &str) -> Self {
1554 use std::string::ToString;
1555 match value {
1556 "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" => Self::Unspecified,
1557 "EFFECTIVE_CGROUP_MODE_V1" => Self::V1,
1558 "EFFECTIVE_CGROUP_MODE_V2" => Self::V2,
1559 _ => Self::UnknownValue(effective_cgroup_mode::UnknownValue(
1560 wkt::internal::UnknownEnumValue::String(value.to_string()),
1561 )),
1562 }
1563 }
1564 }
1565
1566 impl serde::ser::Serialize for EffectiveCgroupMode {
1567 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1568 where
1569 S: serde::Serializer,
1570 {
1571 match self {
1572 Self::Unspecified => serializer.serialize_i32(0),
1573 Self::V1 => serializer.serialize_i32(1),
1574 Self::V2 => serializer.serialize_i32(2),
1575 Self::UnknownValue(u) => u.0.serialize(serializer),
1576 }
1577 }
1578 }
1579
1580 impl<'de> serde::de::Deserialize<'de> for EffectiveCgroupMode {
1581 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1582 where
1583 D: serde::Deserializer<'de>,
1584 {
1585 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EffectiveCgroupMode>::new(
1586 ".google.container.v1.NodeConfig.EffectiveCgroupMode",
1587 ))
1588 }
1589 }
1590}
1591
1592#[serde_with::serde_as]
1594#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1595#[serde(default, rename_all = "camelCase")]
1596#[non_exhaustive]
1597pub struct AdvancedMachineFeatures {
1598 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1602 #[serde_as(as = "std::option::Option<serde_with::DisplayFromStr>")]
1603 pub threads_per_core: std::option::Option<i64>,
1604
1605 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1607 pub enable_nested_virtualization: std::option::Option<bool>,
1608
1609 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1610 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1611}
1612
1613impl AdvancedMachineFeatures {
1614 pub fn new() -> Self {
1615 std::default::Default::default()
1616 }
1617
1618 pub fn set_threads_per_core<T: std::convert::Into<std::option::Option<i64>>>(
1620 mut self,
1621 v: T,
1622 ) -> Self {
1623 self.threads_per_core = v.into();
1624 self
1625 }
1626
1627 pub fn set_enable_nested_virtualization<T: std::convert::Into<std::option::Option<bool>>>(
1629 mut self,
1630 v: T,
1631 ) -> Self {
1632 self.enable_nested_virtualization = v.into();
1633 self
1634 }
1635}
1636
1637impl wkt::message::Message for AdvancedMachineFeatures {
1638 fn typename() -> &'static str {
1639 "type.googleapis.com/google.container.v1.AdvancedMachineFeatures"
1640 }
1641}
1642
1643#[serde_with::serde_as]
1645#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1646#[serde(default, rename_all = "camelCase")]
1647#[non_exhaustive]
1648pub struct NodeNetworkConfig {
1649 #[serde(skip_serializing_if = "wkt::internal::is_default")]
1661 pub create_pod_range: bool,
1662
1663 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1672 pub pod_range: std::string::String,
1673
1674 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1691 pub pod_ipv4_cidr_block: std::string::String,
1692
1693 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1697 pub enable_private_nodes: std::option::Option<bool>,
1698
1699 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1701 pub network_performance_config:
1702 std::option::Option<crate::model::node_network_config::NetworkPerformanceConfig>,
1703
1704 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1717 pub pod_cidr_overprovision_config:
1718 std::option::Option<crate::model::PodCIDROverprovisionConfig>,
1719
1720 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1723 pub additional_node_network_configs: std::vec::Vec<crate::model::AdditionalNodeNetworkConfig>,
1724
1725 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1728 pub additional_pod_network_configs: std::vec::Vec<crate::model::AdditionalPodNetworkConfig>,
1729
1730 #[serde(skip_serializing_if = "wkt::internal::is_default")]
1734 #[serde_as(as = "wkt::internal::F64")]
1735 pub pod_ipv4_range_utilization: f64,
1736
1737 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1738 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1739}
1740
1741impl NodeNetworkConfig {
1742 pub fn new() -> Self {
1743 std::default::Default::default()
1744 }
1745
1746 pub fn set_create_pod_range<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1748 self.create_pod_range = v.into();
1749 self
1750 }
1751
1752 pub fn set_pod_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1754 self.pod_range = v.into();
1755 self
1756 }
1757
1758 pub fn set_pod_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
1760 mut self,
1761 v: T,
1762 ) -> Self {
1763 self.pod_ipv4_cidr_block = v.into();
1764 self
1765 }
1766
1767 pub fn set_enable_private_nodes<T: std::convert::Into<std::option::Option<bool>>>(
1769 mut self,
1770 v: T,
1771 ) -> Self {
1772 self.enable_private_nodes = v.into();
1773 self
1774 }
1775
1776 pub fn set_network_performance_config<
1778 T: std::convert::Into<
1779 std::option::Option<crate::model::node_network_config::NetworkPerformanceConfig>,
1780 >,
1781 >(
1782 mut self,
1783 v: T,
1784 ) -> Self {
1785 self.network_performance_config = v.into();
1786 self
1787 }
1788
1789 pub fn set_pod_cidr_overprovision_config<
1791 T: std::convert::Into<std::option::Option<crate::model::PodCIDROverprovisionConfig>>,
1792 >(
1793 mut self,
1794 v: T,
1795 ) -> Self {
1796 self.pod_cidr_overprovision_config = v.into();
1797 self
1798 }
1799
1800 pub fn set_additional_node_network_configs<T, V>(mut self, v: T) -> Self
1802 where
1803 T: std::iter::IntoIterator<Item = V>,
1804 V: std::convert::Into<crate::model::AdditionalNodeNetworkConfig>,
1805 {
1806 use std::iter::Iterator;
1807 self.additional_node_network_configs = v.into_iter().map(|i| i.into()).collect();
1808 self
1809 }
1810
1811 pub fn set_additional_pod_network_configs<T, V>(mut self, v: T) -> Self
1813 where
1814 T: std::iter::IntoIterator<Item = V>,
1815 V: std::convert::Into<crate::model::AdditionalPodNetworkConfig>,
1816 {
1817 use std::iter::Iterator;
1818 self.additional_pod_network_configs = v.into_iter().map(|i| i.into()).collect();
1819 self
1820 }
1821
1822 pub fn set_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
1824 self.pod_ipv4_range_utilization = v.into();
1825 self
1826 }
1827}
1828
1829impl wkt::message::Message for NodeNetworkConfig {
1830 fn typename() -> &'static str {
1831 "type.googleapis.com/google.container.v1.NodeNetworkConfig"
1832 }
1833}
1834
1835pub mod node_network_config {
1837 #[allow(unused_imports)]
1838 use super::*;
1839
1840 #[serde_with::serde_as]
1842 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1843 #[serde(default, rename_all = "camelCase")]
1844 #[non_exhaustive]
1845 pub struct NetworkPerformanceConfig {
1846 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1848 pub total_egress_bandwidth_tier: std::option::Option<
1849 crate::model::node_network_config::network_performance_config::Tier,
1850 >,
1851
1852 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1853 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1854 }
1855
1856 impl NetworkPerformanceConfig {
1857 pub fn new() -> Self {
1858 std::default::Default::default()
1859 }
1860
1861 pub fn set_total_egress_bandwidth_tier<
1863 T: std::convert::Into<
1864 std::option::Option<
1865 crate::model::node_network_config::network_performance_config::Tier,
1866 >,
1867 >,
1868 >(
1869 mut self,
1870 v: T,
1871 ) -> Self {
1872 self.total_egress_bandwidth_tier = v.into();
1873 self
1874 }
1875 }
1876
1877 impl wkt::message::Message for NetworkPerformanceConfig {
1878 fn typename() -> &'static str {
1879 "type.googleapis.com/google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig"
1880 }
1881 }
1882
1883 pub mod network_performance_config {
1885 #[allow(unused_imports)]
1886 use super::*;
1887
1888 #[derive(Clone, Debug, PartialEq)]
1904 #[non_exhaustive]
1905 pub enum Tier {
1906 Unspecified,
1908 _1,
1910 UnknownValue(tier::UnknownValue),
1915 }
1916
1917 #[doc(hidden)]
1918 pub mod tier {
1919 #[allow(unused_imports)]
1920 use super::*;
1921 #[derive(Clone, Debug, PartialEq)]
1922 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1923 }
1924
1925 impl Tier {
1926 pub fn value(&self) -> std::option::Option<i32> {
1931 match self {
1932 Self::Unspecified => std::option::Option::Some(0),
1933 Self::_1 => std::option::Option::Some(1),
1934 Self::UnknownValue(u) => u.0.value(),
1935 }
1936 }
1937
1938 pub fn name(&self) -> std::option::Option<&str> {
1943 match self {
1944 Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
1945 Self::_1 => std::option::Option::Some("TIER_1"),
1946 Self::UnknownValue(u) => u.0.name(),
1947 }
1948 }
1949 }
1950
1951 impl std::default::Default for Tier {
1952 fn default() -> Self {
1953 use std::convert::From;
1954 Self::from(0)
1955 }
1956 }
1957
1958 impl std::fmt::Display for Tier {
1959 fn fmt(
1960 &self,
1961 f: &mut std::fmt::Formatter<'_>,
1962 ) -> std::result::Result<(), std::fmt::Error> {
1963 wkt::internal::display_enum(f, self.name(), self.value())
1964 }
1965 }
1966
1967 impl std::convert::From<i32> for Tier {
1968 fn from(value: i32) -> Self {
1969 match value {
1970 0 => Self::Unspecified,
1971 1 => Self::_1,
1972 _ => Self::UnknownValue(tier::UnknownValue(
1973 wkt::internal::UnknownEnumValue::Integer(value),
1974 )),
1975 }
1976 }
1977 }
1978
1979 impl std::convert::From<&str> for Tier {
1980 fn from(value: &str) -> Self {
1981 use std::string::ToString;
1982 match value {
1983 "TIER_UNSPECIFIED" => Self::Unspecified,
1984 "TIER_1" => Self::_1,
1985 _ => Self::UnknownValue(tier::UnknownValue(
1986 wkt::internal::UnknownEnumValue::String(value.to_string()),
1987 )),
1988 }
1989 }
1990 }
1991
1992 impl serde::ser::Serialize for Tier {
1993 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1994 where
1995 S: serde::Serializer,
1996 {
1997 match self {
1998 Self::Unspecified => serializer.serialize_i32(0),
1999 Self::_1 => serializer.serialize_i32(1),
2000 Self::UnknownValue(u) => u.0.serialize(serializer),
2001 }
2002 }
2003 }
2004
2005 impl<'de> serde::de::Deserialize<'de> for Tier {
2006 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2007 where
2008 D: serde::Deserializer<'de>,
2009 {
2010 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
2011 ".google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier",
2012 ))
2013 }
2014 }
2015 }
2016}
2017
2018#[serde_with::serde_as]
2021#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2022#[serde(default, rename_all = "camelCase")]
2023#[non_exhaustive]
2024pub struct AdditionalNodeNetworkConfig {
2025 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2027 pub network: std::string::String,
2028
2029 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2031 pub subnetwork: std::string::String,
2032
2033 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2034 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2035}
2036
2037impl AdditionalNodeNetworkConfig {
2038 pub fn new() -> Self {
2039 std::default::Default::default()
2040 }
2041
2042 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2044 self.network = v.into();
2045 self
2046 }
2047
2048 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2050 self.subnetwork = v.into();
2051 self
2052 }
2053}
2054
2055impl wkt::message::Message for AdditionalNodeNetworkConfig {
2056 fn typename() -> &'static str {
2057 "type.googleapis.com/google.container.v1.AdditionalNodeNetworkConfig"
2058 }
2059}
2060
2061#[serde_with::serde_as]
2064#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2065#[serde(default, rename_all = "camelCase")]
2066#[non_exhaustive]
2067pub struct AdditionalPodNetworkConfig {
2068 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2070 pub subnetwork: std::string::String,
2071
2072 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2075 pub secondary_pod_range: std::string::String,
2076
2077 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2079 pub max_pods_per_node: std::option::Option<crate::model::MaxPodsConstraint>,
2080
2081 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2082 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2083}
2084
2085impl AdditionalPodNetworkConfig {
2086 pub fn new() -> Self {
2087 std::default::Default::default()
2088 }
2089
2090 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2092 self.subnetwork = v.into();
2093 self
2094 }
2095
2096 pub fn set_secondary_pod_range<T: std::convert::Into<std::string::String>>(
2098 mut self,
2099 v: T,
2100 ) -> Self {
2101 self.secondary_pod_range = v.into();
2102 self
2103 }
2104
2105 pub fn set_max_pods_per_node<
2107 T: std::convert::Into<std::option::Option<crate::model::MaxPodsConstraint>>,
2108 >(
2109 mut self,
2110 v: T,
2111 ) -> Self {
2112 self.max_pods_per_node = v.into();
2113 self
2114 }
2115}
2116
2117impl wkt::message::Message for AdditionalPodNetworkConfig {
2118 fn typename() -> &'static str {
2119 "type.googleapis.com/google.container.v1.AdditionalPodNetworkConfig"
2120 }
2121}
2122
2123#[serde_with::serde_as]
2125#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2126#[serde(default, rename_all = "camelCase")]
2127#[non_exhaustive]
2128pub struct ShieldedInstanceConfig {
2129 #[serde(skip_serializing_if = "wkt::internal::is_default")]
2135 pub enable_secure_boot: bool,
2136
2137 #[serde(skip_serializing_if = "wkt::internal::is_default")]
2144 pub enable_integrity_monitoring: bool,
2145
2146 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2147 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2148}
2149
2150impl ShieldedInstanceConfig {
2151 pub fn new() -> Self {
2152 std::default::Default::default()
2153 }
2154
2155 pub fn set_enable_secure_boot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2157 self.enable_secure_boot = v.into();
2158 self
2159 }
2160
2161 pub fn set_enable_integrity_monitoring<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2163 self.enable_integrity_monitoring = v.into();
2164 self
2165 }
2166}
2167
2168impl wkt::message::Message for ShieldedInstanceConfig {
2169 fn typename() -> &'static str {
2170 "type.googleapis.com/google.container.v1.ShieldedInstanceConfig"
2171 }
2172}
2173
2174#[serde_with::serde_as]
2176#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2177#[serde(default, rename_all = "camelCase")]
2178#[non_exhaustive]
2179pub struct SandboxConfig {
2180 #[serde(rename = "type")]
2182 pub r#type: crate::model::sandbox_config::Type,
2183
2184 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2185 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2186}
2187
2188impl SandboxConfig {
2189 pub fn new() -> Self {
2190 std::default::Default::default()
2191 }
2192
2193 pub fn set_type<T: std::convert::Into<crate::model::sandbox_config::Type>>(
2195 mut self,
2196 v: T,
2197 ) -> Self {
2198 self.r#type = v.into();
2199 self
2200 }
2201}
2202
2203impl wkt::message::Message for SandboxConfig {
2204 fn typename() -> &'static str {
2205 "type.googleapis.com/google.container.v1.SandboxConfig"
2206 }
2207}
2208
2209pub mod sandbox_config {
2211 #[allow(unused_imports)]
2212 use super::*;
2213
2214 #[derive(Clone, Debug, PartialEq)]
2230 #[non_exhaustive]
2231 pub enum Type {
2232 Unspecified,
2234 Gvisor,
2236 UnknownValue(r#type::UnknownValue),
2241 }
2242
2243 #[doc(hidden)]
2244 pub mod r#type {
2245 #[allow(unused_imports)]
2246 use super::*;
2247 #[derive(Clone, Debug, PartialEq)]
2248 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2249 }
2250
2251 impl Type {
2252 pub fn value(&self) -> std::option::Option<i32> {
2257 match self {
2258 Self::Unspecified => std::option::Option::Some(0),
2259 Self::Gvisor => std::option::Option::Some(1),
2260 Self::UnknownValue(u) => u.0.value(),
2261 }
2262 }
2263
2264 pub fn name(&self) -> std::option::Option<&str> {
2269 match self {
2270 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
2271 Self::Gvisor => std::option::Option::Some("GVISOR"),
2272 Self::UnknownValue(u) => u.0.name(),
2273 }
2274 }
2275 }
2276
2277 impl std::default::Default for Type {
2278 fn default() -> Self {
2279 use std::convert::From;
2280 Self::from(0)
2281 }
2282 }
2283
2284 impl std::fmt::Display for Type {
2285 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2286 wkt::internal::display_enum(f, self.name(), self.value())
2287 }
2288 }
2289
2290 impl std::convert::From<i32> for Type {
2291 fn from(value: i32) -> Self {
2292 match value {
2293 0 => Self::Unspecified,
2294 1 => Self::Gvisor,
2295 _ => Self::UnknownValue(r#type::UnknownValue(
2296 wkt::internal::UnknownEnumValue::Integer(value),
2297 )),
2298 }
2299 }
2300 }
2301
2302 impl std::convert::From<&str> for Type {
2303 fn from(value: &str) -> Self {
2304 use std::string::ToString;
2305 match value {
2306 "UNSPECIFIED" => Self::Unspecified,
2307 "GVISOR" => Self::Gvisor,
2308 _ => Self::UnknownValue(r#type::UnknownValue(
2309 wkt::internal::UnknownEnumValue::String(value.to_string()),
2310 )),
2311 }
2312 }
2313 }
2314
2315 impl serde::ser::Serialize for Type {
2316 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2317 where
2318 S: serde::Serializer,
2319 {
2320 match self {
2321 Self::Unspecified => serializer.serialize_i32(0),
2322 Self::Gvisor => serializer.serialize_i32(1),
2323 Self::UnknownValue(u) => u.0.serialize(serializer),
2324 }
2325 }
2326 }
2327
2328 impl<'de> serde::de::Deserialize<'de> for Type {
2329 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2330 where
2331 D: serde::Deserializer<'de>,
2332 {
2333 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
2334 ".google.container.v1.SandboxConfig.Type",
2335 ))
2336 }
2337 }
2338}
2339
2340#[serde_with::serde_as]
2343#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2344#[serde(default, rename_all = "camelCase")]
2345#[non_exhaustive]
2346pub struct GcfsConfig {
2347 #[serde(skip_serializing_if = "wkt::internal::is_default")]
2349 pub enabled: bool,
2350
2351 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2352 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2353}
2354
2355impl GcfsConfig {
2356 pub fn new() -> Self {
2357 std::default::Default::default()
2358 }
2359
2360 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2362 self.enabled = v.into();
2363 self
2364 }
2365}
2366
2367impl wkt::message::Message for GcfsConfig {
2368 fn typename() -> &'static str {
2369 "type.googleapis.com/google.container.v1.GcfsConfig"
2370 }
2371}
2372
2373#[serde_with::serde_as]
2377#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2378#[serde(default, rename_all = "camelCase")]
2379#[non_exhaustive]
2380pub struct ReservationAffinity {
2381 pub consume_reservation_type: crate::model::reservation_affinity::Type,
2383
2384 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2389 pub key: std::string::String,
2390
2391 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2393 pub values: std::vec::Vec<std::string::String>,
2394
2395 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2396 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2397}
2398
2399impl ReservationAffinity {
2400 pub fn new() -> Self {
2401 std::default::Default::default()
2402 }
2403
2404 pub fn set_consume_reservation_type<
2406 T: std::convert::Into<crate::model::reservation_affinity::Type>,
2407 >(
2408 mut self,
2409 v: T,
2410 ) -> Self {
2411 self.consume_reservation_type = v.into();
2412 self
2413 }
2414
2415 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2417 self.key = v.into();
2418 self
2419 }
2420
2421 pub fn set_values<T, V>(mut self, v: T) -> Self
2423 where
2424 T: std::iter::IntoIterator<Item = V>,
2425 V: std::convert::Into<std::string::String>,
2426 {
2427 use std::iter::Iterator;
2428 self.values = v.into_iter().map(|i| i.into()).collect();
2429 self
2430 }
2431}
2432
2433impl wkt::message::Message for ReservationAffinity {
2434 fn typename() -> &'static str {
2435 "type.googleapis.com/google.container.v1.ReservationAffinity"
2436 }
2437}
2438
2439pub mod reservation_affinity {
2441 #[allow(unused_imports)]
2442 use super::*;
2443
2444 #[derive(Clone, Debug, PartialEq)]
2460 #[non_exhaustive]
2461 pub enum Type {
2462 Unspecified,
2464 NoReservation,
2466 AnyReservation,
2468 SpecificReservation,
2471 UnknownValue(r#type::UnknownValue),
2476 }
2477
2478 #[doc(hidden)]
2479 pub mod r#type {
2480 #[allow(unused_imports)]
2481 use super::*;
2482 #[derive(Clone, Debug, PartialEq)]
2483 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2484 }
2485
2486 impl Type {
2487 pub fn value(&self) -> std::option::Option<i32> {
2492 match self {
2493 Self::Unspecified => std::option::Option::Some(0),
2494 Self::NoReservation => std::option::Option::Some(1),
2495 Self::AnyReservation => std::option::Option::Some(2),
2496 Self::SpecificReservation => std::option::Option::Some(3),
2497 Self::UnknownValue(u) => u.0.value(),
2498 }
2499 }
2500
2501 pub fn name(&self) -> std::option::Option<&str> {
2506 match self {
2507 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
2508 Self::NoReservation => std::option::Option::Some("NO_RESERVATION"),
2509 Self::AnyReservation => std::option::Option::Some("ANY_RESERVATION"),
2510 Self::SpecificReservation => std::option::Option::Some("SPECIFIC_RESERVATION"),
2511 Self::UnknownValue(u) => u.0.name(),
2512 }
2513 }
2514 }
2515
2516 impl std::default::Default for Type {
2517 fn default() -> Self {
2518 use std::convert::From;
2519 Self::from(0)
2520 }
2521 }
2522
2523 impl std::fmt::Display for Type {
2524 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2525 wkt::internal::display_enum(f, self.name(), self.value())
2526 }
2527 }
2528
2529 impl std::convert::From<i32> for Type {
2530 fn from(value: i32) -> Self {
2531 match value {
2532 0 => Self::Unspecified,
2533 1 => Self::NoReservation,
2534 2 => Self::AnyReservation,
2535 3 => Self::SpecificReservation,
2536 _ => Self::UnknownValue(r#type::UnknownValue(
2537 wkt::internal::UnknownEnumValue::Integer(value),
2538 )),
2539 }
2540 }
2541 }
2542
2543 impl std::convert::From<&str> for Type {
2544 fn from(value: &str) -> Self {
2545 use std::string::ToString;
2546 match value {
2547 "UNSPECIFIED" => Self::Unspecified,
2548 "NO_RESERVATION" => Self::NoReservation,
2549 "ANY_RESERVATION" => Self::AnyReservation,
2550 "SPECIFIC_RESERVATION" => Self::SpecificReservation,
2551 _ => Self::UnknownValue(r#type::UnknownValue(
2552 wkt::internal::UnknownEnumValue::String(value.to_string()),
2553 )),
2554 }
2555 }
2556 }
2557
2558 impl serde::ser::Serialize for Type {
2559 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2560 where
2561 S: serde::Serializer,
2562 {
2563 match self {
2564 Self::Unspecified => serializer.serialize_i32(0),
2565 Self::NoReservation => serializer.serialize_i32(1),
2566 Self::AnyReservation => serializer.serialize_i32(2),
2567 Self::SpecificReservation => serializer.serialize_i32(3),
2568 Self::UnknownValue(u) => u.0.serialize(serializer),
2569 }
2570 }
2571 }
2572
2573 impl<'de> serde::de::Deserialize<'de> for Type {
2574 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2575 where
2576 D: serde::Deserializer<'de>,
2577 {
2578 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
2579 ".google.container.v1.ReservationAffinity.Type",
2580 ))
2581 }
2582 }
2583}
2584
2585#[serde_with::serde_as]
2588#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2589#[serde(default, rename_all = "camelCase")]
2590#[non_exhaustive]
2591pub struct SoleTenantConfig {
2592 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2594 pub node_affinities: std::vec::Vec<crate::model::sole_tenant_config::NodeAffinity>,
2595
2596 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2597 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2598}
2599
2600impl SoleTenantConfig {
2601 pub fn new() -> Self {
2602 std::default::Default::default()
2603 }
2604
2605 pub fn set_node_affinities<T, V>(mut self, v: T) -> Self
2607 where
2608 T: std::iter::IntoIterator<Item = V>,
2609 V: std::convert::Into<crate::model::sole_tenant_config::NodeAffinity>,
2610 {
2611 use std::iter::Iterator;
2612 self.node_affinities = v.into_iter().map(|i| i.into()).collect();
2613 self
2614 }
2615}
2616
2617impl wkt::message::Message for SoleTenantConfig {
2618 fn typename() -> &'static str {
2619 "type.googleapis.com/google.container.v1.SoleTenantConfig"
2620 }
2621}
2622
2623pub mod sole_tenant_config {
2625 #[allow(unused_imports)]
2626 use super::*;
2627
2628 #[serde_with::serde_as]
2632 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2633 #[serde(default, rename_all = "camelCase")]
2634 #[non_exhaustive]
2635 pub struct NodeAffinity {
2636 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2638 pub key: std::string::String,
2639
2640 pub operator: crate::model::sole_tenant_config::node_affinity::Operator,
2642
2643 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2645 pub values: std::vec::Vec<std::string::String>,
2646
2647 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2648 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2649 }
2650
2651 impl NodeAffinity {
2652 pub fn new() -> Self {
2653 std::default::Default::default()
2654 }
2655
2656 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2658 self.key = v.into();
2659 self
2660 }
2661
2662 pub fn set_operator<
2664 T: std::convert::Into<crate::model::sole_tenant_config::node_affinity::Operator>,
2665 >(
2666 mut self,
2667 v: T,
2668 ) -> Self {
2669 self.operator = v.into();
2670 self
2671 }
2672
2673 pub fn set_values<T, V>(mut self, v: T) -> Self
2675 where
2676 T: std::iter::IntoIterator<Item = V>,
2677 V: std::convert::Into<std::string::String>,
2678 {
2679 use std::iter::Iterator;
2680 self.values = v.into_iter().map(|i| i.into()).collect();
2681 self
2682 }
2683 }
2684
2685 impl wkt::message::Message for NodeAffinity {
2686 fn typename() -> &'static str {
2687 "type.googleapis.com/google.container.v1.SoleTenantConfig.NodeAffinity"
2688 }
2689 }
2690
2691 pub mod node_affinity {
2693 #[allow(unused_imports)]
2694 use super::*;
2695
2696 #[derive(Clone, Debug, PartialEq)]
2713 #[non_exhaustive]
2714 pub enum Operator {
2715 Unspecified,
2717 In,
2719 NotIn,
2721 UnknownValue(operator::UnknownValue),
2726 }
2727
2728 #[doc(hidden)]
2729 pub mod operator {
2730 #[allow(unused_imports)]
2731 use super::*;
2732 #[derive(Clone, Debug, PartialEq)]
2733 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2734 }
2735
2736 impl Operator {
2737 pub fn value(&self) -> std::option::Option<i32> {
2742 match self {
2743 Self::Unspecified => std::option::Option::Some(0),
2744 Self::In => std::option::Option::Some(1),
2745 Self::NotIn => std::option::Option::Some(2),
2746 Self::UnknownValue(u) => u.0.value(),
2747 }
2748 }
2749
2750 pub fn name(&self) -> std::option::Option<&str> {
2755 match self {
2756 Self::Unspecified => std::option::Option::Some("OPERATOR_UNSPECIFIED"),
2757 Self::In => std::option::Option::Some("IN"),
2758 Self::NotIn => std::option::Option::Some("NOT_IN"),
2759 Self::UnknownValue(u) => u.0.name(),
2760 }
2761 }
2762 }
2763
2764 impl std::default::Default for Operator {
2765 fn default() -> Self {
2766 use std::convert::From;
2767 Self::from(0)
2768 }
2769 }
2770
2771 impl std::fmt::Display for Operator {
2772 fn fmt(
2773 &self,
2774 f: &mut std::fmt::Formatter<'_>,
2775 ) -> std::result::Result<(), std::fmt::Error> {
2776 wkt::internal::display_enum(f, self.name(), self.value())
2777 }
2778 }
2779
2780 impl std::convert::From<i32> for Operator {
2781 fn from(value: i32) -> Self {
2782 match value {
2783 0 => Self::Unspecified,
2784 1 => Self::In,
2785 2 => Self::NotIn,
2786 _ => Self::UnknownValue(operator::UnknownValue(
2787 wkt::internal::UnknownEnumValue::Integer(value),
2788 )),
2789 }
2790 }
2791 }
2792
2793 impl std::convert::From<&str> for Operator {
2794 fn from(value: &str) -> Self {
2795 use std::string::ToString;
2796 match value {
2797 "OPERATOR_UNSPECIFIED" => Self::Unspecified,
2798 "IN" => Self::In,
2799 "NOT_IN" => Self::NotIn,
2800 _ => Self::UnknownValue(operator::UnknownValue(
2801 wkt::internal::UnknownEnumValue::String(value.to_string()),
2802 )),
2803 }
2804 }
2805 }
2806
2807 impl serde::ser::Serialize for Operator {
2808 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2809 where
2810 S: serde::Serializer,
2811 {
2812 match self {
2813 Self::Unspecified => serializer.serialize_i32(0),
2814 Self::In => serializer.serialize_i32(1),
2815 Self::NotIn => serializer.serialize_i32(2),
2816 Self::UnknownValue(u) => u.0.serialize(serializer),
2817 }
2818 }
2819 }
2820
2821 impl<'de> serde::de::Deserialize<'de> for Operator {
2822 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2823 where
2824 D: serde::Deserializer<'de>,
2825 {
2826 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operator>::new(
2827 ".google.container.v1.SoleTenantConfig.NodeAffinity.Operator",
2828 ))
2829 }
2830 }
2831 }
2832}
2833
2834#[serde_with::serde_as]
2836#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2837#[serde(default, rename_all = "camelCase")]
2838#[non_exhaustive]
2839pub struct ContainerdConfig {
2840 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2843 pub private_registry_access_config:
2844 std::option::Option<crate::model::containerd_config::PrivateRegistryAccessConfig>,
2845
2846 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2847 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2848}
2849
2850impl ContainerdConfig {
2851 pub fn new() -> Self {
2852 std::default::Default::default()
2853 }
2854
2855 pub fn set_private_registry_access_config<
2857 T: std::convert::Into<
2858 std::option::Option<crate::model::containerd_config::PrivateRegistryAccessConfig>,
2859 >,
2860 >(
2861 mut self,
2862 v: T,
2863 ) -> Self {
2864 self.private_registry_access_config = v.into();
2865 self
2866 }
2867}
2868
2869impl wkt::message::Message for ContainerdConfig {
2870 fn typename() -> &'static str {
2871 "type.googleapis.com/google.container.v1.ContainerdConfig"
2872 }
2873}
2874
2875pub mod containerd_config {
2877 #[allow(unused_imports)]
2878 use super::*;
2879
2880 #[serde_with::serde_as]
2883 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2884 #[serde(default, rename_all = "camelCase")]
2885 #[non_exhaustive]
2886 pub struct PrivateRegistryAccessConfig {
2887
2888 #[serde(skip_serializing_if = "wkt::internal::is_default")]
2890 pub enabled: bool,
2891
2892 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2894 pub certificate_authority_domain_config: std::vec::Vec<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>,
2895
2896 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2897 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2898 }
2899
2900 impl PrivateRegistryAccessConfig {
2901 pub fn new() -> Self {
2902 std::default::Default::default()
2903 }
2904
2905 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2907 self.enabled = v.into();
2908 self
2909 }
2910
2911 pub fn set_certificate_authority_domain_config<T, V>(mut self, v: T) -> Self
2913 where
2914 T: std::iter::IntoIterator<Item = V>,
2915 V: std::convert::Into<crate::model::containerd_config::private_registry_access_config::CertificateAuthorityDomainConfig>
2916 {
2917 use std::iter::Iterator;
2918 self.certificate_authority_domain_config = v.into_iter().map(|i| i.into()).collect();
2919 self
2920 }
2921 }
2922
2923 impl wkt::message::Message for PrivateRegistryAccessConfig {
2924 fn typename() -> &'static str {
2925 "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig"
2926 }
2927 }
2928
2929 pub mod private_registry_access_config {
2931 #[allow(unused_imports)]
2932 use super::*;
2933
2934 #[serde_with::serde_as]
2937 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2938 #[serde(default, rename_all = "camelCase")]
2939 #[non_exhaustive]
2940 pub struct CertificateAuthorityDomainConfig {
2941
2942 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2950 pub fqdns: std::vec::Vec<std::string::String>,
2951
2952 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
2956 pub certificate_config: std::option::Option<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig>,
2957
2958 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2959 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2960 }
2961
2962 impl CertificateAuthorityDomainConfig {
2963 pub fn new() -> Self {
2964 std::default::Default::default()
2965 }
2966
2967 pub fn set_fqdns<T, V>(mut self, v: T) -> Self
2969 where
2970 T: std::iter::IntoIterator<Item = V>,
2971 V: std::convert::Into<std::string::String>,
2972 {
2973 use std::iter::Iterator;
2974 self.fqdns = v.into_iter().map(|i| i.into()).collect();
2975 self
2976 }
2977
2978 pub fn set_certificate_config<T: std::convert::Into<std::option::Option<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig>>>(mut self, v: T) -> Self
2983 {
2984 self.certificate_config = v.into();
2985 self
2986 }
2987
2988 pub fn gcp_secret_manager_certificate_config(&self) -> std::option::Option<&std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>>{
2992 #[allow(unreachable_patterns)]
2993 self.certificate_config.as_ref().and_then(|v| match v {
2994 crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(v) => std::option::Option::Some(v),
2995 _ => std::option::Option::None,
2996 })
2997 }
2998
2999 pub fn set_gcp_secret_manager_certificate_config<T: std::convert::Into<std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>>>(mut self, v: T) -> Self{
3005 self.certificate_config = std::option::Option::Some(
3006 crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::CertificateConfig::GcpSecretManagerCertificateConfig(
3007 v.into()
3008 )
3009 );
3010 self
3011 }
3012 }
3013
3014 impl wkt::message::Message for CertificateAuthorityDomainConfig {
3015 fn typename() -> &'static str {
3016 "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"
3017 }
3018 }
3019
3020 pub mod certificate_authority_domain_config {
3022 #[allow(unused_imports)]
3023 use super::*;
3024
3025 #[serde_with::serde_as]
3028 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3029 #[serde(default, rename_all = "camelCase")]
3030 #[non_exhaustive]
3031 pub struct GCPSecretManagerCertificateConfig {
3032 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3036 pub secret_uri: std::string::String,
3037
3038 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3039 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3040 }
3041
3042 impl GCPSecretManagerCertificateConfig {
3043 pub fn new() -> Self {
3044 std::default::Default::default()
3045 }
3046
3047 pub fn set_secret_uri<T: std::convert::Into<std::string::String>>(
3049 mut self,
3050 v: T,
3051 ) -> Self {
3052 self.secret_uri = v.into();
3053 self
3054 }
3055 }
3056
3057 impl wkt::message::Message for GCPSecretManagerCertificateConfig {
3058 fn typename() -> &'static str {
3059 "type.googleapis.com/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"
3060 }
3061 }
3062
3063 #[serde_with::serde_as]
3067 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3068 #[serde(rename_all = "camelCase")]
3069 #[non_exhaustive]
3070 pub enum CertificateConfig {
3071 GcpSecretManagerCertificateConfig(std::boxed::Box<crate::model::containerd_config::private_registry_access_config::certificate_authority_domain_config::GCPSecretManagerCertificateConfig>),
3073 }
3074 }
3075 }
3076}
3077
3078#[serde_with::serde_as]
3085#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3086#[serde(default, rename_all = "camelCase")]
3087#[non_exhaustive]
3088pub struct NodeTaint {
3089 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3091 pub key: std::string::String,
3092
3093 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3095 pub value: std::string::String,
3096
3097 pub effect: crate::model::node_taint::Effect,
3099
3100 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3101 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3102}
3103
3104impl NodeTaint {
3105 pub fn new() -> Self {
3106 std::default::Default::default()
3107 }
3108
3109 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3111 self.key = v.into();
3112 self
3113 }
3114
3115 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3117 self.value = v.into();
3118 self
3119 }
3120
3121 pub fn set_effect<T: std::convert::Into<crate::model::node_taint::Effect>>(
3123 mut self,
3124 v: T,
3125 ) -> Self {
3126 self.effect = v.into();
3127 self
3128 }
3129}
3130
3131impl wkt::message::Message for NodeTaint {
3132 fn typename() -> &'static str {
3133 "type.googleapis.com/google.container.v1.NodeTaint"
3134 }
3135}
3136
3137pub mod node_taint {
3139 #[allow(unused_imports)]
3140 use super::*;
3141
3142 #[derive(Clone, Debug, PartialEq)]
3158 #[non_exhaustive]
3159 pub enum Effect {
3160 Unspecified,
3162 NoSchedule,
3164 PreferNoSchedule,
3166 NoExecute,
3168 UnknownValue(effect::UnknownValue),
3173 }
3174
3175 #[doc(hidden)]
3176 pub mod effect {
3177 #[allow(unused_imports)]
3178 use super::*;
3179 #[derive(Clone, Debug, PartialEq)]
3180 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3181 }
3182
3183 impl Effect {
3184 pub fn value(&self) -> std::option::Option<i32> {
3189 match self {
3190 Self::Unspecified => std::option::Option::Some(0),
3191 Self::NoSchedule => std::option::Option::Some(1),
3192 Self::PreferNoSchedule => std::option::Option::Some(2),
3193 Self::NoExecute => std::option::Option::Some(3),
3194 Self::UnknownValue(u) => u.0.value(),
3195 }
3196 }
3197
3198 pub fn name(&self) -> std::option::Option<&str> {
3203 match self {
3204 Self::Unspecified => std::option::Option::Some("EFFECT_UNSPECIFIED"),
3205 Self::NoSchedule => std::option::Option::Some("NO_SCHEDULE"),
3206 Self::PreferNoSchedule => std::option::Option::Some("PREFER_NO_SCHEDULE"),
3207 Self::NoExecute => std::option::Option::Some("NO_EXECUTE"),
3208 Self::UnknownValue(u) => u.0.name(),
3209 }
3210 }
3211 }
3212
3213 impl std::default::Default for Effect {
3214 fn default() -> Self {
3215 use std::convert::From;
3216 Self::from(0)
3217 }
3218 }
3219
3220 impl std::fmt::Display for Effect {
3221 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3222 wkt::internal::display_enum(f, self.name(), self.value())
3223 }
3224 }
3225
3226 impl std::convert::From<i32> for Effect {
3227 fn from(value: i32) -> Self {
3228 match value {
3229 0 => Self::Unspecified,
3230 1 => Self::NoSchedule,
3231 2 => Self::PreferNoSchedule,
3232 3 => Self::NoExecute,
3233 _ => Self::UnknownValue(effect::UnknownValue(
3234 wkt::internal::UnknownEnumValue::Integer(value),
3235 )),
3236 }
3237 }
3238 }
3239
3240 impl std::convert::From<&str> for Effect {
3241 fn from(value: &str) -> Self {
3242 use std::string::ToString;
3243 match value {
3244 "EFFECT_UNSPECIFIED" => Self::Unspecified,
3245 "NO_SCHEDULE" => Self::NoSchedule,
3246 "PREFER_NO_SCHEDULE" => Self::PreferNoSchedule,
3247 "NO_EXECUTE" => Self::NoExecute,
3248 _ => Self::UnknownValue(effect::UnknownValue(
3249 wkt::internal::UnknownEnumValue::String(value.to_string()),
3250 )),
3251 }
3252 }
3253 }
3254
3255 impl serde::ser::Serialize for Effect {
3256 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3257 where
3258 S: serde::Serializer,
3259 {
3260 match self {
3261 Self::Unspecified => serializer.serialize_i32(0),
3262 Self::NoSchedule => serializer.serialize_i32(1),
3263 Self::PreferNoSchedule => serializer.serialize_i32(2),
3264 Self::NoExecute => serializer.serialize_i32(3),
3265 Self::UnknownValue(u) => u.0.serialize(serializer),
3266 }
3267 }
3268 }
3269
3270 impl<'de> serde::de::Deserialize<'de> for Effect {
3271 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3272 where
3273 D: serde::Deserializer<'de>,
3274 {
3275 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Effect>::new(
3276 ".google.container.v1.NodeTaint.Effect",
3277 ))
3278 }
3279 }
3280}
3281
3282#[serde_with::serde_as]
3285#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3286#[serde(default, rename_all = "camelCase")]
3287#[non_exhaustive]
3288pub struct NodeTaints {
3289 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3291 pub taints: std::vec::Vec<crate::model::NodeTaint>,
3292
3293 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3294 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3295}
3296
3297impl NodeTaints {
3298 pub fn new() -> Self {
3299 std::default::Default::default()
3300 }
3301
3302 pub fn set_taints<T, V>(mut self, v: T) -> Self
3304 where
3305 T: std::iter::IntoIterator<Item = V>,
3306 V: std::convert::Into<crate::model::NodeTaint>,
3307 {
3308 use std::iter::Iterator;
3309 self.taints = v.into_iter().map(|i| i.into()).collect();
3310 self
3311 }
3312}
3313
3314impl wkt::message::Message for NodeTaints {
3315 fn typename() -> &'static str {
3316 "type.googleapis.com/google.container.v1.NodeTaints"
3317 }
3318}
3319
3320#[serde_with::serde_as]
3323#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3324#[serde(default, rename_all = "camelCase")]
3325#[non_exhaustive]
3326pub struct NodeLabels {
3327 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3329 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3330
3331 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3332 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3333}
3334
3335impl NodeLabels {
3336 pub fn new() -> Self {
3337 std::default::Default::default()
3338 }
3339
3340 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3342 where
3343 T: std::iter::IntoIterator<Item = (K, V)>,
3344 K: std::convert::Into<std::string::String>,
3345 V: std::convert::Into<std::string::String>,
3346 {
3347 use std::iter::Iterator;
3348 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3349 self
3350 }
3351}
3352
3353impl wkt::message::Message for NodeLabels {
3354 fn typename() -> &'static str {
3355 "type.googleapis.com/google.container.v1.NodeLabels"
3356 }
3357}
3358
3359#[serde_with::serde_as]
3362#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3363#[serde(default, rename_all = "camelCase")]
3364#[non_exhaustive]
3365pub struct ResourceLabels {
3366 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3368 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3369
3370 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3371 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3372}
3373
3374impl ResourceLabels {
3375 pub fn new() -> Self {
3376 std::default::Default::default()
3377 }
3378
3379 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3381 where
3382 T: std::iter::IntoIterator<Item = (K, V)>,
3383 K: std::convert::Into<std::string::String>,
3384 V: std::convert::Into<std::string::String>,
3385 {
3386 use std::iter::Iterator;
3387 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3388 self
3389 }
3390}
3391
3392impl wkt::message::Message for ResourceLabels {
3393 fn typename() -> &'static str {
3394 "type.googleapis.com/google.container.v1.ResourceLabels"
3395 }
3396}
3397
3398#[serde_with::serde_as]
3401#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3402#[serde(default, rename_all = "camelCase")]
3403#[non_exhaustive]
3404pub struct NetworkTags {
3405 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3407 pub tags: std::vec::Vec<std::string::String>,
3408
3409 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3410 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3411}
3412
3413impl NetworkTags {
3414 pub fn new() -> Self {
3415 std::default::Default::default()
3416 }
3417
3418 pub fn set_tags<T, V>(mut self, v: T) -> Self
3420 where
3421 T: std::iter::IntoIterator<Item = V>,
3422 V: std::convert::Into<std::string::String>,
3423 {
3424 use std::iter::Iterator;
3425 self.tags = v.into_iter().map(|i| i.into()).collect();
3426 self
3427 }
3428}
3429
3430impl wkt::message::Message for NetworkTags {
3431 fn typename() -> &'static str {
3432 "type.googleapis.com/google.container.v1.NetworkTags"
3433 }
3434}
3435
3436#[serde_with::serde_as]
3440#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3441#[serde(default, rename_all = "camelCase")]
3442#[non_exhaustive]
3443pub struct MasterAuth {
3444 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3453 #[deprecated]
3454 pub username: std::string::String,
3455
3456 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3466 #[deprecated]
3467 pub password: std::string::String,
3468
3469 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3473 pub client_certificate_config: std::option::Option<crate::model::ClientCertificateConfig>,
3474
3475 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3478 pub cluster_ca_certificate: std::string::String,
3479
3480 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3484 pub client_certificate: std::string::String,
3485
3486 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3489 pub client_key: std::string::String,
3490
3491 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3492 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3493}
3494
3495impl MasterAuth {
3496 pub fn new() -> Self {
3497 std::default::Default::default()
3498 }
3499
3500 #[deprecated]
3502 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3503 self.username = v.into();
3504 self
3505 }
3506
3507 #[deprecated]
3509 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3510 self.password = v.into();
3511 self
3512 }
3513
3514 pub fn set_client_certificate_config<
3516 T: std::convert::Into<std::option::Option<crate::model::ClientCertificateConfig>>,
3517 >(
3518 mut self,
3519 v: T,
3520 ) -> Self {
3521 self.client_certificate_config = v.into();
3522 self
3523 }
3524
3525 pub fn set_cluster_ca_certificate<T: std::convert::Into<std::string::String>>(
3527 mut self,
3528 v: T,
3529 ) -> Self {
3530 self.cluster_ca_certificate = v.into();
3531 self
3532 }
3533
3534 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
3536 mut self,
3537 v: T,
3538 ) -> Self {
3539 self.client_certificate = v.into();
3540 self
3541 }
3542
3543 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3545 self.client_key = v.into();
3546 self
3547 }
3548}
3549
3550impl wkt::message::Message for MasterAuth {
3551 fn typename() -> &'static str {
3552 "type.googleapis.com/google.container.v1.MasterAuth"
3553 }
3554}
3555
3556#[serde_with::serde_as]
3558#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3559#[serde(default, rename_all = "camelCase")]
3560#[non_exhaustive]
3561pub struct ClientCertificateConfig {
3562 #[serde(skip_serializing_if = "wkt::internal::is_default")]
3564 pub issue_client_certificate: bool,
3565
3566 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3567 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3568}
3569
3570impl ClientCertificateConfig {
3571 pub fn new() -> Self {
3572 std::default::Default::default()
3573 }
3574
3575 pub fn set_issue_client_certificate<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3577 self.issue_client_certificate = v.into();
3578 self
3579 }
3580}
3581
3582impl wkt::message::Message for ClientCertificateConfig {
3583 fn typename() -> &'static str {
3584 "type.googleapis.com/google.container.v1.ClientCertificateConfig"
3585 }
3586}
3587
3588#[serde_with::serde_as]
3591#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3592#[serde(default, rename_all = "camelCase")]
3593#[non_exhaustive]
3594pub struct AddonsConfig {
3595 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3598 pub http_load_balancing: std::option::Option<crate::model::HttpLoadBalancing>,
3599
3600 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3604 pub horizontal_pod_autoscaling: std::option::Option<crate::model::HorizontalPodAutoscaling>,
3605
3606 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3612 #[deprecated]
3613 pub kubernetes_dashboard: std::option::Option<crate::model::KubernetesDashboard>,
3614
3615 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3619 pub network_policy_config: std::option::Option<crate::model::NetworkPolicyConfig>,
3620
3621 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3624 pub cloud_run_config: std::option::Option<crate::model::CloudRunConfig>,
3625
3626 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3628 pub dns_cache_config: std::option::Option<crate::model::DnsCacheConfig>,
3629
3630 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3633 pub config_connector_config: std::option::Option<crate::model::ConfigConnectorConfig>,
3634
3635 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3637 pub gce_persistent_disk_csi_driver_config:
3638 std::option::Option<crate::model::GcePersistentDiskCsiDriverConfig>,
3639
3640 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3642 pub gcp_filestore_csi_driver_config:
3643 std::option::Option<crate::model::GcpFilestoreCsiDriverConfig>,
3644
3645 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3647 pub gke_backup_agent_config: std::option::Option<crate::model::GkeBackupAgentConfig>,
3648
3649 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3651 pub gcs_fuse_csi_driver_config: std::option::Option<crate::model::GcsFuseCsiDriverConfig>,
3652
3653 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3655 pub stateful_ha_config: std::option::Option<crate::model::StatefulHAConfig>,
3656
3657 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3659 pub parallelstore_csi_driver_config:
3660 std::option::Option<crate::model::ParallelstoreCsiDriverConfig>,
3661
3662 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3664 pub ray_operator_config: std::option::Option<crate::model::RayOperatorConfig>,
3665
3666 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3667 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3668}
3669
3670impl AddonsConfig {
3671 pub fn new() -> Self {
3672 std::default::Default::default()
3673 }
3674
3675 pub fn set_http_load_balancing<
3677 T: std::convert::Into<std::option::Option<crate::model::HttpLoadBalancing>>,
3678 >(
3679 mut self,
3680 v: T,
3681 ) -> Self {
3682 self.http_load_balancing = v.into();
3683 self
3684 }
3685
3686 pub fn set_horizontal_pod_autoscaling<
3688 T: std::convert::Into<std::option::Option<crate::model::HorizontalPodAutoscaling>>,
3689 >(
3690 mut self,
3691 v: T,
3692 ) -> Self {
3693 self.horizontal_pod_autoscaling = v.into();
3694 self
3695 }
3696
3697 #[deprecated]
3699 pub fn set_kubernetes_dashboard<
3700 T: std::convert::Into<std::option::Option<crate::model::KubernetesDashboard>>,
3701 >(
3702 mut self,
3703 v: T,
3704 ) -> Self {
3705 self.kubernetes_dashboard = v.into();
3706 self
3707 }
3708
3709 pub fn set_network_policy_config<
3711 T: std::convert::Into<std::option::Option<crate::model::NetworkPolicyConfig>>,
3712 >(
3713 mut self,
3714 v: T,
3715 ) -> Self {
3716 self.network_policy_config = v.into();
3717 self
3718 }
3719
3720 pub fn set_cloud_run_config<
3722 T: std::convert::Into<std::option::Option<crate::model::CloudRunConfig>>,
3723 >(
3724 mut self,
3725 v: T,
3726 ) -> Self {
3727 self.cloud_run_config = v.into();
3728 self
3729 }
3730
3731 pub fn set_dns_cache_config<
3733 T: std::convert::Into<std::option::Option<crate::model::DnsCacheConfig>>,
3734 >(
3735 mut self,
3736 v: T,
3737 ) -> Self {
3738 self.dns_cache_config = v.into();
3739 self
3740 }
3741
3742 pub fn set_config_connector_config<
3744 T: std::convert::Into<std::option::Option<crate::model::ConfigConnectorConfig>>,
3745 >(
3746 mut self,
3747 v: T,
3748 ) -> Self {
3749 self.config_connector_config = v.into();
3750 self
3751 }
3752
3753 pub fn set_gce_persistent_disk_csi_driver_config<
3755 T: std::convert::Into<std::option::Option<crate::model::GcePersistentDiskCsiDriverConfig>>,
3756 >(
3757 mut self,
3758 v: T,
3759 ) -> Self {
3760 self.gce_persistent_disk_csi_driver_config = v.into();
3761 self
3762 }
3763
3764 pub fn set_gcp_filestore_csi_driver_config<
3766 T: std::convert::Into<std::option::Option<crate::model::GcpFilestoreCsiDriverConfig>>,
3767 >(
3768 mut self,
3769 v: T,
3770 ) -> Self {
3771 self.gcp_filestore_csi_driver_config = v.into();
3772 self
3773 }
3774
3775 pub fn set_gke_backup_agent_config<
3777 T: std::convert::Into<std::option::Option<crate::model::GkeBackupAgentConfig>>,
3778 >(
3779 mut self,
3780 v: T,
3781 ) -> Self {
3782 self.gke_backup_agent_config = v.into();
3783 self
3784 }
3785
3786 pub fn set_gcs_fuse_csi_driver_config<
3788 T: std::convert::Into<std::option::Option<crate::model::GcsFuseCsiDriverConfig>>,
3789 >(
3790 mut self,
3791 v: T,
3792 ) -> Self {
3793 self.gcs_fuse_csi_driver_config = v.into();
3794 self
3795 }
3796
3797 pub fn set_stateful_ha_config<
3799 T: std::convert::Into<std::option::Option<crate::model::StatefulHAConfig>>,
3800 >(
3801 mut self,
3802 v: T,
3803 ) -> Self {
3804 self.stateful_ha_config = v.into();
3805 self
3806 }
3807
3808 pub fn set_parallelstore_csi_driver_config<
3810 T: std::convert::Into<std::option::Option<crate::model::ParallelstoreCsiDriverConfig>>,
3811 >(
3812 mut self,
3813 v: T,
3814 ) -> Self {
3815 self.parallelstore_csi_driver_config = v.into();
3816 self
3817 }
3818
3819 pub fn set_ray_operator_config<
3821 T: std::convert::Into<std::option::Option<crate::model::RayOperatorConfig>>,
3822 >(
3823 mut self,
3824 v: T,
3825 ) -> Self {
3826 self.ray_operator_config = v.into();
3827 self
3828 }
3829}
3830
3831impl wkt::message::Message for AddonsConfig {
3832 fn typename() -> &'static str {
3833 "type.googleapis.com/google.container.v1.AddonsConfig"
3834 }
3835}
3836
3837#[serde_with::serde_as]
3840#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3841#[serde(default, rename_all = "camelCase")]
3842#[non_exhaustive]
3843pub struct HttpLoadBalancing {
3844 #[serde(skip_serializing_if = "wkt::internal::is_default")]
3848 pub disabled: bool,
3849
3850 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3851 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3852}
3853
3854impl HttpLoadBalancing {
3855 pub fn new() -> Self {
3856 std::default::Default::default()
3857 }
3858
3859 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3861 self.disabled = v.into();
3862 self
3863 }
3864}
3865
3866impl wkt::message::Message for HttpLoadBalancing {
3867 fn typename() -> &'static str {
3868 "type.googleapis.com/google.container.v1.HttpLoadBalancing"
3869 }
3870}
3871
3872#[serde_with::serde_as]
3876#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3877#[serde(default, rename_all = "camelCase")]
3878#[non_exhaustive]
3879pub struct HorizontalPodAutoscaling {
3880 #[serde(skip_serializing_if = "wkt::internal::is_default")]
3884 pub disabled: bool,
3885
3886 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3887 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3888}
3889
3890impl HorizontalPodAutoscaling {
3891 pub fn new() -> Self {
3892 std::default::Default::default()
3893 }
3894
3895 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3897 self.disabled = v.into();
3898 self
3899 }
3900}
3901
3902impl wkt::message::Message for HorizontalPodAutoscaling {
3903 fn typename() -> &'static str {
3904 "type.googleapis.com/google.container.v1.HorizontalPodAutoscaling"
3905 }
3906}
3907
3908#[serde_with::serde_as]
3910#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3911#[serde(default, rename_all = "camelCase")]
3912#[non_exhaustive]
3913pub struct KubernetesDashboard {
3914 #[serde(skip_serializing_if = "wkt::internal::is_default")]
3916 pub disabled: bool,
3917
3918 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3919 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3920}
3921
3922impl KubernetesDashboard {
3923 pub fn new() -> Self {
3924 std::default::Default::default()
3925 }
3926
3927 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3929 self.disabled = v.into();
3930 self
3931 }
3932}
3933
3934impl wkt::message::Message for KubernetesDashboard {
3935 fn typename() -> &'static str {
3936 "type.googleapis.com/google.container.v1.KubernetesDashboard"
3937 }
3938}
3939
3940#[serde_with::serde_as]
3944#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3945#[serde(default, rename_all = "camelCase")]
3946#[non_exhaustive]
3947pub struct NetworkPolicyConfig {
3948 #[serde(skip_serializing_if = "wkt::internal::is_default")]
3950 pub disabled: bool,
3951
3952 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3953 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3954}
3955
3956impl NetworkPolicyConfig {
3957 pub fn new() -> Self {
3958 std::default::Default::default()
3959 }
3960
3961 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3963 self.disabled = v.into();
3964 self
3965 }
3966}
3967
3968impl wkt::message::Message for NetworkPolicyConfig {
3969 fn typename() -> &'static str {
3970 "type.googleapis.com/google.container.v1.NetworkPolicyConfig"
3971 }
3972}
3973
3974#[serde_with::serde_as]
3976#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3977#[serde(default, rename_all = "camelCase")]
3978#[non_exhaustive]
3979pub struct DnsCacheConfig {
3980 #[serde(skip_serializing_if = "wkt::internal::is_default")]
3982 pub enabled: bool,
3983
3984 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3985 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3986}
3987
3988impl DnsCacheConfig {
3989 pub fn new() -> Self {
3990 std::default::Default::default()
3991 }
3992
3993 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3995 self.enabled = v.into();
3996 self
3997 }
3998}
3999
4000impl wkt::message::Message for DnsCacheConfig {
4001 fn typename() -> &'static str {
4002 "type.googleapis.com/google.container.v1.DnsCacheConfig"
4003 }
4004}
4005
4006#[serde_with::serde_as]
4008#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4009#[serde(default, rename_all = "camelCase")]
4010#[non_exhaustive]
4011pub struct PrivateClusterMasterGlobalAccessConfig {
4012 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4014 pub enabled: bool,
4015
4016 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4017 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4018}
4019
4020impl PrivateClusterMasterGlobalAccessConfig {
4021 pub fn new() -> Self {
4022 std::default::Default::default()
4023 }
4024
4025 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4027 self.enabled = v.into();
4028 self
4029 }
4030}
4031
4032impl wkt::message::Message for PrivateClusterMasterGlobalAccessConfig {
4033 fn typename() -> &'static str {
4034 "type.googleapis.com/google.container.v1.PrivateClusterMasterGlobalAccessConfig"
4035 }
4036}
4037
4038#[serde_with::serde_as]
4040#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4041#[serde(default, rename_all = "camelCase")]
4042#[non_exhaustive]
4043pub struct PrivateClusterConfig {
4044 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4054 #[deprecated]
4055 pub enable_private_nodes: bool,
4056
4057 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4066 #[deprecated]
4067 pub enable_private_endpoint: bool,
4068
4069 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4074 pub master_ipv4_cidr_block: std::string::String,
4075
4076 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4084 #[deprecated]
4085 pub private_endpoint: std::string::String,
4086
4087 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4095 #[deprecated]
4096 pub public_endpoint: std::string::String,
4097
4098 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4100 pub peering_name: std::string::String,
4101
4102 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4108 #[deprecated]
4109 pub master_global_access_config:
4110 std::option::Option<crate::model::PrivateClusterMasterGlobalAccessConfig>,
4111
4112 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4121 #[deprecated]
4122 pub private_endpoint_subnetwork: std::string::String,
4123
4124 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4125 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4126}
4127
4128impl PrivateClusterConfig {
4129 pub fn new() -> Self {
4130 std::default::Default::default()
4131 }
4132
4133 #[deprecated]
4135 pub fn set_enable_private_nodes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4136 self.enable_private_nodes = v.into();
4137 self
4138 }
4139
4140 #[deprecated]
4142 pub fn set_enable_private_endpoint<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4143 self.enable_private_endpoint = v.into();
4144 self
4145 }
4146
4147 pub fn set_master_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
4149 mut self,
4150 v: T,
4151 ) -> Self {
4152 self.master_ipv4_cidr_block = v.into();
4153 self
4154 }
4155
4156 #[deprecated]
4158 pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
4159 mut self,
4160 v: T,
4161 ) -> Self {
4162 self.private_endpoint = v.into();
4163 self
4164 }
4165
4166 #[deprecated]
4168 pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4169 self.public_endpoint = v.into();
4170 self
4171 }
4172
4173 pub fn set_peering_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4175 self.peering_name = v.into();
4176 self
4177 }
4178
4179 #[deprecated]
4181 pub fn set_master_global_access_config<
4182 T: std::convert::Into<
4183 std::option::Option<crate::model::PrivateClusterMasterGlobalAccessConfig>,
4184 >,
4185 >(
4186 mut self,
4187 v: T,
4188 ) -> Self {
4189 self.master_global_access_config = v.into();
4190 self
4191 }
4192
4193 #[deprecated]
4195 pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
4196 mut self,
4197 v: T,
4198 ) -> Self {
4199 self.private_endpoint_subnetwork = v.into();
4200 self
4201 }
4202}
4203
4204impl wkt::message::Message for PrivateClusterConfig {
4205 fn typename() -> &'static str {
4206 "type.googleapis.com/google.container.v1.PrivateClusterConfig"
4207 }
4208}
4209
4210#[serde_with::serde_as]
4212#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4213#[serde(default, rename_all = "camelCase")]
4214#[non_exhaustive]
4215pub struct AuthenticatorGroupsConfig {
4216 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4219 pub enabled: bool,
4220
4221 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4224 pub security_group: std::string::String,
4225
4226 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4227 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4228}
4229
4230impl AuthenticatorGroupsConfig {
4231 pub fn new() -> Self {
4232 std::default::Default::default()
4233 }
4234
4235 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4237 self.enabled = v.into();
4238 self
4239 }
4240
4241 pub fn set_security_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4243 self.security_group = v.into();
4244 self
4245 }
4246}
4247
4248impl wkt::message::Message for AuthenticatorGroupsConfig {
4249 fn typename() -> &'static str {
4250 "type.googleapis.com/google.container.v1.AuthenticatorGroupsConfig"
4251 }
4252}
4253
4254#[serde_with::serde_as]
4256#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4257#[serde(default, rename_all = "camelCase")]
4258#[non_exhaustive]
4259pub struct CloudRunConfig {
4260 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4262 pub disabled: bool,
4263
4264 pub load_balancer_type: crate::model::cloud_run_config::LoadBalancerType,
4266
4267 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4268 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4269}
4270
4271impl CloudRunConfig {
4272 pub fn new() -> Self {
4273 std::default::Default::default()
4274 }
4275
4276 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4278 self.disabled = v.into();
4279 self
4280 }
4281
4282 pub fn set_load_balancer_type<
4284 T: std::convert::Into<crate::model::cloud_run_config::LoadBalancerType>,
4285 >(
4286 mut self,
4287 v: T,
4288 ) -> Self {
4289 self.load_balancer_type = v.into();
4290 self
4291 }
4292}
4293
4294impl wkt::message::Message for CloudRunConfig {
4295 fn typename() -> &'static str {
4296 "type.googleapis.com/google.container.v1.CloudRunConfig"
4297 }
4298}
4299
4300pub mod cloud_run_config {
4302 #[allow(unused_imports)]
4303 use super::*;
4304
4305 #[derive(Clone, Debug, PartialEq)]
4321 #[non_exhaustive]
4322 pub enum LoadBalancerType {
4323 Unspecified,
4325 External,
4327 Internal,
4329 UnknownValue(load_balancer_type::UnknownValue),
4334 }
4335
4336 #[doc(hidden)]
4337 pub mod load_balancer_type {
4338 #[allow(unused_imports)]
4339 use super::*;
4340 #[derive(Clone, Debug, PartialEq)]
4341 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4342 }
4343
4344 impl LoadBalancerType {
4345 pub fn value(&self) -> std::option::Option<i32> {
4350 match self {
4351 Self::Unspecified => std::option::Option::Some(0),
4352 Self::External => std::option::Option::Some(1),
4353 Self::Internal => std::option::Option::Some(2),
4354 Self::UnknownValue(u) => u.0.value(),
4355 }
4356 }
4357
4358 pub fn name(&self) -> std::option::Option<&str> {
4363 match self {
4364 Self::Unspecified => std::option::Option::Some("LOAD_BALANCER_TYPE_UNSPECIFIED"),
4365 Self::External => std::option::Option::Some("LOAD_BALANCER_TYPE_EXTERNAL"),
4366 Self::Internal => std::option::Option::Some("LOAD_BALANCER_TYPE_INTERNAL"),
4367 Self::UnknownValue(u) => u.0.name(),
4368 }
4369 }
4370 }
4371
4372 impl std::default::Default for LoadBalancerType {
4373 fn default() -> Self {
4374 use std::convert::From;
4375 Self::from(0)
4376 }
4377 }
4378
4379 impl std::fmt::Display for LoadBalancerType {
4380 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4381 wkt::internal::display_enum(f, self.name(), self.value())
4382 }
4383 }
4384
4385 impl std::convert::From<i32> for LoadBalancerType {
4386 fn from(value: i32) -> Self {
4387 match value {
4388 0 => Self::Unspecified,
4389 1 => Self::External,
4390 2 => Self::Internal,
4391 _ => Self::UnknownValue(load_balancer_type::UnknownValue(
4392 wkt::internal::UnknownEnumValue::Integer(value),
4393 )),
4394 }
4395 }
4396 }
4397
4398 impl std::convert::From<&str> for LoadBalancerType {
4399 fn from(value: &str) -> Self {
4400 use std::string::ToString;
4401 match value {
4402 "LOAD_BALANCER_TYPE_UNSPECIFIED" => Self::Unspecified,
4403 "LOAD_BALANCER_TYPE_EXTERNAL" => Self::External,
4404 "LOAD_BALANCER_TYPE_INTERNAL" => Self::Internal,
4405 _ => Self::UnknownValue(load_balancer_type::UnknownValue(
4406 wkt::internal::UnknownEnumValue::String(value.to_string()),
4407 )),
4408 }
4409 }
4410 }
4411
4412 impl serde::ser::Serialize for LoadBalancerType {
4413 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4414 where
4415 S: serde::Serializer,
4416 {
4417 match self {
4418 Self::Unspecified => serializer.serialize_i32(0),
4419 Self::External => serializer.serialize_i32(1),
4420 Self::Internal => serializer.serialize_i32(2),
4421 Self::UnknownValue(u) => u.0.serialize(serializer),
4422 }
4423 }
4424 }
4425
4426 impl<'de> serde::de::Deserialize<'de> for LoadBalancerType {
4427 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4428 where
4429 D: serde::Deserializer<'de>,
4430 {
4431 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoadBalancerType>::new(
4432 ".google.container.v1.CloudRunConfig.LoadBalancerType",
4433 ))
4434 }
4435 }
4436}
4437
4438#[serde_with::serde_as]
4440#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4441#[serde(default, rename_all = "camelCase")]
4442#[non_exhaustive]
4443pub struct ConfigConnectorConfig {
4444 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4446 pub enabled: bool,
4447
4448 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4449 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4450}
4451
4452impl ConfigConnectorConfig {
4453 pub fn new() -> Self {
4454 std::default::Default::default()
4455 }
4456
4457 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4459 self.enabled = v.into();
4460 self
4461 }
4462}
4463
4464impl wkt::message::Message for ConfigConnectorConfig {
4465 fn typename() -> &'static str {
4466 "type.googleapis.com/google.container.v1.ConfigConnectorConfig"
4467 }
4468}
4469
4470#[serde_with::serde_as]
4472#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4473#[serde(default, rename_all = "camelCase")]
4474#[non_exhaustive]
4475pub struct GcePersistentDiskCsiDriverConfig {
4476 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4478 pub enabled: bool,
4479
4480 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4481 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4482}
4483
4484impl GcePersistentDiskCsiDriverConfig {
4485 pub fn new() -> Self {
4486 std::default::Default::default()
4487 }
4488
4489 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4491 self.enabled = v.into();
4492 self
4493 }
4494}
4495
4496impl wkt::message::Message for GcePersistentDiskCsiDriverConfig {
4497 fn typename() -> &'static str {
4498 "type.googleapis.com/google.container.v1.GcePersistentDiskCsiDriverConfig"
4499 }
4500}
4501
4502#[serde_with::serde_as]
4504#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4505#[serde(default, rename_all = "camelCase")]
4506#[non_exhaustive]
4507pub struct GcpFilestoreCsiDriverConfig {
4508 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4510 pub enabled: bool,
4511
4512 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4513 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4514}
4515
4516impl GcpFilestoreCsiDriverConfig {
4517 pub fn new() -> Self {
4518 std::default::Default::default()
4519 }
4520
4521 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4523 self.enabled = v.into();
4524 self
4525 }
4526}
4527
4528impl wkt::message::Message for GcpFilestoreCsiDriverConfig {
4529 fn typename() -> &'static str {
4530 "type.googleapis.com/google.container.v1.GcpFilestoreCsiDriverConfig"
4531 }
4532}
4533
4534#[serde_with::serde_as]
4536#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4537#[serde(default, rename_all = "camelCase")]
4538#[non_exhaustive]
4539pub struct GcsFuseCsiDriverConfig {
4540 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4542 pub enabled: bool,
4543
4544 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4545 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4546}
4547
4548impl GcsFuseCsiDriverConfig {
4549 pub fn new() -> Self {
4550 std::default::Default::default()
4551 }
4552
4553 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4555 self.enabled = v.into();
4556 self
4557 }
4558}
4559
4560impl wkt::message::Message for GcsFuseCsiDriverConfig {
4561 fn typename() -> &'static str {
4562 "type.googleapis.com/google.container.v1.GcsFuseCsiDriverConfig"
4563 }
4564}
4565
4566#[serde_with::serde_as]
4568#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4569#[serde(default, rename_all = "camelCase")]
4570#[non_exhaustive]
4571pub struct ParallelstoreCsiDriverConfig {
4572 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4575 pub enabled: bool,
4576
4577 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4578 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4579}
4580
4581impl ParallelstoreCsiDriverConfig {
4582 pub fn new() -> Self {
4583 std::default::Default::default()
4584 }
4585
4586 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4588 self.enabled = v.into();
4589 self
4590 }
4591}
4592
4593impl wkt::message::Message for ParallelstoreCsiDriverConfig {
4594 fn typename() -> &'static str {
4595 "type.googleapis.com/google.container.v1.ParallelstoreCsiDriverConfig"
4596 }
4597}
4598
4599#[serde_with::serde_as]
4601#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4602#[serde(default, rename_all = "camelCase")]
4603#[non_exhaustive]
4604pub struct RayOperatorConfig {
4605 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4607 pub enabled: bool,
4608
4609 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4611 pub ray_cluster_logging_config: std::option::Option<crate::model::RayClusterLoggingConfig>,
4612
4613 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4615 pub ray_cluster_monitoring_config:
4616 std::option::Option<crate::model::RayClusterMonitoringConfig>,
4617
4618 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4619 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4620}
4621
4622impl RayOperatorConfig {
4623 pub fn new() -> Self {
4624 std::default::Default::default()
4625 }
4626
4627 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4629 self.enabled = v.into();
4630 self
4631 }
4632
4633 pub fn set_ray_cluster_logging_config<
4635 T: std::convert::Into<std::option::Option<crate::model::RayClusterLoggingConfig>>,
4636 >(
4637 mut self,
4638 v: T,
4639 ) -> Self {
4640 self.ray_cluster_logging_config = v.into();
4641 self
4642 }
4643
4644 pub fn set_ray_cluster_monitoring_config<
4646 T: std::convert::Into<std::option::Option<crate::model::RayClusterMonitoringConfig>>,
4647 >(
4648 mut self,
4649 v: T,
4650 ) -> Self {
4651 self.ray_cluster_monitoring_config = v.into();
4652 self
4653 }
4654}
4655
4656impl wkt::message::Message for RayOperatorConfig {
4657 fn typename() -> &'static str {
4658 "type.googleapis.com/google.container.v1.RayOperatorConfig"
4659 }
4660}
4661
4662#[serde_with::serde_as]
4664#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4665#[serde(default, rename_all = "camelCase")]
4666#[non_exhaustive]
4667pub struct GkeBackupAgentConfig {
4668 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4670 pub enabled: bool,
4671
4672 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4673 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4674}
4675
4676impl GkeBackupAgentConfig {
4677 pub fn new() -> Self {
4678 std::default::Default::default()
4679 }
4680
4681 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4683 self.enabled = v.into();
4684 self
4685 }
4686}
4687
4688impl wkt::message::Message for GkeBackupAgentConfig {
4689 fn typename() -> &'static str {
4690 "type.googleapis.com/google.container.v1.GkeBackupAgentConfig"
4691 }
4692}
4693
4694#[serde_with::serde_as]
4696#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4697#[serde(default, rename_all = "camelCase")]
4698#[non_exhaustive]
4699pub struct StatefulHAConfig {
4700 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4702 pub enabled: bool,
4703
4704 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4705 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4706}
4707
4708impl StatefulHAConfig {
4709 pub fn new() -> Self {
4710 std::default::Default::default()
4711 }
4712
4713 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4715 self.enabled = v.into();
4716 self
4717 }
4718}
4719
4720impl wkt::message::Message for StatefulHAConfig {
4721 fn typename() -> &'static str {
4722 "type.googleapis.com/google.container.v1.StatefulHAConfig"
4723 }
4724}
4725
4726#[serde_with::serde_as]
4731#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4732#[serde(default, rename_all = "camelCase")]
4733#[non_exhaustive]
4734pub struct MasterAuthorizedNetworksConfig {
4735 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4737 pub enabled: bool,
4738
4739 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4742 pub cidr_blocks: std::vec::Vec<crate::model::master_authorized_networks_config::CidrBlock>,
4743
4744 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4746 pub gcp_public_cidrs_access_enabled: std::option::Option<bool>,
4747
4748 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4750 pub private_endpoint_enforcement_enabled: std::option::Option<bool>,
4751
4752 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4753 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4754}
4755
4756impl MasterAuthorizedNetworksConfig {
4757 pub fn new() -> Self {
4758 std::default::Default::default()
4759 }
4760
4761 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4763 self.enabled = v.into();
4764 self
4765 }
4766
4767 pub fn set_cidr_blocks<T, V>(mut self, v: T) -> Self
4769 where
4770 T: std::iter::IntoIterator<Item = V>,
4771 V: std::convert::Into<crate::model::master_authorized_networks_config::CidrBlock>,
4772 {
4773 use std::iter::Iterator;
4774 self.cidr_blocks = v.into_iter().map(|i| i.into()).collect();
4775 self
4776 }
4777
4778 pub fn set_gcp_public_cidrs_access_enabled<T: std::convert::Into<std::option::Option<bool>>>(
4780 mut self,
4781 v: T,
4782 ) -> Self {
4783 self.gcp_public_cidrs_access_enabled = v.into();
4784 self
4785 }
4786
4787 pub fn set_private_endpoint_enforcement_enabled<
4789 T: std::convert::Into<std::option::Option<bool>>,
4790 >(
4791 mut self,
4792 v: T,
4793 ) -> Self {
4794 self.private_endpoint_enforcement_enabled = v.into();
4795 self
4796 }
4797}
4798
4799impl wkt::message::Message for MasterAuthorizedNetworksConfig {
4800 fn typename() -> &'static str {
4801 "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig"
4802 }
4803}
4804
4805pub mod master_authorized_networks_config {
4807 #[allow(unused_imports)]
4808 use super::*;
4809
4810 #[serde_with::serde_as]
4812 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4813 #[serde(default, rename_all = "camelCase")]
4814 #[non_exhaustive]
4815 pub struct CidrBlock {
4816 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4818 pub display_name: std::string::String,
4819
4820 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4822 pub cidr_block: std::string::String,
4823
4824 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4825 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4826 }
4827
4828 impl CidrBlock {
4829 pub fn new() -> Self {
4830 std::default::Default::default()
4831 }
4832
4833 pub fn set_display_name<T: std::convert::Into<std::string::String>>(
4835 mut self,
4836 v: T,
4837 ) -> Self {
4838 self.display_name = v.into();
4839 self
4840 }
4841
4842 pub fn set_cidr_block<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4844 self.cidr_block = v.into();
4845 self
4846 }
4847 }
4848
4849 impl wkt::message::Message for CidrBlock {
4850 fn typename() -> &'static str {
4851 "type.googleapis.com/google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock"
4852 }
4853 }
4854}
4855
4856#[serde_with::serde_as]
4859#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4860#[serde(default, rename_all = "camelCase")]
4861#[non_exhaustive]
4862pub struct LegacyAbac {
4863 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4868 pub enabled: bool,
4869
4870 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4871 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4872}
4873
4874impl LegacyAbac {
4875 pub fn new() -> Self {
4876 std::default::Default::default()
4877 }
4878
4879 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4881 self.enabled = v.into();
4882 self
4883 }
4884}
4885
4886impl wkt::message::Message for LegacyAbac {
4887 fn typename() -> &'static str {
4888 "type.googleapis.com/google.container.v1.LegacyAbac"
4889 }
4890}
4891
4892#[serde_with::serde_as]
4895#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4896#[serde(default, rename_all = "camelCase")]
4897#[non_exhaustive]
4898pub struct NetworkPolicy {
4899 pub provider: crate::model::network_policy::Provider,
4901
4902 #[serde(skip_serializing_if = "wkt::internal::is_default")]
4904 pub enabled: bool,
4905
4906 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4907 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4908}
4909
4910impl NetworkPolicy {
4911 pub fn new() -> Self {
4912 std::default::Default::default()
4913 }
4914
4915 pub fn set_provider<T: std::convert::Into<crate::model::network_policy::Provider>>(
4917 mut self,
4918 v: T,
4919 ) -> Self {
4920 self.provider = v.into();
4921 self
4922 }
4923
4924 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4926 self.enabled = v.into();
4927 self
4928 }
4929}
4930
4931impl wkt::message::Message for NetworkPolicy {
4932 fn typename() -> &'static str {
4933 "type.googleapis.com/google.container.v1.NetworkPolicy"
4934 }
4935}
4936
4937pub mod network_policy {
4939 #[allow(unused_imports)]
4940 use super::*;
4941
4942 #[derive(Clone, Debug, PartialEq)]
4958 #[non_exhaustive]
4959 pub enum Provider {
4960 Unspecified,
4962 Calico,
4964 UnknownValue(provider::UnknownValue),
4969 }
4970
4971 #[doc(hidden)]
4972 pub mod provider {
4973 #[allow(unused_imports)]
4974 use super::*;
4975 #[derive(Clone, Debug, PartialEq)]
4976 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4977 }
4978
4979 impl Provider {
4980 pub fn value(&self) -> std::option::Option<i32> {
4985 match self {
4986 Self::Unspecified => std::option::Option::Some(0),
4987 Self::Calico => std::option::Option::Some(1),
4988 Self::UnknownValue(u) => u.0.value(),
4989 }
4990 }
4991
4992 pub fn name(&self) -> std::option::Option<&str> {
4997 match self {
4998 Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
4999 Self::Calico => std::option::Option::Some("CALICO"),
5000 Self::UnknownValue(u) => u.0.name(),
5001 }
5002 }
5003 }
5004
5005 impl std::default::Default for Provider {
5006 fn default() -> Self {
5007 use std::convert::From;
5008 Self::from(0)
5009 }
5010 }
5011
5012 impl std::fmt::Display for Provider {
5013 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5014 wkt::internal::display_enum(f, self.name(), self.value())
5015 }
5016 }
5017
5018 impl std::convert::From<i32> for Provider {
5019 fn from(value: i32) -> Self {
5020 match value {
5021 0 => Self::Unspecified,
5022 1 => Self::Calico,
5023 _ => Self::UnknownValue(provider::UnknownValue(
5024 wkt::internal::UnknownEnumValue::Integer(value),
5025 )),
5026 }
5027 }
5028 }
5029
5030 impl std::convert::From<&str> for Provider {
5031 fn from(value: &str) -> Self {
5032 use std::string::ToString;
5033 match value {
5034 "PROVIDER_UNSPECIFIED" => Self::Unspecified,
5035 "CALICO" => Self::Calico,
5036 _ => Self::UnknownValue(provider::UnknownValue(
5037 wkt::internal::UnknownEnumValue::String(value.to_string()),
5038 )),
5039 }
5040 }
5041 }
5042
5043 impl serde::ser::Serialize for Provider {
5044 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5045 where
5046 S: serde::Serializer,
5047 {
5048 match self {
5049 Self::Unspecified => serializer.serialize_i32(0),
5050 Self::Calico => serializer.serialize_i32(1),
5051 Self::UnknownValue(u) => u.0.serialize(serializer),
5052 }
5053 }
5054 }
5055
5056 impl<'de> serde::de::Deserialize<'de> for Provider {
5057 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5058 where
5059 D: serde::Deserializer<'de>,
5060 {
5061 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
5062 ".google.container.v1.NetworkPolicy.Provider",
5063 ))
5064 }
5065 }
5066}
5067
5068#[serde_with::serde_as]
5070#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5071#[serde(default, rename_all = "camelCase")]
5072#[non_exhaustive]
5073pub struct BinaryAuthorization {
5074 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5078 #[deprecated]
5079 pub enabled: bool,
5080
5081 pub evaluation_mode: crate::model::binary_authorization::EvaluationMode,
5084
5085 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5086 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5087}
5088
5089impl BinaryAuthorization {
5090 pub fn new() -> Self {
5091 std::default::Default::default()
5092 }
5093
5094 #[deprecated]
5096 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5097 self.enabled = v.into();
5098 self
5099 }
5100
5101 pub fn set_evaluation_mode<
5103 T: std::convert::Into<crate::model::binary_authorization::EvaluationMode>,
5104 >(
5105 mut self,
5106 v: T,
5107 ) -> Self {
5108 self.evaluation_mode = v.into();
5109 self
5110 }
5111}
5112
5113impl wkt::message::Message for BinaryAuthorization {
5114 fn typename() -> &'static str {
5115 "type.googleapis.com/google.container.v1.BinaryAuthorization"
5116 }
5117}
5118
5119pub mod binary_authorization {
5121 #[allow(unused_imports)]
5122 use super::*;
5123
5124 #[derive(Clone, Debug, PartialEq)]
5140 #[non_exhaustive]
5141 pub enum EvaluationMode {
5142 Unspecified,
5144 Disabled,
5146 ProjectSingletonPolicyEnforce,
5150 UnknownValue(evaluation_mode::UnknownValue),
5155 }
5156
5157 #[doc(hidden)]
5158 pub mod evaluation_mode {
5159 #[allow(unused_imports)]
5160 use super::*;
5161 #[derive(Clone, Debug, PartialEq)]
5162 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5163 }
5164
5165 impl EvaluationMode {
5166 pub fn value(&self) -> std::option::Option<i32> {
5171 match self {
5172 Self::Unspecified => std::option::Option::Some(0),
5173 Self::Disabled => std::option::Option::Some(1),
5174 Self::ProjectSingletonPolicyEnforce => std::option::Option::Some(2),
5175 Self::UnknownValue(u) => u.0.value(),
5176 }
5177 }
5178
5179 pub fn name(&self) -> std::option::Option<&str> {
5184 match self {
5185 Self::Unspecified => std::option::Option::Some("EVALUATION_MODE_UNSPECIFIED"),
5186 Self::Disabled => std::option::Option::Some("DISABLED"),
5187 Self::ProjectSingletonPolicyEnforce => {
5188 std::option::Option::Some("PROJECT_SINGLETON_POLICY_ENFORCE")
5189 }
5190 Self::UnknownValue(u) => u.0.name(),
5191 }
5192 }
5193 }
5194
5195 impl std::default::Default for EvaluationMode {
5196 fn default() -> Self {
5197 use std::convert::From;
5198 Self::from(0)
5199 }
5200 }
5201
5202 impl std::fmt::Display for EvaluationMode {
5203 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5204 wkt::internal::display_enum(f, self.name(), self.value())
5205 }
5206 }
5207
5208 impl std::convert::From<i32> for EvaluationMode {
5209 fn from(value: i32) -> Self {
5210 match value {
5211 0 => Self::Unspecified,
5212 1 => Self::Disabled,
5213 2 => Self::ProjectSingletonPolicyEnforce,
5214 _ => Self::UnknownValue(evaluation_mode::UnknownValue(
5215 wkt::internal::UnknownEnumValue::Integer(value),
5216 )),
5217 }
5218 }
5219 }
5220
5221 impl std::convert::From<&str> for EvaluationMode {
5222 fn from(value: &str) -> Self {
5223 use std::string::ToString;
5224 match value {
5225 "EVALUATION_MODE_UNSPECIFIED" => Self::Unspecified,
5226 "DISABLED" => Self::Disabled,
5227 "PROJECT_SINGLETON_POLICY_ENFORCE" => Self::ProjectSingletonPolicyEnforce,
5228 _ => Self::UnknownValue(evaluation_mode::UnknownValue(
5229 wkt::internal::UnknownEnumValue::String(value.to_string()),
5230 )),
5231 }
5232 }
5233 }
5234
5235 impl serde::ser::Serialize for EvaluationMode {
5236 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5237 where
5238 S: serde::Serializer,
5239 {
5240 match self {
5241 Self::Unspecified => serializer.serialize_i32(0),
5242 Self::Disabled => serializer.serialize_i32(1),
5243 Self::ProjectSingletonPolicyEnforce => serializer.serialize_i32(2),
5244 Self::UnknownValue(u) => u.0.serialize(serializer),
5245 }
5246 }
5247 }
5248
5249 impl<'de> serde::de::Deserialize<'de> for EvaluationMode {
5250 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5251 where
5252 D: serde::Deserializer<'de>,
5253 {
5254 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationMode>::new(
5255 ".google.container.v1.BinaryAuthorization.EvaluationMode",
5256 ))
5257 }
5258 }
5259}
5260
5261#[serde_with::serde_as]
5264#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5265#[serde(default, rename_all = "camelCase")]
5266#[non_exhaustive]
5267pub struct PodCIDROverprovisionConfig {
5268 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5271 pub disable: bool,
5272
5273 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5274 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5275}
5276
5277impl PodCIDROverprovisionConfig {
5278 pub fn new() -> Self {
5279 std::default::Default::default()
5280 }
5281
5282 pub fn set_disable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5284 self.disable = v.into();
5285 self
5286 }
5287}
5288
5289impl wkt::message::Message for PodCIDROverprovisionConfig {
5290 fn typename() -> &'static str {
5291 "type.googleapis.com/google.container.v1.PodCIDROverprovisionConfig"
5292 }
5293}
5294
5295#[serde_with::serde_as]
5297#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5298#[serde(default, rename_all = "camelCase")]
5299#[non_exhaustive]
5300pub struct IPAllocationPolicy {
5301 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5306 pub use_ip_aliases: bool,
5307
5308 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5312 pub create_subnetwork: bool,
5313
5314 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5318 pub subnetwork_name: std::string::String,
5319
5320 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5322 #[deprecated]
5323 pub cluster_ipv4_cidr: std::string::String,
5324
5325 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5327 #[deprecated]
5328 pub node_ipv4_cidr: std::string::String,
5329
5330 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5332 #[deprecated]
5333 pub services_ipv4_cidr: std::string::String,
5334
5335 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5343 pub cluster_secondary_range_name: std::string::String,
5344
5345 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5353 pub services_secondary_range_name: std::string::String,
5354
5355 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5371 pub cluster_ipv4_cidr_block: std::string::String,
5372
5373 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5388 pub node_ipv4_cidr_block: std::string::String,
5389
5390 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5406 pub services_ipv4_cidr_block: std::string::String,
5407
5408 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5424 pub tpu_ipv4_cidr_block: std::string::String,
5425
5426 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5431 pub use_routes: bool,
5432
5433 pub stack_type: crate::model::StackType,
5435
5436 pub ipv6_access_type: crate::model::IPv6AccessType,
5438
5439 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5452 pub pod_cidr_overprovision_config:
5453 std::option::Option<crate::model::PodCIDROverprovisionConfig>,
5454
5455 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5457 pub subnet_ipv6_cidr_block: std::string::String,
5458
5459 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5461 pub services_ipv6_cidr_block: std::string::String,
5462
5463 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5468 pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
5469
5470 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5474 #[serde_as(as = "wkt::internal::F64")]
5475 pub default_pod_ipv4_range_utilization: f64,
5476
5477 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5478 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5479}
5480
5481impl IPAllocationPolicy {
5482 pub fn new() -> Self {
5483 std::default::Default::default()
5484 }
5485
5486 pub fn set_use_ip_aliases<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5488 self.use_ip_aliases = v.into();
5489 self
5490 }
5491
5492 pub fn set_create_subnetwork<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5494 self.create_subnetwork = v.into();
5495 self
5496 }
5497
5498 pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5500 self.subnetwork_name = v.into();
5501 self
5502 }
5503
5504 #[deprecated]
5506 pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
5507 mut self,
5508 v: T,
5509 ) -> Self {
5510 self.cluster_ipv4_cidr = v.into();
5511 self
5512 }
5513
5514 #[deprecated]
5516 pub fn set_node_ipv4_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5517 self.node_ipv4_cidr = v.into();
5518 self
5519 }
5520
5521 #[deprecated]
5523 pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
5524 mut self,
5525 v: T,
5526 ) -> Self {
5527 self.services_ipv4_cidr = v.into();
5528 self
5529 }
5530
5531 pub fn set_cluster_secondary_range_name<T: std::convert::Into<std::string::String>>(
5533 mut self,
5534 v: T,
5535 ) -> Self {
5536 self.cluster_secondary_range_name = v.into();
5537 self
5538 }
5539
5540 pub fn set_services_secondary_range_name<T: std::convert::Into<std::string::String>>(
5542 mut self,
5543 v: T,
5544 ) -> Self {
5545 self.services_secondary_range_name = v.into();
5546 self
5547 }
5548
5549 pub fn set_cluster_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5551 mut self,
5552 v: T,
5553 ) -> Self {
5554 self.cluster_ipv4_cidr_block = v.into();
5555 self
5556 }
5557
5558 pub fn set_node_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5560 mut self,
5561 v: T,
5562 ) -> Self {
5563 self.node_ipv4_cidr_block = v.into();
5564 self
5565 }
5566
5567 pub fn set_services_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5569 mut self,
5570 v: T,
5571 ) -> Self {
5572 self.services_ipv4_cidr_block = v.into();
5573 self
5574 }
5575
5576 pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
5578 mut self,
5579 v: T,
5580 ) -> Self {
5581 self.tpu_ipv4_cidr_block = v.into();
5582 self
5583 }
5584
5585 pub fn set_use_routes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5587 self.use_routes = v.into();
5588 self
5589 }
5590
5591 pub fn set_stack_type<T: std::convert::Into<crate::model::StackType>>(mut self, v: T) -> Self {
5593 self.stack_type = v.into();
5594 self
5595 }
5596
5597 pub fn set_ipv6_access_type<T: std::convert::Into<crate::model::IPv6AccessType>>(
5599 mut self,
5600 v: T,
5601 ) -> Self {
5602 self.ipv6_access_type = v.into();
5603 self
5604 }
5605
5606 pub fn set_pod_cidr_overprovision_config<
5608 T: std::convert::Into<std::option::Option<crate::model::PodCIDROverprovisionConfig>>,
5609 >(
5610 mut self,
5611 v: T,
5612 ) -> Self {
5613 self.pod_cidr_overprovision_config = v.into();
5614 self
5615 }
5616
5617 pub fn set_subnet_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
5619 mut self,
5620 v: T,
5621 ) -> Self {
5622 self.subnet_ipv6_cidr_block = v.into();
5623 self
5624 }
5625
5626 pub fn set_services_ipv6_cidr_block<T: std::convert::Into<std::string::String>>(
5628 mut self,
5629 v: T,
5630 ) -> Self {
5631 self.services_ipv6_cidr_block = v.into();
5632 self
5633 }
5634
5635 pub fn set_additional_pod_ranges_config<
5637 T: std::convert::Into<std::option::Option<crate::model::AdditionalPodRangesConfig>>,
5638 >(
5639 mut self,
5640 v: T,
5641 ) -> Self {
5642 self.additional_pod_ranges_config = v.into();
5643 self
5644 }
5645
5646 pub fn set_default_pod_ipv4_range_utilization<T: std::convert::Into<f64>>(
5648 mut self,
5649 v: T,
5650 ) -> Self {
5651 self.default_pod_ipv4_range_utilization = v.into();
5652 self
5653 }
5654}
5655
5656impl wkt::message::Message for IPAllocationPolicy {
5657 fn typename() -> &'static str {
5658 "type.googleapis.com/google.container.v1.IPAllocationPolicy"
5659 }
5660}
5661
5662#[serde_with::serde_as]
5664#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5665#[serde(default, rename_all = "camelCase")]
5666#[non_exhaustive]
5667pub struct Cluster {
5668 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5676 pub name: std::string::String,
5677
5678 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5680 pub description: std::string::String,
5681
5682 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5693 #[deprecated]
5694 pub initial_node_count: i32,
5695
5696 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5708 #[deprecated]
5709 pub node_config: std::option::Option<crate::model::NodeConfig>,
5710
5711 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5717 pub master_auth: std::option::Option<crate::model::MasterAuth>,
5718
5719 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5731 pub logging_service: std::string::String,
5732
5733 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5745 pub monitoring_service: std::string::String,
5746
5747 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5752 pub network: std::string::String,
5753
5754 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5759 pub cluster_ipv4_cidr: std::string::String,
5760
5761 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5763 pub addons_config: std::option::Option<crate::model::AddonsConfig>,
5764
5765 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5769 pub subnetwork: std::string::String,
5770
5771 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5775 pub node_pools: std::vec::Vec<crate::model::NodePool>,
5776
5777 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5789 pub locations: std::vec::Vec<std::string::String>,
5790
5791 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5798 pub enable_kubernetes_alpha: bool,
5799
5800 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
5803 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
5804
5805 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5807 pub label_fingerprint: std::string::String,
5808
5809 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5811 pub legacy_abac: std::option::Option<crate::model::LegacyAbac>,
5812
5813 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5815 pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
5816
5817 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5819 pub ip_allocation_policy: std::option::Option<crate::model::IPAllocationPolicy>,
5820
5821 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5829 #[deprecated]
5830 pub master_authorized_networks_config:
5831 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
5832
5833 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5835 pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
5836
5837 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5839 pub binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
5840
5841 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5843 pub autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
5844
5845 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5847 pub network_config: std::option::Option<crate::model::NetworkConfig>,
5848
5849 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5853 pub default_max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
5854
5855 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5858 pub resource_usage_export_config: std::option::Option<crate::model::ResourceUsageExportConfig>,
5859
5860 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5862 pub authenticator_groups_config: std::option::Option<crate::model::AuthenticatorGroupsConfig>,
5863
5864 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5866 pub private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
5867
5868 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5870 pub database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
5871
5872 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5874 pub vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
5875
5876 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5878 pub shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
5879
5880 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5887 pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
5888
5889 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5892 pub workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
5893
5894 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5897 pub mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
5898
5899 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5901 pub cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
5902
5903 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5905 pub notification_config: std::option::Option<crate::model::NotificationConfig>,
5906
5907 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5910 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
5911
5912 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5914 pub identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
5915
5916 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5918 pub self_link: std::string::String,
5919
5920 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5924 #[deprecated]
5925 pub zone: std::string::String,
5926
5927 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5934 pub endpoint: std::string::String,
5935
5936 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5950 pub initial_cluster_version: std::string::String,
5951
5952 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5954 pub current_master_version: std::string::String,
5955
5956 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5962 #[deprecated]
5963 pub current_node_version: std::string::String,
5964
5965 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5968 pub create_time: std::string::String,
5969
5970 pub status: crate::model::cluster::Status,
5972
5973 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5977 #[deprecated]
5978 pub status_message: std::string::String,
5979
5980 #[serde(skip_serializing_if = "wkt::internal::is_default")]
5985 pub node_ipv4_cidr_size: i32,
5986
5987 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5993 pub services_ipv4_cidr: std::string::String,
5994
5995 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5997 #[deprecated]
5998 pub instance_group_urls: std::vec::Vec<std::string::String>,
5999
6000 #[serde(skip_serializing_if = "wkt::internal::is_default")]
6003 #[deprecated]
6004 pub current_node_count: i32,
6005
6006 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6009 pub expire_time: std::string::String,
6010
6011 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6017 pub location: std::string::String,
6018
6019 #[serde(skip_serializing_if = "wkt::internal::is_default")]
6021 pub enable_tpu: bool,
6022
6023 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6027 pub tpu_ipv4_cidr_block: std::string::String,
6028
6029 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6031 pub conditions: std::vec::Vec<crate::model::StatusCondition>,
6032
6033 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6035 pub autopilot: std::option::Option<crate::model::Autopilot>,
6036
6037 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6039 pub id: std::string::String,
6040
6041 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6044 pub node_pool_defaults: std::option::Option<crate::model::NodePoolDefaults>,
6045
6046 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6048 pub logging_config: std::option::Option<crate::model::LoggingConfig>,
6049
6050 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6052 pub monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
6053
6054 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6057 pub node_pool_auto_config: std::option::Option<crate::model::NodePoolAutoConfig>,
6058
6059 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6063 pub etag: std::string::String,
6064
6065 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6067 pub fleet: std::option::Option<crate::model::Fleet>,
6068
6069 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6071 pub security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
6072
6073 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6075 pub control_plane_endpoints_config:
6076 std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
6077
6078 #[serde(rename = "enableK8sBetaApis")]
6080 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6081 pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
6082
6083 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6085 pub enterprise_config: std::option::Option<crate::model::EnterpriseConfig>,
6086
6087 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6089 pub secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
6090
6091 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6093 pub compliance_posture_config: std::option::Option<crate::model::CompliancePostureConfig>,
6094
6095 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6097 pub satisfies_pzs: std::option::Option<bool>,
6098
6099 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6101 pub satisfies_pzi: std::option::Option<bool>,
6102
6103 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6105 pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
6106
6107 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6110 pub rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
6111
6112 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6113 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6114}
6115
6116impl Cluster {
6117 pub fn new() -> Self {
6118 std::default::Default::default()
6119 }
6120
6121 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6123 self.name = v.into();
6124 self
6125 }
6126
6127 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6129 self.description = v.into();
6130 self
6131 }
6132
6133 #[deprecated]
6135 pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6136 self.initial_node_count = v.into();
6137 self
6138 }
6139
6140 #[deprecated]
6142 pub fn set_node_config<T: std::convert::Into<std::option::Option<crate::model::NodeConfig>>>(
6143 mut self,
6144 v: T,
6145 ) -> Self {
6146 self.node_config = v.into();
6147 self
6148 }
6149
6150 pub fn set_master_auth<T: std::convert::Into<std::option::Option<crate::model::MasterAuth>>>(
6152 mut self,
6153 v: T,
6154 ) -> Self {
6155 self.master_auth = v.into();
6156 self
6157 }
6158
6159 pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6161 self.logging_service = v.into();
6162 self
6163 }
6164
6165 pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
6167 mut self,
6168 v: T,
6169 ) -> Self {
6170 self.monitoring_service = v.into();
6171 self
6172 }
6173
6174 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6176 self.network = v.into();
6177 self
6178 }
6179
6180 pub fn set_cluster_ipv4_cidr<T: std::convert::Into<std::string::String>>(
6182 mut self,
6183 v: T,
6184 ) -> Self {
6185 self.cluster_ipv4_cidr = v.into();
6186 self
6187 }
6188
6189 pub fn set_addons_config<
6191 T: std::convert::Into<std::option::Option<crate::model::AddonsConfig>>,
6192 >(
6193 mut self,
6194 v: T,
6195 ) -> Self {
6196 self.addons_config = v.into();
6197 self
6198 }
6199
6200 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6202 self.subnetwork = v.into();
6203 self
6204 }
6205
6206 pub fn set_node_pools<T, V>(mut self, v: T) -> Self
6208 where
6209 T: std::iter::IntoIterator<Item = V>,
6210 V: std::convert::Into<crate::model::NodePool>,
6211 {
6212 use std::iter::Iterator;
6213 self.node_pools = v.into_iter().map(|i| i.into()).collect();
6214 self
6215 }
6216
6217 pub fn set_locations<T, V>(mut self, v: T) -> Self
6219 where
6220 T: std::iter::IntoIterator<Item = V>,
6221 V: std::convert::Into<std::string::String>,
6222 {
6223 use std::iter::Iterator;
6224 self.locations = v.into_iter().map(|i| i.into()).collect();
6225 self
6226 }
6227
6228 pub fn set_enable_kubernetes_alpha<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6230 self.enable_kubernetes_alpha = v.into();
6231 self
6232 }
6233
6234 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
6236 where
6237 T: std::iter::IntoIterator<Item = (K, V)>,
6238 K: std::convert::Into<std::string::String>,
6239 V: std::convert::Into<std::string::String>,
6240 {
6241 use std::iter::Iterator;
6242 self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6243 self
6244 }
6245
6246 pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
6248 mut self,
6249 v: T,
6250 ) -> Self {
6251 self.label_fingerprint = v.into();
6252 self
6253 }
6254
6255 pub fn set_legacy_abac<T: std::convert::Into<std::option::Option<crate::model::LegacyAbac>>>(
6257 mut self,
6258 v: T,
6259 ) -> Self {
6260 self.legacy_abac = v.into();
6261 self
6262 }
6263
6264 pub fn set_network_policy<
6266 T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
6267 >(
6268 mut self,
6269 v: T,
6270 ) -> Self {
6271 self.network_policy = v.into();
6272 self
6273 }
6274
6275 pub fn set_ip_allocation_policy<
6277 T: std::convert::Into<std::option::Option<crate::model::IPAllocationPolicy>>,
6278 >(
6279 mut self,
6280 v: T,
6281 ) -> Self {
6282 self.ip_allocation_policy = v.into();
6283 self
6284 }
6285
6286 #[deprecated]
6288 pub fn set_master_authorized_networks_config<
6289 T: std::convert::Into<std::option::Option<crate::model::MasterAuthorizedNetworksConfig>>,
6290 >(
6291 mut self,
6292 v: T,
6293 ) -> Self {
6294 self.master_authorized_networks_config = v.into();
6295 self
6296 }
6297
6298 pub fn set_maintenance_policy<
6300 T: std::convert::Into<std::option::Option<crate::model::MaintenancePolicy>>,
6301 >(
6302 mut self,
6303 v: T,
6304 ) -> Self {
6305 self.maintenance_policy = v.into();
6306 self
6307 }
6308
6309 pub fn set_binary_authorization<
6311 T: std::convert::Into<std::option::Option<crate::model::BinaryAuthorization>>,
6312 >(
6313 mut self,
6314 v: T,
6315 ) -> Self {
6316 self.binary_authorization = v.into();
6317 self
6318 }
6319
6320 pub fn set_autoscaling<
6322 T: std::convert::Into<std::option::Option<crate::model::ClusterAutoscaling>>,
6323 >(
6324 mut self,
6325 v: T,
6326 ) -> Self {
6327 self.autoscaling = v.into();
6328 self
6329 }
6330
6331 pub fn set_network_config<
6333 T: std::convert::Into<std::option::Option<crate::model::NetworkConfig>>,
6334 >(
6335 mut self,
6336 v: T,
6337 ) -> Self {
6338 self.network_config = v.into();
6339 self
6340 }
6341
6342 pub fn set_default_max_pods_constraint<
6344 T: std::convert::Into<std::option::Option<crate::model::MaxPodsConstraint>>,
6345 >(
6346 mut self,
6347 v: T,
6348 ) -> Self {
6349 self.default_max_pods_constraint = v.into();
6350 self
6351 }
6352
6353 pub fn set_resource_usage_export_config<
6355 T: std::convert::Into<std::option::Option<crate::model::ResourceUsageExportConfig>>,
6356 >(
6357 mut self,
6358 v: T,
6359 ) -> Self {
6360 self.resource_usage_export_config = v.into();
6361 self
6362 }
6363
6364 pub fn set_authenticator_groups_config<
6366 T: std::convert::Into<std::option::Option<crate::model::AuthenticatorGroupsConfig>>,
6367 >(
6368 mut self,
6369 v: T,
6370 ) -> Self {
6371 self.authenticator_groups_config = v.into();
6372 self
6373 }
6374
6375 pub fn set_private_cluster_config<
6377 T: std::convert::Into<std::option::Option<crate::model::PrivateClusterConfig>>,
6378 >(
6379 mut self,
6380 v: T,
6381 ) -> Self {
6382 self.private_cluster_config = v.into();
6383 self
6384 }
6385
6386 pub fn set_database_encryption<
6388 T: std::convert::Into<std::option::Option<crate::model::DatabaseEncryption>>,
6389 >(
6390 mut self,
6391 v: T,
6392 ) -> Self {
6393 self.database_encryption = v.into();
6394 self
6395 }
6396
6397 pub fn set_vertical_pod_autoscaling<
6399 T: std::convert::Into<std::option::Option<crate::model::VerticalPodAutoscaling>>,
6400 >(
6401 mut self,
6402 v: T,
6403 ) -> Self {
6404 self.vertical_pod_autoscaling = v.into();
6405 self
6406 }
6407
6408 pub fn set_shielded_nodes<
6410 T: std::convert::Into<std::option::Option<crate::model::ShieldedNodes>>,
6411 >(
6412 mut self,
6413 v: T,
6414 ) -> Self {
6415 self.shielded_nodes = v.into();
6416 self
6417 }
6418
6419 pub fn set_release_channel<
6421 T: std::convert::Into<std::option::Option<crate::model::ReleaseChannel>>,
6422 >(
6423 mut self,
6424 v: T,
6425 ) -> Self {
6426 self.release_channel = v.into();
6427 self
6428 }
6429
6430 pub fn set_workload_identity_config<
6432 T: std::convert::Into<std::option::Option<crate::model::WorkloadIdentityConfig>>,
6433 >(
6434 mut self,
6435 v: T,
6436 ) -> Self {
6437 self.workload_identity_config = v.into();
6438 self
6439 }
6440
6441 pub fn set_mesh_certificates<
6443 T: std::convert::Into<std::option::Option<crate::model::MeshCertificates>>,
6444 >(
6445 mut self,
6446 v: T,
6447 ) -> Self {
6448 self.mesh_certificates = v.into();
6449 self
6450 }
6451
6452 pub fn set_cost_management_config<
6454 T: std::convert::Into<std::option::Option<crate::model::CostManagementConfig>>,
6455 >(
6456 mut self,
6457 v: T,
6458 ) -> Self {
6459 self.cost_management_config = v.into();
6460 self
6461 }
6462
6463 pub fn set_notification_config<
6465 T: std::convert::Into<std::option::Option<crate::model::NotificationConfig>>,
6466 >(
6467 mut self,
6468 v: T,
6469 ) -> Self {
6470 self.notification_config = v.into();
6471 self
6472 }
6473
6474 pub fn set_confidential_nodes<
6476 T: std::convert::Into<std::option::Option<crate::model::ConfidentialNodes>>,
6477 >(
6478 mut self,
6479 v: T,
6480 ) -> Self {
6481 self.confidential_nodes = v.into();
6482 self
6483 }
6484
6485 pub fn set_identity_service_config<
6487 T: std::convert::Into<std::option::Option<crate::model::IdentityServiceConfig>>,
6488 >(
6489 mut self,
6490 v: T,
6491 ) -> Self {
6492 self.identity_service_config = v.into();
6493 self
6494 }
6495
6496 pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6498 self.self_link = v.into();
6499 self
6500 }
6501
6502 #[deprecated]
6504 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6505 self.zone = v.into();
6506 self
6507 }
6508
6509 pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6511 self.endpoint = v.into();
6512 self
6513 }
6514
6515 pub fn set_initial_cluster_version<T: std::convert::Into<std::string::String>>(
6517 mut self,
6518 v: T,
6519 ) -> Self {
6520 self.initial_cluster_version = v.into();
6521 self
6522 }
6523
6524 pub fn set_current_master_version<T: std::convert::Into<std::string::String>>(
6526 mut self,
6527 v: T,
6528 ) -> Self {
6529 self.current_master_version = v.into();
6530 self
6531 }
6532
6533 #[deprecated]
6535 pub fn set_current_node_version<T: std::convert::Into<std::string::String>>(
6536 mut self,
6537 v: T,
6538 ) -> Self {
6539 self.current_node_version = v.into();
6540 self
6541 }
6542
6543 pub fn set_create_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6545 self.create_time = v.into();
6546 self
6547 }
6548
6549 pub fn set_status<T: std::convert::Into<crate::model::cluster::Status>>(
6551 mut self,
6552 v: T,
6553 ) -> Self {
6554 self.status = v.into();
6555 self
6556 }
6557
6558 #[deprecated]
6560 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6561 self.status_message = v.into();
6562 self
6563 }
6564
6565 pub fn set_node_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6567 self.node_ipv4_cidr_size = v.into();
6568 self
6569 }
6570
6571 pub fn set_services_ipv4_cidr<T: std::convert::Into<std::string::String>>(
6573 mut self,
6574 v: T,
6575 ) -> Self {
6576 self.services_ipv4_cidr = v.into();
6577 self
6578 }
6579
6580 #[deprecated]
6582 pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
6583 where
6584 T: std::iter::IntoIterator<Item = V>,
6585 V: std::convert::Into<std::string::String>,
6586 {
6587 use std::iter::Iterator;
6588 self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
6589 self
6590 }
6591
6592 #[deprecated]
6594 pub fn set_current_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6595 self.current_node_count = v.into();
6596 self
6597 }
6598
6599 pub fn set_expire_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6601 self.expire_time = v.into();
6602 self
6603 }
6604
6605 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6607 self.location = v.into();
6608 self
6609 }
6610
6611 pub fn set_enable_tpu<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6613 self.enable_tpu = v.into();
6614 self
6615 }
6616
6617 pub fn set_tpu_ipv4_cidr_block<T: std::convert::Into<std::string::String>>(
6619 mut self,
6620 v: T,
6621 ) -> Self {
6622 self.tpu_ipv4_cidr_block = v.into();
6623 self
6624 }
6625
6626 pub fn set_conditions<T, V>(mut self, v: T) -> Self
6628 where
6629 T: std::iter::IntoIterator<Item = V>,
6630 V: std::convert::Into<crate::model::StatusCondition>,
6631 {
6632 use std::iter::Iterator;
6633 self.conditions = v.into_iter().map(|i| i.into()).collect();
6634 self
6635 }
6636
6637 pub fn set_autopilot<T: std::convert::Into<std::option::Option<crate::model::Autopilot>>>(
6639 mut self,
6640 v: T,
6641 ) -> Self {
6642 self.autopilot = v.into();
6643 self
6644 }
6645
6646 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6648 self.id = v.into();
6649 self
6650 }
6651
6652 pub fn set_node_pool_defaults<
6654 T: std::convert::Into<std::option::Option<crate::model::NodePoolDefaults>>,
6655 >(
6656 mut self,
6657 v: T,
6658 ) -> Self {
6659 self.node_pool_defaults = v.into();
6660 self
6661 }
6662
6663 pub fn set_logging_config<
6665 T: std::convert::Into<std::option::Option<crate::model::LoggingConfig>>,
6666 >(
6667 mut self,
6668 v: T,
6669 ) -> Self {
6670 self.logging_config = v.into();
6671 self
6672 }
6673
6674 pub fn set_monitoring_config<
6676 T: std::convert::Into<std::option::Option<crate::model::MonitoringConfig>>,
6677 >(
6678 mut self,
6679 v: T,
6680 ) -> Self {
6681 self.monitoring_config = v.into();
6682 self
6683 }
6684
6685 pub fn set_node_pool_auto_config<
6687 T: std::convert::Into<std::option::Option<crate::model::NodePoolAutoConfig>>,
6688 >(
6689 mut self,
6690 v: T,
6691 ) -> Self {
6692 self.node_pool_auto_config = v.into();
6693 self
6694 }
6695
6696 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6698 self.etag = v.into();
6699 self
6700 }
6701
6702 pub fn set_fleet<T: std::convert::Into<std::option::Option<crate::model::Fleet>>>(
6704 mut self,
6705 v: T,
6706 ) -> Self {
6707 self.fleet = v.into();
6708 self
6709 }
6710
6711 pub fn set_security_posture_config<
6713 T: std::convert::Into<std::option::Option<crate::model::SecurityPostureConfig>>,
6714 >(
6715 mut self,
6716 v: T,
6717 ) -> Self {
6718 self.security_posture_config = v.into();
6719 self
6720 }
6721
6722 pub fn set_control_plane_endpoints_config<
6724 T: std::convert::Into<std::option::Option<crate::model::ControlPlaneEndpointsConfig>>,
6725 >(
6726 mut self,
6727 v: T,
6728 ) -> Self {
6729 self.control_plane_endpoints_config = v.into();
6730 self
6731 }
6732
6733 pub fn set_enable_k8s_beta_apis<
6735 T: std::convert::Into<std::option::Option<crate::model::K8sBetaAPIConfig>>,
6736 >(
6737 mut self,
6738 v: T,
6739 ) -> Self {
6740 self.enable_k8s_beta_apis = v.into();
6741 self
6742 }
6743
6744 pub fn set_enterprise_config<
6746 T: std::convert::Into<std::option::Option<crate::model::EnterpriseConfig>>,
6747 >(
6748 mut self,
6749 v: T,
6750 ) -> Self {
6751 self.enterprise_config = v.into();
6752 self
6753 }
6754
6755 pub fn set_secret_manager_config<
6757 T: std::convert::Into<std::option::Option<crate::model::SecretManagerConfig>>,
6758 >(
6759 mut self,
6760 v: T,
6761 ) -> Self {
6762 self.secret_manager_config = v.into();
6763 self
6764 }
6765
6766 pub fn set_compliance_posture_config<
6768 T: std::convert::Into<std::option::Option<crate::model::CompliancePostureConfig>>,
6769 >(
6770 mut self,
6771 v: T,
6772 ) -> Self {
6773 self.compliance_posture_config = v.into();
6774 self
6775 }
6776
6777 pub fn set_satisfies_pzs<T: std::convert::Into<std::option::Option<bool>>>(
6779 mut self,
6780 v: T,
6781 ) -> Self {
6782 self.satisfies_pzs = v.into();
6783 self
6784 }
6785
6786 pub fn set_satisfies_pzi<T: std::convert::Into<std::option::Option<bool>>>(
6788 mut self,
6789 v: T,
6790 ) -> Self {
6791 self.satisfies_pzi = v.into();
6792 self
6793 }
6794
6795 pub fn set_user_managed_keys_config<
6797 T: std::convert::Into<std::option::Option<crate::model::UserManagedKeysConfig>>,
6798 >(
6799 mut self,
6800 v: T,
6801 ) -> Self {
6802 self.user_managed_keys_config = v.into();
6803 self
6804 }
6805
6806 pub fn set_rbac_binding_config<
6808 T: std::convert::Into<std::option::Option<crate::model::RBACBindingConfig>>,
6809 >(
6810 mut self,
6811 v: T,
6812 ) -> Self {
6813 self.rbac_binding_config = v.into();
6814 self
6815 }
6816}
6817
6818impl wkt::message::Message for Cluster {
6819 fn typename() -> &'static str {
6820 "type.googleapis.com/google.container.v1.Cluster"
6821 }
6822}
6823
6824pub mod cluster {
6826 #[allow(unused_imports)]
6827 use super::*;
6828
6829 #[derive(Clone, Debug, PartialEq)]
6845 #[non_exhaustive]
6846 pub enum Status {
6847 Unspecified,
6849 Provisioning,
6851 Running,
6854 Reconciling,
6858 Stopping,
6860 Error,
6863 Degraded,
6866 UnknownValue(status::UnknownValue),
6871 }
6872
6873 #[doc(hidden)]
6874 pub mod status {
6875 #[allow(unused_imports)]
6876 use super::*;
6877 #[derive(Clone, Debug, PartialEq)]
6878 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6879 }
6880
6881 impl Status {
6882 pub fn value(&self) -> std::option::Option<i32> {
6887 match self {
6888 Self::Unspecified => std::option::Option::Some(0),
6889 Self::Provisioning => std::option::Option::Some(1),
6890 Self::Running => std::option::Option::Some(2),
6891 Self::Reconciling => std::option::Option::Some(3),
6892 Self::Stopping => std::option::Option::Some(4),
6893 Self::Error => std::option::Option::Some(5),
6894 Self::Degraded => std::option::Option::Some(6),
6895 Self::UnknownValue(u) => u.0.value(),
6896 }
6897 }
6898
6899 pub fn name(&self) -> std::option::Option<&str> {
6904 match self {
6905 Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
6906 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
6907 Self::Running => std::option::Option::Some("RUNNING"),
6908 Self::Reconciling => std::option::Option::Some("RECONCILING"),
6909 Self::Stopping => std::option::Option::Some("STOPPING"),
6910 Self::Error => std::option::Option::Some("ERROR"),
6911 Self::Degraded => std::option::Option::Some("DEGRADED"),
6912 Self::UnknownValue(u) => u.0.name(),
6913 }
6914 }
6915 }
6916
6917 impl std::default::Default for Status {
6918 fn default() -> Self {
6919 use std::convert::From;
6920 Self::from(0)
6921 }
6922 }
6923
6924 impl std::fmt::Display for Status {
6925 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6926 wkt::internal::display_enum(f, self.name(), self.value())
6927 }
6928 }
6929
6930 impl std::convert::From<i32> for Status {
6931 fn from(value: i32) -> Self {
6932 match value {
6933 0 => Self::Unspecified,
6934 1 => Self::Provisioning,
6935 2 => Self::Running,
6936 3 => Self::Reconciling,
6937 4 => Self::Stopping,
6938 5 => Self::Error,
6939 6 => Self::Degraded,
6940 _ => Self::UnknownValue(status::UnknownValue(
6941 wkt::internal::UnknownEnumValue::Integer(value),
6942 )),
6943 }
6944 }
6945 }
6946
6947 impl std::convert::From<&str> for Status {
6948 fn from(value: &str) -> Self {
6949 use std::string::ToString;
6950 match value {
6951 "STATUS_UNSPECIFIED" => Self::Unspecified,
6952 "PROVISIONING" => Self::Provisioning,
6953 "RUNNING" => Self::Running,
6954 "RECONCILING" => Self::Reconciling,
6955 "STOPPING" => Self::Stopping,
6956 "ERROR" => Self::Error,
6957 "DEGRADED" => Self::Degraded,
6958 _ => Self::UnknownValue(status::UnknownValue(
6959 wkt::internal::UnknownEnumValue::String(value.to_string()),
6960 )),
6961 }
6962 }
6963 }
6964
6965 impl serde::ser::Serialize for Status {
6966 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6967 where
6968 S: serde::Serializer,
6969 {
6970 match self {
6971 Self::Unspecified => serializer.serialize_i32(0),
6972 Self::Provisioning => serializer.serialize_i32(1),
6973 Self::Running => serializer.serialize_i32(2),
6974 Self::Reconciling => serializer.serialize_i32(3),
6975 Self::Stopping => serializer.serialize_i32(4),
6976 Self::Error => serializer.serialize_i32(5),
6977 Self::Degraded => serializer.serialize_i32(6),
6978 Self::UnknownValue(u) => u.0.serialize(serializer),
6979 }
6980 }
6981 }
6982
6983 impl<'de> serde::de::Deserialize<'de> for Status {
6984 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6985 where
6986 D: serde::Deserializer<'de>,
6987 {
6988 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
6989 ".google.container.v1.Cluster.Status",
6990 ))
6991 }
6992 }
6993}
6994
6995#[serde_with::serde_as]
6998#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6999#[serde(default, rename_all = "camelCase")]
7000#[non_exhaustive]
7001pub struct RBACBindingConfig {
7002 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7005 pub enable_insecure_binding_system_unauthenticated: std::option::Option<bool>,
7006
7007 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7010 pub enable_insecure_binding_system_authenticated: std::option::Option<bool>,
7011
7012 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7013 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7014}
7015
7016impl RBACBindingConfig {
7017 pub fn new() -> Self {
7018 std::default::Default::default()
7019 }
7020
7021 pub fn set_enable_insecure_binding_system_unauthenticated<
7023 T: std::convert::Into<std::option::Option<bool>>,
7024 >(
7025 mut self,
7026 v: T,
7027 ) -> Self {
7028 self.enable_insecure_binding_system_unauthenticated = v.into();
7029 self
7030 }
7031
7032 pub fn set_enable_insecure_binding_system_authenticated<
7034 T: std::convert::Into<std::option::Option<bool>>,
7035 >(
7036 mut self,
7037 v: T,
7038 ) -> Self {
7039 self.enable_insecure_binding_system_authenticated = v.into();
7040 self
7041 }
7042}
7043
7044impl wkt::message::Message for RBACBindingConfig {
7045 fn typename() -> &'static str {
7046 "type.googleapis.com/google.container.v1.RBACBindingConfig"
7047 }
7048}
7049
7050#[serde_with::serde_as]
7053#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7054#[serde(default, rename_all = "camelCase")]
7055#[non_exhaustive]
7056pub struct UserManagedKeysConfig {
7057 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7060 pub cluster_ca: std::string::String,
7061
7062 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7065 pub etcd_api_ca: std::string::String,
7066
7067 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7070 pub etcd_peer_ca: std::string::String,
7071
7072 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7078 pub service_account_signing_keys: std::vec::Vec<std::string::String>,
7079
7080 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7086 pub service_account_verification_keys: std::vec::Vec<std::string::String>,
7087
7088 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7091 pub aggregation_ca: std::string::String,
7092
7093 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7096 pub control_plane_disk_encryption_key: std::string::String,
7097
7098 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7101 pub gkeops_etcd_backup_encryption_key: std::string::String,
7102
7103 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7104 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7105}
7106
7107impl UserManagedKeysConfig {
7108 pub fn new() -> Self {
7109 std::default::Default::default()
7110 }
7111
7112 pub fn set_cluster_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7114 self.cluster_ca = v.into();
7115 self
7116 }
7117
7118 pub fn set_etcd_api_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7120 self.etcd_api_ca = v.into();
7121 self
7122 }
7123
7124 pub fn set_etcd_peer_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7126 self.etcd_peer_ca = v.into();
7127 self
7128 }
7129
7130 pub fn set_service_account_signing_keys<T, V>(mut self, v: T) -> Self
7132 where
7133 T: std::iter::IntoIterator<Item = V>,
7134 V: std::convert::Into<std::string::String>,
7135 {
7136 use std::iter::Iterator;
7137 self.service_account_signing_keys = v.into_iter().map(|i| i.into()).collect();
7138 self
7139 }
7140
7141 pub fn set_service_account_verification_keys<T, V>(mut self, v: T) -> Self
7143 where
7144 T: std::iter::IntoIterator<Item = V>,
7145 V: std::convert::Into<std::string::String>,
7146 {
7147 use std::iter::Iterator;
7148 self.service_account_verification_keys = v.into_iter().map(|i| i.into()).collect();
7149 self
7150 }
7151
7152 pub fn set_aggregation_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7154 self.aggregation_ca = v.into();
7155 self
7156 }
7157
7158 pub fn set_control_plane_disk_encryption_key<T: std::convert::Into<std::string::String>>(
7160 mut self,
7161 v: T,
7162 ) -> Self {
7163 self.control_plane_disk_encryption_key = v.into();
7164 self
7165 }
7166
7167 pub fn set_gkeops_etcd_backup_encryption_key<T: std::convert::Into<std::string::String>>(
7169 mut self,
7170 v: T,
7171 ) -> Self {
7172 self.gkeops_etcd_backup_encryption_key = v.into();
7173 self
7174 }
7175}
7176
7177impl wkt::message::Message for UserManagedKeysConfig {
7178 fn typename() -> &'static str {
7179 "type.googleapis.com/google.container.v1.UserManagedKeysConfig"
7180 }
7181}
7182
7183#[serde_with::serde_as]
7186#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7187#[serde(default, rename_all = "camelCase")]
7188#[non_exhaustive]
7189pub struct CompliancePostureConfig {
7190 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7192 pub mode: std::option::Option<crate::model::compliance_posture_config::Mode>,
7193
7194 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7196 pub compliance_standards:
7197 std::vec::Vec<crate::model::compliance_posture_config::ComplianceStandard>,
7198
7199 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7200 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7201}
7202
7203impl CompliancePostureConfig {
7204 pub fn new() -> Self {
7205 std::default::Default::default()
7206 }
7207
7208 pub fn set_mode<
7210 T: std::convert::Into<std::option::Option<crate::model::compliance_posture_config::Mode>>,
7211 >(
7212 mut self,
7213 v: T,
7214 ) -> Self {
7215 self.mode = v.into();
7216 self
7217 }
7218
7219 pub fn set_compliance_standards<T, V>(mut self, v: T) -> Self
7221 where
7222 T: std::iter::IntoIterator<Item = V>,
7223 V: std::convert::Into<crate::model::compliance_posture_config::ComplianceStandard>,
7224 {
7225 use std::iter::Iterator;
7226 self.compliance_standards = v.into_iter().map(|i| i.into()).collect();
7227 self
7228 }
7229}
7230
7231impl wkt::message::Message for CompliancePostureConfig {
7232 fn typename() -> &'static str {
7233 "type.googleapis.com/google.container.v1.CompliancePostureConfig"
7234 }
7235}
7236
7237pub mod compliance_posture_config {
7239 #[allow(unused_imports)]
7240 use super::*;
7241
7242 #[serde_with::serde_as]
7244 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7245 #[serde(default, rename_all = "camelCase")]
7246 #[non_exhaustive]
7247 pub struct ComplianceStandard {
7248 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7250 pub standard: std::option::Option<std::string::String>,
7251
7252 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7253 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7254 }
7255
7256 impl ComplianceStandard {
7257 pub fn new() -> Self {
7258 std::default::Default::default()
7259 }
7260
7261 pub fn set_standard<T: std::convert::Into<std::option::Option<std::string::String>>>(
7263 mut self,
7264 v: T,
7265 ) -> Self {
7266 self.standard = v.into();
7267 self
7268 }
7269 }
7270
7271 impl wkt::message::Message for ComplianceStandard {
7272 fn typename() -> &'static str {
7273 "type.googleapis.com/google.container.v1.CompliancePostureConfig.ComplianceStandard"
7274 }
7275 }
7276
7277 #[derive(Clone, Debug, PartialEq)]
7293 #[non_exhaustive]
7294 pub enum Mode {
7295 Unspecified,
7297 Disabled,
7299 Enabled,
7301 UnknownValue(mode::UnknownValue),
7306 }
7307
7308 #[doc(hidden)]
7309 pub mod mode {
7310 #[allow(unused_imports)]
7311 use super::*;
7312 #[derive(Clone, Debug, PartialEq)]
7313 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7314 }
7315
7316 impl Mode {
7317 pub fn value(&self) -> std::option::Option<i32> {
7322 match self {
7323 Self::Unspecified => std::option::Option::Some(0),
7324 Self::Disabled => std::option::Option::Some(1),
7325 Self::Enabled => std::option::Option::Some(2),
7326 Self::UnknownValue(u) => u.0.value(),
7327 }
7328 }
7329
7330 pub fn name(&self) -> std::option::Option<&str> {
7335 match self {
7336 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
7337 Self::Disabled => std::option::Option::Some("DISABLED"),
7338 Self::Enabled => std::option::Option::Some("ENABLED"),
7339 Self::UnknownValue(u) => u.0.name(),
7340 }
7341 }
7342 }
7343
7344 impl std::default::Default for Mode {
7345 fn default() -> Self {
7346 use std::convert::From;
7347 Self::from(0)
7348 }
7349 }
7350
7351 impl std::fmt::Display for Mode {
7352 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7353 wkt::internal::display_enum(f, self.name(), self.value())
7354 }
7355 }
7356
7357 impl std::convert::From<i32> for Mode {
7358 fn from(value: i32) -> Self {
7359 match value {
7360 0 => Self::Unspecified,
7361 1 => Self::Disabled,
7362 2 => Self::Enabled,
7363 _ => Self::UnknownValue(mode::UnknownValue(
7364 wkt::internal::UnknownEnumValue::Integer(value),
7365 )),
7366 }
7367 }
7368 }
7369
7370 impl std::convert::From<&str> for Mode {
7371 fn from(value: &str) -> Self {
7372 use std::string::ToString;
7373 match value {
7374 "MODE_UNSPECIFIED" => Self::Unspecified,
7375 "DISABLED" => Self::Disabled,
7376 "ENABLED" => Self::Enabled,
7377 _ => Self::UnknownValue(mode::UnknownValue(
7378 wkt::internal::UnknownEnumValue::String(value.to_string()),
7379 )),
7380 }
7381 }
7382 }
7383
7384 impl serde::ser::Serialize for Mode {
7385 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7386 where
7387 S: serde::Serializer,
7388 {
7389 match self {
7390 Self::Unspecified => serializer.serialize_i32(0),
7391 Self::Disabled => serializer.serialize_i32(1),
7392 Self::Enabled => serializer.serialize_i32(2),
7393 Self::UnknownValue(u) => u.0.serialize(serializer),
7394 }
7395 }
7396 }
7397
7398 impl<'de> serde::de::Deserialize<'de> for Mode {
7399 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7400 where
7401 D: serde::Deserializer<'de>,
7402 {
7403 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
7404 ".google.container.v1.CompliancePostureConfig.Mode",
7405 ))
7406 }
7407 }
7408}
7409
7410#[serde_with::serde_as]
7412#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7413#[serde(default, rename_all = "camelCase")]
7414#[non_exhaustive]
7415pub struct K8sBetaAPIConfig {
7416 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7418 pub enabled_apis: std::vec::Vec<std::string::String>,
7419
7420 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7421 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7422}
7423
7424impl K8sBetaAPIConfig {
7425 pub fn new() -> Self {
7426 std::default::Default::default()
7427 }
7428
7429 pub fn set_enabled_apis<T, V>(mut self, v: T) -> Self
7431 where
7432 T: std::iter::IntoIterator<Item = V>,
7433 V: std::convert::Into<std::string::String>,
7434 {
7435 use std::iter::Iterator;
7436 self.enabled_apis = v.into_iter().map(|i| i.into()).collect();
7437 self
7438 }
7439}
7440
7441impl wkt::message::Message for K8sBetaAPIConfig {
7442 fn typename() -> &'static str {
7443 "type.googleapis.com/google.container.v1.K8sBetaAPIConfig"
7444 }
7445}
7446
7447#[serde_with::serde_as]
7450#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7451#[serde(default, rename_all = "camelCase")]
7452#[non_exhaustive]
7453pub struct SecurityPostureConfig {
7454 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7456 pub mode: std::option::Option<crate::model::security_posture_config::Mode>,
7457
7458 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7460 pub vulnerability_mode:
7461 std::option::Option<crate::model::security_posture_config::VulnerabilityMode>,
7462
7463 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7464 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7465}
7466
7467impl SecurityPostureConfig {
7468 pub fn new() -> Self {
7469 std::default::Default::default()
7470 }
7471
7472 pub fn set_mode<
7474 T: std::convert::Into<std::option::Option<crate::model::security_posture_config::Mode>>,
7475 >(
7476 mut self,
7477 v: T,
7478 ) -> Self {
7479 self.mode = v.into();
7480 self
7481 }
7482
7483 pub fn set_vulnerability_mode<
7485 T: std::convert::Into<
7486 std::option::Option<crate::model::security_posture_config::VulnerabilityMode>,
7487 >,
7488 >(
7489 mut self,
7490 v: T,
7491 ) -> Self {
7492 self.vulnerability_mode = v.into();
7493 self
7494 }
7495}
7496
7497impl wkt::message::Message for SecurityPostureConfig {
7498 fn typename() -> &'static str {
7499 "type.googleapis.com/google.container.v1.SecurityPostureConfig"
7500 }
7501}
7502
7503pub mod security_posture_config {
7505 #[allow(unused_imports)]
7506 use super::*;
7507
7508 #[derive(Clone, Debug, PartialEq)]
7524 #[non_exhaustive]
7525 pub enum Mode {
7526 Unspecified,
7528 Disabled,
7530 Basic,
7532 Enterprise,
7534 UnknownValue(mode::UnknownValue),
7539 }
7540
7541 #[doc(hidden)]
7542 pub mod mode {
7543 #[allow(unused_imports)]
7544 use super::*;
7545 #[derive(Clone, Debug, PartialEq)]
7546 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7547 }
7548
7549 impl Mode {
7550 pub fn value(&self) -> std::option::Option<i32> {
7555 match self {
7556 Self::Unspecified => std::option::Option::Some(0),
7557 Self::Disabled => std::option::Option::Some(1),
7558 Self::Basic => std::option::Option::Some(2),
7559 Self::Enterprise => std::option::Option::Some(3),
7560 Self::UnknownValue(u) => u.0.value(),
7561 }
7562 }
7563
7564 pub fn name(&self) -> std::option::Option<&str> {
7569 match self {
7570 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
7571 Self::Disabled => std::option::Option::Some("DISABLED"),
7572 Self::Basic => std::option::Option::Some("BASIC"),
7573 Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
7574 Self::UnknownValue(u) => u.0.name(),
7575 }
7576 }
7577 }
7578
7579 impl std::default::Default for Mode {
7580 fn default() -> Self {
7581 use std::convert::From;
7582 Self::from(0)
7583 }
7584 }
7585
7586 impl std::fmt::Display for Mode {
7587 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7588 wkt::internal::display_enum(f, self.name(), self.value())
7589 }
7590 }
7591
7592 impl std::convert::From<i32> for Mode {
7593 fn from(value: i32) -> Self {
7594 match value {
7595 0 => Self::Unspecified,
7596 1 => Self::Disabled,
7597 2 => Self::Basic,
7598 3 => Self::Enterprise,
7599 _ => Self::UnknownValue(mode::UnknownValue(
7600 wkt::internal::UnknownEnumValue::Integer(value),
7601 )),
7602 }
7603 }
7604 }
7605
7606 impl std::convert::From<&str> for Mode {
7607 fn from(value: &str) -> Self {
7608 use std::string::ToString;
7609 match value {
7610 "MODE_UNSPECIFIED" => Self::Unspecified,
7611 "DISABLED" => Self::Disabled,
7612 "BASIC" => Self::Basic,
7613 "ENTERPRISE" => Self::Enterprise,
7614 _ => Self::UnknownValue(mode::UnknownValue(
7615 wkt::internal::UnknownEnumValue::String(value.to_string()),
7616 )),
7617 }
7618 }
7619 }
7620
7621 impl serde::ser::Serialize for Mode {
7622 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7623 where
7624 S: serde::Serializer,
7625 {
7626 match self {
7627 Self::Unspecified => serializer.serialize_i32(0),
7628 Self::Disabled => serializer.serialize_i32(1),
7629 Self::Basic => serializer.serialize_i32(2),
7630 Self::Enterprise => serializer.serialize_i32(3),
7631 Self::UnknownValue(u) => u.0.serialize(serializer),
7632 }
7633 }
7634 }
7635
7636 impl<'de> serde::de::Deserialize<'de> for Mode {
7637 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7638 where
7639 D: serde::Deserializer<'de>,
7640 {
7641 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
7642 ".google.container.v1.SecurityPostureConfig.Mode",
7643 ))
7644 }
7645 }
7646
7647 #[derive(Clone, Debug, PartialEq)]
7663 #[non_exhaustive]
7664 pub enum VulnerabilityMode {
7665 Unspecified,
7667 VulnerabilityDisabled,
7669 VulnerabilityBasic,
7671 VulnerabilityEnterprise,
7674 UnknownValue(vulnerability_mode::UnknownValue),
7679 }
7680
7681 #[doc(hidden)]
7682 pub mod vulnerability_mode {
7683 #[allow(unused_imports)]
7684 use super::*;
7685 #[derive(Clone, Debug, PartialEq)]
7686 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7687 }
7688
7689 impl VulnerabilityMode {
7690 pub fn value(&self) -> std::option::Option<i32> {
7695 match self {
7696 Self::Unspecified => std::option::Option::Some(0),
7697 Self::VulnerabilityDisabled => std::option::Option::Some(1),
7698 Self::VulnerabilityBasic => std::option::Option::Some(2),
7699 Self::VulnerabilityEnterprise => std::option::Option::Some(3),
7700 Self::UnknownValue(u) => u.0.value(),
7701 }
7702 }
7703
7704 pub fn name(&self) -> std::option::Option<&str> {
7709 match self {
7710 Self::Unspecified => std::option::Option::Some("VULNERABILITY_MODE_UNSPECIFIED"),
7711 Self::VulnerabilityDisabled => std::option::Option::Some("VULNERABILITY_DISABLED"),
7712 Self::VulnerabilityBasic => std::option::Option::Some("VULNERABILITY_BASIC"),
7713 Self::VulnerabilityEnterprise => {
7714 std::option::Option::Some("VULNERABILITY_ENTERPRISE")
7715 }
7716 Self::UnknownValue(u) => u.0.name(),
7717 }
7718 }
7719 }
7720
7721 impl std::default::Default for VulnerabilityMode {
7722 fn default() -> Self {
7723 use std::convert::From;
7724 Self::from(0)
7725 }
7726 }
7727
7728 impl std::fmt::Display for VulnerabilityMode {
7729 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7730 wkt::internal::display_enum(f, self.name(), self.value())
7731 }
7732 }
7733
7734 impl std::convert::From<i32> for VulnerabilityMode {
7735 fn from(value: i32) -> Self {
7736 match value {
7737 0 => Self::Unspecified,
7738 1 => Self::VulnerabilityDisabled,
7739 2 => Self::VulnerabilityBasic,
7740 3 => Self::VulnerabilityEnterprise,
7741 _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
7742 wkt::internal::UnknownEnumValue::Integer(value),
7743 )),
7744 }
7745 }
7746 }
7747
7748 impl std::convert::From<&str> for VulnerabilityMode {
7749 fn from(value: &str) -> Self {
7750 use std::string::ToString;
7751 match value {
7752 "VULNERABILITY_MODE_UNSPECIFIED" => Self::Unspecified,
7753 "VULNERABILITY_DISABLED" => Self::VulnerabilityDisabled,
7754 "VULNERABILITY_BASIC" => Self::VulnerabilityBasic,
7755 "VULNERABILITY_ENTERPRISE" => Self::VulnerabilityEnterprise,
7756 _ => Self::UnknownValue(vulnerability_mode::UnknownValue(
7757 wkt::internal::UnknownEnumValue::String(value.to_string()),
7758 )),
7759 }
7760 }
7761 }
7762
7763 impl serde::ser::Serialize for VulnerabilityMode {
7764 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7765 where
7766 S: serde::Serializer,
7767 {
7768 match self {
7769 Self::Unspecified => serializer.serialize_i32(0),
7770 Self::VulnerabilityDisabled => serializer.serialize_i32(1),
7771 Self::VulnerabilityBasic => serializer.serialize_i32(2),
7772 Self::VulnerabilityEnterprise => serializer.serialize_i32(3),
7773 Self::UnknownValue(u) => u.0.serialize(serializer),
7774 }
7775 }
7776 }
7777
7778 impl<'de> serde::de::Deserialize<'de> for VulnerabilityMode {
7779 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7780 where
7781 D: serde::Deserializer<'de>,
7782 {
7783 deserializer.deserialize_any(wkt::internal::EnumVisitor::<VulnerabilityMode>::new(
7784 ".google.container.v1.SecurityPostureConfig.VulnerabilityMode",
7785 ))
7786 }
7787 }
7788}
7789
7790#[serde_with::serde_as]
7793#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7794#[serde(default, rename_all = "camelCase")]
7795#[non_exhaustive]
7796pub struct NodePoolAutoConfig {
7797 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7802 pub network_tags: std::option::Option<crate::model::NetworkTags>,
7803
7804 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7807 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
7808
7809 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7813 pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
7814
7815 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7817 pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
7818
7819 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7820 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7821}
7822
7823impl NodePoolAutoConfig {
7824 pub fn new() -> Self {
7825 std::default::Default::default()
7826 }
7827
7828 pub fn set_network_tags<
7830 T: std::convert::Into<std::option::Option<crate::model::NetworkTags>>,
7831 >(
7832 mut self,
7833 v: T,
7834 ) -> Self {
7835 self.network_tags = v.into();
7836 self
7837 }
7838
7839 pub fn set_resource_manager_tags<
7841 T: std::convert::Into<std::option::Option<crate::model::ResourceManagerTags>>,
7842 >(
7843 mut self,
7844 v: T,
7845 ) -> Self {
7846 self.resource_manager_tags = v.into();
7847 self
7848 }
7849
7850 pub fn set_node_kubelet_config<
7852 T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
7853 >(
7854 mut self,
7855 v: T,
7856 ) -> Self {
7857 self.node_kubelet_config = v.into();
7858 self
7859 }
7860
7861 pub fn set_linux_node_config<
7863 T: std::convert::Into<std::option::Option<crate::model::LinuxNodeConfig>>,
7864 >(
7865 mut self,
7866 v: T,
7867 ) -> Self {
7868 self.linux_node_config = v.into();
7869 self
7870 }
7871}
7872
7873impl wkt::message::Message for NodePoolAutoConfig {
7874 fn typename() -> &'static str {
7875 "type.googleapis.com/google.container.v1.NodePoolAutoConfig"
7876 }
7877}
7878
7879#[serde_with::serde_as]
7881#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7882#[serde(default, rename_all = "camelCase")]
7883#[non_exhaustive]
7884pub struct NodePoolDefaults {
7885 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7887 pub node_config_defaults: std::option::Option<crate::model::NodeConfigDefaults>,
7888
7889 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7890 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7891}
7892
7893impl NodePoolDefaults {
7894 pub fn new() -> Self {
7895 std::default::Default::default()
7896 }
7897
7898 pub fn set_node_config_defaults<
7900 T: std::convert::Into<std::option::Option<crate::model::NodeConfigDefaults>>,
7901 >(
7902 mut self,
7903 v: T,
7904 ) -> Self {
7905 self.node_config_defaults = v.into();
7906 self
7907 }
7908}
7909
7910impl wkt::message::Message for NodePoolDefaults {
7911 fn typename() -> &'static str {
7912 "type.googleapis.com/google.container.v1.NodePoolDefaults"
7913 }
7914}
7915
7916#[serde_with::serde_as]
7918#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7919#[serde(default, rename_all = "camelCase")]
7920#[non_exhaustive]
7921pub struct NodeConfigDefaults {
7922 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7924 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
7925
7926 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7928 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
7929
7930 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7932 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
7933
7934 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7938 pub node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
7939
7940 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7941 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7942}
7943
7944impl NodeConfigDefaults {
7945 pub fn new() -> Self {
7946 std::default::Default::default()
7947 }
7948
7949 pub fn set_gcfs_config<T: std::convert::Into<std::option::Option<crate::model::GcfsConfig>>>(
7951 mut self,
7952 v: T,
7953 ) -> Self {
7954 self.gcfs_config = v.into();
7955 self
7956 }
7957
7958 pub fn set_logging_config<
7960 T: std::convert::Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
7961 >(
7962 mut self,
7963 v: T,
7964 ) -> Self {
7965 self.logging_config = v.into();
7966 self
7967 }
7968
7969 pub fn set_containerd_config<
7971 T: std::convert::Into<std::option::Option<crate::model::ContainerdConfig>>,
7972 >(
7973 mut self,
7974 v: T,
7975 ) -> Self {
7976 self.containerd_config = v.into();
7977 self
7978 }
7979
7980 pub fn set_node_kubelet_config<
7982 T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
7983 >(
7984 mut self,
7985 v: T,
7986 ) -> Self {
7987 self.node_kubelet_config = v.into();
7988 self
7989 }
7990}
7991
7992impl wkt::message::Message for NodeConfigDefaults {
7993 fn typename() -> &'static str {
7994 "type.googleapis.com/google.container.v1.NodeConfigDefaults"
7995 }
7996}
7997
7998#[serde_with::serde_as]
8002#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8003#[serde(default, rename_all = "camelCase")]
8004#[non_exhaustive]
8005pub struct ClusterUpdate {
8006 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8018 pub desired_node_version: std::string::String,
8019
8020 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8032 pub desired_monitoring_service: std::string::String,
8033
8034 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8036 pub desired_addons_config: std::option::Option<crate::model::AddonsConfig>,
8037
8038 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8043 pub desired_node_pool_id: std::string::String,
8044
8045 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8048 pub desired_image_type: std::string::String,
8049
8050 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8052 pub desired_database_encryption: std::option::Option<crate::model::DatabaseEncryption>,
8053
8054 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8056 pub desired_workload_identity_config: std::option::Option<crate::model::WorkloadIdentityConfig>,
8057
8058 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8061 pub desired_mesh_certificates: std::option::Option<crate::model::MeshCertificates>,
8062
8063 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8065 pub desired_shielded_nodes: std::option::Option<crate::model::ShieldedNodes>,
8066
8067 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8069 pub desired_cost_management_config: std::option::Option<crate::model::CostManagementConfig>,
8070
8071 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8073 pub desired_dns_config: std::option::Option<crate::model::DNSConfig>,
8074
8075 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8080 pub desired_node_pool_autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
8081
8082 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8091 pub desired_locations: std::vec::Vec<std::string::String>,
8092
8093 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8099 #[deprecated]
8100 pub desired_master_authorized_networks_config:
8101 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
8102
8103 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8105 pub desired_cluster_autoscaling: std::option::Option<crate::model::ClusterAutoscaling>,
8106
8107 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8109 pub desired_binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
8110
8111 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8123 pub desired_logging_service: std::string::String,
8124
8125 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8127 pub desired_resource_usage_export_config:
8128 std::option::Option<crate::model::ResourceUsageExportConfig>,
8129
8130 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8132 pub desired_vertical_pod_autoscaling: std::option::Option<crate::model::VerticalPodAutoscaling>,
8133
8134 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8148 #[deprecated]
8149 pub desired_private_cluster_config: std::option::Option<crate::model::PrivateClusterConfig>,
8150
8151 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8153 pub desired_intra_node_visibility_config:
8154 std::option::Option<crate::model::IntraNodeVisibilityConfig>,
8155
8156 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8158 pub desired_default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
8159
8160 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8162 pub desired_release_channel: std::option::Option<crate::model::ReleaseChannel>,
8163
8164 #[serde(rename = "desiredL4ilbSubsettingConfig")]
8166 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8167 pub desired_l4ilb_subsetting_config: std::option::Option<crate::model::ILBSubsettingConfig>,
8168
8169 pub desired_datapath_provider: crate::model::DatapathProvider,
8171
8172 pub desired_private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
8174
8175 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8177 pub desired_notification_config: std::option::Option<crate::model::NotificationConfig>,
8178
8179 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8181 pub desired_authenticator_groups_config:
8182 std::option::Option<crate::model::AuthenticatorGroupsConfig>,
8183
8184 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8186 pub desired_logging_config: std::option::Option<crate::model::LoggingConfig>,
8187
8188 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8190 pub desired_monitoring_config: std::option::Option<crate::model::MonitoringConfig>,
8191
8192 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8194 pub desired_identity_service_config: std::option::Option<crate::model::IdentityServiceConfig>,
8195
8196 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8199 pub desired_service_external_ips_config:
8200 std::option::Option<crate::model::ServiceExternalIPsConfig>,
8201
8202 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8209 #[deprecated]
8210 pub desired_enable_private_endpoint: std::option::Option<bool>,
8211
8212 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8218 pub desired_default_enable_private_nodes: std::option::Option<bool>,
8219
8220 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8226 pub desired_control_plane_endpoints_config:
8227 std::option::Option<crate::model::ControlPlaneEndpointsConfig>,
8228
8229 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8240 pub desired_master_version: std::string::String,
8241
8242 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8244 pub desired_gcfs_config: std::option::Option<crate::model::GcfsConfig>,
8245
8246 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8249 pub desired_node_pool_auto_config_network_tags: std::option::Option<crate::model::NetworkTags>,
8250
8251 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8253 pub desired_gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
8254
8255 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8259 pub etag: std::string::String,
8260
8261 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8263 pub desired_node_pool_logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
8264
8265 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8267 pub desired_fleet: std::option::Option<crate::model::Fleet>,
8268
8269 pub desired_stack_type: crate::model::StackType,
8273
8274 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8277 pub additional_pod_ranges_config: std::option::Option<crate::model::AdditionalPodRangesConfig>,
8278
8279 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8283 pub removed_additional_pod_ranges_config:
8284 std::option::Option<crate::model::AdditionalPodRangesConfig>,
8285
8286 #[serde(rename = "enableK8sBetaApis")]
8288 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8289 pub enable_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
8290
8291 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8293 pub desired_security_posture_config: std::option::Option<crate::model::SecurityPostureConfig>,
8294
8295 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8297 pub desired_network_performance_config:
8298 std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
8299
8300 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8302 pub desired_enable_fqdn_network_policy: std::option::Option<bool>,
8303
8304 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8306 pub desired_autopilot_workload_policy_config:
8307 std::option::Option<crate::model::WorkloadPolicyConfig>,
8308
8309 #[serde(rename = "desiredK8sBetaApis")]
8311 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8312 pub desired_k8s_beta_apis: std::option::Option<crate::model::K8sBetaAPIConfig>,
8313
8314 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8316 pub desired_containerd_config: std::option::Option<crate::model::ContainerdConfig>,
8317
8318 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8320 pub desired_enable_multi_networking: std::option::Option<bool>,
8321
8322 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8325 pub desired_node_pool_auto_config_resource_manager_tags:
8326 std::option::Option<crate::model::ResourceManagerTags>,
8327
8328 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8330 pub desired_in_transit_encryption_config:
8331 std::option::Option<crate::model::InTransitEncryptionConfig>,
8332
8333 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8335 pub desired_enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
8336
8337 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8339 pub desired_secret_manager_config: std::option::Option<crate::model::SecretManagerConfig>,
8340
8341 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8343 pub desired_compliance_posture_config:
8344 std::option::Option<crate::model::CompliancePostureConfig>,
8345
8346 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8348 pub desired_node_kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
8349
8350 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8353 pub desired_node_pool_auto_config_kubelet_config:
8354 std::option::Option<crate::model::NodeKubeletConfig>,
8355
8356 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8358 pub user_managed_keys_config: std::option::Option<crate::model::UserManagedKeysConfig>,
8359
8360 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8363 pub desired_rbac_binding_config: std::option::Option<crate::model::RBACBindingConfig>,
8364
8365 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8367 pub desired_enterprise_config: std::option::Option<crate::model::DesiredEnterpriseConfig>,
8368
8369 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8374 pub desired_node_pool_auto_config_linux_node_config:
8375 std::option::Option<crate::model::LinuxNodeConfig>,
8376
8377 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8378 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8379}
8380
8381impl ClusterUpdate {
8382 pub fn new() -> Self {
8383 std::default::Default::default()
8384 }
8385
8386 pub fn set_desired_node_version<T: std::convert::Into<std::string::String>>(
8388 mut self,
8389 v: T,
8390 ) -> Self {
8391 self.desired_node_version = v.into();
8392 self
8393 }
8394
8395 pub fn set_desired_monitoring_service<T: std::convert::Into<std::string::String>>(
8397 mut self,
8398 v: T,
8399 ) -> Self {
8400 self.desired_monitoring_service = v.into();
8401 self
8402 }
8403
8404 pub fn set_desired_addons_config<
8406 T: std::convert::Into<std::option::Option<crate::model::AddonsConfig>>,
8407 >(
8408 mut self,
8409 v: T,
8410 ) -> Self {
8411 self.desired_addons_config = v.into();
8412 self
8413 }
8414
8415 pub fn set_desired_node_pool_id<T: std::convert::Into<std::string::String>>(
8417 mut self,
8418 v: T,
8419 ) -> Self {
8420 self.desired_node_pool_id = v.into();
8421 self
8422 }
8423
8424 pub fn set_desired_image_type<T: std::convert::Into<std::string::String>>(
8426 mut self,
8427 v: T,
8428 ) -> Self {
8429 self.desired_image_type = v.into();
8430 self
8431 }
8432
8433 pub fn set_desired_database_encryption<
8435 T: std::convert::Into<std::option::Option<crate::model::DatabaseEncryption>>,
8436 >(
8437 mut self,
8438 v: T,
8439 ) -> Self {
8440 self.desired_database_encryption = v.into();
8441 self
8442 }
8443
8444 pub fn set_desired_workload_identity_config<
8446 T: std::convert::Into<std::option::Option<crate::model::WorkloadIdentityConfig>>,
8447 >(
8448 mut self,
8449 v: T,
8450 ) -> Self {
8451 self.desired_workload_identity_config = v.into();
8452 self
8453 }
8454
8455 pub fn set_desired_mesh_certificates<
8457 T: std::convert::Into<std::option::Option<crate::model::MeshCertificates>>,
8458 >(
8459 mut self,
8460 v: T,
8461 ) -> Self {
8462 self.desired_mesh_certificates = v.into();
8463 self
8464 }
8465
8466 pub fn set_desired_shielded_nodes<
8468 T: std::convert::Into<std::option::Option<crate::model::ShieldedNodes>>,
8469 >(
8470 mut self,
8471 v: T,
8472 ) -> Self {
8473 self.desired_shielded_nodes = v.into();
8474 self
8475 }
8476
8477 pub fn set_desired_cost_management_config<
8479 T: std::convert::Into<std::option::Option<crate::model::CostManagementConfig>>,
8480 >(
8481 mut self,
8482 v: T,
8483 ) -> Self {
8484 self.desired_cost_management_config = v.into();
8485 self
8486 }
8487
8488 pub fn set_desired_dns_config<
8490 T: std::convert::Into<std::option::Option<crate::model::DNSConfig>>,
8491 >(
8492 mut self,
8493 v: T,
8494 ) -> Self {
8495 self.desired_dns_config = v.into();
8496 self
8497 }
8498
8499 pub fn set_desired_node_pool_autoscaling<
8501 T: std::convert::Into<std::option::Option<crate::model::NodePoolAutoscaling>>,
8502 >(
8503 mut self,
8504 v: T,
8505 ) -> Self {
8506 self.desired_node_pool_autoscaling = v.into();
8507 self
8508 }
8509
8510 pub fn set_desired_locations<T, V>(mut self, v: T) -> Self
8512 where
8513 T: std::iter::IntoIterator<Item = V>,
8514 V: std::convert::Into<std::string::String>,
8515 {
8516 use std::iter::Iterator;
8517 self.desired_locations = v.into_iter().map(|i| i.into()).collect();
8518 self
8519 }
8520
8521 #[deprecated]
8523 pub fn set_desired_master_authorized_networks_config<
8524 T: std::convert::Into<std::option::Option<crate::model::MasterAuthorizedNetworksConfig>>,
8525 >(
8526 mut self,
8527 v: T,
8528 ) -> Self {
8529 self.desired_master_authorized_networks_config = v.into();
8530 self
8531 }
8532
8533 pub fn set_desired_cluster_autoscaling<
8535 T: std::convert::Into<std::option::Option<crate::model::ClusterAutoscaling>>,
8536 >(
8537 mut self,
8538 v: T,
8539 ) -> Self {
8540 self.desired_cluster_autoscaling = v.into();
8541 self
8542 }
8543
8544 pub fn set_desired_binary_authorization<
8546 T: std::convert::Into<std::option::Option<crate::model::BinaryAuthorization>>,
8547 >(
8548 mut self,
8549 v: T,
8550 ) -> Self {
8551 self.desired_binary_authorization = v.into();
8552 self
8553 }
8554
8555 pub fn set_desired_logging_service<T: std::convert::Into<std::string::String>>(
8557 mut self,
8558 v: T,
8559 ) -> Self {
8560 self.desired_logging_service = v.into();
8561 self
8562 }
8563
8564 pub fn set_desired_resource_usage_export_config<
8566 T: std::convert::Into<std::option::Option<crate::model::ResourceUsageExportConfig>>,
8567 >(
8568 mut self,
8569 v: T,
8570 ) -> Self {
8571 self.desired_resource_usage_export_config = v.into();
8572 self
8573 }
8574
8575 pub fn set_desired_vertical_pod_autoscaling<
8577 T: std::convert::Into<std::option::Option<crate::model::VerticalPodAutoscaling>>,
8578 >(
8579 mut self,
8580 v: T,
8581 ) -> Self {
8582 self.desired_vertical_pod_autoscaling = v.into();
8583 self
8584 }
8585
8586 #[deprecated]
8588 pub fn set_desired_private_cluster_config<
8589 T: std::convert::Into<std::option::Option<crate::model::PrivateClusterConfig>>,
8590 >(
8591 mut self,
8592 v: T,
8593 ) -> Self {
8594 self.desired_private_cluster_config = v.into();
8595 self
8596 }
8597
8598 pub fn set_desired_intra_node_visibility_config<
8600 T: std::convert::Into<std::option::Option<crate::model::IntraNodeVisibilityConfig>>,
8601 >(
8602 mut self,
8603 v: T,
8604 ) -> Self {
8605 self.desired_intra_node_visibility_config = v.into();
8606 self
8607 }
8608
8609 pub fn set_desired_default_snat_status<
8611 T: std::convert::Into<std::option::Option<crate::model::DefaultSnatStatus>>,
8612 >(
8613 mut self,
8614 v: T,
8615 ) -> Self {
8616 self.desired_default_snat_status = v.into();
8617 self
8618 }
8619
8620 pub fn set_desired_release_channel<
8622 T: std::convert::Into<std::option::Option<crate::model::ReleaseChannel>>,
8623 >(
8624 mut self,
8625 v: T,
8626 ) -> Self {
8627 self.desired_release_channel = v.into();
8628 self
8629 }
8630
8631 pub fn set_desired_l4ilb_subsetting_config<
8633 T: std::convert::Into<std::option::Option<crate::model::ILBSubsettingConfig>>,
8634 >(
8635 mut self,
8636 v: T,
8637 ) -> Self {
8638 self.desired_l4ilb_subsetting_config = v.into();
8639 self
8640 }
8641
8642 pub fn set_desired_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
8644 mut self,
8645 v: T,
8646 ) -> Self {
8647 self.desired_datapath_provider = v.into();
8648 self
8649 }
8650
8651 pub fn set_desired_private_ipv6_google_access<
8653 T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
8654 >(
8655 mut self,
8656 v: T,
8657 ) -> Self {
8658 self.desired_private_ipv6_google_access = v.into();
8659 self
8660 }
8661
8662 pub fn set_desired_notification_config<
8664 T: std::convert::Into<std::option::Option<crate::model::NotificationConfig>>,
8665 >(
8666 mut self,
8667 v: T,
8668 ) -> Self {
8669 self.desired_notification_config = v.into();
8670 self
8671 }
8672
8673 pub fn set_desired_authenticator_groups_config<
8675 T: std::convert::Into<std::option::Option<crate::model::AuthenticatorGroupsConfig>>,
8676 >(
8677 mut self,
8678 v: T,
8679 ) -> Self {
8680 self.desired_authenticator_groups_config = v.into();
8681 self
8682 }
8683
8684 pub fn set_desired_logging_config<
8686 T: std::convert::Into<std::option::Option<crate::model::LoggingConfig>>,
8687 >(
8688 mut self,
8689 v: T,
8690 ) -> Self {
8691 self.desired_logging_config = v.into();
8692 self
8693 }
8694
8695 pub fn set_desired_monitoring_config<
8697 T: std::convert::Into<std::option::Option<crate::model::MonitoringConfig>>,
8698 >(
8699 mut self,
8700 v: T,
8701 ) -> Self {
8702 self.desired_monitoring_config = v.into();
8703 self
8704 }
8705
8706 pub fn set_desired_identity_service_config<
8708 T: std::convert::Into<std::option::Option<crate::model::IdentityServiceConfig>>,
8709 >(
8710 mut self,
8711 v: T,
8712 ) -> Self {
8713 self.desired_identity_service_config = v.into();
8714 self
8715 }
8716
8717 pub fn set_desired_service_external_ips_config<
8719 T: std::convert::Into<std::option::Option<crate::model::ServiceExternalIPsConfig>>,
8720 >(
8721 mut self,
8722 v: T,
8723 ) -> Self {
8724 self.desired_service_external_ips_config = v.into();
8725 self
8726 }
8727
8728 #[deprecated]
8730 pub fn set_desired_enable_private_endpoint<T: std::convert::Into<std::option::Option<bool>>>(
8731 mut self,
8732 v: T,
8733 ) -> Self {
8734 self.desired_enable_private_endpoint = v.into();
8735 self
8736 }
8737
8738 pub fn set_desired_default_enable_private_nodes<
8740 T: std::convert::Into<std::option::Option<bool>>,
8741 >(
8742 mut self,
8743 v: T,
8744 ) -> Self {
8745 self.desired_default_enable_private_nodes = v.into();
8746 self
8747 }
8748
8749 pub fn set_desired_control_plane_endpoints_config<
8751 T: std::convert::Into<std::option::Option<crate::model::ControlPlaneEndpointsConfig>>,
8752 >(
8753 mut self,
8754 v: T,
8755 ) -> Self {
8756 self.desired_control_plane_endpoints_config = v.into();
8757 self
8758 }
8759
8760 pub fn set_desired_master_version<T: std::convert::Into<std::string::String>>(
8762 mut self,
8763 v: T,
8764 ) -> Self {
8765 self.desired_master_version = v.into();
8766 self
8767 }
8768
8769 pub fn set_desired_gcfs_config<
8771 T: std::convert::Into<std::option::Option<crate::model::GcfsConfig>>,
8772 >(
8773 mut self,
8774 v: T,
8775 ) -> Self {
8776 self.desired_gcfs_config = v.into();
8777 self
8778 }
8779
8780 pub fn set_desired_node_pool_auto_config_network_tags<
8782 T: std::convert::Into<std::option::Option<crate::model::NetworkTags>>,
8783 >(
8784 mut self,
8785 v: T,
8786 ) -> Self {
8787 self.desired_node_pool_auto_config_network_tags = v.into();
8788 self
8789 }
8790
8791 pub fn set_desired_gateway_api_config<
8793 T: std::convert::Into<std::option::Option<crate::model::GatewayAPIConfig>>,
8794 >(
8795 mut self,
8796 v: T,
8797 ) -> Self {
8798 self.desired_gateway_api_config = v.into();
8799 self
8800 }
8801
8802 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8804 self.etag = v.into();
8805 self
8806 }
8807
8808 pub fn set_desired_node_pool_logging_config<
8810 T: std::convert::Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
8811 >(
8812 mut self,
8813 v: T,
8814 ) -> Self {
8815 self.desired_node_pool_logging_config = v.into();
8816 self
8817 }
8818
8819 pub fn set_desired_fleet<T: std::convert::Into<std::option::Option<crate::model::Fleet>>>(
8821 mut self,
8822 v: T,
8823 ) -> Self {
8824 self.desired_fleet = v.into();
8825 self
8826 }
8827
8828 pub fn set_desired_stack_type<T: std::convert::Into<crate::model::StackType>>(
8830 mut self,
8831 v: T,
8832 ) -> Self {
8833 self.desired_stack_type = v.into();
8834 self
8835 }
8836
8837 pub fn set_additional_pod_ranges_config<
8839 T: std::convert::Into<std::option::Option<crate::model::AdditionalPodRangesConfig>>,
8840 >(
8841 mut self,
8842 v: T,
8843 ) -> Self {
8844 self.additional_pod_ranges_config = v.into();
8845 self
8846 }
8847
8848 pub fn set_removed_additional_pod_ranges_config<
8850 T: std::convert::Into<std::option::Option<crate::model::AdditionalPodRangesConfig>>,
8851 >(
8852 mut self,
8853 v: T,
8854 ) -> Self {
8855 self.removed_additional_pod_ranges_config = v.into();
8856 self
8857 }
8858
8859 pub fn set_enable_k8s_beta_apis<
8861 T: std::convert::Into<std::option::Option<crate::model::K8sBetaAPIConfig>>,
8862 >(
8863 mut self,
8864 v: T,
8865 ) -> Self {
8866 self.enable_k8s_beta_apis = v.into();
8867 self
8868 }
8869
8870 pub fn set_desired_security_posture_config<
8872 T: std::convert::Into<std::option::Option<crate::model::SecurityPostureConfig>>,
8873 >(
8874 mut self,
8875 v: T,
8876 ) -> Self {
8877 self.desired_security_posture_config = v.into();
8878 self
8879 }
8880
8881 pub fn set_desired_network_performance_config<
8883 T: std::convert::Into<
8884 std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
8885 >,
8886 >(
8887 mut self,
8888 v: T,
8889 ) -> Self {
8890 self.desired_network_performance_config = v.into();
8891 self
8892 }
8893
8894 pub fn set_desired_enable_fqdn_network_policy<
8896 T: std::convert::Into<std::option::Option<bool>>,
8897 >(
8898 mut self,
8899 v: T,
8900 ) -> Self {
8901 self.desired_enable_fqdn_network_policy = v.into();
8902 self
8903 }
8904
8905 pub fn set_desired_autopilot_workload_policy_config<
8907 T: std::convert::Into<std::option::Option<crate::model::WorkloadPolicyConfig>>,
8908 >(
8909 mut self,
8910 v: T,
8911 ) -> Self {
8912 self.desired_autopilot_workload_policy_config = v.into();
8913 self
8914 }
8915
8916 pub fn set_desired_k8s_beta_apis<
8918 T: std::convert::Into<std::option::Option<crate::model::K8sBetaAPIConfig>>,
8919 >(
8920 mut self,
8921 v: T,
8922 ) -> Self {
8923 self.desired_k8s_beta_apis = v.into();
8924 self
8925 }
8926
8927 pub fn set_desired_containerd_config<
8929 T: std::convert::Into<std::option::Option<crate::model::ContainerdConfig>>,
8930 >(
8931 mut self,
8932 v: T,
8933 ) -> Self {
8934 self.desired_containerd_config = v.into();
8935 self
8936 }
8937
8938 pub fn set_desired_enable_multi_networking<T: std::convert::Into<std::option::Option<bool>>>(
8940 mut self,
8941 v: T,
8942 ) -> Self {
8943 self.desired_enable_multi_networking = v.into();
8944 self
8945 }
8946
8947 pub fn set_desired_node_pool_auto_config_resource_manager_tags<
8949 T: std::convert::Into<std::option::Option<crate::model::ResourceManagerTags>>,
8950 >(
8951 mut self,
8952 v: T,
8953 ) -> Self {
8954 self.desired_node_pool_auto_config_resource_manager_tags = v.into();
8955 self
8956 }
8957
8958 pub fn set_desired_in_transit_encryption_config<
8960 T: std::convert::Into<std::option::Option<crate::model::InTransitEncryptionConfig>>,
8961 >(
8962 mut self,
8963 v: T,
8964 ) -> Self {
8965 self.desired_in_transit_encryption_config = v.into();
8966 self
8967 }
8968
8969 pub fn set_desired_enable_cilium_clusterwide_network_policy<
8971 T: std::convert::Into<std::option::Option<bool>>,
8972 >(
8973 mut self,
8974 v: T,
8975 ) -> Self {
8976 self.desired_enable_cilium_clusterwide_network_policy = v.into();
8977 self
8978 }
8979
8980 pub fn set_desired_secret_manager_config<
8982 T: std::convert::Into<std::option::Option<crate::model::SecretManagerConfig>>,
8983 >(
8984 mut self,
8985 v: T,
8986 ) -> Self {
8987 self.desired_secret_manager_config = v.into();
8988 self
8989 }
8990
8991 pub fn set_desired_compliance_posture_config<
8993 T: std::convert::Into<std::option::Option<crate::model::CompliancePostureConfig>>,
8994 >(
8995 mut self,
8996 v: T,
8997 ) -> Self {
8998 self.desired_compliance_posture_config = v.into();
8999 self
9000 }
9001
9002 pub fn set_desired_node_kubelet_config<
9004 T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
9005 >(
9006 mut self,
9007 v: T,
9008 ) -> Self {
9009 self.desired_node_kubelet_config = v.into();
9010 self
9011 }
9012
9013 pub fn set_desired_node_pool_auto_config_kubelet_config<
9015 T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
9016 >(
9017 mut self,
9018 v: T,
9019 ) -> Self {
9020 self.desired_node_pool_auto_config_kubelet_config = v.into();
9021 self
9022 }
9023
9024 pub fn set_user_managed_keys_config<
9026 T: std::convert::Into<std::option::Option<crate::model::UserManagedKeysConfig>>,
9027 >(
9028 mut self,
9029 v: T,
9030 ) -> Self {
9031 self.user_managed_keys_config = v.into();
9032 self
9033 }
9034
9035 pub fn set_desired_rbac_binding_config<
9037 T: std::convert::Into<std::option::Option<crate::model::RBACBindingConfig>>,
9038 >(
9039 mut self,
9040 v: T,
9041 ) -> Self {
9042 self.desired_rbac_binding_config = v.into();
9043 self
9044 }
9045
9046 pub fn set_desired_enterprise_config<
9048 T: std::convert::Into<std::option::Option<crate::model::DesiredEnterpriseConfig>>,
9049 >(
9050 mut self,
9051 v: T,
9052 ) -> Self {
9053 self.desired_enterprise_config = v.into();
9054 self
9055 }
9056
9057 pub fn set_desired_node_pool_auto_config_linux_node_config<
9059 T: std::convert::Into<std::option::Option<crate::model::LinuxNodeConfig>>,
9060 >(
9061 mut self,
9062 v: T,
9063 ) -> Self {
9064 self.desired_node_pool_auto_config_linux_node_config = v.into();
9065 self
9066 }
9067}
9068
9069impl wkt::message::Message for ClusterUpdate {
9070 fn typename() -> &'static str {
9071 "type.googleapis.com/google.container.v1.ClusterUpdate"
9072 }
9073}
9074
9075#[serde_with::serde_as]
9078#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9079#[serde(default, rename_all = "camelCase")]
9080#[non_exhaustive]
9081pub struct AdditionalPodRangesConfig {
9082 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9084 pub pod_range_names: std::vec::Vec<std::string::String>,
9085
9086 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9088 pub pod_range_info: std::vec::Vec<crate::model::RangeInfo>,
9089
9090 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9091 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9092}
9093
9094impl AdditionalPodRangesConfig {
9095 pub fn new() -> Self {
9096 std::default::Default::default()
9097 }
9098
9099 pub fn set_pod_range_names<T, V>(mut self, v: T) -> Self
9101 where
9102 T: std::iter::IntoIterator<Item = V>,
9103 V: std::convert::Into<std::string::String>,
9104 {
9105 use std::iter::Iterator;
9106 self.pod_range_names = v.into_iter().map(|i| i.into()).collect();
9107 self
9108 }
9109
9110 pub fn set_pod_range_info<T, V>(mut self, v: T) -> Self
9112 where
9113 T: std::iter::IntoIterator<Item = V>,
9114 V: std::convert::Into<crate::model::RangeInfo>,
9115 {
9116 use std::iter::Iterator;
9117 self.pod_range_info = v.into_iter().map(|i| i.into()).collect();
9118 self
9119 }
9120}
9121
9122impl wkt::message::Message for AdditionalPodRangesConfig {
9123 fn typename() -> &'static str {
9124 "type.googleapis.com/google.container.v1.AdditionalPodRangesConfig"
9125 }
9126}
9127
9128#[serde_with::serde_as]
9130#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9131#[serde(default, rename_all = "camelCase")]
9132#[non_exhaustive]
9133pub struct RangeInfo {
9134 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9136 pub range_name: std::string::String,
9137
9138 #[serde(skip_serializing_if = "wkt::internal::is_default")]
9140 #[serde_as(as = "wkt::internal::F64")]
9141 pub utilization: f64,
9142
9143 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9144 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9145}
9146
9147impl RangeInfo {
9148 pub fn new() -> Self {
9149 std::default::Default::default()
9150 }
9151
9152 pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9154 self.range_name = v.into();
9155 self
9156 }
9157
9158 pub fn set_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
9160 self.utilization = v.into();
9161 self
9162 }
9163}
9164
9165impl wkt::message::Message for RangeInfo {
9166 fn typename() -> &'static str {
9167 "type.googleapis.com/google.container.v1.RangeInfo"
9168 }
9169}
9170
9171#[serde_with::serde_as]
9173#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9174#[serde(default, rename_all = "camelCase")]
9175#[non_exhaustive]
9176pub struct DesiredEnterpriseConfig {
9177 pub desired_tier: crate::model::enterprise_config::ClusterTier,
9179
9180 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9181 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9182}
9183
9184impl DesiredEnterpriseConfig {
9185 pub fn new() -> Self {
9186 std::default::Default::default()
9187 }
9188
9189 pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
9191 mut self,
9192 v: T,
9193 ) -> Self {
9194 self.desired_tier = v.into();
9195 self
9196 }
9197}
9198
9199impl wkt::message::Message for DesiredEnterpriseConfig {
9200 fn typename() -> &'static str {
9201 "type.googleapis.com/google.container.v1.DesiredEnterpriseConfig"
9202 }
9203}
9204
9205#[serde_with::serde_as]
9208#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9209#[serde(default, rename_all = "camelCase")]
9210#[non_exhaustive]
9211pub struct Operation {
9212 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9214 pub name: std::string::String,
9215
9216 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9220 #[deprecated]
9221 pub zone: std::string::String,
9222
9223 pub operation_type: crate::model::operation::Type,
9225
9226 pub status: crate::model::operation::Status,
9228
9229 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9231 pub detail: std::string::String,
9232
9233 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9236 #[deprecated]
9237 pub status_message: std::string::String,
9238
9239 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9242 pub self_link: std::string::String,
9243
9244 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9262 pub target_link: std::string::String,
9263
9264 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9270 pub location: std::string::String,
9271
9272 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9275 pub start_time: std::string::String,
9276
9277 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9280 pub end_time: std::string::String,
9281
9282 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9284 pub progress: std::option::Option<crate::model::OperationProgress>,
9285
9286 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9289 #[deprecated]
9290 pub cluster_conditions: std::vec::Vec<crate::model::StatusCondition>,
9291
9292 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9295 #[deprecated]
9296 pub nodepool_conditions: std::vec::Vec<crate::model::StatusCondition>,
9297
9298 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9300 pub error: std::option::Option<rpc::model::Status>,
9301
9302 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9303 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9304}
9305
9306impl Operation {
9307 pub fn new() -> Self {
9308 std::default::Default::default()
9309 }
9310
9311 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9313 self.name = v.into();
9314 self
9315 }
9316
9317 #[deprecated]
9319 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9320 self.zone = v.into();
9321 self
9322 }
9323
9324 pub fn set_operation_type<T: std::convert::Into<crate::model::operation::Type>>(
9326 mut self,
9327 v: T,
9328 ) -> Self {
9329 self.operation_type = v.into();
9330 self
9331 }
9332
9333 pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
9335 mut self,
9336 v: T,
9337 ) -> Self {
9338 self.status = v.into();
9339 self
9340 }
9341
9342 pub fn set_detail<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9344 self.detail = v.into();
9345 self
9346 }
9347
9348 #[deprecated]
9350 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9351 self.status_message = v.into();
9352 self
9353 }
9354
9355 pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9357 self.self_link = v.into();
9358 self
9359 }
9360
9361 pub fn set_target_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9363 self.target_link = v.into();
9364 self
9365 }
9366
9367 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9369 self.location = v.into();
9370 self
9371 }
9372
9373 pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9375 self.start_time = v.into();
9376 self
9377 }
9378
9379 pub fn set_end_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9381 self.end_time = v.into();
9382 self
9383 }
9384
9385 pub fn set_progress<
9387 T: std::convert::Into<std::option::Option<crate::model::OperationProgress>>,
9388 >(
9389 mut self,
9390 v: T,
9391 ) -> Self {
9392 self.progress = v.into();
9393 self
9394 }
9395
9396 #[deprecated]
9398 pub fn set_cluster_conditions<T, V>(mut self, v: T) -> Self
9399 where
9400 T: std::iter::IntoIterator<Item = V>,
9401 V: std::convert::Into<crate::model::StatusCondition>,
9402 {
9403 use std::iter::Iterator;
9404 self.cluster_conditions = v.into_iter().map(|i| i.into()).collect();
9405 self
9406 }
9407
9408 #[deprecated]
9410 pub fn set_nodepool_conditions<T, V>(mut self, v: T) -> Self
9411 where
9412 T: std::iter::IntoIterator<Item = V>,
9413 V: std::convert::Into<crate::model::StatusCondition>,
9414 {
9415 use std::iter::Iterator;
9416 self.nodepool_conditions = v.into_iter().map(|i| i.into()).collect();
9417 self
9418 }
9419
9420 pub fn set_error<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
9422 mut self,
9423 v: T,
9424 ) -> Self {
9425 self.error = v.into();
9426 self
9427 }
9428}
9429
9430impl wkt::message::Message for Operation {
9431 fn typename() -> &'static str {
9432 "type.googleapis.com/google.container.v1.Operation"
9433 }
9434}
9435
9436pub mod operation {
9438 #[allow(unused_imports)]
9439 use super::*;
9440
9441 #[derive(Clone, Debug, PartialEq)]
9457 #[non_exhaustive]
9458 pub enum Status {
9459 Unspecified,
9461 Pending,
9463 Running,
9465 Done,
9467 Aborting,
9469 UnknownValue(status::UnknownValue),
9474 }
9475
9476 #[doc(hidden)]
9477 pub mod status {
9478 #[allow(unused_imports)]
9479 use super::*;
9480 #[derive(Clone, Debug, PartialEq)]
9481 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9482 }
9483
9484 impl Status {
9485 pub fn value(&self) -> std::option::Option<i32> {
9490 match self {
9491 Self::Unspecified => std::option::Option::Some(0),
9492 Self::Pending => std::option::Option::Some(1),
9493 Self::Running => std::option::Option::Some(2),
9494 Self::Done => std::option::Option::Some(3),
9495 Self::Aborting => std::option::Option::Some(4),
9496 Self::UnknownValue(u) => u.0.value(),
9497 }
9498 }
9499
9500 pub fn name(&self) -> std::option::Option<&str> {
9505 match self {
9506 Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
9507 Self::Pending => std::option::Option::Some("PENDING"),
9508 Self::Running => std::option::Option::Some("RUNNING"),
9509 Self::Done => std::option::Option::Some("DONE"),
9510 Self::Aborting => std::option::Option::Some("ABORTING"),
9511 Self::UnknownValue(u) => u.0.name(),
9512 }
9513 }
9514 }
9515
9516 impl std::default::Default for Status {
9517 fn default() -> Self {
9518 use std::convert::From;
9519 Self::from(0)
9520 }
9521 }
9522
9523 impl std::fmt::Display for Status {
9524 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9525 wkt::internal::display_enum(f, self.name(), self.value())
9526 }
9527 }
9528
9529 impl std::convert::From<i32> for Status {
9530 fn from(value: i32) -> Self {
9531 match value {
9532 0 => Self::Unspecified,
9533 1 => Self::Pending,
9534 2 => Self::Running,
9535 3 => Self::Done,
9536 4 => Self::Aborting,
9537 _ => Self::UnknownValue(status::UnknownValue(
9538 wkt::internal::UnknownEnumValue::Integer(value),
9539 )),
9540 }
9541 }
9542 }
9543
9544 impl std::convert::From<&str> for Status {
9545 fn from(value: &str) -> Self {
9546 use std::string::ToString;
9547 match value {
9548 "STATUS_UNSPECIFIED" => Self::Unspecified,
9549 "PENDING" => Self::Pending,
9550 "RUNNING" => Self::Running,
9551 "DONE" => Self::Done,
9552 "ABORTING" => Self::Aborting,
9553 _ => Self::UnknownValue(status::UnknownValue(
9554 wkt::internal::UnknownEnumValue::String(value.to_string()),
9555 )),
9556 }
9557 }
9558 }
9559
9560 impl serde::ser::Serialize for Status {
9561 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9562 where
9563 S: serde::Serializer,
9564 {
9565 match self {
9566 Self::Unspecified => serializer.serialize_i32(0),
9567 Self::Pending => serializer.serialize_i32(1),
9568 Self::Running => serializer.serialize_i32(2),
9569 Self::Done => serializer.serialize_i32(3),
9570 Self::Aborting => serializer.serialize_i32(4),
9571 Self::UnknownValue(u) => u.0.serialize(serializer),
9572 }
9573 }
9574 }
9575
9576 impl<'de> serde::de::Deserialize<'de> for Status {
9577 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9578 where
9579 D: serde::Deserializer<'de>,
9580 {
9581 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
9582 ".google.container.v1.Operation.Status",
9583 ))
9584 }
9585 }
9586
9587 #[derive(Clone, Debug, PartialEq)]
9603 #[non_exhaustive]
9604 pub enum Type {
9605 Unspecified,
9607 CreateCluster,
9615 DeleteCluster,
9624 UpgradeMaster,
9634 UpgradeNodes,
9649 RepairCluster,
9654 UpdateCluster,
9668 CreateNodePool,
9676 DeleteNodePool,
9679 SetNodePoolManagement,
9685 AutoRepairNodes,
9691 #[deprecated]
9696 AutoUpgradeNodes,
9697 #[deprecated]
9702 SetLabels,
9703 #[deprecated]
9708 SetMasterAuth,
9709 SetNodePoolSize,
9712 #[deprecated]
9717 SetNetworkPolicy,
9718 #[deprecated]
9723 SetMaintenancePolicy,
9724 ResizeCluster,
9731 FleetFeatureUpgrade,
9734 UnknownValue(r#type::UnknownValue),
9739 }
9740
9741 #[doc(hidden)]
9742 pub mod r#type {
9743 #[allow(unused_imports)]
9744 use super::*;
9745 #[derive(Clone, Debug, PartialEq)]
9746 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9747 }
9748
9749 impl Type {
9750 pub fn value(&self) -> std::option::Option<i32> {
9755 match self {
9756 Self::Unspecified => std::option::Option::Some(0),
9757 Self::CreateCluster => std::option::Option::Some(1),
9758 Self::DeleteCluster => std::option::Option::Some(2),
9759 Self::UpgradeMaster => std::option::Option::Some(3),
9760 Self::UpgradeNodes => std::option::Option::Some(4),
9761 Self::RepairCluster => std::option::Option::Some(5),
9762 Self::UpdateCluster => std::option::Option::Some(6),
9763 Self::CreateNodePool => std::option::Option::Some(7),
9764 Self::DeleteNodePool => std::option::Option::Some(8),
9765 Self::SetNodePoolManagement => std::option::Option::Some(9),
9766 Self::AutoRepairNodes => std::option::Option::Some(10),
9767 Self::AutoUpgradeNodes => std::option::Option::Some(11),
9768 Self::SetLabels => std::option::Option::Some(12),
9769 Self::SetMasterAuth => std::option::Option::Some(13),
9770 Self::SetNodePoolSize => std::option::Option::Some(14),
9771 Self::SetNetworkPolicy => std::option::Option::Some(15),
9772 Self::SetMaintenancePolicy => std::option::Option::Some(16),
9773 Self::ResizeCluster => std::option::Option::Some(18),
9774 Self::FleetFeatureUpgrade => std::option::Option::Some(19),
9775 Self::UnknownValue(u) => u.0.value(),
9776 }
9777 }
9778
9779 pub fn name(&self) -> std::option::Option<&str> {
9784 match self {
9785 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
9786 Self::CreateCluster => std::option::Option::Some("CREATE_CLUSTER"),
9787 Self::DeleteCluster => std::option::Option::Some("DELETE_CLUSTER"),
9788 Self::UpgradeMaster => std::option::Option::Some("UPGRADE_MASTER"),
9789 Self::UpgradeNodes => std::option::Option::Some("UPGRADE_NODES"),
9790 Self::RepairCluster => std::option::Option::Some("REPAIR_CLUSTER"),
9791 Self::UpdateCluster => std::option::Option::Some("UPDATE_CLUSTER"),
9792 Self::CreateNodePool => std::option::Option::Some("CREATE_NODE_POOL"),
9793 Self::DeleteNodePool => std::option::Option::Some("DELETE_NODE_POOL"),
9794 Self::SetNodePoolManagement => {
9795 std::option::Option::Some("SET_NODE_POOL_MANAGEMENT")
9796 }
9797 Self::AutoRepairNodes => std::option::Option::Some("AUTO_REPAIR_NODES"),
9798 Self::AutoUpgradeNodes => std::option::Option::Some("AUTO_UPGRADE_NODES"),
9799 Self::SetLabels => std::option::Option::Some("SET_LABELS"),
9800 Self::SetMasterAuth => std::option::Option::Some("SET_MASTER_AUTH"),
9801 Self::SetNodePoolSize => std::option::Option::Some("SET_NODE_POOL_SIZE"),
9802 Self::SetNetworkPolicy => std::option::Option::Some("SET_NETWORK_POLICY"),
9803 Self::SetMaintenancePolicy => std::option::Option::Some("SET_MAINTENANCE_POLICY"),
9804 Self::ResizeCluster => std::option::Option::Some("RESIZE_CLUSTER"),
9805 Self::FleetFeatureUpgrade => std::option::Option::Some("FLEET_FEATURE_UPGRADE"),
9806 Self::UnknownValue(u) => u.0.name(),
9807 }
9808 }
9809 }
9810
9811 impl std::default::Default for Type {
9812 fn default() -> Self {
9813 use std::convert::From;
9814 Self::from(0)
9815 }
9816 }
9817
9818 impl std::fmt::Display for Type {
9819 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9820 wkt::internal::display_enum(f, self.name(), self.value())
9821 }
9822 }
9823
9824 impl std::convert::From<i32> for Type {
9825 fn from(value: i32) -> Self {
9826 match value {
9827 0 => Self::Unspecified,
9828 1 => Self::CreateCluster,
9829 2 => Self::DeleteCluster,
9830 3 => Self::UpgradeMaster,
9831 4 => Self::UpgradeNodes,
9832 5 => Self::RepairCluster,
9833 6 => Self::UpdateCluster,
9834 7 => Self::CreateNodePool,
9835 8 => Self::DeleteNodePool,
9836 9 => Self::SetNodePoolManagement,
9837 10 => Self::AutoRepairNodes,
9838 11 => Self::AutoUpgradeNodes,
9839 12 => Self::SetLabels,
9840 13 => Self::SetMasterAuth,
9841 14 => Self::SetNodePoolSize,
9842 15 => Self::SetNetworkPolicy,
9843 16 => Self::SetMaintenancePolicy,
9844 18 => Self::ResizeCluster,
9845 19 => Self::FleetFeatureUpgrade,
9846 _ => Self::UnknownValue(r#type::UnknownValue(
9847 wkt::internal::UnknownEnumValue::Integer(value),
9848 )),
9849 }
9850 }
9851 }
9852
9853 impl std::convert::From<&str> for Type {
9854 fn from(value: &str) -> Self {
9855 use std::string::ToString;
9856 match value {
9857 "TYPE_UNSPECIFIED" => Self::Unspecified,
9858 "CREATE_CLUSTER" => Self::CreateCluster,
9859 "DELETE_CLUSTER" => Self::DeleteCluster,
9860 "UPGRADE_MASTER" => Self::UpgradeMaster,
9861 "UPGRADE_NODES" => Self::UpgradeNodes,
9862 "REPAIR_CLUSTER" => Self::RepairCluster,
9863 "UPDATE_CLUSTER" => Self::UpdateCluster,
9864 "CREATE_NODE_POOL" => Self::CreateNodePool,
9865 "DELETE_NODE_POOL" => Self::DeleteNodePool,
9866 "SET_NODE_POOL_MANAGEMENT" => Self::SetNodePoolManagement,
9867 "AUTO_REPAIR_NODES" => Self::AutoRepairNodes,
9868 "AUTO_UPGRADE_NODES" => Self::AutoUpgradeNodes,
9869 "SET_LABELS" => Self::SetLabels,
9870 "SET_MASTER_AUTH" => Self::SetMasterAuth,
9871 "SET_NODE_POOL_SIZE" => Self::SetNodePoolSize,
9872 "SET_NETWORK_POLICY" => Self::SetNetworkPolicy,
9873 "SET_MAINTENANCE_POLICY" => Self::SetMaintenancePolicy,
9874 "RESIZE_CLUSTER" => Self::ResizeCluster,
9875 "FLEET_FEATURE_UPGRADE" => Self::FleetFeatureUpgrade,
9876 _ => Self::UnknownValue(r#type::UnknownValue(
9877 wkt::internal::UnknownEnumValue::String(value.to_string()),
9878 )),
9879 }
9880 }
9881 }
9882
9883 impl serde::ser::Serialize for Type {
9884 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9885 where
9886 S: serde::Serializer,
9887 {
9888 match self {
9889 Self::Unspecified => serializer.serialize_i32(0),
9890 Self::CreateCluster => serializer.serialize_i32(1),
9891 Self::DeleteCluster => serializer.serialize_i32(2),
9892 Self::UpgradeMaster => serializer.serialize_i32(3),
9893 Self::UpgradeNodes => serializer.serialize_i32(4),
9894 Self::RepairCluster => serializer.serialize_i32(5),
9895 Self::UpdateCluster => serializer.serialize_i32(6),
9896 Self::CreateNodePool => serializer.serialize_i32(7),
9897 Self::DeleteNodePool => serializer.serialize_i32(8),
9898 Self::SetNodePoolManagement => serializer.serialize_i32(9),
9899 Self::AutoRepairNodes => serializer.serialize_i32(10),
9900 Self::AutoUpgradeNodes => serializer.serialize_i32(11),
9901 Self::SetLabels => serializer.serialize_i32(12),
9902 Self::SetMasterAuth => serializer.serialize_i32(13),
9903 Self::SetNodePoolSize => serializer.serialize_i32(14),
9904 Self::SetNetworkPolicy => serializer.serialize_i32(15),
9905 Self::SetMaintenancePolicy => serializer.serialize_i32(16),
9906 Self::ResizeCluster => serializer.serialize_i32(18),
9907 Self::FleetFeatureUpgrade => serializer.serialize_i32(19),
9908 Self::UnknownValue(u) => u.0.serialize(serializer),
9909 }
9910 }
9911 }
9912
9913 impl<'de> serde::de::Deserialize<'de> for Type {
9914 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9915 where
9916 D: serde::Deserializer<'de>,
9917 {
9918 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
9919 ".google.container.v1.Operation.Type",
9920 ))
9921 }
9922 }
9923}
9924
9925#[serde_with::serde_as]
9927#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9928#[serde(default, rename_all = "camelCase")]
9929#[non_exhaustive]
9930pub struct OperationProgress {
9931 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9934 pub name: std::string::String,
9935
9936 pub status: crate::model::operation::Status,
9939
9940 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9947 pub metrics: std::vec::Vec<crate::model::operation_progress::Metric>,
9948
9949 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9951 pub stages: std::vec::Vec<crate::model::OperationProgress>,
9952
9953 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9954 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9955}
9956
9957impl OperationProgress {
9958 pub fn new() -> Self {
9959 std::default::Default::default()
9960 }
9961
9962 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9964 self.name = v.into();
9965 self
9966 }
9967
9968 pub fn set_status<T: std::convert::Into<crate::model::operation::Status>>(
9970 mut self,
9971 v: T,
9972 ) -> Self {
9973 self.status = v.into();
9974 self
9975 }
9976
9977 pub fn set_metrics<T, V>(mut self, v: T) -> Self
9979 where
9980 T: std::iter::IntoIterator<Item = V>,
9981 V: std::convert::Into<crate::model::operation_progress::Metric>,
9982 {
9983 use std::iter::Iterator;
9984 self.metrics = v.into_iter().map(|i| i.into()).collect();
9985 self
9986 }
9987
9988 pub fn set_stages<T, V>(mut self, v: T) -> Self
9990 where
9991 T: std::iter::IntoIterator<Item = V>,
9992 V: std::convert::Into<crate::model::OperationProgress>,
9993 {
9994 use std::iter::Iterator;
9995 self.stages = v.into_iter().map(|i| i.into()).collect();
9996 self
9997 }
9998}
9999
10000impl wkt::message::Message for OperationProgress {
10001 fn typename() -> &'static str {
10002 "type.googleapis.com/google.container.v1.OperationProgress"
10003 }
10004}
10005
10006pub mod operation_progress {
10008 #[allow(unused_imports)]
10009 use super::*;
10010
10011 #[serde_with::serde_as]
10013 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10014 #[serde(default, rename_all = "camelCase")]
10015 #[non_exhaustive]
10016 pub struct Metric {
10017 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10019 pub name: std::string::String,
10020
10021 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
10023 pub value: std::option::Option<crate::model::operation_progress::metric::Value>,
10024
10025 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10026 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10027 }
10028
10029 impl Metric {
10030 pub fn new() -> Self {
10031 std::default::Default::default()
10032 }
10033
10034 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10036 self.name = v.into();
10037 self
10038 }
10039
10040 pub fn set_value<
10045 T: std::convert::Into<
10046 std::option::Option<crate::model::operation_progress::metric::Value>,
10047 >,
10048 >(
10049 mut self,
10050 v: T,
10051 ) -> Self {
10052 self.value = v.into();
10053 self
10054 }
10055
10056 pub fn int_value(&self) -> std::option::Option<&i64> {
10060 #[allow(unreachable_patterns)]
10061 self.value.as_ref().and_then(|v| match v {
10062 crate::model::operation_progress::metric::Value::IntValue(v) => {
10063 std::option::Option::Some(v)
10064 }
10065 _ => std::option::Option::None,
10066 })
10067 }
10068
10069 pub fn set_int_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10075 self.value = std::option::Option::Some(
10076 crate::model::operation_progress::metric::Value::IntValue(v.into()),
10077 );
10078 self
10079 }
10080
10081 pub fn double_value(&self) -> std::option::Option<&f64> {
10085 #[allow(unreachable_patterns)]
10086 self.value.as_ref().and_then(|v| match v {
10087 crate::model::operation_progress::metric::Value::DoubleValue(v) => {
10088 std::option::Option::Some(v)
10089 }
10090 _ => std::option::Option::None,
10091 })
10092 }
10093
10094 pub fn set_double_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
10100 self.value = std::option::Option::Some(
10101 crate::model::operation_progress::metric::Value::DoubleValue(v.into()),
10102 );
10103 self
10104 }
10105
10106 pub fn string_value(&self) -> std::option::Option<&std::string::String> {
10110 #[allow(unreachable_patterns)]
10111 self.value.as_ref().and_then(|v| match v {
10112 crate::model::operation_progress::metric::Value::StringValue(v) => {
10113 std::option::Option::Some(v)
10114 }
10115 _ => std::option::Option::None,
10116 })
10117 }
10118
10119 pub fn set_string_value<T: std::convert::Into<std::string::String>>(
10125 mut self,
10126 v: T,
10127 ) -> Self {
10128 self.value = std::option::Option::Some(
10129 crate::model::operation_progress::metric::Value::StringValue(v.into()),
10130 );
10131 self
10132 }
10133 }
10134
10135 impl wkt::message::Message for Metric {
10136 fn typename() -> &'static str {
10137 "type.googleapis.com/google.container.v1.OperationProgress.Metric"
10138 }
10139 }
10140
10141 pub mod metric {
10143 #[allow(unused_imports)]
10144 use super::*;
10145
10146 #[serde_with::serde_as]
10148 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10149 #[serde(rename_all = "camelCase")]
10150 #[non_exhaustive]
10151 pub enum Value {
10152 IntValue(#[serde_as(as = "serde_with::DisplayFromStr")] i64),
10154 DoubleValue(#[serde_as(as = "wkt::internal::F64")] f64),
10156 StringValue(std::string::String),
10158 }
10159 }
10160}
10161
10162#[serde_with::serde_as]
10164#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10165#[serde(default, rename_all = "camelCase")]
10166#[non_exhaustive]
10167pub struct CreateClusterRequest {
10168 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10172 #[deprecated]
10173 pub project_id: std::string::String,
10174
10175 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10180 #[deprecated]
10181 pub zone: std::string::String,
10182
10183 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10186 pub cluster: std::option::Option<crate::model::Cluster>,
10187
10188 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10191 pub parent: std::string::String,
10192
10193 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10194 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10195}
10196
10197impl CreateClusterRequest {
10198 pub fn new() -> Self {
10199 std::default::Default::default()
10200 }
10201
10202 #[deprecated]
10204 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10205 self.project_id = v.into();
10206 self
10207 }
10208
10209 #[deprecated]
10211 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10212 self.zone = v.into();
10213 self
10214 }
10215
10216 pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
10218 mut self,
10219 v: T,
10220 ) -> Self {
10221 self.cluster = v.into();
10222 self
10223 }
10224
10225 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10227 self.parent = v.into();
10228 self
10229 }
10230}
10231
10232impl wkt::message::Message for CreateClusterRequest {
10233 fn typename() -> &'static str {
10234 "type.googleapis.com/google.container.v1.CreateClusterRequest"
10235 }
10236}
10237
10238#[serde_with::serde_as]
10240#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10241#[serde(default, rename_all = "camelCase")]
10242#[non_exhaustive]
10243pub struct GetClusterRequest {
10244 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10248 #[deprecated]
10249 pub project_id: std::string::String,
10250
10251 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10256 #[deprecated]
10257 pub zone: std::string::String,
10258
10259 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10262 #[deprecated]
10263 pub cluster_id: std::string::String,
10264
10265 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10268 pub name: std::string::String,
10269
10270 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10271 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10272}
10273
10274impl GetClusterRequest {
10275 pub fn new() -> Self {
10276 std::default::Default::default()
10277 }
10278
10279 #[deprecated]
10281 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10282 self.project_id = v.into();
10283 self
10284 }
10285
10286 #[deprecated]
10288 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10289 self.zone = v.into();
10290 self
10291 }
10292
10293 #[deprecated]
10295 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10296 self.cluster_id = v.into();
10297 self
10298 }
10299
10300 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10302 self.name = v.into();
10303 self
10304 }
10305}
10306
10307impl wkt::message::Message for GetClusterRequest {
10308 fn typename() -> &'static str {
10309 "type.googleapis.com/google.container.v1.GetClusterRequest"
10310 }
10311}
10312
10313#[serde_with::serde_as]
10315#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10316#[serde(default, rename_all = "camelCase")]
10317#[non_exhaustive]
10318pub struct UpdateClusterRequest {
10319 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10323 #[deprecated]
10324 pub project_id: std::string::String,
10325
10326 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10331 #[deprecated]
10332 pub zone: std::string::String,
10333
10334 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10337 #[deprecated]
10338 pub cluster_id: std::string::String,
10339
10340 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10342 pub update: std::option::Option<crate::model::ClusterUpdate>,
10343
10344 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10347 pub name: std::string::String,
10348
10349 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10350 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10351}
10352
10353impl UpdateClusterRequest {
10354 pub fn new() -> Self {
10355 std::default::Default::default()
10356 }
10357
10358 #[deprecated]
10360 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10361 self.project_id = v.into();
10362 self
10363 }
10364
10365 #[deprecated]
10367 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10368 self.zone = v.into();
10369 self
10370 }
10371
10372 #[deprecated]
10374 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10375 self.cluster_id = v.into();
10376 self
10377 }
10378
10379 pub fn set_update<T: std::convert::Into<std::option::Option<crate::model::ClusterUpdate>>>(
10381 mut self,
10382 v: T,
10383 ) -> Self {
10384 self.update = v.into();
10385 self
10386 }
10387
10388 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10390 self.name = v.into();
10391 self
10392 }
10393}
10394
10395impl wkt::message::Message for UpdateClusterRequest {
10396 fn typename() -> &'static str {
10397 "type.googleapis.com/google.container.v1.UpdateClusterRequest"
10398 }
10399}
10400
10401#[serde_with::serde_as]
10403#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10404#[serde(default, rename_all = "camelCase")]
10405#[non_exhaustive]
10406pub struct UpdateNodePoolRequest {
10407 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10411 #[deprecated]
10412 pub project_id: std::string::String,
10413
10414 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10419 #[deprecated]
10420 pub zone: std::string::String,
10421
10422 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10425 #[deprecated]
10426 pub cluster_id: std::string::String,
10427
10428 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10431 #[deprecated]
10432 pub node_pool_id: std::string::String,
10433
10434 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10446 pub node_version: std::string::String,
10447
10448 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10452 pub image_type: std::string::String,
10453
10454 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10458 pub name: std::string::String,
10459
10460 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10466 pub locations: std::vec::Vec<std::string::String>,
10467
10468 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10470 pub workload_metadata_config: std::option::Option<crate::model::WorkloadMetadataConfig>,
10471
10472 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10474 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
10475
10476 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10480 pub tags: std::option::Option<crate::model::NetworkTags>,
10481
10482 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10486 pub taints: std::option::Option<crate::model::NodeTaints>,
10487
10488 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10492 pub labels: std::option::Option<crate::model::NodeLabels>,
10493
10494 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10496 pub linux_node_config: std::option::Option<crate::model::LinuxNodeConfig>,
10497
10498 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10500 pub kubelet_config: std::option::Option<crate::model::NodeKubeletConfig>,
10501
10502 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10504 pub node_network_config: std::option::Option<crate::model::NodeNetworkConfig>,
10505
10506 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10508 pub gcfs_config: std::option::Option<crate::model::GcfsConfig>,
10509
10510 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10513 pub confidential_nodes: std::option::Option<crate::model::ConfidentialNodes>,
10514
10515 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10517 pub gvnic: std::option::Option<crate::model::VirtualNIC>,
10518
10519 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10523 pub etag: std::string::String,
10524
10525 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10527 pub fast_socket: std::option::Option<crate::model::FastSocket>,
10528
10529 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10531 pub logging_config: std::option::Option<crate::model::NodePoolLoggingConfig>,
10532
10533 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10536 pub resource_labels: std::option::Option<crate::model::ResourceLabels>,
10537
10538 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10540 pub windows_node_config: std::option::Option<crate::model::WindowsNodeConfig>,
10541
10542 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10546 pub accelerators: std::vec::Vec<crate::model::AcceleratorConfig>,
10547
10548 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10553 pub machine_type: std::string::String,
10554
10555 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10560 pub disk_type: std::string::String,
10561
10562 #[serde(skip_serializing_if = "wkt::internal::is_default")]
10567 #[serde_as(as = "serde_with::DisplayFromStr")]
10568 pub disk_size_gb: i64,
10569
10570 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10574 pub resource_manager_tags: std::option::Option<crate::model::ResourceManagerTags>,
10575
10576 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10580 pub containerd_config: std::option::Option<crate::model::ContainerdConfig>,
10581
10582 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10584 pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
10585
10586 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10589 pub storage_pools: std::vec::Vec<std::string::String>,
10590
10591 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10592 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10593}
10594
10595impl UpdateNodePoolRequest {
10596 pub fn new() -> Self {
10597 std::default::Default::default()
10598 }
10599
10600 #[deprecated]
10602 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10603 self.project_id = v.into();
10604 self
10605 }
10606
10607 #[deprecated]
10609 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10610 self.zone = v.into();
10611 self
10612 }
10613
10614 #[deprecated]
10616 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10617 self.cluster_id = v.into();
10618 self
10619 }
10620
10621 #[deprecated]
10623 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10624 self.node_pool_id = v.into();
10625 self
10626 }
10627
10628 pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10630 self.node_version = v.into();
10631 self
10632 }
10633
10634 pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10636 self.image_type = v.into();
10637 self
10638 }
10639
10640 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10642 self.name = v.into();
10643 self
10644 }
10645
10646 pub fn set_locations<T, V>(mut self, v: T) -> Self
10648 where
10649 T: std::iter::IntoIterator<Item = V>,
10650 V: std::convert::Into<std::string::String>,
10651 {
10652 use std::iter::Iterator;
10653 self.locations = v.into_iter().map(|i| i.into()).collect();
10654 self
10655 }
10656
10657 pub fn set_workload_metadata_config<
10659 T: std::convert::Into<std::option::Option<crate::model::WorkloadMetadataConfig>>,
10660 >(
10661 mut self,
10662 v: T,
10663 ) -> Self {
10664 self.workload_metadata_config = v.into();
10665 self
10666 }
10667
10668 pub fn set_upgrade_settings<
10670 T: std::convert::Into<std::option::Option<crate::model::node_pool::UpgradeSettings>>,
10671 >(
10672 mut self,
10673 v: T,
10674 ) -> Self {
10675 self.upgrade_settings = v.into();
10676 self
10677 }
10678
10679 pub fn set_tags<T: std::convert::Into<std::option::Option<crate::model::NetworkTags>>>(
10681 mut self,
10682 v: T,
10683 ) -> Self {
10684 self.tags = v.into();
10685 self
10686 }
10687
10688 pub fn set_taints<T: std::convert::Into<std::option::Option<crate::model::NodeTaints>>>(
10690 mut self,
10691 v: T,
10692 ) -> Self {
10693 self.taints = v.into();
10694 self
10695 }
10696
10697 pub fn set_labels<T: std::convert::Into<std::option::Option<crate::model::NodeLabels>>>(
10699 mut self,
10700 v: T,
10701 ) -> Self {
10702 self.labels = v.into();
10703 self
10704 }
10705
10706 pub fn set_linux_node_config<
10708 T: std::convert::Into<std::option::Option<crate::model::LinuxNodeConfig>>,
10709 >(
10710 mut self,
10711 v: T,
10712 ) -> Self {
10713 self.linux_node_config = v.into();
10714 self
10715 }
10716
10717 pub fn set_kubelet_config<
10719 T: std::convert::Into<std::option::Option<crate::model::NodeKubeletConfig>>,
10720 >(
10721 mut self,
10722 v: T,
10723 ) -> Self {
10724 self.kubelet_config = v.into();
10725 self
10726 }
10727
10728 pub fn set_node_network_config<
10730 T: std::convert::Into<std::option::Option<crate::model::NodeNetworkConfig>>,
10731 >(
10732 mut self,
10733 v: T,
10734 ) -> Self {
10735 self.node_network_config = v.into();
10736 self
10737 }
10738
10739 pub fn set_gcfs_config<T: std::convert::Into<std::option::Option<crate::model::GcfsConfig>>>(
10741 mut self,
10742 v: T,
10743 ) -> Self {
10744 self.gcfs_config = v.into();
10745 self
10746 }
10747
10748 pub fn set_confidential_nodes<
10750 T: std::convert::Into<std::option::Option<crate::model::ConfidentialNodes>>,
10751 >(
10752 mut self,
10753 v: T,
10754 ) -> Self {
10755 self.confidential_nodes = v.into();
10756 self
10757 }
10758
10759 pub fn set_gvnic<T: std::convert::Into<std::option::Option<crate::model::VirtualNIC>>>(
10761 mut self,
10762 v: T,
10763 ) -> Self {
10764 self.gvnic = v.into();
10765 self
10766 }
10767
10768 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10770 self.etag = v.into();
10771 self
10772 }
10773
10774 pub fn set_fast_socket<T: std::convert::Into<std::option::Option<crate::model::FastSocket>>>(
10776 mut self,
10777 v: T,
10778 ) -> Self {
10779 self.fast_socket = v.into();
10780 self
10781 }
10782
10783 pub fn set_logging_config<
10785 T: std::convert::Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
10786 >(
10787 mut self,
10788 v: T,
10789 ) -> Self {
10790 self.logging_config = v.into();
10791 self
10792 }
10793
10794 pub fn set_resource_labels<
10796 T: std::convert::Into<std::option::Option<crate::model::ResourceLabels>>,
10797 >(
10798 mut self,
10799 v: T,
10800 ) -> Self {
10801 self.resource_labels = v.into();
10802 self
10803 }
10804
10805 pub fn set_windows_node_config<
10807 T: std::convert::Into<std::option::Option<crate::model::WindowsNodeConfig>>,
10808 >(
10809 mut self,
10810 v: T,
10811 ) -> Self {
10812 self.windows_node_config = v.into();
10813 self
10814 }
10815
10816 pub fn set_accelerators<T, V>(mut self, v: T) -> Self
10818 where
10819 T: std::iter::IntoIterator<Item = V>,
10820 V: std::convert::Into<crate::model::AcceleratorConfig>,
10821 {
10822 use std::iter::Iterator;
10823 self.accelerators = v.into_iter().map(|i| i.into()).collect();
10824 self
10825 }
10826
10827 pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10829 self.machine_type = v.into();
10830 self
10831 }
10832
10833 pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10835 self.disk_type = v.into();
10836 self
10837 }
10838
10839 pub fn set_disk_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10841 self.disk_size_gb = v.into();
10842 self
10843 }
10844
10845 pub fn set_resource_manager_tags<
10847 T: std::convert::Into<std::option::Option<crate::model::ResourceManagerTags>>,
10848 >(
10849 mut self,
10850 v: T,
10851 ) -> Self {
10852 self.resource_manager_tags = v.into();
10853 self
10854 }
10855
10856 pub fn set_containerd_config<
10858 T: std::convert::Into<std::option::Option<crate::model::ContainerdConfig>>,
10859 >(
10860 mut self,
10861 v: T,
10862 ) -> Self {
10863 self.containerd_config = v.into();
10864 self
10865 }
10866
10867 pub fn set_queued_provisioning<
10869 T: std::convert::Into<std::option::Option<crate::model::node_pool::QueuedProvisioning>>,
10870 >(
10871 mut self,
10872 v: T,
10873 ) -> Self {
10874 self.queued_provisioning = v.into();
10875 self
10876 }
10877
10878 pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
10880 where
10881 T: std::iter::IntoIterator<Item = V>,
10882 V: std::convert::Into<std::string::String>,
10883 {
10884 use std::iter::Iterator;
10885 self.storage_pools = v.into_iter().map(|i| i.into()).collect();
10886 self
10887 }
10888}
10889
10890impl wkt::message::Message for UpdateNodePoolRequest {
10891 fn typename() -> &'static str {
10892 "type.googleapis.com/google.container.v1.UpdateNodePoolRequest"
10893 }
10894}
10895
10896#[serde_with::serde_as]
10898#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10899#[serde(default, rename_all = "camelCase")]
10900#[non_exhaustive]
10901pub struct SetNodePoolAutoscalingRequest {
10902 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10906 #[deprecated]
10907 pub project_id: std::string::String,
10908
10909 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10914 #[deprecated]
10915 pub zone: std::string::String,
10916
10917 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10920 #[deprecated]
10921 pub cluster_id: std::string::String,
10922
10923 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10926 #[deprecated]
10927 pub node_pool_id: std::string::String,
10928
10929 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10931 pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
10932
10933 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10937 pub name: std::string::String,
10938
10939 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10940 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10941}
10942
10943impl SetNodePoolAutoscalingRequest {
10944 pub fn new() -> Self {
10945 std::default::Default::default()
10946 }
10947
10948 #[deprecated]
10950 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10951 self.project_id = v.into();
10952 self
10953 }
10954
10955 #[deprecated]
10957 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10958 self.zone = v.into();
10959 self
10960 }
10961
10962 #[deprecated]
10964 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10965 self.cluster_id = v.into();
10966 self
10967 }
10968
10969 #[deprecated]
10971 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10972 self.node_pool_id = v.into();
10973 self
10974 }
10975
10976 pub fn set_autoscaling<
10978 T: std::convert::Into<std::option::Option<crate::model::NodePoolAutoscaling>>,
10979 >(
10980 mut self,
10981 v: T,
10982 ) -> Self {
10983 self.autoscaling = v.into();
10984 self
10985 }
10986
10987 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10989 self.name = v.into();
10990 self
10991 }
10992}
10993
10994impl wkt::message::Message for SetNodePoolAutoscalingRequest {
10995 fn typename() -> &'static str {
10996 "type.googleapis.com/google.container.v1.SetNodePoolAutoscalingRequest"
10997 }
10998}
10999
11000#[serde_with::serde_as]
11002#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11003#[serde(default, rename_all = "camelCase")]
11004#[non_exhaustive]
11005pub struct SetLoggingServiceRequest {
11006 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11010 #[deprecated]
11011 pub project_id: std::string::String,
11012
11013 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11018 #[deprecated]
11019 pub zone: std::string::String,
11020
11021 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11024 #[deprecated]
11025 pub cluster_id: std::string::String,
11026
11027 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11039 pub logging_service: std::string::String,
11040
11041 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11044 pub name: std::string::String,
11045
11046 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11047 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11048}
11049
11050impl SetLoggingServiceRequest {
11051 pub fn new() -> Self {
11052 std::default::Default::default()
11053 }
11054
11055 #[deprecated]
11057 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11058 self.project_id = v.into();
11059 self
11060 }
11061
11062 #[deprecated]
11064 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11065 self.zone = v.into();
11066 self
11067 }
11068
11069 #[deprecated]
11071 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11072 self.cluster_id = v.into();
11073 self
11074 }
11075
11076 pub fn set_logging_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11078 self.logging_service = v.into();
11079 self
11080 }
11081
11082 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11084 self.name = v.into();
11085 self
11086 }
11087}
11088
11089impl wkt::message::Message for SetLoggingServiceRequest {
11090 fn typename() -> &'static str {
11091 "type.googleapis.com/google.container.v1.SetLoggingServiceRequest"
11092 }
11093}
11094
11095#[serde_with::serde_as]
11097#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11098#[serde(default, rename_all = "camelCase")]
11099#[non_exhaustive]
11100pub struct SetMonitoringServiceRequest {
11101 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11105 #[deprecated]
11106 pub project_id: std::string::String,
11107
11108 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11113 #[deprecated]
11114 pub zone: std::string::String,
11115
11116 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11119 #[deprecated]
11120 pub cluster_id: std::string::String,
11121
11122 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11134 pub monitoring_service: std::string::String,
11135
11136 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11139 pub name: std::string::String,
11140
11141 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11142 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11143}
11144
11145impl SetMonitoringServiceRequest {
11146 pub fn new() -> Self {
11147 std::default::Default::default()
11148 }
11149
11150 #[deprecated]
11152 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11153 self.project_id = v.into();
11154 self
11155 }
11156
11157 #[deprecated]
11159 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11160 self.zone = v.into();
11161 self
11162 }
11163
11164 #[deprecated]
11166 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11167 self.cluster_id = v.into();
11168 self
11169 }
11170
11171 pub fn set_monitoring_service<T: std::convert::Into<std::string::String>>(
11173 mut self,
11174 v: T,
11175 ) -> Self {
11176 self.monitoring_service = v.into();
11177 self
11178 }
11179
11180 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11182 self.name = v.into();
11183 self
11184 }
11185}
11186
11187impl wkt::message::Message for SetMonitoringServiceRequest {
11188 fn typename() -> &'static str {
11189 "type.googleapis.com/google.container.v1.SetMonitoringServiceRequest"
11190 }
11191}
11192
11193#[serde_with::serde_as]
11195#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11196#[serde(default, rename_all = "camelCase")]
11197#[non_exhaustive]
11198pub struct SetAddonsConfigRequest {
11199 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11203 #[deprecated]
11204 pub project_id: std::string::String,
11205
11206 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11211 #[deprecated]
11212 pub zone: std::string::String,
11213
11214 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11217 #[deprecated]
11218 pub cluster_id: std::string::String,
11219
11220 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11223 pub addons_config: std::option::Option<crate::model::AddonsConfig>,
11224
11225 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11228 pub name: std::string::String,
11229
11230 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11231 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11232}
11233
11234impl SetAddonsConfigRequest {
11235 pub fn new() -> Self {
11236 std::default::Default::default()
11237 }
11238
11239 #[deprecated]
11241 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11242 self.project_id = v.into();
11243 self
11244 }
11245
11246 #[deprecated]
11248 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11249 self.zone = v.into();
11250 self
11251 }
11252
11253 #[deprecated]
11255 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11256 self.cluster_id = v.into();
11257 self
11258 }
11259
11260 pub fn set_addons_config<
11262 T: std::convert::Into<std::option::Option<crate::model::AddonsConfig>>,
11263 >(
11264 mut self,
11265 v: T,
11266 ) -> Self {
11267 self.addons_config = v.into();
11268 self
11269 }
11270
11271 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11273 self.name = v.into();
11274 self
11275 }
11276}
11277
11278impl wkt::message::Message for SetAddonsConfigRequest {
11279 fn typename() -> &'static str {
11280 "type.googleapis.com/google.container.v1.SetAddonsConfigRequest"
11281 }
11282}
11283
11284#[serde_with::serde_as]
11286#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11287#[serde(default, rename_all = "camelCase")]
11288#[non_exhaustive]
11289pub struct SetLocationsRequest {
11290 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11294 #[deprecated]
11295 pub project_id: std::string::String,
11296
11297 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11302 #[deprecated]
11303 pub zone: std::string::String,
11304
11305 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11308 #[deprecated]
11309 pub cluster_id: std::string::String,
11310
11311 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11319 pub locations: std::vec::Vec<std::string::String>,
11320
11321 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11324 pub name: std::string::String,
11325
11326 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11327 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11328}
11329
11330impl SetLocationsRequest {
11331 pub fn new() -> Self {
11332 std::default::Default::default()
11333 }
11334
11335 #[deprecated]
11337 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11338 self.project_id = v.into();
11339 self
11340 }
11341
11342 #[deprecated]
11344 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11345 self.zone = v.into();
11346 self
11347 }
11348
11349 #[deprecated]
11351 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11352 self.cluster_id = v.into();
11353 self
11354 }
11355
11356 pub fn set_locations<T, V>(mut self, v: T) -> Self
11358 where
11359 T: std::iter::IntoIterator<Item = V>,
11360 V: std::convert::Into<std::string::String>,
11361 {
11362 use std::iter::Iterator;
11363 self.locations = v.into_iter().map(|i| i.into()).collect();
11364 self
11365 }
11366
11367 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11369 self.name = v.into();
11370 self
11371 }
11372}
11373
11374impl wkt::message::Message for SetLocationsRequest {
11375 fn typename() -> &'static str {
11376 "type.googleapis.com/google.container.v1.SetLocationsRequest"
11377 }
11378}
11379
11380#[serde_with::serde_as]
11382#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11383#[serde(default, rename_all = "camelCase")]
11384#[non_exhaustive]
11385pub struct UpdateMasterRequest {
11386 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11390 #[deprecated]
11391 pub project_id: std::string::String,
11392
11393 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11398 #[deprecated]
11399 pub zone: std::string::String,
11400
11401 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11404 #[deprecated]
11405 pub cluster_id: std::string::String,
11406
11407 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11418 pub master_version: std::string::String,
11419
11420 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11423 pub name: std::string::String,
11424
11425 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11426 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11427}
11428
11429impl UpdateMasterRequest {
11430 pub fn new() -> Self {
11431 std::default::Default::default()
11432 }
11433
11434 #[deprecated]
11436 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11437 self.project_id = v.into();
11438 self
11439 }
11440
11441 #[deprecated]
11443 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11444 self.zone = v.into();
11445 self
11446 }
11447
11448 #[deprecated]
11450 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11451 self.cluster_id = v.into();
11452 self
11453 }
11454
11455 pub fn set_master_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11457 self.master_version = v.into();
11458 self
11459 }
11460
11461 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11463 self.name = v.into();
11464 self
11465 }
11466}
11467
11468impl wkt::message::Message for UpdateMasterRequest {
11469 fn typename() -> &'static str {
11470 "type.googleapis.com/google.container.v1.UpdateMasterRequest"
11471 }
11472}
11473
11474#[serde_with::serde_as]
11476#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11477#[serde(default, rename_all = "camelCase")]
11478#[non_exhaustive]
11479pub struct SetMasterAuthRequest {
11480 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11484 #[deprecated]
11485 pub project_id: std::string::String,
11486
11487 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11492 #[deprecated]
11493 pub zone: std::string::String,
11494
11495 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11498 #[deprecated]
11499 pub cluster_id: std::string::String,
11500
11501 pub action: crate::model::set_master_auth_request::Action,
11503
11504 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11506 pub update: std::option::Option<crate::model::MasterAuth>,
11507
11508 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11511 pub name: std::string::String,
11512
11513 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11514 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11515}
11516
11517impl SetMasterAuthRequest {
11518 pub fn new() -> Self {
11519 std::default::Default::default()
11520 }
11521
11522 #[deprecated]
11524 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11525 self.project_id = v.into();
11526 self
11527 }
11528
11529 #[deprecated]
11531 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11532 self.zone = v.into();
11533 self
11534 }
11535
11536 #[deprecated]
11538 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11539 self.cluster_id = v.into();
11540 self
11541 }
11542
11543 pub fn set_action<T: std::convert::Into<crate::model::set_master_auth_request::Action>>(
11545 mut self,
11546 v: T,
11547 ) -> Self {
11548 self.action = v.into();
11549 self
11550 }
11551
11552 pub fn set_update<T: std::convert::Into<std::option::Option<crate::model::MasterAuth>>>(
11554 mut self,
11555 v: T,
11556 ) -> Self {
11557 self.update = v.into();
11558 self
11559 }
11560
11561 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11563 self.name = v.into();
11564 self
11565 }
11566}
11567
11568impl wkt::message::Message for SetMasterAuthRequest {
11569 fn typename() -> &'static str {
11570 "type.googleapis.com/google.container.v1.SetMasterAuthRequest"
11571 }
11572}
11573
11574pub mod set_master_auth_request {
11576 #[allow(unused_imports)]
11577 use super::*;
11578
11579 #[derive(Clone, Debug, PartialEq)]
11595 #[non_exhaustive]
11596 pub enum Action {
11597 Unknown,
11599 SetPassword,
11601 GeneratePassword,
11603 SetUsername,
11608 UnknownValue(action::UnknownValue),
11613 }
11614
11615 #[doc(hidden)]
11616 pub mod action {
11617 #[allow(unused_imports)]
11618 use super::*;
11619 #[derive(Clone, Debug, PartialEq)]
11620 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11621 }
11622
11623 impl Action {
11624 pub fn value(&self) -> std::option::Option<i32> {
11629 match self {
11630 Self::Unknown => std::option::Option::Some(0),
11631 Self::SetPassword => std::option::Option::Some(1),
11632 Self::GeneratePassword => std::option::Option::Some(2),
11633 Self::SetUsername => std::option::Option::Some(3),
11634 Self::UnknownValue(u) => u.0.value(),
11635 }
11636 }
11637
11638 pub fn name(&self) -> std::option::Option<&str> {
11643 match self {
11644 Self::Unknown => std::option::Option::Some("UNKNOWN"),
11645 Self::SetPassword => std::option::Option::Some("SET_PASSWORD"),
11646 Self::GeneratePassword => std::option::Option::Some("GENERATE_PASSWORD"),
11647 Self::SetUsername => std::option::Option::Some("SET_USERNAME"),
11648 Self::UnknownValue(u) => u.0.name(),
11649 }
11650 }
11651 }
11652
11653 impl std::default::Default for Action {
11654 fn default() -> Self {
11655 use std::convert::From;
11656 Self::from(0)
11657 }
11658 }
11659
11660 impl std::fmt::Display for Action {
11661 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11662 wkt::internal::display_enum(f, self.name(), self.value())
11663 }
11664 }
11665
11666 impl std::convert::From<i32> for Action {
11667 fn from(value: i32) -> Self {
11668 match value {
11669 0 => Self::Unknown,
11670 1 => Self::SetPassword,
11671 2 => Self::GeneratePassword,
11672 3 => Self::SetUsername,
11673 _ => Self::UnknownValue(action::UnknownValue(
11674 wkt::internal::UnknownEnumValue::Integer(value),
11675 )),
11676 }
11677 }
11678 }
11679
11680 impl std::convert::From<&str> for Action {
11681 fn from(value: &str) -> Self {
11682 use std::string::ToString;
11683 match value {
11684 "UNKNOWN" => Self::Unknown,
11685 "SET_PASSWORD" => Self::SetPassword,
11686 "GENERATE_PASSWORD" => Self::GeneratePassword,
11687 "SET_USERNAME" => Self::SetUsername,
11688 _ => Self::UnknownValue(action::UnknownValue(
11689 wkt::internal::UnknownEnumValue::String(value.to_string()),
11690 )),
11691 }
11692 }
11693 }
11694
11695 impl serde::ser::Serialize for Action {
11696 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11697 where
11698 S: serde::Serializer,
11699 {
11700 match self {
11701 Self::Unknown => serializer.serialize_i32(0),
11702 Self::SetPassword => serializer.serialize_i32(1),
11703 Self::GeneratePassword => serializer.serialize_i32(2),
11704 Self::SetUsername => serializer.serialize_i32(3),
11705 Self::UnknownValue(u) => u.0.serialize(serializer),
11706 }
11707 }
11708 }
11709
11710 impl<'de> serde::de::Deserialize<'de> for Action {
11711 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11712 where
11713 D: serde::Deserializer<'de>,
11714 {
11715 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
11716 ".google.container.v1.SetMasterAuthRequest.Action",
11717 ))
11718 }
11719 }
11720}
11721
11722#[serde_with::serde_as]
11724#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11725#[serde(default, rename_all = "camelCase")]
11726#[non_exhaustive]
11727pub struct DeleteClusterRequest {
11728 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11732 #[deprecated]
11733 pub project_id: std::string::String,
11734
11735 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11740 #[deprecated]
11741 pub zone: std::string::String,
11742
11743 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11746 #[deprecated]
11747 pub cluster_id: std::string::String,
11748
11749 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11752 pub name: std::string::String,
11753
11754 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11755 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11756}
11757
11758impl DeleteClusterRequest {
11759 pub fn new() -> Self {
11760 std::default::Default::default()
11761 }
11762
11763 #[deprecated]
11765 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11766 self.project_id = v.into();
11767 self
11768 }
11769
11770 #[deprecated]
11772 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11773 self.zone = v.into();
11774 self
11775 }
11776
11777 #[deprecated]
11779 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11780 self.cluster_id = v.into();
11781 self
11782 }
11783
11784 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11786 self.name = v.into();
11787 self
11788 }
11789}
11790
11791impl wkt::message::Message for DeleteClusterRequest {
11792 fn typename() -> &'static str {
11793 "type.googleapis.com/google.container.v1.DeleteClusterRequest"
11794 }
11795}
11796
11797#[serde_with::serde_as]
11799#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11800#[serde(default, rename_all = "camelCase")]
11801#[non_exhaustive]
11802pub struct ListClustersRequest {
11803 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11807 #[deprecated]
11808 pub project_id: std::string::String,
11809
11810 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11815 #[deprecated]
11816 pub zone: std::string::String,
11817
11818 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11822 pub parent: std::string::String,
11823
11824 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11825 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11826}
11827
11828impl ListClustersRequest {
11829 pub fn new() -> Self {
11830 std::default::Default::default()
11831 }
11832
11833 #[deprecated]
11835 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11836 self.project_id = v.into();
11837 self
11838 }
11839
11840 #[deprecated]
11842 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11843 self.zone = v.into();
11844 self
11845 }
11846
11847 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11849 self.parent = v.into();
11850 self
11851 }
11852}
11853
11854impl wkt::message::Message for ListClustersRequest {
11855 fn typename() -> &'static str {
11856 "type.googleapis.com/google.container.v1.ListClustersRequest"
11857 }
11858}
11859
11860#[serde_with::serde_as]
11862#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11863#[serde(default, rename_all = "camelCase")]
11864#[non_exhaustive]
11865pub struct ListClustersResponse {
11866 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11869 pub clusters: std::vec::Vec<crate::model::Cluster>,
11870
11871 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11874 pub missing_zones: std::vec::Vec<std::string::String>,
11875
11876 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11877 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11878}
11879
11880impl ListClustersResponse {
11881 pub fn new() -> Self {
11882 std::default::Default::default()
11883 }
11884
11885 pub fn set_clusters<T, V>(mut self, v: T) -> Self
11887 where
11888 T: std::iter::IntoIterator<Item = V>,
11889 V: std::convert::Into<crate::model::Cluster>,
11890 {
11891 use std::iter::Iterator;
11892 self.clusters = v.into_iter().map(|i| i.into()).collect();
11893 self
11894 }
11895
11896 pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
11898 where
11899 T: std::iter::IntoIterator<Item = V>,
11900 V: std::convert::Into<std::string::String>,
11901 {
11902 use std::iter::Iterator;
11903 self.missing_zones = v.into_iter().map(|i| i.into()).collect();
11904 self
11905 }
11906}
11907
11908impl wkt::message::Message for ListClustersResponse {
11909 fn typename() -> &'static str {
11910 "type.googleapis.com/google.container.v1.ListClustersResponse"
11911 }
11912}
11913
11914#[serde_with::serde_as]
11916#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11917#[serde(default, rename_all = "camelCase")]
11918#[non_exhaustive]
11919pub struct GetOperationRequest {
11920 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11924 #[deprecated]
11925 pub project_id: std::string::String,
11926
11927 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11932 #[deprecated]
11933 pub zone: std::string::String,
11934
11935 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11938 #[deprecated]
11939 pub operation_id: std::string::String,
11940
11941 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11944 pub name: std::string::String,
11945
11946 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11947 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11948}
11949
11950impl GetOperationRequest {
11951 pub fn new() -> Self {
11952 std::default::Default::default()
11953 }
11954
11955 #[deprecated]
11957 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11958 self.project_id = v.into();
11959 self
11960 }
11961
11962 #[deprecated]
11964 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11965 self.zone = v.into();
11966 self
11967 }
11968
11969 #[deprecated]
11971 pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11972 self.operation_id = v.into();
11973 self
11974 }
11975
11976 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11978 self.name = v.into();
11979 self
11980 }
11981}
11982
11983impl wkt::message::Message for GetOperationRequest {
11984 fn typename() -> &'static str {
11985 "type.googleapis.com/google.container.v1.GetOperationRequest"
11986 }
11987}
11988
11989#[serde_with::serde_as]
11991#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11992#[serde(default, rename_all = "camelCase")]
11993#[non_exhaustive]
11994pub struct ListOperationsRequest {
11995 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11999 #[deprecated]
12000 pub project_id: std::string::String,
12001
12002 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12007 #[deprecated]
12008 pub zone: std::string::String,
12009
12010 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12014 pub parent: std::string::String,
12015
12016 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12017 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12018}
12019
12020impl ListOperationsRequest {
12021 pub fn new() -> Self {
12022 std::default::Default::default()
12023 }
12024
12025 #[deprecated]
12027 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12028 self.project_id = v.into();
12029 self
12030 }
12031
12032 #[deprecated]
12034 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12035 self.zone = v.into();
12036 self
12037 }
12038
12039 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12041 self.parent = v.into();
12042 self
12043 }
12044}
12045
12046impl wkt::message::Message for ListOperationsRequest {
12047 fn typename() -> &'static str {
12048 "type.googleapis.com/google.container.v1.ListOperationsRequest"
12049 }
12050}
12051
12052#[serde_with::serde_as]
12054#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12055#[serde(default, rename_all = "camelCase")]
12056#[non_exhaustive]
12057pub struct CancelOperationRequest {
12058 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12062 #[deprecated]
12063 pub project_id: std::string::String,
12064
12065 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12070 #[deprecated]
12071 pub zone: std::string::String,
12072
12073 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12076 #[deprecated]
12077 pub operation_id: std::string::String,
12078
12079 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12082 pub name: std::string::String,
12083
12084 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12085 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12086}
12087
12088impl CancelOperationRequest {
12089 pub fn new() -> Self {
12090 std::default::Default::default()
12091 }
12092
12093 #[deprecated]
12095 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12096 self.project_id = v.into();
12097 self
12098 }
12099
12100 #[deprecated]
12102 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12103 self.zone = v.into();
12104 self
12105 }
12106
12107 #[deprecated]
12109 pub fn set_operation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12110 self.operation_id = v.into();
12111 self
12112 }
12113
12114 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12116 self.name = v.into();
12117 self
12118 }
12119}
12120
12121impl wkt::message::Message for CancelOperationRequest {
12122 fn typename() -> &'static str {
12123 "type.googleapis.com/google.container.v1.CancelOperationRequest"
12124 }
12125}
12126
12127#[serde_with::serde_as]
12129#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12130#[serde(default, rename_all = "camelCase")]
12131#[non_exhaustive]
12132pub struct ListOperationsResponse {
12133 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12135 pub operations: std::vec::Vec<crate::model::Operation>,
12136
12137 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12140 pub missing_zones: std::vec::Vec<std::string::String>,
12141
12142 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12143 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12144}
12145
12146impl ListOperationsResponse {
12147 pub fn new() -> Self {
12148 std::default::Default::default()
12149 }
12150
12151 pub fn set_operations<T, V>(mut self, v: T) -> Self
12153 where
12154 T: std::iter::IntoIterator<Item = V>,
12155 V: std::convert::Into<crate::model::Operation>,
12156 {
12157 use std::iter::Iterator;
12158 self.operations = v.into_iter().map(|i| i.into()).collect();
12159 self
12160 }
12161
12162 pub fn set_missing_zones<T, V>(mut self, v: T) -> Self
12164 where
12165 T: std::iter::IntoIterator<Item = V>,
12166 V: std::convert::Into<std::string::String>,
12167 {
12168 use std::iter::Iterator;
12169 self.missing_zones = v.into_iter().map(|i| i.into()).collect();
12170 self
12171 }
12172}
12173
12174impl wkt::message::Message for ListOperationsResponse {
12175 fn typename() -> &'static str {
12176 "type.googleapis.com/google.container.v1.ListOperationsResponse"
12177 }
12178}
12179
12180#[serde_with::serde_as]
12182#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12183#[serde(default, rename_all = "camelCase")]
12184#[non_exhaustive]
12185pub struct GetServerConfigRequest {
12186 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12190 #[deprecated]
12191 pub project_id: std::string::String,
12192
12193 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12198 #[deprecated]
12199 pub zone: std::string::String,
12200
12201 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12204 pub name: std::string::String,
12205
12206 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12207 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12208}
12209
12210impl GetServerConfigRequest {
12211 pub fn new() -> Self {
12212 std::default::Default::default()
12213 }
12214
12215 #[deprecated]
12217 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12218 self.project_id = v.into();
12219 self
12220 }
12221
12222 #[deprecated]
12224 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12225 self.zone = v.into();
12226 self
12227 }
12228
12229 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12231 self.name = v.into();
12232 self
12233 }
12234}
12235
12236impl wkt::message::Message for GetServerConfigRequest {
12237 fn typename() -> &'static str {
12238 "type.googleapis.com/google.container.v1.GetServerConfigRequest"
12239 }
12240}
12241
12242#[serde_with::serde_as]
12244#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12245#[serde(default, rename_all = "camelCase")]
12246#[non_exhaustive]
12247pub struct ServerConfig {
12248 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12250 pub default_cluster_version: std::string::String,
12251
12252 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12254 pub valid_node_versions: std::vec::Vec<std::string::String>,
12255
12256 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12258 pub default_image_type: std::string::String,
12259
12260 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12262 pub valid_image_types: std::vec::Vec<std::string::String>,
12263
12264 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12266 pub valid_master_versions: std::vec::Vec<std::string::String>,
12267
12268 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12270 pub channels: std::vec::Vec<crate::model::server_config::ReleaseChannelConfig>,
12271
12272 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12273 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12274}
12275
12276impl ServerConfig {
12277 pub fn new() -> Self {
12278 std::default::Default::default()
12279 }
12280
12281 pub fn set_default_cluster_version<T: std::convert::Into<std::string::String>>(
12283 mut self,
12284 v: T,
12285 ) -> Self {
12286 self.default_cluster_version = v.into();
12287 self
12288 }
12289
12290 pub fn set_valid_node_versions<T, V>(mut self, v: T) -> Self
12292 where
12293 T: std::iter::IntoIterator<Item = V>,
12294 V: std::convert::Into<std::string::String>,
12295 {
12296 use std::iter::Iterator;
12297 self.valid_node_versions = v.into_iter().map(|i| i.into()).collect();
12298 self
12299 }
12300
12301 pub fn set_default_image_type<T: std::convert::Into<std::string::String>>(
12303 mut self,
12304 v: T,
12305 ) -> Self {
12306 self.default_image_type = v.into();
12307 self
12308 }
12309
12310 pub fn set_valid_image_types<T, V>(mut self, v: T) -> Self
12312 where
12313 T: std::iter::IntoIterator<Item = V>,
12314 V: std::convert::Into<std::string::String>,
12315 {
12316 use std::iter::Iterator;
12317 self.valid_image_types = v.into_iter().map(|i| i.into()).collect();
12318 self
12319 }
12320
12321 pub fn set_valid_master_versions<T, V>(mut self, v: T) -> Self
12323 where
12324 T: std::iter::IntoIterator<Item = V>,
12325 V: std::convert::Into<std::string::String>,
12326 {
12327 use std::iter::Iterator;
12328 self.valid_master_versions = v.into_iter().map(|i| i.into()).collect();
12329 self
12330 }
12331
12332 pub fn set_channels<T, V>(mut self, v: T) -> Self
12334 where
12335 T: std::iter::IntoIterator<Item = V>,
12336 V: std::convert::Into<crate::model::server_config::ReleaseChannelConfig>,
12337 {
12338 use std::iter::Iterator;
12339 self.channels = v.into_iter().map(|i| i.into()).collect();
12340 self
12341 }
12342}
12343
12344impl wkt::message::Message for ServerConfig {
12345 fn typename() -> &'static str {
12346 "type.googleapis.com/google.container.v1.ServerConfig"
12347 }
12348}
12349
12350pub mod server_config {
12352 #[allow(unused_imports)]
12353 use super::*;
12354
12355 #[serde_with::serde_as]
12357 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12358 #[serde(default, rename_all = "camelCase")]
12359 #[non_exhaustive]
12360 pub struct ReleaseChannelConfig {
12361 pub channel: crate::model::release_channel::Channel,
12363
12364 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12366 pub default_version: std::string::String,
12367
12368 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12370 pub valid_versions: std::vec::Vec<std::string::String>,
12371
12372 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12374 pub upgrade_target_version: std::string::String,
12375
12376 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12377 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12378 }
12379
12380 impl ReleaseChannelConfig {
12381 pub fn new() -> Self {
12382 std::default::Default::default()
12383 }
12384
12385 pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
12387 mut self,
12388 v: T,
12389 ) -> Self {
12390 self.channel = v.into();
12391 self
12392 }
12393
12394 pub fn set_default_version<T: std::convert::Into<std::string::String>>(
12396 mut self,
12397 v: T,
12398 ) -> Self {
12399 self.default_version = v.into();
12400 self
12401 }
12402
12403 pub fn set_valid_versions<T, V>(mut self, v: T) -> Self
12405 where
12406 T: std::iter::IntoIterator<Item = V>,
12407 V: std::convert::Into<std::string::String>,
12408 {
12409 use std::iter::Iterator;
12410 self.valid_versions = v.into_iter().map(|i| i.into()).collect();
12411 self
12412 }
12413
12414 pub fn set_upgrade_target_version<T: std::convert::Into<std::string::String>>(
12416 mut self,
12417 v: T,
12418 ) -> Self {
12419 self.upgrade_target_version = v.into();
12420 self
12421 }
12422 }
12423
12424 impl wkt::message::Message for ReleaseChannelConfig {
12425 fn typename() -> &'static str {
12426 "type.googleapis.com/google.container.v1.ServerConfig.ReleaseChannelConfig"
12427 }
12428 }
12429}
12430
12431#[serde_with::serde_as]
12433#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12434#[serde(default, rename_all = "camelCase")]
12435#[non_exhaustive]
12436pub struct CreateNodePoolRequest {
12437 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12441 #[deprecated]
12442 pub project_id: std::string::String,
12443
12444 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12449 #[deprecated]
12450 pub zone: std::string::String,
12451
12452 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12455 #[deprecated]
12456 pub cluster_id: std::string::String,
12457
12458 #[serde(skip_serializing_if = "std::option::Option::is_none")]
12460 pub node_pool: std::option::Option<crate::model::NodePool>,
12461
12462 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12466 pub parent: std::string::String,
12467
12468 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12469 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12470}
12471
12472impl CreateNodePoolRequest {
12473 pub fn new() -> Self {
12474 std::default::Default::default()
12475 }
12476
12477 #[deprecated]
12479 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12480 self.project_id = v.into();
12481 self
12482 }
12483
12484 #[deprecated]
12486 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12487 self.zone = v.into();
12488 self
12489 }
12490
12491 #[deprecated]
12493 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12494 self.cluster_id = v.into();
12495 self
12496 }
12497
12498 pub fn set_node_pool<T: std::convert::Into<std::option::Option<crate::model::NodePool>>>(
12500 mut self,
12501 v: T,
12502 ) -> Self {
12503 self.node_pool = v.into();
12504 self
12505 }
12506
12507 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12509 self.parent = v.into();
12510 self
12511 }
12512}
12513
12514impl wkt::message::Message for CreateNodePoolRequest {
12515 fn typename() -> &'static str {
12516 "type.googleapis.com/google.container.v1.CreateNodePoolRequest"
12517 }
12518}
12519
12520#[serde_with::serde_as]
12522#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12523#[serde(default, rename_all = "camelCase")]
12524#[non_exhaustive]
12525pub struct DeleteNodePoolRequest {
12526 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12530 #[deprecated]
12531 pub project_id: std::string::String,
12532
12533 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12538 #[deprecated]
12539 pub zone: std::string::String,
12540
12541 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12544 #[deprecated]
12545 pub cluster_id: std::string::String,
12546
12547 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12550 #[deprecated]
12551 pub node_pool_id: std::string::String,
12552
12553 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12557 pub name: std::string::String,
12558
12559 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12560 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12561}
12562
12563impl DeleteNodePoolRequest {
12564 pub fn new() -> Self {
12565 std::default::Default::default()
12566 }
12567
12568 #[deprecated]
12570 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12571 self.project_id = v.into();
12572 self
12573 }
12574
12575 #[deprecated]
12577 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12578 self.zone = v.into();
12579 self
12580 }
12581
12582 #[deprecated]
12584 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12585 self.cluster_id = v.into();
12586 self
12587 }
12588
12589 #[deprecated]
12591 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12592 self.node_pool_id = v.into();
12593 self
12594 }
12595
12596 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12598 self.name = v.into();
12599 self
12600 }
12601}
12602
12603impl wkt::message::Message for DeleteNodePoolRequest {
12604 fn typename() -> &'static str {
12605 "type.googleapis.com/google.container.v1.DeleteNodePoolRequest"
12606 }
12607}
12608
12609#[serde_with::serde_as]
12611#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12612#[serde(default, rename_all = "camelCase")]
12613#[non_exhaustive]
12614pub struct ListNodePoolsRequest {
12615 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12619 #[deprecated]
12620 pub project_id: std::string::String,
12621
12622 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12627 #[deprecated]
12628 pub zone: std::string::String,
12629
12630 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12633 #[deprecated]
12634 pub cluster_id: std::string::String,
12635
12636 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12639 pub parent: std::string::String,
12640
12641 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12642 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12643}
12644
12645impl ListNodePoolsRequest {
12646 pub fn new() -> Self {
12647 std::default::Default::default()
12648 }
12649
12650 #[deprecated]
12652 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12653 self.project_id = v.into();
12654 self
12655 }
12656
12657 #[deprecated]
12659 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12660 self.zone = v.into();
12661 self
12662 }
12663
12664 #[deprecated]
12666 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12667 self.cluster_id = v.into();
12668 self
12669 }
12670
12671 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12673 self.parent = v.into();
12674 self
12675 }
12676}
12677
12678impl wkt::message::Message for ListNodePoolsRequest {
12679 fn typename() -> &'static str {
12680 "type.googleapis.com/google.container.v1.ListNodePoolsRequest"
12681 }
12682}
12683
12684#[serde_with::serde_as]
12686#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12687#[serde(default, rename_all = "camelCase")]
12688#[non_exhaustive]
12689pub struct GetNodePoolRequest {
12690 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12694 #[deprecated]
12695 pub project_id: std::string::String,
12696
12697 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12702 #[deprecated]
12703 pub zone: std::string::String,
12704
12705 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12708 #[deprecated]
12709 pub cluster_id: std::string::String,
12710
12711 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12714 #[deprecated]
12715 pub node_pool_id: std::string::String,
12716
12717 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12721 pub name: std::string::String,
12722
12723 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12724 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12725}
12726
12727impl GetNodePoolRequest {
12728 pub fn new() -> Self {
12729 std::default::Default::default()
12730 }
12731
12732 #[deprecated]
12734 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12735 self.project_id = v.into();
12736 self
12737 }
12738
12739 #[deprecated]
12741 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12742 self.zone = v.into();
12743 self
12744 }
12745
12746 #[deprecated]
12748 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12749 self.cluster_id = v.into();
12750 self
12751 }
12752
12753 #[deprecated]
12755 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12756 self.node_pool_id = v.into();
12757 self
12758 }
12759
12760 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12762 self.name = v.into();
12763 self
12764 }
12765}
12766
12767impl wkt::message::Message for GetNodePoolRequest {
12768 fn typename() -> &'static str {
12769 "type.googleapis.com/google.container.v1.GetNodePoolRequest"
12770 }
12771}
12772
12773#[serde_with::serde_as]
12775#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12776#[serde(default, rename_all = "camelCase")]
12777#[non_exhaustive]
12778pub struct BlueGreenSettings {
12779 #[serde(skip_serializing_if = "std::option::Option::is_none")]
12782 pub node_pool_soak_duration: std::option::Option<wkt::Duration>,
12783
12784 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
12786 pub rollout_policy: std::option::Option<crate::model::blue_green_settings::RolloutPolicy>,
12787
12788 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12789 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12790}
12791
12792impl BlueGreenSettings {
12793 pub fn new() -> Self {
12794 std::default::Default::default()
12795 }
12796
12797 pub fn set_node_pool_soak_duration<
12799 T: std::convert::Into<std::option::Option<wkt::Duration>>,
12800 >(
12801 mut self,
12802 v: T,
12803 ) -> Self {
12804 self.node_pool_soak_duration = v.into();
12805 self
12806 }
12807
12808 pub fn set_rollout_policy<
12813 T: std::convert::Into<std::option::Option<crate::model::blue_green_settings::RolloutPolicy>>,
12814 >(
12815 mut self,
12816 v: T,
12817 ) -> Self {
12818 self.rollout_policy = v.into();
12819 self
12820 }
12821
12822 pub fn standard_rollout_policy(
12826 &self,
12827 ) -> std::option::Option<
12828 &std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
12829 > {
12830 #[allow(unreachable_patterns)]
12831 self.rollout_policy.as_ref().and_then(|v| match v {
12832 crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v) => {
12833 std::option::Option::Some(v)
12834 }
12835 _ => std::option::Option::None,
12836 })
12837 }
12838
12839 pub fn set_standard_rollout_policy<
12845 T: std::convert::Into<
12846 std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
12847 >,
12848 >(
12849 mut self,
12850 v: T,
12851 ) -> Self {
12852 self.rollout_policy = std::option::Option::Some(
12853 crate::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(v.into()),
12854 );
12855 self
12856 }
12857}
12858
12859impl wkt::message::Message for BlueGreenSettings {
12860 fn typename() -> &'static str {
12861 "type.googleapis.com/google.container.v1.BlueGreenSettings"
12862 }
12863}
12864
12865pub mod blue_green_settings {
12867 #[allow(unused_imports)]
12868 use super::*;
12869
12870 #[serde_with::serde_as]
12872 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12873 #[serde(default, rename_all = "camelCase")]
12874 #[non_exhaustive]
12875 pub struct StandardRolloutPolicy {
12876 #[serde(skip_serializing_if = "std::option::Option::is_none")]
12878 pub batch_soak_duration: std::option::Option<wkt::Duration>,
12879
12880 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
12882 pub update_batch_size: std::option::Option<
12883 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
12884 >,
12885
12886 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12887 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12888 }
12889
12890 impl StandardRolloutPolicy {
12891 pub fn new() -> Self {
12892 std::default::Default::default()
12893 }
12894
12895 pub fn set_batch_soak_duration<
12897 T: std::convert::Into<std::option::Option<wkt::Duration>>,
12898 >(
12899 mut self,
12900 v: T,
12901 ) -> Self {
12902 self.batch_soak_duration = v.into();
12903 self
12904 }
12905
12906 pub fn set_update_batch_size<
12911 T: std::convert::Into<
12912 std::option::Option<
12913 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize,
12914 >,
12915 >,
12916 >(
12917 mut self,
12918 v: T,
12919 ) -> Self {
12920 self.update_batch_size = v.into();
12921 self
12922 }
12923
12924 pub fn batch_percentage(&self) -> std::option::Option<&f32> {
12928 #[allow(unreachable_patterns)]
12929 self.update_batch_size.as_ref().and_then(|v| match v {
12930 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(v) => std::option::Option::Some(v),
12931 _ => std::option::Option::None,
12932 })
12933 }
12934
12935 pub fn set_batch_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
12941 self.update_batch_size = std::option::Option::Some(
12942 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchPercentage(
12943 v.into()
12944 )
12945 );
12946 self
12947 }
12948
12949 pub fn batch_node_count(&self) -> std::option::Option<&i32> {
12953 #[allow(unreachable_patterns)]
12954 self.update_batch_size.as_ref().and_then(|v| match v {
12955 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(v) => std::option::Option::Some(v),
12956 _ => std::option::Option::None,
12957 })
12958 }
12959
12960 pub fn set_batch_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12966 self.update_batch_size = std::option::Option::Some(
12967 crate::model::blue_green_settings::standard_rollout_policy::UpdateBatchSize::BatchNodeCount(
12968 v.into()
12969 )
12970 );
12971 self
12972 }
12973 }
12974
12975 impl wkt::message::Message for StandardRolloutPolicy {
12976 fn typename() -> &'static str {
12977 "type.googleapis.com/google.container.v1.BlueGreenSettings.StandardRolloutPolicy"
12978 }
12979 }
12980
12981 pub mod standard_rollout_policy {
12983 #[allow(unused_imports)]
12984 use super::*;
12985
12986 #[serde_with::serde_as]
12988 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12989 #[serde(rename_all = "camelCase")]
12990 #[non_exhaustive]
12991 pub enum UpdateBatchSize {
12992 BatchPercentage(#[serde_as(as = "wkt::internal::F32")] f32),
12995 BatchNodeCount(i32),
12997 }
12998 }
12999
13000 #[serde_with::serde_as]
13002 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
13003 #[serde(rename_all = "camelCase")]
13004 #[non_exhaustive]
13005 pub enum RolloutPolicy {
13006 StandardRolloutPolicy(
13008 std::boxed::Box<crate::model::blue_green_settings::StandardRolloutPolicy>,
13009 ),
13010 }
13011}
13012
13013#[serde_with::serde_as]
13020#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13021#[serde(default, rename_all = "camelCase")]
13022#[non_exhaustive]
13023pub struct NodePool {
13024 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13026 pub name: std::string::String,
13027
13028 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13030 pub config: std::option::Option<crate::model::NodeConfig>,
13031
13032 #[serde(skip_serializing_if = "wkt::internal::is_default")]
13037 pub initial_node_count: i32,
13038
13039 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13050 pub locations: std::vec::Vec<std::string::String>,
13051
13052 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13055 pub network_config: std::option::Option<crate::model::NodeNetworkConfig>,
13056
13057 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13059 pub self_link: std::string::String,
13060
13061 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13065 pub version: std::string::String,
13066
13067 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13073 pub instance_group_urls: std::vec::Vec<std::string::String>,
13074
13075 pub status: crate::model::node_pool::Status,
13077
13078 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13082 #[deprecated]
13083 pub status_message: std::string::String,
13084
13085 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13088 pub autoscaling: std::option::Option<crate::model::NodePoolAutoscaling>,
13089
13090 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13092 pub management: std::option::Option<crate::model::NodeManagement>,
13093
13094 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13097 pub max_pods_constraint: std::option::Option<crate::model::MaxPodsConstraint>,
13098
13099 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13101 pub conditions: std::vec::Vec<crate::model::StatusCondition>,
13102
13103 #[serde(skip_serializing_if = "wkt::internal::is_default")]
13105 pub pod_ipv4_cidr_size: i32,
13106
13107 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13109 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
13110
13111 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13113 pub placement_policy: std::option::Option<crate::model::node_pool::PlacementPolicy>,
13114
13115 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13118 pub update_info: std::option::Option<crate::model::node_pool::UpdateInfo>,
13119
13120 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13124 pub etag: std::string::String,
13125
13126 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13128 pub queued_provisioning: std::option::Option<crate::model::node_pool::QueuedProvisioning>,
13129
13130 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13132 pub best_effort_provisioning: std::option::Option<crate::model::BestEffortProvisioning>,
13133
13134 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13135 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13136}
13137
13138impl NodePool {
13139 pub fn new() -> Self {
13140 std::default::Default::default()
13141 }
13142
13143 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13145 self.name = v.into();
13146 self
13147 }
13148
13149 pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::NodeConfig>>>(
13151 mut self,
13152 v: T,
13153 ) -> Self {
13154 self.config = v.into();
13155 self
13156 }
13157
13158 pub fn set_initial_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13160 self.initial_node_count = v.into();
13161 self
13162 }
13163
13164 pub fn set_locations<T, V>(mut self, v: T) -> Self
13166 where
13167 T: std::iter::IntoIterator<Item = V>,
13168 V: std::convert::Into<std::string::String>,
13169 {
13170 use std::iter::Iterator;
13171 self.locations = v.into_iter().map(|i| i.into()).collect();
13172 self
13173 }
13174
13175 pub fn set_network_config<
13177 T: std::convert::Into<std::option::Option<crate::model::NodeNetworkConfig>>,
13178 >(
13179 mut self,
13180 v: T,
13181 ) -> Self {
13182 self.network_config = v.into();
13183 self
13184 }
13185
13186 pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13188 self.self_link = v.into();
13189 self
13190 }
13191
13192 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13194 self.version = v.into();
13195 self
13196 }
13197
13198 pub fn set_instance_group_urls<T, V>(mut self, v: T) -> Self
13200 where
13201 T: std::iter::IntoIterator<Item = V>,
13202 V: std::convert::Into<std::string::String>,
13203 {
13204 use std::iter::Iterator;
13205 self.instance_group_urls = v.into_iter().map(|i| i.into()).collect();
13206 self
13207 }
13208
13209 pub fn set_status<T: std::convert::Into<crate::model::node_pool::Status>>(
13211 mut self,
13212 v: T,
13213 ) -> Self {
13214 self.status = v.into();
13215 self
13216 }
13217
13218 #[deprecated]
13220 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13221 self.status_message = v.into();
13222 self
13223 }
13224
13225 pub fn set_autoscaling<
13227 T: std::convert::Into<std::option::Option<crate::model::NodePoolAutoscaling>>,
13228 >(
13229 mut self,
13230 v: T,
13231 ) -> Self {
13232 self.autoscaling = v.into();
13233 self
13234 }
13235
13236 pub fn set_management<
13238 T: std::convert::Into<std::option::Option<crate::model::NodeManagement>>,
13239 >(
13240 mut self,
13241 v: T,
13242 ) -> Self {
13243 self.management = v.into();
13244 self
13245 }
13246
13247 pub fn set_max_pods_constraint<
13249 T: std::convert::Into<std::option::Option<crate::model::MaxPodsConstraint>>,
13250 >(
13251 mut self,
13252 v: T,
13253 ) -> Self {
13254 self.max_pods_constraint = v.into();
13255 self
13256 }
13257
13258 pub fn set_conditions<T, V>(mut self, v: T) -> Self
13260 where
13261 T: std::iter::IntoIterator<Item = V>,
13262 V: std::convert::Into<crate::model::StatusCondition>,
13263 {
13264 use std::iter::Iterator;
13265 self.conditions = v.into_iter().map(|i| i.into()).collect();
13266 self
13267 }
13268
13269 pub fn set_pod_ipv4_cidr_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13271 self.pod_ipv4_cidr_size = v.into();
13272 self
13273 }
13274
13275 pub fn set_upgrade_settings<
13277 T: std::convert::Into<std::option::Option<crate::model::node_pool::UpgradeSettings>>,
13278 >(
13279 mut self,
13280 v: T,
13281 ) -> Self {
13282 self.upgrade_settings = v.into();
13283 self
13284 }
13285
13286 pub fn set_placement_policy<
13288 T: std::convert::Into<std::option::Option<crate::model::node_pool::PlacementPolicy>>,
13289 >(
13290 mut self,
13291 v: T,
13292 ) -> Self {
13293 self.placement_policy = v.into();
13294 self
13295 }
13296
13297 pub fn set_update_info<
13299 T: std::convert::Into<std::option::Option<crate::model::node_pool::UpdateInfo>>,
13300 >(
13301 mut self,
13302 v: T,
13303 ) -> Self {
13304 self.update_info = v.into();
13305 self
13306 }
13307
13308 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13310 self.etag = v.into();
13311 self
13312 }
13313
13314 pub fn set_queued_provisioning<
13316 T: std::convert::Into<std::option::Option<crate::model::node_pool::QueuedProvisioning>>,
13317 >(
13318 mut self,
13319 v: T,
13320 ) -> Self {
13321 self.queued_provisioning = v.into();
13322 self
13323 }
13324
13325 pub fn set_best_effort_provisioning<
13327 T: std::convert::Into<std::option::Option<crate::model::BestEffortProvisioning>>,
13328 >(
13329 mut self,
13330 v: T,
13331 ) -> Self {
13332 self.best_effort_provisioning = v.into();
13333 self
13334 }
13335}
13336
13337impl wkt::message::Message for NodePool {
13338 fn typename() -> &'static str {
13339 "type.googleapis.com/google.container.v1.NodePool"
13340 }
13341}
13342
13343pub mod node_pool {
13345 #[allow(unused_imports)]
13346 use super::*;
13347
13348 #[serde_with::serde_as]
13397 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13398 #[serde(default, rename_all = "camelCase")]
13399 #[non_exhaustive]
13400 pub struct UpgradeSettings {
13401 #[serde(skip_serializing_if = "wkt::internal::is_default")]
13404 pub max_surge: i32,
13405
13406 #[serde(skip_serializing_if = "wkt::internal::is_default")]
13410 pub max_unavailable: i32,
13411
13412 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13414 pub strategy: std::option::Option<crate::model::NodePoolUpdateStrategy>,
13415
13416 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13418 pub blue_green_settings: std::option::Option<crate::model::BlueGreenSettings>,
13419
13420 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13421 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13422 }
13423
13424 impl UpgradeSettings {
13425 pub fn new() -> Self {
13426 std::default::Default::default()
13427 }
13428
13429 pub fn set_max_surge<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13431 self.max_surge = v.into();
13432 self
13433 }
13434
13435 pub fn set_max_unavailable<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13437 self.max_unavailable = v.into();
13438 self
13439 }
13440
13441 pub fn set_strategy<
13443 T: std::convert::Into<std::option::Option<crate::model::NodePoolUpdateStrategy>>,
13444 >(
13445 mut self,
13446 v: T,
13447 ) -> Self {
13448 self.strategy = v.into();
13449 self
13450 }
13451
13452 pub fn set_blue_green_settings<
13454 T: std::convert::Into<std::option::Option<crate::model::BlueGreenSettings>>,
13455 >(
13456 mut self,
13457 v: T,
13458 ) -> Self {
13459 self.blue_green_settings = v.into();
13460 self
13461 }
13462 }
13463
13464 impl wkt::message::Message for UpgradeSettings {
13465 fn typename() -> &'static str {
13466 "type.googleapis.com/google.container.v1.NodePool.UpgradeSettings"
13467 }
13468 }
13469
13470 #[serde_with::serde_as]
13473 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13474 #[serde(default, rename_all = "camelCase")]
13475 #[non_exhaustive]
13476 pub struct UpdateInfo {
13477 #[serde(skip_serializing_if = "std::option::Option::is_none")]
13479 pub blue_green_info:
13480 std::option::Option<crate::model::node_pool::update_info::BlueGreenInfo>,
13481
13482 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13483 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13484 }
13485
13486 impl UpdateInfo {
13487 pub fn new() -> Self {
13488 std::default::Default::default()
13489 }
13490
13491 pub fn set_blue_green_info<
13493 T: std::convert::Into<
13494 std::option::Option<crate::model::node_pool::update_info::BlueGreenInfo>,
13495 >,
13496 >(
13497 mut self,
13498 v: T,
13499 ) -> Self {
13500 self.blue_green_info = v.into();
13501 self
13502 }
13503 }
13504
13505 impl wkt::message::Message for UpdateInfo {
13506 fn typename() -> &'static str {
13507 "type.googleapis.com/google.container.v1.NodePool.UpdateInfo"
13508 }
13509 }
13510
13511 pub mod update_info {
13513 #[allow(unused_imports)]
13514 use super::*;
13515
13516 #[serde_with::serde_as]
13518 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13519 #[serde(default, rename_all = "camelCase")]
13520 #[non_exhaustive]
13521 pub struct BlueGreenInfo {
13522 pub phase: crate::model::node_pool::update_info::blue_green_info::Phase,
13524
13525 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13529 pub blue_instance_group_urls: std::vec::Vec<std::string::String>,
13530
13531 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13535 pub green_instance_group_urls: std::vec::Vec<std::string::String>,
13536
13537 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13540 pub blue_pool_deletion_start_time: std::string::String,
13541
13542 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13544 pub green_pool_version: std::string::String,
13545
13546 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13547 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13548 }
13549
13550 impl BlueGreenInfo {
13551 pub fn new() -> Self {
13552 std::default::Default::default()
13553 }
13554
13555 pub fn set_phase<
13557 T: std::convert::Into<crate::model::node_pool::update_info::blue_green_info::Phase>,
13558 >(
13559 mut self,
13560 v: T,
13561 ) -> Self {
13562 self.phase = v.into();
13563 self
13564 }
13565
13566 pub fn set_blue_instance_group_urls<T, V>(mut self, v: T) -> Self
13568 where
13569 T: std::iter::IntoIterator<Item = V>,
13570 V: std::convert::Into<std::string::String>,
13571 {
13572 use std::iter::Iterator;
13573 self.blue_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
13574 self
13575 }
13576
13577 pub fn set_green_instance_group_urls<T, V>(mut self, v: T) -> Self
13579 where
13580 T: std::iter::IntoIterator<Item = V>,
13581 V: std::convert::Into<std::string::String>,
13582 {
13583 use std::iter::Iterator;
13584 self.green_instance_group_urls = v.into_iter().map(|i| i.into()).collect();
13585 self
13586 }
13587
13588 pub fn set_blue_pool_deletion_start_time<T: std::convert::Into<std::string::String>>(
13590 mut self,
13591 v: T,
13592 ) -> Self {
13593 self.blue_pool_deletion_start_time = v.into();
13594 self
13595 }
13596
13597 pub fn set_green_pool_version<T: std::convert::Into<std::string::String>>(
13599 mut self,
13600 v: T,
13601 ) -> Self {
13602 self.green_pool_version = v.into();
13603 self
13604 }
13605 }
13606
13607 impl wkt::message::Message for BlueGreenInfo {
13608 fn typename() -> &'static str {
13609 "type.googleapis.com/google.container.v1.NodePool.UpdateInfo.BlueGreenInfo"
13610 }
13611 }
13612
13613 pub mod blue_green_info {
13615 #[allow(unused_imports)]
13616 use super::*;
13617
13618 #[derive(Clone, Debug, PartialEq)]
13634 #[non_exhaustive]
13635 pub enum Phase {
13636 Unspecified,
13638 UpdateStarted,
13640 CreatingGreenPool,
13642 CordoningBluePool,
13644 DrainingBluePool,
13646 NodePoolSoaking,
13648 DeletingBluePool,
13650 RollbackStarted,
13652 UnknownValue(phase::UnknownValue),
13657 }
13658
13659 #[doc(hidden)]
13660 pub mod phase {
13661 #[allow(unused_imports)]
13662 use super::*;
13663 #[derive(Clone, Debug, PartialEq)]
13664 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13665 }
13666
13667 impl Phase {
13668 pub fn value(&self) -> std::option::Option<i32> {
13673 match self {
13674 Self::Unspecified => std::option::Option::Some(0),
13675 Self::UpdateStarted => std::option::Option::Some(1),
13676 Self::CreatingGreenPool => std::option::Option::Some(2),
13677 Self::CordoningBluePool => std::option::Option::Some(3),
13678 Self::DrainingBluePool => std::option::Option::Some(4),
13679 Self::NodePoolSoaking => std::option::Option::Some(5),
13680 Self::DeletingBluePool => std::option::Option::Some(6),
13681 Self::RollbackStarted => std::option::Option::Some(7),
13682 Self::UnknownValue(u) => u.0.value(),
13683 }
13684 }
13685
13686 pub fn name(&self) -> std::option::Option<&str> {
13691 match self {
13692 Self::Unspecified => std::option::Option::Some("PHASE_UNSPECIFIED"),
13693 Self::UpdateStarted => std::option::Option::Some("UPDATE_STARTED"),
13694 Self::CreatingGreenPool => std::option::Option::Some("CREATING_GREEN_POOL"),
13695 Self::CordoningBluePool => std::option::Option::Some("CORDONING_BLUE_POOL"),
13696 Self::DrainingBluePool => std::option::Option::Some("DRAINING_BLUE_POOL"),
13697 Self::NodePoolSoaking => std::option::Option::Some("NODE_POOL_SOAKING"),
13698 Self::DeletingBluePool => std::option::Option::Some("DELETING_BLUE_POOL"),
13699 Self::RollbackStarted => std::option::Option::Some("ROLLBACK_STARTED"),
13700 Self::UnknownValue(u) => u.0.name(),
13701 }
13702 }
13703 }
13704
13705 impl std::default::Default for Phase {
13706 fn default() -> Self {
13707 use std::convert::From;
13708 Self::from(0)
13709 }
13710 }
13711
13712 impl std::fmt::Display for Phase {
13713 fn fmt(
13714 &self,
13715 f: &mut std::fmt::Formatter<'_>,
13716 ) -> std::result::Result<(), std::fmt::Error> {
13717 wkt::internal::display_enum(f, self.name(), self.value())
13718 }
13719 }
13720
13721 impl std::convert::From<i32> for Phase {
13722 fn from(value: i32) -> Self {
13723 match value {
13724 0 => Self::Unspecified,
13725 1 => Self::UpdateStarted,
13726 2 => Self::CreatingGreenPool,
13727 3 => Self::CordoningBluePool,
13728 4 => Self::DrainingBluePool,
13729 5 => Self::NodePoolSoaking,
13730 6 => Self::DeletingBluePool,
13731 7 => Self::RollbackStarted,
13732 _ => Self::UnknownValue(phase::UnknownValue(
13733 wkt::internal::UnknownEnumValue::Integer(value),
13734 )),
13735 }
13736 }
13737 }
13738
13739 impl std::convert::From<&str> for Phase {
13740 fn from(value: &str) -> Self {
13741 use std::string::ToString;
13742 match value {
13743 "PHASE_UNSPECIFIED" => Self::Unspecified,
13744 "UPDATE_STARTED" => Self::UpdateStarted,
13745 "CREATING_GREEN_POOL" => Self::CreatingGreenPool,
13746 "CORDONING_BLUE_POOL" => Self::CordoningBluePool,
13747 "DRAINING_BLUE_POOL" => Self::DrainingBluePool,
13748 "NODE_POOL_SOAKING" => Self::NodePoolSoaking,
13749 "DELETING_BLUE_POOL" => Self::DeletingBluePool,
13750 "ROLLBACK_STARTED" => Self::RollbackStarted,
13751 _ => Self::UnknownValue(phase::UnknownValue(
13752 wkt::internal::UnknownEnumValue::String(value.to_string()),
13753 )),
13754 }
13755 }
13756 }
13757
13758 impl serde::ser::Serialize for Phase {
13759 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13760 where
13761 S: serde::Serializer,
13762 {
13763 match self {
13764 Self::Unspecified => serializer.serialize_i32(0),
13765 Self::UpdateStarted => serializer.serialize_i32(1),
13766 Self::CreatingGreenPool => serializer.serialize_i32(2),
13767 Self::CordoningBluePool => serializer.serialize_i32(3),
13768 Self::DrainingBluePool => serializer.serialize_i32(4),
13769 Self::NodePoolSoaking => serializer.serialize_i32(5),
13770 Self::DeletingBluePool => serializer.serialize_i32(6),
13771 Self::RollbackStarted => serializer.serialize_i32(7),
13772 Self::UnknownValue(u) => u.0.serialize(serializer),
13773 }
13774 }
13775 }
13776
13777 impl<'de> serde::de::Deserialize<'de> for Phase {
13778 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13779 where
13780 D: serde::Deserializer<'de>,
13781 {
13782 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Phase>::new(
13783 ".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase",
13784 ))
13785 }
13786 }
13787 }
13788 }
13789
13790 #[serde_with::serde_as]
13792 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13793 #[serde(default, rename_all = "camelCase")]
13794 #[non_exhaustive]
13795 pub struct PlacementPolicy {
13796 #[serde(rename = "type")]
13798 pub r#type: crate::model::node_pool::placement_policy::Type,
13799
13800 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13803 pub tpu_topology: std::string::String,
13804
13805 #[serde(skip_serializing_if = "std::string::String::is_empty")]
13809 pub policy_name: std::string::String,
13810
13811 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13812 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13813 }
13814
13815 impl PlacementPolicy {
13816 pub fn new() -> Self {
13817 std::default::Default::default()
13818 }
13819
13820 pub fn set_type<T: std::convert::Into<crate::model::node_pool::placement_policy::Type>>(
13822 mut self,
13823 v: T,
13824 ) -> Self {
13825 self.r#type = v.into();
13826 self
13827 }
13828
13829 pub fn set_tpu_topology<T: std::convert::Into<std::string::String>>(
13831 mut self,
13832 v: T,
13833 ) -> Self {
13834 self.tpu_topology = v.into();
13835 self
13836 }
13837
13838 pub fn set_policy_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13840 self.policy_name = v.into();
13841 self
13842 }
13843 }
13844
13845 impl wkt::message::Message for PlacementPolicy {
13846 fn typename() -> &'static str {
13847 "type.googleapis.com/google.container.v1.NodePool.PlacementPolicy"
13848 }
13849 }
13850
13851 pub mod placement_policy {
13853 #[allow(unused_imports)]
13854 use super::*;
13855
13856 #[derive(Clone, Debug, PartialEq)]
13872 #[non_exhaustive]
13873 pub enum Type {
13874 Unspecified,
13877 Compact,
13880 UnknownValue(r#type::UnknownValue),
13885 }
13886
13887 #[doc(hidden)]
13888 pub mod r#type {
13889 #[allow(unused_imports)]
13890 use super::*;
13891 #[derive(Clone, Debug, PartialEq)]
13892 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13893 }
13894
13895 impl Type {
13896 pub fn value(&self) -> std::option::Option<i32> {
13901 match self {
13902 Self::Unspecified => std::option::Option::Some(0),
13903 Self::Compact => std::option::Option::Some(1),
13904 Self::UnknownValue(u) => u.0.value(),
13905 }
13906 }
13907
13908 pub fn name(&self) -> std::option::Option<&str> {
13913 match self {
13914 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
13915 Self::Compact => std::option::Option::Some("COMPACT"),
13916 Self::UnknownValue(u) => u.0.name(),
13917 }
13918 }
13919 }
13920
13921 impl std::default::Default for Type {
13922 fn default() -> Self {
13923 use std::convert::From;
13924 Self::from(0)
13925 }
13926 }
13927
13928 impl std::fmt::Display for Type {
13929 fn fmt(
13930 &self,
13931 f: &mut std::fmt::Formatter<'_>,
13932 ) -> std::result::Result<(), std::fmt::Error> {
13933 wkt::internal::display_enum(f, self.name(), self.value())
13934 }
13935 }
13936
13937 impl std::convert::From<i32> for Type {
13938 fn from(value: i32) -> Self {
13939 match value {
13940 0 => Self::Unspecified,
13941 1 => Self::Compact,
13942 _ => Self::UnknownValue(r#type::UnknownValue(
13943 wkt::internal::UnknownEnumValue::Integer(value),
13944 )),
13945 }
13946 }
13947 }
13948
13949 impl std::convert::From<&str> for Type {
13950 fn from(value: &str) -> Self {
13951 use std::string::ToString;
13952 match value {
13953 "TYPE_UNSPECIFIED" => Self::Unspecified,
13954 "COMPACT" => Self::Compact,
13955 _ => Self::UnknownValue(r#type::UnknownValue(
13956 wkt::internal::UnknownEnumValue::String(value.to_string()),
13957 )),
13958 }
13959 }
13960 }
13961
13962 impl serde::ser::Serialize for Type {
13963 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13964 where
13965 S: serde::Serializer,
13966 {
13967 match self {
13968 Self::Unspecified => serializer.serialize_i32(0),
13969 Self::Compact => serializer.serialize_i32(1),
13970 Self::UnknownValue(u) => u.0.serialize(serializer),
13971 }
13972 }
13973 }
13974
13975 impl<'de> serde::de::Deserialize<'de> for Type {
13976 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13977 where
13978 D: serde::Deserializer<'de>,
13979 {
13980 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
13981 ".google.container.v1.NodePool.PlacementPolicy.Type",
13982 ))
13983 }
13984 }
13985 }
13986
13987 #[serde_with::serde_as]
13989 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13990 #[serde(default, rename_all = "camelCase")]
13991 #[non_exhaustive]
13992 pub struct QueuedProvisioning {
13993 #[serde(skip_serializing_if = "wkt::internal::is_default")]
13997 pub enabled: bool,
13998
13999 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14000 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14001 }
14002
14003 impl QueuedProvisioning {
14004 pub fn new() -> Self {
14005 std::default::Default::default()
14006 }
14007
14008 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14010 self.enabled = v.into();
14011 self
14012 }
14013 }
14014
14015 impl wkt::message::Message for QueuedProvisioning {
14016 fn typename() -> &'static str {
14017 "type.googleapis.com/google.container.v1.NodePool.QueuedProvisioning"
14018 }
14019 }
14020
14021 #[derive(Clone, Debug, PartialEq)]
14037 #[non_exhaustive]
14038 pub enum Status {
14039 Unspecified,
14041 Provisioning,
14043 Running,
14046 RunningWithError,
14051 Reconciling,
14055 Stopping,
14057 Error,
14060 UnknownValue(status::UnknownValue),
14065 }
14066
14067 #[doc(hidden)]
14068 pub mod status {
14069 #[allow(unused_imports)]
14070 use super::*;
14071 #[derive(Clone, Debug, PartialEq)]
14072 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14073 }
14074
14075 impl Status {
14076 pub fn value(&self) -> std::option::Option<i32> {
14081 match self {
14082 Self::Unspecified => std::option::Option::Some(0),
14083 Self::Provisioning => std::option::Option::Some(1),
14084 Self::Running => std::option::Option::Some(2),
14085 Self::RunningWithError => std::option::Option::Some(3),
14086 Self::Reconciling => std::option::Option::Some(4),
14087 Self::Stopping => std::option::Option::Some(5),
14088 Self::Error => std::option::Option::Some(6),
14089 Self::UnknownValue(u) => u.0.value(),
14090 }
14091 }
14092
14093 pub fn name(&self) -> std::option::Option<&str> {
14098 match self {
14099 Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
14100 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
14101 Self::Running => std::option::Option::Some("RUNNING"),
14102 Self::RunningWithError => std::option::Option::Some("RUNNING_WITH_ERROR"),
14103 Self::Reconciling => std::option::Option::Some("RECONCILING"),
14104 Self::Stopping => std::option::Option::Some("STOPPING"),
14105 Self::Error => std::option::Option::Some("ERROR"),
14106 Self::UnknownValue(u) => u.0.name(),
14107 }
14108 }
14109 }
14110
14111 impl std::default::Default for Status {
14112 fn default() -> Self {
14113 use std::convert::From;
14114 Self::from(0)
14115 }
14116 }
14117
14118 impl std::fmt::Display for Status {
14119 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14120 wkt::internal::display_enum(f, self.name(), self.value())
14121 }
14122 }
14123
14124 impl std::convert::From<i32> for Status {
14125 fn from(value: i32) -> Self {
14126 match value {
14127 0 => Self::Unspecified,
14128 1 => Self::Provisioning,
14129 2 => Self::Running,
14130 3 => Self::RunningWithError,
14131 4 => Self::Reconciling,
14132 5 => Self::Stopping,
14133 6 => Self::Error,
14134 _ => Self::UnknownValue(status::UnknownValue(
14135 wkt::internal::UnknownEnumValue::Integer(value),
14136 )),
14137 }
14138 }
14139 }
14140
14141 impl std::convert::From<&str> for Status {
14142 fn from(value: &str) -> Self {
14143 use std::string::ToString;
14144 match value {
14145 "STATUS_UNSPECIFIED" => Self::Unspecified,
14146 "PROVISIONING" => Self::Provisioning,
14147 "RUNNING" => Self::Running,
14148 "RUNNING_WITH_ERROR" => Self::RunningWithError,
14149 "RECONCILING" => Self::Reconciling,
14150 "STOPPING" => Self::Stopping,
14151 "ERROR" => Self::Error,
14152 _ => Self::UnknownValue(status::UnknownValue(
14153 wkt::internal::UnknownEnumValue::String(value.to_string()),
14154 )),
14155 }
14156 }
14157 }
14158
14159 impl serde::ser::Serialize for Status {
14160 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14161 where
14162 S: serde::Serializer,
14163 {
14164 match self {
14165 Self::Unspecified => serializer.serialize_i32(0),
14166 Self::Provisioning => serializer.serialize_i32(1),
14167 Self::Running => serializer.serialize_i32(2),
14168 Self::RunningWithError => serializer.serialize_i32(3),
14169 Self::Reconciling => serializer.serialize_i32(4),
14170 Self::Stopping => serializer.serialize_i32(5),
14171 Self::Error => serializer.serialize_i32(6),
14172 Self::UnknownValue(u) => u.0.serialize(serializer),
14173 }
14174 }
14175 }
14176
14177 impl<'de> serde::de::Deserialize<'de> for Status {
14178 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14179 where
14180 D: serde::Deserializer<'de>,
14181 {
14182 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
14183 ".google.container.v1.NodePool.Status",
14184 ))
14185 }
14186 }
14187}
14188
14189#[serde_with::serde_as]
14192#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14193#[serde(default, rename_all = "camelCase")]
14194#[non_exhaustive]
14195pub struct NodeManagement {
14196 #[serde(skip_serializing_if = "wkt::internal::is_default")]
14200 pub auto_upgrade: bool,
14201
14202 #[serde(skip_serializing_if = "wkt::internal::is_default")]
14207 pub auto_repair: bool,
14208
14209 #[serde(skip_serializing_if = "std::option::Option::is_none")]
14211 pub upgrade_options: std::option::Option<crate::model::AutoUpgradeOptions>,
14212
14213 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14214 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14215}
14216
14217impl NodeManagement {
14218 pub fn new() -> Self {
14219 std::default::Default::default()
14220 }
14221
14222 pub fn set_auto_upgrade<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14224 self.auto_upgrade = v.into();
14225 self
14226 }
14227
14228 pub fn set_auto_repair<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14230 self.auto_repair = v.into();
14231 self
14232 }
14233
14234 pub fn set_upgrade_options<
14236 T: std::convert::Into<std::option::Option<crate::model::AutoUpgradeOptions>>,
14237 >(
14238 mut self,
14239 v: T,
14240 ) -> Self {
14241 self.upgrade_options = v.into();
14242 self
14243 }
14244}
14245
14246impl wkt::message::Message for NodeManagement {
14247 fn typename() -> &'static str {
14248 "type.googleapis.com/google.container.v1.NodeManagement"
14249 }
14250}
14251
14252#[serde_with::serde_as]
14254#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14255#[serde(default, rename_all = "camelCase")]
14256#[non_exhaustive]
14257pub struct BestEffortProvisioning {
14258 #[serde(skip_serializing_if = "wkt::internal::is_default")]
14262 pub enabled: bool,
14263
14264 #[serde(skip_serializing_if = "wkt::internal::is_default")]
14268 pub min_provision_nodes: i32,
14269
14270 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14271 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14272}
14273
14274impl BestEffortProvisioning {
14275 pub fn new() -> Self {
14276 std::default::Default::default()
14277 }
14278
14279 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14281 self.enabled = v.into();
14282 self
14283 }
14284
14285 pub fn set_min_provision_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14287 self.min_provision_nodes = v.into();
14288 self
14289 }
14290}
14291
14292impl wkt::message::Message for BestEffortProvisioning {
14293 fn typename() -> &'static str {
14294 "type.googleapis.com/google.container.v1.BestEffortProvisioning"
14295 }
14296}
14297
14298#[serde_with::serde_as]
14301#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14302#[serde(default, rename_all = "camelCase")]
14303#[non_exhaustive]
14304pub struct AutoUpgradeOptions {
14305 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14309 pub auto_upgrade_start_time: std::string::String,
14310
14311 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14314 pub description: std::string::String,
14315
14316 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14317 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14318}
14319
14320impl AutoUpgradeOptions {
14321 pub fn new() -> Self {
14322 std::default::Default::default()
14323 }
14324
14325 pub fn set_auto_upgrade_start_time<T: std::convert::Into<std::string::String>>(
14327 mut self,
14328 v: T,
14329 ) -> Self {
14330 self.auto_upgrade_start_time = v.into();
14331 self
14332 }
14333
14334 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14336 self.description = v.into();
14337 self
14338 }
14339}
14340
14341impl wkt::message::Message for AutoUpgradeOptions {
14342 fn typename() -> &'static str {
14343 "type.googleapis.com/google.container.v1.AutoUpgradeOptions"
14344 }
14345}
14346
14347#[serde_with::serde_as]
14349#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14350#[serde(default, rename_all = "camelCase")]
14351#[non_exhaustive]
14352pub struct MaintenancePolicy {
14353 #[serde(skip_serializing_if = "std::option::Option::is_none")]
14355 pub window: std::option::Option<crate::model::MaintenanceWindow>,
14356
14357 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14363 pub resource_version: std::string::String,
14364
14365 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14366 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14367}
14368
14369impl MaintenancePolicy {
14370 pub fn new() -> Self {
14371 std::default::Default::default()
14372 }
14373
14374 pub fn set_window<
14376 T: std::convert::Into<std::option::Option<crate::model::MaintenanceWindow>>,
14377 >(
14378 mut self,
14379 v: T,
14380 ) -> Self {
14381 self.window = v.into();
14382 self
14383 }
14384
14385 pub fn set_resource_version<T: std::convert::Into<std::string::String>>(
14387 mut self,
14388 v: T,
14389 ) -> Self {
14390 self.resource_version = v.into();
14391 self
14392 }
14393}
14394
14395impl wkt::message::Message for MaintenancePolicy {
14396 fn typename() -> &'static str {
14397 "type.googleapis.com/google.container.v1.MaintenancePolicy"
14398 }
14399}
14400
14401#[serde_with::serde_as]
14403#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14404#[serde(default, rename_all = "camelCase")]
14405#[non_exhaustive]
14406pub struct MaintenanceWindow {
14407 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
14410 pub maintenance_exclusions:
14411 std::collections::HashMap<std::string::String, crate::model::TimeWindow>,
14412
14413 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
14414 pub policy: std::option::Option<crate::model::maintenance_window::Policy>,
14415
14416 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14417 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14418}
14419
14420impl MaintenanceWindow {
14421 pub fn new() -> Self {
14422 std::default::Default::default()
14423 }
14424
14425 pub fn set_maintenance_exclusions<T, K, V>(mut self, v: T) -> Self
14427 where
14428 T: std::iter::IntoIterator<Item = (K, V)>,
14429 K: std::convert::Into<std::string::String>,
14430 V: std::convert::Into<crate::model::TimeWindow>,
14431 {
14432 use std::iter::Iterator;
14433 self.maintenance_exclusions = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14434 self
14435 }
14436
14437 pub fn set_policy<
14442 T: std::convert::Into<std::option::Option<crate::model::maintenance_window::Policy>>,
14443 >(
14444 mut self,
14445 v: T,
14446 ) -> Self {
14447 self.policy = v.into();
14448 self
14449 }
14450
14451 pub fn daily_maintenance_window(
14455 &self,
14456 ) -> std::option::Option<&std::boxed::Box<crate::model::DailyMaintenanceWindow>> {
14457 #[allow(unreachable_patterns)]
14458 self.policy.as_ref().and_then(|v| match v {
14459 crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v) => {
14460 std::option::Option::Some(v)
14461 }
14462 _ => std::option::Option::None,
14463 })
14464 }
14465
14466 pub fn set_daily_maintenance_window<
14472 T: std::convert::Into<std::boxed::Box<crate::model::DailyMaintenanceWindow>>,
14473 >(
14474 mut self,
14475 v: T,
14476 ) -> Self {
14477 self.policy = std::option::Option::Some(
14478 crate::model::maintenance_window::Policy::DailyMaintenanceWindow(v.into()),
14479 );
14480 self
14481 }
14482
14483 pub fn recurring_window(
14487 &self,
14488 ) -> std::option::Option<&std::boxed::Box<crate::model::RecurringTimeWindow>> {
14489 #[allow(unreachable_patterns)]
14490 self.policy.as_ref().and_then(|v| match v {
14491 crate::model::maintenance_window::Policy::RecurringWindow(v) => {
14492 std::option::Option::Some(v)
14493 }
14494 _ => std::option::Option::None,
14495 })
14496 }
14497
14498 pub fn set_recurring_window<
14504 T: std::convert::Into<std::boxed::Box<crate::model::RecurringTimeWindow>>,
14505 >(
14506 mut self,
14507 v: T,
14508 ) -> Self {
14509 self.policy = std::option::Option::Some(
14510 crate::model::maintenance_window::Policy::RecurringWindow(v.into()),
14511 );
14512 self
14513 }
14514}
14515
14516impl wkt::message::Message for MaintenanceWindow {
14517 fn typename() -> &'static str {
14518 "type.googleapis.com/google.container.v1.MaintenanceWindow"
14519 }
14520}
14521
14522pub mod maintenance_window {
14524 #[allow(unused_imports)]
14525 use super::*;
14526
14527 #[serde_with::serde_as]
14528 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
14529 #[serde(rename_all = "camelCase")]
14530 #[non_exhaustive]
14531 pub enum Policy {
14532 DailyMaintenanceWindow(std::boxed::Box<crate::model::DailyMaintenanceWindow>),
14534 RecurringWindow(std::boxed::Box<crate::model::RecurringTimeWindow>),
14538 }
14539}
14540
14541#[serde_with::serde_as]
14543#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14544#[serde(default, rename_all = "camelCase")]
14545#[non_exhaustive]
14546pub struct TimeWindow {
14547 #[serde(skip_serializing_if = "std::option::Option::is_none")]
14549 pub start_time: std::option::Option<wkt::Timestamp>,
14550
14551 #[serde(skip_serializing_if = "std::option::Option::is_none")]
14554 pub end_time: std::option::Option<wkt::Timestamp>,
14555
14556 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
14557 pub options: std::option::Option<crate::model::time_window::Options>,
14558
14559 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14560 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14561}
14562
14563impl TimeWindow {
14564 pub fn new() -> Self {
14565 std::default::Default::default()
14566 }
14567
14568 pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
14570 mut self,
14571 v: T,
14572 ) -> Self {
14573 self.start_time = v.into();
14574 self
14575 }
14576
14577 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
14579 mut self,
14580 v: T,
14581 ) -> Self {
14582 self.end_time = v.into();
14583 self
14584 }
14585
14586 pub fn set_options<
14591 T: std::convert::Into<std::option::Option<crate::model::time_window::Options>>,
14592 >(
14593 mut self,
14594 v: T,
14595 ) -> Self {
14596 self.options = v.into();
14597 self
14598 }
14599
14600 pub fn maintenance_exclusion_options(
14604 &self,
14605 ) -> std::option::Option<&std::boxed::Box<crate::model::MaintenanceExclusionOptions>> {
14606 #[allow(unreachable_patterns)]
14607 self.options.as_ref().and_then(|v| match v {
14608 crate::model::time_window::Options::MaintenanceExclusionOptions(v) => {
14609 std::option::Option::Some(v)
14610 }
14611 _ => std::option::Option::None,
14612 })
14613 }
14614
14615 pub fn set_maintenance_exclusion_options<
14621 T: std::convert::Into<std::boxed::Box<crate::model::MaintenanceExclusionOptions>>,
14622 >(
14623 mut self,
14624 v: T,
14625 ) -> Self {
14626 self.options = std::option::Option::Some(
14627 crate::model::time_window::Options::MaintenanceExclusionOptions(v.into()),
14628 );
14629 self
14630 }
14631}
14632
14633impl wkt::message::Message for TimeWindow {
14634 fn typename() -> &'static str {
14635 "type.googleapis.com/google.container.v1.TimeWindow"
14636 }
14637}
14638
14639pub mod time_window {
14641 #[allow(unused_imports)]
14642 use super::*;
14643
14644 #[serde_with::serde_as]
14645 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
14646 #[serde(rename_all = "camelCase")]
14647 #[non_exhaustive]
14648 pub enum Options {
14649 MaintenanceExclusionOptions(std::boxed::Box<crate::model::MaintenanceExclusionOptions>),
14652 }
14653}
14654
14655#[serde_with::serde_as]
14657#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14658#[serde(default, rename_all = "camelCase")]
14659#[non_exhaustive]
14660pub struct MaintenanceExclusionOptions {
14661 pub scope: crate::model::maintenance_exclusion_options::Scope,
14664
14665 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14666 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14667}
14668
14669impl MaintenanceExclusionOptions {
14670 pub fn new() -> Self {
14671 std::default::Default::default()
14672 }
14673
14674 pub fn set_scope<T: std::convert::Into<crate::model::maintenance_exclusion_options::Scope>>(
14676 mut self,
14677 v: T,
14678 ) -> Self {
14679 self.scope = v.into();
14680 self
14681 }
14682}
14683
14684impl wkt::message::Message for MaintenanceExclusionOptions {
14685 fn typename() -> &'static str {
14686 "type.googleapis.com/google.container.v1.MaintenanceExclusionOptions"
14687 }
14688}
14689
14690pub mod maintenance_exclusion_options {
14692 #[allow(unused_imports)]
14693 use super::*;
14694
14695 #[derive(Clone, Debug, PartialEq)]
14711 #[non_exhaustive]
14712 pub enum Scope {
14713 NoUpgrades,
14717 NoMinorUpgrades,
14720 NoMinorOrNodeUpgrades,
14724 UnknownValue(scope::UnknownValue),
14729 }
14730
14731 #[doc(hidden)]
14732 pub mod scope {
14733 #[allow(unused_imports)]
14734 use super::*;
14735 #[derive(Clone, Debug, PartialEq)]
14736 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14737 }
14738
14739 impl Scope {
14740 pub fn value(&self) -> std::option::Option<i32> {
14745 match self {
14746 Self::NoUpgrades => std::option::Option::Some(0),
14747 Self::NoMinorUpgrades => std::option::Option::Some(1),
14748 Self::NoMinorOrNodeUpgrades => std::option::Option::Some(2),
14749 Self::UnknownValue(u) => u.0.value(),
14750 }
14751 }
14752
14753 pub fn name(&self) -> std::option::Option<&str> {
14758 match self {
14759 Self::NoUpgrades => std::option::Option::Some("NO_UPGRADES"),
14760 Self::NoMinorUpgrades => std::option::Option::Some("NO_MINOR_UPGRADES"),
14761 Self::NoMinorOrNodeUpgrades => {
14762 std::option::Option::Some("NO_MINOR_OR_NODE_UPGRADES")
14763 }
14764 Self::UnknownValue(u) => u.0.name(),
14765 }
14766 }
14767 }
14768
14769 impl std::default::Default for Scope {
14770 fn default() -> Self {
14771 use std::convert::From;
14772 Self::from(0)
14773 }
14774 }
14775
14776 impl std::fmt::Display for Scope {
14777 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14778 wkt::internal::display_enum(f, self.name(), self.value())
14779 }
14780 }
14781
14782 impl std::convert::From<i32> for Scope {
14783 fn from(value: i32) -> Self {
14784 match value {
14785 0 => Self::NoUpgrades,
14786 1 => Self::NoMinorUpgrades,
14787 2 => Self::NoMinorOrNodeUpgrades,
14788 _ => Self::UnknownValue(scope::UnknownValue(
14789 wkt::internal::UnknownEnumValue::Integer(value),
14790 )),
14791 }
14792 }
14793 }
14794
14795 impl std::convert::From<&str> for Scope {
14796 fn from(value: &str) -> Self {
14797 use std::string::ToString;
14798 match value {
14799 "NO_UPGRADES" => Self::NoUpgrades,
14800 "NO_MINOR_UPGRADES" => Self::NoMinorUpgrades,
14801 "NO_MINOR_OR_NODE_UPGRADES" => Self::NoMinorOrNodeUpgrades,
14802 _ => Self::UnknownValue(scope::UnknownValue(
14803 wkt::internal::UnknownEnumValue::String(value.to_string()),
14804 )),
14805 }
14806 }
14807 }
14808
14809 impl serde::ser::Serialize for Scope {
14810 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14811 where
14812 S: serde::Serializer,
14813 {
14814 match self {
14815 Self::NoUpgrades => serializer.serialize_i32(0),
14816 Self::NoMinorUpgrades => serializer.serialize_i32(1),
14817 Self::NoMinorOrNodeUpgrades => serializer.serialize_i32(2),
14818 Self::UnknownValue(u) => u.0.serialize(serializer),
14819 }
14820 }
14821 }
14822
14823 impl<'de> serde::de::Deserialize<'de> for Scope {
14824 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14825 where
14826 D: serde::Deserializer<'de>,
14827 {
14828 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
14829 ".google.container.v1.MaintenanceExclusionOptions.Scope",
14830 ))
14831 }
14832 }
14833}
14834
14835#[serde_with::serde_as]
14837#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14838#[serde(default, rename_all = "camelCase")]
14839#[non_exhaustive]
14840pub struct RecurringTimeWindow {
14841 #[serde(skip_serializing_if = "std::option::Option::is_none")]
14843 pub window: std::option::Option<crate::model::TimeWindow>,
14844
14845 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14880 pub recurrence: std::string::String,
14881
14882 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14883 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14884}
14885
14886impl RecurringTimeWindow {
14887 pub fn new() -> Self {
14888 std::default::Default::default()
14889 }
14890
14891 pub fn set_window<T: std::convert::Into<std::option::Option<crate::model::TimeWindow>>>(
14893 mut self,
14894 v: T,
14895 ) -> Self {
14896 self.window = v.into();
14897 self
14898 }
14899
14900 pub fn set_recurrence<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14902 self.recurrence = v.into();
14903 self
14904 }
14905}
14906
14907impl wkt::message::Message for RecurringTimeWindow {
14908 fn typename() -> &'static str {
14909 "type.googleapis.com/google.container.v1.RecurringTimeWindow"
14910 }
14911}
14912
14913#[serde_with::serde_as]
14915#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14916#[serde(default, rename_all = "camelCase")]
14917#[non_exhaustive]
14918pub struct DailyMaintenanceWindow {
14919 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14923 pub start_time: std::string::String,
14924
14925 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14930 pub duration: std::string::String,
14931
14932 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14933 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14934}
14935
14936impl DailyMaintenanceWindow {
14937 pub fn new() -> Self {
14938 std::default::Default::default()
14939 }
14940
14941 pub fn set_start_time<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14943 self.start_time = v.into();
14944 self
14945 }
14946
14947 pub fn set_duration<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14949 self.duration = v.into();
14950 self
14951 }
14952}
14953
14954impl wkt::message::Message for DailyMaintenanceWindow {
14955 fn typename() -> &'static str {
14956 "type.googleapis.com/google.container.v1.DailyMaintenanceWindow"
14957 }
14958}
14959
14960#[serde_with::serde_as]
14963#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14964#[serde(default, rename_all = "camelCase")]
14965#[non_exhaustive]
14966pub struct SetNodePoolManagementRequest {
14967 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14971 #[deprecated]
14972 pub project_id: std::string::String,
14973
14974 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14979 #[deprecated]
14980 pub zone: std::string::String,
14981
14982 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14985 #[deprecated]
14986 pub cluster_id: std::string::String,
14987
14988 #[serde(skip_serializing_if = "std::string::String::is_empty")]
14991 #[deprecated]
14992 pub node_pool_id: std::string::String,
14993
14994 #[serde(skip_serializing_if = "std::option::Option::is_none")]
14996 pub management: std::option::Option<crate::model::NodeManagement>,
14997
14998 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15002 pub name: std::string::String,
15003
15004 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15005 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15006}
15007
15008impl SetNodePoolManagementRequest {
15009 pub fn new() -> Self {
15010 std::default::Default::default()
15011 }
15012
15013 #[deprecated]
15015 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15016 self.project_id = v.into();
15017 self
15018 }
15019
15020 #[deprecated]
15022 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15023 self.zone = v.into();
15024 self
15025 }
15026
15027 #[deprecated]
15029 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15030 self.cluster_id = v.into();
15031 self
15032 }
15033
15034 #[deprecated]
15036 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15037 self.node_pool_id = v.into();
15038 self
15039 }
15040
15041 pub fn set_management<
15043 T: std::convert::Into<std::option::Option<crate::model::NodeManagement>>,
15044 >(
15045 mut self,
15046 v: T,
15047 ) -> Self {
15048 self.management = v.into();
15049 self
15050 }
15051
15052 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15054 self.name = v.into();
15055 self
15056 }
15057}
15058
15059impl wkt::message::Message for SetNodePoolManagementRequest {
15060 fn typename() -> &'static str {
15061 "type.googleapis.com/google.container.v1.SetNodePoolManagementRequest"
15062 }
15063}
15064
15065#[serde_with::serde_as]
15067#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15068#[serde(default, rename_all = "camelCase")]
15069#[non_exhaustive]
15070pub struct SetNodePoolSizeRequest {
15071 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15075 #[deprecated]
15076 pub project_id: std::string::String,
15077
15078 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15083 #[deprecated]
15084 pub zone: std::string::String,
15085
15086 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15089 #[deprecated]
15090 pub cluster_id: std::string::String,
15091
15092 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15095 #[deprecated]
15096 pub node_pool_id: std::string::String,
15097
15098 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15100 pub node_count: i32,
15101
15102 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15106 pub name: std::string::String,
15107
15108 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15109 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15110}
15111
15112impl SetNodePoolSizeRequest {
15113 pub fn new() -> Self {
15114 std::default::Default::default()
15115 }
15116
15117 #[deprecated]
15119 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15120 self.project_id = v.into();
15121 self
15122 }
15123
15124 #[deprecated]
15126 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15127 self.zone = v.into();
15128 self
15129 }
15130
15131 #[deprecated]
15133 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15134 self.cluster_id = v.into();
15135 self
15136 }
15137
15138 #[deprecated]
15140 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15141 self.node_pool_id = v.into();
15142 self
15143 }
15144
15145 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15147 self.node_count = v.into();
15148 self
15149 }
15150
15151 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15153 self.name = v.into();
15154 self
15155 }
15156}
15157
15158impl wkt::message::Message for SetNodePoolSizeRequest {
15159 fn typename() -> &'static str {
15160 "type.googleapis.com/google.container.v1.SetNodePoolSizeRequest"
15161 }
15162}
15163
15164#[serde_with::serde_as]
15167#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15168#[serde(default, rename_all = "camelCase")]
15169#[non_exhaustive]
15170pub struct CompleteNodePoolUpgradeRequest {
15171 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15175 pub name: std::string::String,
15176
15177 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15178 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15179}
15180
15181impl CompleteNodePoolUpgradeRequest {
15182 pub fn new() -> Self {
15183 std::default::Default::default()
15184 }
15185
15186 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15188 self.name = v.into();
15189 self
15190 }
15191}
15192
15193impl wkt::message::Message for CompleteNodePoolUpgradeRequest {
15194 fn typename() -> &'static str {
15195 "type.googleapis.com/google.container.v1.CompleteNodePoolUpgradeRequest"
15196 }
15197}
15198
15199#[serde_with::serde_as]
15203#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15204#[serde(default, rename_all = "camelCase")]
15205#[non_exhaustive]
15206pub struct RollbackNodePoolUpgradeRequest {
15207 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15211 #[deprecated]
15212 pub project_id: std::string::String,
15213
15214 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15219 #[deprecated]
15220 pub zone: std::string::String,
15221
15222 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15225 #[deprecated]
15226 pub cluster_id: std::string::String,
15227
15228 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15231 #[deprecated]
15232 pub node_pool_id: std::string::String,
15233
15234 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15238 pub name: std::string::String,
15239
15240 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15243 pub respect_pdb: bool,
15244
15245 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15246 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15247}
15248
15249impl RollbackNodePoolUpgradeRequest {
15250 pub fn new() -> Self {
15251 std::default::Default::default()
15252 }
15253
15254 #[deprecated]
15256 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15257 self.project_id = v.into();
15258 self
15259 }
15260
15261 #[deprecated]
15263 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15264 self.zone = v.into();
15265 self
15266 }
15267
15268 #[deprecated]
15270 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15271 self.cluster_id = v.into();
15272 self
15273 }
15274
15275 #[deprecated]
15277 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15278 self.node_pool_id = v.into();
15279 self
15280 }
15281
15282 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15284 self.name = v.into();
15285 self
15286 }
15287
15288 pub fn set_respect_pdb<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15290 self.respect_pdb = v.into();
15291 self
15292 }
15293}
15294
15295impl wkt::message::Message for RollbackNodePoolUpgradeRequest {
15296 fn typename() -> &'static str {
15297 "type.googleapis.com/google.container.v1.RollbackNodePoolUpgradeRequest"
15298 }
15299}
15300
15301#[serde_with::serde_as]
15303#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15304#[serde(default, rename_all = "camelCase")]
15305#[non_exhaustive]
15306pub struct ListNodePoolsResponse {
15307 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
15309 pub node_pools: std::vec::Vec<crate::model::NodePool>,
15310
15311 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15312 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15313}
15314
15315impl ListNodePoolsResponse {
15316 pub fn new() -> Self {
15317 std::default::Default::default()
15318 }
15319
15320 pub fn set_node_pools<T, V>(mut self, v: T) -> Self
15322 where
15323 T: std::iter::IntoIterator<Item = V>,
15324 V: std::convert::Into<crate::model::NodePool>,
15325 {
15326 use std::iter::Iterator;
15327 self.node_pools = v.into_iter().map(|i| i.into()).collect();
15328 self
15329 }
15330}
15331
15332impl wkt::message::Message for ListNodePoolsResponse {
15333 fn typename() -> &'static str {
15334 "type.googleapis.com/google.container.v1.ListNodePoolsResponse"
15335 }
15336}
15337
15338#[serde_with::serde_as]
15343#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15344#[serde(default, rename_all = "camelCase")]
15345#[non_exhaustive]
15346pub struct ClusterAutoscaling {
15347 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15349 pub enable_node_autoprovisioning: bool,
15350
15351 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
15354 pub resource_limits: std::vec::Vec<crate::model::ResourceLimit>,
15355
15356 pub autoscaling_profile: crate::model::cluster_autoscaling::AutoscalingProfile,
15358
15359 #[serde(skip_serializing_if = "std::option::Option::is_none")]
15362 pub autoprovisioning_node_pool_defaults:
15363 std::option::Option<crate::model::AutoprovisioningNodePoolDefaults>,
15364
15365 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
15369 pub autoprovisioning_locations: std::vec::Vec<std::string::String>,
15370
15371 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15372 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15373}
15374
15375impl ClusterAutoscaling {
15376 pub fn new() -> Self {
15377 std::default::Default::default()
15378 }
15379
15380 pub fn set_enable_node_autoprovisioning<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15382 self.enable_node_autoprovisioning = v.into();
15383 self
15384 }
15385
15386 pub fn set_resource_limits<T, V>(mut self, v: T) -> Self
15388 where
15389 T: std::iter::IntoIterator<Item = V>,
15390 V: std::convert::Into<crate::model::ResourceLimit>,
15391 {
15392 use std::iter::Iterator;
15393 self.resource_limits = v.into_iter().map(|i| i.into()).collect();
15394 self
15395 }
15396
15397 pub fn set_autoscaling_profile<
15399 T: std::convert::Into<crate::model::cluster_autoscaling::AutoscalingProfile>,
15400 >(
15401 mut self,
15402 v: T,
15403 ) -> Self {
15404 self.autoscaling_profile = v.into();
15405 self
15406 }
15407
15408 pub fn set_autoprovisioning_node_pool_defaults<
15410 T: std::convert::Into<std::option::Option<crate::model::AutoprovisioningNodePoolDefaults>>,
15411 >(
15412 mut self,
15413 v: T,
15414 ) -> Self {
15415 self.autoprovisioning_node_pool_defaults = v.into();
15416 self
15417 }
15418
15419 pub fn set_autoprovisioning_locations<T, V>(mut self, v: T) -> Self
15421 where
15422 T: std::iter::IntoIterator<Item = V>,
15423 V: std::convert::Into<std::string::String>,
15424 {
15425 use std::iter::Iterator;
15426 self.autoprovisioning_locations = v.into_iter().map(|i| i.into()).collect();
15427 self
15428 }
15429}
15430
15431impl wkt::message::Message for ClusterAutoscaling {
15432 fn typename() -> &'static str {
15433 "type.googleapis.com/google.container.v1.ClusterAutoscaling"
15434 }
15435}
15436
15437pub mod cluster_autoscaling {
15439 #[allow(unused_imports)]
15440 use super::*;
15441
15442 #[derive(Clone, Debug, PartialEq)]
15458 #[non_exhaustive]
15459 pub enum AutoscalingProfile {
15460 ProfileUnspecified,
15462 OptimizeUtilization,
15464 Balanced,
15466 UnknownValue(autoscaling_profile::UnknownValue),
15471 }
15472
15473 #[doc(hidden)]
15474 pub mod autoscaling_profile {
15475 #[allow(unused_imports)]
15476 use super::*;
15477 #[derive(Clone, Debug, PartialEq)]
15478 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15479 }
15480
15481 impl AutoscalingProfile {
15482 pub fn value(&self) -> std::option::Option<i32> {
15487 match self {
15488 Self::ProfileUnspecified => std::option::Option::Some(0),
15489 Self::OptimizeUtilization => std::option::Option::Some(1),
15490 Self::Balanced => std::option::Option::Some(2),
15491 Self::UnknownValue(u) => u.0.value(),
15492 }
15493 }
15494
15495 pub fn name(&self) -> std::option::Option<&str> {
15500 match self {
15501 Self::ProfileUnspecified => std::option::Option::Some("PROFILE_UNSPECIFIED"),
15502 Self::OptimizeUtilization => std::option::Option::Some("OPTIMIZE_UTILIZATION"),
15503 Self::Balanced => std::option::Option::Some("BALANCED"),
15504 Self::UnknownValue(u) => u.0.name(),
15505 }
15506 }
15507 }
15508
15509 impl std::default::Default for AutoscalingProfile {
15510 fn default() -> Self {
15511 use std::convert::From;
15512 Self::from(0)
15513 }
15514 }
15515
15516 impl std::fmt::Display for AutoscalingProfile {
15517 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15518 wkt::internal::display_enum(f, self.name(), self.value())
15519 }
15520 }
15521
15522 impl std::convert::From<i32> for AutoscalingProfile {
15523 fn from(value: i32) -> Self {
15524 match value {
15525 0 => Self::ProfileUnspecified,
15526 1 => Self::OptimizeUtilization,
15527 2 => Self::Balanced,
15528 _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
15529 wkt::internal::UnknownEnumValue::Integer(value),
15530 )),
15531 }
15532 }
15533 }
15534
15535 impl std::convert::From<&str> for AutoscalingProfile {
15536 fn from(value: &str) -> Self {
15537 use std::string::ToString;
15538 match value {
15539 "PROFILE_UNSPECIFIED" => Self::ProfileUnspecified,
15540 "OPTIMIZE_UTILIZATION" => Self::OptimizeUtilization,
15541 "BALANCED" => Self::Balanced,
15542 _ => Self::UnknownValue(autoscaling_profile::UnknownValue(
15543 wkt::internal::UnknownEnumValue::String(value.to_string()),
15544 )),
15545 }
15546 }
15547 }
15548
15549 impl serde::ser::Serialize for AutoscalingProfile {
15550 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15551 where
15552 S: serde::Serializer,
15553 {
15554 match self {
15555 Self::ProfileUnspecified => serializer.serialize_i32(0),
15556 Self::OptimizeUtilization => serializer.serialize_i32(1),
15557 Self::Balanced => serializer.serialize_i32(2),
15558 Self::UnknownValue(u) => u.0.serialize(serializer),
15559 }
15560 }
15561 }
15562
15563 impl<'de> serde::de::Deserialize<'de> for AutoscalingProfile {
15564 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15565 where
15566 D: serde::Deserializer<'de>,
15567 {
15568 deserializer.deserialize_any(wkt::internal::EnumVisitor::<AutoscalingProfile>::new(
15569 ".google.container.v1.ClusterAutoscaling.AutoscalingProfile",
15570 ))
15571 }
15572 }
15573}
15574
15575#[serde_with::serde_as]
15578#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15579#[serde(default, rename_all = "camelCase")]
15580#[non_exhaustive]
15581pub struct AutoprovisioningNodePoolDefaults {
15582 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
15584 pub oauth_scopes: std::vec::Vec<std::string::String>,
15585
15586 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15588 pub service_account: std::string::String,
15589
15590 #[serde(skip_serializing_if = "std::option::Option::is_none")]
15592 pub upgrade_settings: std::option::Option<crate::model::node_pool::UpgradeSettings>,
15593
15594 #[serde(skip_serializing_if = "std::option::Option::is_none")]
15596 pub management: std::option::Option<crate::model::NodeManagement>,
15597
15598 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15610 #[deprecated]
15611 pub min_cpu_platform: std::string::String,
15612
15613 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15618 pub disk_size_gb: i32,
15619
15620 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15625 pub disk_type: std::string::String,
15626
15627 #[serde(skip_serializing_if = "std::option::Option::is_none")]
15629 pub shielded_instance_config: std::option::Option<crate::model::ShieldedInstanceConfig>,
15630
15631 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15638 pub boot_disk_kms_key: std::string::String,
15639
15640 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15644 pub image_type: std::string::String,
15645
15646 #[serde(skip_serializing_if = "std::option::Option::is_none")]
15648 pub insecure_kubelet_readonly_port_enabled: std::option::Option<bool>,
15649
15650 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15651 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15652}
15653
15654impl AutoprovisioningNodePoolDefaults {
15655 pub fn new() -> Self {
15656 std::default::Default::default()
15657 }
15658
15659 pub fn set_oauth_scopes<T, V>(mut self, v: T) -> Self
15661 where
15662 T: std::iter::IntoIterator<Item = V>,
15663 V: std::convert::Into<std::string::String>,
15664 {
15665 use std::iter::Iterator;
15666 self.oauth_scopes = v.into_iter().map(|i| i.into()).collect();
15667 self
15668 }
15669
15670 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15672 self.service_account = v.into();
15673 self
15674 }
15675
15676 pub fn set_upgrade_settings<
15678 T: std::convert::Into<std::option::Option<crate::model::node_pool::UpgradeSettings>>,
15679 >(
15680 mut self,
15681 v: T,
15682 ) -> Self {
15683 self.upgrade_settings = v.into();
15684 self
15685 }
15686
15687 pub fn set_management<
15689 T: std::convert::Into<std::option::Option<crate::model::NodeManagement>>,
15690 >(
15691 mut self,
15692 v: T,
15693 ) -> Self {
15694 self.management = v.into();
15695 self
15696 }
15697
15698 #[deprecated]
15700 pub fn set_min_cpu_platform<T: std::convert::Into<std::string::String>>(
15701 mut self,
15702 v: T,
15703 ) -> Self {
15704 self.min_cpu_platform = v.into();
15705 self
15706 }
15707
15708 pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15710 self.disk_size_gb = v.into();
15711 self
15712 }
15713
15714 pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15716 self.disk_type = v.into();
15717 self
15718 }
15719
15720 pub fn set_shielded_instance_config<
15722 T: std::convert::Into<std::option::Option<crate::model::ShieldedInstanceConfig>>,
15723 >(
15724 mut self,
15725 v: T,
15726 ) -> Self {
15727 self.shielded_instance_config = v.into();
15728 self
15729 }
15730
15731 pub fn set_boot_disk_kms_key<T: std::convert::Into<std::string::String>>(
15733 mut self,
15734 v: T,
15735 ) -> Self {
15736 self.boot_disk_kms_key = v.into();
15737 self
15738 }
15739
15740 pub fn set_image_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15742 self.image_type = v.into();
15743 self
15744 }
15745
15746 pub fn set_insecure_kubelet_readonly_port_enabled<
15748 T: std::convert::Into<std::option::Option<bool>>,
15749 >(
15750 mut self,
15751 v: T,
15752 ) -> Self {
15753 self.insecure_kubelet_readonly_port_enabled = v.into();
15754 self
15755 }
15756}
15757
15758impl wkt::message::Message for AutoprovisioningNodePoolDefaults {
15759 fn typename() -> &'static str {
15760 "type.googleapis.com/google.container.v1.AutoprovisioningNodePoolDefaults"
15761 }
15762}
15763
15764#[serde_with::serde_as]
15767#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15768#[serde(default, rename_all = "camelCase")]
15769#[non_exhaustive]
15770pub struct ResourceLimit {
15771 #[serde(skip_serializing_if = "std::string::String::is_empty")]
15773 pub resource_type: std::string::String,
15774
15775 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15777 #[serde_as(as = "serde_with::DisplayFromStr")]
15778 pub minimum: i64,
15779
15780 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15782 #[serde_as(as = "serde_with::DisplayFromStr")]
15783 pub maximum: i64,
15784
15785 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15786 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15787}
15788
15789impl ResourceLimit {
15790 pub fn new() -> Self {
15791 std::default::Default::default()
15792 }
15793
15794 pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15796 self.resource_type = v.into();
15797 self
15798 }
15799
15800 pub fn set_minimum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15802 self.minimum = v.into();
15803 self
15804 }
15805
15806 pub fn set_maximum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15808 self.maximum = v.into();
15809 self
15810 }
15811}
15812
15813impl wkt::message::Message for ResourceLimit {
15814 fn typename() -> &'static str {
15815 "type.googleapis.com/google.container.v1.ResourceLimit"
15816 }
15817}
15818
15819#[serde_with::serde_as]
15822#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
15823#[serde(default, rename_all = "camelCase")]
15824#[non_exhaustive]
15825pub struct NodePoolAutoscaling {
15826 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15828 pub enabled: bool,
15829
15830 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15833 pub min_node_count: i32,
15834
15835 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15838 pub max_node_count: i32,
15839
15840 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15842 pub autoprovisioned: bool,
15843
15844 pub location_policy: crate::model::node_pool_autoscaling::LocationPolicy,
15846
15847 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15852 pub total_min_node_count: i32,
15853
15854 #[serde(skip_serializing_if = "wkt::internal::is_default")]
15859 pub total_max_node_count: i32,
15860
15861 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15862 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15863}
15864
15865impl NodePoolAutoscaling {
15866 pub fn new() -> Self {
15867 std::default::Default::default()
15868 }
15869
15870 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15872 self.enabled = v.into();
15873 self
15874 }
15875
15876 pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15878 self.min_node_count = v.into();
15879 self
15880 }
15881
15882 pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15884 self.max_node_count = v.into();
15885 self
15886 }
15887
15888 pub fn set_autoprovisioned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15890 self.autoprovisioned = v.into();
15891 self
15892 }
15893
15894 pub fn set_location_policy<
15896 T: std::convert::Into<crate::model::node_pool_autoscaling::LocationPolicy>,
15897 >(
15898 mut self,
15899 v: T,
15900 ) -> Self {
15901 self.location_policy = v.into();
15902 self
15903 }
15904
15905 pub fn set_total_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15907 self.total_min_node_count = v.into();
15908 self
15909 }
15910
15911 pub fn set_total_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15913 self.total_max_node_count = v.into();
15914 self
15915 }
15916}
15917
15918impl wkt::message::Message for NodePoolAutoscaling {
15919 fn typename() -> &'static str {
15920 "type.googleapis.com/google.container.v1.NodePoolAutoscaling"
15921 }
15922}
15923
15924pub mod node_pool_autoscaling {
15926 #[allow(unused_imports)]
15927 use super::*;
15928
15929 #[derive(Clone, Debug, PartialEq)]
15946 #[non_exhaustive]
15947 pub enum LocationPolicy {
15948 Unspecified,
15950 Balanced,
15953 Any,
15955 UnknownValue(location_policy::UnknownValue),
15960 }
15961
15962 #[doc(hidden)]
15963 pub mod location_policy {
15964 #[allow(unused_imports)]
15965 use super::*;
15966 #[derive(Clone, Debug, PartialEq)]
15967 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15968 }
15969
15970 impl LocationPolicy {
15971 pub fn value(&self) -> std::option::Option<i32> {
15976 match self {
15977 Self::Unspecified => std::option::Option::Some(0),
15978 Self::Balanced => std::option::Option::Some(1),
15979 Self::Any => std::option::Option::Some(2),
15980 Self::UnknownValue(u) => u.0.value(),
15981 }
15982 }
15983
15984 pub fn name(&self) -> std::option::Option<&str> {
15989 match self {
15990 Self::Unspecified => std::option::Option::Some("LOCATION_POLICY_UNSPECIFIED"),
15991 Self::Balanced => std::option::Option::Some("BALANCED"),
15992 Self::Any => std::option::Option::Some("ANY"),
15993 Self::UnknownValue(u) => u.0.name(),
15994 }
15995 }
15996 }
15997
15998 impl std::default::Default for LocationPolicy {
15999 fn default() -> Self {
16000 use std::convert::From;
16001 Self::from(0)
16002 }
16003 }
16004
16005 impl std::fmt::Display for LocationPolicy {
16006 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16007 wkt::internal::display_enum(f, self.name(), self.value())
16008 }
16009 }
16010
16011 impl std::convert::From<i32> for LocationPolicy {
16012 fn from(value: i32) -> Self {
16013 match value {
16014 0 => Self::Unspecified,
16015 1 => Self::Balanced,
16016 2 => Self::Any,
16017 _ => Self::UnknownValue(location_policy::UnknownValue(
16018 wkt::internal::UnknownEnumValue::Integer(value),
16019 )),
16020 }
16021 }
16022 }
16023
16024 impl std::convert::From<&str> for LocationPolicy {
16025 fn from(value: &str) -> Self {
16026 use std::string::ToString;
16027 match value {
16028 "LOCATION_POLICY_UNSPECIFIED" => Self::Unspecified,
16029 "BALANCED" => Self::Balanced,
16030 "ANY" => Self::Any,
16031 _ => Self::UnknownValue(location_policy::UnknownValue(
16032 wkt::internal::UnknownEnumValue::String(value.to_string()),
16033 )),
16034 }
16035 }
16036 }
16037
16038 impl serde::ser::Serialize for LocationPolicy {
16039 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16040 where
16041 S: serde::Serializer,
16042 {
16043 match self {
16044 Self::Unspecified => serializer.serialize_i32(0),
16045 Self::Balanced => serializer.serialize_i32(1),
16046 Self::Any => serializer.serialize_i32(2),
16047 Self::UnknownValue(u) => u.0.serialize(serializer),
16048 }
16049 }
16050 }
16051
16052 impl<'de> serde::de::Deserialize<'de> for LocationPolicy {
16053 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16054 where
16055 D: serde::Deserializer<'de>,
16056 {
16057 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationPolicy>::new(
16058 ".google.container.v1.NodePoolAutoscaling.LocationPolicy",
16059 ))
16060 }
16061 }
16062}
16063
16064#[serde_with::serde_as]
16068#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16069#[serde(default, rename_all = "camelCase")]
16070#[non_exhaustive]
16071pub struct SetLabelsRequest {
16072 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16076 #[deprecated]
16077 pub project_id: std::string::String,
16078
16079 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16084 #[deprecated]
16085 pub zone: std::string::String,
16086
16087 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16090 #[deprecated]
16091 pub cluster_id: std::string::String,
16092
16093 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
16095 pub resource_labels: std::collections::HashMap<std::string::String, std::string::String>,
16096
16097 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16104 pub label_fingerprint: std::string::String,
16105
16106 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16109 pub name: std::string::String,
16110
16111 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16112 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16113}
16114
16115impl SetLabelsRequest {
16116 pub fn new() -> Self {
16117 std::default::Default::default()
16118 }
16119
16120 #[deprecated]
16122 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16123 self.project_id = v.into();
16124 self
16125 }
16126
16127 #[deprecated]
16129 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16130 self.zone = v.into();
16131 self
16132 }
16133
16134 #[deprecated]
16136 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16137 self.cluster_id = v.into();
16138 self
16139 }
16140
16141 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
16143 where
16144 T: std::iter::IntoIterator<Item = (K, V)>,
16145 K: std::convert::Into<std::string::String>,
16146 V: std::convert::Into<std::string::String>,
16147 {
16148 use std::iter::Iterator;
16149 self.resource_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16150 self
16151 }
16152
16153 pub fn set_label_fingerprint<T: std::convert::Into<std::string::String>>(
16155 mut self,
16156 v: T,
16157 ) -> Self {
16158 self.label_fingerprint = v.into();
16159 self
16160 }
16161
16162 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16164 self.name = v.into();
16165 self
16166 }
16167}
16168
16169impl wkt::message::Message for SetLabelsRequest {
16170 fn typename() -> &'static str {
16171 "type.googleapis.com/google.container.v1.SetLabelsRequest"
16172 }
16173}
16174
16175#[serde_with::serde_as]
16178#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16179#[serde(default, rename_all = "camelCase")]
16180#[non_exhaustive]
16181pub struct SetLegacyAbacRequest {
16182 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16186 #[deprecated]
16187 pub project_id: std::string::String,
16188
16189 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16194 #[deprecated]
16195 pub zone: std::string::String,
16196
16197 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16200 #[deprecated]
16201 pub cluster_id: std::string::String,
16202
16203 #[serde(skip_serializing_if = "wkt::internal::is_default")]
16205 pub enabled: bool,
16206
16207 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16210 pub name: std::string::String,
16211
16212 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16213 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16214}
16215
16216impl SetLegacyAbacRequest {
16217 pub fn new() -> Self {
16218 std::default::Default::default()
16219 }
16220
16221 #[deprecated]
16223 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16224 self.project_id = v.into();
16225 self
16226 }
16227
16228 #[deprecated]
16230 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16231 self.zone = v.into();
16232 self
16233 }
16234
16235 #[deprecated]
16237 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16238 self.cluster_id = v.into();
16239 self
16240 }
16241
16242 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16244 self.enabled = v.into();
16245 self
16246 }
16247
16248 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16250 self.name = v.into();
16251 self
16252 }
16253}
16254
16255impl wkt::message::Message for SetLegacyAbacRequest {
16256 fn typename() -> &'static str {
16257 "type.googleapis.com/google.container.v1.SetLegacyAbacRequest"
16258 }
16259}
16260
16261#[serde_with::serde_as]
16264#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16265#[serde(default, rename_all = "camelCase")]
16266#[non_exhaustive]
16267pub struct StartIPRotationRequest {
16268 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16272 #[deprecated]
16273 pub project_id: std::string::String,
16274
16275 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16280 #[deprecated]
16281 pub zone: std::string::String,
16282
16283 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16286 #[deprecated]
16287 pub cluster_id: std::string::String,
16288
16289 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16292 pub name: std::string::String,
16293
16294 #[serde(skip_serializing_if = "wkt::internal::is_default")]
16296 pub rotate_credentials: bool,
16297
16298 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16299 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16300}
16301
16302impl StartIPRotationRequest {
16303 pub fn new() -> Self {
16304 std::default::Default::default()
16305 }
16306
16307 #[deprecated]
16309 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16310 self.project_id = v.into();
16311 self
16312 }
16313
16314 #[deprecated]
16316 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16317 self.zone = v.into();
16318 self
16319 }
16320
16321 #[deprecated]
16323 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16324 self.cluster_id = v.into();
16325 self
16326 }
16327
16328 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16330 self.name = v.into();
16331 self
16332 }
16333
16334 pub fn set_rotate_credentials<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16336 self.rotate_credentials = v.into();
16337 self
16338 }
16339}
16340
16341impl wkt::message::Message for StartIPRotationRequest {
16342 fn typename() -> &'static str {
16343 "type.googleapis.com/google.container.v1.StartIPRotationRequest"
16344 }
16345}
16346
16347#[serde_with::serde_as]
16349#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16350#[serde(default, rename_all = "camelCase")]
16351#[non_exhaustive]
16352pub struct CompleteIPRotationRequest {
16353 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16357 #[deprecated]
16358 pub project_id: std::string::String,
16359
16360 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16365 #[deprecated]
16366 pub zone: std::string::String,
16367
16368 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16371 #[deprecated]
16372 pub cluster_id: std::string::String,
16373
16374 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16377 pub name: std::string::String,
16378
16379 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16380 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16381}
16382
16383impl CompleteIPRotationRequest {
16384 pub fn new() -> Self {
16385 std::default::Default::default()
16386 }
16387
16388 #[deprecated]
16390 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16391 self.project_id = v.into();
16392 self
16393 }
16394
16395 #[deprecated]
16397 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16398 self.zone = v.into();
16399 self
16400 }
16401
16402 #[deprecated]
16404 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16405 self.cluster_id = v.into();
16406 self
16407 }
16408
16409 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16411 self.name = v.into();
16412 self
16413 }
16414}
16415
16416impl wkt::message::Message for CompleteIPRotationRequest {
16417 fn typename() -> &'static str {
16418 "type.googleapis.com/google.container.v1.CompleteIPRotationRequest"
16419 }
16420}
16421
16422#[serde_with::serde_as]
16424#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16425#[serde(default, rename_all = "camelCase")]
16426#[non_exhaustive]
16427pub struct AcceleratorConfig {
16428 #[serde(skip_serializing_if = "wkt::internal::is_default")]
16430 #[serde_as(as = "serde_with::DisplayFromStr")]
16431 pub accelerator_count: i64,
16432
16433 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16436 pub accelerator_type: std::string::String,
16437
16438 #[serde(skip_serializing_if = "std::string::String::is_empty")]
16442 pub gpu_partition_size: std::string::String,
16443
16444 #[serde(skip_serializing_if = "std::option::Option::is_none")]
16446 pub gpu_sharing_config: std::option::Option<crate::model::GPUSharingConfig>,
16447
16448 #[serde(skip_serializing_if = "std::option::Option::is_none")]
16450 pub gpu_driver_installation_config:
16451 std::option::Option<crate::model::GPUDriverInstallationConfig>,
16452
16453 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16454 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16455}
16456
16457impl AcceleratorConfig {
16458 pub fn new() -> Self {
16459 std::default::Default::default()
16460 }
16461
16462 pub fn set_accelerator_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16464 self.accelerator_count = v.into();
16465 self
16466 }
16467
16468 pub fn set_accelerator_type<T: std::convert::Into<std::string::String>>(
16470 mut self,
16471 v: T,
16472 ) -> Self {
16473 self.accelerator_type = v.into();
16474 self
16475 }
16476
16477 pub fn set_gpu_partition_size<T: std::convert::Into<std::string::String>>(
16479 mut self,
16480 v: T,
16481 ) -> Self {
16482 self.gpu_partition_size = v.into();
16483 self
16484 }
16485
16486 pub fn set_gpu_sharing_config<
16488 T: std::convert::Into<std::option::Option<crate::model::GPUSharingConfig>>,
16489 >(
16490 mut self,
16491 v: T,
16492 ) -> Self {
16493 self.gpu_sharing_config = v.into();
16494 self
16495 }
16496
16497 pub fn set_gpu_driver_installation_config<
16499 T: std::convert::Into<std::option::Option<crate::model::GPUDriverInstallationConfig>>,
16500 >(
16501 mut self,
16502 v: T,
16503 ) -> Self {
16504 self.gpu_driver_installation_config = v.into();
16505 self
16506 }
16507}
16508
16509impl wkt::message::Message for AcceleratorConfig {
16510 fn typename() -> &'static str {
16511 "type.googleapis.com/google.container.v1.AcceleratorConfig"
16512 }
16513}
16514
16515#[serde_with::serde_as]
16518#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16519#[serde(default, rename_all = "camelCase")]
16520#[non_exhaustive]
16521pub struct GPUSharingConfig {
16522 #[serde(skip_serializing_if = "wkt::internal::is_default")]
16524 #[serde_as(as = "serde_with::DisplayFromStr")]
16525 pub max_shared_clients_per_gpu: i64,
16526
16527 #[serde(skip_serializing_if = "std::option::Option::is_none")]
16529 pub gpu_sharing_strategy:
16530 std::option::Option<crate::model::gpu_sharing_config::GPUSharingStrategy>,
16531
16532 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16533 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16534}
16535
16536impl GPUSharingConfig {
16537 pub fn new() -> Self {
16538 std::default::Default::default()
16539 }
16540
16541 pub fn set_max_shared_clients_per_gpu<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16543 self.max_shared_clients_per_gpu = v.into();
16544 self
16545 }
16546
16547 pub fn set_gpu_sharing_strategy<
16549 T: std::convert::Into<
16550 std::option::Option<crate::model::gpu_sharing_config::GPUSharingStrategy>,
16551 >,
16552 >(
16553 mut self,
16554 v: T,
16555 ) -> Self {
16556 self.gpu_sharing_strategy = v.into();
16557 self
16558 }
16559}
16560
16561impl wkt::message::Message for GPUSharingConfig {
16562 fn typename() -> &'static str {
16563 "type.googleapis.com/google.container.v1.GPUSharingConfig"
16564 }
16565}
16566
16567pub mod gpu_sharing_config {
16569 #[allow(unused_imports)]
16570 use super::*;
16571
16572 #[derive(Clone, Debug, PartialEq)]
16588 #[non_exhaustive]
16589 pub enum GPUSharingStrategy {
16590 Unspecified,
16592 TimeSharing,
16594 Mps,
16596 UnknownValue(gpu_sharing_strategy::UnknownValue),
16601 }
16602
16603 #[doc(hidden)]
16604 pub mod gpu_sharing_strategy {
16605 #[allow(unused_imports)]
16606 use super::*;
16607 #[derive(Clone, Debug, PartialEq)]
16608 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16609 }
16610
16611 impl GPUSharingStrategy {
16612 pub fn value(&self) -> std::option::Option<i32> {
16617 match self {
16618 Self::Unspecified => std::option::Option::Some(0),
16619 Self::TimeSharing => std::option::Option::Some(1),
16620 Self::Mps => std::option::Option::Some(2),
16621 Self::UnknownValue(u) => u.0.value(),
16622 }
16623 }
16624
16625 pub fn name(&self) -> std::option::Option<&str> {
16630 match self {
16631 Self::Unspecified => std::option::Option::Some("GPU_SHARING_STRATEGY_UNSPECIFIED"),
16632 Self::TimeSharing => std::option::Option::Some("TIME_SHARING"),
16633 Self::Mps => std::option::Option::Some("MPS"),
16634 Self::UnknownValue(u) => u.0.name(),
16635 }
16636 }
16637 }
16638
16639 impl std::default::Default for GPUSharingStrategy {
16640 fn default() -> Self {
16641 use std::convert::From;
16642 Self::from(0)
16643 }
16644 }
16645
16646 impl std::fmt::Display for GPUSharingStrategy {
16647 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16648 wkt::internal::display_enum(f, self.name(), self.value())
16649 }
16650 }
16651
16652 impl std::convert::From<i32> for GPUSharingStrategy {
16653 fn from(value: i32) -> Self {
16654 match value {
16655 0 => Self::Unspecified,
16656 1 => Self::TimeSharing,
16657 2 => Self::Mps,
16658 _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
16659 wkt::internal::UnknownEnumValue::Integer(value),
16660 )),
16661 }
16662 }
16663 }
16664
16665 impl std::convert::From<&str> for GPUSharingStrategy {
16666 fn from(value: &str) -> Self {
16667 use std::string::ToString;
16668 match value {
16669 "GPU_SHARING_STRATEGY_UNSPECIFIED" => Self::Unspecified,
16670 "TIME_SHARING" => Self::TimeSharing,
16671 "MPS" => Self::Mps,
16672 _ => Self::UnknownValue(gpu_sharing_strategy::UnknownValue(
16673 wkt::internal::UnknownEnumValue::String(value.to_string()),
16674 )),
16675 }
16676 }
16677 }
16678
16679 impl serde::ser::Serialize for GPUSharingStrategy {
16680 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16681 where
16682 S: serde::Serializer,
16683 {
16684 match self {
16685 Self::Unspecified => serializer.serialize_i32(0),
16686 Self::TimeSharing => serializer.serialize_i32(1),
16687 Self::Mps => serializer.serialize_i32(2),
16688 Self::UnknownValue(u) => u.0.serialize(serializer),
16689 }
16690 }
16691 }
16692
16693 impl<'de> serde::de::Deserialize<'de> for GPUSharingStrategy {
16694 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16695 where
16696 D: serde::Deserializer<'de>,
16697 {
16698 deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUSharingStrategy>::new(
16699 ".google.container.v1.GPUSharingConfig.GPUSharingStrategy",
16700 ))
16701 }
16702 }
16703}
16704
16705#[serde_with::serde_as]
16708#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16709#[serde(default, rename_all = "camelCase")]
16710#[non_exhaustive]
16711pub struct GPUDriverInstallationConfig {
16712 #[serde(skip_serializing_if = "std::option::Option::is_none")]
16714 pub gpu_driver_version:
16715 std::option::Option<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
16716
16717 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16718 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16719}
16720
16721impl GPUDriverInstallationConfig {
16722 pub fn new() -> Self {
16723 std::default::Default::default()
16724 }
16725
16726 pub fn set_gpu_driver_version<
16728 T: std::convert::Into<
16729 std::option::Option<crate::model::gpu_driver_installation_config::GPUDriverVersion>,
16730 >,
16731 >(
16732 mut self,
16733 v: T,
16734 ) -> Self {
16735 self.gpu_driver_version = v.into();
16736 self
16737 }
16738}
16739
16740impl wkt::message::Message for GPUDriverInstallationConfig {
16741 fn typename() -> &'static str {
16742 "type.googleapis.com/google.container.v1.GPUDriverInstallationConfig"
16743 }
16744}
16745
16746pub mod gpu_driver_installation_config {
16748 #[allow(unused_imports)]
16749 use super::*;
16750
16751 #[derive(Clone, Debug, PartialEq)]
16767 #[non_exhaustive]
16768 pub enum GPUDriverVersion {
16769 Unspecified,
16771 InstallationDisabled,
16773 Default,
16775 Latest,
16777 UnknownValue(gpu_driver_version::UnknownValue),
16782 }
16783
16784 #[doc(hidden)]
16785 pub mod gpu_driver_version {
16786 #[allow(unused_imports)]
16787 use super::*;
16788 #[derive(Clone, Debug, PartialEq)]
16789 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16790 }
16791
16792 impl GPUDriverVersion {
16793 pub fn value(&self) -> std::option::Option<i32> {
16798 match self {
16799 Self::Unspecified => std::option::Option::Some(0),
16800 Self::InstallationDisabled => std::option::Option::Some(1),
16801 Self::Default => std::option::Option::Some(2),
16802 Self::Latest => std::option::Option::Some(3),
16803 Self::UnknownValue(u) => u.0.value(),
16804 }
16805 }
16806
16807 pub fn name(&self) -> std::option::Option<&str> {
16812 match self {
16813 Self::Unspecified => std::option::Option::Some("GPU_DRIVER_VERSION_UNSPECIFIED"),
16814 Self::InstallationDisabled => std::option::Option::Some("INSTALLATION_DISABLED"),
16815 Self::Default => std::option::Option::Some("DEFAULT"),
16816 Self::Latest => std::option::Option::Some("LATEST"),
16817 Self::UnknownValue(u) => u.0.name(),
16818 }
16819 }
16820 }
16821
16822 impl std::default::Default for GPUDriverVersion {
16823 fn default() -> Self {
16824 use std::convert::From;
16825 Self::from(0)
16826 }
16827 }
16828
16829 impl std::fmt::Display for GPUDriverVersion {
16830 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16831 wkt::internal::display_enum(f, self.name(), self.value())
16832 }
16833 }
16834
16835 impl std::convert::From<i32> for GPUDriverVersion {
16836 fn from(value: i32) -> Self {
16837 match value {
16838 0 => Self::Unspecified,
16839 1 => Self::InstallationDisabled,
16840 2 => Self::Default,
16841 3 => Self::Latest,
16842 _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
16843 wkt::internal::UnknownEnumValue::Integer(value),
16844 )),
16845 }
16846 }
16847 }
16848
16849 impl std::convert::From<&str> for GPUDriverVersion {
16850 fn from(value: &str) -> Self {
16851 use std::string::ToString;
16852 match value {
16853 "GPU_DRIVER_VERSION_UNSPECIFIED" => Self::Unspecified,
16854 "INSTALLATION_DISABLED" => Self::InstallationDisabled,
16855 "DEFAULT" => Self::Default,
16856 "LATEST" => Self::Latest,
16857 _ => Self::UnknownValue(gpu_driver_version::UnknownValue(
16858 wkt::internal::UnknownEnumValue::String(value.to_string()),
16859 )),
16860 }
16861 }
16862 }
16863
16864 impl serde::ser::Serialize for GPUDriverVersion {
16865 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16866 where
16867 S: serde::Serializer,
16868 {
16869 match self {
16870 Self::Unspecified => serializer.serialize_i32(0),
16871 Self::InstallationDisabled => serializer.serialize_i32(1),
16872 Self::Default => serializer.serialize_i32(2),
16873 Self::Latest => serializer.serialize_i32(3),
16874 Self::UnknownValue(u) => u.0.serialize(serializer),
16875 }
16876 }
16877 }
16878
16879 impl<'de> serde::de::Deserialize<'de> for GPUDriverVersion {
16880 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16881 where
16882 D: serde::Deserializer<'de>,
16883 {
16884 deserializer.deserialize_any(wkt::internal::EnumVisitor::<GPUDriverVersion>::new(
16885 ".google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion",
16886 ))
16887 }
16888 }
16889}
16890
16891#[serde_with::serde_as]
16894#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
16895#[serde(default, rename_all = "camelCase")]
16896#[non_exhaustive]
16897pub struct WorkloadMetadataConfig {
16898 pub mode: crate::model::workload_metadata_config::Mode,
16901
16902 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
16903 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16904}
16905
16906impl WorkloadMetadataConfig {
16907 pub fn new() -> Self {
16908 std::default::Default::default()
16909 }
16910
16911 pub fn set_mode<T: std::convert::Into<crate::model::workload_metadata_config::Mode>>(
16913 mut self,
16914 v: T,
16915 ) -> Self {
16916 self.mode = v.into();
16917 self
16918 }
16919}
16920
16921impl wkt::message::Message for WorkloadMetadataConfig {
16922 fn typename() -> &'static str {
16923 "type.googleapis.com/google.container.v1.WorkloadMetadataConfig"
16924 }
16925}
16926
16927pub mod workload_metadata_config {
16929 #[allow(unused_imports)]
16930 use super::*;
16931
16932 #[derive(Clone, Debug, PartialEq)]
16949 #[non_exhaustive]
16950 pub enum Mode {
16951 Unspecified,
16953 GceMetadata,
16955 GkeMetadata,
16961 UnknownValue(mode::UnknownValue),
16966 }
16967
16968 #[doc(hidden)]
16969 pub mod mode {
16970 #[allow(unused_imports)]
16971 use super::*;
16972 #[derive(Clone, Debug, PartialEq)]
16973 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16974 }
16975
16976 impl Mode {
16977 pub fn value(&self) -> std::option::Option<i32> {
16982 match self {
16983 Self::Unspecified => std::option::Option::Some(0),
16984 Self::GceMetadata => std::option::Option::Some(1),
16985 Self::GkeMetadata => std::option::Option::Some(2),
16986 Self::UnknownValue(u) => u.0.value(),
16987 }
16988 }
16989
16990 pub fn name(&self) -> std::option::Option<&str> {
16995 match self {
16996 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
16997 Self::GceMetadata => std::option::Option::Some("GCE_METADATA"),
16998 Self::GkeMetadata => std::option::Option::Some("GKE_METADATA"),
16999 Self::UnknownValue(u) => u.0.name(),
17000 }
17001 }
17002 }
17003
17004 impl std::default::Default for Mode {
17005 fn default() -> Self {
17006 use std::convert::From;
17007 Self::from(0)
17008 }
17009 }
17010
17011 impl std::fmt::Display for Mode {
17012 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17013 wkt::internal::display_enum(f, self.name(), self.value())
17014 }
17015 }
17016
17017 impl std::convert::From<i32> for Mode {
17018 fn from(value: i32) -> Self {
17019 match value {
17020 0 => Self::Unspecified,
17021 1 => Self::GceMetadata,
17022 2 => Self::GkeMetadata,
17023 _ => Self::UnknownValue(mode::UnknownValue(
17024 wkt::internal::UnknownEnumValue::Integer(value),
17025 )),
17026 }
17027 }
17028 }
17029
17030 impl std::convert::From<&str> for Mode {
17031 fn from(value: &str) -> Self {
17032 use std::string::ToString;
17033 match value {
17034 "MODE_UNSPECIFIED" => Self::Unspecified,
17035 "GCE_METADATA" => Self::GceMetadata,
17036 "GKE_METADATA" => Self::GkeMetadata,
17037 _ => Self::UnknownValue(mode::UnknownValue(
17038 wkt::internal::UnknownEnumValue::String(value.to_string()),
17039 )),
17040 }
17041 }
17042 }
17043
17044 impl serde::ser::Serialize for Mode {
17045 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17046 where
17047 S: serde::Serializer,
17048 {
17049 match self {
17050 Self::Unspecified => serializer.serialize_i32(0),
17051 Self::GceMetadata => serializer.serialize_i32(1),
17052 Self::GkeMetadata => serializer.serialize_i32(2),
17053 Self::UnknownValue(u) => u.0.serialize(serializer),
17054 }
17055 }
17056 }
17057
17058 impl<'de> serde::de::Deserialize<'de> for Mode {
17059 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17060 where
17061 D: serde::Deserializer<'de>,
17062 {
17063 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
17064 ".google.container.v1.WorkloadMetadataConfig.Mode",
17065 ))
17066 }
17067 }
17068}
17069
17070#[serde_with::serde_as]
17072#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17073#[serde(default, rename_all = "camelCase")]
17074#[non_exhaustive]
17075pub struct SetNetworkPolicyRequest {
17076 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17080 #[deprecated]
17081 pub project_id: std::string::String,
17082
17083 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17088 #[deprecated]
17089 pub zone: std::string::String,
17090
17091 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17094 #[deprecated]
17095 pub cluster_id: std::string::String,
17096
17097 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17099 pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
17100
17101 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17104 pub name: std::string::String,
17105
17106 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17107 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17108}
17109
17110impl SetNetworkPolicyRequest {
17111 pub fn new() -> Self {
17112 std::default::Default::default()
17113 }
17114
17115 #[deprecated]
17117 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17118 self.project_id = v.into();
17119 self
17120 }
17121
17122 #[deprecated]
17124 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17125 self.zone = v.into();
17126 self
17127 }
17128
17129 #[deprecated]
17131 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17132 self.cluster_id = v.into();
17133 self
17134 }
17135
17136 pub fn set_network_policy<
17138 T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
17139 >(
17140 mut self,
17141 v: T,
17142 ) -> Self {
17143 self.network_policy = v.into();
17144 self
17145 }
17146
17147 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17149 self.name = v.into();
17150 self
17151 }
17152}
17153
17154impl wkt::message::Message for SetNetworkPolicyRequest {
17155 fn typename() -> &'static str {
17156 "type.googleapis.com/google.container.v1.SetNetworkPolicyRequest"
17157 }
17158}
17159
17160#[serde_with::serde_as]
17162#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17163#[serde(default, rename_all = "camelCase")]
17164#[non_exhaustive]
17165pub struct SetMaintenancePolicyRequest {
17166 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17169 pub project_id: std::string::String,
17170
17171 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17175 pub zone: std::string::String,
17176
17177 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17179 pub cluster_id: std::string::String,
17180
17181 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17184 pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
17185
17186 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17190 pub name: std::string::String,
17191
17192 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17193 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17194}
17195
17196impl SetMaintenancePolicyRequest {
17197 pub fn new() -> Self {
17198 std::default::Default::default()
17199 }
17200
17201 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17203 self.project_id = v.into();
17204 self
17205 }
17206
17207 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17209 self.zone = v.into();
17210 self
17211 }
17212
17213 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17215 self.cluster_id = v.into();
17216 self
17217 }
17218
17219 pub fn set_maintenance_policy<
17221 T: std::convert::Into<std::option::Option<crate::model::MaintenancePolicy>>,
17222 >(
17223 mut self,
17224 v: T,
17225 ) -> Self {
17226 self.maintenance_policy = v.into();
17227 self
17228 }
17229
17230 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17232 self.name = v.into();
17233 self
17234 }
17235}
17236
17237impl wkt::message::Message for SetMaintenancePolicyRequest {
17238 fn typename() -> &'static str {
17239 "type.googleapis.com/google.container.v1.SetMaintenancePolicyRequest"
17240 }
17241}
17242
17243#[serde_with::serde_as]
17246#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17247#[serde(default, rename_all = "camelCase")]
17248#[non_exhaustive]
17249pub struct StatusCondition {
17250 #[deprecated]
17253 pub code: crate::model::status_condition::Code,
17254
17255 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17257 pub message: std::string::String,
17258
17259 pub canonical_code: rpc::model::Code,
17261
17262 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17263 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17264}
17265
17266impl StatusCondition {
17267 pub fn new() -> Self {
17268 std::default::Default::default()
17269 }
17270
17271 #[deprecated]
17273 pub fn set_code<T: std::convert::Into<crate::model::status_condition::Code>>(
17274 mut self,
17275 v: T,
17276 ) -> Self {
17277 self.code = v.into();
17278 self
17279 }
17280
17281 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17283 self.message = v.into();
17284 self
17285 }
17286
17287 pub fn set_canonical_code<T: std::convert::Into<rpc::model::Code>>(mut self, v: T) -> Self {
17289 self.canonical_code = v.into();
17290 self
17291 }
17292}
17293
17294impl wkt::message::Message for StatusCondition {
17295 fn typename() -> &'static str {
17296 "type.googleapis.com/google.container.v1.StatusCondition"
17297 }
17298}
17299
17300pub mod status_condition {
17302 #[allow(unused_imports)]
17303 use super::*;
17304
17305 #[derive(Clone, Debug, PartialEq)]
17321 #[non_exhaustive]
17322 pub enum Code {
17323 Unknown,
17325 GceStockout,
17328 GkeServiceAccountDeleted,
17331 GceQuotaExceeded,
17333 SetByOperator,
17335 CloudKmsKeyError,
17338 CaExpiring,
17340 UnknownValue(code::UnknownValue),
17345 }
17346
17347 #[doc(hidden)]
17348 pub mod code {
17349 #[allow(unused_imports)]
17350 use super::*;
17351 #[derive(Clone, Debug, PartialEq)]
17352 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17353 }
17354
17355 impl Code {
17356 pub fn value(&self) -> std::option::Option<i32> {
17361 match self {
17362 Self::Unknown => std::option::Option::Some(0),
17363 Self::GceStockout => std::option::Option::Some(1),
17364 Self::GkeServiceAccountDeleted => std::option::Option::Some(2),
17365 Self::GceQuotaExceeded => std::option::Option::Some(3),
17366 Self::SetByOperator => std::option::Option::Some(4),
17367 Self::CloudKmsKeyError => std::option::Option::Some(7),
17368 Self::CaExpiring => std::option::Option::Some(9),
17369 Self::UnknownValue(u) => u.0.value(),
17370 }
17371 }
17372
17373 pub fn name(&self) -> std::option::Option<&str> {
17378 match self {
17379 Self::Unknown => std::option::Option::Some("UNKNOWN"),
17380 Self::GceStockout => std::option::Option::Some("GCE_STOCKOUT"),
17381 Self::GkeServiceAccountDeleted => {
17382 std::option::Option::Some("GKE_SERVICE_ACCOUNT_DELETED")
17383 }
17384 Self::GceQuotaExceeded => std::option::Option::Some("GCE_QUOTA_EXCEEDED"),
17385 Self::SetByOperator => std::option::Option::Some("SET_BY_OPERATOR"),
17386 Self::CloudKmsKeyError => std::option::Option::Some("CLOUD_KMS_KEY_ERROR"),
17387 Self::CaExpiring => std::option::Option::Some("CA_EXPIRING"),
17388 Self::UnknownValue(u) => u.0.name(),
17389 }
17390 }
17391 }
17392
17393 impl std::default::Default for Code {
17394 fn default() -> Self {
17395 use std::convert::From;
17396 Self::from(0)
17397 }
17398 }
17399
17400 impl std::fmt::Display for Code {
17401 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17402 wkt::internal::display_enum(f, self.name(), self.value())
17403 }
17404 }
17405
17406 impl std::convert::From<i32> for Code {
17407 fn from(value: i32) -> Self {
17408 match value {
17409 0 => Self::Unknown,
17410 1 => Self::GceStockout,
17411 2 => Self::GkeServiceAccountDeleted,
17412 3 => Self::GceQuotaExceeded,
17413 4 => Self::SetByOperator,
17414 7 => Self::CloudKmsKeyError,
17415 9 => Self::CaExpiring,
17416 _ => Self::UnknownValue(code::UnknownValue(
17417 wkt::internal::UnknownEnumValue::Integer(value),
17418 )),
17419 }
17420 }
17421 }
17422
17423 impl std::convert::From<&str> for Code {
17424 fn from(value: &str) -> Self {
17425 use std::string::ToString;
17426 match value {
17427 "UNKNOWN" => Self::Unknown,
17428 "GCE_STOCKOUT" => Self::GceStockout,
17429 "GKE_SERVICE_ACCOUNT_DELETED" => Self::GkeServiceAccountDeleted,
17430 "GCE_QUOTA_EXCEEDED" => Self::GceQuotaExceeded,
17431 "SET_BY_OPERATOR" => Self::SetByOperator,
17432 "CLOUD_KMS_KEY_ERROR" => Self::CloudKmsKeyError,
17433 "CA_EXPIRING" => Self::CaExpiring,
17434 _ => Self::UnknownValue(code::UnknownValue(
17435 wkt::internal::UnknownEnumValue::String(value.to_string()),
17436 )),
17437 }
17438 }
17439 }
17440
17441 impl serde::ser::Serialize for Code {
17442 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17443 where
17444 S: serde::Serializer,
17445 {
17446 match self {
17447 Self::Unknown => serializer.serialize_i32(0),
17448 Self::GceStockout => serializer.serialize_i32(1),
17449 Self::GkeServiceAccountDeleted => serializer.serialize_i32(2),
17450 Self::GceQuotaExceeded => serializer.serialize_i32(3),
17451 Self::SetByOperator => serializer.serialize_i32(4),
17452 Self::CloudKmsKeyError => serializer.serialize_i32(7),
17453 Self::CaExpiring => serializer.serialize_i32(9),
17454 Self::UnknownValue(u) => u.0.serialize(serializer),
17455 }
17456 }
17457 }
17458
17459 impl<'de> serde::de::Deserialize<'de> for Code {
17460 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17461 where
17462 D: serde::Deserializer<'de>,
17463 {
17464 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Code>::new(
17465 ".google.container.v1.StatusCondition.Code",
17466 ))
17467 }
17468 }
17469}
17470
17471#[serde_with::serde_as]
17473#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17474#[serde(default, rename_all = "camelCase")]
17475#[non_exhaustive]
17476pub struct NetworkConfig {
17477 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17482 pub network: std::string::String,
17483
17484 #[serde(skip_serializing_if = "std::string::String::is_empty")]
17489 pub subnetwork: std::string::String,
17490
17491 #[serde(skip_serializing_if = "wkt::internal::is_default")]
17494 pub enable_intra_node_visibility: bool,
17495
17496 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17501 pub default_snat_status: std::option::Option<crate::model::DefaultSnatStatus>,
17502
17503 #[serde(rename = "enableL4ilbSubsetting")]
17505 #[serde(skip_serializing_if = "wkt::internal::is_default")]
17506 pub enable_l4ilb_subsetting: bool,
17507
17508 pub datapath_provider: crate::model::DatapathProvider,
17511
17512 pub private_ipv6_google_access: crate::model::PrivateIPv6GoogleAccess,
17516
17517 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17519 pub dns_config: std::option::Option<crate::model::DNSConfig>,
17520
17521 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17524 pub service_external_ips_config: std::option::Option<crate::model::ServiceExternalIPsConfig>,
17525
17526 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17529 pub gateway_api_config: std::option::Option<crate::model::GatewayAPIConfig>,
17530
17531 #[serde(skip_serializing_if = "wkt::internal::is_default")]
17533 pub enable_multi_networking: bool,
17534
17535 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17537 pub network_performance_config:
17538 std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
17539
17540 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17542 pub enable_fqdn_network_policy: std::option::Option<bool>,
17543
17544 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17547 pub in_transit_encryption_config: std::option::Option<crate::model::InTransitEncryptionConfig>,
17548
17549 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17551 pub enable_cilium_clusterwide_network_policy: std::option::Option<bool>,
17552
17553 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17561 pub default_enable_private_nodes: std::option::Option<bool>,
17562
17563 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17564 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17565}
17566
17567impl NetworkConfig {
17568 pub fn new() -> Self {
17569 std::default::Default::default()
17570 }
17571
17572 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17574 self.network = v.into();
17575 self
17576 }
17577
17578 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17580 self.subnetwork = v.into();
17581 self
17582 }
17583
17584 pub fn set_enable_intra_node_visibility<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17586 self.enable_intra_node_visibility = v.into();
17587 self
17588 }
17589
17590 pub fn set_default_snat_status<
17592 T: std::convert::Into<std::option::Option<crate::model::DefaultSnatStatus>>,
17593 >(
17594 mut self,
17595 v: T,
17596 ) -> Self {
17597 self.default_snat_status = v.into();
17598 self
17599 }
17600
17601 pub fn set_enable_l4ilb_subsetting<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17603 self.enable_l4ilb_subsetting = v.into();
17604 self
17605 }
17606
17607 pub fn set_datapath_provider<T: std::convert::Into<crate::model::DatapathProvider>>(
17609 mut self,
17610 v: T,
17611 ) -> Self {
17612 self.datapath_provider = v.into();
17613 self
17614 }
17615
17616 pub fn set_private_ipv6_google_access<
17618 T: std::convert::Into<crate::model::PrivateIPv6GoogleAccess>,
17619 >(
17620 mut self,
17621 v: T,
17622 ) -> Self {
17623 self.private_ipv6_google_access = v.into();
17624 self
17625 }
17626
17627 pub fn set_dns_config<T: std::convert::Into<std::option::Option<crate::model::DNSConfig>>>(
17629 mut self,
17630 v: T,
17631 ) -> Self {
17632 self.dns_config = v.into();
17633 self
17634 }
17635
17636 pub fn set_service_external_ips_config<
17638 T: std::convert::Into<std::option::Option<crate::model::ServiceExternalIPsConfig>>,
17639 >(
17640 mut self,
17641 v: T,
17642 ) -> Self {
17643 self.service_external_ips_config = v.into();
17644 self
17645 }
17646
17647 pub fn set_gateway_api_config<
17649 T: std::convert::Into<std::option::Option<crate::model::GatewayAPIConfig>>,
17650 >(
17651 mut self,
17652 v: T,
17653 ) -> Self {
17654 self.gateway_api_config = v.into();
17655 self
17656 }
17657
17658 pub fn set_enable_multi_networking<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17660 self.enable_multi_networking = v.into();
17661 self
17662 }
17663
17664 pub fn set_network_performance_config<
17666 T: std::convert::Into<
17667 std::option::Option<crate::model::network_config::ClusterNetworkPerformanceConfig>,
17668 >,
17669 >(
17670 mut self,
17671 v: T,
17672 ) -> Self {
17673 self.network_performance_config = v.into();
17674 self
17675 }
17676
17677 pub fn set_enable_fqdn_network_policy<T: std::convert::Into<std::option::Option<bool>>>(
17679 mut self,
17680 v: T,
17681 ) -> Self {
17682 self.enable_fqdn_network_policy = v.into();
17683 self
17684 }
17685
17686 pub fn set_in_transit_encryption_config<
17688 T: std::convert::Into<std::option::Option<crate::model::InTransitEncryptionConfig>>,
17689 >(
17690 mut self,
17691 v: T,
17692 ) -> Self {
17693 self.in_transit_encryption_config = v.into();
17694 self
17695 }
17696
17697 pub fn set_enable_cilium_clusterwide_network_policy<
17699 T: std::convert::Into<std::option::Option<bool>>,
17700 >(
17701 mut self,
17702 v: T,
17703 ) -> Self {
17704 self.enable_cilium_clusterwide_network_policy = v.into();
17705 self
17706 }
17707
17708 pub fn set_default_enable_private_nodes<T: std::convert::Into<std::option::Option<bool>>>(
17710 mut self,
17711 v: T,
17712 ) -> Self {
17713 self.default_enable_private_nodes = v.into();
17714 self
17715 }
17716}
17717
17718impl wkt::message::Message for NetworkConfig {
17719 fn typename() -> &'static str {
17720 "type.googleapis.com/google.container.v1.NetworkConfig"
17721 }
17722}
17723
17724pub mod network_config {
17726 #[allow(unused_imports)]
17727 use super::*;
17728
17729 #[serde_with::serde_as]
17731 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17732 #[serde(default, rename_all = "camelCase")]
17733 #[non_exhaustive]
17734 pub struct ClusterNetworkPerformanceConfig {
17735 #[serde(skip_serializing_if = "std::option::Option::is_none")]
17737 pub total_egress_bandwidth_tier: std::option::Option<
17738 crate::model::network_config::cluster_network_performance_config::Tier,
17739 >,
17740
17741 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17742 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17743 }
17744
17745 impl ClusterNetworkPerformanceConfig {
17746 pub fn new() -> Self {
17747 std::default::Default::default()
17748 }
17749
17750 pub fn set_total_egress_bandwidth_tier<
17752 T: std::convert::Into<
17753 std::option::Option<
17754 crate::model::network_config::cluster_network_performance_config::Tier,
17755 >,
17756 >,
17757 >(
17758 mut self,
17759 v: T,
17760 ) -> Self {
17761 self.total_egress_bandwidth_tier = v.into();
17762 self
17763 }
17764 }
17765
17766 impl wkt::message::Message for ClusterNetworkPerformanceConfig {
17767 fn typename() -> &'static str {
17768 "type.googleapis.com/google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig"
17769 }
17770 }
17771
17772 pub mod cluster_network_performance_config {
17774 #[allow(unused_imports)]
17775 use super::*;
17776
17777 #[derive(Clone, Debug, PartialEq)]
17793 #[non_exhaustive]
17794 pub enum Tier {
17795 Unspecified,
17797 _1,
17799 UnknownValue(tier::UnknownValue),
17804 }
17805
17806 #[doc(hidden)]
17807 pub mod tier {
17808 #[allow(unused_imports)]
17809 use super::*;
17810 #[derive(Clone, Debug, PartialEq)]
17811 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17812 }
17813
17814 impl Tier {
17815 pub fn value(&self) -> std::option::Option<i32> {
17820 match self {
17821 Self::Unspecified => std::option::Option::Some(0),
17822 Self::_1 => std::option::Option::Some(1),
17823 Self::UnknownValue(u) => u.0.value(),
17824 }
17825 }
17826
17827 pub fn name(&self) -> std::option::Option<&str> {
17832 match self {
17833 Self::Unspecified => std::option::Option::Some("TIER_UNSPECIFIED"),
17834 Self::_1 => std::option::Option::Some("TIER_1"),
17835 Self::UnknownValue(u) => u.0.name(),
17836 }
17837 }
17838 }
17839
17840 impl std::default::Default for Tier {
17841 fn default() -> Self {
17842 use std::convert::From;
17843 Self::from(0)
17844 }
17845 }
17846
17847 impl std::fmt::Display for Tier {
17848 fn fmt(
17849 &self,
17850 f: &mut std::fmt::Formatter<'_>,
17851 ) -> std::result::Result<(), std::fmt::Error> {
17852 wkt::internal::display_enum(f, self.name(), self.value())
17853 }
17854 }
17855
17856 impl std::convert::From<i32> for Tier {
17857 fn from(value: i32) -> Self {
17858 match value {
17859 0 => Self::Unspecified,
17860 1 => Self::_1,
17861 _ => Self::UnknownValue(tier::UnknownValue(
17862 wkt::internal::UnknownEnumValue::Integer(value),
17863 )),
17864 }
17865 }
17866 }
17867
17868 impl std::convert::From<&str> for Tier {
17869 fn from(value: &str) -> Self {
17870 use std::string::ToString;
17871 match value {
17872 "TIER_UNSPECIFIED" => Self::Unspecified,
17873 "TIER_1" => Self::_1,
17874 _ => Self::UnknownValue(tier::UnknownValue(
17875 wkt::internal::UnknownEnumValue::String(value.to_string()),
17876 )),
17877 }
17878 }
17879 }
17880
17881 impl serde::ser::Serialize for Tier {
17882 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17883 where
17884 S: serde::Serializer,
17885 {
17886 match self {
17887 Self::Unspecified => serializer.serialize_i32(0),
17888 Self::_1 => serializer.serialize_i32(1),
17889 Self::UnknownValue(u) => u.0.serialize(serializer),
17890 }
17891 }
17892 }
17893
17894 impl<'de> serde::de::Deserialize<'de> for Tier {
17895 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17896 where
17897 D: serde::Deserializer<'de>,
17898 {
17899 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tier>::new(
17900 ".google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier",
17901 ))
17902 }
17903 }
17904 }
17905}
17906
17907#[serde_with::serde_as]
17909#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
17910#[serde(default, rename_all = "camelCase")]
17911#[non_exhaustive]
17912pub struct GatewayAPIConfig {
17913 pub channel: crate::model::gateway_api_config::Channel,
17915
17916 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
17917 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17918}
17919
17920impl GatewayAPIConfig {
17921 pub fn new() -> Self {
17922 std::default::Default::default()
17923 }
17924
17925 pub fn set_channel<T: std::convert::Into<crate::model::gateway_api_config::Channel>>(
17927 mut self,
17928 v: T,
17929 ) -> Self {
17930 self.channel = v.into();
17931 self
17932 }
17933}
17934
17935impl wkt::message::Message for GatewayAPIConfig {
17936 fn typename() -> &'static str {
17937 "type.googleapis.com/google.container.v1.GatewayAPIConfig"
17938 }
17939}
17940
17941pub mod gateway_api_config {
17943 #[allow(unused_imports)]
17944 use super::*;
17945
17946 #[derive(Clone, Debug, PartialEq)]
17963 #[non_exhaustive]
17964 pub enum Channel {
17965 Unspecified,
17967 Disabled,
17969 #[deprecated]
17972 Experimental,
17973 Standard,
17975 UnknownValue(channel::UnknownValue),
17980 }
17981
17982 #[doc(hidden)]
17983 pub mod channel {
17984 #[allow(unused_imports)]
17985 use super::*;
17986 #[derive(Clone, Debug, PartialEq)]
17987 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17988 }
17989
17990 impl Channel {
17991 pub fn value(&self) -> std::option::Option<i32> {
17996 match self {
17997 Self::Unspecified => std::option::Option::Some(0),
17998 Self::Disabled => std::option::Option::Some(1),
17999 Self::Experimental => std::option::Option::Some(3),
18000 Self::Standard => std::option::Option::Some(4),
18001 Self::UnknownValue(u) => u.0.value(),
18002 }
18003 }
18004
18005 pub fn name(&self) -> std::option::Option<&str> {
18010 match self {
18011 Self::Unspecified => std::option::Option::Some("CHANNEL_UNSPECIFIED"),
18012 Self::Disabled => std::option::Option::Some("CHANNEL_DISABLED"),
18013 Self::Experimental => std::option::Option::Some("CHANNEL_EXPERIMENTAL"),
18014 Self::Standard => std::option::Option::Some("CHANNEL_STANDARD"),
18015 Self::UnknownValue(u) => u.0.name(),
18016 }
18017 }
18018 }
18019
18020 impl std::default::Default for Channel {
18021 fn default() -> Self {
18022 use std::convert::From;
18023 Self::from(0)
18024 }
18025 }
18026
18027 impl std::fmt::Display for Channel {
18028 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18029 wkt::internal::display_enum(f, self.name(), self.value())
18030 }
18031 }
18032
18033 impl std::convert::From<i32> for Channel {
18034 fn from(value: i32) -> Self {
18035 match value {
18036 0 => Self::Unspecified,
18037 1 => Self::Disabled,
18038 3 => Self::Experimental,
18039 4 => Self::Standard,
18040 _ => Self::UnknownValue(channel::UnknownValue(
18041 wkt::internal::UnknownEnumValue::Integer(value),
18042 )),
18043 }
18044 }
18045 }
18046
18047 impl std::convert::From<&str> for Channel {
18048 fn from(value: &str) -> Self {
18049 use std::string::ToString;
18050 match value {
18051 "CHANNEL_UNSPECIFIED" => Self::Unspecified,
18052 "CHANNEL_DISABLED" => Self::Disabled,
18053 "CHANNEL_EXPERIMENTAL" => Self::Experimental,
18054 "CHANNEL_STANDARD" => Self::Standard,
18055 _ => Self::UnknownValue(channel::UnknownValue(
18056 wkt::internal::UnknownEnumValue::String(value.to_string()),
18057 )),
18058 }
18059 }
18060 }
18061
18062 impl serde::ser::Serialize for Channel {
18063 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18064 where
18065 S: serde::Serializer,
18066 {
18067 match self {
18068 Self::Unspecified => serializer.serialize_i32(0),
18069 Self::Disabled => serializer.serialize_i32(1),
18070 Self::Experimental => serializer.serialize_i32(3),
18071 Self::Standard => serializer.serialize_i32(4),
18072 Self::UnknownValue(u) => u.0.serialize(serializer),
18073 }
18074 }
18075 }
18076
18077 impl<'de> serde::de::Deserialize<'de> for Channel {
18078 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18079 where
18080 D: serde::Deserializer<'de>,
18081 {
18082 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
18083 ".google.container.v1.GatewayAPIConfig.Channel",
18084 ))
18085 }
18086 }
18087}
18088
18089#[serde_with::serde_as]
18091#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18092#[serde(default, rename_all = "camelCase")]
18093#[non_exhaustive]
18094pub struct ServiceExternalIPsConfig {
18095 #[serde(skip_serializing_if = "wkt::internal::is_default")]
18097 pub enabled: bool,
18098
18099 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18100 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18101}
18102
18103impl ServiceExternalIPsConfig {
18104 pub fn new() -> Self {
18105 std::default::Default::default()
18106 }
18107
18108 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18110 self.enabled = v.into();
18111 self
18112 }
18113}
18114
18115impl wkt::message::Message for ServiceExternalIPsConfig {
18116 fn typename() -> &'static str {
18117 "type.googleapis.com/google.container.v1.ServiceExternalIPsConfig"
18118 }
18119}
18120
18121#[serde_with::serde_as]
18124#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18125#[serde(default, rename_all = "camelCase")]
18126#[non_exhaustive]
18127pub struct GetOpenIDConfigRequest {
18128 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18131 pub parent: std::string::String,
18132
18133 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18134 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18135}
18136
18137impl GetOpenIDConfigRequest {
18138 pub fn new() -> Self {
18139 std::default::Default::default()
18140 }
18141
18142 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18144 self.parent = v.into();
18145 self
18146 }
18147}
18148
18149impl wkt::message::Message for GetOpenIDConfigRequest {
18150 fn typename() -> &'static str {
18151 "type.googleapis.com/google.container.v1.GetOpenIDConfigRequest"
18152 }
18153}
18154
18155#[serde_with::serde_as]
18158#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18159#[serde(default, rename_all = "camelCase")]
18160#[non_exhaustive]
18161pub struct GetOpenIDConfigResponse {
18162 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18164 pub issuer: std::string::String,
18165
18166 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18168 pub jwks_uri: std::string::String,
18169
18170 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18172 pub response_types_supported: std::vec::Vec<std::string::String>,
18173
18174 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18176 pub subject_types_supported: std::vec::Vec<std::string::String>,
18177
18178 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18180 pub id_token_signing_alg_values_supported: std::vec::Vec<std::string::String>,
18181
18182 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18184 pub claims_supported: std::vec::Vec<std::string::String>,
18185
18186 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18188 pub grant_types: std::vec::Vec<std::string::String>,
18189
18190 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18191 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18192}
18193
18194impl GetOpenIDConfigResponse {
18195 pub fn new() -> Self {
18196 std::default::Default::default()
18197 }
18198
18199 pub fn set_issuer<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18201 self.issuer = v.into();
18202 self
18203 }
18204
18205 pub fn set_jwks_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18207 self.jwks_uri = v.into();
18208 self
18209 }
18210
18211 pub fn set_response_types_supported<T, V>(mut self, v: T) -> Self
18213 where
18214 T: std::iter::IntoIterator<Item = V>,
18215 V: std::convert::Into<std::string::String>,
18216 {
18217 use std::iter::Iterator;
18218 self.response_types_supported = v.into_iter().map(|i| i.into()).collect();
18219 self
18220 }
18221
18222 pub fn set_subject_types_supported<T, V>(mut self, v: T) -> Self
18224 where
18225 T: std::iter::IntoIterator<Item = V>,
18226 V: std::convert::Into<std::string::String>,
18227 {
18228 use std::iter::Iterator;
18229 self.subject_types_supported = v.into_iter().map(|i| i.into()).collect();
18230 self
18231 }
18232
18233 pub fn set_id_token_signing_alg_values_supported<T, V>(mut self, v: T) -> Self
18235 where
18236 T: std::iter::IntoIterator<Item = V>,
18237 V: std::convert::Into<std::string::String>,
18238 {
18239 use std::iter::Iterator;
18240 self.id_token_signing_alg_values_supported = v.into_iter().map(|i| i.into()).collect();
18241 self
18242 }
18243
18244 pub fn set_claims_supported<T, V>(mut self, v: T) -> Self
18246 where
18247 T: std::iter::IntoIterator<Item = V>,
18248 V: std::convert::Into<std::string::String>,
18249 {
18250 use std::iter::Iterator;
18251 self.claims_supported = v.into_iter().map(|i| i.into()).collect();
18252 self
18253 }
18254
18255 pub fn set_grant_types<T, V>(mut self, v: T) -> Self
18257 where
18258 T: std::iter::IntoIterator<Item = V>,
18259 V: std::convert::Into<std::string::String>,
18260 {
18261 use std::iter::Iterator;
18262 self.grant_types = v.into_iter().map(|i| i.into()).collect();
18263 self
18264 }
18265}
18266
18267impl wkt::message::Message for GetOpenIDConfigResponse {
18268 fn typename() -> &'static str {
18269 "type.googleapis.com/google.container.v1.GetOpenIDConfigResponse"
18270 }
18271}
18272
18273#[serde_with::serde_as]
18278#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18279#[serde(default, rename_all = "camelCase")]
18280#[non_exhaustive]
18281pub struct GetJSONWebKeysRequest {
18282 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18285 pub parent: std::string::String,
18286
18287 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18288 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18289}
18290
18291impl GetJSONWebKeysRequest {
18292 pub fn new() -> Self {
18293 std::default::Default::default()
18294 }
18295
18296 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18298 self.parent = v.into();
18299 self
18300 }
18301}
18302
18303impl wkt::message::Message for GetJSONWebKeysRequest {
18304 fn typename() -> &'static str {
18305 "type.googleapis.com/google.container.v1.GetJSONWebKeysRequest"
18306 }
18307}
18308
18309#[serde_with::serde_as]
18311#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18312#[serde(default, rename_all = "camelCase")]
18313#[non_exhaustive]
18314pub struct Jwk {
18315 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18317 pub kty: std::string::String,
18318
18319 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18321 pub alg: std::string::String,
18322
18323 #[serde(rename = "use")]
18325 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18326 pub r#use: std::string::String,
18327
18328 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18330 pub kid: std::string::String,
18331
18332 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18334 pub n: std::string::String,
18335
18336 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18338 pub e: std::string::String,
18339
18340 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18342 pub x: std::string::String,
18343
18344 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18346 pub y: std::string::String,
18347
18348 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18350 pub crv: std::string::String,
18351
18352 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18353 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18354}
18355
18356impl Jwk {
18357 pub fn new() -> Self {
18358 std::default::Default::default()
18359 }
18360
18361 pub fn set_kty<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18363 self.kty = v.into();
18364 self
18365 }
18366
18367 pub fn set_alg<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18369 self.alg = v.into();
18370 self
18371 }
18372
18373 pub fn set_use<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18375 self.r#use = v.into();
18376 self
18377 }
18378
18379 pub fn set_kid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18381 self.kid = v.into();
18382 self
18383 }
18384
18385 pub fn set_n<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18387 self.n = v.into();
18388 self
18389 }
18390
18391 pub fn set_e<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18393 self.e = v.into();
18394 self
18395 }
18396
18397 pub fn set_x<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18399 self.x = v.into();
18400 self
18401 }
18402
18403 pub fn set_y<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18405 self.y = v.into();
18406 self
18407 }
18408
18409 pub fn set_crv<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18411 self.crv = v.into();
18412 self
18413 }
18414}
18415
18416impl wkt::message::Message for Jwk {
18417 fn typename() -> &'static str {
18418 "type.googleapis.com/google.container.v1.Jwk"
18419 }
18420}
18421
18422#[serde_with::serde_as]
18424#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18425#[serde(default, rename_all = "camelCase")]
18426#[non_exhaustive]
18427pub struct GetJSONWebKeysResponse {
18428 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18431 pub keys: std::vec::Vec<crate::model::Jwk>,
18432
18433 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18434 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18435}
18436
18437impl GetJSONWebKeysResponse {
18438 pub fn new() -> Self {
18439 std::default::Default::default()
18440 }
18441
18442 pub fn set_keys<T, V>(mut self, v: T) -> Self
18444 where
18445 T: std::iter::IntoIterator<Item = V>,
18446 V: std::convert::Into<crate::model::Jwk>,
18447 {
18448 use std::iter::Iterator;
18449 self.keys = v.into_iter().map(|i| i.into()).collect();
18450 self
18451 }
18452}
18453
18454impl wkt::message::Message for GetJSONWebKeysResponse {
18455 fn typename() -> &'static str {
18456 "type.googleapis.com/google.container.v1.GetJSONWebKeysResponse"
18457 }
18458}
18459
18460#[serde_with::serde_as]
18463#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18464#[serde(default, rename_all = "camelCase")]
18465#[non_exhaustive]
18466pub struct CheckAutopilotCompatibilityRequest {
18467 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18470 pub name: std::string::String,
18471
18472 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18473 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18474}
18475
18476impl CheckAutopilotCompatibilityRequest {
18477 pub fn new() -> Self {
18478 std::default::Default::default()
18479 }
18480
18481 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18483 self.name = v.into();
18484 self
18485 }
18486}
18487
18488impl wkt::message::Message for CheckAutopilotCompatibilityRequest {
18489 fn typename() -> &'static str {
18490 "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityRequest"
18491 }
18492}
18493
18494#[serde_with::serde_as]
18497#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18498#[serde(default, rename_all = "camelCase")]
18499#[non_exhaustive]
18500pub struct AutopilotCompatibilityIssue {
18501 #[serde(skip_serializing_if = "std::option::Option::is_none")]
18503 pub last_observation: std::option::Option<wkt::Timestamp>,
18504
18505 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18507 pub constraint_type: std::string::String,
18508
18509 pub incompatibility_type: crate::model::autopilot_compatibility_issue::IssueType,
18511
18512 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18514 pub subjects: std::vec::Vec<std::string::String>,
18515
18516 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18518 pub documentation_url: std::string::String,
18519
18520 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18522 pub description: std::string::String,
18523
18524 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18525 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18526}
18527
18528impl AutopilotCompatibilityIssue {
18529 pub fn new() -> Self {
18530 std::default::Default::default()
18531 }
18532
18533 pub fn set_last_observation<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
18535 mut self,
18536 v: T,
18537 ) -> Self {
18538 self.last_observation = v.into();
18539 self
18540 }
18541
18542 pub fn set_constraint_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18544 self.constraint_type = v.into();
18545 self
18546 }
18547
18548 pub fn set_incompatibility_type<
18550 T: std::convert::Into<crate::model::autopilot_compatibility_issue::IssueType>,
18551 >(
18552 mut self,
18553 v: T,
18554 ) -> Self {
18555 self.incompatibility_type = v.into();
18556 self
18557 }
18558
18559 pub fn set_subjects<T, V>(mut self, v: T) -> Self
18561 where
18562 T: std::iter::IntoIterator<Item = V>,
18563 V: std::convert::Into<std::string::String>,
18564 {
18565 use std::iter::Iterator;
18566 self.subjects = v.into_iter().map(|i| i.into()).collect();
18567 self
18568 }
18569
18570 pub fn set_documentation_url<T: std::convert::Into<std::string::String>>(
18572 mut self,
18573 v: T,
18574 ) -> Self {
18575 self.documentation_url = v.into();
18576 self
18577 }
18578
18579 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18581 self.description = v.into();
18582 self
18583 }
18584}
18585
18586impl wkt::message::Message for AutopilotCompatibilityIssue {
18587 fn typename() -> &'static str {
18588 "type.googleapis.com/google.container.v1.AutopilotCompatibilityIssue"
18589 }
18590}
18591
18592pub mod autopilot_compatibility_issue {
18594 #[allow(unused_imports)]
18595 use super::*;
18596
18597 #[derive(Clone, Debug, PartialEq)]
18613 #[non_exhaustive]
18614 pub enum IssueType {
18615 Unspecified,
18617 Incompatibility,
18620 AdditionalConfigRequired,
18623 PassedWithOptionalConfig,
18627 UnknownValue(issue_type::UnknownValue),
18632 }
18633
18634 #[doc(hidden)]
18635 pub mod issue_type {
18636 #[allow(unused_imports)]
18637 use super::*;
18638 #[derive(Clone, Debug, PartialEq)]
18639 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18640 }
18641
18642 impl IssueType {
18643 pub fn value(&self) -> std::option::Option<i32> {
18648 match self {
18649 Self::Unspecified => std::option::Option::Some(0),
18650 Self::Incompatibility => std::option::Option::Some(1),
18651 Self::AdditionalConfigRequired => std::option::Option::Some(2),
18652 Self::PassedWithOptionalConfig => std::option::Option::Some(3),
18653 Self::UnknownValue(u) => u.0.value(),
18654 }
18655 }
18656
18657 pub fn name(&self) -> std::option::Option<&str> {
18662 match self {
18663 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
18664 Self::Incompatibility => std::option::Option::Some("INCOMPATIBILITY"),
18665 Self::AdditionalConfigRequired => {
18666 std::option::Option::Some("ADDITIONAL_CONFIG_REQUIRED")
18667 }
18668 Self::PassedWithOptionalConfig => {
18669 std::option::Option::Some("PASSED_WITH_OPTIONAL_CONFIG")
18670 }
18671 Self::UnknownValue(u) => u.0.name(),
18672 }
18673 }
18674 }
18675
18676 impl std::default::Default for IssueType {
18677 fn default() -> Self {
18678 use std::convert::From;
18679 Self::from(0)
18680 }
18681 }
18682
18683 impl std::fmt::Display for IssueType {
18684 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18685 wkt::internal::display_enum(f, self.name(), self.value())
18686 }
18687 }
18688
18689 impl std::convert::From<i32> for IssueType {
18690 fn from(value: i32) -> Self {
18691 match value {
18692 0 => Self::Unspecified,
18693 1 => Self::Incompatibility,
18694 2 => Self::AdditionalConfigRequired,
18695 3 => Self::PassedWithOptionalConfig,
18696 _ => Self::UnknownValue(issue_type::UnknownValue(
18697 wkt::internal::UnknownEnumValue::Integer(value),
18698 )),
18699 }
18700 }
18701 }
18702
18703 impl std::convert::From<&str> for IssueType {
18704 fn from(value: &str) -> Self {
18705 use std::string::ToString;
18706 match value {
18707 "UNSPECIFIED" => Self::Unspecified,
18708 "INCOMPATIBILITY" => Self::Incompatibility,
18709 "ADDITIONAL_CONFIG_REQUIRED" => Self::AdditionalConfigRequired,
18710 "PASSED_WITH_OPTIONAL_CONFIG" => Self::PassedWithOptionalConfig,
18711 _ => Self::UnknownValue(issue_type::UnknownValue(
18712 wkt::internal::UnknownEnumValue::String(value.to_string()),
18713 )),
18714 }
18715 }
18716 }
18717
18718 impl serde::ser::Serialize for IssueType {
18719 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18720 where
18721 S: serde::Serializer,
18722 {
18723 match self {
18724 Self::Unspecified => serializer.serialize_i32(0),
18725 Self::Incompatibility => serializer.serialize_i32(1),
18726 Self::AdditionalConfigRequired => serializer.serialize_i32(2),
18727 Self::PassedWithOptionalConfig => serializer.serialize_i32(3),
18728 Self::UnknownValue(u) => u.0.serialize(serializer),
18729 }
18730 }
18731 }
18732
18733 impl<'de> serde::de::Deserialize<'de> for IssueType {
18734 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18735 where
18736 D: serde::Deserializer<'de>,
18737 {
18738 deserializer.deserialize_any(wkt::internal::EnumVisitor::<IssueType>::new(
18739 ".google.container.v1.AutopilotCompatibilityIssue.IssueType",
18740 ))
18741 }
18742 }
18743}
18744
18745#[serde_with::serde_as]
18747#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18748#[serde(default, rename_all = "camelCase")]
18749#[non_exhaustive]
18750pub struct CheckAutopilotCompatibilityResponse {
18751 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
18753 pub issues: std::vec::Vec<crate::model::AutopilotCompatibilityIssue>,
18754
18755 #[serde(skip_serializing_if = "std::string::String::is_empty")]
18757 pub summary: std::string::String,
18758
18759 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18760 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18761}
18762
18763impl CheckAutopilotCompatibilityResponse {
18764 pub fn new() -> Self {
18765 std::default::Default::default()
18766 }
18767
18768 pub fn set_issues<T, V>(mut self, v: T) -> Self
18770 where
18771 T: std::iter::IntoIterator<Item = V>,
18772 V: std::convert::Into<crate::model::AutopilotCompatibilityIssue>,
18773 {
18774 use std::iter::Iterator;
18775 self.issues = v.into_iter().map(|i| i.into()).collect();
18776 self
18777 }
18778
18779 pub fn set_summary<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18781 self.summary = v.into();
18782 self
18783 }
18784}
18785
18786impl wkt::message::Message for CheckAutopilotCompatibilityResponse {
18787 fn typename() -> &'static str {
18788 "type.googleapis.com/google.container.v1.CheckAutopilotCompatibilityResponse"
18789 }
18790}
18791
18792#[serde_with::serde_as]
18799#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18800#[serde(default, rename_all = "camelCase")]
18801#[non_exhaustive]
18802pub struct ReleaseChannel {
18803 pub channel: crate::model::release_channel::Channel,
18805
18806 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
18807 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18808}
18809
18810impl ReleaseChannel {
18811 pub fn new() -> Self {
18812 std::default::Default::default()
18813 }
18814
18815 pub fn set_channel<T: std::convert::Into<crate::model::release_channel::Channel>>(
18817 mut self,
18818 v: T,
18819 ) -> Self {
18820 self.channel = v.into();
18821 self
18822 }
18823}
18824
18825impl wkt::message::Message for ReleaseChannel {
18826 fn typename() -> &'static str {
18827 "type.googleapis.com/google.container.v1.ReleaseChannel"
18828 }
18829}
18830
18831pub mod release_channel {
18833 #[allow(unused_imports)]
18834 use super::*;
18835
18836 #[derive(Clone, Debug, PartialEq)]
18852 #[non_exhaustive]
18853 pub enum Channel {
18854 Unspecified,
18856 Rapid,
18863 Regular,
18867 Stable,
18870 Extended,
18873 UnknownValue(channel::UnknownValue),
18878 }
18879
18880 #[doc(hidden)]
18881 pub mod channel {
18882 #[allow(unused_imports)]
18883 use super::*;
18884 #[derive(Clone, Debug, PartialEq)]
18885 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18886 }
18887
18888 impl Channel {
18889 pub fn value(&self) -> std::option::Option<i32> {
18894 match self {
18895 Self::Unspecified => std::option::Option::Some(0),
18896 Self::Rapid => std::option::Option::Some(1),
18897 Self::Regular => std::option::Option::Some(2),
18898 Self::Stable => std::option::Option::Some(3),
18899 Self::Extended => std::option::Option::Some(4),
18900 Self::UnknownValue(u) => u.0.value(),
18901 }
18902 }
18903
18904 pub fn name(&self) -> std::option::Option<&str> {
18909 match self {
18910 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
18911 Self::Rapid => std::option::Option::Some("RAPID"),
18912 Self::Regular => std::option::Option::Some("REGULAR"),
18913 Self::Stable => std::option::Option::Some("STABLE"),
18914 Self::Extended => std::option::Option::Some("EXTENDED"),
18915 Self::UnknownValue(u) => u.0.name(),
18916 }
18917 }
18918 }
18919
18920 impl std::default::Default for Channel {
18921 fn default() -> Self {
18922 use std::convert::From;
18923 Self::from(0)
18924 }
18925 }
18926
18927 impl std::fmt::Display for Channel {
18928 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18929 wkt::internal::display_enum(f, self.name(), self.value())
18930 }
18931 }
18932
18933 impl std::convert::From<i32> for Channel {
18934 fn from(value: i32) -> Self {
18935 match value {
18936 0 => Self::Unspecified,
18937 1 => Self::Rapid,
18938 2 => Self::Regular,
18939 3 => Self::Stable,
18940 4 => Self::Extended,
18941 _ => Self::UnknownValue(channel::UnknownValue(
18942 wkt::internal::UnknownEnumValue::Integer(value),
18943 )),
18944 }
18945 }
18946 }
18947
18948 impl std::convert::From<&str> for Channel {
18949 fn from(value: &str) -> Self {
18950 use std::string::ToString;
18951 match value {
18952 "UNSPECIFIED" => Self::Unspecified,
18953 "RAPID" => Self::Rapid,
18954 "REGULAR" => Self::Regular,
18955 "STABLE" => Self::Stable,
18956 "EXTENDED" => Self::Extended,
18957 _ => Self::UnknownValue(channel::UnknownValue(
18958 wkt::internal::UnknownEnumValue::String(value.to_string()),
18959 )),
18960 }
18961 }
18962 }
18963
18964 impl serde::ser::Serialize for Channel {
18965 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18966 where
18967 S: serde::Serializer,
18968 {
18969 match self {
18970 Self::Unspecified => serializer.serialize_i32(0),
18971 Self::Rapid => serializer.serialize_i32(1),
18972 Self::Regular => serializer.serialize_i32(2),
18973 Self::Stable => serializer.serialize_i32(3),
18974 Self::Extended => serializer.serialize_i32(4),
18975 Self::UnknownValue(u) => u.0.serialize(serializer),
18976 }
18977 }
18978 }
18979
18980 impl<'de> serde::de::Deserialize<'de> for Channel {
18981 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18982 where
18983 D: serde::Deserializer<'de>,
18984 {
18985 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Channel>::new(
18986 ".google.container.v1.ReleaseChannel.Channel",
18987 ))
18988 }
18989 }
18990}
18991
18992#[serde_with::serde_as]
18994#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
18995#[serde(default, rename_all = "camelCase")]
18996#[non_exhaustive]
18997pub struct CostManagementConfig {
18998 #[serde(skip_serializing_if = "wkt::internal::is_default")]
19000 pub enabled: bool,
19001
19002 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19003 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19004}
19005
19006impl CostManagementConfig {
19007 pub fn new() -> Self {
19008 std::default::Default::default()
19009 }
19010
19011 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19013 self.enabled = v.into();
19014 self
19015 }
19016}
19017
19018impl wkt::message::Message for CostManagementConfig {
19019 fn typename() -> &'static str {
19020 "type.googleapis.com/google.container.v1.CostManagementConfig"
19021 }
19022}
19023
19024#[serde_with::serde_as]
19027#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19028#[serde(default, rename_all = "camelCase")]
19029#[non_exhaustive]
19030pub struct IntraNodeVisibilityConfig {
19031 #[serde(skip_serializing_if = "wkt::internal::is_default")]
19033 pub enabled: bool,
19034
19035 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19036 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19037}
19038
19039impl IntraNodeVisibilityConfig {
19040 pub fn new() -> Self {
19041 std::default::Default::default()
19042 }
19043
19044 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19046 self.enabled = v.into();
19047 self
19048 }
19049}
19050
19051impl wkt::message::Message for IntraNodeVisibilityConfig {
19052 fn typename() -> &'static str {
19053 "type.googleapis.com/google.container.v1.IntraNodeVisibilityConfig"
19054 }
19055}
19056
19057#[serde_with::serde_as]
19060#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19061#[serde(default, rename_all = "camelCase")]
19062#[non_exhaustive]
19063pub struct ILBSubsettingConfig {
19064 #[serde(skip_serializing_if = "wkt::internal::is_default")]
19066 pub enabled: bool,
19067
19068 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19069 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19070}
19071
19072impl ILBSubsettingConfig {
19073 pub fn new() -> Self {
19074 std::default::Default::default()
19075 }
19076
19077 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19079 self.enabled = v.into();
19080 self
19081 }
19082}
19083
19084impl wkt::message::Message for ILBSubsettingConfig {
19085 fn typename() -> &'static str {
19086 "type.googleapis.com/google.container.v1.ILBSubsettingConfig"
19087 }
19088}
19089
19090#[serde_with::serde_as]
19092#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19093#[serde(default, rename_all = "camelCase")]
19094#[non_exhaustive]
19095pub struct DNSConfig {
19096 pub cluster_dns: crate::model::dns_config::Provider,
19098
19099 pub cluster_dns_scope: crate::model::dns_config::DNSScope,
19101
19102 #[serde(skip_serializing_if = "std::string::String::is_empty")]
19104 pub cluster_dns_domain: std::string::String,
19105
19106 #[serde(skip_serializing_if = "std::string::String::is_empty")]
19108 pub additive_vpc_scope_dns_domain: std::string::String,
19109
19110 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19111 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19112}
19113
19114impl DNSConfig {
19115 pub fn new() -> Self {
19116 std::default::Default::default()
19117 }
19118
19119 pub fn set_cluster_dns<T: std::convert::Into<crate::model::dns_config::Provider>>(
19121 mut self,
19122 v: T,
19123 ) -> Self {
19124 self.cluster_dns = v.into();
19125 self
19126 }
19127
19128 pub fn set_cluster_dns_scope<T: std::convert::Into<crate::model::dns_config::DNSScope>>(
19130 mut self,
19131 v: T,
19132 ) -> Self {
19133 self.cluster_dns_scope = v.into();
19134 self
19135 }
19136
19137 pub fn set_cluster_dns_domain<T: std::convert::Into<std::string::String>>(
19139 mut self,
19140 v: T,
19141 ) -> Self {
19142 self.cluster_dns_domain = v.into();
19143 self
19144 }
19145
19146 pub fn set_additive_vpc_scope_dns_domain<T: std::convert::Into<std::string::String>>(
19148 mut self,
19149 v: T,
19150 ) -> Self {
19151 self.additive_vpc_scope_dns_domain = v.into();
19152 self
19153 }
19154}
19155
19156impl wkt::message::Message for DNSConfig {
19157 fn typename() -> &'static str {
19158 "type.googleapis.com/google.container.v1.DNSConfig"
19159 }
19160}
19161
19162pub mod dns_config {
19164 #[allow(unused_imports)]
19165 use super::*;
19166
19167 #[derive(Clone, Debug, PartialEq)]
19183 #[non_exhaustive]
19184 pub enum Provider {
19185 Unspecified,
19187 PlatformDefault,
19189 CloudDns,
19191 KubeDns,
19193 UnknownValue(provider::UnknownValue),
19198 }
19199
19200 #[doc(hidden)]
19201 pub mod provider {
19202 #[allow(unused_imports)]
19203 use super::*;
19204 #[derive(Clone, Debug, PartialEq)]
19205 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19206 }
19207
19208 impl Provider {
19209 pub fn value(&self) -> std::option::Option<i32> {
19214 match self {
19215 Self::Unspecified => std::option::Option::Some(0),
19216 Self::PlatformDefault => std::option::Option::Some(1),
19217 Self::CloudDns => std::option::Option::Some(2),
19218 Self::KubeDns => std::option::Option::Some(3),
19219 Self::UnknownValue(u) => u.0.value(),
19220 }
19221 }
19222
19223 pub fn name(&self) -> std::option::Option<&str> {
19228 match self {
19229 Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
19230 Self::PlatformDefault => std::option::Option::Some("PLATFORM_DEFAULT"),
19231 Self::CloudDns => std::option::Option::Some("CLOUD_DNS"),
19232 Self::KubeDns => std::option::Option::Some("KUBE_DNS"),
19233 Self::UnknownValue(u) => u.0.name(),
19234 }
19235 }
19236 }
19237
19238 impl std::default::Default for Provider {
19239 fn default() -> Self {
19240 use std::convert::From;
19241 Self::from(0)
19242 }
19243 }
19244
19245 impl std::fmt::Display for Provider {
19246 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19247 wkt::internal::display_enum(f, self.name(), self.value())
19248 }
19249 }
19250
19251 impl std::convert::From<i32> for Provider {
19252 fn from(value: i32) -> Self {
19253 match value {
19254 0 => Self::Unspecified,
19255 1 => Self::PlatformDefault,
19256 2 => Self::CloudDns,
19257 3 => Self::KubeDns,
19258 _ => Self::UnknownValue(provider::UnknownValue(
19259 wkt::internal::UnknownEnumValue::Integer(value),
19260 )),
19261 }
19262 }
19263 }
19264
19265 impl std::convert::From<&str> for Provider {
19266 fn from(value: &str) -> Self {
19267 use std::string::ToString;
19268 match value {
19269 "PROVIDER_UNSPECIFIED" => Self::Unspecified,
19270 "PLATFORM_DEFAULT" => Self::PlatformDefault,
19271 "CLOUD_DNS" => Self::CloudDns,
19272 "KUBE_DNS" => Self::KubeDns,
19273 _ => Self::UnknownValue(provider::UnknownValue(
19274 wkt::internal::UnknownEnumValue::String(value.to_string()),
19275 )),
19276 }
19277 }
19278 }
19279
19280 impl serde::ser::Serialize for Provider {
19281 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19282 where
19283 S: serde::Serializer,
19284 {
19285 match self {
19286 Self::Unspecified => serializer.serialize_i32(0),
19287 Self::PlatformDefault => serializer.serialize_i32(1),
19288 Self::CloudDns => serializer.serialize_i32(2),
19289 Self::KubeDns => serializer.serialize_i32(3),
19290 Self::UnknownValue(u) => u.0.serialize(serializer),
19291 }
19292 }
19293 }
19294
19295 impl<'de> serde::de::Deserialize<'de> for Provider {
19296 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19297 where
19298 D: serde::Deserializer<'de>,
19299 {
19300 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
19301 ".google.container.v1.DNSConfig.Provider",
19302 ))
19303 }
19304 }
19305
19306 #[derive(Clone, Debug, PartialEq)]
19322 #[non_exhaustive]
19323 pub enum DNSScope {
19324 Unspecified,
19326 ClusterScope,
19328 VpcScope,
19330 UnknownValue(dns_scope::UnknownValue),
19335 }
19336
19337 #[doc(hidden)]
19338 pub mod dns_scope {
19339 #[allow(unused_imports)]
19340 use super::*;
19341 #[derive(Clone, Debug, PartialEq)]
19342 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19343 }
19344
19345 impl DNSScope {
19346 pub fn value(&self) -> std::option::Option<i32> {
19351 match self {
19352 Self::Unspecified => std::option::Option::Some(0),
19353 Self::ClusterScope => std::option::Option::Some(1),
19354 Self::VpcScope => std::option::Option::Some(2),
19355 Self::UnknownValue(u) => u.0.value(),
19356 }
19357 }
19358
19359 pub fn name(&self) -> std::option::Option<&str> {
19364 match self {
19365 Self::Unspecified => std::option::Option::Some("DNS_SCOPE_UNSPECIFIED"),
19366 Self::ClusterScope => std::option::Option::Some("CLUSTER_SCOPE"),
19367 Self::VpcScope => std::option::Option::Some("VPC_SCOPE"),
19368 Self::UnknownValue(u) => u.0.name(),
19369 }
19370 }
19371 }
19372
19373 impl std::default::Default for DNSScope {
19374 fn default() -> Self {
19375 use std::convert::From;
19376 Self::from(0)
19377 }
19378 }
19379
19380 impl std::fmt::Display for DNSScope {
19381 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19382 wkt::internal::display_enum(f, self.name(), self.value())
19383 }
19384 }
19385
19386 impl std::convert::From<i32> for DNSScope {
19387 fn from(value: i32) -> Self {
19388 match value {
19389 0 => Self::Unspecified,
19390 1 => Self::ClusterScope,
19391 2 => Self::VpcScope,
19392 _ => Self::UnknownValue(dns_scope::UnknownValue(
19393 wkt::internal::UnknownEnumValue::Integer(value),
19394 )),
19395 }
19396 }
19397 }
19398
19399 impl std::convert::From<&str> for DNSScope {
19400 fn from(value: &str) -> Self {
19401 use std::string::ToString;
19402 match value {
19403 "DNS_SCOPE_UNSPECIFIED" => Self::Unspecified,
19404 "CLUSTER_SCOPE" => Self::ClusterScope,
19405 "VPC_SCOPE" => Self::VpcScope,
19406 _ => Self::UnknownValue(dns_scope::UnknownValue(
19407 wkt::internal::UnknownEnumValue::String(value.to_string()),
19408 )),
19409 }
19410 }
19411 }
19412
19413 impl serde::ser::Serialize for DNSScope {
19414 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19415 where
19416 S: serde::Serializer,
19417 {
19418 match self {
19419 Self::Unspecified => serializer.serialize_i32(0),
19420 Self::ClusterScope => serializer.serialize_i32(1),
19421 Self::VpcScope => serializer.serialize_i32(2),
19422 Self::UnknownValue(u) => u.0.serialize(serializer),
19423 }
19424 }
19425 }
19426
19427 impl<'de> serde::de::Deserialize<'de> for DNSScope {
19428 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19429 where
19430 D: serde::Deserializer<'de>,
19431 {
19432 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DNSScope>::new(
19433 ".google.container.v1.DNSConfig.DNSScope",
19434 ))
19435 }
19436 }
19437}
19438
19439#[serde_with::serde_as]
19441#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19442#[serde(default, rename_all = "camelCase")]
19443#[non_exhaustive]
19444pub struct MaxPodsConstraint {
19445 #[serde(skip_serializing_if = "wkt::internal::is_default")]
19447 #[serde_as(as = "serde_with::DisplayFromStr")]
19448 pub max_pods_per_node: i64,
19449
19450 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19451 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19452}
19453
19454impl MaxPodsConstraint {
19455 pub fn new() -> Self {
19456 std::default::Default::default()
19457 }
19458
19459 pub fn set_max_pods_per_node<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19461 self.max_pods_per_node = v.into();
19462 self
19463 }
19464}
19465
19466impl wkt::message::Message for MaxPodsConstraint {
19467 fn typename() -> &'static str {
19468 "type.googleapis.com/google.container.v1.MaxPodsConstraint"
19469 }
19470}
19471
19472#[serde_with::serde_as]
19475#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19476#[serde(default, rename_all = "camelCase")]
19477#[non_exhaustive]
19478pub struct WorkloadIdentityConfig {
19479 #[serde(skip_serializing_if = "std::string::String::is_empty")]
19481 pub workload_pool: std::string::String,
19482
19483 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19484 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19485}
19486
19487impl WorkloadIdentityConfig {
19488 pub fn new() -> Self {
19489 std::default::Default::default()
19490 }
19491
19492 pub fn set_workload_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19494 self.workload_pool = v.into();
19495 self
19496 }
19497}
19498
19499impl wkt::message::Message for WorkloadIdentityConfig {
19500 fn typename() -> &'static str {
19501 "type.googleapis.com/google.container.v1.WorkloadIdentityConfig"
19502 }
19503}
19504
19505#[serde_with::serde_as]
19508#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19509#[serde(default, rename_all = "camelCase")]
19510#[non_exhaustive]
19511pub struct IdentityServiceConfig {
19512 #[serde(skip_serializing_if = "wkt::internal::is_default")]
19514 pub enabled: bool,
19515
19516 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19517 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19518}
19519
19520impl IdentityServiceConfig {
19521 pub fn new() -> Self {
19522 std::default::Default::default()
19523 }
19524
19525 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19527 self.enabled = v.into();
19528 self
19529 }
19530}
19531
19532impl wkt::message::Message for IdentityServiceConfig {
19533 fn typename() -> &'static str {
19534 "type.googleapis.com/google.container.v1.IdentityServiceConfig"
19535 }
19536}
19537
19538#[serde_with::serde_as]
19540#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19541#[serde(default, rename_all = "camelCase")]
19542#[non_exhaustive]
19543pub struct MeshCertificates {
19544 #[serde(skip_serializing_if = "std::option::Option::is_none")]
19556 pub enable_certificates: std::option::Option<wkt::BoolValue>,
19557
19558 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19559 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19560}
19561
19562impl MeshCertificates {
19563 pub fn new() -> Self {
19564 std::default::Default::default()
19565 }
19566
19567 pub fn set_enable_certificates<T: std::convert::Into<std::option::Option<wkt::BoolValue>>>(
19569 mut self,
19570 v: T,
19571 ) -> Self {
19572 self.enable_certificates = v.into();
19573 self
19574 }
19575}
19576
19577impl wkt::message::Message for MeshCertificates {
19578 fn typename() -> &'static str {
19579 "type.googleapis.com/google.container.v1.MeshCertificates"
19580 }
19581}
19582
19583#[serde_with::serde_as]
19585#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19586#[serde(default, rename_all = "camelCase")]
19587#[non_exhaustive]
19588pub struct DatabaseEncryption {
19589 #[serde(skip_serializing_if = "std::string::String::is_empty")]
19592 pub key_name: std::string::String,
19593
19594 pub state: crate::model::database_encryption::State,
19596
19597 #[serde(skip_serializing_if = "std::option::Option::is_none")]
19599 pub current_state: std::option::Option<crate::model::database_encryption::CurrentState>,
19600
19601 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
19606 pub decryption_keys: std::vec::Vec<std::string::String>,
19607
19608 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
19611 pub last_operation_errors: std::vec::Vec<crate::model::database_encryption::OperationError>,
19612
19613 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19614 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19615}
19616
19617impl DatabaseEncryption {
19618 pub fn new() -> Self {
19619 std::default::Default::default()
19620 }
19621
19622 pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19624 self.key_name = v.into();
19625 self
19626 }
19627
19628 pub fn set_state<T: std::convert::Into<crate::model::database_encryption::State>>(
19630 mut self,
19631 v: T,
19632 ) -> Self {
19633 self.state = v.into();
19634 self
19635 }
19636
19637 pub fn set_current_state<
19639 T: std::convert::Into<std::option::Option<crate::model::database_encryption::CurrentState>>,
19640 >(
19641 mut self,
19642 v: T,
19643 ) -> Self {
19644 self.current_state = v.into();
19645 self
19646 }
19647
19648 pub fn set_decryption_keys<T, V>(mut self, v: T) -> Self
19650 where
19651 T: std::iter::IntoIterator<Item = V>,
19652 V: std::convert::Into<std::string::String>,
19653 {
19654 use std::iter::Iterator;
19655 self.decryption_keys = v.into_iter().map(|i| i.into()).collect();
19656 self
19657 }
19658
19659 pub fn set_last_operation_errors<T, V>(mut self, v: T) -> Self
19661 where
19662 T: std::iter::IntoIterator<Item = V>,
19663 V: std::convert::Into<crate::model::database_encryption::OperationError>,
19664 {
19665 use std::iter::Iterator;
19666 self.last_operation_errors = v.into_iter().map(|i| i.into()).collect();
19667 self
19668 }
19669}
19670
19671impl wkt::message::Message for DatabaseEncryption {
19672 fn typename() -> &'static str {
19673 "type.googleapis.com/google.container.v1.DatabaseEncryption"
19674 }
19675}
19676
19677pub mod database_encryption {
19679 #[allow(unused_imports)]
19680 use super::*;
19681
19682 #[serde_with::serde_as]
19685 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
19686 #[serde(default, rename_all = "camelCase")]
19687 #[non_exhaustive]
19688 pub struct OperationError {
19689 #[serde(skip_serializing_if = "std::string::String::is_empty")]
19691 pub key_name: std::string::String,
19692
19693 #[serde(skip_serializing_if = "std::string::String::is_empty")]
19695 pub error_message: std::string::String,
19696
19697 #[serde(skip_serializing_if = "std::option::Option::is_none")]
19699 pub timestamp: std::option::Option<wkt::Timestamp>,
19700
19701 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
19702 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19703 }
19704
19705 impl OperationError {
19706 pub fn new() -> Self {
19707 std::default::Default::default()
19708 }
19709
19710 pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19712 self.key_name = v.into();
19713 self
19714 }
19715
19716 pub fn set_error_message<T: std::convert::Into<std::string::String>>(
19718 mut self,
19719 v: T,
19720 ) -> Self {
19721 self.error_message = v.into();
19722 self
19723 }
19724
19725 pub fn set_timestamp<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
19727 mut self,
19728 v: T,
19729 ) -> Self {
19730 self.timestamp = v.into();
19731 self
19732 }
19733 }
19734
19735 impl wkt::message::Message for OperationError {
19736 fn typename() -> &'static str {
19737 "type.googleapis.com/google.container.v1.DatabaseEncryption.OperationError"
19738 }
19739 }
19740
19741 #[derive(Clone, Debug, PartialEq)]
19757 #[non_exhaustive]
19758 pub enum State {
19759 Unknown,
19761 Encrypted,
19763 Decrypted,
19766 UnknownValue(state::UnknownValue),
19771 }
19772
19773 #[doc(hidden)]
19774 pub mod state {
19775 #[allow(unused_imports)]
19776 use super::*;
19777 #[derive(Clone, Debug, PartialEq)]
19778 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19779 }
19780
19781 impl State {
19782 pub fn value(&self) -> std::option::Option<i32> {
19787 match self {
19788 Self::Unknown => std::option::Option::Some(0),
19789 Self::Encrypted => std::option::Option::Some(1),
19790 Self::Decrypted => std::option::Option::Some(2),
19791 Self::UnknownValue(u) => u.0.value(),
19792 }
19793 }
19794
19795 pub fn name(&self) -> std::option::Option<&str> {
19800 match self {
19801 Self::Unknown => std::option::Option::Some("UNKNOWN"),
19802 Self::Encrypted => std::option::Option::Some("ENCRYPTED"),
19803 Self::Decrypted => std::option::Option::Some("DECRYPTED"),
19804 Self::UnknownValue(u) => u.0.name(),
19805 }
19806 }
19807 }
19808
19809 impl std::default::Default for State {
19810 fn default() -> Self {
19811 use std::convert::From;
19812 Self::from(0)
19813 }
19814 }
19815
19816 impl std::fmt::Display for State {
19817 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19818 wkt::internal::display_enum(f, self.name(), self.value())
19819 }
19820 }
19821
19822 impl std::convert::From<i32> for State {
19823 fn from(value: i32) -> Self {
19824 match value {
19825 0 => Self::Unknown,
19826 1 => Self::Encrypted,
19827 2 => Self::Decrypted,
19828 _ => Self::UnknownValue(state::UnknownValue(
19829 wkt::internal::UnknownEnumValue::Integer(value),
19830 )),
19831 }
19832 }
19833 }
19834
19835 impl std::convert::From<&str> for State {
19836 fn from(value: &str) -> Self {
19837 use std::string::ToString;
19838 match value {
19839 "UNKNOWN" => Self::Unknown,
19840 "ENCRYPTED" => Self::Encrypted,
19841 "DECRYPTED" => Self::Decrypted,
19842 _ => Self::UnknownValue(state::UnknownValue(
19843 wkt::internal::UnknownEnumValue::String(value.to_string()),
19844 )),
19845 }
19846 }
19847 }
19848
19849 impl serde::ser::Serialize for State {
19850 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19851 where
19852 S: serde::Serializer,
19853 {
19854 match self {
19855 Self::Unknown => serializer.serialize_i32(0),
19856 Self::Encrypted => serializer.serialize_i32(1),
19857 Self::Decrypted => serializer.serialize_i32(2),
19858 Self::UnknownValue(u) => u.0.serialize(serializer),
19859 }
19860 }
19861 }
19862
19863 impl<'de> serde::de::Deserialize<'de> for State {
19864 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19865 where
19866 D: serde::Deserializer<'de>,
19867 {
19868 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
19869 ".google.container.v1.DatabaseEncryption.State",
19870 ))
19871 }
19872 }
19873
19874 #[derive(Clone, Debug, PartialEq)]
19890 #[non_exhaustive]
19891 pub enum CurrentState {
19892 Unspecified,
19894 Encrypted,
19896 Decrypted,
19899 EncryptionPending,
19902 EncryptionError,
19905 DecryptionPending,
19907 DecryptionError,
19909 UnknownValue(current_state::UnknownValue),
19914 }
19915
19916 #[doc(hidden)]
19917 pub mod current_state {
19918 #[allow(unused_imports)]
19919 use super::*;
19920 #[derive(Clone, Debug, PartialEq)]
19921 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19922 }
19923
19924 impl CurrentState {
19925 pub fn value(&self) -> std::option::Option<i32> {
19930 match self {
19931 Self::Unspecified => std::option::Option::Some(0),
19932 Self::Encrypted => std::option::Option::Some(7),
19933 Self::Decrypted => std::option::Option::Some(2),
19934 Self::EncryptionPending => std::option::Option::Some(3),
19935 Self::EncryptionError => std::option::Option::Some(4),
19936 Self::DecryptionPending => std::option::Option::Some(5),
19937 Self::DecryptionError => std::option::Option::Some(6),
19938 Self::UnknownValue(u) => u.0.value(),
19939 }
19940 }
19941
19942 pub fn name(&self) -> std::option::Option<&str> {
19947 match self {
19948 Self::Unspecified => std::option::Option::Some("CURRENT_STATE_UNSPECIFIED"),
19949 Self::Encrypted => std::option::Option::Some("CURRENT_STATE_ENCRYPTED"),
19950 Self::Decrypted => std::option::Option::Some("CURRENT_STATE_DECRYPTED"),
19951 Self::EncryptionPending => {
19952 std::option::Option::Some("CURRENT_STATE_ENCRYPTION_PENDING")
19953 }
19954 Self::EncryptionError => {
19955 std::option::Option::Some("CURRENT_STATE_ENCRYPTION_ERROR")
19956 }
19957 Self::DecryptionPending => {
19958 std::option::Option::Some("CURRENT_STATE_DECRYPTION_PENDING")
19959 }
19960 Self::DecryptionError => {
19961 std::option::Option::Some("CURRENT_STATE_DECRYPTION_ERROR")
19962 }
19963 Self::UnknownValue(u) => u.0.name(),
19964 }
19965 }
19966 }
19967
19968 impl std::default::Default for CurrentState {
19969 fn default() -> Self {
19970 use std::convert::From;
19971 Self::from(0)
19972 }
19973 }
19974
19975 impl std::fmt::Display for CurrentState {
19976 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19977 wkt::internal::display_enum(f, self.name(), self.value())
19978 }
19979 }
19980
19981 impl std::convert::From<i32> for CurrentState {
19982 fn from(value: i32) -> Self {
19983 match value {
19984 0 => Self::Unspecified,
19985 2 => Self::Decrypted,
19986 3 => Self::EncryptionPending,
19987 4 => Self::EncryptionError,
19988 5 => Self::DecryptionPending,
19989 6 => Self::DecryptionError,
19990 7 => Self::Encrypted,
19991 _ => Self::UnknownValue(current_state::UnknownValue(
19992 wkt::internal::UnknownEnumValue::Integer(value),
19993 )),
19994 }
19995 }
19996 }
19997
19998 impl std::convert::From<&str> for CurrentState {
19999 fn from(value: &str) -> Self {
20000 use std::string::ToString;
20001 match value {
20002 "CURRENT_STATE_UNSPECIFIED" => Self::Unspecified,
20003 "CURRENT_STATE_ENCRYPTED" => Self::Encrypted,
20004 "CURRENT_STATE_DECRYPTED" => Self::Decrypted,
20005 "CURRENT_STATE_ENCRYPTION_PENDING" => Self::EncryptionPending,
20006 "CURRENT_STATE_ENCRYPTION_ERROR" => Self::EncryptionError,
20007 "CURRENT_STATE_DECRYPTION_PENDING" => Self::DecryptionPending,
20008 "CURRENT_STATE_DECRYPTION_ERROR" => Self::DecryptionError,
20009 _ => Self::UnknownValue(current_state::UnknownValue(
20010 wkt::internal::UnknownEnumValue::String(value.to_string()),
20011 )),
20012 }
20013 }
20014 }
20015
20016 impl serde::ser::Serialize for CurrentState {
20017 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20018 where
20019 S: serde::Serializer,
20020 {
20021 match self {
20022 Self::Unspecified => serializer.serialize_i32(0),
20023 Self::Encrypted => serializer.serialize_i32(7),
20024 Self::Decrypted => serializer.serialize_i32(2),
20025 Self::EncryptionPending => serializer.serialize_i32(3),
20026 Self::EncryptionError => serializer.serialize_i32(4),
20027 Self::DecryptionPending => serializer.serialize_i32(5),
20028 Self::DecryptionError => serializer.serialize_i32(6),
20029 Self::UnknownValue(u) => u.0.serialize(serializer),
20030 }
20031 }
20032 }
20033
20034 impl<'de> serde::de::Deserialize<'de> for CurrentState {
20035 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20036 where
20037 D: serde::Deserializer<'de>,
20038 {
20039 deserializer.deserialize_any(wkt::internal::EnumVisitor::<CurrentState>::new(
20040 ".google.container.v1.DatabaseEncryption.CurrentState",
20041 ))
20042 }
20043 }
20044}
20045
20046#[serde_with::serde_as]
20049#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20050#[serde(default, rename_all = "camelCase")]
20051#[non_exhaustive]
20052pub struct ListUsableSubnetworksRequest {
20053 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20056 pub parent: std::string::String,
20057
20058 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20063 pub filter: std::string::String,
20064
20065 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20070 pub page_size: i32,
20071
20072 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20075 pub page_token: std::string::String,
20076
20077 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20078 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20079}
20080
20081impl ListUsableSubnetworksRequest {
20082 pub fn new() -> Self {
20083 std::default::Default::default()
20084 }
20085
20086 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20088 self.parent = v.into();
20089 self
20090 }
20091
20092 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20094 self.filter = v.into();
20095 self
20096 }
20097
20098 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20100 self.page_size = v.into();
20101 self
20102 }
20103
20104 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20106 self.page_token = v.into();
20107 self
20108 }
20109}
20110
20111impl wkt::message::Message for ListUsableSubnetworksRequest {
20112 fn typename() -> &'static str {
20113 "type.googleapis.com/google.container.v1.ListUsableSubnetworksRequest"
20114 }
20115}
20116
20117#[serde_with::serde_as]
20120#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20121#[serde(default, rename_all = "camelCase")]
20122#[non_exhaustive]
20123pub struct ListUsableSubnetworksResponse {
20124 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
20126 pub subnetworks: std::vec::Vec<crate::model::UsableSubnetwork>,
20127
20128 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20133 pub next_page_token: std::string::String,
20134
20135 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20136 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20137}
20138
20139impl ListUsableSubnetworksResponse {
20140 pub fn new() -> Self {
20141 std::default::Default::default()
20142 }
20143
20144 pub fn set_subnetworks<T, V>(mut self, v: T) -> Self
20146 where
20147 T: std::iter::IntoIterator<Item = V>,
20148 V: std::convert::Into<crate::model::UsableSubnetwork>,
20149 {
20150 use std::iter::Iterator;
20151 self.subnetworks = v.into_iter().map(|i| i.into()).collect();
20152 self
20153 }
20154
20155 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20157 self.next_page_token = v.into();
20158 self
20159 }
20160}
20161
20162impl wkt::message::Message for ListUsableSubnetworksResponse {
20163 fn typename() -> &'static str {
20164 "type.googleapis.com/google.container.v1.ListUsableSubnetworksResponse"
20165 }
20166}
20167
20168#[doc(hidden)]
20169impl gax::paginator::internal::PageableResponse for ListUsableSubnetworksResponse {
20170 type PageItem = crate::model::UsableSubnetwork;
20171
20172 fn items(self) -> std::vec::Vec<Self::PageItem> {
20173 self.subnetworks
20174 }
20175
20176 fn next_page_token(&self) -> std::string::String {
20177 use std::clone::Clone;
20178 self.next_page_token.clone()
20179 }
20180}
20181
20182#[serde_with::serde_as]
20184#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20185#[serde(default, rename_all = "camelCase")]
20186#[non_exhaustive]
20187pub struct UsableSubnetworkSecondaryRange {
20188 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20191 pub range_name: std::string::String,
20192
20193 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20195 pub ip_cidr_range: std::string::String,
20196
20197 pub status: crate::model::usable_subnetwork_secondary_range::Status,
20199
20200 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20201 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20202}
20203
20204impl UsableSubnetworkSecondaryRange {
20205 pub fn new() -> Self {
20206 std::default::Default::default()
20207 }
20208
20209 pub fn set_range_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20211 self.range_name = v.into();
20212 self
20213 }
20214
20215 pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20217 self.ip_cidr_range = v.into();
20218 self
20219 }
20220
20221 pub fn set_status<
20223 T: std::convert::Into<crate::model::usable_subnetwork_secondary_range::Status>,
20224 >(
20225 mut self,
20226 v: T,
20227 ) -> Self {
20228 self.status = v.into();
20229 self
20230 }
20231}
20232
20233impl wkt::message::Message for UsableSubnetworkSecondaryRange {
20234 fn typename() -> &'static str {
20235 "type.googleapis.com/google.container.v1.UsableSubnetworkSecondaryRange"
20236 }
20237}
20238
20239pub mod usable_subnetwork_secondary_range {
20241 #[allow(unused_imports)]
20242 use super::*;
20243
20244 #[derive(Clone, Debug, PartialEq)]
20260 #[non_exhaustive]
20261 pub enum Status {
20262 Unknown,
20264 Unused,
20266 InUseService,
20270 InUseShareablePod,
20274 InUseManagedPod,
20277 UnknownValue(status::UnknownValue),
20282 }
20283
20284 #[doc(hidden)]
20285 pub mod status {
20286 #[allow(unused_imports)]
20287 use super::*;
20288 #[derive(Clone, Debug, PartialEq)]
20289 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20290 }
20291
20292 impl Status {
20293 pub fn value(&self) -> std::option::Option<i32> {
20298 match self {
20299 Self::Unknown => std::option::Option::Some(0),
20300 Self::Unused => std::option::Option::Some(1),
20301 Self::InUseService => std::option::Option::Some(2),
20302 Self::InUseShareablePod => std::option::Option::Some(3),
20303 Self::InUseManagedPod => std::option::Option::Some(4),
20304 Self::UnknownValue(u) => u.0.value(),
20305 }
20306 }
20307
20308 pub fn name(&self) -> std::option::Option<&str> {
20313 match self {
20314 Self::Unknown => std::option::Option::Some("UNKNOWN"),
20315 Self::Unused => std::option::Option::Some("UNUSED"),
20316 Self::InUseService => std::option::Option::Some("IN_USE_SERVICE"),
20317 Self::InUseShareablePod => std::option::Option::Some("IN_USE_SHAREABLE_POD"),
20318 Self::InUseManagedPod => std::option::Option::Some("IN_USE_MANAGED_POD"),
20319 Self::UnknownValue(u) => u.0.name(),
20320 }
20321 }
20322 }
20323
20324 impl std::default::Default for Status {
20325 fn default() -> Self {
20326 use std::convert::From;
20327 Self::from(0)
20328 }
20329 }
20330
20331 impl std::fmt::Display for Status {
20332 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20333 wkt::internal::display_enum(f, self.name(), self.value())
20334 }
20335 }
20336
20337 impl std::convert::From<i32> for Status {
20338 fn from(value: i32) -> Self {
20339 match value {
20340 0 => Self::Unknown,
20341 1 => Self::Unused,
20342 2 => Self::InUseService,
20343 3 => Self::InUseShareablePod,
20344 4 => Self::InUseManagedPod,
20345 _ => Self::UnknownValue(status::UnknownValue(
20346 wkt::internal::UnknownEnumValue::Integer(value),
20347 )),
20348 }
20349 }
20350 }
20351
20352 impl std::convert::From<&str> for Status {
20353 fn from(value: &str) -> Self {
20354 use std::string::ToString;
20355 match value {
20356 "UNKNOWN" => Self::Unknown,
20357 "UNUSED" => Self::Unused,
20358 "IN_USE_SERVICE" => Self::InUseService,
20359 "IN_USE_SHAREABLE_POD" => Self::InUseShareablePod,
20360 "IN_USE_MANAGED_POD" => Self::InUseManagedPod,
20361 _ => Self::UnknownValue(status::UnknownValue(
20362 wkt::internal::UnknownEnumValue::String(value.to_string()),
20363 )),
20364 }
20365 }
20366 }
20367
20368 impl serde::ser::Serialize for Status {
20369 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20370 where
20371 S: serde::Serializer,
20372 {
20373 match self {
20374 Self::Unknown => serializer.serialize_i32(0),
20375 Self::Unused => serializer.serialize_i32(1),
20376 Self::InUseService => serializer.serialize_i32(2),
20377 Self::InUseShareablePod => serializer.serialize_i32(3),
20378 Self::InUseManagedPod => serializer.serialize_i32(4),
20379 Self::UnknownValue(u) => u.0.serialize(serializer),
20380 }
20381 }
20382 }
20383
20384 impl<'de> serde::de::Deserialize<'de> for Status {
20385 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20386 where
20387 D: serde::Deserializer<'de>,
20388 {
20389 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
20390 ".google.container.v1.UsableSubnetworkSecondaryRange.Status",
20391 ))
20392 }
20393 }
20394}
20395
20396#[serde_with::serde_as]
20399#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20400#[serde(default, rename_all = "camelCase")]
20401#[non_exhaustive]
20402pub struct UsableSubnetwork {
20403 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20406 pub subnetwork: std::string::String,
20407
20408 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20411 pub network: std::string::String,
20412
20413 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20415 pub ip_cidr_range: std::string::String,
20416
20417 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
20419 pub secondary_ip_ranges: std::vec::Vec<crate::model::UsableSubnetworkSecondaryRange>,
20420
20421 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20426 pub status_message: std::string::String,
20427
20428 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20429 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20430}
20431
20432impl UsableSubnetwork {
20433 pub fn new() -> Self {
20434 std::default::Default::default()
20435 }
20436
20437 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20439 self.subnetwork = v.into();
20440 self
20441 }
20442
20443 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20445 self.network = v.into();
20446 self
20447 }
20448
20449 pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20451 self.ip_cidr_range = v.into();
20452 self
20453 }
20454
20455 pub fn set_secondary_ip_ranges<T, V>(mut self, v: T) -> Self
20457 where
20458 T: std::iter::IntoIterator<Item = V>,
20459 V: std::convert::Into<crate::model::UsableSubnetworkSecondaryRange>,
20460 {
20461 use std::iter::Iterator;
20462 self.secondary_ip_ranges = v.into_iter().map(|i| i.into()).collect();
20463 self
20464 }
20465
20466 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20468 self.status_message = v.into();
20469 self
20470 }
20471}
20472
20473impl wkt::message::Message for UsableSubnetwork {
20474 fn typename() -> &'static str {
20475 "type.googleapis.com/google.container.v1.UsableSubnetwork"
20476 }
20477}
20478
20479#[serde_with::serde_as]
20481#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20482#[serde(default, rename_all = "camelCase")]
20483#[non_exhaustive]
20484pub struct ResourceUsageExportConfig {
20485 #[serde(skip_serializing_if = "std::option::Option::is_none")]
20487 pub bigquery_destination:
20488 std::option::Option<crate::model::resource_usage_export_config::BigQueryDestination>,
20489
20490 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20493 pub enable_network_egress_metering: bool,
20494
20495 #[serde(skip_serializing_if = "std::option::Option::is_none")]
20497 pub consumption_metering_config:
20498 std::option::Option<crate::model::resource_usage_export_config::ConsumptionMeteringConfig>,
20499
20500 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20501 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20502}
20503
20504impl ResourceUsageExportConfig {
20505 pub fn new() -> Self {
20506 std::default::Default::default()
20507 }
20508
20509 pub fn set_bigquery_destination<
20511 T: std::convert::Into<
20512 std::option::Option<
20513 crate::model::resource_usage_export_config::BigQueryDestination,
20514 >,
20515 >,
20516 >(
20517 mut self,
20518 v: T,
20519 ) -> Self {
20520 self.bigquery_destination = v.into();
20521 self
20522 }
20523
20524 pub fn set_enable_network_egress_metering<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20526 self.enable_network_egress_metering = v.into();
20527 self
20528 }
20529
20530 pub fn set_consumption_metering_config<
20532 T: std::convert::Into<
20533 std::option::Option<
20534 crate::model::resource_usage_export_config::ConsumptionMeteringConfig,
20535 >,
20536 >,
20537 >(
20538 mut self,
20539 v: T,
20540 ) -> Self {
20541 self.consumption_metering_config = v.into();
20542 self
20543 }
20544}
20545
20546impl wkt::message::Message for ResourceUsageExportConfig {
20547 fn typename() -> &'static str {
20548 "type.googleapis.com/google.container.v1.ResourceUsageExportConfig"
20549 }
20550}
20551
20552pub mod resource_usage_export_config {
20554 #[allow(unused_imports)]
20555 use super::*;
20556
20557 #[serde_with::serde_as]
20559 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20560 #[serde(default, rename_all = "camelCase")]
20561 #[non_exhaustive]
20562 pub struct BigQueryDestination {
20563 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20565 pub dataset_id: std::string::String,
20566
20567 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20568 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20569 }
20570
20571 impl BigQueryDestination {
20572 pub fn new() -> Self {
20573 std::default::Default::default()
20574 }
20575
20576 pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20578 self.dataset_id = v.into();
20579 self
20580 }
20581 }
20582
20583 impl wkt::message::Message for BigQueryDestination {
20584 fn typename() -> &'static str {
20585 "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.BigQueryDestination"
20586 }
20587 }
20588
20589 #[serde_with::serde_as]
20591 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20592 #[serde(default, rename_all = "camelCase")]
20593 #[non_exhaustive]
20594 pub struct ConsumptionMeteringConfig {
20595 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20599 pub enabled: bool,
20600
20601 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20602 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20603 }
20604
20605 impl ConsumptionMeteringConfig {
20606 pub fn new() -> Self {
20607 std::default::Default::default()
20608 }
20609
20610 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20612 self.enabled = v.into();
20613 self
20614 }
20615 }
20616
20617 impl wkt::message::Message for ConsumptionMeteringConfig {
20618 fn typename() -> &'static str {
20619 "type.googleapis.com/google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig"
20620 }
20621 }
20622}
20623
20624#[serde_with::serde_as]
20628#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20629#[serde(default, rename_all = "camelCase")]
20630#[non_exhaustive]
20631pub struct VerticalPodAutoscaling {
20632 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20634 pub enabled: bool,
20635
20636 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20637 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20638}
20639
20640impl VerticalPodAutoscaling {
20641 pub fn new() -> Self {
20642 std::default::Default::default()
20643 }
20644
20645 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20647 self.enabled = v.into();
20648 self
20649 }
20650}
20651
20652impl wkt::message::Message for VerticalPodAutoscaling {
20653 fn typename() -> &'static str {
20654 "type.googleapis.com/google.container.v1.VerticalPodAutoscaling"
20655 }
20656}
20657
20658#[serde_with::serde_as]
20661#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20662#[serde(default, rename_all = "camelCase")]
20663#[non_exhaustive]
20664pub struct DefaultSnatStatus {
20665 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20667 pub disabled: bool,
20668
20669 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20670 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20671}
20672
20673impl DefaultSnatStatus {
20674 pub fn new() -> Self {
20675 std::default::Default::default()
20676 }
20677
20678 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20680 self.disabled = v.into();
20681 self
20682 }
20683}
20684
20685impl wkt::message::Message for DefaultSnatStatus {
20686 fn typename() -> &'static str {
20687 "type.googleapis.com/google.container.v1.DefaultSnatStatus"
20688 }
20689}
20690
20691#[serde_with::serde_as]
20693#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20694#[serde(default, rename_all = "camelCase")]
20695#[non_exhaustive]
20696pub struct ShieldedNodes {
20697 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20699 pub enabled: bool,
20700
20701 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20702 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20703}
20704
20705impl ShieldedNodes {
20706 pub fn new() -> Self {
20707 std::default::Default::default()
20708 }
20709
20710 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20712 self.enabled = v.into();
20713 self
20714 }
20715}
20716
20717impl wkt::message::Message for ShieldedNodes {
20718 fn typename() -> &'static str {
20719 "type.googleapis.com/google.container.v1.ShieldedNodes"
20720 }
20721}
20722
20723#[serde_with::serde_as]
20725#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20726#[serde(default, rename_all = "camelCase")]
20727#[non_exhaustive]
20728pub struct VirtualNIC {
20729 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20731 pub enabled: bool,
20732
20733 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20734 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20735}
20736
20737impl VirtualNIC {
20738 pub fn new() -> Self {
20739 std::default::Default::default()
20740 }
20741
20742 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20744 self.enabled = v.into();
20745 self
20746 }
20747}
20748
20749impl wkt::message::Message for VirtualNIC {
20750 fn typename() -> &'static str {
20751 "type.googleapis.com/google.container.v1.VirtualNIC"
20752 }
20753}
20754
20755#[serde_with::serde_as]
20757#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20758#[serde(default, rename_all = "camelCase")]
20759#[non_exhaustive]
20760pub struct FastSocket {
20761 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20763 pub enabled: bool,
20764
20765 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20766 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20767}
20768
20769impl FastSocket {
20770 pub fn new() -> Self {
20771 std::default::Default::default()
20772 }
20773
20774 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20776 self.enabled = v.into();
20777 self
20778 }
20779}
20780
20781impl wkt::message::Message for FastSocket {
20782 fn typename() -> &'static str {
20783 "type.googleapis.com/google.container.v1.FastSocket"
20784 }
20785}
20786
20787#[serde_with::serde_as]
20789#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20790#[serde(default, rename_all = "camelCase")]
20791#[non_exhaustive]
20792pub struct NotificationConfig {
20793 #[serde(skip_serializing_if = "std::option::Option::is_none")]
20795 pub pubsub: std::option::Option<crate::model::notification_config::PubSub>,
20796
20797 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20798 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20799}
20800
20801impl NotificationConfig {
20802 pub fn new() -> Self {
20803 std::default::Default::default()
20804 }
20805
20806 pub fn set_pubsub<
20808 T: std::convert::Into<std::option::Option<crate::model::notification_config::PubSub>>,
20809 >(
20810 mut self,
20811 v: T,
20812 ) -> Self {
20813 self.pubsub = v.into();
20814 self
20815 }
20816}
20817
20818impl wkt::message::Message for NotificationConfig {
20819 fn typename() -> &'static str {
20820 "type.googleapis.com/google.container.v1.NotificationConfig"
20821 }
20822}
20823
20824pub mod notification_config {
20826 #[allow(unused_imports)]
20827 use super::*;
20828
20829 #[serde_with::serde_as]
20831 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20832 #[serde(default, rename_all = "camelCase")]
20833 #[non_exhaustive]
20834 pub struct PubSub {
20835 #[serde(skip_serializing_if = "wkt::internal::is_default")]
20837 pub enabled: bool,
20838
20839 #[serde(skip_serializing_if = "std::string::String::is_empty")]
20842 pub topic: std::string::String,
20843
20844 #[serde(skip_serializing_if = "std::option::Option::is_none")]
20848 pub filter: std::option::Option<crate::model::notification_config::Filter>,
20849
20850 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20851 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20852 }
20853
20854 impl PubSub {
20855 pub fn new() -> Self {
20856 std::default::Default::default()
20857 }
20858
20859 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20861 self.enabled = v.into();
20862 self
20863 }
20864
20865 pub fn set_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20867 self.topic = v.into();
20868 self
20869 }
20870
20871 pub fn set_filter<
20873 T: std::convert::Into<std::option::Option<crate::model::notification_config::Filter>>,
20874 >(
20875 mut self,
20876 v: T,
20877 ) -> Self {
20878 self.filter = v.into();
20879 self
20880 }
20881 }
20882
20883 impl wkt::message::Message for PubSub {
20884 fn typename() -> &'static str {
20885 "type.googleapis.com/google.container.v1.NotificationConfig.PubSub"
20886 }
20887 }
20888
20889 #[serde_with::serde_as]
20894 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
20895 #[serde(default, rename_all = "camelCase")]
20896 #[non_exhaustive]
20897 pub struct Filter {
20898 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
20900 pub event_type: std::vec::Vec<crate::model::notification_config::EventType>,
20901
20902 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20903 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20904 }
20905
20906 impl Filter {
20907 pub fn new() -> Self {
20908 std::default::Default::default()
20909 }
20910
20911 pub fn set_event_type<T, V>(mut self, v: T) -> Self
20913 where
20914 T: std::iter::IntoIterator<Item = V>,
20915 V: std::convert::Into<crate::model::notification_config::EventType>,
20916 {
20917 use std::iter::Iterator;
20918 self.event_type = v.into_iter().map(|i| i.into()).collect();
20919 self
20920 }
20921 }
20922
20923 impl wkt::message::Message for Filter {
20924 fn typename() -> &'static str {
20925 "type.googleapis.com/google.container.v1.NotificationConfig.Filter"
20926 }
20927 }
20928
20929 #[derive(Clone, Debug, PartialEq)]
20946 #[non_exhaustive]
20947 pub enum EventType {
20948 Unspecified,
20950 UpgradeAvailableEvent,
20952 UpgradeEvent,
20954 SecurityBulletinEvent,
20956 UnknownValue(event_type::UnknownValue),
20961 }
20962
20963 #[doc(hidden)]
20964 pub mod event_type {
20965 #[allow(unused_imports)]
20966 use super::*;
20967 #[derive(Clone, Debug, PartialEq)]
20968 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20969 }
20970
20971 impl EventType {
20972 pub fn value(&self) -> std::option::Option<i32> {
20977 match self {
20978 Self::Unspecified => std::option::Option::Some(0),
20979 Self::UpgradeAvailableEvent => std::option::Option::Some(1),
20980 Self::UpgradeEvent => std::option::Option::Some(2),
20981 Self::SecurityBulletinEvent => std::option::Option::Some(3),
20982 Self::UnknownValue(u) => u.0.value(),
20983 }
20984 }
20985
20986 pub fn name(&self) -> std::option::Option<&str> {
20991 match self {
20992 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
20993 Self::UpgradeAvailableEvent => std::option::Option::Some("UPGRADE_AVAILABLE_EVENT"),
20994 Self::UpgradeEvent => std::option::Option::Some("UPGRADE_EVENT"),
20995 Self::SecurityBulletinEvent => std::option::Option::Some("SECURITY_BULLETIN_EVENT"),
20996 Self::UnknownValue(u) => u.0.name(),
20997 }
20998 }
20999 }
21000
21001 impl std::default::Default for EventType {
21002 fn default() -> Self {
21003 use std::convert::From;
21004 Self::from(0)
21005 }
21006 }
21007
21008 impl std::fmt::Display for EventType {
21009 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21010 wkt::internal::display_enum(f, self.name(), self.value())
21011 }
21012 }
21013
21014 impl std::convert::From<i32> for EventType {
21015 fn from(value: i32) -> Self {
21016 match value {
21017 0 => Self::Unspecified,
21018 1 => Self::UpgradeAvailableEvent,
21019 2 => Self::UpgradeEvent,
21020 3 => Self::SecurityBulletinEvent,
21021 _ => Self::UnknownValue(event_type::UnknownValue(
21022 wkt::internal::UnknownEnumValue::Integer(value),
21023 )),
21024 }
21025 }
21026 }
21027
21028 impl std::convert::From<&str> for EventType {
21029 fn from(value: &str) -> Self {
21030 use std::string::ToString;
21031 match value {
21032 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
21033 "UPGRADE_AVAILABLE_EVENT" => Self::UpgradeAvailableEvent,
21034 "UPGRADE_EVENT" => Self::UpgradeEvent,
21035 "SECURITY_BULLETIN_EVENT" => Self::SecurityBulletinEvent,
21036 _ => Self::UnknownValue(event_type::UnknownValue(
21037 wkt::internal::UnknownEnumValue::String(value.to_string()),
21038 )),
21039 }
21040 }
21041 }
21042
21043 impl serde::ser::Serialize for EventType {
21044 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21045 where
21046 S: serde::Serializer,
21047 {
21048 match self {
21049 Self::Unspecified => serializer.serialize_i32(0),
21050 Self::UpgradeAvailableEvent => serializer.serialize_i32(1),
21051 Self::UpgradeEvent => serializer.serialize_i32(2),
21052 Self::SecurityBulletinEvent => serializer.serialize_i32(3),
21053 Self::UnknownValue(u) => u.0.serialize(serializer),
21054 }
21055 }
21056 }
21057
21058 impl<'de> serde::de::Deserialize<'de> for EventType {
21059 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21060 where
21061 D: serde::Deserializer<'de>,
21062 {
21063 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
21064 ".google.container.v1.NotificationConfig.EventType",
21065 ))
21066 }
21067 }
21068}
21069
21070#[serde_with::serde_as]
21073#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21074#[serde(default, rename_all = "camelCase")]
21075#[non_exhaustive]
21076pub struct ConfidentialNodes {
21077 #[serde(skip_serializing_if = "wkt::internal::is_default")]
21079 pub enabled: bool,
21080
21081 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21082 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21083}
21084
21085impl ConfidentialNodes {
21086 pub fn new() -> Self {
21087 std::default::Default::default()
21088 }
21089
21090 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21092 self.enabled = v.into();
21093 self
21094 }
21095}
21096
21097impl wkt::message::Message for ConfidentialNodes {
21098 fn typename() -> &'static str {
21099 "type.googleapis.com/google.container.v1.ConfidentialNodes"
21100 }
21101}
21102
21103#[serde_with::serde_as]
21106#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21107#[serde(default, rename_all = "camelCase")]
21108#[non_exhaustive]
21109pub struct UpgradeEvent {
21110 pub resource_type: crate::model::UpgradeResourceType,
21112
21113 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21115 pub operation: std::string::String,
21116
21117 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21119 pub operation_start_time: std::option::Option<wkt::Timestamp>,
21120
21121 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21123 pub current_version: std::string::String,
21124
21125 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21127 pub target_version: std::string::String,
21128
21129 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21132 pub resource: std::string::String,
21133
21134 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21135 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21136}
21137
21138impl UpgradeEvent {
21139 pub fn new() -> Self {
21140 std::default::Default::default()
21141 }
21142
21143 pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
21145 mut self,
21146 v: T,
21147 ) -> Self {
21148 self.resource_type = v.into();
21149 self
21150 }
21151
21152 pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21154 self.operation = v.into();
21155 self
21156 }
21157
21158 pub fn set_operation_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
21160 mut self,
21161 v: T,
21162 ) -> Self {
21163 self.operation_start_time = v.into();
21164 self
21165 }
21166
21167 pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21169 self.current_version = v.into();
21170 self
21171 }
21172
21173 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21175 self.target_version = v.into();
21176 self
21177 }
21178
21179 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21181 self.resource = v.into();
21182 self
21183 }
21184}
21185
21186impl wkt::message::Message for UpgradeEvent {
21187 fn typename() -> &'static str {
21188 "type.googleapis.com/google.container.v1.UpgradeEvent"
21189 }
21190}
21191
21192#[serde_with::serde_as]
21195#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21196#[serde(default, rename_all = "camelCase")]
21197#[non_exhaustive]
21198pub struct UpgradeInfoEvent {
21199 pub resource_type: crate::model::UpgradeResourceType,
21201
21202 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21204 pub operation: std::string::String,
21205
21206 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21208 pub start_time: std::option::Option<wkt::Timestamp>,
21209
21210 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21212 pub end_time: std::option::Option<wkt::Timestamp>,
21213
21214 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21216 pub current_version: std::string::String,
21217
21218 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21220 pub target_version: std::string::String,
21221
21222 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21225 pub resource: std::string::String,
21226
21227 pub state: crate::model::upgrade_info_event::State,
21229
21230 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21232 pub description: std::string::String,
21233
21234 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21235 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21236}
21237
21238impl UpgradeInfoEvent {
21239 pub fn new() -> Self {
21240 std::default::Default::default()
21241 }
21242
21243 pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
21245 mut self,
21246 v: T,
21247 ) -> Self {
21248 self.resource_type = v.into();
21249 self
21250 }
21251
21252 pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21254 self.operation = v.into();
21255 self
21256 }
21257
21258 pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
21260 mut self,
21261 v: T,
21262 ) -> Self {
21263 self.start_time = v.into();
21264 self
21265 }
21266
21267 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
21269 mut self,
21270 v: T,
21271 ) -> Self {
21272 self.end_time = v.into();
21273 self
21274 }
21275
21276 pub fn set_current_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21278 self.current_version = v.into();
21279 self
21280 }
21281
21282 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21284 self.target_version = v.into();
21285 self
21286 }
21287
21288 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21290 self.resource = v.into();
21291 self
21292 }
21293
21294 pub fn set_state<T: std::convert::Into<crate::model::upgrade_info_event::State>>(
21296 mut self,
21297 v: T,
21298 ) -> Self {
21299 self.state = v.into();
21300 self
21301 }
21302
21303 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21305 self.description = v.into();
21306 self
21307 }
21308}
21309
21310impl wkt::message::Message for UpgradeInfoEvent {
21311 fn typename() -> &'static str {
21312 "type.googleapis.com/google.container.v1.UpgradeInfoEvent"
21313 }
21314}
21315
21316pub mod upgrade_info_event {
21318 #[allow(unused_imports)]
21319 use super::*;
21320
21321 #[derive(Clone, Debug, PartialEq)]
21337 #[non_exhaustive]
21338 pub enum State {
21339 Unspecified,
21341 Started,
21343 Succeeded,
21345 Failed,
21347 Canceled,
21349 UnknownValue(state::UnknownValue),
21354 }
21355
21356 #[doc(hidden)]
21357 pub mod state {
21358 #[allow(unused_imports)]
21359 use super::*;
21360 #[derive(Clone, Debug, PartialEq)]
21361 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21362 }
21363
21364 impl State {
21365 pub fn value(&self) -> std::option::Option<i32> {
21370 match self {
21371 Self::Unspecified => std::option::Option::Some(0),
21372 Self::Started => std::option::Option::Some(3),
21373 Self::Succeeded => std::option::Option::Some(4),
21374 Self::Failed => std::option::Option::Some(5),
21375 Self::Canceled => std::option::Option::Some(6),
21376 Self::UnknownValue(u) => u.0.value(),
21377 }
21378 }
21379
21380 pub fn name(&self) -> std::option::Option<&str> {
21385 match self {
21386 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
21387 Self::Started => std::option::Option::Some("STARTED"),
21388 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
21389 Self::Failed => std::option::Option::Some("FAILED"),
21390 Self::Canceled => std::option::Option::Some("CANCELED"),
21391 Self::UnknownValue(u) => u.0.name(),
21392 }
21393 }
21394 }
21395
21396 impl std::default::Default for State {
21397 fn default() -> Self {
21398 use std::convert::From;
21399 Self::from(0)
21400 }
21401 }
21402
21403 impl std::fmt::Display for State {
21404 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21405 wkt::internal::display_enum(f, self.name(), self.value())
21406 }
21407 }
21408
21409 impl std::convert::From<i32> for State {
21410 fn from(value: i32) -> Self {
21411 match value {
21412 0 => Self::Unspecified,
21413 3 => Self::Started,
21414 4 => Self::Succeeded,
21415 5 => Self::Failed,
21416 6 => Self::Canceled,
21417 _ => Self::UnknownValue(state::UnknownValue(
21418 wkt::internal::UnknownEnumValue::Integer(value),
21419 )),
21420 }
21421 }
21422 }
21423
21424 impl std::convert::From<&str> for State {
21425 fn from(value: &str) -> Self {
21426 use std::string::ToString;
21427 match value {
21428 "STATE_UNSPECIFIED" => Self::Unspecified,
21429 "STARTED" => Self::Started,
21430 "SUCCEEDED" => Self::Succeeded,
21431 "FAILED" => Self::Failed,
21432 "CANCELED" => Self::Canceled,
21433 _ => Self::UnknownValue(state::UnknownValue(
21434 wkt::internal::UnknownEnumValue::String(value.to_string()),
21435 )),
21436 }
21437 }
21438 }
21439
21440 impl serde::ser::Serialize for State {
21441 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21442 where
21443 S: serde::Serializer,
21444 {
21445 match self {
21446 Self::Unspecified => serializer.serialize_i32(0),
21447 Self::Started => serializer.serialize_i32(3),
21448 Self::Succeeded => serializer.serialize_i32(4),
21449 Self::Failed => serializer.serialize_i32(5),
21450 Self::Canceled => serializer.serialize_i32(6),
21451 Self::UnknownValue(u) => u.0.serialize(serializer),
21452 }
21453 }
21454 }
21455
21456 impl<'de> serde::de::Deserialize<'de> for State {
21457 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21458 where
21459 D: serde::Deserializer<'de>,
21460 {
21461 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
21462 ".google.container.v1.UpgradeInfoEvent.State",
21463 ))
21464 }
21465 }
21466}
21467
21468#[serde_with::serde_as]
21471#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21472#[serde(default, rename_all = "camelCase")]
21473#[non_exhaustive]
21474pub struct UpgradeAvailableEvent {
21475 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21477 pub version: std::string::String,
21478
21479 pub resource_type: crate::model::UpgradeResourceType,
21481
21482 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21485 pub release_channel: std::option::Option<crate::model::ReleaseChannel>,
21486
21487 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21490 pub resource: std::string::String,
21491
21492 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21493 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21494}
21495
21496impl UpgradeAvailableEvent {
21497 pub fn new() -> Self {
21498 std::default::Default::default()
21499 }
21500
21501 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21503 self.version = v.into();
21504 self
21505 }
21506
21507 pub fn set_resource_type<T: std::convert::Into<crate::model::UpgradeResourceType>>(
21509 mut self,
21510 v: T,
21511 ) -> Self {
21512 self.resource_type = v.into();
21513 self
21514 }
21515
21516 pub fn set_release_channel<
21518 T: std::convert::Into<std::option::Option<crate::model::ReleaseChannel>>,
21519 >(
21520 mut self,
21521 v: T,
21522 ) -> Self {
21523 self.release_channel = v.into();
21524 self
21525 }
21526
21527 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21529 self.resource = v.into();
21530 self
21531 }
21532}
21533
21534impl wkt::message::Message for UpgradeAvailableEvent {
21535 fn typename() -> &'static str {
21536 "type.googleapis.com/google.container.v1.UpgradeAvailableEvent"
21537 }
21538}
21539
21540#[serde_with::serde_as]
21543#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21544#[serde(default, rename_all = "camelCase")]
21545#[non_exhaustive]
21546pub struct SecurityBulletinEvent {
21547 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21551 pub resource_type_affected: std::string::String,
21552
21553 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21555 pub bulletin_id: std::string::String,
21556
21557 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
21559 pub cve_ids: std::vec::Vec<std::string::String>,
21560
21561 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21563 pub severity: std::string::String,
21564
21565 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21567 pub bulletin_uri: std::string::String,
21568
21569 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21572 pub brief_description: std::string::String,
21573
21574 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
21576 pub affected_supported_minors: std::vec::Vec<std::string::String>,
21577
21578 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
21580 pub patched_versions: std::vec::Vec<std::string::String>,
21581
21582 #[serde(skip_serializing_if = "std::string::String::is_empty")]
21588 pub suggested_upgrade_target: std::string::String,
21589
21590 #[serde(skip_serializing_if = "wkt::internal::is_default")]
21593 pub manual_steps_required: bool,
21594
21595 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21596 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21597}
21598
21599impl SecurityBulletinEvent {
21600 pub fn new() -> Self {
21601 std::default::Default::default()
21602 }
21603
21604 pub fn set_resource_type_affected<T: std::convert::Into<std::string::String>>(
21606 mut self,
21607 v: T,
21608 ) -> Self {
21609 self.resource_type_affected = v.into();
21610 self
21611 }
21612
21613 pub fn set_bulletin_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21615 self.bulletin_id = v.into();
21616 self
21617 }
21618
21619 pub fn set_cve_ids<T, V>(mut self, v: T) -> Self
21621 where
21622 T: std::iter::IntoIterator<Item = V>,
21623 V: std::convert::Into<std::string::String>,
21624 {
21625 use std::iter::Iterator;
21626 self.cve_ids = v.into_iter().map(|i| i.into()).collect();
21627 self
21628 }
21629
21630 pub fn set_severity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21632 self.severity = v.into();
21633 self
21634 }
21635
21636 pub fn set_bulletin_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21638 self.bulletin_uri = v.into();
21639 self
21640 }
21641
21642 pub fn set_brief_description<T: std::convert::Into<std::string::String>>(
21644 mut self,
21645 v: T,
21646 ) -> Self {
21647 self.brief_description = v.into();
21648 self
21649 }
21650
21651 pub fn set_affected_supported_minors<T, V>(mut self, v: T) -> Self
21653 where
21654 T: std::iter::IntoIterator<Item = V>,
21655 V: std::convert::Into<std::string::String>,
21656 {
21657 use std::iter::Iterator;
21658 self.affected_supported_minors = v.into_iter().map(|i| i.into()).collect();
21659 self
21660 }
21661
21662 pub fn set_patched_versions<T, V>(mut self, v: T) -> Self
21664 where
21665 T: std::iter::IntoIterator<Item = V>,
21666 V: std::convert::Into<std::string::String>,
21667 {
21668 use std::iter::Iterator;
21669 self.patched_versions = v.into_iter().map(|i| i.into()).collect();
21670 self
21671 }
21672
21673 pub fn set_suggested_upgrade_target<T: std::convert::Into<std::string::String>>(
21675 mut self,
21676 v: T,
21677 ) -> Self {
21678 self.suggested_upgrade_target = v.into();
21679 self
21680 }
21681
21682 pub fn set_manual_steps_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21684 self.manual_steps_required = v.into();
21685 self
21686 }
21687}
21688
21689impl wkt::message::Message for SecurityBulletinEvent {
21690 fn typename() -> &'static str {
21691 "type.googleapis.com/google.container.v1.SecurityBulletinEvent"
21692 }
21693}
21694
21695#[serde_with::serde_as]
21697#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21698#[serde(default, rename_all = "camelCase")]
21699#[non_exhaustive]
21700pub struct Autopilot {
21701 #[serde(skip_serializing_if = "wkt::internal::is_default")]
21703 pub enabled: bool,
21704
21705 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21707 pub workload_policy_config: std::option::Option<crate::model::WorkloadPolicyConfig>,
21708
21709 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21710 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21711}
21712
21713impl Autopilot {
21714 pub fn new() -> Self {
21715 std::default::Default::default()
21716 }
21717
21718 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21720 self.enabled = v.into();
21721 self
21722 }
21723
21724 pub fn set_workload_policy_config<
21726 T: std::convert::Into<std::option::Option<crate::model::WorkloadPolicyConfig>>,
21727 >(
21728 mut self,
21729 v: T,
21730 ) -> Self {
21731 self.workload_policy_config = v.into();
21732 self
21733 }
21734}
21735
21736impl wkt::message::Message for Autopilot {
21737 fn typename() -> &'static str {
21738 "type.googleapis.com/google.container.v1.Autopilot"
21739 }
21740}
21741
21742#[serde_with::serde_as]
21745#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21746#[serde(default, rename_all = "camelCase")]
21747#[non_exhaustive]
21748pub struct WorkloadPolicyConfig {
21749 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21751 pub allow_net_admin: std::option::Option<bool>,
21752
21753 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21754 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21755}
21756
21757impl WorkloadPolicyConfig {
21758 pub fn new() -> Self {
21759 std::default::Default::default()
21760 }
21761
21762 pub fn set_allow_net_admin<T: std::convert::Into<std::option::Option<bool>>>(
21764 mut self,
21765 v: T,
21766 ) -> Self {
21767 self.allow_net_admin = v.into();
21768 self
21769 }
21770}
21771
21772impl wkt::message::Message for WorkloadPolicyConfig {
21773 fn typename() -> &'static str {
21774 "type.googleapis.com/google.container.v1.WorkloadPolicyConfig"
21775 }
21776}
21777
21778#[serde_with::serde_as]
21780#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21781#[serde(default, rename_all = "camelCase")]
21782#[non_exhaustive]
21783pub struct LoggingConfig {
21784 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21786 pub component_config: std::option::Option<crate::model::LoggingComponentConfig>,
21787
21788 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21789 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21790}
21791
21792impl LoggingConfig {
21793 pub fn new() -> Self {
21794 std::default::Default::default()
21795 }
21796
21797 pub fn set_component_config<
21799 T: std::convert::Into<std::option::Option<crate::model::LoggingComponentConfig>>,
21800 >(
21801 mut self,
21802 v: T,
21803 ) -> Self {
21804 self.component_config = v.into();
21805 self
21806 }
21807}
21808
21809impl wkt::message::Message for LoggingConfig {
21810 fn typename() -> &'static str {
21811 "type.googleapis.com/google.container.v1.LoggingConfig"
21812 }
21813}
21814
21815#[serde_with::serde_as]
21817#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
21818#[serde(default, rename_all = "camelCase")]
21819#[non_exhaustive]
21820pub struct LoggingComponentConfig {
21821 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
21823 pub enable_components: std::vec::Vec<crate::model::logging_component_config::Component>,
21824
21825 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
21826 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21827}
21828
21829impl LoggingComponentConfig {
21830 pub fn new() -> Self {
21831 std::default::Default::default()
21832 }
21833
21834 pub fn set_enable_components<T, V>(mut self, v: T) -> Self
21836 where
21837 T: std::iter::IntoIterator<Item = V>,
21838 V: std::convert::Into<crate::model::logging_component_config::Component>,
21839 {
21840 use std::iter::Iterator;
21841 self.enable_components = v.into_iter().map(|i| i.into()).collect();
21842 self
21843 }
21844}
21845
21846impl wkt::message::Message for LoggingComponentConfig {
21847 fn typename() -> &'static str {
21848 "type.googleapis.com/google.container.v1.LoggingComponentConfig"
21849 }
21850}
21851
21852pub mod logging_component_config {
21854 #[allow(unused_imports)]
21855 use super::*;
21856
21857 #[derive(Clone, Debug, PartialEq)]
21873 #[non_exhaustive]
21874 pub enum Component {
21875 Unspecified,
21877 SystemComponents,
21879 Workloads,
21881 Apiserver,
21883 Scheduler,
21885 ControllerManager,
21887 KcpSshd,
21889 KcpConnection,
21891 UnknownValue(component::UnknownValue),
21896 }
21897
21898 #[doc(hidden)]
21899 pub mod component {
21900 #[allow(unused_imports)]
21901 use super::*;
21902 #[derive(Clone, Debug, PartialEq)]
21903 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21904 }
21905
21906 impl Component {
21907 pub fn value(&self) -> std::option::Option<i32> {
21912 match self {
21913 Self::Unspecified => std::option::Option::Some(0),
21914 Self::SystemComponents => std::option::Option::Some(1),
21915 Self::Workloads => std::option::Option::Some(2),
21916 Self::Apiserver => std::option::Option::Some(3),
21917 Self::Scheduler => std::option::Option::Some(4),
21918 Self::ControllerManager => std::option::Option::Some(5),
21919 Self::KcpSshd => std::option::Option::Some(7),
21920 Self::KcpConnection => std::option::Option::Some(8),
21921 Self::UnknownValue(u) => u.0.value(),
21922 }
21923 }
21924
21925 pub fn name(&self) -> std::option::Option<&str> {
21930 match self {
21931 Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
21932 Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
21933 Self::Workloads => std::option::Option::Some("WORKLOADS"),
21934 Self::Apiserver => std::option::Option::Some("APISERVER"),
21935 Self::Scheduler => std::option::Option::Some("SCHEDULER"),
21936 Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
21937 Self::KcpSshd => std::option::Option::Some("KCP_SSHD"),
21938 Self::KcpConnection => std::option::Option::Some("KCP_CONNECTION"),
21939 Self::UnknownValue(u) => u.0.name(),
21940 }
21941 }
21942 }
21943
21944 impl std::default::Default for Component {
21945 fn default() -> Self {
21946 use std::convert::From;
21947 Self::from(0)
21948 }
21949 }
21950
21951 impl std::fmt::Display for Component {
21952 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21953 wkt::internal::display_enum(f, self.name(), self.value())
21954 }
21955 }
21956
21957 impl std::convert::From<i32> for Component {
21958 fn from(value: i32) -> Self {
21959 match value {
21960 0 => Self::Unspecified,
21961 1 => Self::SystemComponents,
21962 2 => Self::Workloads,
21963 3 => Self::Apiserver,
21964 4 => Self::Scheduler,
21965 5 => Self::ControllerManager,
21966 7 => Self::KcpSshd,
21967 8 => Self::KcpConnection,
21968 _ => Self::UnknownValue(component::UnknownValue(
21969 wkt::internal::UnknownEnumValue::Integer(value),
21970 )),
21971 }
21972 }
21973 }
21974
21975 impl std::convert::From<&str> for Component {
21976 fn from(value: &str) -> Self {
21977 use std::string::ToString;
21978 match value {
21979 "COMPONENT_UNSPECIFIED" => Self::Unspecified,
21980 "SYSTEM_COMPONENTS" => Self::SystemComponents,
21981 "WORKLOADS" => Self::Workloads,
21982 "APISERVER" => Self::Apiserver,
21983 "SCHEDULER" => Self::Scheduler,
21984 "CONTROLLER_MANAGER" => Self::ControllerManager,
21985 "KCP_SSHD" => Self::KcpSshd,
21986 "KCP_CONNECTION" => Self::KcpConnection,
21987 _ => Self::UnknownValue(component::UnknownValue(
21988 wkt::internal::UnknownEnumValue::String(value.to_string()),
21989 )),
21990 }
21991 }
21992 }
21993
21994 impl serde::ser::Serialize for Component {
21995 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21996 where
21997 S: serde::Serializer,
21998 {
21999 match self {
22000 Self::Unspecified => serializer.serialize_i32(0),
22001 Self::SystemComponents => serializer.serialize_i32(1),
22002 Self::Workloads => serializer.serialize_i32(2),
22003 Self::Apiserver => serializer.serialize_i32(3),
22004 Self::Scheduler => serializer.serialize_i32(4),
22005 Self::ControllerManager => serializer.serialize_i32(5),
22006 Self::KcpSshd => serializer.serialize_i32(7),
22007 Self::KcpConnection => serializer.serialize_i32(8),
22008 Self::UnknownValue(u) => u.0.serialize(serializer),
22009 }
22010 }
22011 }
22012
22013 impl<'de> serde::de::Deserialize<'de> for Component {
22014 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22015 where
22016 D: serde::Deserializer<'de>,
22017 {
22018 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
22019 ".google.container.v1.LoggingComponentConfig.Component",
22020 ))
22021 }
22022 }
22023}
22024
22025#[serde_with::serde_as]
22027#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22028#[serde(default, rename_all = "camelCase")]
22029#[non_exhaustive]
22030pub struct RayClusterLoggingConfig {
22031 #[serde(skip_serializing_if = "wkt::internal::is_default")]
22033 pub enabled: bool,
22034
22035 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22036 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22037}
22038
22039impl RayClusterLoggingConfig {
22040 pub fn new() -> Self {
22041 std::default::Default::default()
22042 }
22043
22044 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22046 self.enabled = v.into();
22047 self
22048 }
22049}
22050
22051impl wkt::message::Message for RayClusterLoggingConfig {
22052 fn typename() -> &'static str {
22053 "type.googleapis.com/google.container.v1.RayClusterLoggingConfig"
22054 }
22055}
22056
22057#[serde_with::serde_as]
22059#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22060#[serde(default, rename_all = "camelCase")]
22061#[non_exhaustive]
22062pub struct MonitoringConfig {
22063 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22065 pub component_config: std::option::Option<crate::model::MonitoringComponentConfig>,
22066
22067 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22070 pub managed_prometheus_config: std::option::Option<crate::model::ManagedPrometheusConfig>,
22071
22072 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22074 pub advanced_datapath_observability_config:
22075 std::option::Option<crate::model::AdvancedDatapathObservabilityConfig>,
22076
22077 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22078 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22079}
22080
22081impl MonitoringConfig {
22082 pub fn new() -> Self {
22083 std::default::Default::default()
22084 }
22085
22086 pub fn set_component_config<
22088 T: std::convert::Into<std::option::Option<crate::model::MonitoringComponentConfig>>,
22089 >(
22090 mut self,
22091 v: T,
22092 ) -> Self {
22093 self.component_config = v.into();
22094 self
22095 }
22096
22097 pub fn set_managed_prometheus_config<
22099 T: std::convert::Into<std::option::Option<crate::model::ManagedPrometheusConfig>>,
22100 >(
22101 mut self,
22102 v: T,
22103 ) -> Self {
22104 self.managed_prometheus_config = v.into();
22105 self
22106 }
22107
22108 pub fn set_advanced_datapath_observability_config<
22110 T: std::convert::Into<std::option::Option<crate::model::AdvancedDatapathObservabilityConfig>>,
22111 >(
22112 mut self,
22113 v: T,
22114 ) -> Self {
22115 self.advanced_datapath_observability_config = v.into();
22116 self
22117 }
22118}
22119
22120impl wkt::message::Message for MonitoringConfig {
22121 fn typename() -> &'static str {
22122 "type.googleapis.com/google.container.v1.MonitoringConfig"
22123 }
22124}
22125
22126#[serde_with::serde_as]
22129#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22130#[serde(default, rename_all = "camelCase")]
22131#[non_exhaustive]
22132pub struct AdvancedDatapathObservabilityConfig {
22133 #[serde(skip_serializing_if = "wkt::internal::is_default")]
22135 pub enable_metrics: bool,
22136
22137 pub relay_mode: crate::model::advanced_datapath_observability_config::RelayMode,
22139
22140 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22142 pub enable_relay: std::option::Option<bool>,
22143
22144 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22145 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22146}
22147
22148impl AdvancedDatapathObservabilityConfig {
22149 pub fn new() -> Self {
22150 std::default::Default::default()
22151 }
22152
22153 pub fn set_enable_metrics<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22155 self.enable_metrics = v.into();
22156 self
22157 }
22158
22159 pub fn set_relay_mode<
22161 T: std::convert::Into<crate::model::advanced_datapath_observability_config::RelayMode>,
22162 >(
22163 mut self,
22164 v: T,
22165 ) -> Self {
22166 self.relay_mode = v.into();
22167 self
22168 }
22169
22170 pub fn set_enable_relay<T: std::convert::Into<std::option::Option<bool>>>(
22172 mut self,
22173 v: T,
22174 ) -> Self {
22175 self.enable_relay = v.into();
22176 self
22177 }
22178}
22179
22180impl wkt::message::Message for AdvancedDatapathObservabilityConfig {
22181 fn typename() -> &'static str {
22182 "type.googleapis.com/google.container.v1.AdvancedDatapathObservabilityConfig"
22183 }
22184}
22185
22186pub mod advanced_datapath_observability_config {
22188 #[allow(unused_imports)]
22189 use super::*;
22190
22191 #[derive(Clone, Debug, PartialEq)]
22207 #[non_exhaustive]
22208 pub enum RelayMode {
22209 Unspecified,
22211 Disabled,
22213 InternalVpcLb,
22215 ExternalLb,
22217 UnknownValue(relay_mode::UnknownValue),
22222 }
22223
22224 #[doc(hidden)]
22225 pub mod relay_mode {
22226 #[allow(unused_imports)]
22227 use super::*;
22228 #[derive(Clone, Debug, PartialEq)]
22229 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22230 }
22231
22232 impl RelayMode {
22233 pub fn value(&self) -> std::option::Option<i32> {
22238 match self {
22239 Self::Unspecified => std::option::Option::Some(0),
22240 Self::Disabled => std::option::Option::Some(1),
22241 Self::InternalVpcLb => std::option::Option::Some(3),
22242 Self::ExternalLb => std::option::Option::Some(4),
22243 Self::UnknownValue(u) => u.0.value(),
22244 }
22245 }
22246
22247 pub fn name(&self) -> std::option::Option<&str> {
22252 match self {
22253 Self::Unspecified => std::option::Option::Some("RELAY_MODE_UNSPECIFIED"),
22254 Self::Disabled => std::option::Option::Some("DISABLED"),
22255 Self::InternalVpcLb => std::option::Option::Some("INTERNAL_VPC_LB"),
22256 Self::ExternalLb => std::option::Option::Some("EXTERNAL_LB"),
22257 Self::UnknownValue(u) => u.0.name(),
22258 }
22259 }
22260 }
22261
22262 impl std::default::Default for RelayMode {
22263 fn default() -> Self {
22264 use std::convert::From;
22265 Self::from(0)
22266 }
22267 }
22268
22269 impl std::fmt::Display for RelayMode {
22270 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22271 wkt::internal::display_enum(f, self.name(), self.value())
22272 }
22273 }
22274
22275 impl std::convert::From<i32> for RelayMode {
22276 fn from(value: i32) -> Self {
22277 match value {
22278 0 => Self::Unspecified,
22279 1 => Self::Disabled,
22280 3 => Self::InternalVpcLb,
22281 4 => Self::ExternalLb,
22282 _ => Self::UnknownValue(relay_mode::UnknownValue(
22283 wkt::internal::UnknownEnumValue::Integer(value),
22284 )),
22285 }
22286 }
22287 }
22288
22289 impl std::convert::From<&str> for RelayMode {
22290 fn from(value: &str) -> Self {
22291 use std::string::ToString;
22292 match value {
22293 "RELAY_MODE_UNSPECIFIED" => Self::Unspecified,
22294 "DISABLED" => Self::Disabled,
22295 "INTERNAL_VPC_LB" => Self::InternalVpcLb,
22296 "EXTERNAL_LB" => Self::ExternalLb,
22297 _ => Self::UnknownValue(relay_mode::UnknownValue(
22298 wkt::internal::UnknownEnumValue::String(value.to_string()),
22299 )),
22300 }
22301 }
22302 }
22303
22304 impl serde::ser::Serialize for RelayMode {
22305 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22306 where
22307 S: serde::Serializer,
22308 {
22309 match self {
22310 Self::Unspecified => serializer.serialize_i32(0),
22311 Self::Disabled => serializer.serialize_i32(1),
22312 Self::InternalVpcLb => serializer.serialize_i32(3),
22313 Self::ExternalLb => serializer.serialize_i32(4),
22314 Self::UnknownValue(u) => u.0.serialize(serializer),
22315 }
22316 }
22317 }
22318
22319 impl<'de> serde::de::Deserialize<'de> for RelayMode {
22320 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22321 where
22322 D: serde::Deserializer<'de>,
22323 {
22324 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelayMode>::new(
22325 ".google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode",
22326 ))
22327 }
22328 }
22329}
22330
22331#[serde_with::serde_as]
22334#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22335#[serde(default, rename_all = "camelCase")]
22336#[non_exhaustive]
22337pub struct RayClusterMonitoringConfig {
22338 #[serde(skip_serializing_if = "wkt::internal::is_default")]
22340 pub enabled: bool,
22341
22342 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22343 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22344}
22345
22346impl RayClusterMonitoringConfig {
22347 pub fn new() -> Self {
22348 std::default::Default::default()
22349 }
22350
22351 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22353 self.enabled = v.into();
22354 self
22355 }
22356}
22357
22358impl wkt::message::Message for RayClusterMonitoringConfig {
22359 fn typename() -> &'static str {
22360 "type.googleapis.com/google.container.v1.RayClusterMonitoringConfig"
22361 }
22362}
22363
22364#[serde_with::serde_as]
22366#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22367#[serde(default, rename_all = "camelCase")]
22368#[non_exhaustive]
22369pub struct NodePoolLoggingConfig {
22370 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22372 pub variant_config: std::option::Option<crate::model::LoggingVariantConfig>,
22373
22374 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22375 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22376}
22377
22378impl NodePoolLoggingConfig {
22379 pub fn new() -> Self {
22380 std::default::Default::default()
22381 }
22382
22383 pub fn set_variant_config<
22385 T: std::convert::Into<std::option::Option<crate::model::LoggingVariantConfig>>,
22386 >(
22387 mut self,
22388 v: T,
22389 ) -> Self {
22390 self.variant_config = v.into();
22391 self
22392 }
22393}
22394
22395impl wkt::message::Message for NodePoolLoggingConfig {
22396 fn typename() -> &'static str {
22397 "type.googleapis.com/google.container.v1.NodePoolLoggingConfig"
22398 }
22399}
22400
22401#[serde_with::serde_as]
22403#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22404#[serde(default, rename_all = "camelCase")]
22405#[non_exhaustive]
22406pub struct LoggingVariantConfig {
22407 pub variant: crate::model::logging_variant_config::Variant,
22409
22410 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22411 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22412}
22413
22414impl LoggingVariantConfig {
22415 pub fn new() -> Self {
22416 std::default::Default::default()
22417 }
22418
22419 pub fn set_variant<T: std::convert::Into<crate::model::logging_variant_config::Variant>>(
22421 mut self,
22422 v: T,
22423 ) -> Self {
22424 self.variant = v.into();
22425 self
22426 }
22427}
22428
22429impl wkt::message::Message for LoggingVariantConfig {
22430 fn typename() -> &'static str {
22431 "type.googleapis.com/google.container.v1.LoggingVariantConfig"
22432 }
22433}
22434
22435pub mod logging_variant_config {
22437 #[allow(unused_imports)]
22438 use super::*;
22439
22440 #[derive(Clone, Debug, PartialEq)]
22456 #[non_exhaustive]
22457 pub enum Variant {
22458 Unspecified,
22460 Default,
22462 MaxThroughput,
22464 UnknownValue(variant::UnknownValue),
22469 }
22470
22471 #[doc(hidden)]
22472 pub mod variant {
22473 #[allow(unused_imports)]
22474 use super::*;
22475 #[derive(Clone, Debug, PartialEq)]
22476 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22477 }
22478
22479 impl Variant {
22480 pub fn value(&self) -> std::option::Option<i32> {
22485 match self {
22486 Self::Unspecified => std::option::Option::Some(0),
22487 Self::Default => std::option::Option::Some(1),
22488 Self::MaxThroughput => std::option::Option::Some(2),
22489 Self::UnknownValue(u) => u.0.value(),
22490 }
22491 }
22492
22493 pub fn name(&self) -> std::option::Option<&str> {
22498 match self {
22499 Self::Unspecified => std::option::Option::Some("VARIANT_UNSPECIFIED"),
22500 Self::Default => std::option::Option::Some("DEFAULT"),
22501 Self::MaxThroughput => std::option::Option::Some("MAX_THROUGHPUT"),
22502 Self::UnknownValue(u) => u.0.name(),
22503 }
22504 }
22505 }
22506
22507 impl std::default::Default for Variant {
22508 fn default() -> Self {
22509 use std::convert::From;
22510 Self::from(0)
22511 }
22512 }
22513
22514 impl std::fmt::Display for Variant {
22515 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22516 wkt::internal::display_enum(f, self.name(), self.value())
22517 }
22518 }
22519
22520 impl std::convert::From<i32> for Variant {
22521 fn from(value: i32) -> Self {
22522 match value {
22523 0 => Self::Unspecified,
22524 1 => Self::Default,
22525 2 => Self::MaxThroughput,
22526 _ => Self::UnknownValue(variant::UnknownValue(
22527 wkt::internal::UnknownEnumValue::Integer(value),
22528 )),
22529 }
22530 }
22531 }
22532
22533 impl std::convert::From<&str> for Variant {
22534 fn from(value: &str) -> Self {
22535 use std::string::ToString;
22536 match value {
22537 "VARIANT_UNSPECIFIED" => Self::Unspecified,
22538 "DEFAULT" => Self::Default,
22539 "MAX_THROUGHPUT" => Self::MaxThroughput,
22540 _ => Self::UnknownValue(variant::UnknownValue(
22541 wkt::internal::UnknownEnumValue::String(value.to_string()),
22542 )),
22543 }
22544 }
22545 }
22546
22547 impl serde::ser::Serialize for Variant {
22548 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22549 where
22550 S: serde::Serializer,
22551 {
22552 match self {
22553 Self::Unspecified => serializer.serialize_i32(0),
22554 Self::Default => serializer.serialize_i32(1),
22555 Self::MaxThroughput => serializer.serialize_i32(2),
22556 Self::UnknownValue(u) => u.0.serialize(serializer),
22557 }
22558 }
22559 }
22560
22561 impl<'de> serde::de::Deserialize<'de> for Variant {
22562 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22563 where
22564 D: serde::Deserializer<'de>,
22565 {
22566 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Variant>::new(
22567 ".google.container.v1.LoggingVariantConfig.Variant",
22568 ))
22569 }
22570 }
22571}
22572
22573#[serde_with::serde_as]
22575#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22576#[serde(default, rename_all = "camelCase")]
22577#[non_exhaustive]
22578pub struct MonitoringComponentConfig {
22579 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
22582 pub enable_components: std::vec::Vec<crate::model::monitoring_component_config::Component>,
22583
22584 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22585 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22586}
22587
22588impl MonitoringComponentConfig {
22589 pub fn new() -> Self {
22590 std::default::Default::default()
22591 }
22592
22593 pub fn set_enable_components<T, V>(mut self, v: T) -> Self
22595 where
22596 T: std::iter::IntoIterator<Item = V>,
22597 V: std::convert::Into<crate::model::monitoring_component_config::Component>,
22598 {
22599 use std::iter::Iterator;
22600 self.enable_components = v.into_iter().map(|i| i.into()).collect();
22601 self
22602 }
22603}
22604
22605impl wkt::message::Message for MonitoringComponentConfig {
22606 fn typename() -> &'static str {
22607 "type.googleapis.com/google.container.v1.MonitoringComponentConfig"
22608 }
22609}
22610
22611pub mod monitoring_component_config {
22613 #[allow(unused_imports)]
22614 use super::*;
22615
22616 #[derive(Clone, Debug, PartialEq)]
22632 #[non_exhaustive]
22633 pub enum Component {
22634 Unspecified,
22636 SystemComponents,
22638 Apiserver,
22640 Scheduler,
22642 ControllerManager,
22644 Storage,
22646 Hpa,
22648 Pod,
22650 Daemonset,
22652 Deployment,
22654 Statefulset,
22656 Cadvisor,
22658 Kubelet,
22660 Dcgm,
22662 UnknownValue(component::UnknownValue),
22667 }
22668
22669 #[doc(hidden)]
22670 pub mod component {
22671 #[allow(unused_imports)]
22672 use super::*;
22673 #[derive(Clone, Debug, PartialEq)]
22674 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22675 }
22676
22677 impl Component {
22678 pub fn value(&self) -> std::option::Option<i32> {
22683 match self {
22684 Self::Unspecified => std::option::Option::Some(0),
22685 Self::SystemComponents => std::option::Option::Some(1),
22686 Self::Apiserver => std::option::Option::Some(3),
22687 Self::Scheduler => std::option::Option::Some(4),
22688 Self::ControllerManager => std::option::Option::Some(5),
22689 Self::Storage => std::option::Option::Some(7),
22690 Self::Hpa => std::option::Option::Some(8),
22691 Self::Pod => std::option::Option::Some(9),
22692 Self::Daemonset => std::option::Option::Some(10),
22693 Self::Deployment => std::option::Option::Some(11),
22694 Self::Statefulset => std::option::Option::Some(12),
22695 Self::Cadvisor => std::option::Option::Some(13),
22696 Self::Kubelet => std::option::Option::Some(14),
22697 Self::Dcgm => std::option::Option::Some(15),
22698 Self::UnknownValue(u) => u.0.value(),
22699 }
22700 }
22701
22702 pub fn name(&self) -> std::option::Option<&str> {
22707 match self {
22708 Self::Unspecified => std::option::Option::Some("COMPONENT_UNSPECIFIED"),
22709 Self::SystemComponents => std::option::Option::Some("SYSTEM_COMPONENTS"),
22710 Self::Apiserver => std::option::Option::Some("APISERVER"),
22711 Self::Scheduler => std::option::Option::Some("SCHEDULER"),
22712 Self::ControllerManager => std::option::Option::Some("CONTROLLER_MANAGER"),
22713 Self::Storage => std::option::Option::Some("STORAGE"),
22714 Self::Hpa => std::option::Option::Some("HPA"),
22715 Self::Pod => std::option::Option::Some("POD"),
22716 Self::Daemonset => std::option::Option::Some("DAEMONSET"),
22717 Self::Deployment => std::option::Option::Some("DEPLOYMENT"),
22718 Self::Statefulset => std::option::Option::Some("STATEFULSET"),
22719 Self::Cadvisor => std::option::Option::Some("CADVISOR"),
22720 Self::Kubelet => std::option::Option::Some("KUBELET"),
22721 Self::Dcgm => std::option::Option::Some("DCGM"),
22722 Self::UnknownValue(u) => u.0.name(),
22723 }
22724 }
22725 }
22726
22727 impl std::default::Default for Component {
22728 fn default() -> Self {
22729 use std::convert::From;
22730 Self::from(0)
22731 }
22732 }
22733
22734 impl std::fmt::Display for Component {
22735 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22736 wkt::internal::display_enum(f, self.name(), self.value())
22737 }
22738 }
22739
22740 impl std::convert::From<i32> for Component {
22741 fn from(value: i32) -> Self {
22742 match value {
22743 0 => Self::Unspecified,
22744 1 => Self::SystemComponents,
22745 3 => Self::Apiserver,
22746 4 => Self::Scheduler,
22747 5 => Self::ControllerManager,
22748 7 => Self::Storage,
22749 8 => Self::Hpa,
22750 9 => Self::Pod,
22751 10 => Self::Daemonset,
22752 11 => Self::Deployment,
22753 12 => Self::Statefulset,
22754 13 => Self::Cadvisor,
22755 14 => Self::Kubelet,
22756 15 => Self::Dcgm,
22757 _ => Self::UnknownValue(component::UnknownValue(
22758 wkt::internal::UnknownEnumValue::Integer(value),
22759 )),
22760 }
22761 }
22762 }
22763
22764 impl std::convert::From<&str> for Component {
22765 fn from(value: &str) -> Self {
22766 use std::string::ToString;
22767 match value {
22768 "COMPONENT_UNSPECIFIED" => Self::Unspecified,
22769 "SYSTEM_COMPONENTS" => Self::SystemComponents,
22770 "APISERVER" => Self::Apiserver,
22771 "SCHEDULER" => Self::Scheduler,
22772 "CONTROLLER_MANAGER" => Self::ControllerManager,
22773 "STORAGE" => Self::Storage,
22774 "HPA" => Self::Hpa,
22775 "POD" => Self::Pod,
22776 "DAEMONSET" => Self::Daemonset,
22777 "DEPLOYMENT" => Self::Deployment,
22778 "STATEFULSET" => Self::Statefulset,
22779 "CADVISOR" => Self::Cadvisor,
22780 "KUBELET" => Self::Kubelet,
22781 "DCGM" => Self::Dcgm,
22782 _ => Self::UnknownValue(component::UnknownValue(
22783 wkt::internal::UnknownEnumValue::String(value.to_string()),
22784 )),
22785 }
22786 }
22787 }
22788
22789 impl serde::ser::Serialize for Component {
22790 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22791 where
22792 S: serde::Serializer,
22793 {
22794 match self {
22795 Self::Unspecified => serializer.serialize_i32(0),
22796 Self::SystemComponents => serializer.serialize_i32(1),
22797 Self::Apiserver => serializer.serialize_i32(3),
22798 Self::Scheduler => serializer.serialize_i32(4),
22799 Self::ControllerManager => serializer.serialize_i32(5),
22800 Self::Storage => serializer.serialize_i32(7),
22801 Self::Hpa => serializer.serialize_i32(8),
22802 Self::Pod => serializer.serialize_i32(9),
22803 Self::Daemonset => serializer.serialize_i32(10),
22804 Self::Deployment => serializer.serialize_i32(11),
22805 Self::Statefulset => serializer.serialize_i32(12),
22806 Self::Cadvisor => serializer.serialize_i32(13),
22807 Self::Kubelet => serializer.serialize_i32(14),
22808 Self::Dcgm => serializer.serialize_i32(15),
22809 Self::UnknownValue(u) => u.0.serialize(serializer),
22810 }
22811 }
22812 }
22813
22814 impl<'de> serde::de::Deserialize<'de> for Component {
22815 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22816 where
22817 D: serde::Deserializer<'de>,
22818 {
22819 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Component>::new(
22820 ".google.container.v1.MonitoringComponentConfig.Component",
22821 ))
22822 }
22823 }
22824}
22825
22826#[serde_with::serde_as]
22829#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22830#[serde(default, rename_all = "camelCase")]
22831#[non_exhaustive]
22832pub struct ManagedPrometheusConfig {
22833 #[serde(skip_serializing_if = "wkt::internal::is_default")]
22835 pub enabled: bool,
22836
22837 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22838 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22839}
22840
22841impl ManagedPrometheusConfig {
22842 pub fn new() -> Self {
22843 std::default::Default::default()
22844 }
22845
22846 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22848 self.enabled = v.into();
22849 self
22850 }
22851}
22852
22853impl wkt::message::Message for ManagedPrometheusConfig {
22854 fn typename() -> &'static str {
22855 "type.googleapis.com/google.container.v1.ManagedPrometheusConfig"
22856 }
22857}
22858
22859#[serde_with::serde_as]
22861#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22862#[serde(default, rename_all = "camelCase")]
22863#[non_exhaustive]
22864pub struct Fleet {
22865 #[serde(skip_serializing_if = "std::string::String::is_empty")]
22869 pub project: std::string::String,
22870
22871 #[serde(skip_serializing_if = "std::string::String::is_empty")]
22875 pub membership: std::string::String,
22876
22877 #[serde(skip_serializing_if = "wkt::internal::is_default")]
22880 pub pre_registered: bool,
22881
22882 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22883 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22884}
22885
22886impl Fleet {
22887 pub fn new() -> Self {
22888 std::default::Default::default()
22889 }
22890
22891 pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22893 self.project = v.into();
22894 self
22895 }
22896
22897 pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22899 self.membership = v.into();
22900 self
22901 }
22902
22903 pub fn set_pre_registered<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22905 self.pre_registered = v.into();
22906 self
22907 }
22908}
22909
22910impl wkt::message::Message for Fleet {
22911 fn typename() -> &'static str {
22912 "type.googleapis.com/google.container.v1.Fleet"
22913 }
22914}
22915
22916#[serde_with::serde_as]
22918#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22919#[serde(default, rename_all = "camelCase")]
22920#[non_exhaustive]
22921pub struct ControlPlaneEndpointsConfig {
22922 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22924 pub dns_endpoint_config:
22925 std::option::Option<crate::model::control_plane_endpoints_config::DNSEndpointConfig>,
22926
22927 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22929 pub ip_endpoints_config:
22930 std::option::Option<crate::model::control_plane_endpoints_config::IPEndpointsConfig>,
22931
22932 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
22933 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22934}
22935
22936impl ControlPlaneEndpointsConfig {
22937 pub fn new() -> Self {
22938 std::default::Default::default()
22939 }
22940
22941 pub fn set_dns_endpoint_config<
22943 T: std::convert::Into<
22944 std::option::Option<
22945 crate::model::control_plane_endpoints_config::DNSEndpointConfig,
22946 >,
22947 >,
22948 >(
22949 mut self,
22950 v: T,
22951 ) -> Self {
22952 self.dns_endpoint_config = v.into();
22953 self
22954 }
22955
22956 pub fn set_ip_endpoints_config<
22958 T: std::convert::Into<
22959 std::option::Option<
22960 crate::model::control_plane_endpoints_config::IPEndpointsConfig,
22961 >,
22962 >,
22963 >(
22964 mut self,
22965 v: T,
22966 ) -> Self {
22967 self.ip_endpoints_config = v.into();
22968 self
22969 }
22970}
22971
22972impl wkt::message::Message for ControlPlaneEndpointsConfig {
22973 fn typename() -> &'static str {
22974 "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig"
22975 }
22976}
22977
22978pub mod control_plane_endpoints_config {
22980 #[allow(unused_imports)]
22981 use super::*;
22982
22983 #[serde_with::serde_as]
22985 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
22986 #[serde(default, rename_all = "camelCase")]
22987 #[non_exhaustive]
22988 pub struct DNSEndpointConfig {
22989 #[serde(skip_serializing_if = "std::string::String::is_empty")]
22997 pub endpoint: std::string::String,
22998
22999 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23002 pub allow_external_traffic: std::option::Option<bool>,
23003
23004 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23005 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23006 }
23007
23008 impl DNSEndpointConfig {
23009 pub fn new() -> Self {
23010 std::default::Default::default()
23011 }
23012
23013 pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23015 self.endpoint = v.into();
23016 self
23017 }
23018
23019 pub fn set_allow_external_traffic<T: std::convert::Into<std::option::Option<bool>>>(
23021 mut self,
23022 v: T,
23023 ) -> Self {
23024 self.allow_external_traffic = v.into();
23025 self
23026 }
23027 }
23028
23029 impl wkt::message::Message for DNSEndpointConfig {
23030 fn typename() -> &'static str {
23031 "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig"
23032 }
23033 }
23034
23035 #[serde_with::serde_as]
23037 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23038 #[serde(default, rename_all = "camelCase")]
23039 #[non_exhaustive]
23040 pub struct IPEndpointsConfig {
23041 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23043 pub enabled: std::option::Option<bool>,
23044
23045 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23050 pub enable_public_endpoint: std::option::Option<bool>,
23051
23052 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23060 pub global_access: std::option::Option<bool>,
23061
23062 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23068 pub authorized_networks_config:
23069 std::option::Option<crate::model::MasterAuthorizedNetworksConfig>,
23070
23071 #[serde(skip_serializing_if = "std::string::String::is_empty")]
23074 pub public_endpoint: std::string::String,
23075
23076 #[serde(skip_serializing_if = "std::string::String::is_empty")]
23079 pub private_endpoint: std::string::String,
23080
23081 #[serde(skip_serializing_if = "std::string::String::is_empty")]
23087 pub private_endpoint_subnetwork: std::string::String,
23088
23089 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23090 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23091 }
23092
23093 impl IPEndpointsConfig {
23094 pub fn new() -> Self {
23095 std::default::Default::default()
23096 }
23097
23098 pub fn set_enabled<T: std::convert::Into<std::option::Option<bool>>>(
23100 mut self,
23101 v: T,
23102 ) -> Self {
23103 self.enabled = v.into();
23104 self
23105 }
23106
23107 pub fn set_enable_public_endpoint<T: std::convert::Into<std::option::Option<bool>>>(
23109 mut self,
23110 v: T,
23111 ) -> Self {
23112 self.enable_public_endpoint = v.into();
23113 self
23114 }
23115
23116 pub fn set_global_access<T: std::convert::Into<std::option::Option<bool>>>(
23118 mut self,
23119 v: T,
23120 ) -> Self {
23121 self.global_access = v.into();
23122 self
23123 }
23124
23125 pub fn set_authorized_networks_config<
23127 T: std::convert::Into<std::option::Option<crate::model::MasterAuthorizedNetworksConfig>>,
23128 >(
23129 mut self,
23130 v: T,
23131 ) -> Self {
23132 self.authorized_networks_config = v.into();
23133 self
23134 }
23135
23136 pub fn set_public_endpoint<T: std::convert::Into<std::string::String>>(
23138 mut self,
23139 v: T,
23140 ) -> Self {
23141 self.public_endpoint = v.into();
23142 self
23143 }
23144
23145 pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
23147 mut self,
23148 v: T,
23149 ) -> Self {
23150 self.private_endpoint = v.into();
23151 self
23152 }
23153
23154 pub fn set_private_endpoint_subnetwork<T: std::convert::Into<std::string::String>>(
23156 mut self,
23157 v: T,
23158 ) -> Self {
23159 self.private_endpoint_subnetwork = v.into();
23160 self
23161 }
23162 }
23163
23164 impl wkt::message::Message for IPEndpointsConfig {
23165 fn typename() -> &'static str {
23166 "type.googleapis.com/google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig"
23167 }
23168 }
23169}
23170
23171#[serde_with::serde_as]
23174#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23175#[serde(default, rename_all = "camelCase")]
23176#[non_exhaustive]
23177pub struct LocalNvmeSsdBlockConfig {
23178 #[serde(skip_serializing_if = "wkt::internal::is_default")]
23196 pub local_ssd_count: i32,
23197
23198 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23199 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23200}
23201
23202impl LocalNvmeSsdBlockConfig {
23203 pub fn new() -> Self {
23204 std::default::Default::default()
23205 }
23206
23207 pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23209 self.local_ssd_count = v.into();
23210 self
23211 }
23212}
23213
23214impl wkt::message::Message for LocalNvmeSsdBlockConfig {
23215 fn typename() -> &'static str {
23216 "type.googleapis.com/google.container.v1.LocalNvmeSsdBlockConfig"
23217 }
23218}
23219
23220#[serde_with::serde_as]
23223#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23224#[serde(default, rename_all = "camelCase")]
23225#[non_exhaustive]
23226pub struct EphemeralStorageLocalSsdConfig {
23227 #[serde(skip_serializing_if = "wkt::internal::is_default")]
23247 pub local_ssd_count: i32,
23248
23249 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23250 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23251}
23252
23253impl EphemeralStorageLocalSsdConfig {
23254 pub fn new() -> Self {
23255 std::default::Default::default()
23256 }
23257
23258 pub fn set_local_ssd_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23260 self.local_ssd_count = v.into();
23261 self
23262 }
23263}
23264
23265impl wkt::message::Message for EphemeralStorageLocalSsdConfig {
23266 fn typename() -> &'static str {
23267 "type.googleapis.com/google.container.v1.EphemeralStorageLocalSsdConfig"
23268 }
23269}
23270
23271#[serde_with::serde_as]
23278#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23279#[serde(default, rename_all = "camelCase")]
23280#[non_exhaustive]
23281pub struct ResourceManagerTags {
23282 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
23288 pub tags: std::collections::HashMap<std::string::String, std::string::String>,
23289
23290 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23291 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23292}
23293
23294impl ResourceManagerTags {
23295 pub fn new() -> Self {
23296 std::default::Default::default()
23297 }
23298
23299 pub fn set_tags<T, K, V>(mut self, v: T) -> Self
23301 where
23302 T: std::iter::IntoIterator<Item = (K, V)>,
23303 K: std::convert::Into<std::string::String>,
23304 V: std::convert::Into<std::string::String>,
23305 {
23306 use std::iter::Iterator;
23307 self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
23308 self
23309 }
23310}
23311
23312impl wkt::message::Message for ResourceManagerTags {
23313 fn typename() -> &'static str {
23314 "type.googleapis.com/google.container.v1.ResourceManagerTags"
23315 }
23316}
23317
23318#[serde_with::serde_as]
23320#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23321#[serde(default, rename_all = "camelCase")]
23322#[non_exhaustive]
23323pub struct EnterpriseConfig {
23324 pub cluster_tier: crate::model::enterprise_config::ClusterTier,
23326
23327 pub desired_tier: crate::model::enterprise_config::ClusterTier,
23329
23330 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23331 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23332}
23333
23334impl EnterpriseConfig {
23335 pub fn new() -> Self {
23336 std::default::Default::default()
23337 }
23338
23339 pub fn set_cluster_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
23341 mut self,
23342 v: T,
23343 ) -> Self {
23344 self.cluster_tier = v.into();
23345 self
23346 }
23347
23348 pub fn set_desired_tier<T: std::convert::Into<crate::model::enterprise_config::ClusterTier>>(
23350 mut self,
23351 v: T,
23352 ) -> Self {
23353 self.desired_tier = v.into();
23354 self
23355 }
23356}
23357
23358impl wkt::message::Message for EnterpriseConfig {
23359 fn typename() -> &'static str {
23360 "type.googleapis.com/google.container.v1.EnterpriseConfig"
23361 }
23362}
23363
23364pub mod enterprise_config {
23366 #[allow(unused_imports)]
23367 use super::*;
23368
23369 #[derive(Clone, Debug, PartialEq)]
23385 #[non_exhaustive]
23386 pub enum ClusterTier {
23387 Unspecified,
23389 Standard,
23391 Enterprise,
23393 UnknownValue(cluster_tier::UnknownValue),
23398 }
23399
23400 #[doc(hidden)]
23401 pub mod cluster_tier {
23402 #[allow(unused_imports)]
23403 use super::*;
23404 #[derive(Clone, Debug, PartialEq)]
23405 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23406 }
23407
23408 impl ClusterTier {
23409 pub fn value(&self) -> std::option::Option<i32> {
23414 match self {
23415 Self::Unspecified => std::option::Option::Some(0),
23416 Self::Standard => std::option::Option::Some(1),
23417 Self::Enterprise => std::option::Option::Some(2),
23418 Self::UnknownValue(u) => u.0.value(),
23419 }
23420 }
23421
23422 pub fn name(&self) -> std::option::Option<&str> {
23427 match self {
23428 Self::Unspecified => std::option::Option::Some("CLUSTER_TIER_UNSPECIFIED"),
23429 Self::Standard => std::option::Option::Some("STANDARD"),
23430 Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
23431 Self::UnknownValue(u) => u.0.name(),
23432 }
23433 }
23434 }
23435
23436 impl std::default::Default for ClusterTier {
23437 fn default() -> Self {
23438 use std::convert::From;
23439 Self::from(0)
23440 }
23441 }
23442
23443 impl std::fmt::Display for ClusterTier {
23444 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23445 wkt::internal::display_enum(f, self.name(), self.value())
23446 }
23447 }
23448
23449 impl std::convert::From<i32> for ClusterTier {
23450 fn from(value: i32) -> Self {
23451 match value {
23452 0 => Self::Unspecified,
23453 1 => Self::Standard,
23454 2 => Self::Enterprise,
23455 _ => Self::UnknownValue(cluster_tier::UnknownValue(
23456 wkt::internal::UnknownEnumValue::Integer(value),
23457 )),
23458 }
23459 }
23460 }
23461
23462 impl std::convert::From<&str> for ClusterTier {
23463 fn from(value: &str) -> Self {
23464 use std::string::ToString;
23465 match value {
23466 "CLUSTER_TIER_UNSPECIFIED" => Self::Unspecified,
23467 "STANDARD" => Self::Standard,
23468 "ENTERPRISE" => Self::Enterprise,
23469 _ => Self::UnknownValue(cluster_tier::UnknownValue(
23470 wkt::internal::UnknownEnumValue::String(value.to_string()),
23471 )),
23472 }
23473 }
23474 }
23475
23476 impl serde::ser::Serialize for ClusterTier {
23477 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23478 where
23479 S: serde::Serializer,
23480 {
23481 match self {
23482 Self::Unspecified => serializer.serialize_i32(0),
23483 Self::Standard => serializer.serialize_i32(1),
23484 Self::Enterprise => serializer.serialize_i32(2),
23485 Self::UnknownValue(u) => u.0.serialize(serializer),
23486 }
23487 }
23488 }
23489
23490 impl<'de> serde::de::Deserialize<'de> for ClusterTier {
23491 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23492 where
23493 D: serde::Deserializer<'de>,
23494 {
23495 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ClusterTier>::new(
23496 ".google.container.v1.EnterpriseConfig.ClusterTier",
23497 ))
23498 }
23499 }
23500}
23501
23502#[serde_with::serde_as]
23504#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23505#[serde(default, rename_all = "camelCase")]
23506#[non_exhaustive]
23507pub struct SecretManagerConfig {
23508 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23510 pub enabled: std::option::Option<bool>,
23511
23512 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23513 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23514}
23515
23516impl SecretManagerConfig {
23517 pub fn new() -> Self {
23518 std::default::Default::default()
23519 }
23520
23521 pub fn set_enabled<T: std::convert::Into<std::option::Option<bool>>>(mut self, v: T) -> Self {
23523 self.enabled = v.into();
23524 self
23525 }
23526}
23527
23528impl wkt::message::Message for SecretManagerConfig {
23529 fn typename() -> &'static str {
23530 "type.googleapis.com/google.container.v1.SecretManagerConfig"
23531 }
23532}
23533
23534#[serde_with::serde_as]
23537#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23538#[serde(default, rename_all = "camelCase")]
23539#[non_exhaustive]
23540pub struct SecondaryBootDisk {
23541 pub mode: crate::model::secondary_boot_disk::Mode,
23543
23544 #[serde(skip_serializing_if = "std::string::String::is_empty")]
23546 pub disk_image: std::string::String,
23547
23548 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23549 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23550}
23551
23552impl SecondaryBootDisk {
23553 pub fn new() -> Self {
23554 std::default::Default::default()
23555 }
23556
23557 pub fn set_mode<T: std::convert::Into<crate::model::secondary_boot_disk::Mode>>(
23559 mut self,
23560 v: T,
23561 ) -> Self {
23562 self.mode = v.into();
23563 self
23564 }
23565
23566 pub fn set_disk_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23568 self.disk_image = v.into();
23569 self
23570 }
23571}
23572
23573impl wkt::message::Message for SecondaryBootDisk {
23574 fn typename() -> &'static str {
23575 "type.googleapis.com/google.container.v1.SecondaryBootDisk"
23576 }
23577}
23578
23579pub mod secondary_boot_disk {
23581 #[allow(unused_imports)]
23582 use super::*;
23583
23584 #[derive(Clone, Debug, PartialEq)]
23601 #[non_exhaustive]
23602 pub enum Mode {
23603 Unspecified,
23605 ContainerImageCache,
23608 UnknownValue(mode::UnknownValue),
23613 }
23614
23615 #[doc(hidden)]
23616 pub mod mode {
23617 #[allow(unused_imports)]
23618 use super::*;
23619 #[derive(Clone, Debug, PartialEq)]
23620 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23621 }
23622
23623 impl Mode {
23624 pub fn value(&self) -> std::option::Option<i32> {
23629 match self {
23630 Self::Unspecified => std::option::Option::Some(0),
23631 Self::ContainerImageCache => std::option::Option::Some(1),
23632 Self::UnknownValue(u) => u.0.value(),
23633 }
23634 }
23635
23636 pub fn name(&self) -> std::option::Option<&str> {
23641 match self {
23642 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
23643 Self::ContainerImageCache => std::option::Option::Some("CONTAINER_IMAGE_CACHE"),
23644 Self::UnknownValue(u) => u.0.name(),
23645 }
23646 }
23647 }
23648
23649 impl std::default::Default for Mode {
23650 fn default() -> Self {
23651 use std::convert::From;
23652 Self::from(0)
23653 }
23654 }
23655
23656 impl std::fmt::Display for Mode {
23657 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23658 wkt::internal::display_enum(f, self.name(), self.value())
23659 }
23660 }
23661
23662 impl std::convert::From<i32> for Mode {
23663 fn from(value: i32) -> Self {
23664 match value {
23665 0 => Self::Unspecified,
23666 1 => Self::ContainerImageCache,
23667 _ => Self::UnknownValue(mode::UnknownValue(
23668 wkt::internal::UnknownEnumValue::Integer(value),
23669 )),
23670 }
23671 }
23672 }
23673
23674 impl std::convert::From<&str> for Mode {
23675 fn from(value: &str) -> Self {
23676 use std::string::ToString;
23677 match value {
23678 "MODE_UNSPECIFIED" => Self::Unspecified,
23679 "CONTAINER_IMAGE_CACHE" => Self::ContainerImageCache,
23680 _ => Self::UnknownValue(mode::UnknownValue(
23681 wkt::internal::UnknownEnumValue::String(value.to_string()),
23682 )),
23683 }
23684 }
23685 }
23686
23687 impl serde::ser::Serialize for Mode {
23688 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23689 where
23690 S: serde::Serializer,
23691 {
23692 match self {
23693 Self::Unspecified => serializer.serialize_i32(0),
23694 Self::ContainerImageCache => serializer.serialize_i32(1),
23695 Self::UnknownValue(u) => u.0.serialize(serializer),
23696 }
23697 }
23698 }
23699
23700 impl<'de> serde::de::Deserialize<'de> for Mode {
23701 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23702 where
23703 D: serde::Deserializer<'de>,
23704 {
23705 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
23706 ".google.container.v1.SecondaryBootDisk.Mode",
23707 ))
23708 }
23709 }
23710}
23711
23712#[serde_with::serde_as]
23715#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
23716#[serde(default, rename_all = "camelCase")]
23717#[non_exhaustive]
23718pub struct SecondaryBootDiskUpdateStrategy {
23719 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
23720 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23721}
23722
23723impl SecondaryBootDiskUpdateStrategy {
23724 pub fn new() -> Self {
23725 std::default::Default::default()
23726 }
23727}
23728
23729impl wkt::message::Message for SecondaryBootDiskUpdateStrategy {
23730 fn typename() -> &'static str {
23731 "type.googleapis.com/google.container.v1.SecondaryBootDiskUpdateStrategy"
23732 }
23733}
23734
23735#[derive(Clone, Debug, PartialEq)]
23752#[non_exhaustive]
23753pub enum PrivateIPv6GoogleAccess {
23754 PrivateIpv6GoogleAccessUnspecified,
23756 PrivateIpv6GoogleAccessDisabled,
23758 PrivateIpv6GoogleAccessToGoogle,
23760 PrivateIpv6GoogleAccessBidirectional,
23762 UnknownValue(private_i_pv_6_google_access::UnknownValue),
23767}
23768
23769#[doc(hidden)]
23770pub mod private_i_pv_6_google_access {
23771 #[allow(unused_imports)]
23772 use super::*;
23773 #[derive(Clone, Debug, PartialEq)]
23774 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23775}
23776
23777impl PrivateIPv6GoogleAccess {
23778 pub fn value(&self) -> std::option::Option<i32> {
23783 match self {
23784 Self::PrivateIpv6GoogleAccessUnspecified => std::option::Option::Some(0),
23785 Self::PrivateIpv6GoogleAccessDisabled => std::option::Option::Some(1),
23786 Self::PrivateIpv6GoogleAccessToGoogle => std::option::Option::Some(2),
23787 Self::PrivateIpv6GoogleAccessBidirectional => std::option::Option::Some(3),
23788 Self::UnknownValue(u) => u.0.value(),
23789 }
23790 }
23791
23792 pub fn name(&self) -> std::option::Option<&str> {
23797 match self {
23798 Self::PrivateIpv6GoogleAccessUnspecified => {
23799 std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED")
23800 }
23801 Self::PrivateIpv6GoogleAccessDisabled => {
23802 std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED")
23803 }
23804 Self::PrivateIpv6GoogleAccessToGoogle => {
23805 std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE")
23806 }
23807 Self::PrivateIpv6GoogleAccessBidirectional => {
23808 std::option::Option::Some("PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL")
23809 }
23810 Self::UnknownValue(u) => u.0.name(),
23811 }
23812 }
23813}
23814
23815impl std::default::Default for PrivateIPv6GoogleAccess {
23816 fn default() -> Self {
23817 use std::convert::From;
23818 Self::from(0)
23819 }
23820}
23821
23822impl std::fmt::Display for PrivateIPv6GoogleAccess {
23823 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23824 wkt::internal::display_enum(f, self.name(), self.value())
23825 }
23826}
23827
23828impl std::convert::From<i32> for PrivateIPv6GoogleAccess {
23829 fn from(value: i32) -> Self {
23830 match value {
23831 0 => Self::PrivateIpv6GoogleAccessUnspecified,
23832 1 => Self::PrivateIpv6GoogleAccessDisabled,
23833 2 => Self::PrivateIpv6GoogleAccessToGoogle,
23834 3 => Self::PrivateIpv6GoogleAccessBidirectional,
23835 _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
23836 wkt::internal::UnknownEnumValue::Integer(value),
23837 )),
23838 }
23839 }
23840}
23841
23842impl std::convert::From<&str> for PrivateIPv6GoogleAccess {
23843 fn from(value: &str) -> Self {
23844 use std::string::ToString;
23845 match value {
23846 "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" => Self::PrivateIpv6GoogleAccessUnspecified,
23847 "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" => Self::PrivateIpv6GoogleAccessDisabled,
23848 "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" => Self::PrivateIpv6GoogleAccessToGoogle,
23849 "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" => {
23850 Self::PrivateIpv6GoogleAccessBidirectional
23851 }
23852 _ => Self::UnknownValue(private_i_pv_6_google_access::UnknownValue(
23853 wkt::internal::UnknownEnumValue::String(value.to_string()),
23854 )),
23855 }
23856 }
23857}
23858
23859impl serde::ser::Serialize for PrivateIPv6GoogleAccess {
23860 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23861 where
23862 S: serde::Serializer,
23863 {
23864 match self {
23865 Self::PrivateIpv6GoogleAccessUnspecified => serializer.serialize_i32(0),
23866 Self::PrivateIpv6GoogleAccessDisabled => serializer.serialize_i32(1),
23867 Self::PrivateIpv6GoogleAccessToGoogle => serializer.serialize_i32(2),
23868 Self::PrivateIpv6GoogleAccessBidirectional => serializer.serialize_i32(3),
23869 Self::UnknownValue(u) => u.0.serialize(serializer),
23870 }
23871 }
23872}
23873
23874impl<'de> serde::de::Deserialize<'de> for PrivateIPv6GoogleAccess {
23875 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23876 where
23877 D: serde::Deserializer<'de>,
23878 {
23879 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PrivateIPv6GoogleAccess>::new(
23880 ".google.container.v1.PrivateIPv6GoogleAccess",
23881 ))
23882 }
23883}
23884
23885#[derive(Clone, Debug, PartialEq)]
23902#[non_exhaustive]
23903pub enum UpgradeResourceType {
23904 Unspecified,
23906 Master,
23908 NodePool,
23910 UnknownValue(upgrade_resource_type::UnknownValue),
23915}
23916
23917#[doc(hidden)]
23918pub mod upgrade_resource_type {
23919 #[allow(unused_imports)]
23920 use super::*;
23921 #[derive(Clone, Debug, PartialEq)]
23922 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23923}
23924
23925impl UpgradeResourceType {
23926 pub fn value(&self) -> std::option::Option<i32> {
23931 match self {
23932 Self::Unspecified => std::option::Option::Some(0),
23933 Self::Master => std::option::Option::Some(1),
23934 Self::NodePool => std::option::Option::Some(2),
23935 Self::UnknownValue(u) => u.0.value(),
23936 }
23937 }
23938
23939 pub fn name(&self) -> std::option::Option<&str> {
23944 match self {
23945 Self::Unspecified => std::option::Option::Some("UPGRADE_RESOURCE_TYPE_UNSPECIFIED"),
23946 Self::Master => std::option::Option::Some("MASTER"),
23947 Self::NodePool => std::option::Option::Some("NODE_POOL"),
23948 Self::UnknownValue(u) => u.0.name(),
23949 }
23950 }
23951}
23952
23953impl std::default::Default for UpgradeResourceType {
23954 fn default() -> Self {
23955 use std::convert::From;
23956 Self::from(0)
23957 }
23958}
23959
23960impl std::fmt::Display for UpgradeResourceType {
23961 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23962 wkt::internal::display_enum(f, self.name(), self.value())
23963 }
23964}
23965
23966impl std::convert::From<i32> for UpgradeResourceType {
23967 fn from(value: i32) -> Self {
23968 match value {
23969 0 => Self::Unspecified,
23970 1 => Self::Master,
23971 2 => Self::NodePool,
23972 _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
23973 wkt::internal::UnknownEnumValue::Integer(value),
23974 )),
23975 }
23976 }
23977}
23978
23979impl std::convert::From<&str> for UpgradeResourceType {
23980 fn from(value: &str) -> Self {
23981 use std::string::ToString;
23982 match value {
23983 "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
23984 "MASTER" => Self::Master,
23985 "NODE_POOL" => Self::NodePool,
23986 _ => Self::UnknownValue(upgrade_resource_type::UnknownValue(
23987 wkt::internal::UnknownEnumValue::String(value.to_string()),
23988 )),
23989 }
23990 }
23991}
23992
23993impl serde::ser::Serialize for UpgradeResourceType {
23994 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23995 where
23996 S: serde::Serializer,
23997 {
23998 match self {
23999 Self::Unspecified => serializer.serialize_i32(0),
24000 Self::Master => serializer.serialize_i32(1),
24001 Self::NodePool => serializer.serialize_i32(2),
24002 Self::UnknownValue(u) => u.0.serialize(serializer),
24003 }
24004 }
24005}
24006
24007impl<'de> serde::de::Deserialize<'de> for UpgradeResourceType {
24008 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24009 where
24010 D: serde::Deserializer<'de>,
24011 {
24012 deserializer.deserialize_any(wkt::internal::EnumVisitor::<UpgradeResourceType>::new(
24013 ".google.container.v1.UpgradeResourceType",
24014 ))
24015 }
24016}
24017
24018#[derive(Clone, Debug, PartialEq)]
24035#[non_exhaustive]
24036pub enum DatapathProvider {
24037 Unspecified,
24039 LegacyDatapath,
24041 AdvancedDatapath,
24046 UnknownValue(datapath_provider::UnknownValue),
24051}
24052
24053#[doc(hidden)]
24054pub mod datapath_provider {
24055 #[allow(unused_imports)]
24056 use super::*;
24057 #[derive(Clone, Debug, PartialEq)]
24058 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24059}
24060
24061impl DatapathProvider {
24062 pub fn value(&self) -> std::option::Option<i32> {
24067 match self {
24068 Self::Unspecified => std::option::Option::Some(0),
24069 Self::LegacyDatapath => std::option::Option::Some(1),
24070 Self::AdvancedDatapath => std::option::Option::Some(2),
24071 Self::UnknownValue(u) => u.0.value(),
24072 }
24073 }
24074
24075 pub fn name(&self) -> std::option::Option<&str> {
24080 match self {
24081 Self::Unspecified => std::option::Option::Some("DATAPATH_PROVIDER_UNSPECIFIED"),
24082 Self::LegacyDatapath => std::option::Option::Some("LEGACY_DATAPATH"),
24083 Self::AdvancedDatapath => std::option::Option::Some("ADVANCED_DATAPATH"),
24084 Self::UnknownValue(u) => u.0.name(),
24085 }
24086 }
24087}
24088
24089impl std::default::Default for DatapathProvider {
24090 fn default() -> Self {
24091 use std::convert::From;
24092 Self::from(0)
24093 }
24094}
24095
24096impl std::fmt::Display for DatapathProvider {
24097 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24098 wkt::internal::display_enum(f, self.name(), self.value())
24099 }
24100}
24101
24102impl std::convert::From<i32> for DatapathProvider {
24103 fn from(value: i32) -> Self {
24104 match value {
24105 0 => Self::Unspecified,
24106 1 => Self::LegacyDatapath,
24107 2 => Self::AdvancedDatapath,
24108 _ => Self::UnknownValue(datapath_provider::UnknownValue(
24109 wkt::internal::UnknownEnumValue::Integer(value),
24110 )),
24111 }
24112 }
24113}
24114
24115impl std::convert::From<&str> for DatapathProvider {
24116 fn from(value: &str) -> Self {
24117 use std::string::ToString;
24118 match value {
24119 "DATAPATH_PROVIDER_UNSPECIFIED" => Self::Unspecified,
24120 "LEGACY_DATAPATH" => Self::LegacyDatapath,
24121 "ADVANCED_DATAPATH" => Self::AdvancedDatapath,
24122 _ => Self::UnknownValue(datapath_provider::UnknownValue(
24123 wkt::internal::UnknownEnumValue::String(value.to_string()),
24124 )),
24125 }
24126 }
24127}
24128
24129impl serde::ser::Serialize for DatapathProvider {
24130 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24131 where
24132 S: serde::Serializer,
24133 {
24134 match self {
24135 Self::Unspecified => serializer.serialize_i32(0),
24136 Self::LegacyDatapath => serializer.serialize_i32(1),
24137 Self::AdvancedDatapath => serializer.serialize_i32(2),
24138 Self::UnknownValue(u) => u.0.serialize(serializer),
24139 }
24140 }
24141}
24142
24143impl<'de> serde::de::Deserialize<'de> for DatapathProvider {
24144 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24145 where
24146 D: serde::Deserializer<'de>,
24147 {
24148 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatapathProvider>::new(
24149 ".google.container.v1.DatapathProvider",
24150 ))
24151 }
24152}
24153
24154#[derive(Clone, Debug, PartialEq)]
24170#[non_exhaustive]
24171pub enum NodePoolUpdateStrategy {
24172 Unspecified,
24175 BlueGreen,
24177 Surge,
24180 UnknownValue(node_pool_update_strategy::UnknownValue),
24185}
24186
24187#[doc(hidden)]
24188pub mod node_pool_update_strategy {
24189 #[allow(unused_imports)]
24190 use super::*;
24191 #[derive(Clone, Debug, PartialEq)]
24192 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24193}
24194
24195impl NodePoolUpdateStrategy {
24196 pub fn value(&self) -> std::option::Option<i32> {
24201 match self {
24202 Self::Unspecified => std::option::Option::Some(0),
24203 Self::BlueGreen => std::option::Option::Some(2),
24204 Self::Surge => std::option::Option::Some(3),
24205 Self::UnknownValue(u) => u.0.value(),
24206 }
24207 }
24208
24209 pub fn name(&self) -> std::option::Option<&str> {
24214 match self {
24215 Self::Unspecified => std::option::Option::Some("NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"),
24216 Self::BlueGreen => std::option::Option::Some("BLUE_GREEN"),
24217 Self::Surge => std::option::Option::Some("SURGE"),
24218 Self::UnknownValue(u) => u.0.name(),
24219 }
24220 }
24221}
24222
24223impl std::default::Default for NodePoolUpdateStrategy {
24224 fn default() -> Self {
24225 use std::convert::From;
24226 Self::from(0)
24227 }
24228}
24229
24230impl std::fmt::Display for NodePoolUpdateStrategy {
24231 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24232 wkt::internal::display_enum(f, self.name(), self.value())
24233 }
24234}
24235
24236impl std::convert::From<i32> for NodePoolUpdateStrategy {
24237 fn from(value: i32) -> Self {
24238 match value {
24239 0 => Self::Unspecified,
24240 2 => Self::BlueGreen,
24241 3 => Self::Surge,
24242 _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
24243 wkt::internal::UnknownEnumValue::Integer(value),
24244 )),
24245 }
24246 }
24247}
24248
24249impl std::convert::From<&str> for NodePoolUpdateStrategy {
24250 fn from(value: &str) -> Self {
24251 use std::string::ToString;
24252 match value {
24253 "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED" => Self::Unspecified,
24254 "BLUE_GREEN" => Self::BlueGreen,
24255 "SURGE" => Self::Surge,
24256 _ => Self::UnknownValue(node_pool_update_strategy::UnknownValue(
24257 wkt::internal::UnknownEnumValue::String(value.to_string()),
24258 )),
24259 }
24260 }
24261}
24262
24263impl serde::ser::Serialize for NodePoolUpdateStrategy {
24264 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24265 where
24266 S: serde::Serializer,
24267 {
24268 match self {
24269 Self::Unspecified => serializer.serialize_i32(0),
24270 Self::BlueGreen => serializer.serialize_i32(2),
24271 Self::Surge => serializer.serialize_i32(3),
24272 Self::UnknownValue(u) => u.0.serialize(serializer),
24273 }
24274 }
24275}
24276
24277impl<'de> serde::de::Deserialize<'de> for NodePoolUpdateStrategy {
24278 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24279 where
24280 D: serde::Deserializer<'de>,
24281 {
24282 deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodePoolUpdateStrategy>::new(
24283 ".google.container.v1.NodePoolUpdateStrategy",
24284 ))
24285 }
24286}
24287
24288#[derive(Clone, Debug, PartialEq)]
24304#[non_exhaustive]
24305pub enum StackType {
24306 Unspecified,
24308 Ipv4,
24310 Ipv4Ipv6,
24312 UnknownValue(stack_type::UnknownValue),
24317}
24318
24319#[doc(hidden)]
24320pub mod stack_type {
24321 #[allow(unused_imports)]
24322 use super::*;
24323 #[derive(Clone, Debug, PartialEq)]
24324 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24325}
24326
24327impl StackType {
24328 pub fn value(&self) -> std::option::Option<i32> {
24333 match self {
24334 Self::Unspecified => std::option::Option::Some(0),
24335 Self::Ipv4 => std::option::Option::Some(1),
24336 Self::Ipv4Ipv6 => std::option::Option::Some(2),
24337 Self::UnknownValue(u) => u.0.value(),
24338 }
24339 }
24340
24341 pub fn name(&self) -> std::option::Option<&str> {
24346 match self {
24347 Self::Unspecified => std::option::Option::Some("STACK_TYPE_UNSPECIFIED"),
24348 Self::Ipv4 => std::option::Option::Some("IPV4"),
24349 Self::Ipv4Ipv6 => std::option::Option::Some("IPV4_IPV6"),
24350 Self::UnknownValue(u) => u.0.name(),
24351 }
24352 }
24353}
24354
24355impl std::default::Default for StackType {
24356 fn default() -> Self {
24357 use std::convert::From;
24358 Self::from(0)
24359 }
24360}
24361
24362impl std::fmt::Display for StackType {
24363 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24364 wkt::internal::display_enum(f, self.name(), self.value())
24365 }
24366}
24367
24368impl std::convert::From<i32> for StackType {
24369 fn from(value: i32) -> Self {
24370 match value {
24371 0 => Self::Unspecified,
24372 1 => Self::Ipv4,
24373 2 => Self::Ipv4Ipv6,
24374 _ => Self::UnknownValue(stack_type::UnknownValue(
24375 wkt::internal::UnknownEnumValue::Integer(value),
24376 )),
24377 }
24378 }
24379}
24380
24381impl std::convert::From<&str> for StackType {
24382 fn from(value: &str) -> Self {
24383 use std::string::ToString;
24384 match value {
24385 "STACK_TYPE_UNSPECIFIED" => Self::Unspecified,
24386 "IPV4" => Self::Ipv4,
24387 "IPV4_IPV6" => Self::Ipv4Ipv6,
24388 _ => Self::UnknownValue(stack_type::UnknownValue(
24389 wkt::internal::UnknownEnumValue::String(value.to_string()),
24390 )),
24391 }
24392 }
24393}
24394
24395impl serde::ser::Serialize for StackType {
24396 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24397 where
24398 S: serde::Serializer,
24399 {
24400 match self {
24401 Self::Unspecified => serializer.serialize_i32(0),
24402 Self::Ipv4 => serializer.serialize_i32(1),
24403 Self::Ipv4Ipv6 => serializer.serialize_i32(2),
24404 Self::UnknownValue(u) => u.0.serialize(serializer),
24405 }
24406 }
24407}
24408
24409impl<'de> serde::de::Deserialize<'de> for StackType {
24410 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24411 where
24412 D: serde::Deserializer<'de>,
24413 {
24414 deserializer.deserialize_any(wkt::internal::EnumVisitor::<StackType>::new(
24415 ".google.container.v1.StackType",
24416 ))
24417 }
24418}
24419
24420#[derive(Clone, Debug, PartialEq)]
24436#[non_exhaustive]
24437pub enum IPv6AccessType {
24438 Ipv6AccessTypeUnspecified,
24440 Internal,
24442 External,
24444 UnknownValue(i_pv_6_access_type::UnknownValue),
24449}
24450
24451#[doc(hidden)]
24452pub mod i_pv_6_access_type {
24453 #[allow(unused_imports)]
24454 use super::*;
24455 #[derive(Clone, Debug, PartialEq)]
24456 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24457}
24458
24459impl IPv6AccessType {
24460 pub fn value(&self) -> std::option::Option<i32> {
24465 match self {
24466 Self::Ipv6AccessTypeUnspecified => std::option::Option::Some(0),
24467 Self::Internal => std::option::Option::Some(1),
24468 Self::External => std::option::Option::Some(2),
24469 Self::UnknownValue(u) => u.0.value(),
24470 }
24471 }
24472
24473 pub fn name(&self) -> std::option::Option<&str> {
24478 match self {
24479 Self::Ipv6AccessTypeUnspecified => {
24480 std::option::Option::Some("IPV6_ACCESS_TYPE_UNSPECIFIED")
24481 }
24482 Self::Internal => std::option::Option::Some("INTERNAL"),
24483 Self::External => std::option::Option::Some("EXTERNAL"),
24484 Self::UnknownValue(u) => u.0.name(),
24485 }
24486 }
24487}
24488
24489impl std::default::Default for IPv6AccessType {
24490 fn default() -> Self {
24491 use std::convert::From;
24492 Self::from(0)
24493 }
24494}
24495
24496impl std::fmt::Display for IPv6AccessType {
24497 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24498 wkt::internal::display_enum(f, self.name(), self.value())
24499 }
24500}
24501
24502impl std::convert::From<i32> for IPv6AccessType {
24503 fn from(value: i32) -> Self {
24504 match value {
24505 0 => Self::Ipv6AccessTypeUnspecified,
24506 1 => Self::Internal,
24507 2 => Self::External,
24508 _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
24509 wkt::internal::UnknownEnumValue::Integer(value),
24510 )),
24511 }
24512 }
24513}
24514
24515impl std::convert::From<&str> for IPv6AccessType {
24516 fn from(value: &str) -> Self {
24517 use std::string::ToString;
24518 match value {
24519 "IPV6_ACCESS_TYPE_UNSPECIFIED" => Self::Ipv6AccessTypeUnspecified,
24520 "INTERNAL" => Self::Internal,
24521 "EXTERNAL" => Self::External,
24522 _ => Self::UnknownValue(i_pv_6_access_type::UnknownValue(
24523 wkt::internal::UnknownEnumValue::String(value.to_string()),
24524 )),
24525 }
24526 }
24527}
24528
24529impl serde::ser::Serialize for IPv6AccessType {
24530 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24531 where
24532 S: serde::Serializer,
24533 {
24534 match self {
24535 Self::Ipv6AccessTypeUnspecified => serializer.serialize_i32(0),
24536 Self::Internal => serializer.serialize_i32(1),
24537 Self::External => serializer.serialize_i32(2),
24538 Self::UnknownValue(u) => u.0.serialize(serializer),
24539 }
24540 }
24541}
24542
24543impl<'de> serde::de::Deserialize<'de> for IPv6AccessType {
24544 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24545 where
24546 D: serde::Deserializer<'de>,
24547 {
24548 deserializer.deserialize_any(wkt::internal::EnumVisitor::<IPv6AccessType>::new(
24549 ".google.container.v1.IPv6AccessType",
24550 ))
24551 }
24552}
24553
24554#[derive(Clone, Debug, PartialEq)]
24570#[non_exhaustive]
24571pub enum InTransitEncryptionConfig {
24572 Unspecified,
24575 InTransitEncryptionDisabled,
24577 InTransitEncryptionInterNodeTransparent,
24579 UnknownValue(in_transit_encryption_config::UnknownValue),
24584}
24585
24586#[doc(hidden)]
24587pub mod in_transit_encryption_config {
24588 #[allow(unused_imports)]
24589 use super::*;
24590 #[derive(Clone, Debug, PartialEq)]
24591 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24592}
24593
24594impl InTransitEncryptionConfig {
24595 pub fn value(&self) -> std::option::Option<i32> {
24600 match self {
24601 Self::Unspecified => std::option::Option::Some(0),
24602 Self::InTransitEncryptionDisabled => std::option::Option::Some(1),
24603 Self::InTransitEncryptionInterNodeTransparent => std::option::Option::Some(2),
24604 Self::UnknownValue(u) => u.0.value(),
24605 }
24606 }
24607
24608 pub fn name(&self) -> std::option::Option<&str> {
24613 match self {
24614 Self::Unspecified => {
24615 std::option::Option::Some("IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED")
24616 }
24617 Self::InTransitEncryptionDisabled => {
24618 std::option::Option::Some("IN_TRANSIT_ENCRYPTION_DISABLED")
24619 }
24620 Self::InTransitEncryptionInterNodeTransparent => {
24621 std::option::Option::Some("IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT")
24622 }
24623 Self::UnknownValue(u) => u.0.name(),
24624 }
24625 }
24626}
24627
24628impl std::default::Default for InTransitEncryptionConfig {
24629 fn default() -> Self {
24630 use std::convert::From;
24631 Self::from(0)
24632 }
24633}
24634
24635impl std::fmt::Display for InTransitEncryptionConfig {
24636 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24637 wkt::internal::display_enum(f, self.name(), self.value())
24638 }
24639}
24640
24641impl std::convert::From<i32> for InTransitEncryptionConfig {
24642 fn from(value: i32) -> Self {
24643 match value {
24644 0 => Self::Unspecified,
24645 1 => Self::InTransitEncryptionDisabled,
24646 2 => Self::InTransitEncryptionInterNodeTransparent,
24647 _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
24648 wkt::internal::UnknownEnumValue::Integer(value),
24649 )),
24650 }
24651 }
24652}
24653
24654impl std::convert::From<&str> for InTransitEncryptionConfig {
24655 fn from(value: &str) -> Self {
24656 use std::string::ToString;
24657 match value {
24658 "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" => Self::Unspecified,
24659 "IN_TRANSIT_ENCRYPTION_DISABLED" => Self::InTransitEncryptionDisabled,
24660 "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" => {
24661 Self::InTransitEncryptionInterNodeTransparent
24662 }
24663 _ => Self::UnknownValue(in_transit_encryption_config::UnknownValue(
24664 wkt::internal::UnknownEnumValue::String(value.to_string()),
24665 )),
24666 }
24667 }
24668}
24669
24670impl serde::ser::Serialize for InTransitEncryptionConfig {
24671 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24672 where
24673 S: serde::Serializer,
24674 {
24675 match self {
24676 Self::Unspecified => serializer.serialize_i32(0),
24677 Self::InTransitEncryptionDisabled => serializer.serialize_i32(1),
24678 Self::InTransitEncryptionInterNodeTransparent => serializer.serialize_i32(2),
24679 Self::UnknownValue(u) => u.0.serialize(serializer),
24680 }
24681 }
24682}
24683
24684impl<'de> serde::de::Deserialize<'de> for InTransitEncryptionConfig {
24685 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24686 where
24687 D: serde::Deserializer<'de>,
24688 {
24689 deserializer.deserialize_any(
24690 wkt::internal::EnumVisitor::<InTransitEncryptionConfig>::new(
24691 ".google.container.v1.InTransitEncryptionConfig",
24692 ),
24693 )
24694 }
24695}