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 location;
26extern crate longrunning;
27extern crate lro;
28extern crate reqwest;
29extern crate rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37#[serde_with::serde_as]
39#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
40#[serde(default, rename_all = "camelCase")]
41#[non_exhaustive]
42pub struct Cluster {
43 #[serde(skip_serializing_if = "std::string::String::is_empty")]
45 pub name: std::string::String,
46
47 #[serde(skip_serializing_if = "std::option::Option::is_none")]
49 pub create_time: std::option::Option<wkt::Timestamp>,
50
51 #[serde(skip_serializing_if = "std::option::Option::is_none")]
53 pub update_time: std::option::Option<wkt::Timestamp>,
54
55 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
57 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
58
59 #[serde(skip_serializing_if = "std::option::Option::is_none")]
61 pub fleet: std::option::Option<crate::model::Fleet>,
62
63 #[serde(skip_serializing_if = "std::option::Option::is_none")]
65 pub networking: std::option::Option<crate::model::ClusterNetworking>,
66
67 #[serde(skip_serializing_if = "std::option::Option::is_none")]
69 pub authorization: std::option::Option<crate::model::Authorization>,
70
71 pub default_max_pods_per_node: i32,
75
76 #[serde(skip_serializing_if = "std::string::String::is_empty")]
78 pub endpoint: std::string::String,
79
80 pub port: i32,
82
83 #[serde(skip_serializing_if = "std::string::String::is_empty")]
85 pub cluster_ca_certificate: std::string::String,
86
87 #[serde(skip_serializing_if = "std::option::Option::is_none")]
89 pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
90
91 #[serde(skip_serializing_if = "std::string::String::is_empty")]
93 pub control_plane_version: std::string::String,
94
95 #[serde(skip_serializing_if = "std::string::String::is_empty")]
98 pub node_version: std::string::String,
99
100 #[serde(skip_serializing_if = "std::option::Option::is_none")]
102 pub control_plane: std::option::Option<crate::model::cluster::ControlPlane>,
103
104 #[serde(skip_serializing_if = "std::option::Option::is_none")]
106 pub system_addons_config: std::option::Option<crate::model::cluster::SystemAddonsConfig>,
107
108 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
111 pub external_load_balancer_ipv4_address_pools: std::vec::Vec<std::string::String>,
112
113 #[serde(skip_serializing_if = "std::option::Option::is_none")]
116 pub control_plane_encryption:
117 std::option::Option<crate::model::cluster::ControlPlaneEncryption>,
118
119 pub status: crate::model::cluster::Status,
121
122 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
126 pub maintenance_events: std::vec::Vec<crate::model::cluster::MaintenanceEvent>,
127
128 #[serde(skip_serializing_if = "std::string::String::is_empty")]
130 pub target_version: std::string::String,
131
132 pub release_channel: crate::model::cluster::ReleaseChannel,
134
135 #[serde(skip_serializing_if = "std::option::Option::is_none")]
139 pub survivability_config: std::option::Option<crate::model::cluster::SurvivabilityConfig>,
140
141 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
144 pub external_load_balancer_ipv6_address_pools: std::vec::Vec<std::string::String>,
145
146 #[serde(skip_serializing_if = "std::option::Option::is_none")]
148 pub connection_state: std::option::Option<crate::model::cluster::ConnectionState>,
149
150 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
151 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
152}
153
154impl Cluster {
155 pub fn new() -> Self {
156 std::default::Default::default()
157 }
158
159 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
161 self.name = v.into();
162 self
163 }
164
165 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
167 mut self,
168 v: T,
169 ) -> Self {
170 self.create_time = v.into();
171 self
172 }
173
174 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
176 mut self,
177 v: T,
178 ) -> Self {
179 self.update_time = v.into();
180 self
181 }
182
183 pub fn set_fleet<T: std::convert::Into<std::option::Option<crate::model::Fleet>>>(
185 mut self,
186 v: T,
187 ) -> Self {
188 self.fleet = v.into();
189 self
190 }
191
192 pub fn set_networking<
194 T: std::convert::Into<std::option::Option<crate::model::ClusterNetworking>>,
195 >(
196 mut self,
197 v: T,
198 ) -> Self {
199 self.networking = v.into();
200 self
201 }
202
203 pub fn set_authorization<
205 T: std::convert::Into<std::option::Option<crate::model::Authorization>>,
206 >(
207 mut self,
208 v: T,
209 ) -> Self {
210 self.authorization = v.into();
211 self
212 }
213
214 pub fn set_default_max_pods_per_node<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
216 self.default_max_pods_per_node = v.into();
217 self
218 }
219
220 pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
222 self.endpoint = v.into();
223 self
224 }
225
226 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
228 self.port = v.into();
229 self
230 }
231
232 pub fn set_cluster_ca_certificate<T: std::convert::Into<std::string::String>>(
234 mut self,
235 v: T,
236 ) -> Self {
237 self.cluster_ca_certificate = v.into();
238 self
239 }
240
241 pub fn set_maintenance_policy<
243 T: std::convert::Into<std::option::Option<crate::model::MaintenancePolicy>>,
244 >(
245 mut self,
246 v: T,
247 ) -> Self {
248 self.maintenance_policy = v.into();
249 self
250 }
251
252 pub fn set_control_plane_version<T: std::convert::Into<std::string::String>>(
254 mut self,
255 v: T,
256 ) -> Self {
257 self.control_plane_version = v.into();
258 self
259 }
260
261 pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
263 self.node_version = v.into();
264 self
265 }
266
267 pub fn set_control_plane<
269 T: std::convert::Into<std::option::Option<crate::model::cluster::ControlPlane>>,
270 >(
271 mut self,
272 v: T,
273 ) -> Self {
274 self.control_plane = v.into();
275 self
276 }
277
278 pub fn set_system_addons_config<
280 T: std::convert::Into<std::option::Option<crate::model::cluster::SystemAddonsConfig>>,
281 >(
282 mut self,
283 v: T,
284 ) -> Self {
285 self.system_addons_config = v.into();
286 self
287 }
288
289 pub fn set_control_plane_encryption<
291 T: std::convert::Into<std::option::Option<crate::model::cluster::ControlPlaneEncryption>>,
292 >(
293 mut self,
294 v: T,
295 ) -> Self {
296 self.control_plane_encryption = v.into();
297 self
298 }
299
300 pub fn set_status<T: std::convert::Into<crate::model::cluster::Status>>(
302 mut self,
303 v: T,
304 ) -> Self {
305 self.status = v.into();
306 self
307 }
308
309 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
311 self.target_version = v.into();
312 self
313 }
314
315 pub fn set_release_channel<T: std::convert::Into<crate::model::cluster::ReleaseChannel>>(
317 mut self,
318 v: T,
319 ) -> Self {
320 self.release_channel = v.into();
321 self
322 }
323
324 pub fn set_survivability_config<
326 T: std::convert::Into<std::option::Option<crate::model::cluster::SurvivabilityConfig>>,
327 >(
328 mut self,
329 v: T,
330 ) -> Self {
331 self.survivability_config = v.into();
332 self
333 }
334
335 pub fn set_connection_state<
337 T: std::convert::Into<std::option::Option<crate::model::cluster::ConnectionState>>,
338 >(
339 mut self,
340 v: T,
341 ) -> Self {
342 self.connection_state = v.into();
343 self
344 }
345
346 pub fn set_external_load_balancer_ipv4_address_pools<T, V>(mut self, v: T) -> Self
348 where
349 T: std::iter::IntoIterator<Item = V>,
350 V: std::convert::Into<std::string::String>,
351 {
352 use std::iter::Iterator;
353 self.external_load_balancer_ipv4_address_pools = v.into_iter().map(|i| i.into()).collect();
354 self
355 }
356
357 pub fn set_maintenance_events<T, V>(mut self, v: T) -> Self
359 where
360 T: std::iter::IntoIterator<Item = V>,
361 V: std::convert::Into<crate::model::cluster::MaintenanceEvent>,
362 {
363 use std::iter::Iterator;
364 self.maintenance_events = v.into_iter().map(|i| i.into()).collect();
365 self
366 }
367
368 pub fn set_external_load_balancer_ipv6_address_pools<T, V>(mut self, v: T) -> Self
370 where
371 T: std::iter::IntoIterator<Item = V>,
372 V: std::convert::Into<std::string::String>,
373 {
374 use std::iter::Iterator;
375 self.external_load_balancer_ipv6_address_pools = v.into_iter().map(|i| i.into()).collect();
376 self
377 }
378
379 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
381 where
382 T: std::iter::IntoIterator<Item = (K, V)>,
383 K: std::convert::Into<std::string::String>,
384 V: std::convert::Into<std::string::String>,
385 {
386 use std::iter::Iterator;
387 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
388 self
389 }
390}
391
392impl wkt::message::Message for Cluster {
393 fn typename() -> &'static str {
394 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster"
395 }
396}
397
398pub mod cluster {
400 #[allow(unused_imports)]
401 use super::*;
402
403 #[serde_with::serde_as]
405 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
406 #[serde(default, rename_all = "camelCase")]
407 #[non_exhaustive]
408 pub struct ControlPlane {
409 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
410 pub config: std::option::Option<crate::model::cluster::control_plane::Config>,
411
412 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
413 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
414 }
415
416 impl ControlPlane {
417 pub fn new() -> Self {
418 std::default::Default::default()
419 }
420
421 pub fn set_config<
426 T: std::convert::Into<std::option::Option<crate::model::cluster::control_plane::Config>>,
427 >(
428 mut self,
429 v: T,
430 ) -> Self {
431 self.config = v.into();
432 self
433 }
434
435 pub fn remote(
439 &self,
440 ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::control_plane::Remote>>
441 {
442 #[allow(unreachable_patterns)]
443 self.config.as_ref().and_then(|v| match v {
444 crate::model::cluster::control_plane::Config::Remote(v) => {
445 std::option::Option::Some(v)
446 }
447 _ => std::option::Option::None,
448 })
449 }
450
451 pub fn local(
455 &self,
456 ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::control_plane::Local>>
457 {
458 #[allow(unreachable_patterns)]
459 self.config.as_ref().and_then(|v| match v {
460 crate::model::cluster::control_plane::Config::Local(v) => {
461 std::option::Option::Some(v)
462 }
463 _ => std::option::Option::None,
464 })
465 }
466
467 pub fn set_remote<
473 T: std::convert::Into<std::boxed::Box<crate::model::cluster::control_plane::Remote>>,
474 >(
475 mut self,
476 v: T,
477 ) -> Self {
478 self.config = std::option::Option::Some(
479 crate::model::cluster::control_plane::Config::Remote(v.into()),
480 );
481 self
482 }
483
484 pub fn set_local<
490 T: std::convert::Into<std::boxed::Box<crate::model::cluster::control_plane::Local>>,
491 >(
492 mut self,
493 v: T,
494 ) -> Self {
495 self.config = std::option::Option::Some(
496 crate::model::cluster::control_plane::Config::Local(v.into()),
497 );
498 self
499 }
500 }
501
502 impl wkt::message::Message for ControlPlane {
503 fn typename() -> &'static str {
504 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane"
505 }
506 }
507
508 pub mod control_plane {
510 #[allow(unused_imports)]
511 use super::*;
512
513 #[serde_with::serde_as]
515 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
516 #[serde(default, rename_all = "camelCase")]
517 #[non_exhaustive]
518 pub struct Remote {
519 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
520 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
521 }
522
523 impl Remote {
524 pub fn new() -> Self {
525 std::default::Default::default()
526 }
527 }
528
529 impl wkt::message::Message for Remote {
530 fn typename() -> &'static str {
531 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane.Remote"
532 }
533 }
534
535 #[serde_with::serde_as]
543 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
544 #[serde(default, rename_all = "camelCase")]
545 #[non_exhaustive]
546 pub struct Local {
547 #[serde(skip_serializing_if = "std::string::String::is_empty")]
550 pub node_location: std::string::String,
551
552 pub node_count: i32,
554
555 #[serde(skip_serializing_if = "std::string::String::is_empty")]
559 pub machine_filter: std::string::String,
560
561 pub shared_deployment_policy:
563 crate::model::cluster::control_plane::SharedDeploymentPolicy,
564
565 #[serde(skip_serializing_if = "std::string::String::is_empty")]
571 pub control_plane_node_storage_schema: std::string::String,
572
573 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
574 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
575 }
576
577 impl Local {
578 pub fn new() -> Self {
579 std::default::Default::default()
580 }
581
582 pub fn set_node_location<T: std::convert::Into<std::string::String>>(
584 mut self,
585 v: T,
586 ) -> Self {
587 self.node_location = v.into();
588 self
589 }
590
591 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
593 self.node_count = v.into();
594 self
595 }
596
597 pub fn set_machine_filter<T: std::convert::Into<std::string::String>>(
599 mut self,
600 v: T,
601 ) -> Self {
602 self.machine_filter = v.into();
603 self
604 }
605
606 pub fn set_shared_deployment_policy<
608 T: std::convert::Into<crate::model::cluster::control_plane::SharedDeploymentPolicy>,
609 >(
610 mut self,
611 v: T,
612 ) -> Self {
613 self.shared_deployment_policy = v.into();
614 self
615 }
616
617 pub fn set_control_plane_node_storage_schema<
619 T: std::convert::Into<std::string::String>,
620 >(
621 mut self,
622 v: T,
623 ) -> Self {
624 self.control_plane_node_storage_schema = v.into();
625 self
626 }
627 }
628
629 impl wkt::message::Message for Local {
630 fn typename() -> &'static str {
631 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane.Local"
632 }
633 }
634
635 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
638 pub struct SharedDeploymentPolicy(i32);
639
640 impl SharedDeploymentPolicy {
641 pub const SHARED_DEPLOYMENT_POLICY_UNSPECIFIED: SharedDeploymentPolicy =
643 SharedDeploymentPolicy::new(0);
644
645 pub const ALLOWED: SharedDeploymentPolicy = SharedDeploymentPolicy::new(1);
648
649 pub const DISALLOWED: SharedDeploymentPolicy = SharedDeploymentPolicy::new(2);
652
653 pub(crate) const fn new(value: i32) -> Self {
655 Self(value)
656 }
657
658 pub fn value(&self) -> i32 {
660 self.0
661 }
662
663 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
665 match self.0 {
666 0 => std::borrow::Cow::Borrowed("SHARED_DEPLOYMENT_POLICY_UNSPECIFIED"),
667 1 => std::borrow::Cow::Borrowed("ALLOWED"),
668 2 => std::borrow::Cow::Borrowed("DISALLOWED"),
669 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
670 }
671 }
672
673 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
675 match name {
676 "SHARED_DEPLOYMENT_POLICY_UNSPECIFIED" => {
677 std::option::Option::Some(Self::SHARED_DEPLOYMENT_POLICY_UNSPECIFIED)
678 }
679 "ALLOWED" => std::option::Option::Some(Self::ALLOWED),
680 "DISALLOWED" => std::option::Option::Some(Self::DISALLOWED),
681 _ => std::option::Option::None,
682 }
683 }
684 }
685
686 impl std::convert::From<i32> for SharedDeploymentPolicy {
687 fn from(value: i32) -> Self {
688 Self::new(value)
689 }
690 }
691
692 impl std::default::Default for SharedDeploymentPolicy {
693 fn default() -> Self {
694 Self::new(0)
695 }
696 }
697
698 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
699 #[serde(rename_all = "camelCase")]
700 #[non_exhaustive]
701 pub enum Config {
702 Remote(std::boxed::Box<crate::model::cluster::control_plane::Remote>),
704 Local(std::boxed::Box<crate::model::cluster::control_plane::Local>),
712 }
713 }
714
715 #[serde_with::serde_as]
717 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
718 #[serde(default, rename_all = "camelCase")]
719 #[non_exhaustive]
720 pub struct SystemAddonsConfig {
721 #[serde(skip_serializing_if = "std::option::Option::is_none")]
723 pub ingress: std::option::Option<crate::model::cluster::system_addons_config::Ingress>,
724
725 #[serde(skip_serializing_if = "std::option::Option::is_none")]
727 pub vm_service_config:
728 std::option::Option<crate::model::cluster::system_addons_config::VMServiceConfig>,
729
730 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
731 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
732 }
733
734 impl SystemAddonsConfig {
735 pub fn new() -> Self {
736 std::default::Default::default()
737 }
738
739 pub fn set_ingress<
741 T: std::convert::Into<
742 std::option::Option<crate::model::cluster::system_addons_config::Ingress>,
743 >,
744 >(
745 mut self,
746 v: T,
747 ) -> Self {
748 self.ingress = v.into();
749 self
750 }
751
752 pub fn set_vm_service_config<
754 T: std::convert::Into<
755 std::option::Option<
756 crate::model::cluster::system_addons_config::VMServiceConfig,
757 >,
758 >,
759 >(
760 mut self,
761 v: T,
762 ) -> Self {
763 self.vm_service_config = v.into();
764 self
765 }
766 }
767
768 impl wkt::message::Message for SystemAddonsConfig {
769 fn typename() -> &'static str {
770 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig"
771 }
772 }
773
774 pub mod system_addons_config {
776 #[allow(unused_imports)]
777 use super::*;
778
779 #[serde_with::serde_as]
783 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
784 #[serde(default, rename_all = "camelCase")]
785 #[non_exhaustive]
786 pub struct Ingress {
787 pub disabled: bool,
789
790 #[serde(skip_serializing_if = "std::string::String::is_empty")]
792 pub ipv4_vip: std::string::String,
793
794 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
795 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
796 }
797
798 impl Ingress {
799 pub fn new() -> Self {
800 std::default::Default::default()
801 }
802
803 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
805 self.disabled = v.into();
806 self
807 }
808
809 pub fn set_ipv4_vip<T: std::convert::Into<std::string::String>>(
811 mut self,
812 v: T,
813 ) -> Self {
814 self.ipv4_vip = v.into();
815 self
816 }
817 }
818
819 impl wkt::message::Message for Ingress {
820 fn typename() -> &'static str {
821 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig.Ingress"
822 }
823 }
824
825 #[serde_with::serde_as]
827 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
828 #[serde(default, rename_all = "camelCase")]
829 #[non_exhaustive]
830 pub struct VMServiceConfig {
831 pub vmm_enabled: bool,
833
834 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
835 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
836 }
837
838 impl VMServiceConfig {
839 pub fn new() -> Self {
840 std::default::Default::default()
841 }
842
843 pub fn set_vmm_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
845 self.vmm_enabled = v.into();
846 self
847 }
848 }
849
850 impl wkt::message::Message for VMServiceConfig {
851 fn typename() -> &'static str {
852 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig.VMServiceConfig"
853 }
854 }
855 }
856
857 #[serde_with::serde_as]
859 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
860 #[serde(default, rename_all = "camelCase")]
861 #[non_exhaustive]
862 pub struct ControlPlaneEncryption {
863 #[serde(skip_serializing_if = "std::string::String::is_empty")]
868 pub kms_key: std::string::String,
869
870 #[serde(skip_serializing_if = "std::string::String::is_empty")]
873 pub kms_key_active_version: std::string::String,
874
875 pub kms_key_state: crate::model::KmsKeyState,
880
881 #[serde(skip_serializing_if = "std::option::Option::is_none")]
886 pub kms_status: std::option::Option<rpc::model::Status>,
887
888 pub resource_state: crate::model::ResourceState,
890
891 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
892 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
893 }
894
895 impl ControlPlaneEncryption {
896 pub fn new() -> Self {
897 std::default::Default::default()
898 }
899
900 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
902 self.kms_key = v.into();
903 self
904 }
905
906 pub fn set_kms_key_active_version<T: std::convert::Into<std::string::String>>(
908 mut self,
909 v: T,
910 ) -> Self {
911 self.kms_key_active_version = v.into();
912 self
913 }
914
915 pub fn set_kms_key_state<T: std::convert::Into<crate::model::KmsKeyState>>(
917 mut self,
918 v: T,
919 ) -> Self {
920 self.kms_key_state = v.into();
921 self
922 }
923
924 pub fn set_kms_status<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
926 mut self,
927 v: T,
928 ) -> Self {
929 self.kms_status = v.into();
930 self
931 }
932
933 pub fn set_resource_state<T: std::convert::Into<crate::model::ResourceState>>(
935 mut self,
936 v: T,
937 ) -> Self {
938 self.resource_state = v.into();
939 self
940 }
941 }
942
943 impl wkt::message::Message for ControlPlaneEncryption {
944 fn typename() -> &'static str {
945 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlaneEncryption"
946 }
947 }
948
949 #[serde_with::serde_as]
954 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
955 #[serde(default, rename_all = "camelCase")]
956 #[non_exhaustive]
957 pub struct MaintenanceEvent {
958 #[serde(skip_serializing_if = "std::string::String::is_empty")]
960 pub uuid: std::string::String,
961
962 #[serde(skip_serializing_if = "std::string::String::is_empty")]
964 pub target_version: std::string::String,
965
966 #[serde(skip_serializing_if = "std::string::String::is_empty")]
971 pub operation: std::string::String,
972
973 #[serde(rename = "type")]
975 pub r#type: crate::model::cluster::maintenance_event::Type,
976
977 pub schedule: crate::model::cluster::maintenance_event::Schedule,
979
980 pub state: crate::model::cluster::maintenance_event::State,
982
983 #[serde(skip_serializing_if = "std::option::Option::is_none")]
985 pub create_time: std::option::Option<wkt::Timestamp>,
986
987 #[serde(skip_serializing_if = "std::option::Option::is_none")]
989 pub start_time: std::option::Option<wkt::Timestamp>,
990
991 #[serde(skip_serializing_if = "std::option::Option::is_none")]
995 pub end_time: std::option::Option<wkt::Timestamp>,
996
997 #[serde(skip_serializing_if = "std::option::Option::is_none")]
999 pub update_time: std::option::Option<wkt::Timestamp>,
1000
1001 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1002 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1003 }
1004
1005 impl MaintenanceEvent {
1006 pub fn new() -> Self {
1007 std::default::Default::default()
1008 }
1009
1010 pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1012 self.uuid = v.into();
1013 self
1014 }
1015
1016 pub fn set_target_version<T: std::convert::Into<std::string::String>>(
1018 mut self,
1019 v: T,
1020 ) -> Self {
1021 self.target_version = v.into();
1022 self
1023 }
1024
1025 pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1027 self.operation = v.into();
1028 self
1029 }
1030
1031 pub fn set_type<T: std::convert::Into<crate::model::cluster::maintenance_event::Type>>(
1033 mut self,
1034 v: T,
1035 ) -> Self {
1036 self.r#type = v.into();
1037 self
1038 }
1039
1040 pub fn set_schedule<
1042 T: std::convert::Into<crate::model::cluster::maintenance_event::Schedule>,
1043 >(
1044 mut self,
1045 v: T,
1046 ) -> Self {
1047 self.schedule = v.into();
1048 self
1049 }
1050
1051 pub fn set_state<T: std::convert::Into<crate::model::cluster::maintenance_event::State>>(
1053 mut self,
1054 v: T,
1055 ) -> Self {
1056 self.state = v.into();
1057 self
1058 }
1059
1060 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1062 mut self,
1063 v: T,
1064 ) -> Self {
1065 self.create_time = v.into();
1066 self
1067 }
1068
1069 pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1071 mut self,
1072 v: T,
1073 ) -> Self {
1074 self.start_time = v.into();
1075 self
1076 }
1077
1078 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1080 mut self,
1081 v: T,
1082 ) -> Self {
1083 self.end_time = v.into();
1084 self
1085 }
1086
1087 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1089 mut self,
1090 v: T,
1091 ) -> Self {
1092 self.update_time = v.into();
1093 self
1094 }
1095 }
1096
1097 impl wkt::message::Message for MaintenanceEvent {
1098 fn typename() -> &'static str {
1099 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.MaintenanceEvent"
1100 }
1101 }
1102
1103 pub mod maintenance_event {
1105 #[allow(unused_imports)]
1106 use super::*;
1107
1108 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
1110 pub struct Type(i32);
1111
1112 impl Type {
1113 pub const TYPE_UNSPECIFIED: Type = Type::new(0);
1115
1116 pub const USER_INITIATED_UPGRADE: Type = Type::new(1);
1118
1119 pub const GOOGLE_DRIVEN_UPGRADE: Type = Type::new(2);
1121
1122 pub(crate) const fn new(value: i32) -> Self {
1124 Self(value)
1125 }
1126
1127 pub fn value(&self) -> i32 {
1129 self.0
1130 }
1131
1132 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
1134 match self.0 {
1135 0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
1136 1 => std::borrow::Cow::Borrowed("USER_INITIATED_UPGRADE"),
1137 2 => std::borrow::Cow::Borrowed("GOOGLE_DRIVEN_UPGRADE"),
1138 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
1139 }
1140 }
1141
1142 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
1144 match name {
1145 "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
1146 "USER_INITIATED_UPGRADE" => {
1147 std::option::Option::Some(Self::USER_INITIATED_UPGRADE)
1148 }
1149 "GOOGLE_DRIVEN_UPGRADE" => {
1150 std::option::Option::Some(Self::GOOGLE_DRIVEN_UPGRADE)
1151 }
1152 _ => std::option::Option::None,
1153 }
1154 }
1155 }
1156
1157 impl std::convert::From<i32> for Type {
1158 fn from(value: i32) -> Self {
1159 Self::new(value)
1160 }
1161 }
1162
1163 impl std::default::Default for Type {
1164 fn default() -> Self {
1165 Self::new(0)
1166 }
1167 }
1168
1169 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
1171 pub struct Schedule(i32);
1172
1173 impl Schedule {
1174 pub const SCHEDULE_UNSPECIFIED: Schedule = Schedule::new(0);
1176
1177 pub const IMMEDIATELY: Schedule = Schedule::new(1);
1179
1180 pub(crate) const fn new(value: i32) -> Self {
1182 Self(value)
1183 }
1184
1185 pub fn value(&self) -> i32 {
1187 self.0
1188 }
1189
1190 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
1192 match self.0 {
1193 0 => std::borrow::Cow::Borrowed("SCHEDULE_UNSPECIFIED"),
1194 1 => std::borrow::Cow::Borrowed("IMMEDIATELY"),
1195 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
1196 }
1197 }
1198
1199 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
1201 match name {
1202 "SCHEDULE_UNSPECIFIED" => std::option::Option::Some(Self::SCHEDULE_UNSPECIFIED),
1203 "IMMEDIATELY" => std::option::Option::Some(Self::IMMEDIATELY),
1204 _ => std::option::Option::None,
1205 }
1206 }
1207 }
1208
1209 impl std::convert::From<i32> for Schedule {
1210 fn from(value: i32) -> Self {
1211 Self::new(value)
1212 }
1213 }
1214
1215 impl std::default::Default for Schedule {
1216 fn default() -> Self {
1217 Self::new(0)
1218 }
1219 }
1220
1221 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
1223 pub struct State(i32);
1224
1225 impl State {
1226 pub const STATE_UNSPECIFIED: State = State::new(0);
1228
1229 pub const RECONCILING: State = State::new(1);
1231
1232 pub const SUCCEEDED: State = State::new(2);
1234
1235 pub const FAILED: State = State::new(3);
1237
1238 pub(crate) const fn new(value: i32) -> Self {
1240 Self(value)
1241 }
1242
1243 pub fn value(&self) -> i32 {
1245 self.0
1246 }
1247
1248 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
1250 match self.0 {
1251 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
1252 1 => std::borrow::Cow::Borrowed("RECONCILING"),
1253 2 => std::borrow::Cow::Borrowed("SUCCEEDED"),
1254 3 => std::borrow::Cow::Borrowed("FAILED"),
1255 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
1256 }
1257 }
1258
1259 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
1261 match name {
1262 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
1263 "RECONCILING" => std::option::Option::Some(Self::RECONCILING),
1264 "SUCCEEDED" => std::option::Option::Some(Self::SUCCEEDED),
1265 "FAILED" => std::option::Option::Some(Self::FAILED),
1266 _ => std::option::Option::None,
1267 }
1268 }
1269 }
1270
1271 impl std::convert::From<i32> for State {
1272 fn from(value: i32) -> Self {
1273 Self::new(value)
1274 }
1275 }
1276
1277 impl std::default::Default for State {
1278 fn default() -> Self {
1279 Self::new(0)
1280 }
1281 }
1282 }
1283
1284 #[serde_with::serde_as]
1287 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1288 #[serde(default, rename_all = "camelCase")]
1289 #[non_exhaustive]
1290 pub struct SurvivabilityConfig {
1291 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1295 pub offline_reboot_ttl: std::option::Option<wkt::Duration>,
1296
1297 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1298 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1299 }
1300
1301 impl SurvivabilityConfig {
1302 pub fn new() -> Self {
1303 std::default::Default::default()
1304 }
1305
1306 pub fn set_offline_reboot_ttl<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
1308 mut self,
1309 v: T,
1310 ) -> Self {
1311 self.offline_reboot_ttl = v.into();
1312 self
1313 }
1314 }
1315
1316 impl wkt::message::Message for SurvivabilityConfig {
1317 fn typename() -> &'static str {
1318 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SurvivabilityConfig"
1319 }
1320 }
1321
1322 #[serde_with::serde_as]
1325 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1326 #[serde(default, rename_all = "camelCase")]
1327 #[non_exhaustive]
1328 pub struct ConnectionState {
1329 pub state: crate::model::cluster::connection_state::State,
1331
1332 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1334 pub update_time: std::option::Option<wkt::Timestamp>,
1335
1336 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1337 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1338 }
1339
1340 impl ConnectionState {
1341 pub fn new() -> Self {
1342 std::default::Default::default()
1343 }
1344
1345 pub fn set_state<T: std::convert::Into<crate::model::cluster::connection_state::State>>(
1347 mut self,
1348 v: T,
1349 ) -> Self {
1350 self.state = v.into();
1351 self
1352 }
1353
1354 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1356 mut self,
1357 v: T,
1358 ) -> Self {
1359 self.update_time = v.into();
1360 self
1361 }
1362 }
1363
1364 impl wkt::message::Message for ConnectionState {
1365 fn typename() -> &'static str {
1366 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ConnectionState"
1367 }
1368 }
1369
1370 pub mod connection_state {
1372 #[allow(unused_imports)]
1373 use super::*;
1374
1375 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
1377 pub struct State(i32);
1378
1379 impl State {
1380 pub const STATE_UNSPECIFIED: State = State::new(0);
1382
1383 pub const DISCONNECTED: State = State::new(1);
1385
1386 pub const CONNECTED: State = State::new(2);
1388
1389 pub const CONNECTED_AND_SYNCING: State = State::new(3);
1392
1393 pub(crate) const fn new(value: i32) -> Self {
1395 Self(value)
1396 }
1397
1398 pub fn value(&self) -> i32 {
1400 self.0
1401 }
1402
1403 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
1405 match self.0 {
1406 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
1407 1 => std::borrow::Cow::Borrowed("DISCONNECTED"),
1408 2 => std::borrow::Cow::Borrowed("CONNECTED"),
1409 3 => std::borrow::Cow::Borrowed("CONNECTED_AND_SYNCING"),
1410 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
1411 }
1412 }
1413
1414 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
1416 match name {
1417 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
1418 "DISCONNECTED" => std::option::Option::Some(Self::DISCONNECTED),
1419 "CONNECTED" => std::option::Option::Some(Self::CONNECTED),
1420 "CONNECTED_AND_SYNCING" => {
1421 std::option::Option::Some(Self::CONNECTED_AND_SYNCING)
1422 }
1423 _ => std::option::Option::None,
1424 }
1425 }
1426 }
1427
1428 impl std::convert::From<i32> for State {
1429 fn from(value: i32) -> Self {
1430 Self::new(value)
1431 }
1432 }
1433
1434 impl std::default::Default for State {
1435 fn default() -> Self {
1436 Self::new(0)
1437 }
1438 }
1439 }
1440
1441 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
1443 pub struct Status(i32);
1444
1445 impl Status {
1446 pub const STATUS_UNSPECIFIED: Status = Status::new(0);
1448
1449 pub const PROVISIONING: Status = Status::new(1);
1451
1452 pub const RUNNING: Status = Status::new(2);
1454
1455 pub const DELETING: Status = Status::new(3);
1457
1458 pub const ERROR: Status = Status::new(4);
1461
1462 pub const RECONCILING: Status = Status::new(5);
1464
1465 pub(crate) const fn new(value: i32) -> Self {
1467 Self(value)
1468 }
1469
1470 pub fn value(&self) -> i32 {
1472 self.0
1473 }
1474
1475 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
1477 match self.0 {
1478 0 => std::borrow::Cow::Borrowed("STATUS_UNSPECIFIED"),
1479 1 => std::borrow::Cow::Borrowed("PROVISIONING"),
1480 2 => std::borrow::Cow::Borrowed("RUNNING"),
1481 3 => std::borrow::Cow::Borrowed("DELETING"),
1482 4 => std::borrow::Cow::Borrowed("ERROR"),
1483 5 => std::borrow::Cow::Borrowed("RECONCILING"),
1484 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
1485 }
1486 }
1487
1488 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
1490 match name {
1491 "STATUS_UNSPECIFIED" => std::option::Option::Some(Self::STATUS_UNSPECIFIED),
1492 "PROVISIONING" => std::option::Option::Some(Self::PROVISIONING),
1493 "RUNNING" => std::option::Option::Some(Self::RUNNING),
1494 "DELETING" => std::option::Option::Some(Self::DELETING),
1495 "ERROR" => std::option::Option::Some(Self::ERROR),
1496 "RECONCILING" => std::option::Option::Some(Self::RECONCILING),
1497 _ => std::option::Option::None,
1498 }
1499 }
1500 }
1501
1502 impl std::convert::From<i32> for Status {
1503 fn from(value: i32) -> Self {
1504 Self::new(value)
1505 }
1506 }
1507
1508 impl std::default::Default for Status {
1509 fn default() -> Self {
1510 Self::new(0)
1511 }
1512 }
1513
1514 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
1516 pub struct ReleaseChannel(i32);
1517
1518 impl ReleaseChannel {
1519 pub const RELEASE_CHANNEL_UNSPECIFIED: ReleaseChannel = ReleaseChannel::new(0);
1521
1522 pub const NONE: ReleaseChannel = ReleaseChannel::new(1);
1524
1525 pub const REGULAR: ReleaseChannel = ReleaseChannel::new(2);
1527
1528 pub(crate) const fn new(value: i32) -> Self {
1530 Self(value)
1531 }
1532
1533 pub fn value(&self) -> i32 {
1535 self.0
1536 }
1537
1538 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
1540 match self.0 {
1541 0 => std::borrow::Cow::Borrowed("RELEASE_CHANNEL_UNSPECIFIED"),
1542 1 => std::borrow::Cow::Borrowed("NONE"),
1543 2 => std::borrow::Cow::Borrowed("REGULAR"),
1544 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
1545 }
1546 }
1547
1548 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
1550 match name {
1551 "RELEASE_CHANNEL_UNSPECIFIED" => {
1552 std::option::Option::Some(Self::RELEASE_CHANNEL_UNSPECIFIED)
1553 }
1554 "NONE" => std::option::Option::Some(Self::NONE),
1555 "REGULAR" => std::option::Option::Some(Self::REGULAR),
1556 _ => std::option::Option::None,
1557 }
1558 }
1559 }
1560
1561 impl std::convert::From<i32> for ReleaseChannel {
1562 fn from(value: i32) -> Self {
1563 Self::new(value)
1564 }
1565 }
1566
1567 impl std::default::Default for ReleaseChannel {
1568 fn default() -> Self {
1569 Self::new(0)
1570 }
1571 }
1572}
1573
1574#[serde_with::serde_as]
1576#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1577#[serde(default, rename_all = "camelCase")]
1578#[non_exhaustive]
1579pub struct ClusterNetworking {
1580 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1584 pub cluster_ipv4_cidr_blocks: std::vec::Vec<std::string::String>,
1585
1586 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1590 pub services_ipv4_cidr_blocks: std::vec::Vec<std::string::String>,
1591
1592 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1593 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1594}
1595
1596impl ClusterNetworking {
1597 pub fn new() -> Self {
1598 std::default::Default::default()
1599 }
1600
1601 pub fn set_cluster_ipv4_cidr_blocks<T, V>(mut self, v: T) -> Self
1603 where
1604 T: std::iter::IntoIterator<Item = V>,
1605 V: std::convert::Into<std::string::String>,
1606 {
1607 use std::iter::Iterator;
1608 self.cluster_ipv4_cidr_blocks = v.into_iter().map(|i| i.into()).collect();
1609 self
1610 }
1611
1612 pub fn set_services_ipv4_cidr_blocks<T, V>(mut self, v: T) -> Self
1614 where
1615 T: std::iter::IntoIterator<Item = V>,
1616 V: std::convert::Into<std::string::String>,
1617 {
1618 use std::iter::Iterator;
1619 self.services_ipv4_cidr_blocks = v.into_iter().map(|i| i.into()).collect();
1620 self
1621 }
1622}
1623
1624impl wkt::message::Message for ClusterNetworking {
1625 fn typename() -> &'static str {
1626 "type.googleapis.com/google.cloud.edgecontainer.v1.ClusterNetworking"
1627 }
1628}
1629
1630#[serde_with::serde_as]
1636#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1637#[serde(default, rename_all = "camelCase")]
1638#[non_exhaustive]
1639pub struct Fleet {
1640 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1646 pub project: std::string::String,
1647
1648 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1654 pub membership: std::string::String,
1655
1656 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1657 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1658}
1659
1660impl Fleet {
1661 pub fn new() -> Self {
1662 std::default::Default::default()
1663 }
1664
1665 pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1667 self.project = v.into();
1668 self
1669 }
1670
1671 pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1673 self.membership = v.into();
1674 self
1675 }
1676}
1677
1678impl wkt::message::Message for Fleet {
1679 fn typename() -> &'static str {
1680 "type.googleapis.com/google.cloud.edgecontainer.v1.Fleet"
1681 }
1682}
1683
1684#[serde_with::serde_as]
1686#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1687#[serde(default, rename_all = "camelCase")]
1688#[non_exhaustive]
1689pub struct ClusterUser {
1690 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1692 pub username: std::string::String,
1693
1694 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1695 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1696}
1697
1698impl ClusterUser {
1699 pub fn new() -> Self {
1700 std::default::Default::default()
1701 }
1702
1703 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1705 self.username = v.into();
1706 self
1707 }
1708}
1709
1710impl wkt::message::Message for ClusterUser {
1711 fn typename() -> &'static str {
1712 "type.googleapis.com/google.cloud.edgecontainer.v1.ClusterUser"
1713 }
1714}
1715
1716#[serde_with::serde_as]
1718#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1719#[serde(default, rename_all = "camelCase")]
1720#[non_exhaustive]
1721pub struct Authorization {
1722 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1726 pub admin_users: std::option::Option<crate::model::ClusterUser>,
1727
1728 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1729 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1730}
1731
1732impl Authorization {
1733 pub fn new() -> Self {
1734 std::default::Default::default()
1735 }
1736
1737 pub fn set_admin_users<
1739 T: std::convert::Into<std::option::Option<crate::model::ClusterUser>>,
1740 >(
1741 mut self,
1742 v: T,
1743 ) -> Self {
1744 self.admin_users = v.into();
1745 self
1746 }
1747}
1748
1749impl wkt::message::Message for Authorization {
1750 fn typename() -> &'static str {
1751 "type.googleapis.com/google.cloud.edgecontainer.v1.Authorization"
1752 }
1753}
1754
1755#[serde_with::serde_as]
1758#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1759#[serde(default, rename_all = "camelCase")]
1760#[non_exhaustive]
1761pub struct NodePool {
1762 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1764 pub name: std::string::String,
1765
1766 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1768 pub create_time: std::option::Option<wkt::Timestamp>,
1769
1770 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1772 pub update_time: std::option::Option<wkt::Timestamp>,
1773
1774 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1776 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1777
1778 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1781 pub node_location: std::string::String,
1782
1783 pub node_count: i32,
1785
1786 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1790 pub machine_filter: std::string::String,
1791
1792 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1795 pub local_disk_encryption: std::option::Option<crate::model::node_pool::LocalDiskEncryption>,
1796
1797 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1799 pub node_version: std::string::String,
1800
1801 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1803 pub node_config: std::option::Option<crate::model::node_pool::NodeConfig>,
1804
1805 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1806 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1807}
1808
1809impl NodePool {
1810 pub fn new() -> Self {
1811 std::default::Default::default()
1812 }
1813
1814 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1816 self.name = v.into();
1817 self
1818 }
1819
1820 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1822 mut self,
1823 v: T,
1824 ) -> Self {
1825 self.create_time = v.into();
1826 self
1827 }
1828
1829 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1831 mut self,
1832 v: T,
1833 ) -> Self {
1834 self.update_time = v.into();
1835 self
1836 }
1837
1838 pub fn set_node_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1840 self.node_location = v.into();
1841 self
1842 }
1843
1844 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1846 self.node_count = v.into();
1847 self
1848 }
1849
1850 pub fn set_machine_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1852 self.machine_filter = v.into();
1853 self
1854 }
1855
1856 pub fn set_local_disk_encryption<
1858 T: std::convert::Into<std::option::Option<crate::model::node_pool::LocalDiskEncryption>>,
1859 >(
1860 mut self,
1861 v: T,
1862 ) -> Self {
1863 self.local_disk_encryption = v.into();
1864 self
1865 }
1866
1867 pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1869 self.node_version = v.into();
1870 self
1871 }
1872
1873 pub fn set_node_config<
1875 T: std::convert::Into<std::option::Option<crate::model::node_pool::NodeConfig>>,
1876 >(
1877 mut self,
1878 v: T,
1879 ) -> Self {
1880 self.node_config = v.into();
1881 self
1882 }
1883
1884 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1886 where
1887 T: std::iter::IntoIterator<Item = (K, V)>,
1888 K: std::convert::Into<std::string::String>,
1889 V: std::convert::Into<std::string::String>,
1890 {
1891 use std::iter::Iterator;
1892 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1893 self
1894 }
1895}
1896
1897impl wkt::message::Message for NodePool {
1898 fn typename() -> &'static str {
1899 "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool"
1900 }
1901}
1902
1903pub mod node_pool {
1905 #[allow(unused_imports)]
1906 use super::*;
1907
1908 #[serde_with::serde_as]
1910 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1911 #[serde(default, rename_all = "camelCase")]
1912 #[non_exhaustive]
1913 pub struct LocalDiskEncryption {
1914 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1919 pub kms_key: std::string::String,
1920
1921 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1924 pub kms_key_active_version: std::string::String,
1925
1926 pub kms_key_state: crate::model::KmsKeyState,
1931
1932 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1937 pub kms_status: std::option::Option<rpc::model::Status>,
1938
1939 pub resource_state: crate::model::ResourceState,
1941
1942 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1943 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1944 }
1945
1946 impl LocalDiskEncryption {
1947 pub fn new() -> Self {
1948 std::default::Default::default()
1949 }
1950
1951 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1953 self.kms_key = v.into();
1954 self
1955 }
1956
1957 pub fn set_kms_key_active_version<T: std::convert::Into<std::string::String>>(
1959 mut self,
1960 v: T,
1961 ) -> Self {
1962 self.kms_key_active_version = v.into();
1963 self
1964 }
1965
1966 pub fn set_kms_key_state<T: std::convert::Into<crate::model::KmsKeyState>>(
1968 mut self,
1969 v: T,
1970 ) -> Self {
1971 self.kms_key_state = v.into();
1972 self
1973 }
1974
1975 pub fn set_kms_status<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
1977 mut self,
1978 v: T,
1979 ) -> Self {
1980 self.kms_status = v.into();
1981 self
1982 }
1983
1984 pub fn set_resource_state<T: std::convert::Into<crate::model::ResourceState>>(
1986 mut self,
1987 v: T,
1988 ) -> Self {
1989 self.resource_state = v.into();
1990 self
1991 }
1992 }
1993
1994 impl wkt::message::Message for LocalDiskEncryption {
1995 fn typename() -> &'static str {
1996 "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool.LocalDiskEncryption"
1997 }
1998 }
1999
2000 #[serde_with::serde_as]
2002 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2003 #[serde(default, rename_all = "camelCase")]
2004 #[non_exhaustive]
2005 pub struct NodeConfig {
2006 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2008 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2009
2010 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2016 pub node_storage_schema: std::string::String,
2017
2018 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2019 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2020 }
2021
2022 impl NodeConfig {
2023 pub fn new() -> Self {
2024 std::default::Default::default()
2025 }
2026
2027 pub fn set_node_storage_schema<T: std::convert::Into<std::string::String>>(
2029 mut self,
2030 v: T,
2031 ) -> Self {
2032 self.node_storage_schema = v.into();
2033 self
2034 }
2035
2036 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2038 where
2039 T: std::iter::IntoIterator<Item = (K, V)>,
2040 K: std::convert::Into<std::string::String>,
2041 V: std::convert::Into<std::string::String>,
2042 {
2043 use std::iter::Iterator;
2044 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2045 self
2046 }
2047 }
2048
2049 impl wkt::message::Message for NodeConfig {
2050 fn typename() -> &'static str {
2051 "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool.NodeConfig"
2052 }
2053 }
2054}
2055
2056#[serde_with::serde_as]
2059#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2060#[serde(default, rename_all = "camelCase")]
2061#[non_exhaustive]
2062pub struct Machine {
2063 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2065 pub name: std::string::String,
2066
2067 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2069 pub create_time: std::option::Option<wkt::Timestamp>,
2070
2071 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2073 pub update_time: std::option::Option<wkt::Timestamp>,
2074
2075 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2077 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2078
2079 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2088 pub hosted_node: std::string::String,
2089
2090 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2092 pub zone: std::string::String,
2093
2094 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2096 pub version: std::string::String,
2097
2098 pub disabled: bool,
2101
2102 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2103 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2104}
2105
2106impl Machine {
2107 pub fn new() -> Self {
2108 std::default::Default::default()
2109 }
2110
2111 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2113 self.name = v.into();
2114 self
2115 }
2116
2117 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2119 mut self,
2120 v: T,
2121 ) -> Self {
2122 self.create_time = v.into();
2123 self
2124 }
2125
2126 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2128 mut self,
2129 v: T,
2130 ) -> Self {
2131 self.update_time = v.into();
2132 self
2133 }
2134
2135 pub fn set_hosted_node<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2137 self.hosted_node = v.into();
2138 self
2139 }
2140
2141 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2143 self.zone = v.into();
2144 self
2145 }
2146
2147 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2149 self.version = v.into();
2150 self
2151 }
2152
2153 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2155 self.disabled = v.into();
2156 self
2157 }
2158
2159 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2161 where
2162 T: std::iter::IntoIterator<Item = (K, V)>,
2163 K: std::convert::Into<std::string::String>,
2164 V: std::convert::Into<std::string::String>,
2165 {
2166 use std::iter::Iterator;
2167 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2168 self
2169 }
2170}
2171
2172impl wkt::message::Message for Machine {
2173 fn typename() -> &'static str {
2174 "type.googleapis.com/google.cloud.edgecontainer.v1.Machine"
2175 }
2176}
2177
2178#[serde_with::serde_as]
2180#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2181#[serde(default, rename_all = "camelCase")]
2182#[non_exhaustive]
2183pub struct VpnConnection {
2184 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2186 pub name: std::string::String,
2187
2188 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2190 pub create_time: std::option::Option<wkt::Timestamp>,
2191
2192 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2194 pub update_time: std::option::Option<wkt::Timestamp>,
2195
2196 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2198 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2199
2200 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2204 pub nat_gateway_ip: std::string::String,
2205
2206 pub bgp_routing_mode: crate::model::vpn_connection::BgpRoutingMode,
2208
2209 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2212 pub cluster: std::string::String,
2213
2214 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2216 pub vpc: std::string::String,
2217
2218 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2221 pub vpc_project: std::option::Option<crate::model::vpn_connection::VpcProject>,
2222
2223 pub enable_high_availability: bool,
2226
2227 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2229 pub router: std::string::String,
2230
2231 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2233 pub details: std::option::Option<crate::model::vpn_connection::Details>,
2234
2235 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2236 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2237}
2238
2239impl VpnConnection {
2240 pub fn new() -> Self {
2241 std::default::Default::default()
2242 }
2243
2244 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2246 self.name = v.into();
2247 self
2248 }
2249
2250 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2252 mut self,
2253 v: T,
2254 ) -> Self {
2255 self.create_time = v.into();
2256 self
2257 }
2258
2259 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2261 mut self,
2262 v: T,
2263 ) -> Self {
2264 self.update_time = v.into();
2265 self
2266 }
2267
2268 pub fn set_nat_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2270 self.nat_gateway_ip = v.into();
2271 self
2272 }
2273
2274 pub fn set_bgp_routing_mode<
2276 T: std::convert::Into<crate::model::vpn_connection::BgpRoutingMode>,
2277 >(
2278 mut self,
2279 v: T,
2280 ) -> Self {
2281 self.bgp_routing_mode = v.into();
2282 self
2283 }
2284
2285 pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2287 self.cluster = v.into();
2288 self
2289 }
2290
2291 pub fn set_vpc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2293 self.vpc = v.into();
2294 self
2295 }
2296
2297 pub fn set_vpc_project<
2299 T: std::convert::Into<std::option::Option<crate::model::vpn_connection::VpcProject>>,
2300 >(
2301 mut self,
2302 v: T,
2303 ) -> Self {
2304 self.vpc_project = v.into();
2305 self
2306 }
2307
2308 pub fn set_enable_high_availability<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2310 self.enable_high_availability = v.into();
2311 self
2312 }
2313
2314 pub fn set_router<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2316 self.router = v.into();
2317 self
2318 }
2319
2320 pub fn set_details<
2322 T: std::convert::Into<std::option::Option<crate::model::vpn_connection::Details>>,
2323 >(
2324 mut self,
2325 v: T,
2326 ) -> Self {
2327 self.details = v.into();
2328 self
2329 }
2330
2331 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2333 where
2334 T: std::iter::IntoIterator<Item = (K, V)>,
2335 K: std::convert::Into<std::string::String>,
2336 V: std::convert::Into<std::string::String>,
2337 {
2338 use std::iter::Iterator;
2339 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2340 self
2341 }
2342}
2343
2344impl wkt::message::Message for VpnConnection {
2345 fn typename() -> &'static str {
2346 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection"
2347 }
2348}
2349
2350pub mod vpn_connection {
2352 #[allow(unused_imports)]
2353 use super::*;
2354
2355 #[serde_with::serde_as]
2357 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2358 #[serde(default, rename_all = "camelCase")]
2359 #[non_exhaustive]
2360 pub struct VpcProject {
2361 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2364 pub project_id: std::string::String,
2365
2366 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2368 pub service_account: std::string::String,
2369
2370 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2371 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2372 }
2373
2374 impl VpcProject {
2375 pub fn new() -> Self {
2376 std::default::Default::default()
2377 }
2378
2379 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2381 self.project_id = v.into();
2382 self
2383 }
2384
2385 pub fn set_service_account<T: std::convert::Into<std::string::String>>(
2387 mut self,
2388 v: T,
2389 ) -> Self {
2390 self.service_account = v.into();
2391 self
2392 }
2393 }
2394
2395 impl wkt::message::Message for VpcProject {
2396 fn typename() -> &'static str {
2397 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.VpcProject"
2398 }
2399 }
2400
2401 #[serde_with::serde_as]
2403 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2404 #[serde(default, rename_all = "camelCase")]
2405 #[non_exhaustive]
2406 pub struct Details {
2407 pub state: crate::model::vpn_connection::details::State,
2409
2410 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2412 pub error: std::string::String,
2413
2414 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2416 pub cloud_router: std::option::Option<crate::model::vpn_connection::details::CloudRouter>,
2417
2418 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2420 pub cloud_vpns: std::vec::Vec<crate::model::vpn_connection::details::CloudVpn>,
2421
2422 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2423 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2424 }
2425
2426 impl Details {
2427 pub fn new() -> Self {
2428 std::default::Default::default()
2429 }
2430
2431 pub fn set_state<T: std::convert::Into<crate::model::vpn_connection::details::State>>(
2433 mut self,
2434 v: T,
2435 ) -> Self {
2436 self.state = v.into();
2437 self
2438 }
2439
2440 pub fn set_error<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2442 self.error = v.into();
2443 self
2444 }
2445
2446 pub fn set_cloud_router<
2448 T: std::convert::Into<
2449 std::option::Option<crate::model::vpn_connection::details::CloudRouter>,
2450 >,
2451 >(
2452 mut self,
2453 v: T,
2454 ) -> Self {
2455 self.cloud_router = v.into();
2456 self
2457 }
2458
2459 pub fn set_cloud_vpns<T, V>(mut self, v: T) -> Self
2461 where
2462 T: std::iter::IntoIterator<Item = V>,
2463 V: std::convert::Into<crate::model::vpn_connection::details::CloudVpn>,
2464 {
2465 use std::iter::Iterator;
2466 self.cloud_vpns = v.into_iter().map(|i| i.into()).collect();
2467 self
2468 }
2469 }
2470
2471 impl wkt::message::Message for Details {
2472 fn typename() -> &'static str {
2473 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details"
2474 }
2475 }
2476
2477 pub mod details {
2479 #[allow(unused_imports)]
2480 use super::*;
2481
2482 #[serde_with::serde_as]
2484 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2485 #[serde(default, rename_all = "camelCase")]
2486 #[non_exhaustive]
2487 pub struct CloudRouter {
2488 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2490 pub name: std::string::String,
2491
2492 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2493 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2494 }
2495
2496 impl CloudRouter {
2497 pub fn new() -> Self {
2498 std::default::Default::default()
2499 }
2500
2501 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2503 self.name = v.into();
2504 self
2505 }
2506 }
2507
2508 impl wkt::message::Message for CloudRouter {
2509 fn typename() -> &'static str {
2510 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details.CloudRouter"
2511 }
2512 }
2513
2514 #[serde_with::serde_as]
2516 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2517 #[serde(default, rename_all = "camelCase")]
2518 #[non_exhaustive]
2519 pub struct CloudVpn {
2520 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2522 pub gateway: std::string::String,
2523
2524 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2525 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2526 }
2527
2528 impl CloudVpn {
2529 pub fn new() -> Self {
2530 std::default::Default::default()
2531 }
2532
2533 pub fn set_gateway<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2535 self.gateway = v.into();
2536 self
2537 }
2538 }
2539
2540 impl wkt::message::Message for CloudVpn {
2541 fn typename() -> &'static str {
2542 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details.CloudVpn"
2543 }
2544 }
2545
2546 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
2548 pub struct State(i32);
2549
2550 impl State {
2551 pub const STATE_UNSPECIFIED: State = State::new(0);
2553
2554 pub const STATE_CONNECTED: State = State::new(1);
2556
2557 pub const STATE_CONNECTING: State = State::new(2);
2559
2560 pub const STATE_ERROR: State = State::new(3);
2562
2563 pub(crate) const fn new(value: i32) -> Self {
2565 Self(value)
2566 }
2567
2568 pub fn value(&self) -> i32 {
2570 self.0
2571 }
2572
2573 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
2575 match self.0 {
2576 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
2577 1 => std::borrow::Cow::Borrowed("STATE_CONNECTED"),
2578 2 => std::borrow::Cow::Borrowed("STATE_CONNECTING"),
2579 3 => std::borrow::Cow::Borrowed("STATE_ERROR"),
2580 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
2581 }
2582 }
2583
2584 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
2586 match name {
2587 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
2588 "STATE_CONNECTED" => std::option::Option::Some(Self::STATE_CONNECTED),
2589 "STATE_CONNECTING" => std::option::Option::Some(Self::STATE_CONNECTING),
2590 "STATE_ERROR" => std::option::Option::Some(Self::STATE_ERROR),
2591 _ => std::option::Option::None,
2592 }
2593 }
2594 }
2595
2596 impl std::convert::From<i32> for State {
2597 fn from(value: i32) -> Self {
2598 Self::new(value)
2599 }
2600 }
2601
2602 impl std::default::Default for State {
2603 fn default() -> Self {
2604 Self::new(0)
2605 }
2606 }
2607 }
2608
2609 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
2611 pub struct BgpRoutingMode(i32);
2612
2613 impl BgpRoutingMode {
2614 pub const BGP_ROUTING_MODE_UNSPECIFIED: BgpRoutingMode = BgpRoutingMode::new(0);
2616
2617 pub const REGIONAL: BgpRoutingMode = BgpRoutingMode::new(1);
2619
2620 pub const GLOBAL: BgpRoutingMode = BgpRoutingMode::new(2);
2622
2623 pub(crate) const fn new(value: i32) -> Self {
2625 Self(value)
2626 }
2627
2628 pub fn value(&self) -> i32 {
2630 self.0
2631 }
2632
2633 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
2635 match self.0 {
2636 0 => std::borrow::Cow::Borrowed("BGP_ROUTING_MODE_UNSPECIFIED"),
2637 1 => std::borrow::Cow::Borrowed("REGIONAL"),
2638 2 => std::borrow::Cow::Borrowed("GLOBAL"),
2639 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
2640 }
2641 }
2642
2643 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
2645 match name {
2646 "BGP_ROUTING_MODE_UNSPECIFIED" => {
2647 std::option::Option::Some(Self::BGP_ROUTING_MODE_UNSPECIFIED)
2648 }
2649 "REGIONAL" => std::option::Option::Some(Self::REGIONAL),
2650 "GLOBAL" => std::option::Option::Some(Self::GLOBAL),
2651 _ => std::option::Option::None,
2652 }
2653 }
2654 }
2655
2656 impl std::convert::From<i32> for BgpRoutingMode {
2657 fn from(value: i32) -> Self {
2658 Self::new(value)
2659 }
2660 }
2661
2662 impl std::default::Default for BgpRoutingMode {
2663 fn default() -> Self {
2664 Self::new(0)
2665 }
2666 }
2667}
2668
2669#[serde_with::serde_as]
2674#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2675#[serde(default, rename_all = "camelCase")]
2676#[non_exhaustive]
2677pub struct LocationMetadata {
2678 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2681 pub available_zones: std::collections::HashMap<std::string::String, crate::model::ZoneMetadata>,
2682
2683 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2684 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2685}
2686
2687impl LocationMetadata {
2688 pub fn new() -> Self {
2689 std::default::Default::default()
2690 }
2691
2692 pub fn set_available_zones<T, K, V>(mut self, v: T) -> Self
2694 where
2695 T: std::iter::IntoIterator<Item = (K, V)>,
2696 K: std::convert::Into<std::string::String>,
2697 V: std::convert::Into<crate::model::ZoneMetadata>,
2698 {
2699 use std::iter::Iterator;
2700 self.available_zones = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2701 self
2702 }
2703}
2704
2705impl wkt::message::Message for LocationMetadata {
2706 fn typename() -> &'static str {
2707 "type.googleapis.com/google.cloud.edgecontainer.v1.LocationMetadata"
2708 }
2709}
2710
2711#[serde_with::serde_as]
2713#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2714#[serde(default, rename_all = "camelCase")]
2715#[non_exhaustive]
2716pub struct ZoneMetadata {
2717 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2719 pub quota: std::vec::Vec<crate::model::Quota>,
2720
2721 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2723 pub rack_types:
2724 std::collections::HashMap<std::string::String, crate::model::zone_metadata::RackType>,
2725
2726 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2728 pub config_data: std::option::Option<crate::model::ConfigData>,
2729
2730 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2731 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2732}
2733
2734impl ZoneMetadata {
2735 pub fn new() -> Self {
2736 std::default::Default::default()
2737 }
2738
2739 pub fn set_config_data<T: std::convert::Into<std::option::Option<crate::model::ConfigData>>>(
2741 mut self,
2742 v: T,
2743 ) -> Self {
2744 self.config_data = v.into();
2745 self
2746 }
2747
2748 pub fn set_quota<T, V>(mut self, v: T) -> Self
2750 where
2751 T: std::iter::IntoIterator<Item = V>,
2752 V: std::convert::Into<crate::model::Quota>,
2753 {
2754 use std::iter::Iterator;
2755 self.quota = v.into_iter().map(|i| i.into()).collect();
2756 self
2757 }
2758
2759 pub fn set_rack_types<T, K, V>(mut self, v: T) -> Self
2761 where
2762 T: std::iter::IntoIterator<Item = (K, V)>,
2763 K: std::convert::Into<std::string::String>,
2764 V: std::convert::Into<crate::model::zone_metadata::RackType>,
2765 {
2766 use std::iter::Iterator;
2767 self.rack_types = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2768 self
2769 }
2770}
2771
2772impl wkt::message::Message for ZoneMetadata {
2773 fn typename() -> &'static str {
2774 "type.googleapis.com/google.cloud.edgecontainer.v1.ZoneMetadata"
2775 }
2776}
2777
2778pub mod zone_metadata {
2780 #[allow(unused_imports)]
2781 use super::*;
2782
2783 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
2785 pub struct RackType(i32);
2786
2787 impl RackType {
2788 pub const RACK_TYPE_UNSPECIFIED: RackType = RackType::new(0);
2790
2791 pub const BASE: RackType = RackType::new(1);
2794
2795 pub const EXPANSION: RackType = RackType::new(2);
2798
2799 pub(crate) const fn new(value: i32) -> Self {
2801 Self(value)
2802 }
2803
2804 pub fn value(&self) -> i32 {
2806 self.0
2807 }
2808
2809 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
2811 match self.0 {
2812 0 => std::borrow::Cow::Borrowed("RACK_TYPE_UNSPECIFIED"),
2813 1 => std::borrow::Cow::Borrowed("BASE"),
2814 2 => std::borrow::Cow::Borrowed("EXPANSION"),
2815 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
2816 }
2817 }
2818
2819 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
2821 match name {
2822 "RACK_TYPE_UNSPECIFIED" => std::option::Option::Some(Self::RACK_TYPE_UNSPECIFIED),
2823 "BASE" => std::option::Option::Some(Self::BASE),
2824 "EXPANSION" => std::option::Option::Some(Self::EXPANSION),
2825 _ => std::option::Option::None,
2826 }
2827 }
2828 }
2829
2830 impl std::convert::From<i32> for RackType {
2831 fn from(value: i32) -> Self {
2832 Self::new(value)
2833 }
2834 }
2835
2836 impl std::default::Default for RackType {
2837 fn default() -> Self {
2838 Self::new(0)
2839 }
2840 }
2841}
2842
2843#[serde_with::serde_as]
2845#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2846#[serde(default, rename_all = "camelCase")]
2847#[non_exhaustive]
2848pub struct ConfigData {
2849 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2851 pub available_external_lb_pools_ipv4: std::vec::Vec<std::string::String>,
2852
2853 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2855 pub available_external_lb_pools_ipv6: std::vec::Vec<std::string::String>,
2856
2857 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2858 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2859}
2860
2861impl ConfigData {
2862 pub fn new() -> Self {
2863 std::default::Default::default()
2864 }
2865
2866 pub fn set_available_external_lb_pools_ipv4<T, V>(mut self, v: T) -> Self
2868 where
2869 T: std::iter::IntoIterator<Item = V>,
2870 V: std::convert::Into<std::string::String>,
2871 {
2872 use std::iter::Iterator;
2873 self.available_external_lb_pools_ipv4 = v.into_iter().map(|i| i.into()).collect();
2874 self
2875 }
2876
2877 pub fn set_available_external_lb_pools_ipv6<T, V>(mut self, v: T) -> Self
2879 where
2880 T: std::iter::IntoIterator<Item = V>,
2881 V: std::convert::Into<std::string::String>,
2882 {
2883 use std::iter::Iterator;
2884 self.available_external_lb_pools_ipv6 = v.into_iter().map(|i| i.into()).collect();
2885 self
2886 }
2887}
2888
2889impl wkt::message::Message for ConfigData {
2890 fn typename() -> &'static str {
2891 "type.googleapis.com/google.cloud.edgecontainer.v1.ConfigData"
2892 }
2893}
2894
2895#[serde_with::serde_as]
2897#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2898#[serde(default, rename_all = "camelCase")]
2899#[non_exhaustive]
2900pub struct Quota {
2901 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2903 pub metric: std::string::String,
2904
2905 pub limit: f64,
2907
2908 pub usage: f64,
2910
2911 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2912 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2913}
2914
2915impl Quota {
2916 pub fn new() -> Self {
2917 std::default::Default::default()
2918 }
2919
2920 pub fn set_metric<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2922 self.metric = v.into();
2923 self
2924 }
2925
2926 pub fn set_limit<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2928 self.limit = v.into();
2929 self
2930 }
2931
2932 pub fn set_usage<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2934 self.usage = v.into();
2935 self
2936 }
2937}
2938
2939impl wkt::message::Message for Quota {
2940 fn typename() -> &'static str {
2941 "type.googleapis.com/google.cloud.edgecontainer.v1.Quota"
2942 }
2943}
2944
2945#[serde_with::serde_as]
2947#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2948#[serde(default, rename_all = "camelCase")]
2949#[non_exhaustive]
2950pub struct MaintenancePolicy {
2951 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2953 pub window: std::option::Option<crate::model::MaintenanceWindow>,
2954
2955 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2960 pub maintenance_exclusions: std::vec::Vec<crate::model::MaintenanceExclusionWindow>,
2961
2962 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2963 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2964}
2965
2966impl MaintenancePolicy {
2967 pub fn new() -> Self {
2968 std::default::Default::default()
2969 }
2970
2971 pub fn set_window<
2973 T: std::convert::Into<std::option::Option<crate::model::MaintenanceWindow>>,
2974 >(
2975 mut self,
2976 v: T,
2977 ) -> Self {
2978 self.window = v.into();
2979 self
2980 }
2981
2982 pub fn set_maintenance_exclusions<T, V>(mut self, v: T) -> Self
2984 where
2985 T: std::iter::IntoIterator<Item = V>,
2986 V: std::convert::Into<crate::model::MaintenanceExclusionWindow>,
2987 {
2988 use std::iter::Iterator;
2989 self.maintenance_exclusions = v.into_iter().map(|i| i.into()).collect();
2990 self
2991 }
2992}
2993
2994impl wkt::message::Message for MaintenancePolicy {
2995 fn typename() -> &'static str {
2996 "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenancePolicy"
2997 }
2998}
2999
3000#[serde_with::serde_as]
3002#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3003#[serde(default, rename_all = "camelCase")]
3004#[non_exhaustive]
3005pub struct MaintenanceWindow {
3006 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3008 pub recurring_window: std::option::Option<crate::model::RecurringTimeWindow>,
3009
3010 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3011 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3012}
3013
3014impl MaintenanceWindow {
3015 pub fn new() -> Self {
3016 std::default::Default::default()
3017 }
3018
3019 pub fn set_recurring_window<
3021 T: std::convert::Into<std::option::Option<crate::model::RecurringTimeWindow>>,
3022 >(
3023 mut self,
3024 v: T,
3025 ) -> Self {
3026 self.recurring_window = v.into();
3027 self
3028 }
3029}
3030
3031impl wkt::message::Message for MaintenanceWindow {
3032 fn typename() -> &'static str {
3033 "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenanceWindow"
3034 }
3035}
3036
3037#[serde_with::serde_as]
3039#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3040#[serde(default, rename_all = "camelCase")]
3041#[non_exhaustive]
3042pub struct RecurringTimeWindow {
3043 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3045 pub window: std::option::Option<crate::model::TimeWindow>,
3046
3047 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3051 pub recurrence: std::string::String,
3052
3053 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3054 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3055}
3056
3057impl RecurringTimeWindow {
3058 pub fn new() -> Self {
3059 std::default::Default::default()
3060 }
3061
3062 pub fn set_window<T: std::convert::Into<std::option::Option<crate::model::TimeWindow>>>(
3064 mut self,
3065 v: T,
3066 ) -> Self {
3067 self.window = v.into();
3068 self
3069 }
3070
3071 pub fn set_recurrence<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3073 self.recurrence = v.into();
3074 self
3075 }
3076}
3077
3078impl wkt::message::Message for RecurringTimeWindow {
3079 fn typename() -> &'static str {
3080 "type.googleapis.com/google.cloud.edgecontainer.v1.RecurringTimeWindow"
3081 }
3082}
3083
3084#[serde_with::serde_as]
3086#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3087#[serde(default, rename_all = "camelCase")]
3088#[non_exhaustive]
3089pub struct MaintenanceExclusionWindow {
3090 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3092 pub window: std::option::Option<crate::model::TimeWindow>,
3093
3094 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3096 pub id: std::string::String,
3097
3098 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3099 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3100}
3101
3102impl MaintenanceExclusionWindow {
3103 pub fn new() -> Self {
3104 std::default::Default::default()
3105 }
3106
3107 pub fn set_window<T: std::convert::Into<std::option::Option<crate::model::TimeWindow>>>(
3109 mut self,
3110 v: T,
3111 ) -> Self {
3112 self.window = v.into();
3113 self
3114 }
3115
3116 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3118 self.id = v.into();
3119 self
3120 }
3121}
3122
3123impl wkt::message::Message for MaintenanceExclusionWindow {
3124 fn typename() -> &'static str {
3125 "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenanceExclusionWindow"
3126 }
3127}
3128
3129#[serde_with::serde_as]
3131#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3132#[serde(default, rename_all = "camelCase")]
3133#[non_exhaustive]
3134pub struct TimeWindow {
3135 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3137 pub start_time: std::option::Option<wkt::Timestamp>,
3138
3139 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3142 pub end_time: std::option::Option<wkt::Timestamp>,
3143
3144 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3145 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3146}
3147
3148impl TimeWindow {
3149 pub fn new() -> Self {
3150 std::default::Default::default()
3151 }
3152
3153 pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3155 mut self,
3156 v: T,
3157 ) -> Self {
3158 self.start_time = v.into();
3159 self
3160 }
3161
3162 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3164 mut self,
3165 v: T,
3166 ) -> Self {
3167 self.end_time = v.into();
3168 self
3169 }
3170}
3171
3172impl wkt::message::Message for TimeWindow {
3173 fn typename() -> &'static str {
3174 "type.googleapis.com/google.cloud.edgecontainer.v1.TimeWindow"
3175 }
3176}
3177
3178#[serde_with::serde_as]
3180#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3181#[serde(default, rename_all = "camelCase")]
3182#[non_exhaustive]
3183pub struct ServerConfig {
3184 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3186 pub channels: std::collections::HashMap<std::string::String, crate::model::ChannelConfig>,
3187
3188 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3190 pub versions: std::vec::Vec<crate::model::Version>,
3191
3192 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3194 pub default_version: std::string::String,
3195
3196 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3197 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3198}
3199
3200impl ServerConfig {
3201 pub fn new() -> Self {
3202 std::default::Default::default()
3203 }
3204
3205 pub fn set_default_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3207 self.default_version = v.into();
3208 self
3209 }
3210
3211 pub fn set_versions<T, V>(mut self, v: T) -> Self
3213 where
3214 T: std::iter::IntoIterator<Item = V>,
3215 V: std::convert::Into<crate::model::Version>,
3216 {
3217 use std::iter::Iterator;
3218 self.versions = v.into_iter().map(|i| i.into()).collect();
3219 self
3220 }
3221
3222 pub fn set_channels<T, K, V>(mut self, v: T) -> Self
3224 where
3225 T: std::iter::IntoIterator<Item = (K, V)>,
3226 K: std::convert::Into<std::string::String>,
3227 V: std::convert::Into<crate::model::ChannelConfig>,
3228 {
3229 use std::iter::Iterator;
3230 self.channels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3231 self
3232 }
3233}
3234
3235impl wkt::message::Message for ServerConfig {
3236 fn typename() -> &'static str {
3237 "type.googleapis.com/google.cloud.edgecontainer.v1.ServerConfig"
3238 }
3239}
3240
3241#[serde_with::serde_as]
3243#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3244#[serde(default, rename_all = "camelCase")]
3245#[non_exhaustive]
3246pub struct ChannelConfig {
3247 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3249 pub default_version: std::string::String,
3250
3251 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3252 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3253}
3254
3255impl ChannelConfig {
3256 pub fn new() -> Self {
3257 std::default::Default::default()
3258 }
3259
3260 pub fn set_default_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3262 self.default_version = v.into();
3263 self
3264 }
3265}
3266
3267impl wkt::message::Message for ChannelConfig {
3268 fn typename() -> &'static str {
3269 "type.googleapis.com/google.cloud.edgecontainer.v1.ChannelConfig"
3270 }
3271}
3272
3273#[serde_with::serde_as]
3275#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3276#[serde(default, rename_all = "camelCase")]
3277#[non_exhaustive]
3278pub struct Version {
3279 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3281 pub name: std::string::String,
3282
3283 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3284 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3285}
3286
3287impl Version {
3288 pub fn new() -> Self {
3289 std::default::Default::default()
3290 }
3291
3292 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3294 self.name = v.into();
3295 self
3296 }
3297}
3298
3299impl wkt::message::Message for Version {
3300 fn typename() -> &'static str {
3301 "type.googleapis.com/google.cloud.edgecontainer.v1.Version"
3302 }
3303}
3304
3305#[serde_with::serde_as]
3307#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3308#[serde(default, rename_all = "camelCase")]
3309#[non_exhaustive]
3310pub struct OperationMetadata {
3311 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3313 pub create_time: std::option::Option<wkt::Timestamp>,
3314
3315 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3317 pub end_time: std::option::Option<wkt::Timestamp>,
3318
3319 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3321 pub target: std::string::String,
3322
3323 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3325 pub verb: std::string::String,
3326
3327 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3329 pub status_message: std::string::String,
3330
3331 pub requested_cancellation: bool,
3338
3339 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3341 pub api_version: std::string::String,
3342
3343 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3346 pub warnings: std::vec::Vec<std::string::String>,
3347
3348 pub status_reason: crate::model::operation_metadata::StatusReason,
3350
3351 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3352 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3353}
3354
3355impl OperationMetadata {
3356 pub fn new() -> Self {
3357 std::default::Default::default()
3358 }
3359
3360 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3362 mut self,
3363 v: T,
3364 ) -> Self {
3365 self.create_time = v.into();
3366 self
3367 }
3368
3369 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3371 mut self,
3372 v: T,
3373 ) -> Self {
3374 self.end_time = v.into();
3375 self
3376 }
3377
3378 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3380 self.target = v.into();
3381 self
3382 }
3383
3384 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3386 self.verb = v.into();
3387 self
3388 }
3389
3390 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3392 self.status_message = v.into();
3393 self
3394 }
3395
3396 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3398 self.requested_cancellation = v.into();
3399 self
3400 }
3401
3402 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3404 self.api_version = v.into();
3405 self
3406 }
3407
3408 pub fn set_status_reason<
3410 T: std::convert::Into<crate::model::operation_metadata::StatusReason>,
3411 >(
3412 mut self,
3413 v: T,
3414 ) -> Self {
3415 self.status_reason = v.into();
3416 self
3417 }
3418
3419 pub fn set_warnings<T, V>(mut self, v: T) -> Self
3421 where
3422 T: std::iter::IntoIterator<Item = V>,
3423 V: std::convert::Into<std::string::String>,
3424 {
3425 use std::iter::Iterator;
3426 self.warnings = v.into_iter().map(|i| i.into()).collect();
3427 self
3428 }
3429}
3430
3431impl wkt::message::Message for OperationMetadata {
3432 fn typename() -> &'static str {
3433 "type.googleapis.com/google.cloud.edgecontainer.v1.OperationMetadata"
3434 }
3435}
3436
3437pub mod operation_metadata {
3439 #[allow(unused_imports)]
3440 use super::*;
3441
3442 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3444 pub struct StatusReason(i32);
3445
3446 impl StatusReason {
3447 pub const STATUS_REASON_UNSPECIFIED: StatusReason = StatusReason::new(0);
3449
3450 pub const UPGRADE_PAUSED: StatusReason = StatusReason::new(1);
3452
3453 pub(crate) const fn new(value: i32) -> Self {
3455 Self(value)
3456 }
3457
3458 pub fn value(&self) -> i32 {
3460 self.0
3461 }
3462
3463 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
3465 match self.0 {
3466 0 => std::borrow::Cow::Borrowed("STATUS_REASON_UNSPECIFIED"),
3467 1 => std::borrow::Cow::Borrowed("UPGRADE_PAUSED"),
3468 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
3469 }
3470 }
3471
3472 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
3474 match name {
3475 "STATUS_REASON_UNSPECIFIED" => {
3476 std::option::Option::Some(Self::STATUS_REASON_UNSPECIFIED)
3477 }
3478 "UPGRADE_PAUSED" => std::option::Option::Some(Self::UPGRADE_PAUSED),
3479 _ => std::option::Option::None,
3480 }
3481 }
3482 }
3483
3484 impl std::convert::From<i32> for StatusReason {
3485 fn from(value: i32) -> Self {
3486 Self::new(value)
3487 }
3488 }
3489
3490 impl std::default::Default for StatusReason {
3491 fn default() -> Self {
3492 Self::new(0)
3493 }
3494 }
3495}
3496
3497#[serde_with::serde_as]
3499#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3500#[serde(default, rename_all = "camelCase")]
3501#[non_exhaustive]
3502pub struct ListClustersRequest {
3503 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3505 pub parent: std::string::String,
3506
3507 pub page_size: i32,
3509
3510 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3513 pub page_token: std::string::String,
3514
3515 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3517 pub filter: std::string::String,
3518
3519 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3521 pub order_by: std::string::String,
3522
3523 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3524 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3525}
3526
3527impl ListClustersRequest {
3528 pub fn new() -> Self {
3529 std::default::Default::default()
3530 }
3531
3532 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3534 self.parent = v.into();
3535 self
3536 }
3537
3538 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3540 self.page_size = v.into();
3541 self
3542 }
3543
3544 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3546 self.page_token = v.into();
3547 self
3548 }
3549
3550 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3552 self.filter = v.into();
3553 self
3554 }
3555
3556 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3558 self.order_by = v.into();
3559 self
3560 }
3561}
3562
3563impl wkt::message::Message for ListClustersRequest {
3564 fn typename() -> &'static str {
3565 "type.googleapis.com/google.cloud.edgecontainer.v1.ListClustersRequest"
3566 }
3567}
3568
3569#[serde_with::serde_as]
3571#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3572#[serde(default, rename_all = "camelCase")]
3573#[non_exhaustive]
3574pub struct ListClustersResponse {
3575 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3577 pub clusters: std::vec::Vec<crate::model::Cluster>,
3578
3579 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3581 pub next_page_token: std::string::String,
3582
3583 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3585 pub unreachable: std::vec::Vec<std::string::String>,
3586
3587 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3588 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3589}
3590
3591impl ListClustersResponse {
3592 pub fn new() -> Self {
3593 std::default::Default::default()
3594 }
3595
3596 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3598 self.next_page_token = v.into();
3599 self
3600 }
3601
3602 pub fn set_clusters<T, V>(mut self, v: T) -> Self
3604 where
3605 T: std::iter::IntoIterator<Item = V>,
3606 V: std::convert::Into<crate::model::Cluster>,
3607 {
3608 use std::iter::Iterator;
3609 self.clusters = v.into_iter().map(|i| i.into()).collect();
3610 self
3611 }
3612
3613 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3615 where
3616 T: std::iter::IntoIterator<Item = V>,
3617 V: std::convert::Into<std::string::String>,
3618 {
3619 use std::iter::Iterator;
3620 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3621 self
3622 }
3623}
3624
3625impl wkt::message::Message for ListClustersResponse {
3626 fn typename() -> &'static str {
3627 "type.googleapis.com/google.cloud.edgecontainer.v1.ListClustersResponse"
3628 }
3629}
3630
3631#[doc(hidden)]
3632impl gax::paginator::internal::PageableResponse for ListClustersResponse {
3633 type PageItem = crate::model::Cluster;
3634
3635 fn items(self) -> std::vec::Vec<Self::PageItem> {
3636 self.clusters
3637 }
3638
3639 fn next_page_token(&self) -> std::string::String {
3640 use std::clone::Clone;
3641 self.next_page_token.clone()
3642 }
3643}
3644
3645#[serde_with::serde_as]
3647#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3648#[serde(default, rename_all = "camelCase")]
3649#[non_exhaustive]
3650pub struct GetClusterRequest {
3651 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3653 pub name: std::string::String,
3654
3655 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3656 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3657}
3658
3659impl GetClusterRequest {
3660 pub fn new() -> Self {
3661 std::default::Default::default()
3662 }
3663
3664 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3666 self.name = v.into();
3667 self
3668 }
3669}
3670
3671impl wkt::message::Message for GetClusterRequest {
3672 fn typename() -> &'static str {
3673 "type.googleapis.com/google.cloud.edgecontainer.v1.GetClusterRequest"
3674 }
3675}
3676
3677#[serde_with::serde_as]
3679#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3680#[serde(default, rename_all = "camelCase")]
3681#[non_exhaustive]
3682pub struct CreateClusterRequest {
3683 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3685 pub parent: std::string::String,
3686
3687 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3689 pub cluster_id: std::string::String,
3690
3691 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3693 pub cluster: std::option::Option<crate::model::Cluster>,
3694
3695 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3699 pub request_id: std::string::String,
3700
3701 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3702 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3703}
3704
3705impl CreateClusterRequest {
3706 pub fn new() -> Self {
3707 std::default::Default::default()
3708 }
3709
3710 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3712 self.parent = v.into();
3713 self
3714 }
3715
3716 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3718 self.cluster_id = v.into();
3719 self
3720 }
3721
3722 pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
3724 mut self,
3725 v: T,
3726 ) -> Self {
3727 self.cluster = v.into();
3728 self
3729 }
3730
3731 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3733 self.request_id = v.into();
3734 self
3735 }
3736}
3737
3738impl wkt::message::Message for CreateClusterRequest {
3739 fn typename() -> &'static str {
3740 "type.googleapis.com/google.cloud.edgecontainer.v1.CreateClusterRequest"
3741 }
3742}
3743
3744#[serde_with::serde_as]
3746#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3747#[serde(default, rename_all = "camelCase")]
3748#[non_exhaustive]
3749pub struct UpdateClusterRequest {
3750 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3756 pub update_mask: std::option::Option<wkt::FieldMask>,
3757
3758 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3760 pub cluster: std::option::Option<crate::model::Cluster>,
3761
3762 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3766 pub request_id: std::string::String,
3767
3768 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3769 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3770}
3771
3772impl UpdateClusterRequest {
3773 pub fn new() -> Self {
3774 std::default::Default::default()
3775 }
3776
3777 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
3779 mut self,
3780 v: T,
3781 ) -> Self {
3782 self.update_mask = v.into();
3783 self
3784 }
3785
3786 pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
3788 mut self,
3789 v: T,
3790 ) -> Self {
3791 self.cluster = v.into();
3792 self
3793 }
3794
3795 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3797 self.request_id = v.into();
3798 self
3799 }
3800}
3801
3802impl wkt::message::Message for UpdateClusterRequest {
3803 fn typename() -> &'static str {
3804 "type.googleapis.com/google.cloud.edgecontainer.v1.UpdateClusterRequest"
3805 }
3806}
3807
3808#[serde_with::serde_as]
3810#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3811#[serde(default, rename_all = "camelCase")]
3812#[non_exhaustive]
3813pub struct UpgradeClusterRequest {
3814 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3816 pub name: std::string::String,
3817
3818 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3820 pub target_version: std::string::String,
3821
3822 pub schedule: crate::model::upgrade_cluster_request::Schedule,
3824
3825 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3829 pub request_id: std::string::String,
3830
3831 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3832 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3833}
3834
3835impl UpgradeClusterRequest {
3836 pub fn new() -> Self {
3837 std::default::Default::default()
3838 }
3839
3840 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3842 self.name = v.into();
3843 self
3844 }
3845
3846 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3848 self.target_version = v.into();
3849 self
3850 }
3851
3852 pub fn set_schedule<T: std::convert::Into<crate::model::upgrade_cluster_request::Schedule>>(
3854 mut self,
3855 v: T,
3856 ) -> Self {
3857 self.schedule = v.into();
3858 self
3859 }
3860
3861 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3863 self.request_id = v.into();
3864 self
3865 }
3866}
3867
3868impl wkt::message::Message for UpgradeClusterRequest {
3869 fn typename() -> &'static str {
3870 "type.googleapis.com/google.cloud.edgecontainer.v1.UpgradeClusterRequest"
3871 }
3872}
3873
3874pub mod upgrade_cluster_request {
3876 #[allow(unused_imports)]
3877 use super::*;
3878
3879 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3881 pub struct Schedule(i32);
3882
3883 impl Schedule {
3884 pub const SCHEDULE_UNSPECIFIED: Schedule = Schedule::new(0);
3887
3888 pub const IMMEDIATELY: Schedule = Schedule::new(1);
3891
3892 pub(crate) const fn new(value: i32) -> Self {
3894 Self(value)
3895 }
3896
3897 pub fn value(&self) -> i32 {
3899 self.0
3900 }
3901
3902 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
3904 match self.0 {
3905 0 => std::borrow::Cow::Borrowed("SCHEDULE_UNSPECIFIED"),
3906 1 => std::borrow::Cow::Borrowed("IMMEDIATELY"),
3907 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
3908 }
3909 }
3910
3911 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
3913 match name {
3914 "SCHEDULE_UNSPECIFIED" => std::option::Option::Some(Self::SCHEDULE_UNSPECIFIED),
3915 "IMMEDIATELY" => std::option::Option::Some(Self::IMMEDIATELY),
3916 _ => std::option::Option::None,
3917 }
3918 }
3919 }
3920
3921 impl std::convert::From<i32> for Schedule {
3922 fn from(value: i32) -> Self {
3923 Self::new(value)
3924 }
3925 }
3926
3927 impl std::default::Default for Schedule {
3928 fn default() -> Self {
3929 Self::new(0)
3930 }
3931 }
3932}
3933
3934#[serde_with::serde_as]
3936#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3937#[serde(default, rename_all = "camelCase")]
3938#[non_exhaustive]
3939pub struct DeleteClusterRequest {
3940 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3942 pub name: std::string::String,
3943
3944 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3948 pub request_id: std::string::String,
3949
3950 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3951 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3952}
3953
3954impl DeleteClusterRequest {
3955 pub fn new() -> Self {
3956 std::default::Default::default()
3957 }
3958
3959 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3961 self.name = v.into();
3962 self
3963 }
3964
3965 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3967 self.request_id = v.into();
3968 self
3969 }
3970}
3971
3972impl wkt::message::Message for DeleteClusterRequest {
3973 fn typename() -> &'static str {
3974 "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteClusterRequest"
3975 }
3976}
3977
3978#[serde_with::serde_as]
3980#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3981#[serde(default, rename_all = "camelCase")]
3982#[non_exhaustive]
3983pub struct GenerateAccessTokenRequest {
3984 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3986 pub cluster: std::string::String,
3987
3988 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3989 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3990}
3991
3992impl GenerateAccessTokenRequest {
3993 pub fn new() -> Self {
3994 std::default::Default::default()
3995 }
3996
3997 pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3999 self.cluster = v.into();
4000 self
4001 }
4002}
4003
4004impl wkt::message::Message for GenerateAccessTokenRequest {
4005 fn typename() -> &'static str {
4006 "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateAccessTokenRequest"
4007 }
4008}
4009
4010#[serde_with::serde_as]
4012#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4013#[serde(default, rename_all = "camelCase")]
4014#[non_exhaustive]
4015pub struct GenerateAccessTokenResponse {
4016 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4018 pub access_token: std::string::String,
4019
4020 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4022 pub expire_time: std::option::Option<wkt::Timestamp>,
4023
4024 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4025 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4026}
4027
4028impl GenerateAccessTokenResponse {
4029 pub fn new() -> Self {
4030 std::default::Default::default()
4031 }
4032
4033 pub fn set_access_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4035 self.access_token = v.into();
4036 self
4037 }
4038
4039 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4041 mut self,
4042 v: T,
4043 ) -> Self {
4044 self.expire_time = v.into();
4045 self
4046 }
4047}
4048
4049impl wkt::message::Message for GenerateAccessTokenResponse {
4050 fn typename() -> &'static str {
4051 "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateAccessTokenResponse"
4052 }
4053}
4054
4055#[serde_with::serde_as]
4057#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4058#[serde(default, rename_all = "camelCase")]
4059#[non_exhaustive]
4060pub struct GenerateOfflineCredentialRequest {
4061 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4063 pub cluster: std::string::String,
4064
4065 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4066 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4067}
4068
4069impl GenerateOfflineCredentialRequest {
4070 pub fn new() -> Self {
4071 std::default::Default::default()
4072 }
4073
4074 pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4076 self.cluster = v.into();
4077 self
4078 }
4079}
4080
4081impl wkt::message::Message for GenerateOfflineCredentialRequest {
4082 fn typename() -> &'static str {
4083 "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateOfflineCredentialRequest"
4084 }
4085}
4086
4087#[serde_with::serde_as]
4089#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4090#[serde(default, rename_all = "camelCase")]
4091#[non_exhaustive]
4092pub struct GenerateOfflineCredentialResponse {
4093 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4095 pub client_certificate: std::string::String,
4096
4097 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4099 pub client_key: std::string::String,
4100
4101 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4103 pub user_id: std::string::String,
4104
4105 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4107 pub expire_time: std::option::Option<wkt::Timestamp>,
4108
4109 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4110 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4111}
4112
4113impl GenerateOfflineCredentialResponse {
4114 pub fn new() -> Self {
4115 std::default::Default::default()
4116 }
4117
4118 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
4120 mut self,
4121 v: T,
4122 ) -> Self {
4123 self.client_certificate = v.into();
4124 self
4125 }
4126
4127 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4129 self.client_key = v.into();
4130 self
4131 }
4132
4133 pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4135 self.user_id = v.into();
4136 self
4137 }
4138
4139 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4141 mut self,
4142 v: T,
4143 ) -> Self {
4144 self.expire_time = v.into();
4145 self
4146 }
4147}
4148
4149impl wkt::message::Message for GenerateOfflineCredentialResponse {
4150 fn typename() -> &'static str {
4151 "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateOfflineCredentialResponse"
4152 }
4153}
4154
4155#[serde_with::serde_as]
4157#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4158#[serde(default, rename_all = "camelCase")]
4159#[non_exhaustive]
4160pub struct ListNodePoolsRequest {
4161 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4163 pub parent: std::string::String,
4164
4165 pub page_size: i32,
4167
4168 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4170 pub page_token: std::string::String,
4171
4172 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4174 pub filter: std::string::String,
4175
4176 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4178 pub order_by: std::string::String,
4179
4180 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4181 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4182}
4183
4184impl ListNodePoolsRequest {
4185 pub fn new() -> Self {
4186 std::default::Default::default()
4187 }
4188
4189 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4191 self.parent = v.into();
4192 self
4193 }
4194
4195 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4197 self.page_size = v.into();
4198 self
4199 }
4200
4201 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4203 self.page_token = v.into();
4204 self
4205 }
4206
4207 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4209 self.filter = v.into();
4210 self
4211 }
4212
4213 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4215 self.order_by = v.into();
4216 self
4217 }
4218}
4219
4220impl wkt::message::Message for ListNodePoolsRequest {
4221 fn typename() -> &'static str {
4222 "type.googleapis.com/google.cloud.edgecontainer.v1.ListNodePoolsRequest"
4223 }
4224}
4225
4226#[serde_with::serde_as]
4228#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4229#[serde(default, rename_all = "camelCase")]
4230#[non_exhaustive]
4231pub struct ListNodePoolsResponse {
4232 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4234 pub node_pools: std::vec::Vec<crate::model::NodePool>,
4235
4236 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4238 pub next_page_token: std::string::String,
4239
4240 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4242 pub unreachable: std::vec::Vec<std::string::String>,
4243
4244 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4245 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4246}
4247
4248impl ListNodePoolsResponse {
4249 pub fn new() -> Self {
4250 std::default::Default::default()
4251 }
4252
4253 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4255 self.next_page_token = v.into();
4256 self
4257 }
4258
4259 pub fn set_node_pools<T, V>(mut self, v: T) -> Self
4261 where
4262 T: std::iter::IntoIterator<Item = V>,
4263 V: std::convert::Into<crate::model::NodePool>,
4264 {
4265 use std::iter::Iterator;
4266 self.node_pools = v.into_iter().map(|i| i.into()).collect();
4267 self
4268 }
4269
4270 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4272 where
4273 T: std::iter::IntoIterator<Item = V>,
4274 V: std::convert::Into<std::string::String>,
4275 {
4276 use std::iter::Iterator;
4277 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4278 self
4279 }
4280}
4281
4282impl wkt::message::Message for ListNodePoolsResponse {
4283 fn typename() -> &'static str {
4284 "type.googleapis.com/google.cloud.edgecontainer.v1.ListNodePoolsResponse"
4285 }
4286}
4287
4288#[doc(hidden)]
4289impl gax::paginator::internal::PageableResponse for ListNodePoolsResponse {
4290 type PageItem = crate::model::NodePool;
4291
4292 fn items(self) -> std::vec::Vec<Self::PageItem> {
4293 self.node_pools
4294 }
4295
4296 fn next_page_token(&self) -> std::string::String {
4297 use std::clone::Clone;
4298 self.next_page_token.clone()
4299 }
4300}
4301
4302#[serde_with::serde_as]
4304#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4305#[serde(default, rename_all = "camelCase")]
4306#[non_exhaustive]
4307pub struct GetNodePoolRequest {
4308 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4310 pub name: std::string::String,
4311
4312 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4313 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4314}
4315
4316impl GetNodePoolRequest {
4317 pub fn new() -> Self {
4318 std::default::Default::default()
4319 }
4320
4321 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4323 self.name = v.into();
4324 self
4325 }
4326}
4327
4328impl wkt::message::Message for GetNodePoolRequest {
4329 fn typename() -> &'static str {
4330 "type.googleapis.com/google.cloud.edgecontainer.v1.GetNodePoolRequest"
4331 }
4332}
4333
4334#[serde_with::serde_as]
4336#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4337#[serde(default, rename_all = "camelCase")]
4338#[non_exhaustive]
4339pub struct CreateNodePoolRequest {
4340 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4342 pub parent: std::string::String,
4343
4344 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4346 pub node_pool_id: std::string::String,
4347
4348 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4350 pub node_pool: std::option::Option<crate::model::NodePool>,
4351
4352 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4356 pub request_id: std::string::String,
4357
4358 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4359 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4360}
4361
4362impl CreateNodePoolRequest {
4363 pub fn new() -> Self {
4364 std::default::Default::default()
4365 }
4366
4367 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4369 self.parent = v.into();
4370 self
4371 }
4372
4373 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4375 self.node_pool_id = v.into();
4376 self
4377 }
4378
4379 pub fn set_node_pool<T: std::convert::Into<std::option::Option<crate::model::NodePool>>>(
4381 mut self,
4382 v: T,
4383 ) -> Self {
4384 self.node_pool = v.into();
4385 self
4386 }
4387
4388 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4390 self.request_id = v.into();
4391 self
4392 }
4393}
4394
4395impl wkt::message::Message for CreateNodePoolRequest {
4396 fn typename() -> &'static str {
4397 "type.googleapis.com/google.cloud.edgecontainer.v1.CreateNodePoolRequest"
4398 }
4399}
4400
4401#[serde_with::serde_as]
4403#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4404#[serde(default, rename_all = "camelCase")]
4405#[non_exhaustive]
4406pub struct UpdateNodePoolRequest {
4407 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4413 pub update_mask: std::option::Option<wkt::FieldMask>,
4414
4415 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4417 pub node_pool: std::option::Option<crate::model::NodePool>,
4418
4419 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4423 pub request_id: std::string::String,
4424
4425 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4426 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4427}
4428
4429impl UpdateNodePoolRequest {
4430 pub fn new() -> Self {
4431 std::default::Default::default()
4432 }
4433
4434 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4436 mut self,
4437 v: T,
4438 ) -> Self {
4439 self.update_mask = v.into();
4440 self
4441 }
4442
4443 pub fn set_node_pool<T: std::convert::Into<std::option::Option<crate::model::NodePool>>>(
4445 mut self,
4446 v: T,
4447 ) -> Self {
4448 self.node_pool = v.into();
4449 self
4450 }
4451
4452 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4454 self.request_id = v.into();
4455 self
4456 }
4457}
4458
4459impl wkt::message::Message for UpdateNodePoolRequest {
4460 fn typename() -> &'static str {
4461 "type.googleapis.com/google.cloud.edgecontainer.v1.UpdateNodePoolRequest"
4462 }
4463}
4464
4465#[serde_with::serde_as]
4467#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4468#[serde(default, rename_all = "camelCase")]
4469#[non_exhaustive]
4470pub struct DeleteNodePoolRequest {
4471 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4473 pub name: std::string::String,
4474
4475 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4479 pub request_id: std::string::String,
4480
4481 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4482 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4483}
4484
4485impl DeleteNodePoolRequest {
4486 pub fn new() -> Self {
4487 std::default::Default::default()
4488 }
4489
4490 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4492 self.name = v.into();
4493 self
4494 }
4495
4496 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4498 self.request_id = v.into();
4499 self
4500 }
4501}
4502
4503impl wkt::message::Message for DeleteNodePoolRequest {
4504 fn typename() -> &'static str {
4505 "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteNodePoolRequest"
4506 }
4507}
4508
4509#[serde_with::serde_as]
4511#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4512#[serde(default, rename_all = "camelCase")]
4513#[non_exhaustive]
4514pub struct ListMachinesRequest {
4515 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4517 pub parent: std::string::String,
4518
4519 pub page_size: i32,
4521
4522 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4524 pub page_token: std::string::String,
4525
4526 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4528 pub filter: std::string::String,
4529
4530 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4532 pub order_by: std::string::String,
4533
4534 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4535 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4536}
4537
4538impl ListMachinesRequest {
4539 pub fn new() -> Self {
4540 std::default::Default::default()
4541 }
4542
4543 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4545 self.parent = v.into();
4546 self
4547 }
4548
4549 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4551 self.page_size = v.into();
4552 self
4553 }
4554
4555 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4557 self.page_token = v.into();
4558 self
4559 }
4560
4561 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4563 self.filter = v.into();
4564 self
4565 }
4566
4567 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4569 self.order_by = v.into();
4570 self
4571 }
4572}
4573
4574impl wkt::message::Message for ListMachinesRequest {
4575 fn typename() -> &'static str {
4576 "type.googleapis.com/google.cloud.edgecontainer.v1.ListMachinesRequest"
4577 }
4578}
4579
4580#[serde_with::serde_as]
4582#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4583#[serde(default, rename_all = "camelCase")]
4584#[non_exhaustive]
4585pub struct ListMachinesResponse {
4586 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4588 pub machines: std::vec::Vec<crate::model::Machine>,
4589
4590 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4592 pub next_page_token: std::string::String,
4593
4594 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4596 pub unreachable: std::vec::Vec<std::string::String>,
4597
4598 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4599 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4600}
4601
4602impl ListMachinesResponse {
4603 pub fn new() -> Self {
4604 std::default::Default::default()
4605 }
4606
4607 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4609 self.next_page_token = v.into();
4610 self
4611 }
4612
4613 pub fn set_machines<T, V>(mut self, v: T) -> Self
4615 where
4616 T: std::iter::IntoIterator<Item = V>,
4617 V: std::convert::Into<crate::model::Machine>,
4618 {
4619 use std::iter::Iterator;
4620 self.machines = v.into_iter().map(|i| i.into()).collect();
4621 self
4622 }
4623
4624 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4626 where
4627 T: std::iter::IntoIterator<Item = V>,
4628 V: std::convert::Into<std::string::String>,
4629 {
4630 use std::iter::Iterator;
4631 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4632 self
4633 }
4634}
4635
4636impl wkt::message::Message for ListMachinesResponse {
4637 fn typename() -> &'static str {
4638 "type.googleapis.com/google.cloud.edgecontainer.v1.ListMachinesResponse"
4639 }
4640}
4641
4642#[doc(hidden)]
4643impl gax::paginator::internal::PageableResponse for ListMachinesResponse {
4644 type PageItem = crate::model::Machine;
4645
4646 fn items(self) -> std::vec::Vec<Self::PageItem> {
4647 self.machines
4648 }
4649
4650 fn next_page_token(&self) -> std::string::String {
4651 use std::clone::Clone;
4652 self.next_page_token.clone()
4653 }
4654}
4655
4656#[serde_with::serde_as]
4658#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4659#[serde(default, rename_all = "camelCase")]
4660#[non_exhaustive]
4661pub struct GetMachineRequest {
4662 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4664 pub name: std::string::String,
4665
4666 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4667 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4668}
4669
4670impl GetMachineRequest {
4671 pub fn new() -> Self {
4672 std::default::Default::default()
4673 }
4674
4675 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4677 self.name = v.into();
4678 self
4679 }
4680}
4681
4682impl wkt::message::Message for GetMachineRequest {
4683 fn typename() -> &'static str {
4684 "type.googleapis.com/google.cloud.edgecontainer.v1.GetMachineRequest"
4685 }
4686}
4687
4688#[serde_with::serde_as]
4690#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4691#[serde(default, rename_all = "camelCase")]
4692#[non_exhaustive]
4693pub struct ListVpnConnectionsRequest {
4694 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4697 pub parent: std::string::String,
4698
4699 pub page_size: i32,
4701
4702 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4704 pub page_token: std::string::String,
4705
4706 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4708 pub filter: std::string::String,
4709
4710 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4712 pub order_by: std::string::String,
4713
4714 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4715 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4716}
4717
4718impl ListVpnConnectionsRequest {
4719 pub fn new() -> Self {
4720 std::default::Default::default()
4721 }
4722
4723 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4725 self.parent = v.into();
4726 self
4727 }
4728
4729 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4731 self.page_size = v.into();
4732 self
4733 }
4734
4735 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4737 self.page_token = v.into();
4738 self
4739 }
4740
4741 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4743 self.filter = v.into();
4744 self
4745 }
4746
4747 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4749 self.order_by = v.into();
4750 self
4751 }
4752}
4753
4754impl wkt::message::Message for ListVpnConnectionsRequest {
4755 fn typename() -> &'static str {
4756 "type.googleapis.com/google.cloud.edgecontainer.v1.ListVpnConnectionsRequest"
4757 }
4758}
4759
4760#[serde_with::serde_as]
4762#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4763#[serde(default, rename_all = "camelCase")]
4764#[non_exhaustive]
4765pub struct ListVpnConnectionsResponse {
4766 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4768 pub vpn_connections: std::vec::Vec<crate::model::VpnConnection>,
4769
4770 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4772 pub next_page_token: std::string::String,
4773
4774 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4776 pub unreachable: std::vec::Vec<std::string::String>,
4777
4778 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4779 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4780}
4781
4782impl ListVpnConnectionsResponse {
4783 pub fn new() -> Self {
4784 std::default::Default::default()
4785 }
4786
4787 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4789 self.next_page_token = v.into();
4790 self
4791 }
4792
4793 pub fn set_vpn_connections<T, V>(mut self, v: T) -> Self
4795 where
4796 T: std::iter::IntoIterator<Item = V>,
4797 V: std::convert::Into<crate::model::VpnConnection>,
4798 {
4799 use std::iter::Iterator;
4800 self.vpn_connections = v.into_iter().map(|i| i.into()).collect();
4801 self
4802 }
4803
4804 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4806 where
4807 T: std::iter::IntoIterator<Item = V>,
4808 V: std::convert::Into<std::string::String>,
4809 {
4810 use std::iter::Iterator;
4811 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4812 self
4813 }
4814}
4815
4816impl wkt::message::Message for ListVpnConnectionsResponse {
4817 fn typename() -> &'static str {
4818 "type.googleapis.com/google.cloud.edgecontainer.v1.ListVpnConnectionsResponse"
4819 }
4820}
4821
4822#[doc(hidden)]
4823impl gax::paginator::internal::PageableResponse for ListVpnConnectionsResponse {
4824 type PageItem = crate::model::VpnConnection;
4825
4826 fn items(self) -> std::vec::Vec<Self::PageItem> {
4827 self.vpn_connections
4828 }
4829
4830 fn next_page_token(&self) -> std::string::String {
4831 use std::clone::Clone;
4832 self.next_page_token.clone()
4833 }
4834}
4835
4836#[serde_with::serde_as]
4838#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4839#[serde(default, rename_all = "camelCase")]
4840#[non_exhaustive]
4841pub struct GetVpnConnectionRequest {
4842 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4844 pub name: std::string::String,
4845
4846 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4847 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4848}
4849
4850impl GetVpnConnectionRequest {
4851 pub fn new() -> Self {
4852 std::default::Default::default()
4853 }
4854
4855 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4857 self.name = v.into();
4858 self
4859 }
4860}
4861
4862impl wkt::message::Message for GetVpnConnectionRequest {
4863 fn typename() -> &'static str {
4864 "type.googleapis.com/google.cloud.edgecontainer.v1.GetVpnConnectionRequest"
4865 }
4866}
4867
4868#[serde_with::serde_as]
4870#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4871#[serde(default, rename_all = "camelCase")]
4872#[non_exhaustive]
4873pub struct CreateVpnConnectionRequest {
4874 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4876 pub parent: std::string::String,
4877
4878 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4880 pub vpn_connection_id: std::string::String,
4881
4882 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4884 pub vpn_connection: std::option::Option<crate::model::VpnConnection>,
4885
4886 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4890 pub request_id: std::string::String,
4891
4892 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4893 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4894}
4895
4896impl CreateVpnConnectionRequest {
4897 pub fn new() -> Self {
4898 std::default::Default::default()
4899 }
4900
4901 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4903 self.parent = v.into();
4904 self
4905 }
4906
4907 pub fn set_vpn_connection_id<T: std::convert::Into<std::string::String>>(
4909 mut self,
4910 v: T,
4911 ) -> Self {
4912 self.vpn_connection_id = v.into();
4913 self
4914 }
4915
4916 pub fn set_vpn_connection<
4918 T: std::convert::Into<std::option::Option<crate::model::VpnConnection>>,
4919 >(
4920 mut self,
4921 v: T,
4922 ) -> Self {
4923 self.vpn_connection = v.into();
4924 self
4925 }
4926
4927 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4929 self.request_id = v.into();
4930 self
4931 }
4932}
4933
4934impl wkt::message::Message for CreateVpnConnectionRequest {
4935 fn typename() -> &'static str {
4936 "type.googleapis.com/google.cloud.edgecontainer.v1.CreateVpnConnectionRequest"
4937 }
4938}
4939
4940#[serde_with::serde_as]
4942#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4943#[serde(default, rename_all = "camelCase")]
4944#[non_exhaustive]
4945pub struct DeleteVpnConnectionRequest {
4946 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4948 pub name: std::string::String,
4949
4950 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4954 pub request_id: std::string::String,
4955
4956 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4957 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4958}
4959
4960impl DeleteVpnConnectionRequest {
4961 pub fn new() -> Self {
4962 std::default::Default::default()
4963 }
4964
4965 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4967 self.name = v.into();
4968 self
4969 }
4970
4971 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4973 self.request_id = v.into();
4974 self
4975 }
4976}
4977
4978impl wkt::message::Message for DeleteVpnConnectionRequest {
4979 fn typename() -> &'static str {
4980 "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteVpnConnectionRequest"
4981 }
4982}
4983
4984#[serde_with::serde_as]
4986#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4987#[serde(default, rename_all = "camelCase")]
4988#[non_exhaustive]
4989pub struct GetServerConfigRequest {
4990 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4993 pub name: std::string::String,
4994
4995 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4996 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4997}
4998
4999impl GetServerConfigRequest {
5000 pub fn new() -> Self {
5001 std::default::Default::default()
5002 }
5003
5004 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5006 self.name = v.into();
5007 self
5008 }
5009}
5010
5011impl wkt::message::Message for GetServerConfigRequest {
5012 fn typename() -> &'static str {
5013 "type.googleapis.com/google.cloud.edgecontainer.v1.GetServerConfigRequest"
5014 }
5015}
5016
5017#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
5020pub struct KmsKeyState(i32);
5021
5022impl KmsKeyState {
5023 pub const KMS_KEY_STATE_UNSPECIFIED: KmsKeyState = KmsKeyState::new(0);
5025
5026 pub const KMS_KEY_STATE_KEY_AVAILABLE: KmsKeyState = KmsKeyState::new(1);
5028
5029 pub const KMS_KEY_STATE_KEY_UNAVAILABLE: KmsKeyState = KmsKeyState::new(2);
5032
5033 pub(crate) const fn new(value: i32) -> Self {
5035 Self(value)
5036 }
5037
5038 pub fn value(&self) -> i32 {
5040 self.0
5041 }
5042
5043 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
5045 match self.0 {
5046 0 => std::borrow::Cow::Borrowed("KMS_KEY_STATE_UNSPECIFIED"),
5047 1 => std::borrow::Cow::Borrowed("KMS_KEY_STATE_KEY_AVAILABLE"),
5048 2 => std::borrow::Cow::Borrowed("KMS_KEY_STATE_KEY_UNAVAILABLE"),
5049 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
5050 }
5051 }
5052
5053 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
5055 match name {
5056 "KMS_KEY_STATE_UNSPECIFIED" => {
5057 std::option::Option::Some(Self::KMS_KEY_STATE_UNSPECIFIED)
5058 }
5059 "KMS_KEY_STATE_KEY_AVAILABLE" => {
5060 std::option::Option::Some(Self::KMS_KEY_STATE_KEY_AVAILABLE)
5061 }
5062 "KMS_KEY_STATE_KEY_UNAVAILABLE" => {
5063 std::option::Option::Some(Self::KMS_KEY_STATE_KEY_UNAVAILABLE)
5064 }
5065 _ => std::option::Option::None,
5066 }
5067 }
5068}
5069
5070impl std::convert::From<i32> for KmsKeyState {
5071 fn from(value: i32) -> Self {
5072 Self::new(value)
5073 }
5074}
5075
5076impl std::default::Default for KmsKeyState {
5077 fn default() -> Self {
5078 Self::new(0)
5079 }
5080}
5081
5082#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
5084pub struct ResourceState(i32);
5085
5086impl ResourceState {
5087 pub const RESOURCE_STATE_UNSPECIFIED: ResourceState = ResourceState::new(0);
5089
5090 pub const RESOURCE_STATE_LOCK_DOWN: ResourceState = ResourceState::new(1);
5092
5093 pub const RESOURCE_STATE_LOCK_DOWN_PENDING: ResourceState = ResourceState::new(2);
5095
5096 pub(crate) const fn new(value: i32) -> Self {
5098 Self(value)
5099 }
5100
5101 pub fn value(&self) -> i32 {
5103 self.0
5104 }
5105
5106 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
5108 match self.0 {
5109 0 => std::borrow::Cow::Borrowed("RESOURCE_STATE_UNSPECIFIED"),
5110 1 => std::borrow::Cow::Borrowed("RESOURCE_STATE_LOCK_DOWN"),
5111 2 => std::borrow::Cow::Borrowed("RESOURCE_STATE_LOCK_DOWN_PENDING"),
5112 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
5113 }
5114 }
5115
5116 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
5118 match name {
5119 "RESOURCE_STATE_UNSPECIFIED" => {
5120 std::option::Option::Some(Self::RESOURCE_STATE_UNSPECIFIED)
5121 }
5122 "RESOURCE_STATE_LOCK_DOWN" => std::option::Option::Some(Self::RESOURCE_STATE_LOCK_DOWN),
5123 "RESOURCE_STATE_LOCK_DOWN_PENDING" => {
5124 std::option::Option::Some(Self::RESOURCE_STATE_LOCK_DOWN_PENDING)
5125 }
5126 _ => std::option::Option::None,
5127 }
5128 }
5129}
5130
5131impl std::convert::From<i32> for ResourceState {
5132 fn from(value: i32) -> Self {
5133 Self::new(value)
5134 }
5135}
5136
5137impl std::default::Default for ResourceState {
5138 fn default() -> Self {
5139 Self::new(0)
5140 }
5141}