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 lazy_static;
24extern crate location;
25extern crate longrunning;
26extern crate lro;
27extern crate reqwest;
28extern crate rpc;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36#[serde_with::serde_as]
38#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
39#[serde(default, rename_all = "camelCase")]
40#[non_exhaustive]
41pub struct Cluster {
42 #[serde(skip_serializing_if = "std::string::String::is_empty")]
44 pub name: std::string::String,
45
46 #[serde(skip_serializing_if = "std::option::Option::is_none")]
48 pub create_time: std::option::Option<wkt::Timestamp>,
49
50 #[serde(skip_serializing_if = "std::option::Option::is_none")]
52 pub update_time: std::option::Option<wkt::Timestamp>,
53
54 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
56 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
57
58 #[serde(skip_serializing_if = "std::option::Option::is_none")]
60 pub fleet: std::option::Option<crate::model::Fleet>,
61
62 #[serde(skip_serializing_if = "std::option::Option::is_none")]
64 pub networking: std::option::Option<crate::model::ClusterNetworking>,
65
66 #[serde(skip_serializing_if = "std::option::Option::is_none")]
68 pub authorization: std::option::Option<crate::model::Authorization>,
69
70 pub default_max_pods_per_node: i32,
74
75 #[serde(skip_serializing_if = "std::string::String::is_empty")]
77 pub endpoint: std::string::String,
78
79 pub port: i32,
81
82 #[serde(skip_serializing_if = "std::string::String::is_empty")]
84 pub cluster_ca_certificate: std::string::String,
85
86 #[serde(skip_serializing_if = "std::option::Option::is_none")]
88 pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
89
90 #[serde(skip_serializing_if = "std::string::String::is_empty")]
92 pub control_plane_version: std::string::String,
93
94 #[serde(skip_serializing_if = "std::string::String::is_empty")]
97 pub node_version: std::string::String,
98
99 #[serde(skip_serializing_if = "std::option::Option::is_none")]
101 pub control_plane: std::option::Option<crate::model::cluster::ControlPlane>,
102
103 #[serde(skip_serializing_if = "std::option::Option::is_none")]
105 pub system_addons_config: std::option::Option<crate::model::cluster::SystemAddonsConfig>,
106
107 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
110 pub external_load_balancer_ipv4_address_pools: std::vec::Vec<std::string::String>,
111
112 #[serde(skip_serializing_if = "std::option::Option::is_none")]
115 pub control_plane_encryption:
116 std::option::Option<crate::model::cluster::ControlPlaneEncryption>,
117
118 pub status: crate::model::cluster::Status,
120
121 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
125 pub maintenance_events: std::vec::Vec<crate::model::cluster::MaintenanceEvent>,
126
127 #[serde(skip_serializing_if = "std::string::String::is_empty")]
129 pub target_version: std::string::String,
130
131 pub release_channel: crate::model::cluster::ReleaseChannel,
133
134 #[serde(skip_serializing_if = "std::option::Option::is_none")]
138 pub survivability_config: std::option::Option<crate::model::cluster::SurvivabilityConfig>,
139
140 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
143 pub external_load_balancer_ipv6_address_pools: std::vec::Vec<std::string::String>,
144
145 #[serde(skip_serializing_if = "std::option::Option::is_none")]
147 pub connection_state: std::option::Option<crate::model::cluster::ConnectionState>,
148}
149
150impl Cluster {
151 pub fn new() -> Self {
152 std::default::Default::default()
153 }
154
155 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
157 self.name = v.into();
158 self
159 }
160
161 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
163 mut self,
164 v: T,
165 ) -> Self {
166 self.create_time = v.into();
167 self
168 }
169
170 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
172 mut self,
173 v: T,
174 ) -> Self {
175 self.update_time = v.into();
176 self
177 }
178
179 pub fn set_fleet<T: std::convert::Into<std::option::Option<crate::model::Fleet>>>(
181 mut self,
182 v: T,
183 ) -> Self {
184 self.fleet = v.into();
185 self
186 }
187
188 pub fn set_networking<
190 T: std::convert::Into<std::option::Option<crate::model::ClusterNetworking>>,
191 >(
192 mut self,
193 v: T,
194 ) -> Self {
195 self.networking = v.into();
196 self
197 }
198
199 pub fn set_authorization<
201 T: std::convert::Into<std::option::Option<crate::model::Authorization>>,
202 >(
203 mut self,
204 v: T,
205 ) -> Self {
206 self.authorization = v.into();
207 self
208 }
209
210 pub fn set_default_max_pods_per_node<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
212 self.default_max_pods_per_node = v.into();
213 self
214 }
215
216 pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
218 self.endpoint = v.into();
219 self
220 }
221
222 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
224 self.port = v.into();
225 self
226 }
227
228 pub fn set_cluster_ca_certificate<T: std::convert::Into<std::string::String>>(
230 mut self,
231 v: T,
232 ) -> Self {
233 self.cluster_ca_certificate = v.into();
234 self
235 }
236
237 pub fn set_maintenance_policy<
239 T: std::convert::Into<std::option::Option<crate::model::MaintenancePolicy>>,
240 >(
241 mut self,
242 v: T,
243 ) -> Self {
244 self.maintenance_policy = v.into();
245 self
246 }
247
248 pub fn set_control_plane_version<T: std::convert::Into<std::string::String>>(
250 mut self,
251 v: T,
252 ) -> Self {
253 self.control_plane_version = v.into();
254 self
255 }
256
257 pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
259 self.node_version = v.into();
260 self
261 }
262
263 pub fn set_control_plane<
265 T: std::convert::Into<std::option::Option<crate::model::cluster::ControlPlane>>,
266 >(
267 mut self,
268 v: T,
269 ) -> Self {
270 self.control_plane = v.into();
271 self
272 }
273
274 pub fn set_system_addons_config<
276 T: std::convert::Into<std::option::Option<crate::model::cluster::SystemAddonsConfig>>,
277 >(
278 mut self,
279 v: T,
280 ) -> Self {
281 self.system_addons_config = v.into();
282 self
283 }
284
285 pub fn set_control_plane_encryption<
287 T: std::convert::Into<std::option::Option<crate::model::cluster::ControlPlaneEncryption>>,
288 >(
289 mut self,
290 v: T,
291 ) -> Self {
292 self.control_plane_encryption = v.into();
293 self
294 }
295
296 pub fn set_status<T: std::convert::Into<crate::model::cluster::Status>>(
298 mut self,
299 v: T,
300 ) -> Self {
301 self.status = v.into();
302 self
303 }
304
305 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
307 self.target_version = v.into();
308 self
309 }
310
311 pub fn set_release_channel<T: std::convert::Into<crate::model::cluster::ReleaseChannel>>(
313 mut self,
314 v: T,
315 ) -> Self {
316 self.release_channel = v.into();
317 self
318 }
319
320 pub fn set_survivability_config<
322 T: std::convert::Into<std::option::Option<crate::model::cluster::SurvivabilityConfig>>,
323 >(
324 mut self,
325 v: T,
326 ) -> Self {
327 self.survivability_config = v.into();
328 self
329 }
330
331 pub fn set_connection_state<
333 T: std::convert::Into<std::option::Option<crate::model::cluster::ConnectionState>>,
334 >(
335 mut self,
336 v: T,
337 ) -> Self {
338 self.connection_state = v.into();
339 self
340 }
341
342 pub fn set_external_load_balancer_ipv4_address_pools<T, V>(mut self, v: T) -> Self
344 where
345 T: std::iter::IntoIterator<Item = V>,
346 V: std::convert::Into<std::string::String>,
347 {
348 use std::iter::Iterator;
349 self.external_load_balancer_ipv4_address_pools = v.into_iter().map(|i| i.into()).collect();
350 self
351 }
352
353 pub fn set_maintenance_events<T, V>(mut self, v: T) -> Self
355 where
356 T: std::iter::IntoIterator<Item = V>,
357 V: std::convert::Into<crate::model::cluster::MaintenanceEvent>,
358 {
359 use std::iter::Iterator;
360 self.maintenance_events = v.into_iter().map(|i| i.into()).collect();
361 self
362 }
363
364 pub fn set_external_load_balancer_ipv6_address_pools<T, V>(mut self, v: T) -> Self
366 where
367 T: std::iter::IntoIterator<Item = V>,
368 V: std::convert::Into<std::string::String>,
369 {
370 use std::iter::Iterator;
371 self.external_load_balancer_ipv6_address_pools = v.into_iter().map(|i| i.into()).collect();
372 self
373 }
374
375 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
377 where
378 T: std::iter::IntoIterator<Item = (K, V)>,
379 K: std::convert::Into<std::string::String>,
380 V: std::convert::Into<std::string::String>,
381 {
382 use std::iter::Iterator;
383 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
384 self
385 }
386}
387
388impl wkt::message::Message for Cluster {
389 fn typename() -> &'static str {
390 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster"
391 }
392}
393
394pub mod cluster {
396 #[allow(unused_imports)]
397 use super::*;
398
399 #[serde_with::serde_as]
401 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
402 #[serde(default, rename_all = "camelCase")]
403 #[non_exhaustive]
404 pub struct ControlPlane {
405 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
406 pub config: std::option::Option<crate::model::cluster::control_plane::Config>,
407 }
408
409 impl ControlPlane {
410 pub fn new() -> Self {
411 std::default::Default::default()
412 }
413
414 pub fn set_config<
416 T: std::convert::Into<std::option::Option<crate::model::cluster::control_plane::Config>>,
417 >(
418 mut self,
419 v: T,
420 ) -> Self {
421 self.config = v.into();
422 self
423 }
424
425 pub fn get_remote(
429 &self,
430 ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::control_plane::Remote>>
431 {
432 #[allow(unreachable_patterns)]
433 self.config.as_ref().and_then(|v| match v {
434 crate::model::cluster::control_plane::Config::Remote(v) => {
435 std::option::Option::Some(v)
436 }
437 _ => std::option::Option::None,
438 })
439 }
440
441 pub fn get_local(
445 &self,
446 ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::control_plane::Local>>
447 {
448 #[allow(unreachable_patterns)]
449 self.config.as_ref().and_then(|v| match v {
450 crate::model::cluster::control_plane::Config::Local(v) => {
451 std::option::Option::Some(v)
452 }
453 _ => std::option::Option::None,
454 })
455 }
456
457 pub fn set_remote<
463 T: std::convert::Into<std::boxed::Box<crate::model::cluster::control_plane::Remote>>,
464 >(
465 mut self,
466 v: T,
467 ) -> Self {
468 self.config = std::option::Option::Some(
469 crate::model::cluster::control_plane::Config::Remote(v.into()),
470 );
471 self
472 }
473
474 pub fn set_local<
480 T: std::convert::Into<std::boxed::Box<crate::model::cluster::control_plane::Local>>,
481 >(
482 mut self,
483 v: T,
484 ) -> Self {
485 self.config = std::option::Option::Some(
486 crate::model::cluster::control_plane::Config::Local(v.into()),
487 );
488 self
489 }
490 }
491
492 impl wkt::message::Message for ControlPlane {
493 fn typename() -> &'static str {
494 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane"
495 }
496 }
497
498 pub mod control_plane {
500 #[allow(unused_imports)]
501 use super::*;
502
503 #[serde_with::serde_as]
505 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
506 #[serde(default, rename_all = "camelCase")]
507 #[non_exhaustive]
508 pub struct Remote {}
509
510 impl Remote {
511 pub fn new() -> Self {
512 std::default::Default::default()
513 }
514 }
515
516 impl wkt::message::Message for Remote {
517 fn typename() -> &'static str {
518 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane.Remote"
519 }
520 }
521
522 #[serde_with::serde_as]
530 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
531 #[serde(default, rename_all = "camelCase")]
532 #[non_exhaustive]
533 pub struct Local {
534 #[serde(skip_serializing_if = "std::string::String::is_empty")]
537 pub node_location: std::string::String,
538
539 pub node_count: i32,
541
542 #[serde(skip_serializing_if = "std::string::String::is_empty")]
546 pub machine_filter: std::string::String,
547
548 pub shared_deployment_policy:
550 crate::model::cluster::control_plane::SharedDeploymentPolicy,
551
552 #[serde(skip_serializing_if = "std::string::String::is_empty")]
558 pub control_plane_node_storage_schema: std::string::String,
559 }
560
561 impl Local {
562 pub fn new() -> Self {
563 std::default::Default::default()
564 }
565
566 pub fn set_node_location<T: std::convert::Into<std::string::String>>(
568 mut self,
569 v: T,
570 ) -> Self {
571 self.node_location = v.into();
572 self
573 }
574
575 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
577 self.node_count = v.into();
578 self
579 }
580
581 pub fn set_machine_filter<T: std::convert::Into<std::string::String>>(
583 mut self,
584 v: T,
585 ) -> Self {
586 self.machine_filter = v.into();
587 self
588 }
589
590 pub fn set_shared_deployment_policy<
592 T: std::convert::Into<crate::model::cluster::control_plane::SharedDeploymentPolicy>,
593 >(
594 mut self,
595 v: T,
596 ) -> Self {
597 self.shared_deployment_policy = v.into();
598 self
599 }
600
601 pub fn set_control_plane_node_storage_schema<
603 T: std::convert::Into<std::string::String>,
604 >(
605 mut self,
606 v: T,
607 ) -> Self {
608 self.control_plane_node_storage_schema = v.into();
609 self
610 }
611 }
612
613 impl wkt::message::Message for Local {
614 fn typename() -> &'static str {
615 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane.Local"
616 }
617 }
618
619 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
622 pub struct SharedDeploymentPolicy(std::borrow::Cow<'static, str>);
623
624 impl SharedDeploymentPolicy {
625 pub const fn new(v: &'static str) -> Self {
627 Self(std::borrow::Cow::Borrowed(v))
628 }
629
630 pub fn value(&self) -> &str {
632 &self.0
633 }
634 }
635
636 pub mod shared_deployment_policy {
638 use super::SharedDeploymentPolicy;
639
640 pub const SHARED_DEPLOYMENT_POLICY_UNSPECIFIED: SharedDeploymentPolicy =
642 SharedDeploymentPolicy::new("SHARED_DEPLOYMENT_POLICY_UNSPECIFIED");
643
644 pub const ALLOWED: SharedDeploymentPolicy = SharedDeploymentPolicy::new("ALLOWED");
647
648 pub const DISALLOWED: SharedDeploymentPolicy =
651 SharedDeploymentPolicy::new("DISALLOWED");
652 }
653
654 impl std::convert::From<std::string::String> for SharedDeploymentPolicy {
655 fn from(value: std::string::String) -> Self {
656 Self(std::borrow::Cow::Owned(value))
657 }
658 }
659
660 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
661 #[serde(rename_all = "camelCase")]
662 #[non_exhaustive]
663 pub enum Config {
664 Remote(std::boxed::Box<crate::model::cluster::control_plane::Remote>),
666 Local(std::boxed::Box<crate::model::cluster::control_plane::Local>),
674 }
675 }
676
677 #[serde_with::serde_as]
679 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
680 #[serde(default, rename_all = "camelCase")]
681 #[non_exhaustive]
682 pub struct SystemAddonsConfig {
683 #[serde(skip_serializing_if = "std::option::Option::is_none")]
685 pub ingress: std::option::Option<crate::model::cluster::system_addons_config::Ingress>,
686
687 #[serde(skip_serializing_if = "std::option::Option::is_none")]
689 pub vm_service_config:
690 std::option::Option<crate::model::cluster::system_addons_config::VMServiceConfig>,
691 }
692
693 impl SystemAddonsConfig {
694 pub fn new() -> Self {
695 std::default::Default::default()
696 }
697
698 pub fn set_ingress<
700 T: std::convert::Into<
701 std::option::Option<crate::model::cluster::system_addons_config::Ingress>,
702 >,
703 >(
704 mut self,
705 v: T,
706 ) -> Self {
707 self.ingress = v.into();
708 self
709 }
710
711 pub fn set_vm_service_config<
713 T: std::convert::Into<
714 std::option::Option<crate::model::cluster::system_addons_config::VMServiceConfig>,
715 >,
716 >(
717 mut self,
718 v: T,
719 ) -> Self {
720 self.vm_service_config = v.into();
721 self
722 }
723 }
724
725 impl wkt::message::Message for SystemAddonsConfig {
726 fn typename() -> &'static str {
727 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig"
728 }
729 }
730
731 pub mod system_addons_config {
733 #[allow(unused_imports)]
734 use super::*;
735
736 #[serde_with::serde_as]
740 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
741 #[serde(default, rename_all = "camelCase")]
742 #[non_exhaustive]
743 pub struct Ingress {
744 pub disabled: bool,
746
747 #[serde(skip_serializing_if = "std::string::String::is_empty")]
749 pub ipv4_vip: std::string::String,
750 }
751
752 impl Ingress {
753 pub fn new() -> Self {
754 std::default::Default::default()
755 }
756
757 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
759 self.disabled = v.into();
760 self
761 }
762
763 pub fn set_ipv4_vip<T: std::convert::Into<std::string::String>>(
765 mut self,
766 v: T,
767 ) -> Self {
768 self.ipv4_vip = v.into();
769 self
770 }
771 }
772
773 impl wkt::message::Message for Ingress {
774 fn typename() -> &'static str {
775 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig.Ingress"
776 }
777 }
778
779 #[serde_with::serde_as]
781 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
782 #[serde(default, rename_all = "camelCase")]
783 #[non_exhaustive]
784 pub struct VMServiceConfig {
785 pub vmm_enabled: bool,
787 }
788
789 impl VMServiceConfig {
790 pub fn new() -> Self {
791 std::default::Default::default()
792 }
793
794 pub fn set_vmm_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
796 self.vmm_enabled = v.into();
797 self
798 }
799 }
800
801 impl wkt::message::Message for VMServiceConfig {
802 fn typename() -> &'static str {
803 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig.VMServiceConfig"
804 }
805 }
806 }
807
808 #[serde_with::serde_as]
810 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
811 #[serde(default, rename_all = "camelCase")]
812 #[non_exhaustive]
813 pub struct ControlPlaneEncryption {
814 #[serde(skip_serializing_if = "std::string::String::is_empty")]
819 pub kms_key: std::string::String,
820
821 #[serde(skip_serializing_if = "std::string::String::is_empty")]
824 pub kms_key_active_version: std::string::String,
825
826 pub kms_key_state: crate::model::KmsKeyState,
831
832 #[serde(skip_serializing_if = "std::option::Option::is_none")]
837 pub kms_status: std::option::Option<rpc::model::Status>,
838
839 pub resource_state: crate::model::ResourceState,
841 }
842
843 impl ControlPlaneEncryption {
844 pub fn new() -> Self {
845 std::default::Default::default()
846 }
847
848 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
850 self.kms_key = v.into();
851 self
852 }
853
854 pub fn set_kms_key_active_version<T: std::convert::Into<std::string::String>>(
856 mut self,
857 v: T,
858 ) -> Self {
859 self.kms_key_active_version = v.into();
860 self
861 }
862
863 pub fn set_kms_key_state<T: std::convert::Into<crate::model::KmsKeyState>>(
865 mut self,
866 v: T,
867 ) -> Self {
868 self.kms_key_state = v.into();
869 self
870 }
871
872 pub fn set_kms_status<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
874 mut self,
875 v: T,
876 ) -> Self {
877 self.kms_status = v.into();
878 self
879 }
880
881 pub fn set_resource_state<T: std::convert::Into<crate::model::ResourceState>>(
883 mut self,
884 v: T,
885 ) -> Self {
886 self.resource_state = v.into();
887 self
888 }
889 }
890
891 impl wkt::message::Message for ControlPlaneEncryption {
892 fn typename() -> &'static str {
893 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlaneEncryption"
894 }
895 }
896
897 #[serde_with::serde_as]
902 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
903 #[serde(default, rename_all = "camelCase")]
904 #[non_exhaustive]
905 pub struct MaintenanceEvent {
906 #[serde(skip_serializing_if = "std::string::String::is_empty")]
908 pub uuid: std::string::String,
909
910 #[serde(skip_serializing_if = "std::string::String::is_empty")]
912 pub target_version: std::string::String,
913
914 #[serde(skip_serializing_if = "std::string::String::is_empty")]
919 pub operation: std::string::String,
920
921 #[serde(rename = "type")]
923 pub r#type: crate::model::cluster::maintenance_event::Type,
924
925 pub schedule: crate::model::cluster::maintenance_event::Schedule,
927
928 pub state: crate::model::cluster::maintenance_event::State,
930
931 #[serde(skip_serializing_if = "std::option::Option::is_none")]
933 pub create_time: std::option::Option<wkt::Timestamp>,
934
935 #[serde(skip_serializing_if = "std::option::Option::is_none")]
937 pub start_time: std::option::Option<wkt::Timestamp>,
938
939 #[serde(skip_serializing_if = "std::option::Option::is_none")]
943 pub end_time: std::option::Option<wkt::Timestamp>,
944
945 #[serde(skip_serializing_if = "std::option::Option::is_none")]
947 pub update_time: std::option::Option<wkt::Timestamp>,
948 }
949
950 impl MaintenanceEvent {
951 pub fn new() -> Self {
952 std::default::Default::default()
953 }
954
955 pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
957 self.uuid = v.into();
958 self
959 }
960
961 pub fn set_target_version<T: std::convert::Into<std::string::String>>(
963 mut self,
964 v: T,
965 ) -> Self {
966 self.target_version = v.into();
967 self
968 }
969
970 pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
972 self.operation = v.into();
973 self
974 }
975
976 pub fn set_type<T: std::convert::Into<crate::model::cluster::maintenance_event::Type>>(
978 mut self,
979 v: T,
980 ) -> Self {
981 self.r#type = v.into();
982 self
983 }
984
985 pub fn set_schedule<
987 T: std::convert::Into<crate::model::cluster::maintenance_event::Schedule>,
988 >(
989 mut self,
990 v: T,
991 ) -> Self {
992 self.schedule = v.into();
993 self
994 }
995
996 pub fn set_state<T: std::convert::Into<crate::model::cluster::maintenance_event::State>>(
998 mut self,
999 v: T,
1000 ) -> Self {
1001 self.state = v.into();
1002 self
1003 }
1004
1005 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1007 mut self,
1008 v: T,
1009 ) -> Self {
1010 self.create_time = v.into();
1011 self
1012 }
1013
1014 pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1016 mut self,
1017 v: T,
1018 ) -> Self {
1019 self.start_time = v.into();
1020 self
1021 }
1022
1023 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1025 mut self,
1026 v: T,
1027 ) -> Self {
1028 self.end_time = v.into();
1029 self
1030 }
1031
1032 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1034 mut self,
1035 v: T,
1036 ) -> Self {
1037 self.update_time = v.into();
1038 self
1039 }
1040 }
1041
1042 impl wkt::message::Message for MaintenanceEvent {
1043 fn typename() -> &'static str {
1044 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.MaintenanceEvent"
1045 }
1046 }
1047
1048 pub mod maintenance_event {
1050 #[allow(unused_imports)]
1051 use super::*;
1052
1053 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1055 pub struct Type(std::borrow::Cow<'static, str>);
1056
1057 impl Type {
1058 pub const fn new(v: &'static str) -> Self {
1060 Self(std::borrow::Cow::Borrowed(v))
1061 }
1062
1063 pub fn value(&self) -> &str {
1065 &self.0
1066 }
1067 }
1068
1069 pub mod r#type {
1071 use super::Type;
1072
1073 pub const TYPE_UNSPECIFIED: Type = Type::new("TYPE_UNSPECIFIED");
1075
1076 pub const USER_INITIATED_UPGRADE: Type = Type::new("USER_INITIATED_UPGRADE");
1078
1079 pub const GOOGLE_DRIVEN_UPGRADE: Type = Type::new("GOOGLE_DRIVEN_UPGRADE");
1081 }
1082
1083 impl std::convert::From<std::string::String> for Type {
1084 fn from(value: std::string::String) -> Self {
1085 Self(std::borrow::Cow::Owned(value))
1086 }
1087 }
1088
1089 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1091 pub struct Schedule(std::borrow::Cow<'static, str>);
1092
1093 impl Schedule {
1094 pub const fn new(v: &'static str) -> Self {
1096 Self(std::borrow::Cow::Borrowed(v))
1097 }
1098
1099 pub fn value(&self) -> &str {
1101 &self.0
1102 }
1103 }
1104
1105 pub mod schedule {
1107 use super::Schedule;
1108
1109 pub const SCHEDULE_UNSPECIFIED: Schedule = Schedule::new("SCHEDULE_UNSPECIFIED");
1111
1112 pub const IMMEDIATELY: Schedule = Schedule::new("IMMEDIATELY");
1114 }
1115
1116 impl std::convert::From<std::string::String> for Schedule {
1117 fn from(value: std::string::String) -> Self {
1118 Self(std::borrow::Cow::Owned(value))
1119 }
1120 }
1121
1122 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1124 pub struct State(std::borrow::Cow<'static, str>);
1125
1126 impl State {
1127 pub const fn new(v: &'static str) -> Self {
1129 Self(std::borrow::Cow::Borrowed(v))
1130 }
1131
1132 pub fn value(&self) -> &str {
1134 &self.0
1135 }
1136 }
1137
1138 pub mod state {
1140 use super::State;
1141
1142 pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
1144
1145 pub const RECONCILING: State = State::new("RECONCILING");
1147
1148 pub const SUCCEEDED: State = State::new("SUCCEEDED");
1150
1151 pub const FAILED: State = State::new("FAILED");
1153 }
1154
1155 impl std::convert::From<std::string::String> for State {
1156 fn from(value: std::string::String) -> Self {
1157 Self(std::borrow::Cow::Owned(value))
1158 }
1159 }
1160 }
1161
1162 #[serde_with::serde_as]
1165 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1166 #[serde(default, rename_all = "camelCase")]
1167 #[non_exhaustive]
1168 pub struct SurvivabilityConfig {
1169 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1173 pub offline_reboot_ttl: std::option::Option<wkt::Duration>,
1174 }
1175
1176 impl SurvivabilityConfig {
1177 pub fn new() -> Self {
1178 std::default::Default::default()
1179 }
1180
1181 pub fn set_offline_reboot_ttl<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
1183 mut self,
1184 v: T,
1185 ) -> Self {
1186 self.offline_reboot_ttl = v.into();
1187 self
1188 }
1189 }
1190
1191 impl wkt::message::Message for SurvivabilityConfig {
1192 fn typename() -> &'static str {
1193 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SurvivabilityConfig"
1194 }
1195 }
1196
1197 #[serde_with::serde_as]
1200 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1201 #[serde(default, rename_all = "camelCase")]
1202 #[non_exhaustive]
1203 pub struct ConnectionState {
1204 pub state: crate::model::cluster::connection_state::State,
1206
1207 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1209 pub update_time: std::option::Option<wkt::Timestamp>,
1210 }
1211
1212 impl ConnectionState {
1213 pub fn new() -> Self {
1214 std::default::Default::default()
1215 }
1216
1217 pub fn set_state<T: std::convert::Into<crate::model::cluster::connection_state::State>>(
1219 mut self,
1220 v: T,
1221 ) -> Self {
1222 self.state = v.into();
1223 self
1224 }
1225
1226 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1228 mut self,
1229 v: T,
1230 ) -> Self {
1231 self.update_time = v.into();
1232 self
1233 }
1234 }
1235
1236 impl wkt::message::Message for ConnectionState {
1237 fn typename() -> &'static str {
1238 "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ConnectionState"
1239 }
1240 }
1241
1242 pub mod connection_state {
1244 #[allow(unused_imports)]
1245 use super::*;
1246
1247 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1249 pub struct State(std::borrow::Cow<'static, str>);
1250
1251 impl State {
1252 pub const fn new(v: &'static str) -> Self {
1254 Self(std::borrow::Cow::Borrowed(v))
1255 }
1256
1257 pub fn value(&self) -> &str {
1259 &self.0
1260 }
1261 }
1262
1263 pub mod state {
1265 use super::State;
1266
1267 pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
1269
1270 pub const DISCONNECTED: State = State::new("DISCONNECTED");
1272
1273 pub const CONNECTED: State = State::new("CONNECTED");
1275
1276 pub const CONNECTED_AND_SYNCING: State = State::new("CONNECTED_AND_SYNCING");
1279 }
1280
1281 impl std::convert::From<std::string::String> for State {
1282 fn from(value: std::string::String) -> Self {
1283 Self(std::borrow::Cow::Owned(value))
1284 }
1285 }
1286 }
1287
1288 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1290 pub struct Status(std::borrow::Cow<'static, str>);
1291
1292 impl Status {
1293 pub const fn new(v: &'static str) -> Self {
1295 Self(std::borrow::Cow::Borrowed(v))
1296 }
1297
1298 pub fn value(&self) -> &str {
1300 &self.0
1301 }
1302 }
1303
1304 pub mod status {
1306 use super::Status;
1307
1308 pub const STATUS_UNSPECIFIED: Status = Status::new("STATUS_UNSPECIFIED");
1310
1311 pub const PROVISIONING: Status = Status::new("PROVISIONING");
1313
1314 pub const RUNNING: Status = Status::new("RUNNING");
1316
1317 pub const DELETING: Status = Status::new("DELETING");
1319
1320 pub const ERROR: Status = Status::new("ERROR");
1323
1324 pub const RECONCILING: Status = Status::new("RECONCILING");
1326 }
1327
1328 impl std::convert::From<std::string::String> for Status {
1329 fn from(value: std::string::String) -> Self {
1330 Self(std::borrow::Cow::Owned(value))
1331 }
1332 }
1333
1334 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1336 pub struct ReleaseChannel(std::borrow::Cow<'static, str>);
1337
1338 impl ReleaseChannel {
1339 pub const fn new(v: &'static str) -> Self {
1341 Self(std::borrow::Cow::Borrowed(v))
1342 }
1343
1344 pub fn value(&self) -> &str {
1346 &self.0
1347 }
1348 }
1349
1350 pub mod release_channel {
1352 use super::ReleaseChannel;
1353
1354 pub const RELEASE_CHANNEL_UNSPECIFIED: ReleaseChannel =
1356 ReleaseChannel::new("RELEASE_CHANNEL_UNSPECIFIED");
1357
1358 pub const NONE: ReleaseChannel = ReleaseChannel::new("NONE");
1360
1361 pub const REGULAR: ReleaseChannel = ReleaseChannel::new("REGULAR");
1363 }
1364
1365 impl std::convert::From<std::string::String> for ReleaseChannel {
1366 fn from(value: std::string::String) -> Self {
1367 Self(std::borrow::Cow::Owned(value))
1368 }
1369 }
1370}
1371
1372#[serde_with::serde_as]
1374#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1375#[serde(default, rename_all = "camelCase")]
1376#[non_exhaustive]
1377pub struct ClusterNetworking {
1378 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1382 pub cluster_ipv4_cidr_blocks: std::vec::Vec<std::string::String>,
1383
1384 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1388 pub services_ipv4_cidr_blocks: std::vec::Vec<std::string::String>,
1389}
1390
1391impl ClusterNetworking {
1392 pub fn new() -> Self {
1393 std::default::Default::default()
1394 }
1395
1396 pub fn set_cluster_ipv4_cidr_blocks<T, V>(mut self, v: T) -> Self
1398 where
1399 T: std::iter::IntoIterator<Item = V>,
1400 V: std::convert::Into<std::string::String>,
1401 {
1402 use std::iter::Iterator;
1403 self.cluster_ipv4_cidr_blocks = v.into_iter().map(|i| i.into()).collect();
1404 self
1405 }
1406
1407 pub fn set_services_ipv4_cidr_blocks<T, V>(mut self, v: T) -> Self
1409 where
1410 T: std::iter::IntoIterator<Item = V>,
1411 V: std::convert::Into<std::string::String>,
1412 {
1413 use std::iter::Iterator;
1414 self.services_ipv4_cidr_blocks = v.into_iter().map(|i| i.into()).collect();
1415 self
1416 }
1417}
1418
1419impl wkt::message::Message for ClusterNetworking {
1420 fn typename() -> &'static str {
1421 "type.googleapis.com/google.cloud.edgecontainer.v1.ClusterNetworking"
1422 }
1423}
1424
1425#[serde_with::serde_as]
1431#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1432#[serde(default, rename_all = "camelCase")]
1433#[non_exhaustive]
1434pub struct Fleet {
1435 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1441 pub project: std::string::String,
1442
1443 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1449 pub membership: std::string::String,
1450}
1451
1452impl Fleet {
1453 pub fn new() -> Self {
1454 std::default::Default::default()
1455 }
1456
1457 pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1459 self.project = v.into();
1460 self
1461 }
1462
1463 pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1465 self.membership = v.into();
1466 self
1467 }
1468}
1469
1470impl wkt::message::Message for Fleet {
1471 fn typename() -> &'static str {
1472 "type.googleapis.com/google.cloud.edgecontainer.v1.Fleet"
1473 }
1474}
1475
1476#[serde_with::serde_as]
1478#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1479#[serde(default, rename_all = "camelCase")]
1480#[non_exhaustive]
1481pub struct ClusterUser {
1482 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1484 pub username: std::string::String,
1485}
1486
1487impl ClusterUser {
1488 pub fn new() -> Self {
1489 std::default::Default::default()
1490 }
1491
1492 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1494 self.username = v.into();
1495 self
1496 }
1497}
1498
1499impl wkt::message::Message for ClusterUser {
1500 fn typename() -> &'static str {
1501 "type.googleapis.com/google.cloud.edgecontainer.v1.ClusterUser"
1502 }
1503}
1504
1505#[serde_with::serde_as]
1507#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1508#[serde(default, rename_all = "camelCase")]
1509#[non_exhaustive]
1510pub struct Authorization {
1511 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1515 pub admin_users: std::option::Option<crate::model::ClusterUser>,
1516}
1517
1518impl Authorization {
1519 pub fn new() -> Self {
1520 std::default::Default::default()
1521 }
1522
1523 pub fn set_admin_users<
1525 T: std::convert::Into<std::option::Option<crate::model::ClusterUser>>,
1526 >(
1527 mut self,
1528 v: T,
1529 ) -> Self {
1530 self.admin_users = v.into();
1531 self
1532 }
1533}
1534
1535impl wkt::message::Message for Authorization {
1536 fn typename() -> &'static str {
1537 "type.googleapis.com/google.cloud.edgecontainer.v1.Authorization"
1538 }
1539}
1540
1541#[serde_with::serde_as]
1544#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1545#[serde(default, rename_all = "camelCase")]
1546#[non_exhaustive]
1547pub struct NodePool {
1548 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1550 pub name: std::string::String,
1551
1552 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1554 pub create_time: std::option::Option<wkt::Timestamp>,
1555
1556 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1558 pub update_time: std::option::Option<wkt::Timestamp>,
1559
1560 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1562 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1563
1564 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1567 pub node_location: std::string::String,
1568
1569 pub node_count: i32,
1571
1572 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1576 pub machine_filter: std::string::String,
1577
1578 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1581 pub local_disk_encryption: std::option::Option<crate::model::node_pool::LocalDiskEncryption>,
1582
1583 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1585 pub node_version: std::string::String,
1586
1587 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1589 pub node_config: std::option::Option<crate::model::node_pool::NodeConfig>,
1590}
1591
1592impl NodePool {
1593 pub fn new() -> Self {
1594 std::default::Default::default()
1595 }
1596
1597 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1599 self.name = v.into();
1600 self
1601 }
1602
1603 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1605 mut self,
1606 v: T,
1607 ) -> Self {
1608 self.create_time = v.into();
1609 self
1610 }
1611
1612 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1614 mut self,
1615 v: T,
1616 ) -> Self {
1617 self.update_time = v.into();
1618 self
1619 }
1620
1621 pub fn set_node_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1623 self.node_location = v.into();
1624 self
1625 }
1626
1627 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1629 self.node_count = v.into();
1630 self
1631 }
1632
1633 pub fn set_machine_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1635 self.machine_filter = v.into();
1636 self
1637 }
1638
1639 pub fn set_local_disk_encryption<
1641 T: std::convert::Into<std::option::Option<crate::model::node_pool::LocalDiskEncryption>>,
1642 >(
1643 mut self,
1644 v: T,
1645 ) -> Self {
1646 self.local_disk_encryption = v.into();
1647 self
1648 }
1649
1650 pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1652 self.node_version = v.into();
1653 self
1654 }
1655
1656 pub fn set_node_config<
1658 T: std::convert::Into<std::option::Option<crate::model::node_pool::NodeConfig>>,
1659 >(
1660 mut self,
1661 v: T,
1662 ) -> Self {
1663 self.node_config = v.into();
1664 self
1665 }
1666
1667 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1669 where
1670 T: std::iter::IntoIterator<Item = (K, V)>,
1671 K: std::convert::Into<std::string::String>,
1672 V: std::convert::Into<std::string::String>,
1673 {
1674 use std::iter::Iterator;
1675 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1676 self
1677 }
1678}
1679
1680impl wkt::message::Message for NodePool {
1681 fn typename() -> &'static str {
1682 "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool"
1683 }
1684}
1685
1686pub mod node_pool {
1688 #[allow(unused_imports)]
1689 use super::*;
1690
1691 #[serde_with::serde_as]
1693 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1694 #[serde(default, rename_all = "camelCase")]
1695 #[non_exhaustive]
1696 pub struct LocalDiskEncryption {
1697 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1702 pub kms_key: std::string::String,
1703
1704 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1707 pub kms_key_active_version: std::string::String,
1708
1709 pub kms_key_state: crate::model::KmsKeyState,
1714
1715 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1720 pub kms_status: std::option::Option<rpc::model::Status>,
1721
1722 pub resource_state: crate::model::ResourceState,
1724 }
1725
1726 impl LocalDiskEncryption {
1727 pub fn new() -> Self {
1728 std::default::Default::default()
1729 }
1730
1731 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1733 self.kms_key = v.into();
1734 self
1735 }
1736
1737 pub fn set_kms_key_active_version<T: std::convert::Into<std::string::String>>(
1739 mut self,
1740 v: T,
1741 ) -> Self {
1742 self.kms_key_active_version = v.into();
1743 self
1744 }
1745
1746 pub fn set_kms_key_state<T: std::convert::Into<crate::model::KmsKeyState>>(
1748 mut self,
1749 v: T,
1750 ) -> Self {
1751 self.kms_key_state = v.into();
1752 self
1753 }
1754
1755 pub fn set_kms_status<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
1757 mut self,
1758 v: T,
1759 ) -> Self {
1760 self.kms_status = v.into();
1761 self
1762 }
1763
1764 pub fn set_resource_state<T: std::convert::Into<crate::model::ResourceState>>(
1766 mut self,
1767 v: T,
1768 ) -> Self {
1769 self.resource_state = v.into();
1770 self
1771 }
1772 }
1773
1774 impl wkt::message::Message for LocalDiskEncryption {
1775 fn typename() -> &'static str {
1776 "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool.LocalDiskEncryption"
1777 }
1778 }
1779
1780 #[serde_with::serde_as]
1782 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1783 #[serde(default, rename_all = "camelCase")]
1784 #[non_exhaustive]
1785 pub struct NodeConfig {
1786 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1788 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1789
1790 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1796 pub node_storage_schema: std::string::String,
1797 }
1798
1799 impl NodeConfig {
1800 pub fn new() -> Self {
1801 std::default::Default::default()
1802 }
1803
1804 pub fn set_node_storage_schema<T: std::convert::Into<std::string::String>>(
1806 mut self,
1807 v: T,
1808 ) -> Self {
1809 self.node_storage_schema = v.into();
1810 self
1811 }
1812
1813 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1815 where
1816 T: std::iter::IntoIterator<Item = (K, V)>,
1817 K: std::convert::Into<std::string::String>,
1818 V: std::convert::Into<std::string::String>,
1819 {
1820 use std::iter::Iterator;
1821 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1822 self
1823 }
1824 }
1825
1826 impl wkt::message::Message for NodeConfig {
1827 fn typename() -> &'static str {
1828 "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool.NodeConfig"
1829 }
1830 }
1831}
1832
1833#[serde_with::serde_as]
1836#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1837#[serde(default, rename_all = "camelCase")]
1838#[non_exhaustive]
1839pub struct Machine {
1840 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1842 pub name: std::string::String,
1843
1844 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1846 pub create_time: std::option::Option<wkt::Timestamp>,
1847
1848 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1850 pub update_time: std::option::Option<wkt::Timestamp>,
1851
1852 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1854 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1855
1856 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1865 pub hosted_node: std::string::String,
1866
1867 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1869 pub zone: std::string::String,
1870
1871 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1873 pub version: std::string::String,
1874
1875 pub disabled: bool,
1878}
1879
1880impl Machine {
1881 pub fn new() -> Self {
1882 std::default::Default::default()
1883 }
1884
1885 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1887 self.name = v.into();
1888 self
1889 }
1890
1891 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1893 mut self,
1894 v: T,
1895 ) -> Self {
1896 self.create_time = v.into();
1897 self
1898 }
1899
1900 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1902 mut self,
1903 v: T,
1904 ) -> Self {
1905 self.update_time = v.into();
1906 self
1907 }
1908
1909 pub fn set_hosted_node<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1911 self.hosted_node = v.into();
1912 self
1913 }
1914
1915 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1917 self.zone = v.into();
1918 self
1919 }
1920
1921 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1923 self.version = v.into();
1924 self
1925 }
1926
1927 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1929 self.disabled = v.into();
1930 self
1931 }
1932
1933 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1935 where
1936 T: std::iter::IntoIterator<Item = (K, V)>,
1937 K: std::convert::Into<std::string::String>,
1938 V: std::convert::Into<std::string::String>,
1939 {
1940 use std::iter::Iterator;
1941 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1942 self
1943 }
1944}
1945
1946impl wkt::message::Message for Machine {
1947 fn typename() -> &'static str {
1948 "type.googleapis.com/google.cloud.edgecontainer.v1.Machine"
1949 }
1950}
1951
1952#[serde_with::serde_as]
1954#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1955#[serde(default, rename_all = "camelCase")]
1956#[non_exhaustive]
1957pub struct VpnConnection {
1958 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1960 pub name: std::string::String,
1961
1962 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1964 pub create_time: std::option::Option<wkt::Timestamp>,
1965
1966 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1968 pub update_time: std::option::Option<wkt::Timestamp>,
1969
1970 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1972 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1973
1974 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1978 pub nat_gateway_ip: std::string::String,
1979
1980 pub bgp_routing_mode: crate::model::vpn_connection::BgpRoutingMode,
1982
1983 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1986 pub cluster: std::string::String,
1987
1988 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1990 pub vpc: std::string::String,
1991
1992 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1995 pub vpc_project: std::option::Option<crate::model::vpn_connection::VpcProject>,
1996
1997 pub enable_high_availability: bool,
2000
2001 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2003 pub router: std::string::String,
2004
2005 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2007 pub details: std::option::Option<crate::model::vpn_connection::Details>,
2008}
2009
2010impl VpnConnection {
2011 pub fn new() -> Self {
2012 std::default::Default::default()
2013 }
2014
2015 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2017 self.name = v.into();
2018 self
2019 }
2020
2021 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2023 mut self,
2024 v: T,
2025 ) -> Self {
2026 self.create_time = v.into();
2027 self
2028 }
2029
2030 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2032 mut self,
2033 v: T,
2034 ) -> Self {
2035 self.update_time = v.into();
2036 self
2037 }
2038
2039 pub fn set_nat_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2041 self.nat_gateway_ip = v.into();
2042 self
2043 }
2044
2045 pub fn set_bgp_routing_mode<
2047 T: std::convert::Into<crate::model::vpn_connection::BgpRoutingMode>,
2048 >(
2049 mut self,
2050 v: T,
2051 ) -> Self {
2052 self.bgp_routing_mode = v.into();
2053 self
2054 }
2055
2056 pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2058 self.cluster = v.into();
2059 self
2060 }
2061
2062 pub fn set_vpc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2064 self.vpc = v.into();
2065 self
2066 }
2067
2068 pub fn set_vpc_project<
2070 T: std::convert::Into<std::option::Option<crate::model::vpn_connection::VpcProject>>,
2071 >(
2072 mut self,
2073 v: T,
2074 ) -> Self {
2075 self.vpc_project = v.into();
2076 self
2077 }
2078
2079 pub fn set_enable_high_availability<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2081 self.enable_high_availability = v.into();
2082 self
2083 }
2084
2085 pub fn set_router<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2087 self.router = v.into();
2088 self
2089 }
2090
2091 pub fn set_details<
2093 T: std::convert::Into<std::option::Option<crate::model::vpn_connection::Details>>,
2094 >(
2095 mut self,
2096 v: T,
2097 ) -> Self {
2098 self.details = v.into();
2099 self
2100 }
2101
2102 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2104 where
2105 T: std::iter::IntoIterator<Item = (K, V)>,
2106 K: std::convert::Into<std::string::String>,
2107 V: std::convert::Into<std::string::String>,
2108 {
2109 use std::iter::Iterator;
2110 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2111 self
2112 }
2113}
2114
2115impl wkt::message::Message for VpnConnection {
2116 fn typename() -> &'static str {
2117 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection"
2118 }
2119}
2120
2121pub mod vpn_connection {
2123 #[allow(unused_imports)]
2124 use super::*;
2125
2126 #[serde_with::serde_as]
2128 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2129 #[serde(default, rename_all = "camelCase")]
2130 #[non_exhaustive]
2131 pub struct VpcProject {
2132 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2135 pub project_id: std::string::String,
2136
2137 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2139 pub service_account: std::string::String,
2140 }
2141
2142 impl VpcProject {
2143 pub fn new() -> Self {
2144 std::default::Default::default()
2145 }
2146
2147 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2149 self.project_id = v.into();
2150 self
2151 }
2152
2153 pub fn set_service_account<T: std::convert::Into<std::string::String>>(
2155 mut self,
2156 v: T,
2157 ) -> Self {
2158 self.service_account = v.into();
2159 self
2160 }
2161 }
2162
2163 impl wkt::message::Message for VpcProject {
2164 fn typename() -> &'static str {
2165 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.VpcProject"
2166 }
2167 }
2168
2169 #[serde_with::serde_as]
2171 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2172 #[serde(default, rename_all = "camelCase")]
2173 #[non_exhaustive]
2174 pub struct Details {
2175 pub state: crate::model::vpn_connection::details::State,
2177
2178 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2180 pub error: std::string::String,
2181
2182 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2184 pub cloud_router: std::option::Option<crate::model::vpn_connection::details::CloudRouter>,
2185
2186 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2188 pub cloud_vpns: std::vec::Vec<crate::model::vpn_connection::details::CloudVpn>,
2189 }
2190
2191 impl Details {
2192 pub fn new() -> Self {
2193 std::default::Default::default()
2194 }
2195
2196 pub fn set_state<T: std::convert::Into<crate::model::vpn_connection::details::State>>(
2198 mut self,
2199 v: T,
2200 ) -> Self {
2201 self.state = v.into();
2202 self
2203 }
2204
2205 pub fn set_error<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2207 self.error = v.into();
2208 self
2209 }
2210
2211 pub fn set_cloud_router<
2213 T: std::convert::Into<
2214 std::option::Option<crate::model::vpn_connection::details::CloudRouter>,
2215 >,
2216 >(
2217 mut self,
2218 v: T,
2219 ) -> Self {
2220 self.cloud_router = v.into();
2221 self
2222 }
2223
2224 pub fn set_cloud_vpns<T, V>(mut self, v: T) -> Self
2226 where
2227 T: std::iter::IntoIterator<Item = V>,
2228 V: std::convert::Into<crate::model::vpn_connection::details::CloudVpn>,
2229 {
2230 use std::iter::Iterator;
2231 self.cloud_vpns = v.into_iter().map(|i| i.into()).collect();
2232 self
2233 }
2234 }
2235
2236 impl wkt::message::Message for Details {
2237 fn typename() -> &'static str {
2238 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details"
2239 }
2240 }
2241
2242 pub mod details {
2244 #[allow(unused_imports)]
2245 use super::*;
2246
2247 #[serde_with::serde_as]
2249 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2250 #[serde(default, rename_all = "camelCase")]
2251 #[non_exhaustive]
2252 pub struct CloudRouter {
2253 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2255 pub name: std::string::String,
2256 }
2257
2258 impl CloudRouter {
2259 pub fn new() -> Self {
2260 std::default::Default::default()
2261 }
2262
2263 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2265 self.name = v.into();
2266 self
2267 }
2268 }
2269
2270 impl wkt::message::Message for CloudRouter {
2271 fn typename() -> &'static str {
2272 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details.CloudRouter"
2273 }
2274 }
2275
2276 #[serde_with::serde_as]
2278 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2279 #[serde(default, rename_all = "camelCase")]
2280 #[non_exhaustive]
2281 pub struct CloudVpn {
2282 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2284 pub gateway: std::string::String,
2285 }
2286
2287 impl CloudVpn {
2288 pub fn new() -> Self {
2289 std::default::Default::default()
2290 }
2291
2292 pub fn set_gateway<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2294 self.gateway = v.into();
2295 self
2296 }
2297 }
2298
2299 impl wkt::message::Message for CloudVpn {
2300 fn typename() -> &'static str {
2301 "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details.CloudVpn"
2302 }
2303 }
2304
2305 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2307 pub struct State(std::borrow::Cow<'static, str>);
2308
2309 impl State {
2310 pub const fn new(v: &'static str) -> Self {
2312 Self(std::borrow::Cow::Borrowed(v))
2313 }
2314
2315 pub fn value(&self) -> &str {
2317 &self.0
2318 }
2319 }
2320
2321 pub mod state {
2323 use super::State;
2324
2325 pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
2327
2328 pub const STATE_CONNECTED: State = State::new("STATE_CONNECTED");
2330
2331 pub const STATE_CONNECTING: State = State::new("STATE_CONNECTING");
2333
2334 pub const STATE_ERROR: State = State::new("STATE_ERROR");
2336 }
2337
2338 impl std::convert::From<std::string::String> for State {
2339 fn from(value: std::string::String) -> Self {
2340 Self(std::borrow::Cow::Owned(value))
2341 }
2342 }
2343 }
2344
2345 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2347 pub struct BgpRoutingMode(std::borrow::Cow<'static, str>);
2348
2349 impl BgpRoutingMode {
2350 pub const fn new(v: &'static str) -> Self {
2352 Self(std::borrow::Cow::Borrowed(v))
2353 }
2354
2355 pub fn value(&self) -> &str {
2357 &self.0
2358 }
2359 }
2360
2361 pub mod bgp_routing_mode {
2363 use super::BgpRoutingMode;
2364
2365 pub const BGP_ROUTING_MODE_UNSPECIFIED: BgpRoutingMode =
2367 BgpRoutingMode::new("BGP_ROUTING_MODE_UNSPECIFIED");
2368
2369 pub const REGIONAL: BgpRoutingMode = BgpRoutingMode::new("REGIONAL");
2371
2372 pub const GLOBAL: BgpRoutingMode = BgpRoutingMode::new("GLOBAL");
2374 }
2375
2376 impl std::convert::From<std::string::String> for BgpRoutingMode {
2377 fn from(value: std::string::String) -> Self {
2378 Self(std::borrow::Cow::Owned(value))
2379 }
2380 }
2381}
2382
2383#[serde_with::serde_as]
2388#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2389#[serde(default, rename_all = "camelCase")]
2390#[non_exhaustive]
2391pub struct LocationMetadata {
2392 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2395 pub available_zones: std::collections::HashMap<std::string::String, crate::model::ZoneMetadata>,
2396}
2397
2398impl LocationMetadata {
2399 pub fn new() -> Self {
2400 std::default::Default::default()
2401 }
2402
2403 pub fn set_available_zones<T, K, V>(mut self, v: T) -> Self
2405 where
2406 T: std::iter::IntoIterator<Item = (K, V)>,
2407 K: std::convert::Into<std::string::String>,
2408 V: std::convert::Into<crate::model::ZoneMetadata>,
2409 {
2410 use std::iter::Iterator;
2411 self.available_zones = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2412 self
2413 }
2414}
2415
2416impl wkt::message::Message for LocationMetadata {
2417 fn typename() -> &'static str {
2418 "type.googleapis.com/google.cloud.edgecontainer.v1.LocationMetadata"
2419 }
2420}
2421
2422#[serde_with::serde_as]
2424#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2425#[serde(default, rename_all = "camelCase")]
2426#[non_exhaustive]
2427pub struct ZoneMetadata {
2428 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2430 pub quota: std::vec::Vec<crate::model::Quota>,
2431
2432 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2434 pub rack_types:
2435 std::collections::HashMap<std::string::String, crate::model::zone_metadata::RackType>,
2436
2437 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2439 pub config_data: std::option::Option<crate::model::ConfigData>,
2440}
2441
2442impl ZoneMetadata {
2443 pub fn new() -> Self {
2444 std::default::Default::default()
2445 }
2446
2447 pub fn set_config_data<T: std::convert::Into<std::option::Option<crate::model::ConfigData>>>(
2449 mut self,
2450 v: T,
2451 ) -> Self {
2452 self.config_data = v.into();
2453 self
2454 }
2455
2456 pub fn set_quota<T, V>(mut self, v: T) -> Self
2458 where
2459 T: std::iter::IntoIterator<Item = V>,
2460 V: std::convert::Into<crate::model::Quota>,
2461 {
2462 use std::iter::Iterator;
2463 self.quota = v.into_iter().map(|i| i.into()).collect();
2464 self
2465 }
2466
2467 pub fn set_rack_types<T, K, V>(mut self, v: T) -> Self
2469 where
2470 T: std::iter::IntoIterator<Item = (K, V)>,
2471 K: std::convert::Into<std::string::String>,
2472 V: std::convert::Into<crate::model::zone_metadata::RackType>,
2473 {
2474 use std::iter::Iterator;
2475 self.rack_types = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2476 self
2477 }
2478}
2479
2480impl wkt::message::Message for ZoneMetadata {
2481 fn typename() -> &'static str {
2482 "type.googleapis.com/google.cloud.edgecontainer.v1.ZoneMetadata"
2483 }
2484}
2485
2486pub mod zone_metadata {
2488 #[allow(unused_imports)]
2489 use super::*;
2490
2491 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2493 pub struct RackType(std::borrow::Cow<'static, str>);
2494
2495 impl RackType {
2496 pub const fn new(v: &'static str) -> Self {
2498 Self(std::borrow::Cow::Borrowed(v))
2499 }
2500
2501 pub fn value(&self) -> &str {
2503 &self.0
2504 }
2505 }
2506
2507 pub mod rack_type {
2509 use super::RackType;
2510
2511 pub const RACK_TYPE_UNSPECIFIED: RackType = RackType::new("RACK_TYPE_UNSPECIFIED");
2513
2514 pub const BASE: RackType = RackType::new("BASE");
2517
2518 pub const EXPANSION: RackType = RackType::new("EXPANSION");
2521 }
2522
2523 impl std::convert::From<std::string::String> for RackType {
2524 fn from(value: std::string::String) -> Self {
2525 Self(std::borrow::Cow::Owned(value))
2526 }
2527 }
2528}
2529
2530#[serde_with::serde_as]
2532#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2533#[serde(default, rename_all = "camelCase")]
2534#[non_exhaustive]
2535pub struct ConfigData {
2536 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2538 pub available_external_lb_pools_ipv4: std::vec::Vec<std::string::String>,
2539
2540 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2542 pub available_external_lb_pools_ipv6: std::vec::Vec<std::string::String>,
2543}
2544
2545impl ConfigData {
2546 pub fn new() -> Self {
2547 std::default::Default::default()
2548 }
2549
2550 pub fn set_available_external_lb_pools_ipv4<T, V>(mut self, v: T) -> Self
2552 where
2553 T: std::iter::IntoIterator<Item = V>,
2554 V: std::convert::Into<std::string::String>,
2555 {
2556 use std::iter::Iterator;
2557 self.available_external_lb_pools_ipv4 = v.into_iter().map(|i| i.into()).collect();
2558 self
2559 }
2560
2561 pub fn set_available_external_lb_pools_ipv6<T, V>(mut self, v: T) -> Self
2563 where
2564 T: std::iter::IntoIterator<Item = V>,
2565 V: std::convert::Into<std::string::String>,
2566 {
2567 use std::iter::Iterator;
2568 self.available_external_lb_pools_ipv6 = v.into_iter().map(|i| i.into()).collect();
2569 self
2570 }
2571}
2572
2573impl wkt::message::Message for ConfigData {
2574 fn typename() -> &'static str {
2575 "type.googleapis.com/google.cloud.edgecontainer.v1.ConfigData"
2576 }
2577}
2578
2579#[serde_with::serde_as]
2581#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2582#[serde(default, rename_all = "camelCase")]
2583#[non_exhaustive]
2584pub struct Quota {
2585 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2587 pub metric: std::string::String,
2588
2589 pub limit: f64,
2591
2592 pub usage: f64,
2594}
2595
2596impl Quota {
2597 pub fn new() -> Self {
2598 std::default::Default::default()
2599 }
2600
2601 pub fn set_metric<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2603 self.metric = v.into();
2604 self
2605 }
2606
2607 pub fn set_limit<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2609 self.limit = v.into();
2610 self
2611 }
2612
2613 pub fn set_usage<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2615 self.usage = v.into();
2616 self
2617 }
2618}
2619
2620impl wkt::message::Message for Quota {
2621 fn typename() -> &'static str {
2622 "type.googleapis.com/google.cloud.edgecontainer.v1.Quota"
2623 }
2624}
2625
2626#[serde_with::serde_as]
2628#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2629#[serde(default, rename_all = "camelCase")]
2630#[non_exhaustive]
2631pub struct MaintenancePolicy {
2632 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2634 pub window: std::option::Option<crate::model::MaintenanceWindow>,
2635
2636 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2641 pub maintenance_exclusions: std::vec::Vec<crate::model::MaintenanceExclusionWindow>,
2642}
2643
2644impl MaintenancePolicy {
2645 pub fn new() -> Self {
2646 std::default::Default::default()
2647 }
2648
2649 pub fn set_window<
2651 T: std::convert::Into<std::option::Option<crate::model::MaintenanceWindow>>,
2652 >(
2653 mut self,
2654 v: T,
2655 ) -> Self {
2656 self.window = v.into();
2657 self
2658 }
2659
2660 pub fn set_maintenance_exclusions<T, V>(mut self, v: T) -> Self
2662 where
2663 T: std::iter::IntoIterator<Item = V>,
2664 V: std::convert::Into<crate::model::MaintenanceExclusionWindow>,
2665 {
2666 use std::iter::Iterator;
2667 self.maintenance_exclusions = v.into_iter().map(|i| i.into()).collect();
2668 self
2669 }
2670}
2671
2672impl wkt::message::Message for MaintenancePolicy {
2673 fn typename() -> &'static str {
2674 "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenancePolicy"
2675 }
2676}
2677
2678#[serde_with::serde_as]
2680#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2681#[serde(default, rename_all = "camelCase")]
2682#[non_exhaustive]
2683pub struct MaintenanceWindow {
2684 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2686 pub recurring_window: std::option::Option<crate::model::RecurringTimeWindow>,
2687}
2688
2689impl MaintenanceWindow {
2690 pub fn new() -> Self {
2691 std::default::Default::default()
2692 }
2693
2694 pub fn set_recurring_window<
2696 T: std::convert::Into<std::option::Option<crate::model::RecurringTimeWindow>>,
2697 >(
2698 mut self,
2699 v: T,
2700 ) -> Self {
2701 self.recurring_window = v.into();
2702 self
2703 }
2704}
2705
2706impl wkt::message::Message for MaintenanceWindow {
2707 fn typename() -> &'static str {
2708 "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenanceWindow"
2709 }
2710}
2711
2712#[serde_with::serde_as]
2714#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2715#[serde(default, rename_all = "camelCase")]
2716#[non_exhaustive]
2717pub struct RecurringTimeWindow {
2718 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2720 pub window: std::option::Option<crate::model::TimeWindow>,
2721
2722 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2726 pub recurrence: std::string::String,
2727}
2728
2729impl RecurringTimeWindow {
2730 pub fn new() -> Self {
2731 std::default::Default::default()
2732 }
2733
2734 pub fn set_window<T: std::convert::Into<std::option::Option<crate::model::TimeWindow>>>(
2736 mut self,
2737 v: T,
2738 ) -> Self {
2739 self.window = v.into();
2740 self
2741 }
2742
2743 pub fn set_recurrence<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2745 self.recurrence = v.into();
2746 self
2747 }
2748}
2749
2750impl wkt::message::Message for RecurringTimeWindow {
2751 fn typename() -> &'static str {
2752 "type.googleapis.com/google.cloud.edgecontainer.v1.RecurringTimeWindow"
2753 }
2754}
2755
2756#[serde_with::serde_as]
2758#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2759#[serde(default, rename_all = "camelCase")]
2760#[non_exhaustive]
2761pub struct MaintenanceExclusionWindow {
2762 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2764 pub window: std::option::Option<crate::model::TimeWindow>,
2765
2766 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2768 pub id: std::string::String,
2769}
2770
2771impl MaintenanceExclusionWindow {
2772 pub fn new() -> Self {
2773 std::default::Default::default()
2774 }
2775
2776 pub fn set_window<T: std::convert::Into<std::option::Option<crate::model::TimeWindow>>>(
2778 mut self,
2779 v: T,
2780 ) -> Self {
2781 self.window = v.into();
2782 self
2783 }
2784
2785 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2787 self.id = v.into();
2788 self
2789 }
2790}
2791
2792impl wkt::message::Message for MaintenanceExclusionWindow {
2793 fn typename() -> &'static str {
2794 "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenanceExclusionWindow"
2795 }
2796}
2797
2798#[serde_with::serde_as]
2800#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2801#[serde(default, rename_all = "camelCase")]
2802#[non_exhaustive]
2803pub struct TimeWindow {
2804 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2806 pub start_time: std::option::Option<wkt::Timestamp>,
2807
2808 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2811 pub end_time: std::option::Option<wkt::Timestamp>,
2812}
2813
2814impl TimeWindow {
2815 pub fn new() -> Self {
2816 std::default::Default::default()
2817 }
2818
2819 pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2821 mut self,
2822 v: T,
2823 ) -> Self {
2824 self.start_time = v.into();
2825 self
2826 }
2827
2828 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2830 mut self,
2831 v: T,
2832 ) -> Self {
2833 self.end_time = v.into();
2834 self
2835 }
2836}
2837
2838impl wkt::message::Message for TimeWindow {
2839 fn typename() -> &'static str {
2840 "type.googleapis.com/google.cloud.edgecontainer.v1.TimeWindow"
2841 }
2842}
2843
2844#[serde_with::serde_as]
2846#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2847#[serde(default, rename_all = "camelCase")]
2848#[non_exhaustive]
2849pub struct ServerConfig {
2850 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2852 pub channels: std::collections::HashMap<std::string::String, crate::model::ChannelConfig>,
2853
2854 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2856 pub versions: std::vec::Vec<crate::model::Version>,
2857
2858 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2860 pub default_version: std::string::String,
2861}
2862
2863impl ServerConfig {
2864 pub fn new() -> Self {
2865 std::default::Default::default()
2866 }
2867
2868 pub fn set_default_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2870 self.default_version = v.into();
2871 self
2872 }
2873
2874 pub fn set_versions<T, V>(mut self, v: T) -> Self
2876 where
2877 T: std::iter::IntoIterator<Item = V>,
2878 V: std::convert::Into<crate::model::Version>,
2879 {
2880 use std::iter::Iterator;
2881 self.versions = v.into_iter().map(|i| i.into()).collect();
2882 self
2883 }
2884
2885 pub fn set_channels<T, K, V>(mut self, v: T) -> Self
2887 where
2888 T: std::iter::IntoIterator<Item = (K, V)>,
2889 K: std::convert::Into<std::string::String>,
2890 V: std::convert::Into<crate::model::ChannelConfig>,
2891 {
2892 use std::iter::Iterator;
2893 self.channels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2894 self
2895 }
2896}
2897
2898impl wkt::message::Message for ServerConfig {
2899 fn typename() -> &'static str {
2900 "type.googleapis.com/google.cloud.edgecontainer.v1.ServerConfig"
2901 }
2902}
2903
2904#[serde_with::serde_as]
2906#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2907#[serde(default, rename_all = "camelCase")]
2908#[non_exhaustive]
2909pub struct ChannelConfig {
2910 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2912 pub default_version: std::string::String,
2913}
2914
2915impl ChannelConfig {
2916 pub fn new() -> Self {
2917 std::default::Default::default()
2918 }
2919
2920 pub fn set_default_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2922 self.default_version = v.into();
2923 self
2924 }
2925}
2926
2927impl wkt::message::Message for ChannelConfig {
2928 fn typename() -> &'static str {
2929 "type.googleapis.com/google.cloud.edgecontainer.v1.ChannelConfig"
2930 }
2931}
2932
2933#[serde_with::serde_as]
2935#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2936#[serde(default, rename_all = "camelCase")]
2937#[non_exhaustive]
2938pub struct Version {
2939 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2941 pub name: std::string::String,
2942}
2943
2944impl Version {
2945 pub fn new() -> Self {
2946 std::default::Default::default()
2947 }
2948
2949 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2951 self.name = v.into();
2952 self
2953 }
2954}
2955
2956impl wkt::message::Message for Version {
2957 fn typename() -> &'static str {
2958 "type.googleapis.com/google.cloud.edgecontainer.v1.Version"
2959 }
2960}
2961
2962#[serde_with::serde_as]
2964#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2965#[serde(default, rename_all = "camelCase")]
2966#[non_exhaustive]
2967pub struct OperationMetadata {
2968 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2970 pub create_time: std::option::Option<wkt::Timestamp>,
2971
2972 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2974 pub end_time: std::option::Option<wkt::Timestamp>,
2975
2976 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2978 pub target: std::string::String,
2979
2980 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2982 pub verb: std::string::String,
2983
2984 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2986 pub status_message: std::string::String,
2987
2988 pub requested_cancellation: bool,
2995
2996 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2998 pub api_version: std::string::String,
2999
3000 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3003 pub warnings: std::vec::Vec<std::string::String>,
3004
3005 pub status_reason: crate::model::operation_metadata::StatusReason,
3007}
3008
3009impl OperationMetadata {
3010 pub fn new() -> Self {
3011 std::default::Default::default()
3012 }
3013
3014 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3016 mut self,
3017 v: T,
3018 ) -> Self {
3019 self.create_time = v.into();
3020 self
3021 }
3022
3023 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3025 mut self,
3026 v: T,
3027 ) -> Self {
3028 self.end_time = v.into();
3029 self
3030 }
3031
3032 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3034 self.target = v.into();
3035 self
3036 }
3037
3038 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3040 self.verb = v.into();
3041 self
3042 }
3043
3044 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3046 self.status_message = v.into();
3047 self
3048 }
3049
3050 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3052 self.requested_cancellation = v.into();
3053 self
3054 }
3055
3056 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3058 self.api_version = v.into();
3059 self
3060 }
3061
3062 pub fn set_status_reason<
3064 T: std::convert::Into<crate::model::operation_metadata::StatusReason>,
3065 >(
3066 mut self,
3067 v: T,
3068 ) -> Self {
3069 self.status_reason = v.into();
3070 self
3071 }
3072
3073 pub fn set_warnings<T, V>(mut self, v: T) -> Self
3075 where
3076 T: std::iter::IntoIterator<Item = V>,
3077 V: std::convert::Into<std::string::String>,
3078 {
3079 use std::iter::Iterator;
3080 self.warnings = v.into_iter().map(|i| i.into()).collect();
3081 self
3082 }
3083}
3084
3085impl wkt::message::Message for OperationMetadata {
3086 fn typename() -> &'static str {
3087 "type.googleapis.com/google.cloud.edgecontainer.v1.OperationMetadata"
3088 }
3089}
3090
3091pub mod operation_metadata {
3093 #[allow(unused_imports)]
3094 use super::*;
3095
3096 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3098 pub struct StatusReason(std::borrow::Cow<'static, str>);
3099
3100 impl StatusReason {
3101 pub const fn new(v: &'static str) -> Self {
3103 Self(std::borrow::Cow::Borrowed(v))
3104 }
3105
3106 pub fn value(&self) -> &str {
3108 &self.0
3109 }
3110 }
3111
3112 pub mod status_reason {
3114 use super::StatusReason;
3115
3116 pub const STATUS_REASON_UNSPECIFIED: StatusReason =
3118 StatusReason::new("STATUS_REASON_UNSPECIFIED");
3119
3120 pub const UPGRADE_PAUSED: StatusReason = StatusReason::new("UPGRADE_PAUSED");
3122 }
3123
3124 impl std::convert::From<std::string::String> for StatusReason {
3125 fn from(value: std::string::String) -> Self {
3126 Self(std::borrow::Cow::Owned(value))
3127 }
3128 }
3129}
3130
3131#[serde_with::serde_as]
3133#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3134#[serde(default, rename_all = "camelCase")]
3135#[non_exhaustive]
3136pub struct ListClustersRequest {
3137 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3139 pub parent: std::string::String,
3140
3141 pub page_size: i32,
3143
3144 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3147 pub page_token: std::string::String,
3148
3149 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3151 pub filter: std::string::String,
3152
3153 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3155 pub order_by: std::string::String,
3156}
3157
3158impl ListClustersRequest {
3159 pub fn new() -> Self {
3160 std::default::Default::default()
3161 }
3162
3163 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3165 self.parent = v.into();
3166 self
3167 }
3168
3169 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3171 self.page_size = v.into();
3172 self
3173 }
3174
3175 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3177 self.page_token = v.into();
3178 self
3179 }
3180
3181 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3183 self.filter = v.into();
3184 self
3185 }
3186
3187 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3189 self.order_by = v.into();
3190 self
3191 }
3192}
3193
3194impl wkt::message::Message for ListClustersRequest {
3195 fn typename() -> &'static str {
3196 "type.googleapis.com/google.cloud.edgecontainer.v1.ListClustersRequest"
3197 }
3198}
3199
3200#[serde_with::serde_as]
3202#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3203#[serde(default, rename_all = "camelCase")]
3204#[non_exhaustive]
3205pub struct ListClustersResponse {
3206 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3208 pub clusters: std::vec::Vec<crate::model::Cluster>,
3209
3210 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3212 pub next_page_token: std::string::String,
3213
3214 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3216 pub unreachable: std::vec::Vec<std::string::String>,
3217}
3218
3219impl ListClustersResponse {
3220 pub fn new() -> Self {
3221 std::default::Default::default()
3222 }
3223
3224 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3226 self.next_page_token = v.into();
3227 self
3228 }
3229
3230 pub fn set_clusters<T, V>(mut self, v: T) -> Self
3232 where
3233 T: std::iter::IntoIterator<Item = V>,
3234 V: std::convert::Into<crate::model::Cluster>,
3235 {
3236 use std::iter::Iterator;
3237 self.clusters = v.into_iter().map(|i| i.into()).collect();
3238 self
3239 }
3240
3241 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3243 where
3244 T: std::iter::IntoIterator<Item = V>,
3245 V: std::convert::Into<std::string::String>,
3246 {
3247 use std::iter::Iterator;
3248 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3249 self
3250 }
3251}
3252
3253impl wkt::message::Message for ListClustersResponse {
3254 fn typename() -> &'static str {
3255 "type.googleapis.com/google.cloud.edgecontainer.v1.ListClustersResponse"
3256 }
3257}
3258
3259#[cfg(feature = "unstable-stream")]
3260impl gax::paginator::PageableResponse for ListClustersResponse {
3261 type PageItem = crate::model::Cluster;
3262
3263 fn items(self) -> std::vec::Vec<Self::PageItem> {
3264 self.clusters
3265 }
3266
3267 fn next_page_token(&self) -> std::string::String {
3268 gax::paginator::extract_token(&self.next_page_token)
3269 }
3270}
3271
3272#[serde_with::serde_as]
3274#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3275#[serde(default, rename_all = "camelCase")]
3276#[non_exhaustive]
3277pub struct GetClusterRequest {
3278 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3280 pub name: std::string::String,
3281}
3282
3283impl GetClusterRequest {
3284 pub fn new() -> Self {
3285 std::default::Default::default()
3286 }
3287
3288 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3290 self.name = v.into();
3291 self
3292 }
3293}
3294
3295impl wkt::message::Message for GetClusterRequest {
3296 fn typename() -> &'static str {
3297 "type.googleapis.com/google.cloud.edgecontainer.v1.GetClusterRequest"
3298 }
3299}
3300
3301#[serde_with::serde_as]
3303#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3304#[serde(default, rename_all = "camelCase")]
3305#[non_exhaustive]
3306pub struct CreateClusterRequest {
3307 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3309 pub parent: std::string::String,
3310
3311 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3313 pub cluster_id: std::string::String,
3314
3315 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3317 pub cluster: std::option::Option<crate::model::Cluster>,
3318
3319 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3323 pub request_id: std::string::String,
3324}
3325
3326impl CreateClusterRequest {
3327 pub fn new() -> Self {
3328 std::default::Default::default()
3329 }
3330
3331 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3333 self.parent = v.into();
3334 self
3335 }
3336
3337 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3339 self.cluster_id = v.into();
3340 self
3341 }
3342
3343 pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
3345 mut self,
3346 v: T,
3347 ) -> Self {
3348 self.cluster = v.into();
3349 self
3350 }
3351
3352 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3354 self.request_id = v.into();
3355 self
3356 }
3357}
3358
3359impl wkt::message::Message for CreateClusterRequest {
3360 fn typename() -> &'static str {
3361 "type.googleapis.com/google.cloud.edgecontainer.v1.CreateClusterRequest"
3362 }
3363}
3364
3365#[serde_with::serde_as]
3367#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3368#[serde(default, rename_all = "camelCase")]
3369#[non_exhaustive]
3370pub struct UpdateClusterRequest {
3371 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3377 pub update_mask: std::option::Option<wkt::FieldMask>,
3378
3379 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3381 pub cluster: std::option::Option<crate::model::Cluster>,
3382
3383 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3387 pub request_id: std::string::String,
3388}
3389
3390impl UpdateClusterRequest {
3391 pub fn new() -> Self {
3392 std::default::Default::default()
3393 }
3394
3395 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
3397 mut self,
3398 v: T,
3399 ) -> Self {
3400 self.update_mask = v.into();
3401 self
3402 }
3403
3404 pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
3406 mut self,
3407 v: T,
3408 ) -> Self {
3409 self.cluster = v.into();
3410 self
3411 }
3412
3413 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3415 self.request_id = v.into();
3416 self
3417 }
3418}
3419
3420impl wkt::message::Message for UpdateClusterRequest {
3421 fn typename() -> &'static str {
3422 "type.googleapis.com/google.cloud.edgecontainer.v1.UpdateClusterRequest"
3423 }
3424}
3425
3426#[serde_with::serde_as]
3428#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3429#[serde(default, rename_all = "camelCase")]
3430#[non_exhaustive]
3431pub struct UpgradeClusterRequest {
3432 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3434 pub name: std::string::String,
3435
3436 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3438 pub target_version: std::string::String,
3439
3440 pub schedule: crate::model::upgrade_cluster_request::Schedule,
3442
3443 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3447 pub request_id: std::string::String,
3448}
3449
3450impl UpgradeClusterRequest {
3451 pub fn new() -> Self {
3452 std::default::Default::default()
3453 }
3454
3455 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3457 self.name = v.into();
3458 self
3459 }
3460
3461 pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3463 self.target_version = v.into();
3464 self
3465 }
3466
3467 pub fn set_schedule<T: std::convert::Into<crate::model::upgrade_cluster_request::Schedule>>(
3469 mut self,
3470 v: T,
3471 ) -> Self {
3472 self.schedule = v.into();
3473 self
3474 }
3475
3476 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3478 self.request_id = v.into();
3479 self
3480 }
3481}
3482
3483impl wkt::message::Message for UpgradeClusterRequest {
3484 fn typename() -> &'static str {
3485 "type.googleapis.com/google.cloud.edgecontainer.v1.UpgradeClusterRequest"
3486 }
3487}
3488
3489pub mod upgrade_cluster_request {
3491 #[allow(unused_imports)]
3492 use super::*;
3493
3494 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3496 pub struct Schedule(std::borrow::Cow<'static, str>);
3497
3498 impl Schedule {
3499 pub const fn new(v: &'static str) -> Self {
3501 Self(std::borrow::Cow::Borrowed(v))
3502 }
3503
3504 pub fn value(&self) -> &str {
3506 &self.0
3507 }
3508 }
3509
3510 pub mod schedule {
3512 use super::Schedule;
3513
3514 pub const SCHEDULE_UNSPECIFIED: Schedule = Schedule::new("SCHEDULE_UNSPECIFIED");
3517
3518 pub const IMMEDIATELY: Schedule = Schedule::new("IMMEDIATELY");
3521 }
3522
3523 impl std::convert::From<std::string::String> for Schedule {
3524 fn from(value: std::string::String) -> Self {
3525 Self(std::borrow::Cow::Owned(value))
3526 }
3527 }
3528}
3529
3530#[serde_with::serde_as]
3532#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3533#[serde(default, rename_all = "camelCase")]
3534#[non_exhaustive]
3535pub struct DeleteClusterRequest {
3536 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3538 pub name: std::string::String,
3539
3540 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3544 pub request_id: std::string::String,
3545}
3546
3547impl DeleteClusterRequest {
3548 pub fn new() -> Self {
3549 std::default::Default::default()
3550 }
3551
3552 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3554 self.name = v.into();
3555 self
3556 }
3557
3558 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3560 self.request_id = v.into();
3561 self
3562 }
3563}
3564
3565impl wkt::message::Message for DeleteClusterRequest {
3566 fn typename() -> &'static str {
3567 "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteClusterRequest"
3568 }
3569}
3570
3571#[serde_with::serde_as]
3573#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3574#[serde(default, rename_all = "camelCase")]
3575#[non_exhaustive]
3576pub struct GenerateAccessTokenRequest {
3577 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3579 pub cluster: std::string::String,
3580}
3581
3582impl GenerateAccessTokenRequest {
3583 pub fn new() -> Self {
3584 std::default::Default::default()
3585 }
3586
3587 pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3589 self.cluster = v.into();
3590 self
3591 }
3592}
3593
3594impl wkt::message::Message for GenerateAccessTokenRequest {
3595 fn typename() -> &'static str {
3596 "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateAccessTokenRequest"
3597 }
3598}
3599
3600#[serde_with::serde_as]
3602#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3603#[serde(default, rename_all = "camelCase")]
3604#[non_exhaustive]
3605pub struct GenerateAccessTokenResponse {
3606 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3608 pub access_token: std::string::String,
3609
3610 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3612 pub expire_time: std::option::Option<wkt::Timestamp>,
3613}
3614
3615impl GenerateAccessTokenResponse {
3616 pub fn new() -> Self {
3617 std::default::Default::default()
3618 }
3619
3620 pub fn set_access_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3622 self.access_token = v.into();
3623 self
3624 }
3625
3626 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3628 mut self,
3629 v: T,
3630 ) -> Self {
3631 self.expire_time = v.into();
3632 self
3633 }
3634}
3635
3636impl wkt::message::Message for GenerateAccessTokenResponse {
3637 fn typename() -> &'static str {
3638 "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateAccessTokenResponse"
3639 }
3640}
3641
3642#[serde_with::serde_as]
3644#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3645#[serde(default, rename_all = "camelCase")]
3646#[non_exhaustive]
3647pub struct GenerateOfflineCredentialRequest {
3648 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3650 pub cluster: std::string::String,
3651}
3652
3653impl GenerateOfflineCredentialRequest {
3654 pub fn new() -> Self {
3655 std::default::Default::default()
3656 }
3657
3658 pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3660 self.cluster = v.into();
3661 self
3662 }
3663}
3664
3665impl wkt::message::Message for GenerateOfflineCredentialRequest {
3666 fn typename() -> &'static str {
3667 "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateOfflineCredentialRequest"
3668 }
3669}
3670
3671#[serde_with::serde_as]
3673#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3674#[serde(default, rename_all = "camelCase")]
3675#[non_exhaustive]
3676pub struct GenerateOfflineCredentialResponse {
3677 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3679 pub client_certificate: std::string::String,
3680
3681 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3683 pub client_key: std::string::String,
3684
3685 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3687 pub user_id: std::string::String,
3688
3689 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3691 pub expire_time: std::option::Option<wkt::Timestamp>,
3692}
3693
3694impl GenerateOfflineCredentialResponse {
3695 pub fn new() -> Self {
3696 std::default::Default::default()
3697 }
3698
3699 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
3701 mut self,
3702 v: T,
3703 ) -> Self {
3704 self.client_certificate = v.into();
3705 self
3706 }
3707
3708 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3710 self.client_key = v.into();
3711 self
3712 }
3713
3714 pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3716 self.user_id = v.into();
3717 self
3718 }
3719
3720 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3722 mut self,
3723 v: T,
3724 ) -> Self {
3725 self.expire_time = v.into();
3726 self
3727 }
3728}
3729
3730impl wkt::message::Message for GenerateOfflineCredentialResponse {
3731 fn typename() -> &'static str {
3732 "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateOfflineCredentialResponse"
3733 }
3734}
3735
3736#[serde_with::serde_as]
3738#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3739#[serde(default, rename_all = "camelCase")]
3740#[non_exhaustive]
3741pub struct ListNodePoolsRequest {
3742 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3744 pub parent: std::string::String,
3745
3746 pub page_size: i32,
3748
3749 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3751 pub page_token: std::string::String,
3752
3753 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3755 pub filter: std::string::String,
3756
3757 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3759 pub order_by: std::string::String,
3760}
3761
3762impl ListNodePoolsRequest {
3763 pub fn new() -> Self {
3764 std::default::Default::default()
3765 }
3766
3767 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3769 self.parent = v.into();
3770 self
3771 }
3772
3773 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3775 self.page_size = v.into();
3776 self
3777 }
3778
3779 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3781 self.page_token = v.into();
3782 self
3783 }
3784
3785 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3787 self.filter = v.into();
3788 self
3789 }
3790
3791 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3793 self.order_by = v.into();
3794 self
3795 }
3796}
3797
3798impl wkt::message::Message for ListNodePoolsRequest {
3799 fn typename() -> &'static str {
3800 "type.googleapis.com/google.cloud.edgecontainer.v1.ListNodePoolsRequest"
3801 }
3802}
3803
3804#[serde_with::serde_as]
3806#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3807#[serde(default, rename_all = "camelCase")]
3808#[non_exhaustive]
3809pub struct ListNodePoolsResponse {
3810 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3812 pub node_pools: std::vec::Vec<crate::model::NodePool>,
3813
3814 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3816 pub next_page_token: std::string::String,
3817
3818 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3820 pub unreachable: std::vec::Vec<std::string::String>,
3821}
3822
3823impl ListNodePoolsResponse {
3824 pub fn new() -> Self {
3825 std::default::Default::default()
3826 }
3827
3828 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3830 self.next_page_token = v.into();
3831 self
3832 }
3833
3834 pub fn set_node_pools<T, V>(mut self, v: T) -> Self
3836 where
3837 T: std::iter::IntoIterator<Item = V>,
3838 V: std::convert::Into<crate::model::NodePool>,
3839 {
3840 use std::iter::Iterator;
3841 self.node_pools = v.into_iter().map(|i| i.into()).collect();
3842 self
3843 }
3844
3845 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3847 where
3848 T: std::iter::IntoIterator<Item = V>,
3849 V: std::convert::Into<std::string::String>,
3850 {
3851 use std::iter::Iterator;
3852 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3853 self
3854 }
3855}
3856
3857impl wkt::message::Message for ListNodePoolsResponse {
3858 fn typename() -> &'static str {
3859 "type.googleapis.com/google.cloud.edgecontainer.v1.ListNodePoolsResponse"
3860 }
3861}
3862
3863#[cfg(feature = "unstable-stream")]
3864impl gax::paginator::PageableResponse for ListNodePoolsResponse {
3865 type PageItem = crate::model::NodePool;
3866
3867 fn items(self) -> std::vec::Vec<Self::PageItem> {
3868 self.node_pools
3869 }
3870
3871 fn next_page_token(&self) -> std::string::String {
3872 gax::paginator::extract_token(&self.next_page_token)
3873 }
3874}
3875
3876#[serde_with::serde_as]
3878#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3879#[serde(default, rename_all = "camelCase")]
3880#[non_exhaustive]
3881pub struct GetNodePoolRequest {
3882 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3884 pub name: std::string::String,
3885}
3886
3887impl GetNodePoolRequest {
3888 pub fn new() -> Self {
3889 std::default::Default::default()
3890 }
3891
3892 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3894 self.name = v.into();
3895 self
3896 }
3897}
3898
3899impl wkt::message::Message for GetNodePoolRequest {
3900 fn typename() -> &'static str {
3901 "type.googleapis.com/google.cloud.edgecontainer.v1.GetNodePoolRequest"
3902 }
3903}
3904
3905#[serde_with::serde_as]
3907#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3908#[serde(default, rename_all = "camelCase")]
3909#[non_exhaustive]
3910pub struct CreateNodePoolRequest {
3911 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3913 pub parent: std::string::String,
3914
3915 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3917 pub node_pool_id: std::string::String,
3918
3919 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3921 pub node_pool: std::option::Option<crate::model::NodePool>,
3922
3923 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3927 pub request_id: std::string::String,
3928}
3929
3930impl CreateNodePoolRequest {
3931 pub fn new() -> Self {
3932 std::default::Default::default()
3933 }
3934
3935 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3937 self.parent = v.into();
3938 self
3939 }
3940
3941 pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3943 self.node_pool_id = v.into();
3944 self
3945 }
3946
3947 pub fn set_node_pool<T: std::convert::Into<std::option::Option<crate::model::NodePool>>>(
3949 mut self,
3950 v: T,
3951 ) -> Self {
3952 self.node_pool = v.into();
3953 self
3954 }
3955
3956 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3958 self.request_id = v.into();
3959 self
3960 }
3961}
3962
3963impl wkt::message::Message for CreateNodePoolRequest {
3964 fn typename() -> &'static str {
3965 "type.googleapis.com/google.cloud.edgecontainer.v1.CreateNodePoolRequest"
3966 }
3967}
3968
3969#[serde_with::serde_as]
3971#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3972#[serde(default, rename_all = "camelCase")]
3973#[non_exhaustive]
3974pub struct UpdateNodePoolRequest {
3975 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3981 pub update_mask: std::option::Option<wkt::FieldMask>,
3982
3983 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3985 pub node_pool: std::option::Option<crate::model::NodePool>,
3986
3987 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3991 pub request_id: std::string::String,
3992}
3993
3994impl UpdateNodePoolRequest {
3995 pub fn new() -> Self {
3996 std::default::Default::default()
3997 }
3998
3999 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4001 mut self,
4002 v: T,
4003 ) -> Self {
4004 self.update_mask = v.into();
4005 self
4006 }
4007
4008 pub fn set_node_pool<T: std::convert::Into<std::option::Option<crate::model::NodePool>>>(
4010 mut self,
4011 v: T,
4012 ) -> Self {
4013 self.node_pool = v.into();
4014 self
4015 }
4016
4017 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4019 self.request_id = v.into();
4020 self
4021 }
4022}
4023
4024impl wkt::message::Message for UpdateNodePoolRequest {
4025 fn typename() -> &'static str {
4026 "type.googleapis.com/google.cloud.edgecontainer.v1.UpdateNodePoolRequest"
4027 }
4028}
4029
4030#[serde_with::serde_as]
4032#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4033#[serde(default, rename_all = "camelCase")]
4034#[non_exhaustive]
4035pub struct DeleteNodePoolRequest {
4036 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4038 pub name: std::string::String,
4039
4040 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4044 pub request_id: std::string::String,
4045}
4046
4047impl DeleteNodePoolRequest {
4048 pub fn new() -> Self {
4049 std::default::Default::default()
4050 }
4051
4052 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4054 self.name = v.into();
4055 self
4056 }
4057
4058 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4060 self.request_id = v.into();
4061 self
4062 }
4063}
4064
4065impl wkt::message::Message for DeleteNodePoolRequest {
4066 fn typename() -> &'static str {
4067 "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteNodePoolRequest"
4068 }
4069}
4070
4071#[serde_with::serde_as]
4073#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4074#[serde(default, rename_all = "camelCase")]
4075#[non_exhaustive]
4076pub struct ListMachinesRequest {
4077 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4079 pub parent: std::string::String,
4080
4081 pub page_size: i32,
4083
4084 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4086 pub page_token: std::string::String,
4087
4088 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4090 pub filter: std::string::String,
4091
4092 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4094 pub order_by: std::string::String,
4095}
4096
4097impl ListMachinesRequest {
4098 pub fn new() -> Self {
4099 std::default::Default::default()
4100 }
4101
4102 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4104 self.parent = v.into();
4105 self
4106 }
4107
4108 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4110 self.page_size = v.into();
4111 self
4112 }
4113
4114 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4116 self.page_token = v.into();
4117 self
4118 }
4119
4120 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4122 self.filter = v.into();
4123 self
4124 }
4125
4126 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4128 self.order_by = v.into();
4129 self
4130 }
4131}
4132
4133impl wkt::message::Message for ListMachinesRequest {
4134 fn typename() -> &'static str {
4135 "type.googleapis.com/google.cloud.edgecontainer.v1.ListMachinesRequest"
4136 }
4137}
4138
4139#[serde_with::serde_as]
4141#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4142#[serde(default, rename_all = "camelCase")]
4143#[non_exhaustive]
4144pub struct ListMachinesResponse {
4145 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4147 pub machines: std::vec::Vec<crate::model::Machine>,
4148
4149 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4151 pub next_page_token: std::string::String,
4152
4153 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4155 pub unreachable: std::vec::Vec<std::string::String>,
4156}
4157
4158impl ListMachinesResponse {
4159 pub fn new() -> Self {
4160 std::default::Default::default()
4161 }
4162
4163 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4165 self.next_page_token = v.into();
4166 self
4167 }
4168
4169 pub fn set_machines<T, V>(mut self, v: T) -> Self
4171 where
4172 T: std::iter::IntoIterator<Item = V>,
4173 V: std::convert::Into<crate::model::Machine>,
4174 {
4175 use std::iter::Iterator;
4176 self.machines = v.into_iter().map(|i| i.into()).collect();
4177 self
4178 }
4179
4180 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4182 where
4183 T: std::iter::IntoIterator<Item = V>,
4184 V: std::convert::Into<std::string::String>,
4185 {
4186 use std::iter::Iterator;
4187 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4188 self
4189 }
4190}
4191
4192impl wkt::message::Message for ListMachinesResponse {
4193 fn typename() -> &'static str {
4194 "type.googleapis.com/google.cloud.edgecontainer.v1.ListMachinesResponse"
4195 }
4196}
4197
4198#[cfg(feature = "unstable-stream")]
4199impl gax::paginator::PageableResponse for ListMachinesResponse {
4200 type PageItem = crate::model::Machine;
4201
4202 fn items(self) -> std::vec::Vec<Self::PageItem> {
4203 self.machines
4204 }
4205
4206 fn next_page_token(&self) -> std::string::String {
4207 gax::paginator::extract_token(&self.next_page_token)
4208 }
4209}
4210
4211#[serde_with::serde_as]
4213#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4214#[serde(default, rename_all = "camelCase")]
4215#[non_exhaustive]
4216pub struct GetMachineRequest {
4217 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4219 pub name: std::string::String,
4220}
4221
4222impl GetMachineRequest {
4223 pub fn new() -> Self {
4224 std::default::Default::default()
4225 }
4226
4227 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4229 self.name = v.into();
4230 self
4231 }
4232}
4233
4234impl wkt::message::Message for GetMachineRequest {
4235 fn typename() -> &'static str {
4236 "type.googleapis.com/google.cloud.edgecontainer.v1.GetMachineRequest"
4237 }
4238}
4239
4240#[serde_with::serde_as]
4242#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4243#[serde(default, rename_all = "camelCase")]
4244#[non_exhaustive]
4245pub struct ListVpnConnectionsRequest {
4246 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4249 pub parent: std::string::String,
4250
4251 pub page_size: i32,
4253
4254 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4256 pub page_token: std::string::String,
4257
4258 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4260 pub filter: std::string::String,
4261
4262 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4264 pub order_by: std::string::String,
4265}
4266
4267impl ListVpnConnectionsRequest {
4268 pub fn new() -> Self {
4269 std::default::Default::default()
4270 }
4271
4272 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4274 self.parent = v.into();
4275 self
4276 }
4277
4278 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4280 self.page_size = v.into();
4281 self
4282 }
4283
4284 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4286 self.page_token = v.into();
4287 self
4288 }
4289
4290 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4292 self.filter = v.into();
4293 self
4294 }
4295
4296 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4298 self.order_by = v.into();
4299 self
4300 }
4301}
4302
4303impl wkt::message::Message for ListVpnConnectionsRequest {
4304 fn typename() -> &'static str {
4305 "type.googleapis.com/google.cloud.edgecontainer.v1.ListVpnConnectionsRequest"
4306 }
4307}
4308
4309#[serde_with::serde_as]
4311#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4312#[serde(default, rename_all = "camelCase")]
4313#[non_exhaustive]
4314pub struct ListVpnConnectionsResponse {
4315 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4317 pub vpn_connections: std::vec::Vec<crate::model::VpnConnection>,
4318
4319 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4321 pub next_page_token: std::string::String,
4322
4323 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4325 pub unreachable: std::vec::Vec<std::string::String>,
4326}
4327
4328impl ListVpnConnectionsResponse {
4329 pub fn new() -> Self {
4330 std::default::Default::default()
4331 }
4332
4333 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4335 self.next_page_token = v.into();
4336 self
4337 }
4338
4339 pub fn set_vpn_connections<T, V>(mut self, v: T) -> Self
4341 where
4342 T: std::iter::IntoIterator<Item = V>,
4343 V: std::convert::Into<crate::model::VpnConnection>,
4344 {
4345 use std::iter::Iterator;
4346 self.vpn_connections = v.into_iter().map(|i| i.into()).collect();
4347 self
4348 }
4349
4350 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4352 where
4353 T: std::iter::IntoIterator<Item = V>,
4354 V: std::convert::Into<std::string::String>,
4355 {
4356 use std::iter::Iterator;
4357 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4358 self
4359 }
4360}
4361
4362impl wkt::message::Message for ListVpnConnectionsResponse {
4363 fn typename() -> &'static str {
4364 "type.googleapis.com/google.cloud.edgecontainer.v1.ListVpnConnectionsResponse"
4365 }
4366}
4367
4368#[cfg(feature = "unstable-stream")]
4369impl gax::paginator::PageableResponse for ListVpnConnectionsResponse {
4370 type PageItem = crate::model::VpnConnection;
4371
4372 fn items(self) -> std::vec::Vec<Self::PageItem> {
4373 self.vpn_connections
4374 }
4375
4376 fn next_page_token(&self) -> std::string::String {
4377 gax::paginator::extract_token(&self.next_page_token)
4378 }
4379}
4380
4381#[serde_with::serde_as]
4383#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4384#[serde(default, rename_all = "camelCase")]
4385#[non_exhaustive]
4386pub struct GetVpnConnectionRequest {
4387 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4389 pub name: std::string::String,
4390}
4391
4392impl GetVpnConnectionRequest {
4393 pub fn new() -> Self {
4394 std::default::Default::default()
4395 }
4396
4397 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4399 self.name = v.into();
4400 self
4401 }
4402}
4403
4404impl wkt::message::Message for GetVpnConnectionRequest {
4405 fn typename() -> &'static str {
4406 "type.googleapis.com/google.cloud.edgecontainer.v1.GetVpnConnectionRequest"
4407 }
4408}
4409
4410#[serde_with::serde_as]
4412#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4413#[serde(default, rename_all = "camelCase")]
4414#[non_exhaustive]
4415pub struct CreateVpnConnectionRequest {
4416 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4418 pub parent: std::string::String,
4419
4420 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4422 pub vpn_connection_id: std::string::String,
4423
4424 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4426 pub vpn_connection: std::option::Option<crate::model::VpnConnection>,
4427
4428 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4432 pub request_id: std::string::String,
4433}
4434
4435impl CreateVpnConnectionRequest {
4436 pub fn new() -> Self {
4437 std::default::Default::default()
4438 }
4439
4440 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4442 self.parent = v.into();
4443 self
4444 }
4445
4446 pub fn set_vpn_connection_id<T: std::convert::Into<std::string::String>>(
4448 mut self,
4449 v: T,
4450 ) -> Self {
4451 self.vpn_connection_id = v.into();
4452 self
4453 }
4454
4455 pub fn set_vpn_connection<
4457 T: std::convert::Into<std::option::Option<crate::model::VpnConnection>>,
4458 >(
4459 mut self,
4460 v: T,
4461 ) -> Self {
4462 self.vpn_connection = v.into();
4463 self
4464 }
4465
4466 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4468 self.request_id = v.into();
4469 self
4470 }
4471}
4472
4473impl wkt::message::Message for CreateVpnConnectionRequest {
4474 fn typename() -> &'static str {
4475 "type.googleapis.com/google.cloud.edgecontainer.v1.CreateVpnConnectionRequest"
4476 }
4477}
4478
4479#[serde_with::serde_as]
4481#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4482#[serde(default, rename_all = "camelCase")]
4483#[non_exhaustive]
4484pub struct DeleteVpnConnectionRequest {
4485 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4487 pub name: std::string::String,
4488
4489 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4493 pub request_id: std::string::String,
4494}
4495
4496impl DeleteVpnConnectionRequest {
4497 pub fn new() -> Self {
4498 std::default::Default::default()
4499 }
4500
4501 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4503 self.name = v.into();
4504 self
4505 }
4506
4507 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4509 self.request_id = v.into();
4510 self
4511 }
4512}
4513
4514impl wkt::message::Message for DeleteVpnConnectionRequest {
4515 fn typename() -> &'static str {
4516 "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteVpnConnectionRequest"
4517 }
4518}
4519
4520#[serde_with::serde_as]
4522#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4523#[serde(default, rename_all = "camelCase")]
4524#[non_exhaustive]
4525pub struct GetServerConfigRequest {
4526 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4529 pub name: std::string::String,
4530}
4531
4532impl GetServerConfigRequest {
4533 pub fn new() -> Self {
4534 std::default::Default::default()
4535 }
4536
4537 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4539 self.name = v.into();
4540 self
4541 }
4542}
4543
4544impl wkt::message::Message for GetServerConfigRequest {
4545 fn typename() -> &'static str {
4546 "type.googleapis.com/google.cloud.edgecontainer.v1.GetServerConfigRequest"
4547 }
4548}
4549
4550#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4553pub struct KmsKeyState(std::borrow::Cow<'static, str>);
4554
4555impl KmsKeyState {
4556 pub const fn new(v: &'static str) -> Self {
4558 Self(std::borrow::Cow::Borrowed(v))
4559 }
4560
4561 pub fn value(&self) -> &str {
4563 &self.0
4564 }
4565}
4566
4567pub mod kms_key_state {
4569 use super::KmsKeyState;
4570
4571 pub const KMS_KEY_STATE_UNSPECIFIED: KmsKeyState =
4573 KmsKeyState::new("KMS_KEY_STATE_UNSPECIFIED");
4574
4575 pub const KMS_KEY_STATE_KEY_AVAILABLE: KmsKeyState =
4577 KmsKeyState::new("KMS_KEY_STATE_KEY_AVAILABLE");
4578
4579 pub const KMS_KEY_STATE_KEY_UNAVAILABLE: KmsKeyState =
4582 KmsKeyState::new("KMS_KEY_STATE_KEY_UNAVAILABLE");
4583}
4584
4585impl std::convert::From<std::string::String> for KmsKeyState {
4586 fn from(value: std::string::String) -> Self {
4587 Self(std::borrow::Cow::Owned(value))
4588 }
4589}
4590
4591#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4593pub struct ResourceState(std::borrow::Cow<'static, str>);
4594
4595impl ResourceState {
4596 pub const fn new(v: &'static str) -> Self {
4598 Self(std::borrow::Cow::Borrowed(v))
4599 }
4600
4601 pub fn value(&self) -> &str {
4603 &self.0
4604 }
4605}
4606
4607pub mod resource_state {
4609 use super::ResourceState;
4610
4611 pub const RESOURCE_STATE_UNSPECIFIED: ResourceState =
4613 ResourceState::new("RESOURCE_STATE_UNSPECIFIED");
4614
4615 pub const RESOURCE_STATE_LOCK_DOWN: ResourceState =
4617 ResourceState::new("RESOURCE_STATE_LOCK_DOWN");
4618
4619 pub const RESOURCE_STATE_LOCK_DOWN_PENDING: ResourceState =
4621 ResourceState::new("RESOURCE_STATE_LOCK_DOWN_PENDING");
4622}
4623
4624impl std::convert::From<std::string::String> for ResourceState {
4625 fn from(value: std::string::String) -> Self {
4626 Self(std::borrow::Cow::Owned(value))
4627 }
4628}